|
Lines 53-64
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec1
|
| 53 |
#include "JSString.h" |
53 |
#include "JSString.h" |
| 54 |
#include "JSWithScope.h" |
54 |
#include "JSWithScope.h" |
| 55 |
#include "LLIntCLoop.h" |
55 |
#include "LLIntCLoop.h" |
|
|
56 |
#include "LLIntThunks.h" |
| 56 |
#include "LegacyProfiler.h" |
57 |
#include "LegacyProfiler.h" |
| 57 |
#include "LiteralParser.h" |
58 |
#include "LiteralParser.h" |
| 58 |
#include "NameInstance.h" |
59 |
#include "NameInstance.h" |
| 59 |
#include "ObjectPrototype.h" |
60 |
#include "ObjectPrototype.h" |
| 60 |
#include "Operations.h" |
61 |
#include "Operations.h" |
| 61 |
#include "Parser.h" |
62 |
#include "Parser.h" |
|
|
63 |
#include "ProtoCallFrame.h" |
| 62 |
#include "RegExpObject.h" |
64 |
#include "RegExpObject.h" |
| 63 |
#include "RegExpPrototype.h" |
65 |
#include "RegExpPrototype.h" |
| 64 |
#include "Register.h" |
66 |
#include "Register.h" |
|
Lines 860-871
failedJSONP:
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec2
|
| 860 |
|
862 |
|
| 861 |
// Push the call frame for this invocation: |
863 |
// Push the call frame for this invocation: |
| 862 |
ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. |
864 |
ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. |
|
|
865 |
#if ENABLE(LLINT_C_LOOP) |
| 863 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); |
866 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); |
| 864 |
if (UNLIKELY(!newCallFrame)) |
867 |
if (UNLIKELY(!newCallFrame)) |
| 865 |
return checkedReturn(throwStackOverflowError(callFrame)); |
868 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 866 |
|
869 |
|
| 867 |
// Set the arguments for the callee: |
870 |
// Set the arguments for the callee: |
| 868 |
newCallFrame->setThisValue(thisObj); |
871 |
newCallFrame->setThisValue(thisObj); |
|
|
872 |
#else |
| 873 |
if (UNLIKELY(!m_stack.entryCheck(codeBlock, 1))) |
| 874 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 875 |
|
| 876 |
ProtoCallFrame protoCallFrame; |
| 877 |
protoCallFrame.init(codeBlock, scope, 0, thisObj, 1); |
| 878 |
#endif |
| 869 |
|
879 |
|
| 870 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
880 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 871 |
profiler->willExecute(callFrame, program->sourceURL(), program->lineNo()); |
881 |
profiler->willExecute(callFrame, program->sourceURL(), program->lineNo()); |
|
Lines 879-892
failedJSONP:
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec3
|
| 879 |
#if ENABLE(LLINT_C_LOOP) |
889 |
#if ENABLE(LLINT_C_LOOP) |
| 880 |
result = LLInt::CLoop::execute(newCallFrame, llint_program_prologue); |
890 |
result = LLInt::CLoop::execute(newCallFrame, llint_program_prologue); |
| 881 |
#elif ENABLE(JIT) |
891 |
#elif ENABLE(JIT) |
| 882 |
result = program->generatedJITCode()->execute(&m_stack, newCallFrame, &vm); |
892 |
result = program->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); |
| 883 |
#endif // ENABLE(JIT) |
893 |
#endif // ENABLE(JIT) |
| 884 |
} |
894 |
} |
| 885 |
|
895 |
|
| 886 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
896 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 887 |
profiler->didExecute(callFrame, program->sourceURL(), program->lineNo()); |
897 |
profiler->didExecute(callFrame, program->sourceURL(), program->lineNo()); |
| 888 |
|
898 |
|
|
|
899 |
#if ENABLE(LLINT_C_LOOP) |
| 889 |
m_stack.popFrame(newCallFrame); |
900 |
m_stack.popFrame(newCallFrame); |
|
|
901 |
#endif |
| 890 |
|
902 |
|
| 891 |
return checkedReturn(result); |
903 |
return checkedReturn(result); |
| 892 |
} |
904 |
} |
|
Lines 930-935
JSValue Interpreter::executeCall(CallFra
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec4
|
| 930 |
if (UNLIKELY(vm.watchdog.didFire(callFrame))) |
942 |
if (UNLIKELY(vm.watchdog.didFire(callFrame))) |
| 931 |
return throwTerminatedExecutionException(callFrame); |
943 |
return throwTerminatedExecutionException(callFrame); |
| 932 |
|
944 |
|
|
|
945 |
#if ENABLE(LLINT_C_LOOP) |
| 933 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function); |
946 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function); |
| 934 |
if (UNLIKELY(!newCallFrame)) |
947 |
if (UNLIKELY(!newCallFrame)) |
| 935 |
return checkedReturn(throwStackOverflowError(callFrame)); |
948 |
return checkedReturn(throwStackOverflowError(callFrame)); |
|
Lines 938-943
JSValue Interpreter::executeCall(CallFra
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec5
|
| 938 |
newCallFrame->setThisValue(thisValue); |
951 |
newCallFrame->setThisValue(thisValue); |
| 939 |
for (size_t i = 0; i < args.size(); ++i) |
952 |
for (size_t i = 0; i < args.size(); ++i) |
| 940 |
newCallFrame->setArgument(i, args.at(i)); |
953 |
newCallFrame->setArgument(i, args.at(i)); |
|
|
954 |
#else |
| 955 |
if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) |
| 956 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 957 |
|
| 958 |
ProtoCallFrame protoCallFrame; |
| 959 |
protoCallFrame.init(newCodeBlock, scope, function, thisValue, argsCount, args.data()); |
| 960 |
#endif |
| 941 |
|
961 |
|
| 942 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
962 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 943 |
profiler->willExecute(callFrame, function); |
963 |
profiler->willExecute(callFrame, function); |
|
Lines 952-967
JSValue Interpreter::executeCall(CallFra
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec6
|
| 952 |
#if ENABLE(LLINT_C_LOOP) |
972 |
#if ENABLE(LLINT_C_LOOP) |
| 953 |
result = LLInt::CLoop::execute(newCallFrame, llint_function_for_call_prologue); |
973 |
result = LLInt::CLoop::execute(newCallFrame, llint_function_for_call_prologue); |
| 954 |
#elif ENABLE(JIT) |
974 |
#elif ENABLE(JIT) |
| 955 |
result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&m_stack, newCallFrame, &vm); |
975 |
result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); |
| 956 |
#endif // ENABLE(JIT) |
976 |
#endif // ENABLE(JIT) |
| 957 |
} else |
977 |
} else { |
|
|
978 |
#if ENABLE(LLINT_C_LOOP) |
| 958 |
result = JSValue::decode(callData.native.function(newCallFrame)); |
979 |
result = JSValue::decode(callData.native.function(newCallFrame)); |
|
|
980 |
#else |
| 981 |
result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(callData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack())); |
| 982 |
#endif |
| 983 |
} |
| 959 |
} |
984 |
} |
| 960 |
|
985 |
|
| 961 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
986 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 962 |
profiler->didExecute(callFrame, function); |
987 |
profiler->didExecute(callFrame, function); |
| 963 |
|
988 |
|
|
|
989 |
#if ENABLE(LLINT_C_LOOP) |
| 964 |
m_stack.popFrame(newCallFrame); |
990 |
m_stack.popFrame(newCallFrame); |
|
|
991 |
#endif |
| 965 |
return checkedReturn(result); |
992 |
return checkedReturn(result); |
| 966 |
} |
993 |
} |
| 967 |
|
994 |
|
|
Lines 1005-1011
JSObject* Interpreter::executeConstruct(
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec7
|
| 1005 |
|
1032 |
|
| 1006 |
if (UNLIKELY(vm.watchdog.didFire(callFrame))) |
1033 |
if (UNLIKELY(vm.watchdog.didFire(callFrame))) |
| 1007 |
return throwTerminatedExecutionException(callFrame); |
1034 |
return throwTerminatedExecutionException(callFrame); |
| 1008 |
|
1035 |
#if ENABLE(LLINT_C_LOOP) |
| 1009 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, constructor); |
1036 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, constructor); |
| 1010 |
if (UNLIKELY(!newCallFrame)) |
1037 |
if (UNLIKELY(!newCallFrame)) |
| 1011 |
return checkedReturn(throwStackOverflowError(callFrame)); |
1038 |
return checkedReturn(throwStackOverflowError(callFrame)); |
|
Lines 1014-1019
JSObject* Interpreter::executeConstruct(
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec8
|
| 1014 |
newCallFrame->setThisValue(jsUndefined()); |
1041 |
newCallFrame->setThisValue(jsUndefined()); |
| 1015 |
for (size_t i = 0; i < args.size(); ++i) |
1042 |
for (size_t i = 0; i < args.size(); ++i) |
| 1016 |
newCallFrame->setArgument(i, args.at(i)); |
1043 |
newCallFrame->setArgument(i, args.at(i)); |
|
|
1044 |
#else |
| 1045 |
if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) |
| 1046 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 1047 |
|
| 1048 |
ProtoCallFrame protoCallFrame; |
| 1049 |
protoCallFrame.init(newCodeBlock, scope, constructor, jsUndefined(), argsCount, args.data()); |
| 1050 |
#endif |
| 1017 |
|
1051 |
|
| 1018 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1052 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1019 |
profiler->willExecute(callFrame, constructor); |
1053 |
profiler->willExecute(callFrame, constructor); |
|
Lines 1028-1049
JSObject* Interpreter::executeConstruct(
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec9
|
| 1028 |
#if ENABLE(LLINT_C_LOOP) |
1062 |
#if ENABLE(LLINT_C_LOOP) |
| 1029 |
result = LLInt::CLoop::execute(newCallFrame, llint_function_for_construct_prologue); |
1063 |
result = LLInt::CLoop::execute(newCallFrame, llint_function_for_construct_prologue); |
| 1030 |
#elif ENABLE(JIT) |
1064 |
#elif ENABLE(JIT) |
| 1031 |
result = constructData.js.functionExecutable->generatedJITCodeForConstruct()->execute(&m_stack, newCallFrame, &vm); |
1065 |
result = constructData.js.functionExecutable->generatedJITCodeForConstruct()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); |
| 1032 |
#endif // ENABLE(JIT) |
1066 |
#endif // ENABLE(JIT) |
| 1033 |
} else { |
1067 |
} else { |
|
|
1068 |
#if ENABLE(LLINT_C_LOOP) |
| 1034 |
result = JSValue::decode(constructData.native.function(newCallFrame)); |
1069 |
result = JSValue::decode(constructData.native.function(newCallFrame)); |
| 1035 |
if (!callFrame->hadException()) { |
1070 |
#else |
| 1036 |
ASSERT_WITH_MESSAGE(result.isObject(), "Host constructor returned non object."); |
1071 |
result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(constructData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack())); |
| 1037 |
if (!result.isObject()) |
1072 |
#endif |
| 1038 |
throwTypeError(newCallFrame); |
1073 |
if (!callFrame->hadException()) |
| 1039 |
} |
1074 |
RELEASE_ASSERT(result.isObject()); |
| 1040 |
} |
1075 |
} |
| 1041 |
} |
1076 |
} |
| 1042 |
|
1077 |
|
| 1043 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1078 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1044 |
profiler->didExecute(callFrame, constructor); |
1079 |
profiler->didExecute(callFrame, constructor); |
| 1045 |
|
1080 |
|
|
|
1081 |
#if ENABLE(LLINT_C_LOOP) |
| 1046 |
m_stack.popFrame(newCallFrame); |
1082 |
m_stack.popFrame(newCallFrame); |
|
|
1083 |
#endif |
| 1047 |
|
1084 |
|
| 1048 |
if (callFrame->hadException()) |
1085 |
if (callFrame->hadException()) |
| 1049 |
return 0; |
1086 |
return 0; |
|
Lines 1051-1057
JSObject* Interpreter::executeConstruct(
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec10
|
| 1051 |
return checkedReturn(asObject(result)); |
1088 |
return checkedReturn(asObject(result)); |
| 1052 |
} |
1089 |
} |
| 1053 |
|
1090 |
|
|
|
1091 |
#if ENABLE(LLINT_C_LOOP) |
| 1054 |
CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionExecutable, CallFrame* callFrame, JSFunction* function, int argumentCountIncludingThis, JSScope* scope) |
1092 |
CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionExecutable, CallFrame* callFrame, JSFunction* function, int argumentCountIncludingThis, JSScope* scope) |
|
|
1093 |
#else |
| 1094 |
CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionExecutable, CallFrame* callFrame, ProtoCallFrame* protoCallFrame, JSFunction* function, int argumentCountIncludingThis, JSScope* scope, JSValue* args) |
| 1095 |
#endif |
| 1055 |
{ |
1096 |
{ |
| 1056 |
VM& vm = *scope->vm(); |
1097 |
VM& vm = *scope->vm(); |
| 1057 |
ASSERT(!vm.exception()); |
1098 |
ASSERT(!vm.exception()); |
|
Lines 1070-1088
CallFrameClosure Interpreter::prepareFor
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec11
|
| 1070 |
|
1111 |
|
| 1071 |
size_t argsCount = argumentCountIncludingThis; |
1112 |
size_t argsCount = argumentCountIncludingThis; |
| 1072 |
|
1113 |
|
| 1073 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function); |
1114 |
#if ENABLE(LLINT_C_LOOP) |
|
|
1115 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function); |
| 1116 |
|
| 1074 |
if (UNLIKELY(!newCallFrame)) { |
1117 |
if (UNLIKELY(!newCallFrame)) { |
| 1075 |
throwStackOverflowError(callFrame); |
1118 |
throwStackOverflowError(callFrame); |
| 1076 |
return CallFrameClosure(); |
1119 |
return CallFrameClosure(); |
| 1077 |
} |
1120 |
} |
| 1078 |
|
1121 |
|
| 1079 |
if (UNLIKELY(!newCallFrame)) { |
1122 |
// Return the successful closure: |
|
|
1123 |
CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, &vm, scope, newCodeBlock->numParameters(), argumentCountIncludingThis }; |
| 1124 |
#else |
| 1125 |
if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) { |
| 1080 |
throwStackOverflowError(callFrame); |
1126 |
throwStackOverflowError(callFrame); |
| 1081 |
return CallFrameClosure(); |
1127 |
return CallFrameClosure(); |
| 1082 |
} |
1128 |
} |
| 1083 |
|
1129 |
|
|
|
1130 |
protoCallFrame->init(newCodeBlock, scope, function, jsUndefined(), argsCount, args); |
| 1084 |
// Return the successful closure: |
1131 |
// Return the successful closure: |
| 1085 |
CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, &vm, scope, newCodeBlock->numParameters(), argumentCountIncludingThis }; |
1132 |
CallFrameClosure result = { callFrame, protoCallFrame, function, functionExecutable, &vm, scope, newCodeBlock->numParameters(), argumentCountIncludingThis }; |
|
|
1133 |
#endif |
| 1086 |
return result; |
1134 |
return result; |
| 1087 |
} |
1135 |
} |
| 1088 |
|
1136 |
|
|
Lines 1096-1104
JSValue Interpreter::execute(CallFrameCl
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec12
|
| 1096 |
return jsNull(); |
1144 |
return jsNull(); |
| 1097 |
|
1145 |
|
| 1098 |
StackStats::CheckPoint stackCheckPoint; |
1146 |
StackStats::CheckPoint stackCheckPoint; |
|
|
1147 |
#if ENABLE(LLINT_C_LOOP) |
| 1099 |
m_stack.validateFence(closure.newCallFrame, "BEFORE"); |
1148 |
m_stack.validateFence(closure.newCallFrame, "BEFORE"); |
|
|
1149 |
#endif |
| 1100 |
closure.resetCallFrame(); |
1150 |
closure.resetCallFrame(); |
|
|
1151 |
#if ENABLE(LLINT_C_LOOP) |
| 1101 |
m_stack.validateFence(closure.newCallFrame, "STEP 1"); |
1152 |
m_stack.validateFence(closure.newCallFrame, "STEP 1"); |
|
|
1153 |
#endif |
| 1102 |
|
1154 |
|
| 1103 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1155 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1104 |
profiler->willExecute(closure.oldCallFrame, closure.function); |
1156 |
profiler->willExecute(closure.oldCallFrame, closure.function); |
|
Lines 1114-1120
JSValue Interpreter::execute(CallFrameCl
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec13
|
| 1114 |
// Hence, we need to preserve the topCallFrame here ourselves before |
1166 |
// Hence, we need to preserve the topCallFrame here ourselves before |
| 1115 |
// repeating this call on a second callback function. |
1167 |
// repeating this call on a second callback function. |
| 1116 |
|
1168 |
|
|
|
1169 |
#if ENABLE(LLINT_C_LOOP) |
| 1117 |
TopCallFrameSetter topCallFrame(vm, closure.newCallFrame); |
1170 |
TopCallFrameSetter topCallFrame(vm, closure.newCallFrame); |
|
|
1171 |
#endif |
| 1118 |
|
1172 |
|
| 1119 |
// Execute the code: |
1173 |
// Execute the code: |
| 1120 |
JSValue result; |
1174 |
JSValue result; |
|
Lines 1125-1145
JSValue Interpreter::execute(CallFrameCl
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec14
|
| 1125 |
#if ENABLE(LLINT_C_LOOP) |
1179 |
#if ENABLE(LLINT_C_LOOP) |
| 1126 |
result = LLInt::CLoop::execute(closure.newCallFrame, llint_function_for_call_prologue); |
1180 |
result = LLInt::CLoop::execute(closure.newCallFrame, llint_function_for_call_prologue); |
| 1127 |
#elif ENABLE(JIT) |
1181 |
#elif ENABLE(JIT) |
| 1128 |
result = closure.functionExecutable->generatedJITCodeForCall()->execute(&m_stack, closure.newCallFrame, &vm); |
1182 |
result = closure.functionExecutable->generatedJITCodeForCall()->execute(&vm, closure.newCallFrame, m_stack.getTopOfStack()); |
| 1129 |
#endif // ENABLE(JIT) |
1183 |
#endif // ENABLE(JIT) |
| 1130 |
} |
1184 |
} |
| 1131 |
|
1185 |
|
| 1132 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1186 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1133 |
profiler->didExecute(closure.oldCallFrame, closure.function); |
1187 |
profiler->didExecute(closure.oldCallFrame, closure.function); |
| 1134 |
|
1188 |
|
|
|
1189 |
#if ENABLE(LLINT_C_LOOP) |
| 1135 |
m_stack.validateFence(closure.newCallFrame, "AFTER"); |
1190 |
m_stack.validateFence(closure.newCallFrame, "AFTER"); |
|
|
1191 |
#endif |
| 1136 |
return checkedReturn(result); |
1192 |
return checkedReturn(result); |
| 1137 |
} |
1193 |
} |
| 1138 |
|
1194 |
|
|
|
1195 |
#if ENABLE(LLINT_C_LOOP) |
| 1139 |
void Interpreter::endRepeatCall(CallFrameClosure& closure) |
1196 |
void Interpreter::endRepeatCall(CallFrameClosure& closure) |
| 1140 |
{ |
1197 |
{ |
| 1141 |
m_stack.popFrame(closure.newCallFrame); |
1198 |
m_stack.popFrame(closure.newCallFrame); |
| 1142 |
} |
1199 |
} |
|
|
1200 |
#endif |
| 1143 |
|
1201 |
|
| 1144 |
JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue thisValue, JSScope* scope) |
1202 |
JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue thisValue, JSScope* scope) |
| 1145 |
{ |
1203 |
{ |
|
Lines 1203-1214
JSValue Interpreter::execute(EvalExecuta
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec15
|
| 1203 |
|
1261 |
|
| 1204 |
// Push the frame: |
1262 |
// Push the frame: |
| 1205 |
ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. |
1263 |
ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. |
|
|
1264 |
#if ENABLE(LLINT_C_LOOP) |
| 1206 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); |
1265 |
CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); |
| 1207 |
if (UNLIKELY(!newCallFrame)) |
1266 |
if (UNLIKELY(!newCallFrame)) |
| 1208 |
return checkedReturn(throwStackOverflowError(callFrame)); |
1267 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 1209 |
|
1268 |
|
| 1210 |
// Set the arguments for the callee: |
1269 |
// Set the arguments for the callee: |
| 1211 |
newCallFrame->setThisValue(thisValue); |
1270 |
newCallFrame->setThisValue(thisValue); |
|
|
1271 |
#else |
| 1272 |
if (UNLIKELY(!m_stack.entryCheck(codeBlock, 1))) |
| 1273 |
return checkedReturn(throwStackOverflowError(callFrame)); |
| 1274 |
|
| 1275 |
ProtoCallFrame protoCallFrame; |
| 1276 |
protoCallFrame.init(codeBlock, scope, 0, thisValue, 1); |
| 1277 |
#endif |
| 1212 |
|
1278 |
|
| 1213 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1279 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1214 |
profiler->willExecute(callFrame, eval->sourceURL(), eval->lineNo()); |
1280 |
profiler->willExecute(callFrame, eval->sourceURL(), eval->lineNo()); |
|
Lines 1222-1235
JSValue Interpreter::execute(EvalExecuta
Source/JavaScriptCore/interpreter/Interpreter.cpp_sec16
|
| 1222 |
#if ENABLE(LLINT_C_LOOP) |
1288 |
#if ENABLE(LLINT_C_LOOP) |
| 1223 |
result = LLInt::CLoop::execute(newCallFrame, llint_eval_prologue); |
1289 |
result = LLInt::CLoop::execute(newCallFrame, llint_eval_prologue); |
| 1224 |
#elif ENABLE(JIT) |
1290 |
#elif ENABLE(JIT) |
| 1225 |
result = eval->generatedJITCode()->execute(&m_stack, newCallFrame, &vm); |
1291 |
result = eval->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); |
| 1226 |
#endif // ENABLE(JIT) |
1292 |
#endif // ENABLE(JIT) |
| 1227 |
} |
1293 |
} |
| 1228 |
|
1294 |
|
| 1229 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
1295 |
if (LegacyProfiler* profiler = vm.enabledProfiler()) |
| 1230 |
profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo()); |
1296 |
profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo()); |
| 1231 |
|
1297 |
|
|
|
1298 |
#if ENABLE(LLINT_C_LOOP) |
| 1232 |
m_stack.popFrame(newCallFrame); |
1299 |
m_stack.popFrame(newCallFrame); |
|
|
1300 |
#endif |
| 1233 |
return checkedReturn(result); |
1301 |
return checkedReturn(result); |
| 1234 |
} |
1302 |
} |
| 1235 |
|
1303 |
|