Changeset 160186 in webkit
- Timestamp:
- Dec 5, 2013 12:33:35 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r160175 r160186 1 2013-12-05 Mark Lam <mark.lam@apple.com> 2 3 Make the C Loop LLINT work with callToJavaScript. 4 https://bugs.webkit.org/show_bug.cgi?id=125294. 5 6 Reviewed by Michael Saboff. 7 8 1. Changed the C Loop LLINT to dispatch to an Executable via its JITCode 9 instance which is consistent with how the ASM LLINT works. 10 2. Changed CLoop::execute() to take an Opcode instead of an OpcodeID. 11 This makes it play nice with the use of JITCode for dispatching. 12 3. Introduce a callToJavaScript and callToNativeFunction for the C Loop 13 LLINT. These will call JSStack::pushFrame() and popFrame() to setup 14 and teardown the CallFrame. 15 4. Also introduced a C Loop returnFromJavaScript which is just a 16 replacement for ctiOpThrowNotCaught which had the same function. 17 5. Remove a lot of #if ENABLE(LLINT_C_LOOP) code now that the dispatch 18 mechanism is consistent. 19 20 This patch has been tested with both configurations of COMPUTED_GOTOs 21 on and off. 22 23 * interpreter/CachedCall.h: 24 (JSC::CachedCall::CachedCall): 25 (JSC::CachedCall::call): 26 (JSC::CachedCall::setArgument): 27 * interpreter/CallFrameClosure.h: 28 (JSC::CallFrameClosure::setThis): 29 (JSC::CallFrameClosure::setArgument): 30 (JSC::CallFrameClosure::resetCallFrame): 31 * interpreter/Interpreter.cpp: 32 (JSC::Interpreter::execute): 33 (JSC::Interpreter::executeCall): 34 (JSC::Interpreter::executeConstruct): 35 (JSC::Interpreter::prepareForRepeatCall): 36 * interpreter/Interpreter.h: 37 * interpreter/JSStack.h: 38 * interpreter/JSStackInlines.h: 39 (JSC::JSStack::pushFrame): 40 * interpreter/ProtoCallFrame.h: 41 (JSC::ProtoCallFrame::scope): 42 (JSC::ProtoCallFrame::callee): 43 (JSC::ProtoCallFrame::thisValue): 44 (JSC::ProtoCallFrame::argument): 45 (JSC::ProtoCallFrame::setArgument): 46 * jit/JITCode.cpp: 47 (JSC::JITCode::execute): 48 * jit/JITCode.h: 49 * jit/JITExceptions.cpp: 50 (JSC::genericUnwind): 51 * llint/LLIntCLoop.cpp: 52 (JSC::LLInt::CLoop::initialize): 53 * llint/LLIntCLoop.h: 54 * llint/LLIntEntrypoint.cpp: 55 (JSC::LLInt::setFunctionEntrypoint): 56 (JSC::LLInt::setEvalEntrypoint): 57 (JSC::LLInt::setProgramEntrypoint): 58 - Inverted the check for vm.canUseJIT(). This allows the JIT case to be 59 #if'd out nicely when building the C Loop LLINT. 60 * llint/LLIntOpcode.h: 61 * llint/LLIntThunks.cpp: 62 (JSC::doCallToJavaScript): 63 (JSC::executeJS): 64 (JSC::callToJavaScript): 65 (JSC::executeNative): 66 (JSC::callToNativeFunction): 67 * llint/LLIntThunks.h: 68 * llint/LowLevelInterpreter.cpp: 69 (JSC::CLoop::execute): 70 * runtime/Executable.h: 71 (JSC::ExecutableBase::offsetOfNumParametersFor): 72 (JSC::ExecutableBase::hostCodeEntryFor): 73 (JSC::ExecutableBase::jsCodeEntryFor): 74 (JSC::ExecutableBase::jsCodeWithArityCheckEntryFor): 75 (JSC::NativeExecutable::create): 76 (JSC::NativeExecutable::finishCreation): 77 (JSC::ProgramExecutable::generatedJITCode): 78 * runtime/JSArray.cpp: 79 (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): 80 * runtime/StringPrototype.cpp: 81 (JSC::replaceUsingRegExpSearch): 82 * runtime/VM.cpp: 83 (JSC::VM::getHostFunction): 84 1 85 2013-12-05 Laszlo Vidacs <lac@inf.u-szeged.hu> 2 86 -
trunk/Source/JavaScriptCore/interpreter/CachedCall.h
r160094 r160186 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 46 46 ASSERT(!function->isHostFunction()); 47 47 if (callFrame->vm().isSafeToRecurse()) { 48 #if !ENABLE(LLINT_C_LOOP)49 48 m_arguments.resize(argumentCount); 50 49 m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, &m_protoCallFrame, function, argumentCount + 1, function->scope(), m_arguments.data()); 51 #else52 m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argumentCount + 1, function->scope());53 #endif54 50 } else 55 51 throwStackOverflowError(callFrame); … … 62 58 return m_interpreter->execute(m_closure); 63 59 } 64 #if !ENABLE(LLINT_C_LOOP)65 60 void setThis(JSValue v) { m_protoCallFrame.setThisValue(v); } 66 61 void setArgument(int n, JSValue v) { m_protoCallFrame.setArgument(n, v); } 67 #else68 void setThis(JSValue v) { m_closure.setThis(v); }69 void setArgument(int n, JSValue v) { m_closure.setArgument(n, v); }70 71 CallFrame* newCallFrame(ExecState* exec)72 {73 CallFrame* callFrame = m_closure.newCallFrame;74 callFrame->setScope(exec->scope());75 return callFrame;76 }77 78 ~CachedCall()79 {80 if (m_valid)81 m_interpreter->endRepeatCall(m_closure);82 }83 #endif84 62 85 63 private: … … 87 65 Interpreter* m_interpreter; 88 66 VMEntryScope m_entryScope; 89 #if !ENABLE(LLINT_C_LOOP)90 67 ProtoCallFrame m_protoCallFrame; 91 68 Vector<JSValue> m_arguments; 92 #endif93 69 CallFrameClosure m_closure; 94 70 }; -
trunk/Source/JavaScriptCore/interpreter/CallFrameClosure.h
r160094 r160186 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved.2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 struct CallFrameClosure { 34 34 CallFrame* oldCallFrame; 35 #if ENABLE(LLINT_C_LOOP) 36 CallFrame* newCallFrame; 37 #else 38 ProtoCallFrame* newCallFrame; 39 #endif 35 ProtoCallFrame* protoCallFrame; 40 36 JSFunction* function; 41 37 FunctionExecutable* functionExecutable; … … 47 43 void setThis(JSValue value) 48 44 { 49 newCallFrame->setThisValue(value);45 protoCallFrame->setThisValue(value); 50 46 } 51 47 52 48 void setArgument(int argument, JSValue value) 53 49 { 54 newCallFrame->setArgument(argument, value);50 protoCallFrame->setArgument(argument, value); 55 51 } 56 52 57 53 void resetCallFrame() 58 54 { 59 newCallFrame->setScope(scope); 60 #if ENABLE(LLINT_C_LOOP) 61 // setArgument() takes an arg index that starts from 0 for the first 62 // argument after the 'this' value. Since both argumentCountIncludingThis 63 // and parameterCountIncludingThis includes the 'this' value, we need to 64 // subtract 1 from them to make it a valid argument index for setArgument(). 65 for (int i = argumentCountIncludingThis-1; i < parameterCountIncludingThis-1; ++i) 66 newCallFrame->setArgument(i, jsUndefined()); 67 #endif 55 protoCallFrame->setScope(scope); 68 56 } 69 57 }; -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r160094 r160186 861 861 return throwTerminatedExecutionException(callFrame); 862 862 863 // Push the call frame for this invocation:864 863 ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. 865 #if ENABLE(LLINT_C_LOOP) 866 CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); 867 if (UNLIKELY(!newCallFrame)) 868 return checkedReturn(throwStackOverflowError(callFrame)); 869 870 // Set the arguments for the callee: 871 newCallFrame->setThisValue(thisObj); 872 #else 864 873 865 if (UNLIKELY(!m_stack.entryCheck(codeBlock, 1))) 874 866 return checkedReturn(throwStackOverflowError(callFrame)); … … 876 868 ProtoCallFrame protoCallFrame; 877 869 protoCallFrame.init(codeBlock, scope, 0, thisObj, 1); 878 #endif879 870 880 871 if (LegacyProfiler* profiler = vm.enabledProfiler()) … … 887 878 Watchdog::Scope watchdogScope(vm.watchdog); 888 879 889 #if ENABLE(LLINT_C_LOOP)890 result = LLInt::CLoop::execute(newCallFrame, llint_program_prologue);891 #elif ENABLE(JIT)892 880 result = program->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); 893 #endif // ENABLE(JIT)894 881 } 895 882 896 883 if (LegacyProfiler* profiler = vm.enabledProfiler()) 897 884 profiler->didExecute(callFrame, program->sourceURL(), program->lineNo()); 898 899 #if ENABLE(LLINT_C_LOOP)900 m_stack.popFrame(newCallFrame);901 #endif902 885 903 886 return checkedReturn(result); … … 943 926 return throwTerminatedExecutionException(callFrame); 944 927 945 #if ENABLE(LLINT_C_LOOP)946 CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function);947 if (UNLIKELY(!newCallFrame))948 return checkedReturn(throwStackOverflowError(callFrame));949 950 // Set the arguments for the callee:951 newCallFrame->setThisValue(thisValue);952 for (size_t i = 0; i < args.size(); ++i)953 newCallFrame->setArgument(i, args.at(i));954 #else955 928 if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) 956 929 return checkedReturn(throwStackOverflowError(callFrame)); … … 958 931 ProtoCallFrame protoCallFrame; 959 932 protoCallFrame.init(newCodeBlock, scope, function, thisValue, argsCount, args.data()); 960 #endif961 933 962 934 if (LegacyProfiler* profiler = vm.enabledProfiler()) … … 969 941 970 942 // Execute the code: 971 if (isJSCall) { 972 #if ENABLE(LLINT_C_LOOP) 973 result = LLInt::CLoop::execute(newCallFrame, llint_function_for_call_prologue); 974 #elif ENABLE(JIT) 943 if (isJSCall) 975 944 result = callData.js.functionExecutable->generatedJITCodeForCall()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); 976 #endif // ENABLE(JIT) 977 } else { 978 #if ENABLE(LLINT_C_LOOP) 979 result = JSValue::decode(callData.native.function(newCallFrame)); 980 #else 945 else 981 946 result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(callData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack())); 982 #endif983 }984 947 } 985 948 … … 987 950 profiler->didExecute(callFrame, function); 988 951 989 #if ENABLE(LLINT_C_LOOP)990 m_stack.popFrame(newCallFrame);991 #endif992 952 return checkedReturn(result); 993 953 } … … 1033 993 if (UNLIKELY(vm.watchdog.didFire(callFrame))) 1034 994 return throwTerminatedExecutionException(callFrame); 1035 #if ENABLE(LLINT_C_LOOP) 1036 CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, constructor); 1037 if (UNLIKELY(!newCallFrame)) 1038 return checkedReturn(throwStackOverflowError(callFrame)); 1039 1040 // Set the arguments for the callee: 1041 newCallFrame->setThisValue(jsUndefined()); 1042 for (size_t i = 0; i < args.size(); ++i) 1043 newCallFrame->setArgument(i, args.at(i)); 1044 #else 995 1045 996 if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) 1046 997 return checkedReturn(throwStackOverflowError(callFrame)); … … 1048 999 ProtoCallFrame protoCallFrame; 1049 1000 protoCallFrame.init(newCodeBlock, scope, constructor, jsUndefined(), argsCount, args.data()); 1050 #endif1051 1001 1052 1002 if (LegacyProfiler* profiler = vm.enabledProfiler()) … … 1059 1009 1060 1010 // Execute the code. 1061 if (isJSConstruct) { 1062 #if ENABLE(LLINT_C_LOOP) 1063 result = LLInt::CLoop::execute(newCallFrame, llint_function_for_construct_prologue); 1064 #elif ENABLE(JIT) 1011 if (isJSConstruct) 1065 1012 result = constructData.js.functionExecutable->generatedJITCodeForConstruct()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); 1066 #endif // ENABLE(JIT) 1067 } else { 1068 #if ENABLE(LLINT_C_LOOP) 1069 result = JSValue::decode(constructData.native.function(newCallFrame)); 1070 #else 1013 else { 1071 1014 result = JSValue::decode(callToNativeFunction(reinterpret_cast<void*>(constructData.native.function), &vm.topCallFrame, &protoCallFrame, m_stack.getTopOfStack())); 1072 #endif 1015 1073 1016 if (!callFrame->hadException()) 1074 1017 RELEASE_ASSERT(result.isObject()); … … 1078 1021 if (LegacyProfiler* profiler = vm.enabledProfiler()) 1079 1022 profiler->didExecute(callFrame, constructor); 1080 1081 #if ENABLE(LLINT_C_LOOP)1082 m_stack.popFrame(newCallFrame);1083 #endif1084 1023 1085 1024 if (callFrame->hadException()) … … 1089 1028 } 1090 1029 1091 #if ENABLE(LLINT_C_LOOP)1092 CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionExecutable, CallFrame* callFrame, JSFunction* function, int argumentCountIncludingThis, JSScope* scope)1093 #else1094 1030 CallFrameClosure Interpreter::prepareForRepeatCall(FunctionExecutable* functionExecutable, CallFrame* callFrame, ProtoCallFrame* protoCallFrame, JSFunction* function, int argumentCountIncludingThis, JSScope* scope, JSValue* args) 1095 #endif1096 1031 { 1097 1032 VM& vm = *scope->vm(); … … 1112 1047 size_t argsCount = argumentCountIncludingThis; 1113 1048 1114 #if ENABLE(LLINT_C_LOOP)1115 CallFrame* newCallFrame = m_stack.pushFrame(callFrame, newCodeBlock, scope, argsCount, function);1116 1117 if (UNLIKELY(!newCallFrame)) {1118 throwStackOverflowError(callFrame);1119 return CallFrameClosure();1120 }1121 1122 // Return the successful closure:1123 CallFrameClosure result = { callFrame, newCallFrame, function, functionExecutable, &vm, scope, newCodeBlock->numParameters(), argumentCountIncludingThis };1124 #else1125 1049 if (UNLIKELY(!m_stack.entryCheck(newCodeBlock, argsCount))) { 1126 1050 throwStackOverflowError(callFrame); … … 1131 1055 // Return the successful closure: 1132 1056 CallFrameClosure result = { callFrame, protoCallFrame, function, functionExecutable, &vm, scope, newCodeBlock->numParameters(), argumentCountIncludingThis }; 1133 #endif1134 1057 return result; 1135 1058 } … … 1145 1068 1146 1069 StackStats::CheckPoint stackCheckPoint; 1147 #if ENABLE(LLINT_C_LOOP)1148 m_stack.validateFence(closure.newCallFrame, "BEFORE");1149 #endif1150 1070 closure.resetCallFrame(); 1151 #if ENABLE(LLINT_C_LOOP)1152 m_stack.validateFence(closure.newCallFrame, "STEP 1");1153 #endif1154 1071 1155 1072 if (LegacyProfiler* profiler = vm.enabledProfiler()) … … 1159 1076 return throwTerminatedExecutionException(closure.oldCallFrame); 1160 1077 1161 // The code execution below may push more frames and point the topCallFrame1162 // to those newer frames, or it may pop to the top frame to the caller of1163 // the current repeat frame, or it may leave the top frame pointing to the1164 // current repeat frame.1165 //1166 // Hence, we need to preserve the topCallFrame here ourselves before1167 // repeating this call on a second callback function.1168 1169 #if ENABLE(LLINT_C_LOOP)1170 TopCallFrameSetter topCallFrame(vm, closure.newCallFrame);1171 #endif1172 1173 1078 // Execute the code: 1174 1079 JSValue result; … … 1177 1082 Watchdog::Scope watchdogScope(vm.watchdog); 1178 1083 1179 #if ENABLE(LLINT_C_LOOP) 1180 result = LLInt::CLoop::execute(closure.newCallFrame, llint_function_for_call_prologue); 1181 #elif ENABLE(JIT) 1182 result = closure.functionExecutable->generatedJITCodeForCall()->execute(&vm, closure.newCallFrame, m_stack.getTopOfStack()); 1183 #endif // ENABLE(JIT) 1084 result = closure.functionExecutable->generatedJITCodeForCall()->execute(&vm, closure.protoCallFrame, m_stack.getTopOfStack()); 1184 1085 } 1185 1086 … … 1187 1088 profiler->didExecute(closure.oldCallFrame, closure.function); 1188 1089 1189 #if ENABLE(LLINT_C_LOOP)1190 m_stack.validateFence(closure.newCallFrame, "AFTER");1191 #endif1192 1090 return checkedReturn(result); 1193 1091 } 1194 1195 #if ENABLE(LLINT_C_LOOP)1196 void Interpreter::endRepeatCall(CallFrameClosure& closure)1197 {1198 m_stack.popFrame(closure.newCallFrame);1199 }1200 #endif1201 1092 1202 1093 JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue thisValue, JSScope* scope) … … 1260 1151 return throwTerminatedExecutionException(callFrame); 1261 1152 1262 // Push the frame:1263 1153 ASSERT(codeBlock->numParameters() == 1); // 1 parameter for 'this'. 1264 #if ENABLE(LLINT_C_LOOP) 1265 CallFrame* newCallFrame = m_stack.pushFrame(callFrame, codeBlock, scope, 1, 0); 1266 if (UNLIKELY(!newCallFrame)) 1267 return checkedReturn(throwStackOverflowError(callFrame)); 1268 1269 // Set the arguments for the callee: 1270 newCallFrame->setThisValue(thisValue); 1271 #else 1154 1272 1155 if (UNLIKELY(!m_stack.entryCheck(codeBlock, 1))) 1273 1156 return checkedReturn(throwStackOverflowError(callFrame)); … … 1275 1158 ProtoCallFrame protoCallFrame; 1276 1159 protoCallFrame.init(codeBlock, scope, 0, thisValue, 1); 1277 #endif1278 1160 1279 1161 if (LegacyProfiler* profiler = vm.enabledProfiler()) … … 1286 1168 Watchdog::Scope watchdogScope(vm.watchdog); 1287 1169 1288 #if ENABLE(LLINT_C_LOOP)1289 result = LLInt::CLoop::execute(newCallFrame, llint_eval_prologue);1290 #elif ENABLE(JIT)1291 1170 result = eval->generatedJITCode()->execute(&vm, &protoCallFrame, m_stack.getTopOfStack()); 1292 #endif // ENABLE(JIT)1293 1171 } 1294 1172 … … 1296 1174 profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo()); 1297 1175 1298 #if ENABLE(LLINT_C_LOOP)1299 m_stack.popFrame(newCallFrame);1300 #endif1301 1176 return checkedReturn(result); 1302 1177 } -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r160094 r160186 258 258 enum ExecutionFlag { Normal, InitializeAndReturn }; 259 259 260 #if !ENABLE(LLINT_C_LOOP)261 260 CallFrameClosure prepareForRepeatCall(FunctionExecutable*, CallFrame*, ProtoCallFrame*, JSFunction*, int argumentCountIncludingThis, JSScope*, JSValue*); 262 #else 263 CallFrameClosure prepareForRepeatCall(FunctionExecutable*, CallFrame*, JSFunction*, int argumentCountIncludingThis, JSScope*); 264 void endRepeatCall(CallFrameClosure&); 265 #endif 261 266 262 JSValue execute(CallFrameClosure&); 267 263 -
trunk/Source/JavaScriptCore/interpreter/JSStack.h
r160094 r160186 103 103 bool entryCheck(class CodeBlock*, int); 104 104 105 CallFrame* pushFrame(CallFrame* callerFrame, class CodeBlock*, 106 JSScope*, int argsCount, JSObject* callee); 105 CallFrame* pushFrame(class CodeBlock*, JSScope*, int argsCount, JSObject* callee); 107 106 108 107 void popFrame(CallFrame*); -
trunk/Source/JavaScriptCore/interpreter/JSStackInlines.h
r160094 r160186 81 81 } 82 82 83 inline CallFrame* JSStack::pushFrame(CallFrame* callerFrame, 84 class CodeBlock* codeBlock, JSScope* scope, int argsCount, JSObject* callee) 83 inline CallFrame* JSStack::pushFrame(class CodeBlock* codeBlock, JSScope* scope, int argsCount, JSObject* callee) 85 84 { 86 85 ASSERT(!!scope); … … 120 119 // and not a potential GlobalExec that was passed in. Point callerFrame to 121 120 // the top frame on the stack. 122 callerFrame = m_topCallFrame;121 CallFrame* callerFrame = m_topCallFrame; 123 122 124 123 // Initialize the VM sentinel frame header: -
trunk/Source/JavaScriptCore/interpreter/ProtoCallFrame.h
r160094 r160186 41 41 42 42 void init(CodeBlock*, JSScope*, JSObject*, JSValue, int, JSValue* otherArgs = 0); 43 43 44 CodeBlock* codeBlock() const { return codeBlockValue.Register::codeBlock(); } 44 45 void setCodeBlock(CodeBlock* codeBlock) { codeBlockValue = codeBlock; } 46 47 JSScope* scope() const { return scopeChainValue.Register::scope(); } 45 48 void setScope(JSScope* scope) { scopeChainValue = scope; } 49 50 JSObject* callee() const { return calleeValue.Register::function(); } 46 51 void setCallee(JSObject* callee) { calleeValue = Register::withCallee(callee); } 52 47 53 int argumentCountIncludingThis() const { return argCountAndCodeOriginValue.payload(); } 48 54 int argumentCount() const { return argumentCountIncludingThis() - 1; } … … 51 57 52 58 void clearCurrentVPC() { argCountAndCodeOriginValue.tag() = 0; } 59 60 JSValue thisValue() const { return thisArg.Register::jsValue(); } 53 61 void setThisValue(JSValue value) { thisArg = value; } 54 void setArgument(size_t argument, JSValue value) 62 63 JSValue argument(size_t argumentIndex) 55 64 { 56 ASSERT(static_cast<int>(argument) < argumentCount()); 57 args[argument] = value; 65 ASSERT(static_cast<int>(argumentIndex) < argumentCount()); 66 return args[argumentIndex]; 67 } 68 void setArgument(size_t argumentIndex, JSValue value) 69 { 70 ASSERT(static_cast<int>(argumentIndex) < argumentCount()); 71 args[argumentIndex] = value; 58 72 } 59 73 }; -
trunk/Source/JavaScriptCore/jit/JITCode.cpp
r160094 r160186 42 42 } 43 43 44 #if ENABLE(JIT)45 44 JSValue JITCode::execute(VM* vm, ProtoCallFrame* protoCallFrame, Register* topOfStack) 46 45 { … … 50 49 return vm->exception() ? jsNull() : result; 51 50 } 52 #endif53 51 54 52 DFG::CommonData* JITCode::dfgCommon() -
trunk/Source/JavaScriptCore/jit/JITCode.h
r160175 r160186 48 48 49 49 struct ProtoCallFrame; 50 51 #if ENABLE(JIT)52 50 class VM; 53 class JSStack;54 #endif55 51 56 52 class JITCode : public ThreadSafeRefCounted<JITCode> { -
trunk/Source/JavaScriptCore/jit/JITExceptions.cpp
r159321 r160186 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 40 40 #include "VM.h" 41 41 42 #if ENABLE(JIT) || ENABLE(LLINT)43 44 42 namespace JSC { 45 43 … … 53 51 if (handler) { 54 52 catchPCForInterpreter = &callFrame->codeBlock()->instructions()[handler->target]; 55 catchRoutine = ExecutableBase::catchRoutineFor(handler, catchPCForInterpreter); 56 } else { 57 #if ENABLE(LLINT_C_LOOP) 58 catchRoutine = LLInt::getCodePtr(ctiOpThrowNotCaught); 53 #if ENABLE(JIT) 54 catchRoutine = handler->nativeCode.executableAddress(); 59 55 #else 60 catchRoutine = FunctionPtr(LLInt::getCodePtr(returnFromJavaScript)).value();56 catchRoutine = catchPCForInterpreter->u.pointer; 61 57 #endif 62 } 58 } else 59 catchRoutine = LLInt::getCodePtr(returnFromJavaScript); 63 60 64 61 vm->callFrameForThrow = callFrame; … … 69 66 } 70 67 71 } 72 73 #endif 68 } // namespace JSC -
trunk/Source/JavaScriptCore/llint/LLIntCLoop.cpp
r127374 r160186 1 1 /* 2 * Copyright (C) 201 1, 2012Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "LLIntCLoop.h" 28 28 29 #include "Instruction.h" 29 #if ENABLE(LLINT_C_LOOP) 30 31 #include "LLIntData.h" 30 32 31 33 namespace JSC { 32 33 34 namespace LLInt { 34 35 #if ENABLE(LLINT_C_LOOP)36 35 37 36 void CLoop::initialize() 38 37 { 39 execute(0, llint_unused, true);38 execute(0, getOpcode(llint_unused), true); 40 39 } 41 40 42 void* CLoop::catchRoutineFor(Instruction* catchPCForInterpreter) 43 { 44 return reinterpret_cast<Instruction*>(catchPCForInterpreter->u.opcode); 45 } 46 47 MacroAssemblerCodePtr CLoop::hostCodeEntryFor(CodeSpecializationKind kind) 48 { 49 MacroAssemblerCodePtr codePtr; 50 codePtr = (kind == CodeForCall) ? 51 MacroAssemblerCodePtr::createLLIntCodePtr(llint_native_call_trampoline) : 52 MacroAssemblerCodePtr::createLLIntCodePtr(llint_native_construct_trampoline); 53 return codePtr; 54 } 55 56 MacroAssemblerCodePtr CLoop::jsCodeEntryWithArityCheckFor(CodeSpecializationKind kind) 57 { 58 MacroAssemblerCodePtr codePtr; 59 codePtr = (kind == CodeForCall) ? 60 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check) : 61 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_arity_check); 62 return codePtr; 63 } 64 65 MacroAssemblerCodePtr CLoop::jsCodeEntryFor(CodeSpecializationKind kind) 66 { 67 MacroAssemblerCodePtr codePtr; 68 codePtr = (kind == CodeForCall) ? 69 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_prologue) : 70 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_prologue); 71 return codePtr; 72 } 41 } // namespace LLInt 42 } // namespace JSC 73 43 74 44 #endif // ENABLE(LLINT_C_LOOP) 75 76 } } // namespace JSC::LLInt -
trunk/Source/JavaScriptCore/llint/LLIntCLoop.h
r140718 r160186 1 1 /* 2 * Copyright (C) 201 1, 2012Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 #if ENABLE(LLINT_C_LOOP) 30 30 31 #include "C odeSpecializationKind.h"31 #include "CallFrame.h" 32 32 #include "JSCJSValue.h" 33 #include "MacroAssemblerCodeRef.h"34 33 #include "Opcode.h" 35 #include "Register.h"36 34 37 35 namespace JSC { 38 39 36 namespace LLInt { 40 37 … … 44 41 public: 45 42 static void initialize(); 46 static JSValue execute(CallFrame*, OpcodeID bootstrapOpcodeId, bool isInitializationPass = false); 47 48 static void* catchRoutineFor(Instruction* catchPCForInterpreter); 49 50 static MacroAssemblerCodePtr hostCodeEntryFor(CodeSpecializationKind); 51 static MacroAssemblerCodePtr jsCodeEntryWithArityCheckFor(CodeSpecializationKind); 52 static MacroAssemblerCodePtr jsCodeEntryFor(CodeSpecializationKind); 43 static JSValue execute(CallFrame*, Opcode entryOpcode, bool isInitializationPass = false); 53 44 }; 54 45 55 46 } } // namespace JSC::LLInt 56 47 48 using JSC::LLInt::CLoop; 49 57 50 #endif // ENABLE(LLINT_C_LOOP) 58 51 -
trunk/Source/JavaScriptCore/llint/LLIntEntrypoint.cpp
r159721 r160186 36 36 #include "VM.h" 37 37 38 39 38 namespace JSC { namespace LLInt { 40 39 … … 43 42 CodeSpecializationKind kind = codeBlock->specializationKind(); 44 43 45 if (!vm.canUseJIT()) { 44 #if ENABLE(JIT) 45 if (vm.canUseJIT()) { 46 46 if (kind == CodeForCall) { 47 47 codeBlock->setJITCode( 48 adoptRef(new DirectJITCode( MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_call_prologue), JITCode::InterpreterThunk)),49 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check));48 adoptRef(new DirectJITCode(vm.getCTIStub(functionForCallEntryThunkGenerator), JITCode::InterpreterThunk)), 49 vm.getCTIStub(functionForCallArityCheckThunkGenerator).code()); 50 50 return; 51 51 } 52 53 52 ASSERT(kind == CodeForConstruct); 54 53 codeBlock->setJITCode( 55 adoptRef(new DirectJITCode( MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_construct_prologue), JITCode::InterpreterThunk)),56 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_arity_check));54 adoptRef(new DirectJITCode(vm.getCTIStub(functionForConstructEntryThunkGenerator), JITCode::InterpreterThunk)), 55 vm.getCTIStub(functionForConstructArityCheckThunkGenerator).code()); 57 56 return; 58 57 } 59 60 #if ENABLE(JIT) 58 #endif // ENABLE(JIT) 59 60 UNUSED_PARAM(vm); 61 61 if (kind == CodeForCall) { 62 62 codeBlock->setJITCode( 63 adoptRef(new DirectJITCode( vm.getCTIStub(functionForCallEntryThunkGenerator), JITCode::InterpreterThunk)),64 vm.getCTIStub(functionForCallArityCheckThunkGenerator).code());63 adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_call_prologue), JITCode::InterpreterThunk)), 64 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_call_arity_check)); 65 65 return; 66 66 } 67 68 67 ASSERT(kind == CodeForConstruct); 69 68 codeBlock->setJITCode( 70 adoptRef(new DirectJITCode(vm.getCTIStub(functionForConstructEntryThunkGenerator), JITCode::InterpreterThunk)), 71 vm.getCTIStub(functionForConstructArityCheckThunkGenerator).code()); 72 #endif // ENABLE(JIT) 69 adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_function_for_construct_prologue), JITCode::InterpreterThunk)), 70 MacroAssemblerCodePtr::createLLIntCodePtr(llint_function_for_construct_arity_check)); 73 71 } 74 72 75 73 static void setEvalEntrypoint(VM& vm, CodeBlock* codeBlock) 76 74 { 77 if (!vm.canUseJIT()) { 75 #if ENABLE(JIT) 76 if (vm.canUseJIT()) { 78 77 codeBlock->setJITCode( 79 adoptRef(new DirectJITCode( MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue), JITCode::InterpreterThunk)),78 adoptRef(new DirectJITCode(vm.getCTIStub(evalEntryThunkGenerator), JITCode::InterpreterThunk)), 80 79 MacroAssemblerCodePtr()); 81 80 return; 82 81 } 83 #if ENABLE(JIT) 82 #endif // ENABLE(JIT) 83 84 UNUSED_PARAM(vm); 84 85 codeBlock->setJITCode( 85 adoptRef(new DirectJITCode( vm.getCTIStub(evalEntryThunkGenerator), JITCode::InterpreterThunk)),86 adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_eval_prologue), JITCode::InterpreterThunk)), 86 87 MacroAssemblerCodePtr()); 87 #endif88 88 } 89 89 90 90 static void setProgramEntrypoint(VM& vm, CodeBlock* codeBlock) 91 91 { 92 if (!vm.canUseJIT()) { 92 #if ENABLE(JIT) 93 if (vm.canUseJIT()) { 93 94 codeBlock->setJITCode( 94 adoptRef(new DirectJITCode( MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue), JITCode::InterpreterThunk)),95 adoptRef(new DirectJITCode(vm.getCTIStub(programEntryThunkGenerator), JITCode::InterpreterThunk)), 95 96 MacroAssemblerCodePtr()); 96 97 return; 97 98 } 98 #if ENABLE(JIT) 99 #endif // ENABLE(JIT) 100 101 UNUSED_PARAM(vm); 99 102 codeBlock->setJITCode( 100 adoptRef(new DirectJITCode( vm.getCTIStub(programEntryThunkGenerator), JITCode::InterpreterThunk)),103 adoptRef(new DirectJITCode(MacroAssemblerCodeRef::createLLIntCodeRef(llint_program_prologue), JITCode::InterpreterThunk)), 101 104 MacroAssemblerCodePtr()); 102 #endif103 105 } 104 106 -
trunk/Source/JavaScriptCore/llint/LLIntOpcode.h
r127374 r160186 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 35 35 #define FOR_EACH_LLINT_NOJIT_NATIVE_HELPER(macro) \ 36 36 macro(getHostCallReturnValue, 1) \ 37 macro( ctiOpThrowNotCaught, 1)37 macro(returnFromJavaScript, 1) 38 38 39 39 #else // !ENABLE(LLINT_C_LOOP) -
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r160003 r160186 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #include "LLIntThunks.h" 28 28 29 #if ENABLE(LLINT) && ENABLE(JIT) 30 29 #include "CallData.h" 30 #include "ExceptionHelpers.h" 31 #include "Interpreter.h" 31 32 #include "JSInterfaceJIT.h" 32 33 #include "JSObject.h" 34 #include "JSStackInlines.h" 35 #include "LLIntCLoop.h" 33 36 #include "LinkBuffer.h" 34 37 #include "LowLevelInterpreter.h" 38 #include "ProtoCallFrame.h" 39 #include "VM.h" 35 40 41 namespace JSC { 36 42 37 namespace JSC { namespace LLInt { 43 #if ENABLE(JIT) 44 #if ENABLE(LLINT) 45 46 namespace LLInt { 38 47 39 48 static MacroAssemblerCodeRef generateThunkWithJumpTo(VM* vm, void (*target)(), const char *thunkKind) … … 79 88 } 80 89 81 } } // namespace JSC::LLInt90 } // namespace LLInt 82 91 83 #endif // ENABLE(LLINT) && ENABLE(JIT) 92 #endif // ENABLE(LLINT) 93 #else // ENABLE(JIT) 94 95 // Non-JIT (i.e. C Loop LLINT) case: 96 97 typedef JSValue (*ExecuteCode) (CallFrame*, void* executableAddress); 98 99 template<ExecuteCode execute> 100 EncodedJSValue doCallToJavaScript(void* executableAddress, ProtoCallFrame* protoCallFrame) 101 { 102 CodeBlock* codeBlock = protoCallFrame->codeBlock(); 103 JSScope* scope = protoCallFrame->scope(); 104 JSObject* callee = protoCallFrame->callee(); 105 int argCountIncludingThis = protoCallFrame->argumentCountIncludingThis(); 106 int argCount = protoCallFrame->argumentCount(); 107 JSValue thisValue = protoCallFrame->thisValue(); 108 JSStack& stack = scope->vm()->interpreter->stack(); 109 110 CallFrame* newCallFrame = stack.pushFrame(codeBlock, scope, argCountIncludingThis, callee); 111 if (UNLIKELY(!newCallFrame)) { 112 JSGlobalObject* globalObject = scope->globalObject(); 113 ExecState* exec = globalObject->globalExec(); 114 return JSValue::encode(throwStackOverflowError(exec)); 115 } 116 117 // Set the arguments for the callee: 118 newCallFrame->setThisValue(thisValue); 119 for (int i = 0; i < argCount; ++i) 120 newCallFrame->setArgument(i, protoCallFrame->argument(i)); 121 122 JSValue result = execute(newCallFrame, executableAddress); 123 124 stack.popFrame(newCallFrame); 125 126 return JSValue::encode(result); 127 } 128 129 static inline JSValue executeJS(CallFrame* newCallFrame, void* executableAddress) 130 { 131 Opcode entryOpcode = *reinterpret_cast<Opcode*>(&executableAddress); 132 return CLoop::execute(newCallFrame, entryOpcode); 133 } 134 135 EncodedJSValue callToJavaScript(void* executableAddress, ExecState**, ProtoCallFrame* protoCallFrame, Register*) 136 { 137 return doCallToJavaScript<executeJS>(executableAddress, protoCallFrame); 138 } 139 140 static inline JSValue executeNative(CallFrame* newCallFrame, void* executableAddress) 141 { 142 NativeFunction function = reinterpret_cast<NativeFunction>(executableAddress); 143 return JSValue::decode(function(newCallFrame)); 144 } 145 146 EncodedJSValue callToNativeFunction(void* executableAddress, ExecState**, ProtoCallFrame* protoCallFrame, Register*) 147 { 148 return doCallToJavaScript<executeNative>(executableAddress, protoCallFrame); 149 } 150 151 #endif // ENABLE(JIT) 152 153 } // namespace JSC -
trunk/Source/JavaScriptCore/llint/LLIntThunks.h
r160094 r160186 1 1 /* 2 * Copyright (C) 2012 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 42 42 extern "C" { 43 43 EncodedJSValue callToJavaScript(void*, ExecState**, ProtoCallFrame*, Register*); 44 EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*, Register*); 45 #if ENABLE(JIT) 44 46 void returnFromJavaScript(); 45 EncodedJSValue callToNativeFunction(void*, ExecState**, ProtoCallFrame*, Register*); 47 #endif 46 48 } 47 49 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
r160062 r160186 238 238 // 239 239 240 JSValue CLoop::execute(CallFrame* callFrame, OpcodeID bootstrapOpcodeId, 241 bool isInitializationPass) 240 JSValue CLoop::execute(CallFrame* callFrame, Opcode entryOpcode, bool isInitializationPass) 242 241 { 243 242 #define CAST reinterpret_cast … … 353 352 Opcode opcode; 354 353 355 opcode = LLInt::getOpcode(bootstrapOpcodeId);354 opcode = entryOpcode; 356 355 357 356 #if ENABLE(OPCODE_STATS) … … 433 432 } 434 433 435 OFFLINE_ASM_GLUE_LABEL( ctiOpThrowNotCaught)434 OFFLINE_ASM_GLUE_LABEL(returnFromJavaScript) 436 435 { 437 436 return vm->exception(); -
trunk/Source/JavaScriptCore/runtime/Executable.h
r159795 r160186 37 37 #include "JITCode.h" 38 38 #include "JSGlobalObject.h" 39 #include "LLIntCLoop.h"40 39 #include "SamplingTool.h" 41 40 #include "SourceCode.h" … … 127 126 static void clearCodeVirtual(ExecutableBase*); 128 127 129 #if ENABLE(JIT)130 128 PassRefPtr<JITCode> generatedJITCodeForCall() 131 129 { … … 185 183 return OBJECT_OFFSETOF(ExecutableBase, m_numParametersForConstruct); 186 184 } 187 #endif // ENABLE(JIT)188 185 189 186 bool hasJITCodeForCall() const … … 215 212 } 216 213 217 #if ENABLE(JIT) || ENABLE(LLINT_C_LOOP)218 214 MacroAssemblerCodePtr hostCodeEntryFor(CodeSpecializationKind kind) 219 215 { 220 #if ENABLE(JIT)221 216 return generatedJITCodeFor(kind)->addressForCall(); 222 #else223 return LLInt::CLoop::hostCodeEntryFor(kind);224 #endif225 217 } 226 218 227 219 MacroAssemblerCodePtr jsCodeEntryFor(CodeSpecializationKind kind) 228 220 { 229 #if ENABLE(JIT)230 221 return generatedJITCodeFor(kind)->addressForCall(); 231 #else232 return LLInt::CLoop::jsCodeEntryFor(kind);233 #endif234 222 } 235 223 236 224 MacroAssemblerCodePtr jsCodeWithArityCheckEntryFor(CodeSpecializationKind kind) 237 225 { 238 #if ENABLE(JIT)239 226 return generatedJITCodeWithArityCheckFor(kind); 240 #else 241 return LLInt::CLoop::jsCodeEntryWithArityCheckFor(kind); 242 #endif 243 } 244 245 static void* catchRoutineFor(HandlerInfo* handler, Instruction* catchPCForInterpreter) 246 { 247 #if ENABLE(JIT) 248 UNUSED_PARAM(catchPCForInterpreter); 249 return handler->nativeCode.executableAddress(); 250 #else 251 UNUSED_PARAM(handler); 252 return LLInt::CLoop::catchRoutineFor(catchPCForInterpreter); 253 #endif 254 } 255 256 #endif // ENABLE(JIT || ENABLE(LLINT_C_LOOP) 227 } 257 228 258 229 protected: … … 272 243 typedef ExecutableBase Base; 273 244 274 #if ENABLE(JIT)275 245 static NativeExecutable* create(VM& vm, MacroAssemblerCodeRef callThunk, NativeFunction function, MacroAssemblerCodeRef constructThunk, NativeFunction constructor, Intrinsic intrinsic) 276 246 { 277 247 NativeExecutable* executable; 278 if (!callThunk) {279 executable = new (NotNull, allocateCell<NativeExecutable>(vm.heap)) NativeExecutable(vm, function, constructor);248 executable = new (NotNull, allocateCell<NativeExecutable>(vm.heap)) NativeExecutable(vm, function, constructor); 249 if (!callThunk) 280 250 executable->finishCreation(vm, 0, 0, intrinsic); 281 } else { 282 executable = new (NotNull, allocateCell<NativeExecutable>(vm.heap)) NativeExecutable(vm, function, constructor); 251 else 283 252 executable->finishCreation(vm, JITCode::hostFunction(callThunk), JITCode::hostFunction(constructThunk), intrinsic); 284 }285 253 return executable; 286 254 } 287 #endif288 289 #if ENABLE(LLINT_C_LOOP)290 static NativeExecutable* create(VM& vm, NativeFunction function, NativeFunction constructor)291 {292 ASSERT(!vm.canUseJIT());293 NativeExecutable* executable = new (NotNull, allocateCell<NativeExecutable>(vm.heap)) NativeExecutable(vm, function, constructor);294 executable->finishCreation(vm);295 return executable;296 }297 #endif298 255 299 256 #if ENABLE(JIT) … … 329 286 330 287 protected: 331 #if ENABLE(JIT)332 288 void finishCreation(VM& vm, PassRefPtr<JITCode> callThunk, PassRefPtr<JITCode> constructThunk, Intrinsic intrinsic) 333 289 { … … 339 295 m_intrinsic = intrinsic; 340 296 } 341 #endif342 297 343 298 private: … … 471 426 static EvalExecutable* create(ExecState*, const SourceCode&, bool isInStrictContext); 472 427 473 #if ENABLE(JIT)474 428 PassRefPtr<JITCode> generatedJITCode() 475 429 { 476 430 return generatedJITCodeForCall(); 477 431 } 478 #endif 432 479 433 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) 480 434 { … … 528 482 JSObject* checkSyntax(ExecState*); 529 483 530 #if ENABLE(JIT)531 484 PassRefPtr<JITCode> generatedJITCode() 532 485 { 533 486 return generatedJITCodeForCall(); 534 487 } 535 #endif536 488 537 489 static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r160094 r160186 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2003, 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.3 * Copyright (C) 2003, 2007, 2008, 2009, 2012, 2013 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2003 Peter Kelly (pmk@post.com) 5 5 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) … … 1321 1321 m_cachedCall->setArgument(0, va); 1322 1322 m_cachedCall->setArgument(1, vb); 1323 #if ENABLE(LLINT_C_LOOP)1324 compareResult = m_cachedCall->call().toNumber(m_cachedCall->newCallFrame(m_exec));1325 #else1326 1323 compareResult = m_cachedCall->call().toNumber(m_exec); 1327 #endif1328 1324 } else { 1329 1325 MarkedArgumentBuffer arguments; -
trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp
r160094 r160186 505 505 cachedCall.setThis(jsUndefined()); 506 506 JSValue jsResult = cachedCall.call(); 507 #if ENABLE(LLINT_C_LOOP)508 replacements.append(jsResult.toString(cachedCall.newCallFrame(exec))->value(exec));509 #else510 507 replacements.append(jsResult.toString(exec)->value(exec)); 511 #endif512 508 if (exec->hadException()) 513 509 break; … … 548 544 cachedCall.setThis(jsUndefined()); 549 545 JSValue jsResult = cachedCall.call(); 550 #if ENABLE(LLINT_C_LOOP)551 replacements.append(jsResult.toString(cachedCall.newCallFrame(exec))->value(exec));552 #else553 546 replacements.append(jsResult.toString(exec)->value(exec)); 554 #endif555 547 if (exec->hadException()) 556 548 break; -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r160150 r160186 457 457 458 458 #else // !ENABLE(JIT) 459 459 460 NativeExecutable* VM::getHostFunction(NativeFunction function, NativeFunction constructor) 460 461 { 461 return NativeExecutable::create(*this, function, constructor); 462 } 462 return NativeExecutable::create(*this, 463 MacroAssemblerCodeRef::createLLIntCodeRef(llint_native_call_trampoline), function, 464 MacroAssemblerCodeRef::createLLIntCodeRef(llint_native_construct_trampoline), constructor, 465 NoIntrinsic); 466 } 467 463 468 #endif // !ENABLE(JIT) 464 469
Note: See TracChangeset
for help on using the changeset viewer.