Changeset 125711 in webkit
- Timestamp:
- Aug 15, 2012 2:35:55 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 deleted
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125710 r125711 1 2012-08-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r125687. 4 http://trac.webkit.org/changeset/125687 5 https://bugs.webkit.org/show_bug.cgi?id=94147 6 7 It broke the whole world (Requested by Ossy_night on #webkit). 8 9 * fast/js/document-all-between-frames-expected.txt: Removed. 10 * fast/js/document-all-between-frames.html: Removed. 11 * fast/js/resources/document-all-between-frames-subframe.html: Removed. 12 * platform/chromium/TestExpectations: 13 1 14 2012-08-15 Dominic Mazzoni <dmazzoni@google.com> 2 15 -
trunk/LayoutTests/platform/chromium/TestExpectations
r125706 r125711 856 856 WONTFIX SKIP : plugins/npruntime/overrides-all-properties.html = TEXT 857 857 858 // JavaScriptCore treats document.all differently859 WONTFIX SKIP : fast/js/document-all-between-frames.html = TEXT860 861 858 // Chromium doesn't use fullscreen-specific media controls 862 859 WONTFIX SKIP : media/video-controls-fullscreen-volume.html = TEXT -
trunk/Source/JavaScriptCore/API/JSValueRef.cpp
r125687 r125711 267 267 268 268 JSValue jsValue = toJS(exec, value); 269 return jsValue.toBoolean( exec);269 return jsValue.toBoolean(); 270 270 } 271 271 -
trunk/Source/JavaScriptCore/ChangeLog
r125704 r125711 1 2012-08-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r125687. 4 http://trac.webkit.org/changeset/125687 5 https://bugs.webkit.org/show_bug.cgi?id=94147 6 7 It broke the whole world (Requested by Ossy_night on #webkit). 8 9 * API/JSValueRef.cpp: 10 (JSValueToBoolean): 11 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 12 * bytecode/Watchpoint.h: 13 (WatchpointSet): 14 * debugger/DebuggerCallFrame.h: 15 * dfg/DFGAbstractState.cpp: 16 (JSC::DFG::AbstractState::execute): 17 * dfg/DFGCFGSimplificationPhase.cpp: 18 (JSC::DFG::CFGSimplificationPhase::run): 19 * dfg/DFGOperations.cpp: 20 * dfg/DFGOperations.h: 21 * dfg/DFGSpeculativeJIT32_64.cpp: 22 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): 23 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): 24 (JSC::DFG::SpeculativeJIT::compile): 25 * dfg/DFGSpeculativeJIT64.cpp: 26 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): 27 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): 28 (JSC::DFG::SpeculativeJIT::compile): 29 * interpreter/Interpreter.cpp: 30 (JSC::Interpreter::privateExecute): 31 * jit/JITOpcodes.cpp: 32 (JSC::JIT::emit_op_is_undefined): 33 (JSC::JIT::emit_op_jeq_null): 34 (JSC::JIT::emit_op_jneq_null): 35 (JSC::JIT::emit_op_eq_null): 36 (JSC::JIT::emit_op_neq_null): 37 * jit/JITOpcodes32_64.cpp: 38 (JSC::JIT::emit_op_is_undefined): 39 (JSC::JIT::emit_op_jeq_null): 40 (JSC::JIT::emit_op_jneq_null): 41 (JSC::JIT::emit_op_eq_null): 42 (JSC::JIT::emit_op_neq_null): 43 * jit/JITStubs.cpp: 44 (JSC::DEFINE_STUB_FUNCTION): 45 * llint/LLIntSlowPaths.cpp: 46 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 47 * llint/LowLevelInterpreter32_64.asm: 48 * llint/LowLevelInterpreter64.asm: 49 * runtime/ArrayPrototype.cpp: 50 (JSC::arrayProtoFuncFilter): 51 (JSC::arrayProtoFuncEvery): 52 (JSC::arrayProtoFuncSome): 53 * runtime/BooleanConstructor.cpp: 54 (JSC::constructBoolean): 55 (JSC::callBooleanConstructor): 56 * runtime/JSCell.h: 57 (JSCell): 58 * runtime/JSGlobalObject.cpp: 59 (JSC::JSGlobalObject::JSGlobalObject): 60 * runtime/JSGlobalObject.h: 61 (JSGlobalObject): 62 * runtime/JSString.h: 63 (JSC::JSCell::toBoolean): 64 (JSC::JSValue::toBoolean): 65 * runtime/JSValue.h: 66 * runtime/ObjectConstructor.cpp: 67 (JSC::toPropertyDescriptor): 68 * runtime/Operations.cpp: 69 (JSC::jsTypeStringForValue): 70 (JSC::jsIsObjectType): 71 * runtime/Operations.h: 72 (JSC): 73 (JSC::JSValue::equalSlowCaseInline): 74 * runtime/RegExpConstructor.cpp: 75 (JSC::setRegExpConstructorMultiline): 76 * runtime/RegExpPrototype.cpp: 77 (JSC::regExpProtoFuncToString): 78 * runtime/Structure.h: 79 1 80 2012-08-15 Gabor Ballabas <gaborb@inf.u-szeged.hu> 2 81 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r125687 r125711 259 259 ?newUninitialized@CString@WTF@@SA?AV12@IAAPAD@Z 260 260 ?notifyWriteSlow@SymbolTableEntry@JSC@@AAEXXZ 261 ?notifyWriteSlow@WatchpointSet@JSC@@QAEXXZ262 261 ?nullptr@@3Vnullptr_t@std@@A 263 262 ?number@String@WTF@@SA?AV12@NII@Z -
trunk/Source/JavaScriptCore/bytecode/Watchpoint.h
r125687 r125711 79 79 bool* addressOfIsWatched() { return &m_isWatched; } 80 80 81 JS_EXPORT_PRIVATEvoid notifyWriteSlow(); // Call only if you've checked isWatched.81 void notifyWriteSlow(); // Call only if you've checked isWatched. 82 82 83 83 private: -
trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.h
r125687 r125711 49 49 } 50 50 51 CallFrame* callFrame() const { return m_callFrame; }52 51 JSGlobalObject* dynamicGlobalObject() const { return m_callFrame->dynamicGlobalObject(); } 53 52 ScopeChainNode* scopeChain() const { return m_callFrame->scopeChain(); } -
trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp
r125687 r125711 609 609 case LogicalNot: { 610 610 JSValue childConst = forNode(node.child1()).value(); 611 if (childConst && trySetConstant(nodeIndex, jsBoolean(!childConst.toBoolean( m_codeBlock->globalObjectFor(node.codeOrigin)->globalExec())))) {611 if (childConst && trySetConstant(nodeIndex, jsBoolean(!childConst.toBoolean()))) { 612 612 m_foundConstants = true; 613 613 node.setCanExit(false); … … 647 647 switch (node.op()) { 648 648 case IsUndefined: 649 node.setCanExit(true); 650 if (m_codeBlock->globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 651 constantWasSet = trySetConstant(nodeIndex, jsBoolean( 652 child.isCell() 653 ? false 654 : child.isUndefined())); 655 } else { 656 constantWasSet = trySetConstant(nodeIndex, jsBoolean( 657 child.isCell() 658 ? child.asCell()->structure()->masqueradesAsUndefined(m_codeBlock->globalObjectFor(node.codeOrigin)) 659 : child.isUndefined())); 660 } 649 constantWasSet = trySetConstant(nodeIndex, jsBoolean( 650 child.isCell() 651 ? child.asCell()->structure()->typeInfo().masqueradesAsUndefined() 652 : child.isUndefined())); 661 653 break; 662 654 case IsBoolean: … … 738 730 || (m_graph.isConstant(node.child2().index()) 739 731 && m_graph.valueOfJSConstant(node.child2().index()).isNull())) { 740 // We can exit if we haven't fired the MasqueradesAsUndefind watchpoint yet.741 node.setCanExit( m_codeBlock->globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid());732 // We know that this won't clobber the world. But that's all we know. 733 node.setCanExit(false); 742 734 break; 743 735 } … … 1092 1084 JSValue value = forNode(node.child1()).value(); 1093 1085 if (value) { 1094 bool booleanValue = value.toBoolean( m_codeBlock->globalObjectFor(node.codeOrigin)->globalExec());1086 bool booleanValue = value.toBoolean(); 1095 1087 if (booleanValue) 1096 1088 m_branchDirection = TakeTrue; -
trunk/Source/JavaScriptCore/dfg/DFGCFGSimplificationPhase.cpp
r125687 r125711 102 102 if (m_graph[m_graph[block->last()].child1()].hasConstant()) { 103 103 bool condition = 104 m_graph.valueOfJSConstant(m_graph[block->last()].child1().index()).toBoolean( m_graph.globalObjectFor(m_graph[block->last()].codeOrigin)->globalExec());104 m_graph.valueOfJSConstant(m_graph[block->last()].child1().index()).toBoolean(); 105 105 BasicBlock* targetBlock = m_graph.m_blocks[ 106 106 m_graph.successorForCondition(block, condition)].get(); -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r125687 r125711 1274 1274 } 1275 1275 1276 size_t DFG_OPERATION operationIsObject(E xecState* exec, EncodedJSValue value)1277 { 1278 return jsIsObjectType( exec,JSValue::decode(value));1276 size_t DFG_OPERATION operationIsObject(EncodedJSValue value) 1277 { 1278 return jsIsObjectType(JSValue::decode(value)); 1279 1279 } 1280 1280 … … 1369 1369 NativeCallFrameTracer tracer(globalData, exec); 1370 1370 1371 return JSValue::decode(encodedOp).toBoolean( exec);1371 return JSValue::decode(encodedOp).toBoolean(); 1372 1372 } 1373 1373 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r125687 r125711 181 181 JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL; 182 182 double DFG_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL; 183 size_t DFG_OPERATION operationIsObject(E xecState*, EncodedJSValue) WTF_INTERNAL;183 size_t DFG_OPERATION operationIsObject(EncodedJSValue) WTF_INTERNAL; 184 184 size_t DFG_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL; 185 185 void DFG_OPERATION operationReallocateStorageAndFinishPut(ExecState*, JSObject*, Structure*, PropertyOffset, EncodedJSValue) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r125687 r125711 624 624 if (!isKnownCell(operand.index())) 625 625 notCell = m_jit.branch32(MacroAssembler::NotEqual, argTagGPR, TrustedImm32(JSValue::CellTag)); 626 627 JITCompiler::Jump notMasqueradesAsUndefined; 628 if (m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 629 m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 630 m_jit.move(invert ? TrustedImm32(0) : TrustedImm32(1), resultPayloadGPR); 631 notMasqueradesAsUndefined = m_jit.jump(); 632 } else { 633 m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultPayloadGPR); 634 JITCompiler::Jump isMasqueradesAsUndefined = m_jit.branchTest8(JITCompiler::NonZero, JITCompiler::Address(resultPayloadGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined)); 635 636 m_jit.move(invert ? TrustedImm32(0) : TrustedImm32(1), resultPayloadGPR); 637 notMasqueradesAsUndefined = m_jit.jump(); 638 639 isMasqueradesAsUndefined.link(&m_jit); 640 GPRTemporary localGlobalObject(this); 641 GPRTemporary remoteGlobalObject(this); 642 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 643 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 644 m_jit.move(JITCompiler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)), localGlobalObjectGPR); 645 m_jit.loadPtr(JITCompiler::Address(resultPayloadGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 646 m_jit.compare32(invert ? JITCompiler::NotEqual : JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, resultPayloadGPR); 647 } 648 626 627 m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultPayloadGPR); 628 m_jit.test8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultPayloadGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), resultPayloadGPR); 629 649 630 if (!isKnownCell(operand.index())) { 650 631 JITCompiler::Jump done = m_jit.jump(); … … 660 641 } 661 642 662 notMasqueradesAsUndefined.link(&m_jit);663 664 643 booleanResult(resultPayloadGPR, m_compileIndex); 665 644 } … … 690 669 notCell = m_jit.branch32(MacroAssembler::NotEqual, argTagGPR, TrustedImm32(JSValue::CellTag)); 691 670 692 if (m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 693 m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 694 jump(invert ? taken : notTaken, ForceJump); 695 } else { 696 m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultGPR); 697 branchTest8(JITCompiler::Zero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), invert ? taken : notTaken); 698 699 GPRTemporary localGlobalObject(this); 700 GPRTemporary remoteGlobalObject(this); 701 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 702 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 703 m_jit.move(TrustedImmPtr(m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)), localGlobalObjectGPR); 704 m_jit.loadPtr(JITCompiler::Address(resultGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 705 branchPtr(invert ? JITCompiler::NotEqual : JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, taken); 706 } 707 671 m_jit.loadPtr(JITCompiler::Address(argPayloadGPR, JSCell::structureOffset()), resultGPR); 672 branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), taken); 673 708 674 if (!isKnownCell(operand.index())) { 709 675 jump(notTaken, ForceJump); … … 3803 3769 3804 3770 isCell.link(&m_jit); 3805 JITCompiler::Jump notMasqueradesAsUndefined; 3806 if (m_jit.graph().globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 3807 m_jit.graph().globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 3808 m_jit.move(TrustedImm32(0), result.gpr()); 3809 notMasqueradesAsUndefined = m_jit.jump(); 3810 } else { 3811 m_jit.loadPtr(JITCompiler::Address(value.payloadGPR(), JSCell::structureOffset()), result.gpr()); 3812 JITCompiler::Jump isMasqueradesAsUndefined = m_jit.branchTest8(JITCompiler::NonZero, JITCompiler::Address(result.gpr(), Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 3813 m_jit.move(TrustedImm32(0), result.gpr()); 3814 notMasqueradesAsUndefined = m_jit.jump(); 3815 3816 isMasqueradesAsUndefined.link(&m_jit); 3817 GPRTemporary localGlobalObject(this); 3818 GPRTemporary remoteGlobalObject(this); 3819 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 3820 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 3821 m_jit.move(TrustedImmPtr(m_jit.globalObjectFor(node.codeOrigin)), localGlobalObjectGPR); 3822 m_jit.loadPtr(JITCompiler::Address(result.gpr(), Structure::globalObjectOffset()), remoteGlobalObjectGPR); 3823 m_jit.compare32(JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, result.gpr()); 3824 } 3825 3826 notMasqueradesAsUndefined.link(&m_jit); 3771 m_jit.loadPtr(JITCompiler::Address(value.payloadGPR(), JSCell::structureOffset()), result.gpr()); 3772 m_jit.test8(JITCompiler::NonZero, JITCompiler::Address(result.gpr(), Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), result.gpr()); 3773 3827 3774 done.link(&m_jit); 3828 3775 booleanResult(result.gpr(), m_compileIndex); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r125687 r125711 589 589 if (!isKnownCell(operand.index())) 590 590 notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, argGPR, GPRInfo::tagMaskRegister); 591 592 JITCompiler::Jump notMasqueradesAsUndefined; 593 if (m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 594 m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 595 m_jit.move(invert ? TrustedImm32(0) : TrustedImm32(1), resultGPR); 596 notMasqueradesAsUndefined = m_jit.jump(); 597 } else { 598 m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR); 599 JITCompiler::Jump isMasqueradesAsUndefined = m_jit.branchTest8(JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined)); 600 601 m_jit.move(invert ? TrustedImm32(0) : TrustedImm32(1), resultGPR); 602 notMasqueradesAsUndefined = m_jit.jump(); 603 604 isMasqueradesAsUndefined.link(&m_jit); 605 GPRTemporary localGlobalObject(this); 606 GPRTemporary remoteGlobalObject(this); 607 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 608 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 609 m_jit.move(JITCompiler::TrustedImmPtr(m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)), localGlobalObjectGPR); 610 m_jit.loadPtr(JITCompiler::Address(resultGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 611 m_jit.comparePtr(invert ? JITCompiler::NotEqual : JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, resultGPR); 612 } 613 591 592 m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR); 593 m_jit.test8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), resultGPR); 594 614 595 if (!isKnownCell(operand.index())) { 615 596 JITCompiler::Jump done = m_jit.jump(); … … 623 604 done.link(&m_jit); 624 605 } 625 626 notMasqueradesAsUndefined.link(&m_jit); 627 606 628 607 m_jit.or32(TrustedImm32(ValueFalse), resultGPR); 629 608 jsValueResult(resultGPR, m_compileIndex, DataFormatJSBoolean); … … 654 633 notCell = m_jit.branchTestPtr(MacroAssembler::NonZero, argGPR, GPRInfo::tagMaskRegister); 655 634 656 if (m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 657 m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 658 jump(invert ? taken : notTaken, ForceJump); 659 } else { 660 m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR); 661 branchTest8(JITCompiler::Zero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), invert ? taken : notTaken); 662 663 GPRTemporary localGlobalObject(this); 664 GPRTemporary remoteGlobalObject(this); 665 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 666 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 667 m_jit.move(TrustedImmPtr(m_jit.graph().globalObjectFor(m_jit.graph()[operand].codeOrigin)), localGlobalObjectGPR); 668 m_jit.loadPtr(JITCompiler::Address(resultGPR, Structure::globalObjectOffset()), remoteGlobalObjectGPR); 669 branchPtr(invert ? JITCompiler::NotEqual : JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, taken); 670 } 671 635 m_jit.loadPtr(JITCompiler::Address(argGPR, JSCell::structureOffset()), resultGPR); 636 branchTest8(invert ? JITCompiler::Zero : JITCompiler::NonZero, JITCompiler::Address(resultGPR, Structure::typeInfoFlagsOffset()), JITCompiler::TrustedImm32(MasqueradesAsUndefined), taken); 637 672 638 if (!isKnownCell(operand.index())) { 673 639 jump(notTaken, ForceJump); … … 3790 3756 3791 3757 isCell.link(&m_jit); 3792 JITCompiler::Jump notMasqueradesAsUndefined; 3793 if (m_jit.graph().globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->isStillValid()) { 3794 m_jit.graph().globalObjectFor(node.codeOrigin)->masqueradesAsUndefinedWatchpoint()->add(speculationWatchpoint()); 3795 m_jit.move(TrustedImm32(ValueFalse), result.gpr()); 3796 notMasqueradesAsUndefined = m_jit.jump(); 3797 } else { 3798 m_jit.loadPtr(JITCompiler::Address(value.gpr(), JSCell::structureOffset()), result.gpr()); 3799 JITCompiler::Jump isMasqueradesAsUndefined = m_jit.branchTest8(JITCompiler::NonZero, JITCompiler::Address(result.gpr(), Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 3800 m_jit.move(TrustedImm32(ValueFalse), result.gpr()); 3801 notMasqueradesAsUndefined = m_jit.jump(); 3802 3803 isMasqueradesAsUndefined.link(&m_jit); 3804 GPRTemporary localGlobalObject(this); 3805 GPRTemporary remoteGlobalObject(this); 3806 GPRReg localGlobalObjectGPR = localGlobalObject.gpr(); 3807 GPRReg remoteGlobalObjectGPR = remoteGlobalObject.gpr(); 3808 m_jit.move(TrustedImmPtr(m_jit.globalObjectFor(node.codeOrigin)), localGlobalObjectGPR); 3809 m_jit.loadPtr(JITCompiler::Address(result.gpr(), Structure::globalObjectOffset()), remoteGlobalObjectGPR); 3810 m_jit.comparePtr(JITCompiler::Equal, localGlobalObjectGPR, remoteGlobalObjectGPR, result.gpr()); 3811 } 3812 3813 notMasqueradesAsUndefined.link(&m_jit); 3758 m_jit.loadPtr(JITCompiler::Address(value.gpr(), JSCell::structureOffset()), result.gpr()); 3759 m_jit.test8(JITCompiler::NonZero, JITCompiler::Address(result.gpr(), Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), result.gpr()); 3760 3814 3761 done.link(&m_jit); 3815 3762 m_jit.or32(TrustedImm32(ValueFalse), result.gpr()); -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r125687 r125711 2119 2119 } 2120 2120 2121 callFrame->uncheckedR(dst) = jsBoolean(src.isCell() && src.asCell()->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()));2121 callFrame->uncheckedR(dst) = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined()); 2122 2122 vPC += OPCODE_LENGTH(op_eq_null); 2123 2123 NEXT_INSTRUCTION(); … … 2159 2159 } 2160 2160 2161 callFrame->uncheckedR(dst) = jsBoolean(!src.isCell() || !src.asCell()->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()));2161 callFrame->uncheckedR(dst) = jsBoolean(!src.isCell() || !src.asCell()->structure()->typeInfo().masqueradesAsUndefined()); 2162 2162 vPC += OPCODE_LENGTH(op_neq_null); 2163 2163 NEXT_INSTRUCTION(); … … 2633 2633 int dst = vPC[1].u.operand; 2634 2634 int src = vPC[2].u.operand; 2635 JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean( callFrame));2635 JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean()); 2636 2636 CHECK_FOR_EXCEPTION(); 2637 2637 callFrame->uncheckedR(dst) = result; … … 2709 2709 int src = vPC[2].u.operand; 2710 2710 JSValue v = callFrame->r(src).jsValue(); 2711 callFrame->uncheckedR(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()) : v.isUndefined());2711 callFrame->uncheckedR(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); 2712 2712 2713 2713 vPC += OPCODE_LENGTH(op_is_undefined); … … 2765 2765 int dst = vPC[1].u.operand; 2766 2766 int src = vPC[2].u.operand; 2767 callFrame->uncheckedR(dst) = jsBoolean(jsIsObjectType(callFrame , callFrame->r(src).jsValue()));2767 callFrame->uncheckedR(dst) = jsBoolean(jsIsObjectType(callFrame->r(src).jsValue())); 2768 2768 2769 2769 vPC += OPCODE_LENGTH(op_is_object); … … 3981 3981 int cond = vPC[1].u.operand; 3982 3982 int target = vPC[2].u.operand; 3983 if (callFrame->r(cond).jsValue().toBoolean( callFrame)) {3983 if (callFrame->r(cond).jsValue().toBoolean()) { 3984 3984 vPC += target; 3985 3985 CHECK_FOR_TIMEOUT(); … … 4001 4001 int cond = vPC[1].u.operand; 4002 4002 int target = vPC[2].u.operand; 4003 if (!callFrame->r(cond).jsValue().toBoolean( callFrame)) {4003 if (!callFrame->r(cond).jsValue().toBoolean()) { 4004 4004 vPC += target; 4005 4005 CHECK_FOR_TIMEOUT(); … … 4018 4018 int cond = vPC[1].u.operand; 4019 4019 int target = vPC[2].u.operand; 4020 if (callFrame->r(cond).jsValue().toBoolean( callFrame)) {4020 if (callFrame->r(cond).jsValue().toBoolean()) { 4021 4021 vPC += target; 4022 4022 NEXT_INSTRUCTION(); … … 4034 4034 int cond = vPC[1].u.operand; 4035 4035 int target = vPC[2].u.operand; 4036 if (!callFrame->r(cond).jsValue().toBoolean( callFrame)) {4036 if (!callFrame->r(cond).jsValue().toBoolean()) { 4037 4037 vPC += target; 4038 4038 NEXT_INSTRUCTION(); … … 4052 4052 JSValue srcValue = callFrame->r(src).jsValue(); 4053 4053 4054 if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()))) {4054 if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { 4055 4055 vPC += target; 4056 4056 NEXT_INSTRUCTION(); … … 4070 4070 JSValue srcValue = callFrame->r(src).jsValue(); 4071 4071 4072 if (!srcValue.isUndefinedOrNull() && (!srcValue.isCell() || ! (srcValue.asCell()->structure()->masqueradesAsUndefined(callFrame->lexicalGlobalObject())))) {4072 if (!srcValue.isUndefinedOrNull() && (!srcValue.isCell() || !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { 4073 4073 vPC += target; 4074 4074 NEXT_INSTRUCTION(); -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r125687 r125711 480 480 isCell.link(this); 481 481 loadPtr(Address(regT0, JSCell::structureOffset()), regT1); 482 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 483 move(TrustedImm32(ValueFalse), regT0); 484 Jump notMasqueradesAsUndefined = jump(); 485 486 isMasqueradesAsUndefined.link(this); 487 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 488 loadPtr(Address(regT1, Structure::globalObjectOffset()), regT1); 489 comparePtr(Equal, regT0, regT1, regT0); 490 491 notMasqueradesAsUndefined.link(this); 482 test8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT0); 483 492 484 done.link(this); 493 485 emitTagAsBoolImmediate(regT0); … … 769 761 // First, handle JSCell cases - check MasqueradesAsUndefined bit on the structure. 770 762 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 771 Jump isNotMasqueradesAsUndefined = branchTest8(Zero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 772 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 773 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 774 addJump(branchPtr(Equal, regT0, regT2), target); 775 Jump masqueradesGlobalObjectIsForeign = jump(); 763 addJump(branchTest8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)), target); 764 Jump wasNotImmediate = jump(); 776 765 777 766 // Now handle the immediate cases - undefined & null … … 780 769 addJump(branchPtr(Equal, regT0, TrustedImmPtr(JSValue::encode(jsNull()))), target); 781 770 782 isNotMasqueradesAsUndefined.link(this); 783 masqueradesGlobalObjectIsForeign.link(this); 771 wasNotImmediate.link(this); 784 772 }; 785 773 void JIT::emit_op_jneq_null(Instruction* currentInstruction) … … 794 782 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 795 783 addJump(branchTest8(Zero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)), target); 796 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0);797 addJump(branchPtr(NotEqual, Address(regT2, Structure::globalObjectOffset()), regT0), target);798 784 Jump wasNotImmediate = jump(); 799 785 … … 1187 1173 1188 1174 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 1189 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 1190 move(TrustedImm32(0), regT0); 1191 Jump wasNotMasqueradesAsUndefined = jump(); 1192 1193 isMasqueradesAsUndefined.link(this); 1194 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 1195 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 1196 comparePtr(Equal, regT0, regT2, regT0); 1175 test8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT0); 1176 1197 1177 Jump wasNotImmediate = jump(); 1198 1178 … … 1203 1183 1204 1184 wasNotImmediate.link(this); 1205 wasNotMasqueradesAsUndefined.link(this);1206 1185 1207 1186 emitTagAsBoolImmediate(regT0); … … 1219 1198 1220 1199 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 1221 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 1222 move(TrustedImm32(1), regT0); 1223 Jump wasNotMasqueradesAsUndefined = jump(); 1224 1225 isMasqueradesAsUndefined.link(this); 1226 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 1227 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 1228 comparePtr(NotEqual, regT0, regT2, regT0); 1200 test8(Zero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT0); 1201 1229 1202 Jump wasNotImmediate = jump(); 1230 1203 … … 1235 1208 1236 1209 wasNotImmediate.link(this); 1237 wasNotMasqueradesAsUndefined.link(this);1238 1210 1239 1211 emitTagAsBoolImmediate(regT0); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r125687 r125711 647 647 isCell.link(this); 648 648 loadPtr(Address(regT0, JSCell::structureOffset()), regT1); 649 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 650 move(TrustedImm32(0), regT0); 651 Jump notMasqueradesAsUndefined = jump(); 652 653 isMasqueradesAsUndefined.link(this); 654 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 655 loadPtr(Address(regT1, Structure::globalObjectOffset()), regT1); 656 compare32(Equal, regT0, regT1, regT0); 657 658 notMasqueradesAsUndefined.link(this); 649 test8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT0); 650 659 651 done.link(this); 660 652 emitStoreBool(dst, regT0); … … 939 931 // First, handle JSCell cases - check MasqueradesAsUndefined bit on the structure. 940 932 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 941 Jump isNotMasqueradesAsUndefined = branchTest8(Zero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 942 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 943 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 944 addJump(branchPtr(Equal, regT0, regT2), target); 945 Jump masqueradesGlobalObjectIsForeign = jump(); 933 addJump(branchTest8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)), target); 934 935 Jump wasNotImmediate = jump(); 946 936 947 937 // Now handle the immediate cases - undefined & null 948 938 isImmediate.link(this); 939 949 940 ASSERT((JSValue::UndefinedTag + 1 == JSValue::NullTag) && (JSValue::NullTag & 0x1)); 950 941 or32(TrustedImm32(1), regT1); 951 942 addJump(branch32(Equal, regT1, TrustedImm32(JSValue::NullTag)), target); 952 943 953 isNotMasqueradesAsUndefined.link(this); 954 masqueradesGlobalObjectIsForeign.link(this); 944 wasNotImmediate.link(this); 955 945 } 956 946 … … 967 957 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 968 958 addJump(branchTest8(Zero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)), target); 969 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 970 addJump(branchPtr(NotEqual, Address(regT2, Structure::globalObjectOffset()), regT0), target); 959 971 960 Jump wasNotImmediate = jump(); 972 961 … … 1170 1159 1171 1160 loadPtr(Address(regT0, JSCell::structureOffset()), regT1); 1172 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 1173 move(TrustedImm32(0), regT0); 1174 Jump wasNotMasqueradesAsUndefined = jump(); 1175 1176 isMasqueradesAsUndefined.link(this); 1177 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 1178 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 1179 compare32(Equal, regT0, regT2, regT0); 1161 test8(NonZero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT1); 1162 1180 1163 Jump wasNotImmediate = jump(); 1181 1164 … … 1187 1170 1188 1171 wasNotImmediate.link(this); 1189 wasNotMasqueradesAsUndefined.link(this);1190 1172 1191 1173 emitStoreBool(dst, regT1); … … 1201 1183 1202 1184 loadPtr(Address(regT0, JSCell::structureOffset()), regT1); 1203 Jump isMasqueradesAsUndefined = branchTest8(NonZero, Address(regT2, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined)); 1204 move(TrustedImm32(1), regT0); 1205 Jump wasNotMasqueradesAsUndefined = jump(); 1206 1207 isMasqueradesAsUndefined.link(this); 1208 move(TrustedImmPtr(m_codeBlock->globalObject()), regT0); 1209 loadPtr(Address(regT2, Structure::globalObjectOffset()), regT2); 1210 compare32(NotEqual, regT0, regT2, regT0); 1185 test8(Zero, Address(regT1, Structure::typeInfoFlagsOffset()), TrustedImm32(MasqueradesAsUndefined), regT1); 1186 1211 1187 Jump wasNotImmediate = jump(); 1212 1188 … … 1218 1194 1219 1195 wasNotImmediate.link(this); 1220 wasNotMasqueradesAsUndefined.link(this);1221 1196 1222 1197 emitStoreBool(dst, regT1); -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r125687 r125711 2779 2779 JSValue src = stackFrame.args[0].jsValue(); 2780 2780 2781 JSValue result = jsBoolean(!src.toBoolean( stackFrame.callFrame));2781 JSValue result = jsBoolean(!src.toBoolean()); 2782 2782 CHECK_FOR_EXCEPTION_AT_END(); 2783 2783 return JSValue::encode(result); … … 2790 2790 JSValue src1 = stackFrame.args[0].jsValue(); 2791 2791 2792 bool result = src1.toBoolean( stackFrame.callFrame);2792 bool result = src1.toBoolean(); 2793 2793 CHECK_FOR_EXCEPTION_AT_END(); 2794 2794 return result; … … 2821 2821 if (src2.isUndefined()) { 2822 2822 return src1.isNull() || 2823 (src1.isCell() && src1.asCell()->structure()-> masqueradesAsUndefined(stackFrame.callFrame->lexicalGlobalObject()))2823 (src1.isCell() && src1.asCell()->structure()->typeInfo().masqueradesAsUndefined()) 2824 2824 || src1.isUndefined(); 2825 2825 } … … 2827 2827 if (src2.isNull()) { 2828 2828 return src1.isUndefined() || 2829 (src1.isCell() && src1.asCell()->structure()-> masqueradesAsUndefined(stackFrame.callFrame->lexicalGlobalObject()))2829 (src1.isCell() && src1.asCell()->structure()->typeInfo().masqueradesAsUndefined()) 2830 2830 || src1.isNull(); 2831 2831 } … … 2864 2864 2865 2865 if (src1.isUndefined()) 2866 return src2.isCell() && src2.asCell()->structure()-> masqueradesAsUndefined(stackFrame.callFrame->lexicalGlobalObject());2866 return src2.isCell() && src2.asCell()->structure()->typeInfo().masqueradesAsUndefined(); 2867 2867 2868 2868 if (src1.isNull()) 2869 return src2.isCell() && src2.asCell()->structure()-> masqueradesAsUndefined(stackFrame.callFrame->lexicalGlobalObject());2869 return src2.isCell() && src2.asCell()->structure()->typeInfo().masqueradesAsUndefined(); 2870 2870 2871 2871 JSCell* cell1 = src1.asCell(); … … 3180 3180 STUB_INIT_STACK_FRAME(stackFrame); 3181 3181 3182 return JSValue::encode(jsBoolean(jsIsObjectType(stackFrame. callFrame, stackFrame.args[0].jsValue())));3182 return JSValue::encode(jsBoolean(jsIsObjectType(stackFrame.args[0].jsValue()))); 3183 3183 } 3184 3184 -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r125687 r125711 518 518 { 519 519 LLINT_BEGIN(); 520 LLINT_RETURN(jsBoolean(!LLINT_OP_C(2).jsValue().toBoolean( exec)));520 LLINT_RETURN(jsBoolean(!LLINT_OP_C(2).jsValue().toBoolean())); 521 521 } 522 522 … … 740 740 { 741 741 LLINT_BEGIN(); 742 LLINT_RETURN(jsBoolean(jsIsObjectType( exec,LLINT_OP_C(2).jsValue())));742 LLINT_RETURN(jsBoolean(jsIsObjectType(LLINT_OP_C(2).jsValue()))); 743 743 } 744 744 … … 1174 1174 { 1175 1175 LLINT_BEGIN(); 1176 LLINT_BRANCH(op_jtrue, LLINT_OP_C(1).jsValue().toBoolean( exec));1176 LLINT_BRANCH(op_jtrue, LLINT_OP_C(1).jsValue().toBoolean()); 1177 1177 } 1178 1178 … … 1180 1180 { 1181 1181 LLINT_BEGIN(); 1182 LLINT_BRANCH(op_jfalse, !LLINT_OP_C(1).jsValue().toBoolean( exec));1182 LLINT_BRANCH(op_jfalse, !LLINT_OP_C(1).jsValue().toBoolean()); 1183 1183 } 1184 1184 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r125687 r125711 445 445 bineq t1, CellTag, .opEqNullImmediate 446 446 loadp JSCell::m_structure[t0], t1 447 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, .opEqNullMasqueradesAsUndefined 448 move 0, t1 449 jmp .opEqNullNotImmediate 450 .opEqNullMasqueradesAsUndefined: 451 loadp CodeBlock[cfr], t0 452 loadp CodeBlock::m_globalObject[t0], t0 453 cpeq Structure::m_globalObject[t1], t0, t1 447 tbnz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, t1 454 448 jmp .opEqNullNotImmediate 455 449 .opEqNullImmediate: … … 492 486 bineq t1, CellTag, .opNeqNullImmediate 493 487 loadp JSCell::m_structure[t0], t1 494 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, .opNeqNullMasqueradesAsUndefined 495 move 1, t1 496 jmp .opNeqNullNotImmediate 497 .opNeqNullMasqueradesAsUndefined: 498 loadp CodeBlock[cfr], t0 499 loadp CodeBlock::m_globalObject[t0], t0 500 cpneq Structure::m_globalObject[t1], t0, t1 488 tbz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, t1 501 489 jmp .opNeqNullNotImmediate 502 490 .opNeqNullImmediate: … … 888 876 .opIsUndefinedCell: 889 877 loadp JSCell::m_structure[t3], t1 890 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, .opIsUndefinedMasqueradesAsUndefined 891 move 0, t1 892 storei t1, PayloadOffset[cfr, t0, 8] 893 dispatch(3) 894 .opIsUndefinedMasqueradesAsUndefined: 895 loadp CodeBlock[cfr], t3 896 loadp CodeBlock::m_globalObject[t3], t3 897 cpeq Structure::m_globalObject[t1], t3, t1 878 tbnz Structure::m_typeInfo + TypeInfo::m_flags[t1], MasqueradesAsUndefined, t1 898 879 storei t1, PayloadOffset[cfr, t0, 8] 899 880 dispatch(3) … … 1426 1407 bineq t1, CellTag, .immediate 1427 1408 loadp JSCell::m_structure[t0], t2 1428 cellHandler( t2,Structure::m_typeInfo + TypeInfo::m_flags[t2], .target)1409 cellHandler(Structure::m_typeInfo + TypeInfo::m_flags[t2], .target) 1429 1410 dispatch(3) 1430 1411 … … 1441 1422 traceExecution() 1442 1423 equalNull( 1443 macro (structure, value, target) 1444 btbz value, MasqueradesAsUndefined, .opJeqNullNotMasqueradesAsUndefined 1445 loadp CodeBlock[cfr], t0 1446 loadp CodeBlock::m_globalObject[t0], t0 1447 bpeq Structure::m_globalObject[structure], t0, target 1448 .opJeqNullNotMasqueradesAsUndefined: 1449 end, 1424 macro (value, target) btbnz value, MasqueradesAsUndefined, target end, 1450 1425 macro (value, target) bieq value, NullTag, target end) 1451 1426 … … 1454 1429 traceExecution() 1455 1430 equalNull( 1456 macro (structure, value, target) 1457 btbz value, MasqueradesAsUndefined, target 1458 loadp CodeBlock[cfr], t0 1459 loadp CodeBlock::m_globalObject[t0], t0 1460 bpneq Structure::m_globalObject[structure], t0, target 1461 end, 1431 macro (value, target) btbz value, MasqueradesAsUndefined, target end, 1462 1432 macro (value, target) bineq value, NullTag, target end) 1463 1433 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r125687 r125711 325 325 btpnz t0, tagMask, .immediate 326 326 loadp JSCell::m_structure[t0], t2 327 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t2], MasqueradesAsUndefined, .masqueradesAsUndefined 328 move 0, t0 329 jmp .done 330 .masqueradesAsUndefined: 331 loadp CodeBlock[cfr], t0 332 loadp CodeBlock::m_globalObject[t0], t0 333 cpeq Structure::m_globalObject[t2], t0, t0 327 tbnz Structure::m_typeInfo + TypeInfo::m_flags[t2], MasqueradesAsUndefined, t0 334 328 jmp .done 335 329 .immediate: … … 740 734 .opIsUndefinedCell: 741 735 loadp JSCell::m_structure[t0], t0 742 btbnz Structure::m_typeInfo + TypeInfo::m_flags[t0], MasqueradesAsUndefined, .masqueradesAsUndefined743 moveValueFalse, t1736 tbnz Structure::m_typeInfo + TypeInfo::m_flags[t0], MasqueradesAsUndefined, t1 737 orp ValueFalse, t1 744 738 storep t1, [cfr, t2, 8] 745 dispatch(3)746 .masqueradesAsUndefined:747 loadp CodeBlock[cfr], t1748 loadp CodeBlock::m_globalObject[t1], t1749 cpeq Structure::m_globalObject[t0], t1, t3750 orp ValueFalse, t3751 storep t3, [cfr, t2, 8]752 739 dispatch(3) 753 740 … … 1264 1251 btpnz t0, tagMask, .immediate 1265 1252 loadp JSCell::m_structure[t0], t2 1266 cellHandler( t2,Structure::m_typeInfo + TypeInfo::m_flags[t2], .target)1253 cellHandler(Structure::m_typeInfo + TypeInfo::m_flags[t2], .target) 1267 1254 dispatch(3) 1268 1255 … … 1279 1266 traceExecution() 1280 1267 equalNull( 1281 macro (structure, value, target) 1282 btbz value, MasqueradesAsUndefined, .notMasqueradesAsUndefined 1283 loadp CodeBlock[cfr], t0 1284 loadp CodeBlock::m_globalObject[t0], t0 1285 bpeq Structure::m_globalObject[structure], t0, target 1286 .notMasqueradesAsUndefined: 1287 end, 1268 macro (value, target) btbnz value, MasqueradesAsUndefined, target end, 1288 1269 macro (value, target) bpeq value, ValueNull, target end) 1289 1270 … … 1292 1273 traceExecution() 1293 1274 equalNull( 1294 macro (structure, value, target) 1295 btbz value, MasqueradesAsUndefined, target 1296 loadp CodeBlock[cfr], t0 1297 loadp CodeBlock::m_globalObject[t0], t0 1298 bpneq Structure::m_globalObject[structure], t0, target 1299 end, 1275 macro (value, target) btbz value, MasqueradesAsUndefined, target end, 1300 1276 macro (value, target) bpneq value, ValueNull, target end) 1301 1277 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r125687 r125711 798 798 799 799 JSValue result = cachedCall.call(); 800 if (result.toBoolean( exec))800 if (result.toBoolean()) 801 801 resultArray->putDirectIndex(exec, filterIndex++, v); 802 802 } … … 819 819 820 820 JSValue result = call(exec, function, callType, callData, applyThis, eachArguments); 821 if (result.toBoolean( exec))821 if (result.toBoolean()) 822 822 resultArray->putDirectIndex(exec, filterIndex++, v); 823 823 } … … 918 918 cachedCall.setArgument(2, thisObj); 919 919 JSValue result = cachedCall.call(); 920 if (!result.toBoolean( exec))920 if (!result.toBoolean()) 921 921 return JSValue::encode(jsBoolean(false)); 922 922 } … … 935 935 return JSValue::encode(jsUndefined()); 936 936 937 bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean( exec);937 bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(); 938 938 if (!predicateResult) { 939 939 result = jsBoolean(false); … … 1026 1026 cachedCall.setArgument(2, thisObj); 1027 1027 JSValue result = cachedCall.call(); 1028 if (result.toBoolean( exec))1028 if (result.toBoolean()) 1029 1029 return JSValue::encode(jsBoolean(true)); 1030 1030 } … … 1043 1043 return JSValue::encode(jsUndefined()); 1044 1044 1045 bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean( exec);1045 bool predicateResult = call(exec, function, callType, callData, applyThis, eachArguments).toBoolean(); 1046 1046 if (predicateResult) { 1047 1047 result = jsBoolean(true); -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp
r125687 r125711 50 50 { 51 51 BooleanObject* obj = BooleanObject::create(exec->globalData(), asInternalFunction(exec->callee())->globalObject()->booleanObjectStructure()); 52 obj->setInternalValue(exec->globalData(), jsBoolean(args.at(0).toBoolean( exec)));52 obj->setInternalValue(exec->globalData(), jsBoolean(args.at(0).toBoolean())); 53 53 return obj; 54 54 } … … 69 69 static EncodedJSValue JSC_HOST_CALL callBooleanConstructor(ExecState* exec) 70 70 { 71 return JSValue::encode(jsBoolean(exec->argument(0).toBoolean( exec)));71 return JSValue::encode(jsBoolean(exec->argument(0).toBoolean())); 72 72 } 73 73 -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r125687 r125711 99 99 JS_EXPORT_PRIVATE JSValue toPrimitive(ExecState*, PreferredPrimitiveType) const; 100 100 bool getPrimitiveNumber(ExecState*, double& number, JSValue&) const; 101 bool toBoolean( ExecState*) const;101 bool toBoolean() const; 102 102 JS_EXPORT_PRIVATE double toNumber(ExecState*) const; 103 103 JS_EXPORT_PRIVATE JSObject* toObject(ExecState*, JSGlobalObject*) const; -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r125687 r125711 116 116 : JSSegmentedVariableObject(globalData, structure, &m_symbolTable) 117 117 , m_globalScopeChain() 118 , m_masqueradesAsUndefinedWatchpoint(adoptRef(new WatchpointSet(InitializedWatching)))119 118 , m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) 120 119 , m_evalEnabled(true) -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r125687 r125711 31 31 #include "StringPrototype.h" 32 32 #include "StructureChain.h" 33 #include "Watchpoint.h"34 33 #include <wtf/HashSet.h> 35 34 #include <wtf/OwnPtr.h> … … 144 143 Debugger* m_debugger; 145 144 146 RefPtr<WatchpointSet> m_masqueradesAsUndefinedWatchpoint;147 148 145 OwnPtr<JSGlobalObjectRareData> m_rareData; 149 146 … … 274 271 Structure* stringObjectStructure() const { return m_stringObjectStructure.get(); } 275 272 276 WatchpointSet* masqueradesAsUndefinedWatchpoint() { return m_masqueradesAsUndefinedWatchpoint.get(); }277 278 273 void setProfileGroup(unsigned value) { createRareDataIfNeeded(); m_rareData->profileGroup = value; } 279 274 unsigned profileGroup() const -
trunk/Source/JavaScriptCore/runtime/JSString.h
r125687 r125711 501 501 inline bool isJSString(JSValue v) { return v.isCell() && v.asCell()->classInfo() == &JSString::s_info; } 502 502 503 inline bool JSCell::toBoolean( ExecState* exec) const503 inline bool JSCell::toBoolean() const 504 504 { 505 505 if (isString()) 506 506 return static_cast<const JSString*>(this)->toBoolean(); 507 return !structure()-> masqueradesAsUndefined(exec->lexicalGlobalObject());507 return !structure()->typeInfo().masqueradesAsUndefined(); 508 508 } 509 509 510 510 // --- JSValue inlines ---------------------------- 511 511 512 inline bool JSValue::toBoolean( ExecState* exec) const512 inline bool JSValue::toBoolean() const 513 513 { 514 514 if (isInt32()) … … 517 517 return asDouble() > 0.0 || asDouble() < 0.0; // false for NaN 518 518 if (isCell()) 519 return asCell()->toBoolean( exec);519 return asCell()->toBoolean(); 520 520 return isTrue(); // false, null, and undefined all convert to false. 521 521 } -
trunk/Source/JavaScriptCore/runtime/JSValue.h
r125687 r125711 210 210 bool getPrimitiveNumber(ExecState*, double& number, JSValue&); 211 211 212 bool toBoolean( ExecState*) const;212 bool toBoolean() const; 213 213 214 214 // toNumber conversion is expected to be side effect free if an exception has -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r125687 r125711 215 215 PropertySlot enumerableSlot(description); 216 216 if (description->getPropertySlot(exec, exec->propertyNames().enumerable, enumerableSlot)) { 217 desc.setEnumerable(enumerableSlot.getValue(exec, exec->propertyNames().enumerable).toBoolean( exec));217 desc.setEnumerable(enumerableSlot.getValue(exec, exec->propertyNames().enumerable).toBoolean()); 218 218 if (exec->hadException()) 219 219 return false; … … 222 222 PropertySlot configurableSlot(description); 223 223 if (description->getPropertySlot(exec, exec->propertyNames().configurable, configurableSlot)) { 224 desc.setConfigurable(configurableSlot.getValue(exec, exec->propertyNames().configurable).toBoolean( exec));224 desc.setConfigurable(configurableSlot.getValue(exec, exec->propertyNames().configurable).toBoolean()); 225 225 if (exec->hadException()) 226 226 return false; … … 237 237 PropertySlot writableSlot(description); 238 238 if (description->getPropertySlot(exec, exec->propertyNames().writable, writableSlot)) { 239 desc.setWritable(writableSlot.getValue(exec, exec->propertyNames().writable).toBoolean( exec));239 desc.setWritable(writableSlot.getValue(exec, exec->propertyNames().writable).toBoolean()); 240 240 if (exec->hadException()) 241 241 return false; -
trunk/Source/JavaScriptCore/runtime/Operations.cpp
r125687 r125711 71 71 // Return "undefined" for objects that should be treated 72 72 // as null when doing comparisons. 73 if (asObject(v)->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()))73 if (asObject(v)->structure()->typeInfo().masqueradesAsUndefined()) 74 74 return globalData.smallStrings.undefinedString(&globalData); 75 75 CallData callData; … … 81 81 } 82 82 83 bool jsIsObjectType( CallFrame* callFrame,JSValue v)83 bool jsIsObjectType(JSValue v) 84 84 { 85 85 if (!v.isCell()) … … 90 90 return false; 91 91 if (type >= ObjectType) { 92 if (asObject(v)->structure()-> masqueradesAsUndefined(callFrame->lexicalGlobalObject()))92 if (asObject(v)->structure()->typeInfo().masqueradesAsUndefined()) 93 93 return false; 94 94 CallData callData; -
trunk/Source/JavaScriptCore/runtime/Operations.h
r125687 r125711 32 32 NEVER_INLINE JSValue jsAddSlowCase(CallFrame*, JSValue, JSValue); 33 33 JSValue jsTypeStringForValue(CallFrame*, JSValue); 34 bool jsIsObjectType( CallFrame*,JSValue);34 bool jsIsObjectType(JSValue); 35 35 bool jsIsFunctionType(JSValue); 36 36 … … 135 135 if (!v2.isCell()) 136 136 return false; 137 return v2.asCell()->structure()-> masqueradesAsUndefined(exec->lexicalGlobalObject());137 return v2.asCell()->structure()->typeInfo().masqueradesAsUndefined(); 138 138 } 139 139 … … 141 141 if (!v1.isCell()) 142 142 return false; 143 return v1.asCell()->structure()-> masqueradesAsUndefined(exec->lexicalGlobalObject());143 return v1.asCell()->structure()->typeInfo().masqueradesAsUndefined(); 144 144 } 145 145 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r125687 r125711 250 250 } 251 251 252 void setRegExpConstructorMultiline(ExecState* exec, JSObject* baseObject, JSValue value)253 { 254 asRegExpConstructor(baseObject)->setMultiline(value.toBoolean( exec));252 void setRegExpConstructorMultiline(ExecState*, JSObject* baseObject, JSValue value) 253 { 254 asRegExpConstructor(baseObject)->setMultiline(value.toBoolean()); 255 255 } 256 256 -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp
r125687 r125711 148 148 char postfix[5] = { '/', 0, 0, 0, 0 }; 149 149 int index = 1; 150 if (thisObject->get(exec, exec->propertyNames().global).toBoolean( exec))150 if (thisObject->get(exec, exec->propertyNames().global).toBoolean()) 151 151 postfix[index++] = 'g'; 152 if (thisObject->get(exec, exec->propertyNames().ignoreCase).toBoolean( exec))152 if (thisObject->get(exec, exec->propertyNames().ignoreCase).toBoolean()) 153 153 postfix[index++] = 'i'; 154 if (thisObject->get(exec, exec->propertyNames().multiline).toBoolean( exec))154 if (thisObject->get(exec, exec->propertyNames().multiline).toBoolean()) 155 155 postfix[index] = 'm'; 156 156 UString source = thisObject->get(exec, exec->propertyNames().source).toString(exec)->value(exec); -
trunk/Source/JavaScriptCore/runtime/Structure.h
r125687 r125711 257 257 } 258 258 259 bool masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject);260 261 259 PropertyOffset get(JSGlobalData&, PropertyName); 262 260 PropertyOffset get(JSGlobalData&, const UString& name); … … 314 312 { 315 313 return OBJECT_OFFSETOF(Structure, m_prototype); 316 }317 318 static ptrdiff_t globalObjectOffset()319 {320 return OBJECT_OFFSETOF(Structure, m_globalObject);321 314 } 322 315 … … 513 506 } 514 507 515 inline bool Structure::masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject)516 {517 return typeInfo().masqueradesAsUndefined() && globalObject() == lexicalGlobalObject;518 }519 520 508 inline JSValue JSValue::structureOrUndefined() const 521 509 { -
trunk/Source/WebCore/ChangeLog
r125710 r125711 1 2012-08-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r125687. 4 http://trac.webkit.org/changeset/125687 5 https://bugs.webkit.org/show_bug.cgi?id=94147 6 7 It broke the whole world (Requested by Ossy_night on #webkit). 8 9 * bindings/js/JSCustomSQLStatementErrorCallback.cpp: 10 (WebCore::JSSQLStatementErrorCallback::handleEvent): 11 * bindings/js/JSDOMWindowCustom.cpp: 12 (WebCore::JSDOMWindow::addEventListener): 13 (WebCore::JSDOMWindow::removeEventListener): 14 * bindings/js/JSDataViewCustom.cpp: 15 (WebCore::getDataViewMember): 16 * bindings/js/JSDeviceMotionEventCustom.cpp: 17 (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent): 18 * bindings/js/JSDeviceOrientationEventCustom.cpp: 19 (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent): 20 * bindings/js/JSDictionary.cpp: 21 (WebCore::JSDictionary::convertValue): 22 * bindings/js/JSDirectoryEntryCustom.cpp: 23 (WebCore::JSDirectoryEntry::getFile): 24 (WebCore::JSDirectoryEntry::getDirectory): 25 * bindings/js/JSDirectoryEntrySyncCustom.cpp: 26 (WebCore::getFlags): 27 * bindings/js/JSHTMLCanvasElementCustom.cpp: 28 (WebCore::JSHTMLCanvasElement::getContext): 29 * bindings/js/JSInspectorFrontendHostCustom.cpp: 30 (WebCore::populateContextMenuItems): 31 * bindings/js/JSMessageEventCustom.cpp: 32 (WebCore::handleInitMessageEvent): 33 * bindings/js/JSWebGLRenderingContextCustom.cpp: 34 (WebCore::dataFunctionMatrix): 35 * bindings/js/JSXMLHttpRequestCustom.cpp: 36 (WebCore::JSXMLHttpRequest::open): 37 * bindings/js/JavaScriptCallFrame.cpp: 38 * bindings/js/JavaScriptCallFrame.h: 39 (JavaScriptCallFrame): 40 * bindings/js/ScriptDebugServer.cpp: 41 (WebCore::ScriptDebugServer::hasBreakpoint): 42 * bindings/scripts/CodeGeneratorJS.pm: 43 (GenerateEventListenerCall): 44 (GenerateHeader): 45 (JSValueToNative): 46 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 47 (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener): 48 (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener): 49 * bindings/scripts/test/JS/JSTestEventTarget.h: 50 (WebCore::JSTestEventTarget::create): 51 * bindings/scripts/test/JS/JSTestObj.cpp: 52 (WebCore::setJSTestObjCreate): 53 (WebCore::setJSTestObjReflectedBooleanAttr): 54 (WebCore::setJSTestObjReflectedCustomBooleanAttr): 55 (WebCore::jsTestObjPrototypeFunctionAddEventListener): 56 (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): 57 * bridge/c/c_utility.cpp: 58 (JSC::Bindings::convertValueToNPVariant): 59 * bridge/jni/jni_jsobject.mm: 60 (JavaJSObject::convertValueToJObject): 61 * bridge/qt/qt_runtime.cpp: 62 (JSC::Bindings::convertValueToQVariant): 63 1 64 2012-08-15 Dominic Mazzoni <dmazzoni@google.com> 2 65 -
trunk/Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
r125687 r125711 65 65 return true; 66 66 } 67 return result.toBoolean( exec);67 return result.toBoolean(); 68 68 } 69 69 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r125687 r125711 641 641 return jsUndefined(); 642 642 643 impl()->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)), exec->argument(2).toBoolean( exec));643 impl()->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)), exec->argument(2).toBoolean()); 644 644 return jsUndefined(); 645 645 } … … 655 655 return jsUndefined(); 656 656 657 impl()->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)).get(), exec->argument(2).toBoolean( exec));657 impl()->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), this, false, currentWorld(exec)).get(), exec->argument(2).toBoolean()); 658 658 return jsUndefined(); 659 659 } -
trunk/Source/WebCore/bindings/js/JSDataViewCustom.cpp
r125687 r125711 74 74 bool littleEndian = false; 75 75 if (exec->argumentCount() > 1 && (type == AccessDataViewMemberAsFloat32 || type == AccessDataViewMemberAsFloat64)) { 76 littleEndian = exec->argument(1).toBoolean( exec);76 littleEndian = exec->argument(1).toBoolean(); 77 77 if (exec->hadException()) 78 78 return jsUndefined(); -
trunk/Source/WebCore/bindings/js/JSDeviceMotionEventCustom.cpp
r125687 r125711 166 166 { 167 167 const String& type = ustringToString(exec->argument(0).toString(exec)->value(exec)); 168 bool bubbles = exec->argument(1).toBoolean( exec);169 bool cancelable = exec->argument(2).toBoolean( exec);168 bool bubbles = exec->argument(1).toBoolean(); 169 bool cancelable = exec->argument(2).toBoolean(); 170 170 171 171 // If any of the parameters are null or undefined, mark them as not provided. -
trunk/Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp
r125687 r125711 72 72 { 73 73 const String& type = ustringToString(exec->argument(0).toString(exec)->value(exec)); 74 bool bubbles = exec->argument(1).toBoolean( exec);75 bool cancelable = exec->argument(2).toBoolean( exec);74 bool bubbles = exec->argument(1).toBoolean(); 75 bool cancelable = exec->argument(2).toBoolean(); 76 76 // If alpha, beta or gamma are null or undefined, mark them as not provided. 77 77 // Otherwise, use the standard JavaScript conversion. … … 83 83 double gamma = exec->argument(5).toNumber(exec); 84 84 bool absoluteProvided = !exec->argument(6).isUndefinedOrNull(); 85 bool absolute = exec->argument(6).toBoolean( exec);85 bool absolute = exec->argument(6).toBoolean(); 86 86 RefPtr<DeviceOrientationData> orientation = DeviceOrientationData::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absoluteProvided, absolute); 87 87 DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl()); -
trunk/Source/WebCore/bindings/js/JSDictionary.cpp
r125687 r125711 64 64 } 65 65 66 void JSDictionary::convertValue(ExecState* exec, JSValue value, bool& result)67 { 68 result = value.toBoolean( exec);66 void JSDictionary::convertValue(ExecState*, JSValue value, bool& result) 67 { 68 result = value.toBoolean(); 69 69 } 70 70 -
trunk/Source/WebCore/bindings/js/JSDirectoryEntryCustom.cpp
r125687 r125711 67 67 flags = WebKitFlags::create(); 68 68 JSValue jsCreate = object->get(exec, Identifier(exec, "create")); 69 flags->setCreate(jsCreate.toBoolean( exec));69 flags->setCreate(jsCreate.toBoolean()); 70 70 JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive")); 71 flags->setExclusive(jsExclusive.toBoolean( exec));71 flags->setExclusive(jsExclusive.toBoolean()); 72 72 } 73 73 if (exec->hadException()) … … 115 115 flags = WebKitFlags::create(); 116 116 JSValue jsCreate = object->get(exec, Identifier(exec, "create")); 117 flags->setCreate(jsCreate.toBoolean( exec));117 flags->setCreate(jsCreate.toBoolean()); 118 118 JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive")); 119 flags->setExclusive(jsExclusive.toBoolean( exec));119 flags->setExclusive(jsExclusive.toBoolean()); 120 120 } 121 121 if (exec->hadException()) -
trunk/Source/WebCore/bindings/js/JSDirectoryEntrySyncCustom.cpp
r125687 r125711 54 54 flags = WebKitFlags::create(); 55 55 JSValue jsCreate = object->get(exec, Identifier(exec, "create")); 56 flags->setCreate(jsCreate.toBoolean( exec));56 flags->setCreate(jsCreate.toBoolean()); 57 57 JSValue jsExclusive = object->get(exec, Identifier(exec, "exclusive")); 58 flags->setExclusive(jsExclusive.toBoolean( exec));58 flags->setExclusive(jsExclusive.toBoolean()); 59 59 return flags; 60 60 } -
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
r125687 r125711 56 56 Identifier alpha(exec, "alpha"); 57 57 if (jsAttrs->hasProperty(exec, alpha)) 58 webGLAttrs->setAlpha(jsAttrs->get(exec, alpha).toBoolean( exec));58 webGLAttrs->setAlpha(jsAttrs->get(exec, alpha).toBoolean()); 59 59 Identifier depth(exec, "depth"); 60 60 if (jsAttrs->hasProperty(exec, depth)) 61 webGLAttrs->setDepth(jsAttrs->get(exec, depth).toBoolean( exec));61 webGLAttrs->setDepth(jsAttrs->get(exec, depth).toBoolean()); 62 62 Identifier stencil(exec, "stencil"); 63 63 if (jsAttrs->hasProperty(exec, stencil)) 64 webGLAttrs->setStencil(jsAttrs->get(exec, stencil).toBoolean( exec));64 webGLAttrs->setStencil(jsAttrs->get(exec, stencil).toBoolean()); 65 65 Identifier antialias(exec, "antialias"); 66 66 if (jsAttrs->hasProperty(exec, antialias)) 67 webGLAttrs->setAntialias(jsAttrs->get(exec, antialias).toBoolean( exec));67 webGLAttrs->setAntialias(jsAttrs->get(exec, antialias).toBoolean()); 68 68 Identifier premultipliedAlpha(exec, "premultipliedAlpha"); 69 69 if (jsAttrs->hasProperty(exec, premultipliedAlpha)) 70 webGLAttrs->setPremultipliedAlpha(jsAttrs->get(exec, premultipliedAlpha).toBoolean( exec));70 webGLAttrs->setPremultipliedAlpha(jsAttrs->get(exec, premultipliedAlpha).toBoolean()); 71 71 Identifier preserveDrawingBuffer(exec, "preserveDrawingBuffer"); 72 72 if (jsAttrs->hasProperty(exec, preserveDrawingBuffer)) 73 webGLAttrs->setPreserveDrawingBuffer(jsAttrs->get(exec, preserveDrawingBuffer).toBoolean( exec));73 webGLAttrs->setPreserveDrawingBuffer(jsAttrs->get(exec, preserveDrawingBuffer).toBoolean()); 74 74 } 75 75 } -
trunk/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
r125687 r125711 119 119 ContextMenuItem menuItem((typeString == "checkbox" ? CheckableActionType : ActionType), typedId, ustringToString(label.toString(exec)->value(exec))); 120 120 if (!enabled.isUndefined()) 121 menuItem.setEnabled(enabled.toBoolean( exec));121 menuItem.setEnabled(enabled.toBoolean()); 122 122 if (!checked.isUndefined()) 123 menuItem.setChecked(checked.toBoolean( exec));123 menuItem.setChecked(checked.toBoolean()); 124 124 menu.appendItem(menuItem); 125 125 } -
trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp
r125687 r125711 104 104 { 105 105 const UString& typeArg = exec->argument(0).toString(exec)->value(exec); 106 bool canBubbleArg = exec->argument(1).toBoolean( exec);107 bool cancelableArg = exec->argument(2).toBoolean( exec);106 bool canBubbleArg = exec->argument(1).toBoolean(); 107 bool cancelableArg = exec->argument(2).toBoolean(); 108 108 const UString& originArg = exec->argument(4).toString(exec)->value(exec); 109 109 const UString& lastEventIdArg = exec->argument(5).toString(exec)->value(exec); -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r125687 r125711 614 614 return jsUndefined(); 615 615 616 bool transpose = exec->argument(1).toBoolean( exec);616 bool transpose = exec->argument(1).toBoolean(); 617 617 if (exec->hadException()) 618 618 return jsUndefined(); -
trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
r125687 r125711 90 90 ExceptionCode ec = 0; 91 91 if (exec->argumentCount() >= 3) { 92 bool async = exec->argument(2).toBoolean( exec);92 bool async = exec->argument(2).toBoolean(); 93 93 94 94 if (exec->argumentCount() >= 4 && !exec->argument(3).isUndefined()) { -
trunk/Source/WebCore/bindings/js/JavaScriptCallFrame.cpp
r125687 r125711 101 101 } 102 102 103 ExecState* JavaScriptCallFrame::exec() const104 {105 ASSERT(m_isValid);106 if (!m_isValid)107 return 0;108 return m_debuggerCallFrame.callFrame();109 }110 111 103 // Evaluate some JavaScript code in the scope of this frame. 112 104 JSValue JavaScriptCallFrame::evaluate(const UString& script, JSValue& exception) const -
trunk/Source/WebCore/bindings/js/JavaScriptCallFrame.h
r125687 r125711 72 72 JSC::ScopeChainNode* scopeChain() const; 73 73 JSC::JSGlobalObject* dynamicGlobalObject() const; 74 JSC::ExecState* exec() const;75 74 76 75 JSC::JSObject* thisObject() const; -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp
r125687 r125711 207 207 return false; 208 208 } 209 return result.toBoolean( m_currentCallFrame->exec());209 return result.toBoolean(); 210 210 } 211 211 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r125687 r125711 166 166 if (!listener.isObject()) 167 167 return JSValue::encode(jsUndefined()); 168 impl->${functionName}EventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), $wrapperObject, false, currentWorld(exec))$passRefPtrHandling, exec->argument(2).toBoolean( exec));168 impl->${functionName}EventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), $wrapperObject, false, currentWorld(exec))$passRefPtrHandling, exec->argument(2).toBoolean()); 169 169 return JSValue::encode(jsUndefined()); 170 170 END … … 750 750 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl);\n"); 751 751 push(@headerContent, " ptr->finishCreation(globalData);\n"); 752 push(@headerContent, " return ptr;\n");753 push(@headerContent, " }\n\n");754 } elsif ($dataNode->extendedAttributes->{"MasqueradesAsUndefined"}) {755 AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType;756 push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl)\n");757 push(@headerContent, " {\n");758 push(@headerContent, " globalObject->masqueradesAsUndefinedWatchpoint()->notifyWrite();\n");759 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->globalData().heap)) $className(structure, globalObject, impl);\n");760 push(@headerContent, " ptr->finishCreation(globalObject->globalData());\n");761 752 push(@headerContent, " return ptr;\n"); 762 753 push(@headerContent, " }\n\n"); … … 3018 3009 my $type = $codeGenerator->StripModule($signature->type); 3019 3010 3020 return "$value.toBoolean( exec)" if $type eq "boolean";3011 return "$value.toBoolean()" if $type eq "boolean"; 3021 3012 return "$value.toNumber(exec)" if $type eq "double"; 3022 3013 return "$value.toFloat(exec)" if $type eq "float"; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r125687 r125711 254 254 if (!listener.isObject()) 255 255 return JSValue::encode(jsUndefined()); 256 impl->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean( exec));256 impl->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean()); 257 257 return JSValue::encode(jsUndefined()); 258 258 } … … 269 269 if (!listener.isObject()) 270 270 return JSValue::encode(jsUndefined()); 271 impl->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean( exec));271 impl->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean()); 272 272 return JSValue::encode(jsUndefined()); 273 273 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
r125687 r125711 35 35 static JSTestEventTarget* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestEventTarget> impl) 36 36 { 37 globalObject->masqueradesAsUndefinedWatchpoint()->notifyWrite();38 37 JSTestEventTarget* ptr = new (NotNull, JSC::allocateCell<JSTestEventTarget>(globalObject->globalData().heap)) JSTestEventTarget(structure, globalObject, impl); 39 38 ptr->finishCreation(globalObject->globalData()); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r125687 r125711 1049 1049 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1050 1050 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1051 impl->setCreate(value.toBoolean( exec));1051 impl->setCreate(value.toBoolean()); 1052 1052 } 1053 1053 … … 1085 1085 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1086 1086 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1087 impl->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value.toBoolean( exec));1087 impl->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, value.toBoolean()); 1088 1088 } 1089 1089 … … 1121 1121 JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject); 1122 1122 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 1123 impl->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value.toBoolean( exec));1123 impl->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, value.toBoolean()); 1124 1124 } 1125 1125 … … 1682 1682 if (!listener.isObject()) 1683 1683 return JSValue::encode(jsUndefined()); 1684 impl->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean( exec));1684 impl->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean()); 1685 1685 return JSValue::encode(jsUndefined()); 1686 1686 } … … 1697 1697 if (!listener.isObject()) 1698 1698 return JSValue::encode(jsUndefined()); 1699 impl->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean( exec));1699 impl->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)->value(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean()); 1700 1700 return JSValue::encode(jsUndefined()); 1701 1701 } -
trunk/Source/WebCore/bridge/c/c_utility.cpp
r125687 r125711 81 81 DOUBLE_TO_NPVARIANT(value.toNumber(exec), *result); 82 82 } else if (value.isBoolean()) { 83 BOOLEAN_TO_NPVARIANT(value.toBoolean( exec), *result);83 BOOLEAN_TO_NPVARIANT(value.toBoolean(), *result); 84 84 } else if (value.isNull()) { 85 85 NULL_TO_NPVARIANT(*result); -
trunk/Source/WebCore/bridge/jni/jni_jsobject.mm
r125687 r125711 496 496 jmethodID constructorID = env->GetMethodID (JSObjectClass, "<init>", "(Z)V"); 497 497 if (constructorID != NULL) { 498 result = env->NewObject (JSObjectClass, constructorID, (jboolean)value.toBoolean( exec));498 result = env->NewObject (JSObjectClass, constructorID, (jboolean)value.toBoolean()); 499 499 } 500 500 } -
trunk/Source/WebCore/bridge/qt/qt_runtime.cpp
r125687 r125711 292 292 case QMetaType::Bool: 293 293 if (type == Object && object->inherits(&BooleanObject::s_info)) 294 ret = QVariant(asBooleanObject(value)->internalValue().toBoolean( exec));294 ret = QVariant(asBooleanObject(value)->internalValue().toBoolean()); 295 295 else 296 ret = QVariant(value.toBoolean( exec));296 ret = QVariant(value.toBoolean()); 297 297 if (type == Boolean) 298 298 dist = 0; -
trunk/Source/WebKit/mac/ChangeLog
r125687 r125711 1 2012-08-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r125687. 4 http://trac.webkit.org/changeset/125687 5 https://bugs.webkit.org/show_bug.cgi?id=94147 6 7 It broke the whole world (Requested by Ossy_night on #webkit). 8 9 * Plugins/Hosted/NetscapePluginInstanceProxy.mm: 10 (WebKit::NetscapePluginInstanceProxy::addValueToArray): 11 1 12 2012-08-14 Mark Hahnenberg <mhahnenberg@apple.com> 2 13 -
trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
r125687 r125711 1272 1272 } else if (value.isBoolean()) { 1273 1273 [array addObject:[NSNumber numberWithInt:BoolValueType]]; 1274 [array addObject:[NSNumber numberWithBool:value.toBoolean( exec)]];1274 [array addObject:[NSNumber numberWithBool:value.toBoolean()]]; 1275 1275 } else if (value.isNull()) 1276 1276 [array addObject:[NSNumber numberWithInt:NullValueType]]; -
trunk/Source/WebKit2/ChangeLog
r125700 r125711 1 2012-08-15 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r125687. 4 http://trac.webkit.org/changeset/125687 5 https://bugs.webkit.org/show_bug.cgi?id=94147 6 7 It broke the whole world (Requested by Ossy_night on #webkit). 8 9 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: 10 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): 11 1 12 2012-08-15 Beth Dakin <bdakin@apple.com> 2 13 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp
r125687 r125711 155 155 156 156 if (value.isBoolean()) { 157 BOOLEAN_TO_NPVARIANT(value.toBoolean( exec), variant);157 BOOLEAN_TO_NPVARIANT(value.toBoolean(), variant); 158 158 return; 159 159 }
Note: See TracChangeset
for help on using the changeset viewer.