Changeset 64790 in webkit
- Timestamp:
- Aug 5, 2010 3:22:49 PM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r64782 r64790 1 2010-08-05 Nathan Lawrence <nlawrence@apple.com> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=43464 6 7 Currently, the global object is being embedded in the JavaScriptCore 8 bytecode, however since the global object is the same for all opcodes 9 in a code block, we can have the global object just be a member of the 10 associated code block. 11 12 Additionally, I added an assert inside of emitOpcode that verifies 13 that the last generated opcode was of the correct length. 14 15 * bytecode/CodeBlock.cpp: 16 (JSC::CodeBlock::CodeBlock): 17 (JSC::CodeBlock::derefStructures): 18 (JSC::CodeBlock::markAggregate): 19 * bytecode/CodeBlock.h: 20 (JSC::CodeBlock::globalObject): 21 (JSC::GlobalCodeBlock::GlobalCodeBlock): 22 (JSC::ProgramCodeBlock::ProgramCodeBlock): 23 (JSC::EvalCodeBlock::EvalCodeBlock): 24 (JSC::FunctionCodeBlock::FunctionCodeBlock): 25 * bytecode/Opcode.h: 26 (JSC::opcodeLength): 27 * bytecompiler/BytecodeGenerator.cpp: 28 (JSC::BytecodeGenerator::BytecodeGenerator): 29 (JSC::BytecodeGenerator::emitOpcode): 30 Added an assert to check that the last generated opcode is the 31 correct length. 32 (JSC::BytecodeGenerator::rewindBinaryOp): 33 Changed the last opcode to op_end since the length will no longer 34 be correct. 35 (JSC::BytecodeGenerator::rewindUnaryOp): 36 Changed the last opcode to op_end since the length will no longer 37 be correct. 38 (JSC::BytecodeGenerator::emitResolve): 39 (JSC::BytecodeGenerator::emitGetScopedVar): 40 (JSC::BytecodeGenerator::emitPutScopedVar): 41 (JSC::BytecodeGenerator::emitResolveWithBase): 42 * bytecompiler/BytecodeGenerator.h: 43 * interpreter/Interpreter.cpp: 44 (JSC::Interpreter::resolveGlobal): 45 (JSC::Interpreter::resolveGlobalDynamic): 46 (JSC::Interpreter::privateExecute): 47 * jit/JITOpcodes.cpp: 48 (JSC::JIT::emit_op_get_global_var): 49 (JSC::JIT::emit_op_put_global_var): 50 (JSC::JIT::emit_op_resolve_global): 51 (JSC::JIT::emitSlow_op_resolve_global): 52 (JSC::JIT::emit_op_resolve_global_dynamic): 53 (JSC::JIT::emitSlow_op_resolve_global_dynamic): 54 * jit/JITOpcodes32_64.cpp: 55 (JSC::JIT::emit_op_get_global_var): 56 (JSC::JIT::emit_op_put_global_var): 57 (JSC::JIT::emit_op_resolve_global): 58 (JSC::JIT::emitSlow_op_resolve_global): 59 * jit/JITStubs.cpp: 60 (JSC::cti_op_resolve_global): 61 * runtime/Executable.cpp: 62 (JSC::FunctionExecutable::compileForCallInternal): 63 (JSC::FunctionExecutable::compileForConstructInternal): 64 (JSC::FunctionExecutable::reparseExceptionInfo): 65 1 66 2010-08-05 Gavin Barraclough <barraclough@apple.com> 2 67 -
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r64684 r64790 1345 1345 } 1346 1346 1347 CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, SymbolTable* symTab, bool isConstructor) 1348 : m_numCalleeRegisters(0) 1347 CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlobalObject *globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, SymbolTable* symTab, bool isConstructor) 1348 : m_globalObject(globalObject) 1349 , m_numCalleeRegisters(0) 1349 1350 , m_numVars(0) 1350 1351 , m_numParameters(0) … … 1458 1459 } 1459 1460 if (vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global) || vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global_dynamic)) { 1460 if (vPC[4].u.structure)1461 vPC[ 4].u.structure->deref();1461 if (vPC[3].u.structure) 1462 vPC[3].u.structure->deref(); 1462 1463 return; 1463 1464 } … … 1519 1520 for (size_t i = 0; i < m_functionDecls.size(); ++i) 1520 1521 m_functionDecls[i]->markAggregate(markStack); 1522 markStack.append(m_globalObject); 1521 1523 } 1522 1524 -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r62677 r64790 276 276 friend class JIT; 277 277 protected: 278 CodeBlock(ScriptExecutable* ownerExecutable, CodeType, PassRefPtr<SourceProvider>, unsigned sourceOffset, SymbolTable* symbolTable, bool isConstructor); 278 CodeBlock(ScriptExecutable* ownerExecutable, CodeType, JSGlobalObject*, PassRefPtr<SourceProvider>, unsigned sourceOffset, SymbolTable* symbolTable, bool isConstructor); 279 280 JSGlobalObject* m_globalObject; 281 279 282 public: 280 283 virtual ~CodeBlock(); … … 484 487 RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); } 485 488 489 JSGlobalObject* globalObject() { return m_globalObject; } 486 490 487 491 // Jump Tables … … 603 607 class GlobalCodeBlock : public CodeBlock { 604 608 public: 605 GlobalCodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, JSGlobalObject* globalObject) 606 : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, &m_unsharedSymbolTable, false) 607 , m_globalObject(globalObject) 609 GlobalCodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset) 610 : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, &m_unsharedSymbolTable, false) 608 611 { 609 612 m_globalObject->codeBlocks().add(this); … … 619 622 620 623 private: 621 JSGlobalObject* m_globalObject; // For program and eval nodes, the global object that marks the constant pool.622 624 SymbolTable m_unsharedSymbolTable; 623 625 }; … … 626 628 public: 627 629 ProgramCodeBlock(ProgramExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider) 628 : GlobalCodeBlock(ownerExecutable, codeType, sourceProvider, 0, globalObject)630 : GlobalCodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, 0) 629 631 { 630 632 } … … 634 636 public: 635 637 EvalCodeBlock(EvalExecutable* ownerExecutable, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider, int baseScopeDepth) 636 : GlobalCodeBlock(ownerExecutable, EvalCode, sourceProvider, 0, globalObject)638 : GlobalCodeBlock(ownerExecutable, EvalCode, globalObject, sourceProvider, 0) 637 639 , m_baseScopeDepth(baseScopeDepth) 638 640 { … … 660 662 // symbol table, so we just pass as a raw pointer with a ref count of 1. We then manually deref 661 663 // in the destructor. 662 FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, bool isConstructor)663 : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, SharedSymbolTable::create().releaseRef(), isConstructor)664 FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, bool isConstructor) 665 : CodeBlock(ownerExecutable, codeType, globalObject, sourceProvider, sourceOffset, SharedSymbolTable::create().releaseRef(), isConstructor) 664 666 { 665 667 } -
trunk/JavaScriptCore/bytecode/Opcode.h
r63056 r64790 94 94 macro(op_resolve, 3) \ 95 95 macro(op_resolve_skip, 4) \ 96 macro(op_resolve_global, 6) \97 macro(op_resolve_global_dynamic, 7) \96 macro(op_resolve_global, 5) \ 97 macro(op_resolve_global_dynamic, 6) \ 98 98 macro(op_get_scoped_var, 4) \ 99 99 macro(op_put_scoped_var, 4) \ 100 macro(op_get_global_var, 4) \101 macro(op_put_global_var, 4) \100 macro(op_get_global_var, 3) \ 101 macro(op_put_global_var, 3) \ 102 102 macro(op_resolve_base, 3) \ 103 103 macro(op_resolve_with_base, 4) \ … … 255 255 #endif 256 256 257 inline size_t opcodeLength(OpcodeID opcode) 258 { 259 switch (opcode) { 260 #define OPCODE_ID_LENGTHS(id, length) case id: return OPCODE_LENGTH(id); 261 FOR_EACH_OPCODE_ID(OPCODE_ID_LENGTHS) 262 #undef OPCODE_ID_LENGTHS 263 } 264 ASSERT_NOT_REACHED(); 265 return 0; 266 } 267 257 268 } // namespace JSC 258 269 -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r63515 r64790 217 217 , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) 218 218 , m_lastOpcodeID(op_end) 219 #ifndef NDEBUG 220 , m_lastOpcodePosition(0) 221 #endif 219 222 , m_emitNodeDepth(0) 220 223 , m_usesExceptions(false) … … 589 592 void BytecodeGenerator::emitOpcode(OpcodeID opcodeID) 590 593 { 594 #ifndef NDEBUG 595 size_t opcodePosition = instructions().size(); 596 ASSERT(opcodePosition - m_lastOpcodePosition == opcodeLength(m_lastOpcodeID) || m_lastOpcodeID == op_end); 597 m_lastOpcodePosition = opcodePosition; 598 #endif 591 599 instructions().append(globalData()->interpreter->getOpcode(opcodeID)); 592 600 m_lastOpcodeID = opcodeID; … … 614 622 ASSERT(instructions().size() >= 4); 615 623 instructions().shrink(instructions().size() - 4); 624 m_lastOpcodeID = op_end; 616 625 } 617 626 … … 620 629 ASSERT(instructions().size() >= 3); 621 630 instructions().shrink(instructions().size() - 3); 631 m_lastOpcodeID = op_end; 622 632 } 623 633 … … 1107 1117 emitOpcode(requiresDynamicChecks ? op_resolve_global_dynamic : op_resolve_global); 1108 1118 instructions().append(dst->index()); 1109 instructions().append(globalObject);1110 1119 instructions().append(addConstant(property)); 1111 1120 instructions().append(0); … … 1143 1152 emitOpcode(op_get_global_var); 1144 1153 instructions().append(dst->index()); 1145 instructions().append(asCell(globalObject));1146 1154 instructions().append(index); 1147 1155 return dst; … … 1159 1167 if (globalObject) { 1160 1168 emitOpcode(op_put_global_var); 1161 instructions().append(asCell(globalObject));1162 1169 instructions().append(index); 1163 1170 instructions().append(value->index()); … … 1230 1237 emitOpcode(requiresDynamicChecks ? op_resolve_global_dynamic : op_resolve_global); 1231 1238 instructions().append(propDst->index()); 1232 instructions().append(globalObject);1233 1239 instructions().append(addConstant(property)); 1234 1240 instructions().append(0); -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r63244 r64790 561 561 562 562 OpcodeID m_lastOpcodeID; 563 #ifndef NDEBUG 564 size_t m_lastOpcodePosition; 565 #endif 563 566 564 567 unsigned m_emitNodeDepth; -
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r63267 r64790 145 145 { 146 146 int dst = vPC[1].u.operand; 147 JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(vPC[2].u.jsCell); 147 CodeBlock* codeBlock = callFrame->codeBlock(); 148 JSGlobalObject* globalObject = codeBlock->globalObject(); 148 149 ASSERT(globalObject->isGlobalObject()); 149 int property = vPC[ 3].u.operand;150 Structure* structure = vPC[ 4].u.structure;151 int offset = vPC[ 5].u.operand;150 int property = vPC[2].u.operand; 151 Structure* structure = vPC[3].u.structure; 152 int offset = vPC[4].u.operand; 152 153 153 154 if (structure == globalObject->structure()) { … … 156 157 } 157 158 158 CodeBlock* codeBlock = callFrame->codeBlock();159 159 Identifier& ident = codeBlock->identifier(property); 160 160 PropertySlot slot(globalObject); … … 162 162 JSValue result = slot.getValue(callFrame, ident); 163 163 if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { 164 if (vPC[ 4].u.structure)165 vPC[ 4].u.structure->deref();164 if (vPC[3].u.structure) 165 vPC[3].u.structure->deref(); 166 166 globalObject->structure()->ref(); 167 vPC[ 4] = globalObject->structure();168 vPC[ 5] = slot.cachedOffset();167 vPC[3] = globalObject->structure(); 168 vPC[4] = slot.cachedOffset(); 169 169 callFrame->r(dst) = JSValue(result); 170 170 return true; … … 185 185 { 186 186 int dst = vPC[1].u.operand; 187 JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(vPC[2].u.jsCell); 187 CodeBlock* codeBlock = callFrame->codeBlock(); 188 JSGlobalObject* globalObject = codeBlock->globalObject(); 188 189 ASSERT(globalObject->isGlobalObject()); 189 int property = vPC[3].u.operand; 190 Structure* structure = vPC[4].u.structure; 191 int offset = vPC[5].u.operand; 192 CodeBlock* codeBlock = callFrame->codeBlock(); 193 int skip = vPC[6].u.operand; 190 int property = vPC[2].u.operand; 191 Structure* structure = vPC[3].u.structure; 192 int offset = vPC[4].u.operand; 193 int skip = vPC[5].u.operand; 194 194 195 195 ScopeChainNode* scopeChain = callFrame->scopeChain(); … … 232 232 JSValue result = slot.getValue(callFrame, ident); 233 233 if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { 234 if (vPC[ 4].u.structure)235 vPC[ 4].u.structure->deref();234 if (vPC[3].u.structure) 235 vPC[3].u.structure->deref(); 236 236 globalObject->structure()->ref(); 237 vPC[ 4] = globalObject->structure();238 vPC[ 5] = slot.cachedOffset();237 vPC[3] = globalObject->structure(); 238 vPC[4] = slot.cachedOffset(); 239 239 callFrame->r(dst) = JSValue(result); 240 240 return true; … … 2285 2285 */ 2286 2286 int dst = vPC[1].u.operand; 2287 JSGlobalObject* scope = static_cast<JSGlobalObject*>(vPC[2].u.jsCell);2287 JSGlobalObject* scope = codeBlock->globalObject(); 2288 2288 ASSERT(scope->isGlobalObject()); 2289 int index = vPC[ 3].u.operand;2289 int index = vPC[2].u.operand; 2290 2290 2291 2291 callFrame->r(dst) = scope->registerAt(index); … … 2298 2298 Puts value into global slot index. 2299 2299 */ 2300 JSGlobalObject* scope = static_cast<JSGlobalObject*>(vPC[1].u.jsCell);2300 JSGlobalObject* scope = codeBlock->globalObject(); 2301 2301 ASSERT(scope->isGlobalObject()); 2302 int index = vPC[ 2].u.operand;2303 int value = vPC[ 3].u.operand;2302 int index = vPC[1].u.operand; 2303 int value = vPC[2].u.operand; 2304 2304 2305 2305 scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); -
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r64608 r64790 469 469 void JIT::emit_op_get_global_var(Instruction* currentInstruction) 470 470 { 471 JSVariableObject* globalObject = static_cast<JSVariableObject*>(currentInstruction[2].u.jsCell);471 JSVariableObject* globalObject = m_codeBlock->globalObject(); 472 472 move(ImmPtr(globalObject), regT0); 473 emitGetVariableObjectRegister(regT0, currentInstruction[ 3].u.operand, regT0);473 emitGetVariableObjectRegister(regT0, currentInstruction[2].u.operand, regT0); 474 474 emitPutVirtualRegister(currentInstruction[1].u.operand); 475 475 } … … 477 477 void JIT::emit_op_put_global_var(Instruction* currentInstruction) 478 478 { 479 emitGetVirtualRegister(currentInstruction[ 3].u.operand, regT1);480 JSVariableObject* globalObject = static_cast<JSVariableObject*>(currentInstruction[1].u.jsCell);479 emitGetVirtualRegister(currentInstruction[2].u.operand, regT1); 480 JSVariableObject* globalObject = m_codeBlock->globalObject(); 481 481 move(ImmPtr(globalObject), regT0); 482 emitPutVariableObjectRegister(regT1, regT0, currentInstruction[ 2].u.operand);482 emitPutVariableObjectRegister(regT1, regT0, currentInstruction[1].u.operand); 483 483 } 484 484 … … 651 651 { 652 652 // Fast case 653 void* globalObject = currentInstruction[2].u.jsCell;653 void* globalObject = m_codeBlock->globalObject(); 654 654 unsigned currentIndex = m_globalResolveInfoIndex++; 655 655 void* structureAddress = &(m_codeBlock->globalResolveInfo(currentIndex).structure); … … 672 672 { 673 673 unsigned dst = currentInstruction[1].u.operand; 674 void* globalObject = currentInstruction[2].u.jsCell; 675 Identifier* ident = &m_codeBlock->identifier(currentInstruction[3].u.operand); 674 Identifier* ident = &m_codeBlock->identifier(currentInstruction[2].u.operand); 676 675 677 676 unsigned currentIndex = m_globalResolveInfoIndex++; … … 679 678 linkSlowCase(iter); 680 679 JITStubCall stubCall(this, cti_op_resolve_global); 681 stubCall.addArgument(ImmPtr(globalObject));682 680 stubCall.addArgument(ImmPtr(ident)); 683 681 stubCall.addArgument(Imm32(currentIndex)); 682 stubCall.addArgument(regT0); 684 683 stubCall.call(dst); 685 684 } … … 1496 1495 void JIT::emit_op_resolve_global_dynamic(Instruction* currentInstruction) 1497 1496 { 1498 int skip = currentInstruction[ 6].u.operand;1497 int skip = currentInstruction[5].u.operand; 1499 1498 1500 1499 emitGetFromCallFrameHeaderPtr(RegisterFile::ScopeChain, regT0); … … 1510 1509 { 1511 1510 unsigned dst = currentInstruction[1].u.operand; 1512 void* globalObject = currentInstruction[2].u.jsCell; 1513 Identifier* ident = &m_codeBlock->identifier(currentInstruction[3].u.operand); 1514 int skip = currentInstruction[6].u.operand; 1511 Identifier* ident = &m_codeBlock->identifier(currentInstruction[2].u.operand); 1512 int skip = currentInstruction[5].u.operand; 1515 1513 while (skip--) 1516 1514 linkSlowCase(iter); … … 1524 1522 linkSlowCase(iter); // We managed to skip all the nodes in the scope chain, but the cache missed. 1525 1523 JITStubCall stubCall(this, cti_op_resolve_global); 1526 stubCall.addArgument(ImmPtr(globalObject));1527 1524 stubCall.addArgument(ImmPtr(ident)); 1528 1525 stubCall.addArgument(Imm32(currentIndex)); 1526 stubCall.addArgument(regT0); 1529 1527 stubCall.call(dst); 1530 1528 } -
trunk/JavaScriptCore/jit/JITOpcodes32_64.cpp
r64608 r64790 526 526 { 527 527 int dst = currentInstruction[1].u.operand; 528 JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(currentInstruction[2].u.jsCell);528 JSGlobalObject* globalObject = m_codeBlock->globalObject(); 529 529 ASSERT(globalObject->isGlobalObject()); 530 int index = currentInstruction[ 3].u.operand;530 int index = currentInstruction[2].u.operand; 531 531 532 532 loadPtr(&globalObject->d()->registers, regT2); … … 539 539 void JIT::emit_op_put_global_var(Instruction* currentInstruction) 540 540 { 541 JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(currentInstruction[1].u.jsCell);541 JSGlobalObject* globalObject = m_codeBlock->globalObject(); 542 542 ASSERT(globalObject->isGlobalObject()); 543 int index = currentInstruction[ 2].u.operand;544 int value = currentInstruction[ 3].u.operand;543 int index = currentInstruction[1].u.operand; 544 int value = currentInstruction[2].u.operand; 545 545 546 546 emitLoad(value, regT1, regT0); … … 679 679 680 680 unsigned dst = currentInstruction[1].u.operand; 681 void* globalObject = currentInstruction[2].u.jsCell;681 void* globalObject = m_codeBlock->globalObject(); 682 682 683 683 unsigned currentIndex = m_globalResolveInfoIndex++; … … 702 702 { 703 703 unsigned dst = currentInstruction[1].u.operand; 704 void* globalObject = currentInstruction[2].u.jsCell; 705 Identifier* ident = &m_codeBlock->identifier(currentInstruction[3].u.operand); 704 Identifier* ident = &m_codeBlock->identifier(currentInstruction[2].u.operand); 706 705 707 706 unsigned currentIndex = m_globalResolveInfoIndex++; … … 709 708 linkSlowCase(iter); 710 709 JITStubCall stubCall(this, cti_op_resolve_global); 711 stubCall.addArgument(ImmPtr(globalObject));712 710 stubCall.addArgument(ImmPtr(ident)); 713 711 stubCall.addArgument(Imm32(currentIndex)); -
trunk/JavaScriptCore/jit/JITStubs.cpp
r64618 r64790 2631 2631 2632 2632 CallFrame* callFrame = stackFrame.callFrame; 2633 JSGlobalObject* globalObject = stackFrame.args[0].globalObject(); 2634 Identifier& ident = stackFrame.args[1].identifier(); 2635 unsigned globalResolveInfoIndex = stackFrame.args[2].int32(); 2633 CodeBlock* codeBlock = callFrame->codeBlock(); 2634 JSGlobalObject* globalObject = codeBlock->globalObject(); 2635 Identifier& ident = stackFrame.args[0].identifier(); 2636 unsigned globalResolveInfoIndex = stackFrame.args[1].int32(); 2636 2637 ASSERT(globalObject->isGlobalObject()); 2637 2638 … … 2640 2641 JSValue result = slot.getValue(callFrame, ident); 2641 2642 if (slot.isCacheableValue() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { 2642 GlobalResolveInfo& globalResolveInfo = c allFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex);2643 GlobalResolveInfo& globalResolveInfo = codeBlock->globalResolveInfo(globalResolveInfoIndex); 2643 2644 if (globalResolveInfo.structure) 2644 2645 globalResolveInfo.structure->deref(); … … 2653 2654 } 2654 2655 2655 unsigned vPCIndex = c allFrame->codeBlock()->bytecodeOffset(callFrame, STUB_RETURN_ADDRESS);2656 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, c allFrame->codeBlock());2656 unsigned vPCIndex = codeBlock->bytecodeOffset(callFrame, STUB_RETURN_ADDRESS); 2657 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident, vPCIndex, codeBlock); 2657 2658 VM_THROW_EXCEPTION(); 2658 2659 } -
trunk/JavaScriptCore/runtime/Executable.cpp
r64608 r64790 201 201 202 202 ASSERT(!m_codeBlockForCall); 203 m_codeBlockForCall = adoptPtr(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), false));203 m_codeBlockForCall = adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), false)); 204 204 OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForCall->symbolTable(), m_codeBlockForCall.get()))); 205 205 generator->generate(); … … 246 246 247 247 ASSERT(!m_codeBlockForConstruct); 248 m_codeBlockForConstruct = adoptPtr(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), true));248 m_codeBlockForConstruct = adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), true)); 249 249 OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(body.get(), globalObject->debugger(), scopeChain, m_codeBlockForConstruct->symbolTable(), m_codeBlockForConstruct.get()))); 250 250 generator->generate(); … … 294 294 JSGlobalObject* globalObject = scopeChain.globalObject(); 295 295 296 OwnPtr<CodeBlock> newCodeBlock(adoptPtr(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset(), codeBlock->m_isConstructor)));296 OwnPtr<CodeBlock> newCodeBlock(adoptPtr(new FunctionCodeBlock(this, FunctionCode, globalObject, source().provider(), source().startOffset(), codeBlock->m_isConstructor))); 297 297 globalData->functionCodeBlockBeingReparsed = newCodeBlock.get(); 298 298
Note: See TracChangeset
for help on using the changeset viewer.