Changeset 126494 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Aug 23, 2012, 4:00:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r126476 r126494 1 2012-08-23 Mark Hahnenberg <[email protected]> 2 3 Change behavior of MasqueradesAsUndefined to better accommodate DFG changes 4 https://bugs.webkit.org/show_bug.cgi?id=93884 5 6 Reviewed by Filip Pizlo. 7 8 With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of 9 MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines, 10 we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined 11 objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject). 12 For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not 13 masquerade as undefined within frame B, but it will continue to masquerade in frame A. 14 15 There are two primary changes that are taking place here. One is to thread the ExecState* through 16 JSValue::toBoolean and JSCell::toBoolean so that JSCell::toBoolean can check the object's 17 JSGlobalObject to compare it to the lexical JSGlobalObject of the currently running code. If the two 18 are distinct, then the object cannot MasqueradeAsUndefined. 19 20 The other change is to perform this comparison of JSGlobalObjects everywhere where the MasqueradesAsUndefined 21 flag in the Structure is checked. For C++ code, this check has been factored into its own function in 22 Structure::masqueradesAsUndefined. We only perform this check in the DFG if the current JSGlobalObject has 23 had a MasqueradesAsUndefined object allocated within its context. This conditional compilation is managed 24 through the use of a WatchpointSet in each JSGlobalObject and alternate create() functions for JS DOM wrappers 25 that are MasqueradesAsUndefined. 26 27 * API/JSValueRef.cpp: 28 (JSValueToBoolean): 29 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: 30 * bytecode/Watchpoint.h: 31 (WatchpointSet): 32 * debugger/DebuggerCallFrame.h: 33 (JSC::DebuggerCallFrame::callFrame): 34 * dfg/DFGAbstractState.cpp: 35 (JSC::DFG::AbstractState::execute): 36 * dfg/DFGCFGSimplificationPhase.cpp: 37 (JSC::DFG::CFGSimplificationPhase::run): 38 * dfg/DFGOperations.cpp: 39 * dfg/DFGOperations.h: 40 * dfg/DFGSpeculativeJIT32_64.cpp: 41 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): 42 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): 43 (JSC::DFG::SpeculativeJIT::compile): 44 * dfg/DFGSpeculativeJIT64.cpp: 45 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull): 46 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull): 47 (JSC::DFG::SpeculativeJIT::compile): 48 * interpreter/Interpreter.cpp: 49 (JSC::Interpreter::privateExecute): 50 * jit/JITOpcodes.cpp: 51 (JSC::JIT::emit_op_is_undefined): 52 (JSC::JIT::emit_op_jeq_null): 53 (JSC::JIT::emit_op_jneq_null): 54 (JSC::JIT::emit_op_eq_null): 55 (JSC::JIT::emit_op_neq_null): 56 * jit/JITOpcodes32_64.cpp: 57 (JSC::JIT::emit_op_is_undefined): 58 (JSC::JIT::emit_op_jeq_null): 59 (JSC::JIT::emit_op_jneq_null): 60 (JSC::JIT::emit_op_eq_null): 61 (JSC::JIT::emit_op_neq_null): 62 * jit/JITStubs.cpp: 63 (JSC::DEFINE_STUB_FUNCTION): 64 * llint/LLIntSlowPaths.cpp: 65 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 66 * llint/LowLevelInterpreter32_64.asm: 67 * llint/LowLevelInterpreter64.asm: 68 * runtime/ArrayPrototype.cpp: 69 (JSC::arrayProtoFuncFilter): 70 (JSC::arrayProtoFuncEvery): 71 (JSC::arrayProtoFuncSome): 72 * runtime/BooleanConstructor.cpp: 73 (JSC::constructBoolean): 74 (JSC::callBooleanConstructor): 75 * runtime/JSCell.h: 76 (JSCell): 77 * runtime/JSGlobalObject.cpp: 78 (JSC::JSGlobalObject::JSGlobalObject): 79 * runtime/JSGlobalObject.h: 80 (JSGlobalObject): 81 (JSC::JSGlobalObject::masqueradesAsUndefinedWatchpoint): 82 * runtime/JSString.h: 83 (JSC::JSCell::toBoolean): 84 (JSC::JSValue::toBoolean): 85 * runtime/JSValue.h: 86 * runtime/ObjectConstructor.cpp: 87 (JSC::toPropertyDescriptor): 88 * runtime/Operations.cpp: 89 (JSC::jsTypeStringForValue): 90 (JSC::jsIsObjectType): 91 * runtime/Operations.h: 92 (JSC): 93 (JSC::JSValue::equalSlowCaseInline): 94 * runtime/RegExpConstructor.cpp: 95 (JSC::setRegExpConstructorMultiline): 96 * runtime/RegExpPrototype.cpp: 97 (JSC::regExpProtoFuncToString): 98 * runtime/Structure.h: 99 (Structure): 100 (JSC::Structure::globalObjectOffset): 101 (JSC::Structure::masqueradesAsUndefined): 102 (JSC): 103 1 104 2012-08-23 Mark Rowe <[email protected]> 2 105
Note:
See TracChangeset
for help on using the changeset viewer.