Changeset 159462 in webkit
- Timestamp:
- Nov 18, 2013 3:19:53 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r159459 r159462 1 2013-11-18 Filip Pizlo <fpizlo@apple.com> 2 3 put_to_scope[5] should not point to the structure if it's a variable access, but it should point to the WatchpointSet 4 https://bugs.webkit.org/show_bug.cgi?id=124539 5 6 Reviewed by Mark Hahnenberg. 7 8 This is in preparation for getting put_to_scope to directly invalidate the watchpoint set 9 on stores, which will allow us to run constant inference on all globals. 10 11 * bytecode/CodeBlock.cpp: 12 (JSC::CodeBlock::CodeBlock): 13 (JSC::CodeBlock::finalizeUnconditionally): 14 * bytecode/Instruction.h: 15 * dfg/DFGByteCodeParser.cpp: 16 (JSC::DFG::ByteCodeParser::parseBlock): 17 * runtime/JSScope.cpp: 18 (JSC::abstractAccess): 19 (JSC::JSScope::abstractResolve): 20 * runtime/JSScope.h: 21 (JSC::ResolveOp::ResolveOp): 22 * runtime/SymbolTable.h: 23 (JSC::SymbolTableEntry::watchpointSet): 24 1 25 2013-11-18 Mark Hahnenberg <mhahnenberg@apple.com> 2 26 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r159141 r159462 1883 1883 1884 1884 instructions[i + 4].u.operand = ResolveModeAndType(modeAndType.mode(), op.type).operand(); 1885 if (op.structure) 1885 if (op.type == GlobalVar || op.type == GlobalVarWithVarInjectionChecks) { 1886 ASSERT(!op.structure); 1887 instructions[i + 5].u.watchpointSet = op.watchpointSet; 1888 } else if (op.structure) 1886 1889 instructions[i + 5].u.structure.set(*vm(), ownerExecutable, op.structure); 1887 1890 instructions[i + 6].u.pointer = reinterpret_cast<void*>(op.operand); … … 2275 2278 case op_get_from_scope: 2276 2279 case op_put_to_scope: { 2280 ResolveModeAndType modeAndType = 2281 ResolveModeAndType(curInstruction[4].u.operand); 2282 if (modeAndType.type() == GlobalVar || modeAndType.type() == GlobalVarWithVarInjectionChecks) 2283 continue; 2277 2284 WriteBarrierBase<Structure>& structure = curInstruction[5].u.structure; 2278 2285 if (!structure || Heap::isMarked(structure.get())) -
trunk/Source/JavaScriptCore/bytecode/Instruction.h
r156511 r159462 116 116 ArrayAllocationProfile* arrayAllocationProfile; 117 117 ObjectAllocationProfile* objectAllocationProfile; 118 WatchpointSet* watchpointSet; 118 119 void* pointer; 119 120 bool* predicatePointer; -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r159394 r159462 3128 3128 { 3129 3129 ConcurrentJITLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); 3130 structure = currentInstruction[5].u.structure.get(); 3130 if (resolveType == GlobalVar || resolveType == GlobalVarWithVarInjectionChecks) 3131 structure = 0; 3132 else 3133 structure = currentInstruction[5].u.structure.get(); 3131 3134 operand = reinterpret_cast<uintptr_t>(currentInstruction[6].u.pointer); 3132 3135 } -
trunk/Source/JavaScriptCore/runtime/JSScope.cpp
r155143 r159462 54 54 if (ident == exec->propertyNames().arguments) { 55 55 // We know the property will be at this activation scope, but we don't know how to cache it. 56 op = ResolveOp(Dynamic, 0, 0, 0 );56 op = ResolveOp(Dynamic, 0, 0, 0, 0); 57 57 return true; 58 58 } … … 61 61 if (entry.isReadOnly() && getOrPut == Put) { 62 62 // We know the property will be at this activation scope, but we don't know how to cache it. 63 op = ResolveOp(Dynamic, 0, 0, 0 );63 op = ResolveOp(Dynamic, 0, 0, 0, 0); 64 64 return true; 65 65 } 66 66 67 67 if (!entry.isNull()) { 68 op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, activation->structure(), entry.getIndex());68 op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, activation->structure(), 0, entry.getIndex()); 69 69 return true; 70 70 } … … 81 81 if (entry.isReadOnly()) { 82 82 // We know the property will be at global scope, but we don't know how to cache it. 83 op = ResolveOp(Dynamic, 0, 0, 0 );83 op = ResolveOp(Dynamic, 0, 0, 0, 0); 84 84 return true; 85 85 } … … 89 89 } 90 90 91 op = ResolveOp(makeType(GlobalVar, needsVarInjectionChecks), depth, globalObject->structure(), 91 op = ResolveOp( 92 makeType(GlobalVar, needsVarInjectionChecks), depth, 0, entry.watchpointSet(), 92 93 reinterpret_cast<uintptr_t>(globalObject->registerAt(entry.getIndex()).slot())); 93 94 return true; … … 101 102 // We know the property will be at global scope, but we don't know how to cache it. 102 103 ASSERT(!scope->next()); 103 op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, 0, 0 );104 op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, 0, 0, 0); 104 105 return true; 105 106 } 106 107 107 op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, globalObject->structure(), slot.cachedOffset());108 op = ResolveOp(makeType(GlobalProperty, needsVarInjectionChecks), depth, globalObject->structure(), 0, slot.cachedOffset()); 108 109 return true; 109 110 } 110 111 111 op = ResolveOp(Dynamic, 0, 0, 0 );112 op = ResolveOp(Dynamic, 0, 0, 0, 0); 112 113 return true; 113 114 } … … 147 148 ResolveOp JSScope::abstractResolve(ExecState* exec, JSScope* scope, const Identifier& ident, GetOrPut getOrPut, ResolveType unlinkedType) 148 149 { 149 ResolveOp op(Dynamic, 0, 0, 0 );150 ResolveOp op(Dynamic, 0, 0, 0, 0); 150 151 if (unlinkedType == Dynamic) 151 152 return op; -
trunk/Source/JavaScriptCore/runtime/JSScope.h
r156802 r159462 32 32 33 33 class ScopeChainIterator; 34 class WatchpointSet; 34 35 35 36 enum ResolveMode { … … 96 97 97 98 struct ResolveOp { 98 ResolveOp(ResolveType type, size_t depth, Structure* structure, uintptr_t operand)99 ResolveOp(ResolveType type, size_t depth, Structure* structure, WatchpointSet* watchpointSet, uintptr_t operand) 99 100 : type(type) 100 101 , depth(depth) 101 102 , structure(structure) 103 , watchpointSet(watchpointSet) 102 104 , operand(operand) 103 105 { … … 107 109 size_t depth; 108 110 Structure* structure; 111 WatchpointSet* watchpointSet; 109 112 uintptr_t operand; 110 113 }; -
trunk/Source/JavaScriptCore/runtime/SymbolTable.h
r159395 r159462 235 235 WatchpointSet* watchpointSet() 236 236 { 237 if (!isFat()) 238 return 0; 237 239 return fatEntry()->m_watchpoints.get(); 238 240 }
Note: See TracChangeset
for help on using the changeset viewer.