Lines Matching refs:callFrame

119 COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
171 COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x90, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
249 COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
400 COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
490 "sw $6," STRINGIZE_VALUE_OF(CALLFRAME_OFFSET) "($29) # store callFrame to curent stack" "\n"
772 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, callFrame) == CALLFRAME_OFFSET);
792 ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, callFrame) == CALLFRAME_OFFSET);
806 NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const PutPropertySlot& slot, StructureStubInfo* stubInfo, bool direct)
843 normalizePrototypeChain(callFrame, baseCell);
845 StructureChain* prototypeChain = structure->prototypeChain(callFrame);
846 stubInfo->initPutByIdTransition(callFrame->globalData(), codeBlock->ownerExecutable(), structure->previousID(), structure, prototypeChain);
847 JIT::compilePutByIdTransition(callFrame->scopeChain()->globalData, codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress, direct);
851 stubInfo->initPutByIdReplace(callFrame->globalData(), codeBlock->ownerExecutable(), structure);
856 NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, ReturnAddressPtr returnAddress, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot, StructureStubInfo* stubInfo)
867 JSGlobalData* globalData = &callFrame->globalData();
869 if (isJSArray(globalData, baseValue) && propertyName == callFrame->propertyNames().length) {
870 JIT::compilePatchGetArrayLength(callFrame->scopeChain()->globalData, codeBlock, returnAddress);
874 if (isJSString(globalData, baseValue) && propertyName == callFrame->propertyNames().length) {
899 stubInfo->initGetByIdSelf(callFrame->globalData(), codeBlock->ownerExecutable(), structure);
912 if (slot.slotBase() == structure->prototypeForLookup(callFrame)) {
921 slotBaseObject->flattenDictionaryObject(callFrame->globalData());
922 offset = slotBaseObject->structure()->get(callFrame->globalData(), propertyName);
925 stubInfo->initGetByIdProto(callFrame->globalData(), codeBlock->ownerExecutable(), structure, slotBaseObject->structure());
929 JIT::compileGetByIdProto(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, slotBaseObject->structure(), propertyName, slot, offset, returnAddress);
934 size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset);
940 StructureChain* prototypeChain = structure->prototypeChain(callFrame);
941 stubInfo->initGetByIdChain(callFrame->globalData(), codeBlock->ownerExecutable(), structure, prototypeChain);
942 JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, propertyName, slot, offset, returnAddress);
1000 static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalData* globalData, ReturnAddressPtr exceptionLocation, ReturnAddressPtr& returnAddressSlot)
1002 globalData->exception = createStackOverflowError(callFrame);
1036 CallFrame* callFrame;
1038 static ExceptionHandler jitThrow(JSGlobalData* globalData, CallFrame* callFrame, JSValue exceptionValue, ReturnAddressPtr faultLocation)
1042 unsigned vPCIndex = callFrame->codeBlock()->bytecodeOffset(faultLocation);
1044 HandlerInfo* handler = globalData->interpreter->throwException(callFrame, exceptionValue, vPCIndex); // This may update callFrame & exceptionValue!
1049 ExceptionHandler exceptionHandler = { catchRoutine, callFrame };
1261 CallFrame* callFrame = stackFrame.callFrame;
1263 JSFunction* constructor = asFunction(callFrame->callee());
1275 JSValue result = constructEmptyObject(callFrame, structure);
1285 CallFrame* callFrame = stackFrame.callFrame;
1287 JSObject* result = v1.toThisObject(callFrame);
1297 CallFrame* callFrame = stackFrame.callFrame;
1299 JSValue result = v1.toStrictThisObject(callFrame);
1310 CallFrame* callFrame = stackFrame.callFrame;
1314 ? jsString(callFrame, asString(v1), asString(v2))
1315 : jsString(callFrame, asString(v1), v2.toPrimitiveString(callFrame));
1325 JSValue result = jsAddSlowCase(callFrame, v1, v2);
1336 CallFrame* callFrame = stackFrame.callFrame;
1337 JSValue result = jsNumber(v.toNumber(callFrame) + 1);
1352 } else if (timeoutChecker.didTimeOut(stackFrame.callFrame)) {
1363 CallFrame* callFrame = stackFrame.callFrame;
1365 if (UNLIKELY(!stackFrame.registerFile->grow(&callFrame->registers()[callFrame->codeBlock()->m_numCalleeRegisters]))) {
1368 CallFrame* oldCallFrame = callFrame->callerFrame();
1369 ExceptionHandler handler = jitThrow(stackFrame.globalData, oldCallFrame, createStackOverflowError(oldCallFrame), ReturnAddressPtr(callFrame->returnPC()));
1371 callFrame = handler.callFrame;
1374 return callFrame;
1383 CallFrame* callFrame = stackFrame.callFrame;
1385 bool result = jsLessEq(callFrame, src1, src2);
1394 return constructEmptyObject(stackFrame.callFrame);
1401 PutPropertySlot slot(stackFrame.callFrame->codeBlock()->isStrictMode());
1402 stackFrame.args[0].jsValue().put(stackFrame.callFrame, stackFrame.args[1].identifier(), stackFrame.args[2].jsValue(), slot);
1410 PutPropertySlot slot(stackFrame.callFrame->codeBlock()->isStrictMode());
1411 stackFrame.args[0].jsValue().putDirect(stackFrame.callFrame, stackFrame.args[1].identifier(), stackFrame.args[2].jsValue(), slot);
1419 CallFrame* callFrame = stackFrame.callFrame;
1424 JSValue result = baseValue.get(callFrame, ident, slot);
1435 CallFrame* callFrame = stackFrame.callFrame;
1438 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
1439 stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot);
1441 CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
1446 JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, false);
1454 CallFrame* callFrame = stackFrame.callFrame;
1457 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
1458 stackFrame.args[0].jsValue().putDirect(callFrame, ident, stackFrame.args[2].jsValue(), slot);
1460 CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
1465 JITThunks::tryCachePutByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, stackFrame.args[0].jsValue(), slot, stubInfo, true);
1474 CallFrame* callFrame = stackFrame.callFrame;
1477 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
1478 stackFrame.args[0].jsValue().put(callFrame, ident, stackFrame.args[2].jsValue(), slot);
1487 CallFrame* callFrame = stackFrame.callFrame;
1490 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
1491 stackFrame.args[0].jsValue().putDirect(callFrame, ident, stackFrame.args[2].jsValue(), slot);
1515 CallFrame* callFrame = stackFrame.callFrame;
1520 JSValue result = baseValue.get(callFrame, ident, slot);
1523 CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
1547 && (slotBaseObject = asObject(slot.slotBase()))->getPropertySpecificValue(callFrame, ident, specific)
1556 slotBaseObject->flattenDictionaryObject(callFrame->globalData());
1562 if (slot.slotBase() == structure->prototypeForLookup(callFrame)) {
1563 JIT::patchMethodCallProto(callFrame->globalData(), codeBlock, methodCallLinkInfo, callee, structure, slotBaseObject, STUB_RETURN_ADDRESS);
1574 JIT::patchMethodCallProto(callFrame->globalData(), codeBlock, methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject->methodCallDummy(), STUB_RETURN_ADDRESS);
1587 CallFrame* callFrame = stackFrame.callFrame;
1592 JSValue result = baseValue.get(callFrame, ident, slot);
1594 CodeBlock* codeBlock = stackFrame.callFrame->codeBlock();
1599 JITThunks::tryCacheGetByID(callFrame, codeBlock, STUB_RETURN_ADDRESS, baseValue, ident, slot, stubInfo);
1609 CallFrame* callFrame = stackFrame.callFrame;
1614 JSValue result = baseValue.get(callFrame, ident, slot);
1623 CodeBlock* codeBlock = callFrame->codeBlock();
1633 polymorphicStructureList = new PolymorphicAccessStructureList(callFrame->globalData(), codeBlock->ownerExecutable(), CodeLocationLabel(), stubInfo->u.getByIdSelf.baseObjectStructure.get());
1641 JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, baseValue.asCell()->structure(), ident, slot, slot.cachedOffset());
1647 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
1684 CallFrame* callFrame = stackFrame.callFrame;
1691 JSValue result = call(callFrame, getter, callType, callData, stackFrame.args[1].jsObject(), ArgList());
1692 if (callFrame->hadException())
1693 returnToThrowTrampoline(&callFrame->globalData(), stackFrame.args[2].returnAddress(), STUB_RETURN_ADDRESS);
1701 CallFrame* callFrame = stackFrame.callFrame;
1705 JSValue result = getter(callFrame, slotBase, ident);
1706 if (callFrame->hadException())
1707 returnToThrowTrampoline(&callFrame->globalData(), stackFrame.args[3].returnAddress(), STUB_RETURN_ADDRESS);
1716 CallFrame* callFrame = stackFrame.callFrame;
1721 JSValue result = baseValue.get(callFrame, propertyName, slot);
1726 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
1731 CodeBlock* codeBlock = callFrame->codeBlock();
1741 else if (slot.slotBase() == baseValue.asCell()->structure()->prototypeForLookup(callFrame)) {
1746 slotBaseObject->flattenDictionaryObject(callFrame->globalData());
1747 offset = slotBaseObject->structure()->get(callFrame->globalData(), propertyName);
1751 PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(callFrame->globalData(), codeBlock->ownerExecutable(), stubInfo, listIndex);
1753 JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
1758 } else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
1761 PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(callFrame->globalData(), codeBlock->ownerExecutable(), stubInfo, listIndex);
1764 StructureChain* protoChain = structure->prototypeChain(callFrame);
1765 JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
1782 JSValue result = baseValue.get(stackFrame.callFrame, stackFrame.args[1].identifier(), slot);
1794 JSValue result = baseValue.get(stackFrame.callFrame, stackFrame.args[1].identifier(), slot);
1806 JSValue result = baseValue.get(stackFrame.callFrame, stackFrame.args[1].identifier(), slot);
1818 JSValue result = baseValue.get(stackFrame.callFrame, stackFrame.args[1].identifier(), slot);
1830 CallFrame* callFrame = stackFrame.callFrame;
1839 stackFrame.globalData->exception = createInvalidParamError(callFrame, "instanceof", baseVal);
1847 CallFrame* callFrame = stackFrame.callFrame;
1862 stackFrame.globalData->exception = createInvalidParamError(stackFrame.callFrame, "instanceof", baseVal);
1872 throwError(callFrame, createTypeError(callFrame, "instanceof called on an object with an invalid prototype property."));
1877 JSValue result = jsBoolean(asObject(baseVal)->hasInstance(callFrame, value, proto));
1887 CallFrame* callFrame = stackFrame.callFrame;
1889 JSObject* baseObj = stackFrame.args[0].jsValue().toObject(callFrame);
1891 bool couldDelete = baseObj->deleteProperty(callFrame, stackFrame.args[1].identifier());
1893 if (!couldDelete && callFrame->codeBlock()->isStrictMode())
1894 stackFrame.globalData->exception = createTypeError(stackFrame.callFrame, "Unable to delete property.");
1912 CallFrame* callFrame = stackFrame.callFrame;
1913 JSValue result = jsNumber(src1.toNumber(callFrame) * src2.toNumber(callFrame));
1922 ASSERT(stackFrame.callFrame->codeBlock()->codeType() != FunctionCode || !stackFrame.callFrame->codeBlock()->needsFullScopeChain() || stackFrame.callFrame->uncheckedR(stackFrame.callFrame->codeBlock()->activationRegister()).jsValue());
1923 return stackFrame.args[0].function()->make(stackFrame.callFrame, stackFrame.callFrame->scopeChain());
1932 ASSERT(stackFrame.callFrame->callee()->getCallData(callData) == CallTypeJS);
1935 JSFunction* function = asFunction(stackFrame.callFrame->callee());
1939 JSObject* error = executable->compileForCall(stackFrame.callFrame, callDataScopeChain);
1941 stackFrame.callFrame->globalData().exception = error;
1953 ASSERT(asFunction(stackFrame.callFrame->callee())->getConstructData(constructData) == ConstructTypeJS);
1956 JSFunction* function = asFunction(stackFrame.callFrame->callee());
1960 JSObject* error = executable->compileForConstruct(stackFrame.callFrame, callDataScopeChain);
1962 stackFrame.callFrame->globalData().exception = error;
1972 CallFrame* callFrame = stackFrame.callFrame;
1973 JSFunction* callee = asFunction(callFrame->callee());
1976 int argCount = callFrame->argumentCountIncludingThis();
1977 ReturnAddressPtr pc = callFrame->returnPC();
1981 CallFrame* oldCallFrame = callFrame->callerFrame();
1986 r = callFrame->registers() + numParameters;
1993 return handler.callFrame;
2001 r = callFrame->registers() + omittedArgCount;
2008 return handler.callFrame;
2016 callFrame = CallFrame::create(r);
2017 callFrame->setCallerFrame(oldCallFrame);
2018 callFrame->setArgumentCountIncludingThis(argCount);
2019 callFrame->setCallee(callee);
2020 callFrame->setScopeChain(callee->scope());
2021 callFrame->setReturnPC(pc.value());
2023 ASSERT((void*)callFrame <= stackFrame.registerFile->end());
2024 return callFrame;
2031 CallFrame* callFrame = stackFrame.callFrame;
2032 JSFunction* callee = asFunction(callFrame->callee());
2035 int argCount = callFrame->argumentCountIncludingThis();
2036 ReturnAddressPtr pc = callFrame->returnPC();
2040 CallFrame* oldCallFrame = callFrame->callerFrame();
2045 r = callFrame->registers() + numParameters;
2052 return handler.callFrame;
2060 r = callFrame->registers() + omittedArgCount;
2067 return handler.callFrame;
2075 callFrame = CallFrame::create(r);
2076 callFrame->setCallerFrame(oldCallFrame);
2077 callFrame->setArgumentCountIncludingThis(argCount);
2078 callFrame->setCallee(callee);
2079 callFrame->setScopeChain(callee->scope());
2080 callFrame->setReturnPC(pc.value());
2082 ASSERT((void*)callFrame <= stackFrame.registerFile->end());
2083 return callFrame;
2090 CallFrame* callFrame = stackFrame.callFrame;
2091 JSFunction* callee = asFunction(callFrame->callee());
2100 JSObject* error = functionExecutable->compileForCall(callFrame, callee->scope());
2102 callFrame->globalData().exception = createStackOverflowError(callFrame);
2106 if (callFrame->argumentCountIncludingThis() == static_cast<size_t>(codeBlock->m_numParameters))
2111 CallLinkInfo* callLinkInfo = &stackFrame.callFrame->callerFrame()->codeBlock()->getCallLinkInfo(callFrame->returnPC());
2116 JIT::linkCall(callee, stackFrame.callFrame->callerFrame()->codeBlock(), codeBlock, codePtr, callLinkInfo, callFrame->argumentCountIncludingThis(), stackFrame.globalData);
2124 CallFrame* callFrame = stackFrame.callFrame;
2125 JSFunction* callee = asFunction(callFrame->callee());
2134 JSObject* error = functionExecutable->compileForConstruct(callFrame, callee->scope());
2136 throwStackOverflowError(callFrame, stackFrame.globalData, ReturnAddressPtr(callFrame->returnPC()), STUB_RETURN_ADDRESS);
2140 if (callFrame->argumentCountIncludingThis() == static_cast<size_t>(codeBlock->m_numParameters))
2145 CallLinkInfo* callLinkInfo = &stackFrame.callFrame->callerFrame()->codeBlock()->getCallLinkInfo(callFrame->returnPC());
2150 JIT::linkConstruct(callee, stackFrame.callFrame->callerFrame()->codeBlock(), codeBlock, codePtr, callLinkInfo, callFrame->argumentCountIncludingThis(), stackFrame.globalData);
2160 JSActivation* activation = new (stackFrame.globalData) JSActivation(stackFrame.callFrame, static_cast<FunctionExecutable*>(stackFrame.callFrame->codeBlock()->ownerExecutable()));
2161 stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->push(activation));
2179 CallFrame* previousCallFrame = stackFrame.callFrame;
2180 CallFrame* callFrame = CallFrame::create(previousCallFrame->registers() + registerOffset);
2181 if (!stackFrame.registerFile->grow(callFrame->registers())) {
2182 throwStackOverflowError(previousCallFrame, stackFrame.globalData, callFrame->returnPC(), STUB_RETURN_ADDRESS);
2186 callFrame->init(0, static_cast<Instruction*>((STUB_RETURN_ADDRESS).value()), previousCallFrame->scopeChain(), previousCallFrame, argCount, asObject(funcVal));
2191 returnValue = callData.native.function(callFrame);
2200 stackFrame.globalData->exception = createNotAFunctionError(stackFrame.callFrame, funcVal);
2208 Arguments* arguments = new (stackFrame.globalData) Arguments(stackFrame.callFrame);
2216 Arguments* arguments = new (stackFrame.globalData) Arguments(stackFrame.callFrame, Arguments::NoParameters);
2224 ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain());
2228 if (!stackFrame.callFrame->codeBlock()->isStrictMode())
2236 if (!stackFrame.callFrame->codeBlock()->isStrictMode())
2245 ASSERT(stackFrame.callFrame->codeBlock()->usesArguments() && !stackFrame.callFrame->codeBlock()->needsFullScopeChain());
2254 (*stackFrame.enabledProfilerReference)->willExecute(stackFrame.callFrame, stackFrame.args[0].jsValue());
2262 (*stackFrame.enabledProfilerReference)->didExecute(stackFrame.callFrame, stackFrame.args[0].jsValue());
2269 ArgList argList(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32());
2270 return constructArray(stackFrame.callFrame, argList);
2277 CallFrame* callFrame = stackFrame.callFrame;
2278 ScopeChainNode* scopeChain = callFrame->scopeChain();
2288 if (o->getPropertySlot(callFrame, ident, slot)) {
2289 JSValue result = slot.getValue(callFrame, ident);
2295 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
2313 CallFrame* previousCallFrame = stackFrame.callFrame;
2314 CallFrame* callFrame = CallFrame::create(previousCallFrame->registers() + registerOffset);
2315 if (!stackFrame.registerFile->grow(callFrame->registers())) {
2316 throwStackOverflowError(previousCallFrame, stackFrame.globalData, callFrame->returnPC(), STUB_RETURN_ADDRESS);
2320 callFrame->init(0, static_cast<Instruction*>((STUB_RETURN_ADDRESS).value()), previousCallFrame->scopeChain(), previousCallFrame, argCount, asObject(constrVal));
2325 returnValue = constructData.native.function(callFrame);
2334 stackFrame.globalData->exception = createNotAConstructorError(stackFrame.callFrame, constrVal);
2342 CallFrame* callFrame = stackFrame.callFrame;
2349 Identifier propertyName(callFrame, asString(subscript)->value(callFrame));
2353 if (baseValue.asCell()->fastGetOwnPropertySlot(callFrame, propertyName, slot)) {
2354 JSValue result = slot.getValue(callFrame, propertyName);
2363 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_string));
2364 JSValue result = asString(baseValue)->getIndex(callFrame, i);
2370 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val_byte_array));
2371 return JSValue::encode(asByteArray(baseValue)->getIndex(callFrame, i));
2373 JSValue result = baseValue.get(callFrame, i);
2378 Identifier property(callFrame, subscript.toString(callFrame));
2379 JSValue result = baseValue.get(callFrame, property);
2388 CallFrame* callFrame = stackFrame.callFrame;
2399 result = asString(baseValue)->getIndex(callFrame, i);
2401 result = baseValue.get(callFrame, i);
2403 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
2406 Identifier property(callFrame, subscript.toString(callFrame));
2407 result = baseValue.get(callFrame, property);
2418 CallFrame* callFrame = stackFrame.callFrame;
2430 return JSValue::encode(asByteArray(baseValue)->getIndex(callFrame, i));
2433 result = baseValue.get(callFrame, i);
2435 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_val));
2437 Identifier property(callFrame, subscript.toString(callFrame));
2438 result = baseValue.get(callFrame, property);
2457 CallFrame* callFrame = stackFrame.callFrame;
2458 JSValue result = jsNumber(src1.toNumber(callFrame) - src2.toNumber(callFrame));
2467 CallFrame* callFrame = stackFrame.callFrame;
2481 jsArray->JSArray::put(callFrame, i, value);
2484 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val_byte_array));
2497 baseValue.put(callFrame, i, value);
2499 baseValue.put(callFrame, i, value);
2501 Identifier property(callFrame, subscript.toString(callFrame));
2503 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
2504 baseValue.put(callFrame, property, value, slot);
2515 CallFrame* callFrame = stackFrame.callFrame;
2541 ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_put_by_val));
2542 baseValue.put(callFrame, i, value);
2544 Identifier property(callFrame, subscript.toString(callFrame));
2546 PutPropertySlot slot(callFrame->codeBlock()->isStrictMode());
2547 baseValue.put(callFrame, property, value, slot);
2558 CallFrame* callFrame = stackFrame.callFrame;
2559 JSValue result = jsBoolean(jsLessEq(callFrame, stackFrame.args[0].jsValue(), stackFrame.args[1].jsValue()));
2568 CallFrame* callFrame = stackFrame.callFrame;
2571 JSValue arguments = callFrame->registers()[argsOffset].jsValue();
2574 int providedParams = callFrame->registers()[RegisterFile::ArgumentCount].i() - 1;
2578 Register* newEnd = callFrame->registers() + sizeDelta;
2579 if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
2580 stackFrame.globalData->exception = createStackOverflowError(callFrame);
2583 int32_t expectedParams = asFunction(callFrame->callee())->jsExecutable()->parameterCount();
2586 Register* inplaceArgsDst = callFrame->registers() + argsOffset;
2591 Register* inplaceArgsSrc = callFrame->registers() - RegisterFile::CallFrameHeaderSize - expectedParams;
2604 stackFrame.globalData->exception = createInvalidParamError(callFrame, "Function.prototype.apply", arguments);
2609 argCount = argsObject->numProvidedArguments(callFrame);
2612 Register* newEnd = callFrame->registers() + sizeDelta;
2613 if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
2614 stackFrame.globalData->exception = createStackOverflowError(callFrame);
2617 argsObject->copyToRegisters(callFrame, callFrame->registers() + argsOffset, argCount);
2618 } else if (isJSArray(&callFrame->globalData(), arguments)) {
2623 Register* newEnd = callFrame->registers() + sizeDelta;
2624 if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
2625 stackFrame.globalData->exception = createStackOverflowError(callFrame);
2628 array->copyToRegisters(callFrame, callFrame->registers() + argsOffset, argCount);
2631 argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
2634 Register* newEnd = callFrame->registers() + sizeDelta;
2635 if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
2636 stackFrame.globalData->exception = createStackOverflowError(callFrame);
2639 Register* argsBuffer = callFrame->registers() + argsOffset;
2641 argsBuffer[i] = asObject(arguments)->get(callFrame, i);
2645 stackFrame.globalData->exception = createInvalidParamError(callFrame, "Function.prototype.apply", arguments);
2663 CallFrame* callFrame = stackFrame.callFrame;
2664 JSValue result = jsNumber(-src.toNumber(callFrame));
2673 return JSValue::encode(JSC::resolveBase(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.callFrame->scopeChain(), false));
2679 JSValue base = JSC::resolveBase(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.callFrame->scopeChain(), true);
2681 stackFrame.globalData->exception = createErrorForInvalidGlobalAssignment(stackFrame.callFrame, stackFrame.args[0].identifier().ustring());
2690 JSValue base = stackFrame.callFrame->r(stackFrame.args[0].int32()).jsValue();
2693 ASSERT(stackFrame.callFrame->codeBlock()->isStrictMode());
2694 if (!object->getPropertySlot(stackFrame.callFrame, stackFrame.args[1].identifier(), slot)) {
2695 stackFrame.globalData->exception = createErrorForInvalidGlobalAssignment(stackFrame.callFrame, stackFrame.args[1].identifier().ustring());
2706 CallFrame* callFrame = stackFrame.callFrame;
2707 ScopeChainNode* scopeChain = callFrame->scopeChain();
2714 CodeBlock* codeBlock = callFrame->codeBlock();
2718 if (callFrame->uncheckedR(codeBlock->activationRegister()).jsValue())
2729 if (o->getPropertySlot(callFrame, ident, slot)) {
2730 JSValue result = slot.getValue(callFrame, ident);
2736 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
2744 CallFrame* callFrame = stackFrame.callFrame;
2745 CodeBlock* codeBlock = callFrame->codeBlock();
2752 if (globalObject->getPropertySlot(callFrame, ident, slot)) {
2753 JSValue result = slot.getValue(callFrame, ident);
2756 globalResolveInfo.structure.set(callFrame->globalData(), codeBlock->ownerExecutable(), globalObject->structure());
2765 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
2781 CallFrame* callFrame = stackFrame.callFrame;
2782 JSValue result = jsNumber(src1.toNumber(callFrame) / src2.toNumber(callFrame));
2793 CallFrame* callFrame = stackFrame.callFrame;
2794 JSValue result = jsNumber(v.toNumber(callFrame) - 1);
2805 CallFrame* callFrame = stackFrame.callFrame;
2807 bool result = jsLess(callFrame, src1, src2);
2818 CallFrame* callFrame = stackFrame.callFrame;
2820 bool result = jsLessEq(callFrame, src1, src2);
2831 CallFrame* callFrame = stackFrame.callFrame;
2833 JSValue result = jsBoolean(!src.toBoolean(callFrame));
2844 CallFrame* callFrame = stackFrame.callFrame;
2846 bool result = src1.toBoolean(callFrame);
2857 CallFrame* callFrame = stackFrame.callFrame;
2859 JSValue number = v.toJSNumber(callFrame);
2862 callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(number.uncheckedGetNumber() + 1);
2890 double d = src2.toNumber(stackFrame.callFrame);
2898 double d = src2.toNumber(stackFrame.callFrame);
2906 double d = src2.toNumber(stackFrame.callFrame);
2914 double d = src2.toNumber(stackFrame.callFrame);
2929 return jsToNumber(static_cast<JSString*>(cell1)->value(stackFrame.callFrame)) == src2.asInt32();
2932 return jsToNumber(static_cast<JSString*>(cell1)->value(stackFrame.callFrame)) == src2.asDouble();
2935 return jsToNumber(static_cast<JSString*>(cell1)->value(stackFrame.callFrame)) == 1.0;
2938 return jsToNumber(static_cast<JSString*>(cell1)->value(stackFrame.callFrame)) == 0.0;
2942 return static_cast<JSString*>(cell1)->value(stackFrame.callFrame) == static_cast<JSString*>(cell2)->value(stackFrame.callFrame);
2944 src2 = asObject(cell2)->toPrimitive(stackFrame.callFrame);
2951 src1 = asObject(cell1)->toPrimitive(stackFrame.callFrame);
2956 CallFrame* callFrame = stackFrame.callFrame;
2958 bool result = JSValue::equalSlowCaseInline(callFrame, src1, src2);
2974 return string1->value(stackFrame.callFrame) == string2->value(stackFrame.callFrame);
2989 CallFrame* callFrame = stackFrame.callFrame;
2990 JSValue result = jsNumber((val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));
3003 CallFrame* callFrame = stackFrame.callFrame;
3004 JSValue result = jsNumber(src1.toInt32(callFrame) & src2.toInt32(callFrame));
3016 CallFrame* callFrame = stackFrame.callFrame;
3017 JSValue result = jsNumber((val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
3030 CallFrame* callFrame = stackFrame.callFrame;
3031 JSValue result = jsNumber(~src.toInt32(callFrame));
3040 CallFrame* callFrame = stackFrame.callFrame;
3041 ScopeChainNode* scopeChain = callFrame->scopeChain();
3055 if (base->getPropertySlot(callFrame, ident, slot)) {
3056 JSValue result = slot.getValue(callFrame, ident);
3059 callFrame->registers()[stackFrame.args[1].int32()] = JSValue(base);
3065 stackFrame.globalData->exception = createUndefinedVariableError(callFrame, ident);
3073 CallFrame* callFrame = stackFrame.callFrame;
3076 JSFunction* func = function->make(callFrame, callFrame->scopeChain());
3077 ASSERT(callFrame->codeBlock()->codeType() != FunctionCode || !callFrame->codeBlock()->needsFullScopeChain() || callFrame->uncheckedR(callFrame->codeBlock()->activationRegister()).jsValue());
3087 JSStaticScopeObject* functionScopeObject = new (callFrame) JSStaticScopeObject(callFrame, function->name(), func, ReadOnly | DontDelete);
3088 func->setScope(callFrame->globalData(), func->scope()->push(functionScopeObject));
3101 CallFrame* callFrame = stackFrame.callFrame;
3102 double d = dividendValue.toNumber(callFrame);
3103 JSValue result = jsNumber(fmod(d, divisorValue.toNumber(callFrame)));
3112 CallFrame* callFrame = stackFrame.callFrame;
3113 JSValue result = jsBoolean(jsLess(callFrame, stackFrame.args[0].jsValue(), stackFrame.args[1].jsValue()));
3124 CallFrame* callFrame = stackFrame.callFrame;
3126 JSValue number = v.toJSNumber(callFrame);
3129 callFrame->registers()[stackFrame.args[1].int32()] = jsNumber(number.uncheckedGetNumber() - 1);
3140 CallFrame* callFrame = stackFrame.callFrame;
3141 JSValue result = jsNumber((val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));
3153 CallFrame* callFrame = stackFrame.callFrame;
3155 JSValue result = jsNumber(src1.toInt32(callFrame) ^ src2.toInt32(callFrame));
3164 CallFrame* callFrame = stackFrame.callFrame;
3168 stackFrame.globalData->exception = createSyntaxError(callFrame, "Invalid flags supplied to RegExp constructor.");
3172 return new (stackFrame.globalData) RegExpObject(stackFrame.callFrame->lexicalGlobalObject(), stackFrame.callFrame->lexicalGlobalObject()->regExpStructure(), regExp);
3182 CallFrame* callFrame = stackFrame.callFrame;
3184 JSValue result = jsNumber(src1.toInt32(callFrame) | src2.toInt32(callFrame));
3192 ASSERT(stackFrame.callFrame->codeBlock()->codeType() != FunctionCode || !stackFrame.callFrame->codeBlock()->needsFullScopeChain() || stackFrame.callFrame->uncheckedR(stackFrame.callFrame->codeBlock()->activationRegister()).jsValue());
3194 CallFrame* callFrame = stackFrame.callFrame;
3203 Register* newCallFrame = callFrame->registers() + registerOffset;
3206 JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject.get();
3209 JSValue result = interpreter->callEval(callFrame, registerFile, argv, argCount, registerOffset);
3220 ExceptionHandler handler = jitThrow(stackFrame.globalData, stackFrame.callFrame, stackFrame.args[0].jsValue(), STUB_RETURN_ADDRESS);
3222 return handler.callFrame;
3229 CallFrame* callFrame = stackFrame.callFrame;
3233 if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(callFrame))
3234 jsPropertyNameIterator = JSPropertyNameIterator::create(callFrame, o);
3244 int result = base->hasProperty(stackFrame.callFrame, Identifier(stackFrame.callFrame, property->value(stackFrame.callFrame)));
3253 JSObject* o = stackFrame.args[0].jsValue().toObject(stackFrame.callFrame);
3255 stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->push(o));
3263 stackFrame.callFrame->setScopeChain(stackFrame.callFrame->scopeChain()->pop());
3270 return JSValue::encode(jsTypeStringForValue(stackFrame.callFrame, stackFrame.args[0].jsValue()));
3323 bool result = JSValue::strictEqual(stackFrame.callFrame, src1, src2);
3332 return JSValue::encode(stackFrame.args[0].jsValue().toPrimitive(stackFrame.callFrame));
3339 JSValue result = jsString(stackFrame.callFrame, &stackFrame.callFrame->registers()[stackFrame.args[0].int32()], stackFrame.args[1].int32());
3351 bool result = !JSValue::strictEqual(stackFrame.callFrame, src1, src2);
3361 CallFrame* callFrame = stackFrame.callFrame;
3363 JSValue result = src.toJSNumber(callFrame);
3372 CallFrame* callFrame = stackFrame.callFrame;
3376 stackFrame.globalData->exception = createInvalidParamError(stackFrame.callFrame, "in", baseVal);
3385 return JSValue::encode(jsBoolean(baseObj->hasProperty(callFrame, i)));
3387 Identifier property(callFrame, propName.toString(callFrame));
3389 return JSValue::encode(jsBoolean(baseObj->hasProperty(callFrame, property)));
3396 JSObject* scope = new (stackFrame.globalData) JSStaticScopeObject(stackFrame.callFrame, stackFrame.args[0].identifier(), stackFrame.args[1].jsValue(), DontDelete);
3398 CallFrame* callFrame = stackFrame.callFrame;
3399 callFrame->setScopeChain(callFrame->scopeChain()->push(scope));
3408 CallFrame* callFrame = stackFrame.callFrame;
3410 ScopeChainNode* tmp = callFrame->scopeChain();
3413 callFrame->setScopeChain(tmp);
3420 CallFrame* callFrame = stackFrame.callFrame;
3423 stackFrame.args[0].jsValue().put(callFrame, property, stackFrame.args[2].jsValue());
3432 CallFrame* callFrame = stackFrame.callFrame;
3433 CodeBlock* codeBlock = callFrame->codeBlock();
3453 CallFrame* callFrame = stackFrame.callFrame;
3454 CodeBlock* codeBlock = callFrame->codeBlock();
3459 StringImpl* value = asString(scrutinee)->value(callFrame).impl();
3474 CallFrame* callFrame = stackFrame.callFrame;
3475 CodeBlock* codeBlock = callFrame->codeBlock();
3480 StringImpl* value = asString(scrutinee)->value(callFrame).impl();
3492 CallFrame* callFrame = stackFrame.callFrame;
3495 JSObject* baseObj = baseValue.toObject(callFrame); // may throw
3501 result = baseObj->deleteProperty(callFrame, i);
3504 Identifier property(callFrame, subscript.toString(callFrame));
3506 result = baseObj->deleteProperty(callFrame, property);
3509 if (!result && callFrame->codeBlock()->isStrictMode())
3510 stackFrame.globalData->exception = createTypeError(stackFrame.callFrame, "Unable to delete property.");
3520 CallFrame* callFrame = stackFrame.callFrame;
3525 baseObj->defineGetter(callFrame, stackFrame.args[1].identifier(), asObject(stackFrame.args[2].jsValue()));
3532 CallFrame* callFrame = stackFrame.callFrame;
3537 baseObj->defineSetter(callFrame, stackFrame.args[1].identifier(), asObject(stackFrame.args[2].jsValue()));
3544 CallFrame* callFrame = stackFrame.callFrame;
3545 UString message = stackFrame.args[0].jsValue().toString(callFrame);
3546 stackFrame.globalData->exception = createReferenceError(callFrame, message);
3554 CallFrame* callFrame = stackFrame.callFrame;
3560 stackFrame.globalData->interpreter->debug(callFrame, static_cast<DebugHookID>(debugHookID), firstLine, lastLine);
3567 ExceptionHandler handler = jitThrow(globalData, stackFrame.callFrame, globalData->exception, globalData->exceptionLocation);
3569 return handler.callFrame;
3576 CallFrame* callFrame = stackFrame.callFrame;
3577 return JSValue::encode(stackFrame.args[0].jsValue().toObject(callFrame));