Home | History | Annotate | Download | only in interpreter

Lines Matching refs:codeBlock

37 #include "CodeBlock.h"
79 static int depth(CodeBlock* codeBlock, ScopeChainNode* sc)
81 if (!codeBlock->needsFullScopeChain())
102 CodeBlock* codeBlock = callFrame->codeBlock();
103 Identifier& ident = codeBlock->identifier(property);
122 CodeBlock* codeBlock = callFrame->codeBlock();
132 bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
135 if (callFrame->uncheckedR(codeBlock->activationRegister()).jsValue())
142 Identifier& ident = codeBlock->identifier(property);
163 CodeBlock* codeBlock = callFrame->codeBlock();
164 JSGlobalObject* globalObject = codeBlock->globalObject();
175 Identifier& ident = codeBlock->identifier(property);
180 vPC[3].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), globalObject->structure());
200 CodeBlock* codeBlock = callFrame->codeBlock();
201 JSGlobalObject* globalObject = codeBlock->globalObject();
212 bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
215 if (callFrame->uncheckedR(codeBlock->activationRegister()).jsValue())
221 Identifier& ident = codeBlock->identifier(property);
250 Identifier& ident = codeBlock->identifier(property);
255 vPC[3].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), globalObject->structure());
279 Identifier ident = callFrame->codeBlock()->identifier(property);
302 CodeBlock* codeBlock = callFrame->codeBlock();
303 Identifier& ident = codeBlock->identifier(property);
326 ALWAYS_INLINE CallFrame* Interpreter::slideRegisterWindowForCall(CodeBlock* newCodeBlock, RegisterFile* registerFile, CallFrame* callFrame, size_t registerOffset, int argc)
395 CodeBlock* codeBlock = callFrame->codeBlock();
396 if (!codeBlock->isStrictMode()) {
406 EvalExecutable* eval = codeBlock->evalCodeCache().get(callFrame, codeBlock->ownerExecutable(), codeBlock->isStrictMode(), programSource, scopeChain, exceptionValue);
412 return callFrame->globalData().interpreter->execute(eval, callFrame, callFrame->uncheckedR(codeBlock->thisRegister()).jsValue().toThisObject(callFrame), callFrame->registers() - registerFile->start() + registerOffset, scopeChain);
436 callFrame->codeBlock()->dump(callFrame);
447 CodeBlock* codeBlock = callFrame->codeBlock();
453 if (codeBlock->codeType() == GlobalCode) {
468 it = callFrame->registers() - RegisterFile::CallFrameHeaderSize - codeBlock->m_numParameters;
475 end = it + max(codeBlock->m_numParameters - 1, 0); // - 1 to skip "this"
488 printf("[CodeBlock] | %10p | %p \n", it, (*it).codeBlock()); ++it;
498 end = it + codeBlock->m_numVars;
513 end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numVars;
542 NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue exceptionValue, unsigned& bytecodeOffset, CodeBlock*& codeBlock)
544 CodeBlock* oldCodeBlock = codeBlock;
550 debugger->returnEvent(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->ownerExecutable()->lastLine());
552 debugger->didExecuteProgram(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->ownerExecutable()->lastLine());
580 codeBlock = callerFrame->codeBlock();
583 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnPC());
585 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnVPC());
587 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnPC());
589 bytecodeOffset = codeBlock->bytecodeOffset(callFrame->returnVPC());
600 if (!callFrame->codeBlock()->hasExpressionInfo())
607 CodeBlock* codeBlock = callFrame->codeBlock();
608 codeBlock->expressionRangeForBytecodeOffset(bytecodeOffset, divotPoint, startOffset, endOffset);
613 if (!expressionStop || expressionStart > codeBlock->source()->length())
624 message = makeUString(message, " (evaluating '", codeBlock->source()->getRange(expressionStart, expressionStop), "')");
627 const UChar* data = codeBlock->source()->data();
628 int dataLength = codeBlock->source()->length();
641 message = makeUString(message, " (near '...", codeBlock->source()->getRange(start, stop), "...')");
649 CodeBlock* codeBlock = callFrame->codeBlock();
660 if (codeBlock->hasExpressionInfo() && !hasErrorInfo(callFrame, exception)) {
661 ASSERT(codeBlock->hasLineInfo());
665 addErrorInfo(callFrame, exception, codeBlock->lineNumberForBytecodeOffset(bytecodeOffset), codeBlock->ownerExecutable()->source());
674 bool hasHandler = codeBlock->handlerForBytecodeOffset(bytecodeOffset);
675 debugger->exception(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->lineNumberForBytecodeOffset(bytecodeOffset), hasHandler);
680 while (isInterrupt || !(handler = codeBlock->handlerForBytecodeOffset(bytecodeOffset))) {
681 if (!unwindCallFrame(callFrame, exceptionValue, bytecodeOffset, codeBlock)) {
694 CodeBlock* codeBlock = callerFrame->codeBlock();
695 if (!codeBlock)
697 Register* callerHighWaterMark = callerFrame->registers() + codeBlock->m_numCalleeRegisters;
705 if (!codeBlock->needsFullScopeChain() || codeBlock->codeType() != FunctionCode
706 || callFrame->uncheckedR(codeBlock->activationRegister()).jsValue())
707 scopeDelta = depth(codeBlock, scopeChain) - handler->scopeDepth;
740 CodeBlock* codeBlock = &program->generatedBytecode();
743 Register* newEnd = oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize + codeBlock->m_numCalleeRegisters;
751 CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize);
752 ASSERT(codeBlock->m_numParameters == 1); // 1 parameter for 'this'.
753 newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), codeBlock->m_numParameters, 0);
818 CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
907 CodeBlock* newCodeBlock = &constructData.js.functionExecutable->generatedBytecodeForConstruct();
1002 CodeBlock* codeBlock = &FunctionExecutable->generatedBytecodeForCall();
1004 newCallFrame = slideRegisterWindowForCall(codeBlock, &m_registerFile, newCallFrame, argc + RegisterFile::CallFrameHeaderSize, argc);
1010 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), argc, function);
1011 CallFrameClosure result = { callFrame, newCallFrame, function, FunctionExecutable, scopeChain->globalData, oldEnd, scopeChain, codeBlock->m_numParameters, argc };
1072 EvalCodeBlock* codeBlock = &eval->generatedBytecode();
1083 unsigned numVariables = codeBlock->numVariables();
1084 int numFunctions = codeBlock->numberOfFunctionDecls();
1087 if (codeBlock->isStrictMode()) {
1096 const Identifier& ident = codeBlock->variable(i);
1104 FunctionExecutable* function = codeBlock->functionDecl(i);
1111 Register* newEnd = m_registerFile.start() + globalRegisterOffset + codeBlock->m_numCalleeRegisters;
1120 ASSERT(codeBlock->m_numParameters == 1); // 1 parameter for 'this'.
1121 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), codeBlock->m_numParameters, 0);
1166 debugger->callEvent(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), firstLine);
1169 debugger->returnEvent(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), lastLine);
1172 debugger->atStatement(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), firstLine);
1175 debugger->willExecuteProgram(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), firstLine);
1178 debugger->didExecuteProgram(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), lastLine);
1181 debugger->didReachBreakpoint(callFrame, callFrame->codeBlock()->ownerExecutable()->sourceID(), lastLine);
1190 CodeBlock* codeBlock = callFrame->codeBlock();
1191 Identifier& property = codeBlock->identifier(vPC[2].u.operand);
1199 NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue baseValue, const PutPropertySlot& slot)
1227 vPC[4].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), structure);
1253 JSCell* owner = codeBlock->ownerExecutable();
1258 vPC[6].u.structureChain.set(callFrame->globalData(), codeBlock->ownerExecutable(), structure->prototypeChain(callFrame));
1268 NEVER_INLINE void Interpreter::uncachePutByID(CodeBlock*, Instruction* vPC)
1274 NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot)
1315 vPC[4].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), structure);
1378 vPC[5].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), baseObject->structure());
1404 vPC[4].u.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), structure);
1405 vPC[5].u.structureChain.set(callFrame->globalData(), codeBlock->ownerExecutable(), structure->prototypeChain(callFrame));
1409 NEVER_INLINE void Interpreter::uncacheGetByID(CodeBlock*, Instruction* vPC)
1450 CodeBlock* codeBlock = callFrame->codeBlock();
1451 Instruction* vPC = codeBlock->instructions().begin();
1478 #define SAMPLE(codeBlock, vPC) m_sampler->sample(codeBlock, vPC)
1480 #define SAMPLE(codeBlock, vPC)
1484 #define NEXT_INSTRUCTION() SAMPLE(codeBlock, vPC); goto *vPC->u.opcode
1492 #define NEXT_INSTRUCTION() SAMPLE(codeBlock, vPC); goto interpreterLoopStart
1540 RegExp* regExp = codeBlock->regexp(vPC[2].u.operand);
2347 JSGlobalObject* scope = codeBlock->globalObject();
2360 JSGlobalObject* scope = codeBlock->globalObject();
2383 ASSERT(codeBlock == callFrame->codeBlock());
2384 bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
2387 if (callFrame->r(codeBlock->activationRegister()).jsValue())
2412 ASSERT(codeBlock == callFrame->codeBlock());
2414 bool checkTopLevel = codeBlock->codeType() == FunctionCode && codeBlock->needsFullScopeChain();
2417 if (callFrame->r(codeBlock->activationRegister()).jsValue())
2454 Identifier& ident = codeBlock->identifier(property);
2495 Identifier& ident = codeBlock->identifier(property);
2501 tryCacheGetByID(callFrame, codeBlock, vPC, baseValue, ident, slot);
2527 ASSERT(baseObject->get(callFrame, codeBlock->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
2535 uncacheGetByID(codeBlock, vPC);
2561 ASSERT(protoObject->get(callFrame, codeBlock->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset));
2562 ASSERT(baseValue.get(callFrame, codeBlock->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset));
2571 uncacheGetByID(codeBlock, vPC);
2613 uncacheGetByID(codeBlock, vPC);
2644 Identifier& ident = codeBlock->identifier(property);
2655 uncacheGetByID(codeBlock, vPC);
2735 ASSERT(baseObject->get(callFrame, codeBlock->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
2736 ASSERT(baseValue.get(callFrame, codeBlock->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset));
2749 uncacheGetByID(codeBlock, vPC);
2790 uncacheGetByID(codeBlock, vPC);
2817 Identifier& ident = codeBlock->identifier(property);
2827 uncacheGetByID(codeBlock, vPC);
2843 Identifier& ident = codeBlock->identifier(property);
2902 uncacheGetByID(codeBlock, vPC);
2939 Identifier& ident = codeBlock->identifier(property);
2954 uncacheGetByID(codeBlock, vPC);
2978 uncacheGetByID(codeBlock, vPC);
3002 uncacheGetByID(codeBlock, vPC);
3028 Identifier& ident = codeBlock->identifier(property);
3029 PutPropertySlot slot(codeBlock->isStrictMode());
3037 tryCachePutByID(callFrame, codeBlock, vPC, baseValue, slot);
3075 uncachePutByID(codeBlock, vPC);
3086 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(*globalData, codeBlock->identifier(vPC[2].u.operand))) == offset);
3094 uncachePutByID(codeBlock, vPC);
3121 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(*globalData, codeBlock->identifier(vPC[2].u.operand))) == offset);
3129 uncachePutByID(codeBlock, vPC);
3147 Identifier& ident = codeBlock->identifier(property);
3148 PutPropertySlot slot(codeBlock->isStrictMode());
3172 Identifier& ident = codeBlock->identifier(property);
3174 if (!result && codeBlock->isStrictMode()) {
3218 Identifier& ident = codeBlock->identifier(property);
3237 unsigned numParameters = callFrame->codeBlock()->m_numParameters;
3334 PutPropertySlot slot(codeBlock->isStrictMode());
3368 if (!result && codeBlock->isStrictMode()) {
3713 vPC += codeBlock->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.asInt32(), defaultOffset);
3718 vPC += codeBlock->immediateSwitchJumpTable(tableIndex).offsetForValue(intValue, defaultOffset);
3743 vPC += codeBlock->characterSwitchJumpTable(tableIndex).offsetForValue(value->characters()[0], defaultOffset);
3762 vPC += codeBlock->stringSwitchJumpTable(tableIndex).offsetForValue(asString(scrutinee)->value(callFrame).impl(), defaultOffset);
3776 ASSERT(codeBlock->codeType() != FunctionCode || !codeBlock->needsFullScopeChain() || callFrame->r(codeBlock->activationRegister()).jsValue());
3778 callFrame->uncheckedR(dst) = JSValue(codeBlock->functionDecl(func)->make(callFrame, callFrame->scopeChain()));
3794 ASSERT(codeBlock->codeType() != FunctionCode || !codeBlock->needsFullScopeChain() || callFrame->r(codeBlock->activationRegister()).jsValue());
3795 FunctionExecutable* function = codeBlock->functionExpr(funcIndex);
3831 ASSERT(codeBlock->codeType() != FunctionCode || !codeBlock->needsFullScopeChain() || callFrame->r(codeBlock->activationRegister()).jsValue());
3883 CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
3892 codeBlock = newCodeBlock;
3893 ASSERT(codeBlock == callFrame->codeBlock());
4042 CodeBlock* newCodeBlock = &callData.js.functionExecutable->generatedBytecodeForCall();
4051 codeBlock = newCodeBlock;
4052 ASSERT(codeBlock == callFrame->codeBlock());
4102 ASSERT(codeBlock->needsFullScopeChain());
4108 if (!codeBlock->isStrictMode())
4112 if (!codeBlock->isStrictMode())
4132 ASSERT(!codeBlock->needsFullScopeChain() && codeBlock->ownerExecutable()->usesArguments());
4161 codeBlock = callFrame->codeBlock();
4162 ASSERT(codeBlock == callFrame->codeBlock());
4202 codeBlock = callFrame->codeBlock();
4203 ASSERT(codeBlock == callFrame->codeBlock());
4217 for (size_t count = codeBlock->m_numVars; i < count; ++i)
4232 JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionExecutable*>(codeBlock->ownerExecutable()));
4383 CodeBlock* newCodeBlock = &constructData.js.functionExecutable->generatedBytecodeForConstruct();
4392 codeBlock = newCodeBlock;
4613 handler = throwException(callFrame, exceptionValue, vPC - codeBlock->instructions().begin());
4617 codeBlock = callFrame->codeBlock();
4618 vPC = codeBlock->instructions().begin() + handler->target;
4659 Identifier& ident = codeBlock->identifier(property);
4683 Identifier& ident = codeBlock->identifier(property);
4769 handler = throwException(callFrame, exceptionValue, vPC - codeBlock->instructions().begin());
4776 codeBlock = callFrame->codeBlock();
4777 vPC = codeBlock->instructions().begin() + handler->target;
4797 CodeBlock* codeBlock = functionCallFrame->codeBlock();
4798 if (codeBlock->usesArguments()) {
4799 ASSERT(codeBlock->codeType() == FunctionCode);
4800 int argumentsRegister = codeBlock->argumentsRegister();
4842 CodeBlock* callerCodeBlock = callerFrame->codeBlock();