Changeset 209312 in webkit for trunk/Source/JavaScriptCore/jsc.cpp
- Timestamp:
- Dec 4, 2016, 1:23:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jsc.cpp
r209296 r209312 54 54 #include "JSString.h" 55 55 #include "JSTypedArrays.h" 56 #include "JSWebAssemblyCallee.h" 56 57 #include "LLIntData.h" 57 58 #include "LLIntThunks.h" … … 2567 2568 } 2568 2569 2569 static JSValue callWasmFunction(VM* vm, const B3::Compilation& code, Vector<JSValue>& boxedArgs)2570 static JSValue callWasmFunction(VM* vm, JSGlobalObject* globalObject, JSWebAssemblyCallee* wasmCallee, Vector<JSValue>& boxedArgs) 2570 2571 { 2571 2572 JSValue firstArgument; … … 2580 2581 2581 2582 ProtoCallFrame protoCallFrame; 2582 protoCallFrame.init(nullptr, nullptr, firstArgument, argCount, remainingArgs);2583 2584 return JSValue::decode(vmEntryToWasm( code.code().executableAddress(), vm, &protoCallFrame));2583 protoCallFrame.init(nullptr, globalObject->globalExec()->jsCallee(), firstArgument, argCount, remainingArgs); 2584 2585 return JSValue::decode(vmEntryToWasm(wasmCallee->jsEntryPoint(), vm, &protoCallFrame)); 2585 2586 } 2586 2587 … … 2611 2612 CRASH(); 2612 2613 2614 MarkedArgumentBuffer callees; 2615 { 2616 unsigned lastIndex = UINT_MAX; 2617 plan.initializeCallees(exec->lexicalGlobalObject(), 2618 [&] (unsigned calleeIndex, JSWebAssemblyCallee* callee) { 2619 RELEASE_ASSERT(!calleeIndex || (calleeIndex - 1 == lastIndex)); 2620 callees.append(callee); 2621 lastIndex = calleeIndex; 2622 }); 2623 } 2624 2613 2625 for (uint32_t i = 0; i < functionCount; ++i) { 2614 if (!plan.compiledFunction(i))2615 dataLogLn("failed to compile function at index", i);2616 2617 2626 JSArray* testCases = jsCast<JSArray*>(exec->argument(i + 2)); 2618 2627 for (unsigned testIndex = 0; testIndex < testCases->length(); ++testIndex) { … … 2625 2634 boxedArgs.append(box(exec, vm, arguments->getIndexQuickly(argIndex))); 2626 2635 2627 JSValue callResult = callWasmFunction(&vm, *plan.compiledFunction(i)->jsEntryPoint, boxedArgs);2636 JSValue callResult = callWasmFunction(&vm, exec->lexicalGlobalObject(), jsCast<JSWebAssemblyCallee*>(callees.at(i)), boxedArgs); 2628 2637 JSValue expected = box(exec, vm, result); 2629 2638 if (callResult != expected) {
Note:
See TracChangeset
for help on using the changeset viewer.