Commit 255f4507 authored by bradnelson's avatar bradnelson Committed by Commit bot

Drop the compileRun + asmCompileRun methods from wasm.

Now that we have full fledged module instantiation,
keeping alive a second interface seems clunky.

Droping it and switching the tests.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator,asm-wasm,other wasm
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/1660083002

Cr-Commit-Position: refs/heads/master@{#33700}
parent a75b2c8f
...@@ -100,31 +100,6 @@ void VerifyFunction(const v8::FunctionCallbackInfo<v8::Value>& args) { ...@@ -100,31 +100,6 @@ void VerifyFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
} }
void CompileRun(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
ErrorThrower thrower(isolate, "WASM.compileRun()");
RawBuffer buffer = GetRawBufferArgument(thrower, args);
if (thrower.error()) return;
// Decode and pre-verify the functions before compiling and running.
i::Zone zone;
internal::wasm::ModuleResult result = internal::wasm::DecodeWasmModule(
isolate, &zone, buffer.start, buffer.end, true, false);
if (result.failed()) {
thrower.Failed("", result);
} else {
// Success. Compile and run!
int32_t retval = i::wasm::CompileAndRunWasmModule(isolate, result.val);
args.GetReturnValue().Set(retval);
}
if (result.val) delete result.val;
}
v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(i::ParseInfo* info, v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(i::ParseInfo* info,
ErrorThrower* thrower) { ErrorThrower* thrower) {
info->set_global(); info->set_global();
...@@ -156,37 +131,6 @@ v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(i::ParseInfo* info, ...@@ -156,37 +131,6 @@ v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(i::ParseInfo* info,
} }
void AsmCompileRun(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
ErrorThrower thrower(isolate, "WASM.asmCompileRun()");
if (args.Length() != 1) {
thrower.Error("Invalid argument count");
return;
}
if (!args[0]->IsString()) {
thrower.Error("Asm module text should be a string");
return;
}
i::Factory* factory = isolate->factory();
i::Zone zone;
Local<String> source = Local<String>::Cast(args[0]);
i::Handle<i::Script> script = factory->NewScript(Utils::OpenHandle(*source));
i::ParseInfo info(&zone, script);
auto module = TranslateAsmModule(&info, &thrower);
if (module == nullptr) {
return;
}
int32_t result = v8::internal::wasm::CompileAndRunWasmModule(
isolate, module->Begin(), module->End(), true);
args.GetReturnValue().Set(result);
}
void InstantiateModuleCommon(const v8::FunctionCallbackInfo<v8::Value>& args, void InstantiateModuleCommon(const v8::FunctionCallbackInfo<v8::Value>& args,
const byte* start, const byte* end, const byte* start, const byte* end,
ErrorThrower* thrower, bool must_decode) { ErrorThrower* thrower, bool must_decode) {
...@@ -312,11 +256,9 @@ void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) { ...@@ -312,11 +256,9 @@ void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) {
JSObject::AddProperty(global, name, wasm_object, attributes); JSObject::AddProperty(global, name, wasm_object, attributes);
// Install functions on the WASM object. // Install functions on the WASM object.
InstallFunc(isolate, wasm_object, "instantiateModule", InstantiateModule);
InstallFunc(isolate, wasm_object, "verifyModule", VerifyModule); InstallFunc(isolate, wasm_object, "verifyModule", VerifyModule);
InstallFunc(isolate, wasm_object, "verifyFunction", VerifyFunction); InstallFunc(isolate, wasm_object, "verifyFunction", VerifyFunction);
InstallFunc(isolate, wasm_object, "compileRun", CompileRun); InstallFunc(isolate, wasm_object, "instantiateModule", InstantiateModule);
InstallFunc(isolate, wasm_object, "asmCompileRun", AsmCompileRun);
InstallFunc(isolate, wasm_object, "instantiateModuleFromAsm", InstallFunc(isolate, wasm_object, "instantiateModuleFromAsm",
InstantiateModuleFromAsm); InstantiateModuleFromAsm);
} }
......
...@@ -9,4 +9,4 @@ function f() { ...@@ -9,4 +9,4 @@ function f() {
} }
assertFalse(_WASMEXP_ == undefined); assertFalse(_WASMEXP_ == undefined);
assertThrows(function() { _WASMEXP_.asmCompileRun(f.toString()); }); assertThrows(function() { _WASMEXP_.instantiateModuleFromAsm(f.toString()); });
...@@ -15,7 +15,8 @@ function EmptyTest() { ...@@ -15,7 +15,8 @@ function EmptyTest() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(11, _WASMEXP_.asmCompileRun(EmptyTest.toString())); assertEquals(11, _WASMEXP_.instantiateModuleFromAsm(
EmptyTest.toString()).caller());
function IntTest() { function IntTest() {
...@@ -36,7 +37,8 @@ function IntTest() { ...@@ -36,7 +37,8 @@ function IntTest() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(101, _WASMEXP_.asmCompileRun(IntTest.toString())); assertEquals(101, _WASMEXP_.instantiateModuleFromAsm(
IntTest.toString()).caller());
function Float64Test() { function Float64Test() {
...@@ -61,7 +63,8 @@ function Float64Test() { ...@@ -61,7 +63,8 @@ function Float64Test() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(1, _WASMEXP_.asmCompileRun(Float64Test.toString())); assertEquals(1, _WASMEXP_.instantiateModuleFromAsm(
Float64Test.toString()).caller());
function BadModule() { function BadModule() {
...@@ -81,7 +84,7 @@ function BadModule() { ...@@ -81,7 +84,7 @@ function BadModule() {
} }
assertThrows(function() { assertThrows(function() {
_WASMEXP_.asmCompileRun(BadModule.toString()) _WASMEXP_.instantiateModuleFromAsm(BadModule.toString()).caller();
}); });
...@@ -102,7 +105,8 @@ function TestReturnInBlock() { ...@@ -102,7 +105,8 @@ function TestReturnInBlock() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(1, _WASMEXP_.asmCompileRun(TestReturnInBlock.toString())); assertEquals(1, _WASMEXP_.instantiateModuleFromAsm(
TestReturnInBlock.toString()).caller());
function TestWhileSimple() { function TestWhileSimple() {
...@@ -119,7 +123,8 @@ function TestWhileSimple() { ...@@ -119,7 +123,8 @@ function TestWhileSimple() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(5, _WASMEXP_.asmCompileRun(TestWhileSimple.toString())); assertEquals(5, _WASMEXP_.instantiateModuleFromAsm(
TestWhileSimple.toString()).caller());
function TestWhileWithoutBraces() { function TestWhileWithoutBraces() {
...@@ -135,7 +140,8 @@ function TestWhileWithoutBraces() { ...@@ -135,7 +140,8 @@ function TestWhileWithoutBraces() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(4, _WASMEXP_.asmCompileRun(TestWhileWithoutBraces.toString())); assertEquals(4, _WASMEXP_.instantiateModuleFromAsm(
TestWhileWithoutBraces.toString()).caller());
function TestReturnInWhile() { function TestReturnInWhile() {
...@@ -153,7 +159,8 @@ function TestReturnInWhile() { ...@@ -153,7 +159,8 @@ function TestReturnInWhile() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(6, _WASMEXP_.asmCompileRun(TestReturnInWhile.toString())); assertEquals(6, _WASMEXP_.instantiateModuleFromAsm(
TestReturnInWhile.toString()).caller());
function TestReturnInWhileWithoutBraces() { function TestReturnInWhileWithoutBraces() {
...@@ -170,7 +177,8 @@ function TestReturnInWhileWithoutBraces() { ...@@ -170,7 +177,8 @@ function TestReturnInWhileWithoutBraces() {
} }
assertEquals( assertEquals(
7, _WASMEXP_.asmCompileRun(TestReturnInWhileWithoutBraces.toString())); 7, _WASMEXP_.instantiateModuleFromAsm(
TestReturnInWhileWithoutBraces.toString()).caller());
function TestBreakInWhile() { function TestBreakInWhile() {
...@@ -186,7 +194,8 @@ function TestBreakInWhile() { ...@@ -186,7 +194,8 @@ function TestBreakInWhile() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(8, _WASMEXP_.asmCompileRun(TestBreakInWhile.toString())); assertEquals(8, _WASMEXP_.instantiateModuleFromAsm(
TestBreakInWhile.toString()).caller());
function TestBreakInNestedWhile() { function TestBreakInNestedWhile() {
...@@ -209,7 +218,8 @@ function TestBreakInNestedWhile() { ...@@ -209,7 +218,8 @@ function TestBreakInNestedWhile() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(9, _WASMEXP_.asmCompileRun(TestBreakInNestedWhile.toString())); assertEquals(9, _WASMEXP_.instantiateModuleFromAsm(
TestBreakInNestedWhile.toString()).caller());
function TestBreakInBlock() { function TestBreakInBlock() {
...@@ -230,7 +240,8 @@ function TestBreakInBlock() { ...@@ -230,7 +240,8 @@ function TestBreakInBlock() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(10, _WASMEXP_.asmCompileRun(TestBreakInBlock.toString())); assertEquals(10, _WASMEXP_.instantiateModuleFromAsm(
TestBreakInBlock.toString()).caller());
function TestBreakInNamedWhile() { function TestBreakInNamedWhile() {
...@@ -250,7 +261,8 @@ function TestBreakInNamedWhile() { ...@@ -250,7 +261,8 @@ function TestBreakInNamedWhile() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(11, _WASMEXP_.asmCompileRun(TestBreakInNamedWhile.toString())); assertEquals(11, _WASMEXP_.instantiateModuleFromAsm(
TestBreakInNamedWhile.toString()).caller());
function TestContinue() { function TestContinue() {
...@@ -272,7 +284,8 @@ function TestContinue() { ...@@ -272,7 +284,8 @@ function TestContinue() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(-5, _WASMEXP_.asmCompileRun(TestContinue.toString())); assertEquals(-5, _WASMEXP_.instantiateModuleFromAsm(
TestContinue.toString()).caller());
function TestContinueInNamedWhile() { function TestContinueInNamedWhile() {
...@@ -299,7 +312,8 @@ function TestContinueInNamedWhile() { ...@@ -299,7 +312,8 @@ function TestContinueInNamedWhile() {
return {caller: caller}; return {caller: caller};
} }
assertEquals(20, _WASMEXP_.asmCompileRun(TestContinueInNamedWhile.toString())); assertEquals(20, _WASMEXP_.instantiateModuleFromAsm(
TestContinueInNamedWhile.toString()).caller());
function TestNot() { function TestNot() {
...@@ -313,7 +327,8 @@ function TestNot() { ...@@ -313,7 +327,8 @@ function TestNot() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(1, _WASMEXP_.asmCompileRun(TestNot.toString())); assertEquals(1, _WASMEXP_.instantiateModuleFromAsm(
TestNot.toString()).caller());
function TestNotEquals() { function TestNotEquals() {
...@@ -330,7 +345,8 @@ function TestNotEquals() { ...@@ -330,7 +345,8 @@ function TestNotEquals() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(21, _WASMEXP_.asmCompileRun(TestNotEquals.toString())); assertEquals(21, _WASMEXP_.instantiateModuleFromAsm(
TestNotEquals.toString()).caller());
function TestUnsignedComparison() { function TestUnsignedComparison() {
...@@ -347,7 +363,8 @@ function TestUnsignedComparison() { ...@@ -347,7 +363,8 @@ function TestUnsignedComparison() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(22, _WASMEXP_.asmCompileRun(TestUnsignedComparison.toString())); assertEquals(22, _WASMEXP_.instantiateModuleFromAsm(
TestUnsignedComparison.toString()).caller());
function TestMixedAdd() { function TestMixedAdd() {
...@@ -369,7 +386,8 @@ function TestMixedAdd() { ...@@ -369,7 +386,8 @@ function TestMixedAdd() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(23, _WASMEXP_.asmCompileRun(TestMixedAdd.toString())); assertEquals(23, _WASMEXP_.instantiateModuleFromAsm(
TestMixedAdd.toString()).caller());
function TestInt32HeapAccess(stdlib, foreign, buffer) { function TestInt32HeapAccess(stdlib, foreign, buffer) {
...@@ -388,7 +406,8 @@ function TestInt32HeapAccess(stdlib, foreign, buffer) { ...@@ -388,7 +406,8 @@ function TestInt32HeapAccess(stdlib, foreign, buffer) {
return {caller: caller}; return {caller: caller};
} }
assertEquals(7, _WASMEXP_.asmCompileRun(TestInt32HeapAccess.toString())); assertEquals(7, _WASMEXP_.instantiateModuleFromAsm(
TestInt32HeapAccess.toString()).caller());
function TestInt32HeapAccessExternal() { function TestInt32HeapAccessExternal() {
...@@ -423,7 +442,7 @@ function TestHeapAccessIntTypes() { ...@@ -423,7 +442,7 @@ function TestHeapAccessIntTypes() {
module.__init__(); module.__init__();
assertEquals(7, module.caller()); assertEquals(7, module.caller());
assertEquals(7, memory_view[2]); assertEquals(7, memory_view[2]);
assertEquals(7, _WASMEXP_.asmCompileRun(code)); assertEquals(7, _WASMEXP_.instantiateModuleFromAsm(code));
} }
} }
...@@ -452,7 +471,8 @@ function TestFloatHeapAccess(stdlib, foreign, buffer) { ...@@ -452,7 +471,8 @@ function TestFloatHeapAccess(stdlib, foreign, buffer) {
return {caller: caller}; return {caller: caller};
} }
assertEquals(1, _WASMEXP_.asmCompileRun(TestFloatHeapAccess.toString())); assertEquals(1, _WASMEXP_.instantiateModuleFromAsm(
TestFloatHeapAccess.toString()).caller());
function TestFloatHeapAccessExternal() { function TestFloatHeapAccessExternal() {
...@@ -482,7 +502,8 @@ function TestConvertI32() { ...@@ -482,7 +502,8 @@ function TestConvertI32() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(24, _WASMEXP_.asmCompileRun(TestConvertI32.toString())); assertEquals(24, _WASMEXP_.instantiateModuleFromAsm(
TestConvertI32.toString()).caller());
function TestConvertF64FromInt() { function TestConvertF64FromInt() {
...@@ -499,7 +520,8 @@ function TestConvertF64FromInt() { ...@@ -499,7 +520,8 @@ function TestConvertF64FromInt() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(25, _WASMEXP_.asmCompileRun(TestConvertF64FromInt.toString())); assertEquals(25, _WASMEXP_.instantiateModuleFromAsm(
TestConvertF64FromInt.toString()).caller());
function TestConvertF64FromUnsigned() { function TestConvertF64FromUnsigned() {
...@@ -518,7 +540,8 @@ function TestConvertF64FromUnsigned() { ...@@ -518,7 +540,8 @@ function TestConvertF64FromUnsigned() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(26, _WASMEXP_.asmCompileRun(TestConvertF64FromUnsigned.toString())); assertEquals(26, _WASMEXP_.instantiateModuleFromAsm(
TestConvertF64FromUnsigned.toString()).caller());
function TestModInt() { function TestModInt() {
...@@ -533,7 +556,8 @@ function TestModInt() { ...@@ -533,7 +556,8 @@ function TestModInt() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(-27, _WASMEXP_.asmCompileRun(TestModInt.toString())); assertEquals(-27, _WASMEXP_.instantiateModuleFromAsm(
TestModInt.toString()).caller());
function TestModUnsignedInt() { function TestModUnsignedInt() {
...@@ -548,7 +572,8 @@ function TestModUnsignedInt() { ...@@ -548,7 +572,8 @@ function TestModUnsignedInt() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(8, _WASMEXP_.asmCompileRun(TestModUnsignedInt.toString())); assertEquals(8, _WASMEXP_.instantiateModuleFromAsm(
TestModUnsignedInt.toString()).caller());
function TestModDouble() { function TestModDouble() {
...@@ -566,7 +591,8 @@ function TestModDouble() { ...@@ -566,7 +591,8 @@ function TestModDouble() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(28, _WASMEXP_.asmCompileRun(TestModDouble.toString())); assertEquals(28, _WASMEXP_.instantiateModuleFromAsm(
TestModDouble.toString()).caller());
/* /*
...@@ -587,7 +613,8 @@ function TestModDoubleNegative() { ...@@ -587,7 +613,8 @@ function TestModDoubleNegative() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(28, _WASMEXP_.asmCompileRun(TestModDoubleNegative.toString())); assertEquals(28, _WASMEXP_.instantiateModuleFromAsm(
TestModDoubleNegative.toString()).caller());
*/ */
...@@ -648,7 +675,8 @@ function TestForLoop() { ...@@ -648,7 +675,8 @@ function TestForLoop() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(54, _WASMEXP_.asmCompileRun(TestForLoop.toString())); assertEquals(54, _WASMEXP_.instantiateModuleFromAsm(
TestForLoop.toString()).caller());
function TestForLoopWithoutInit() { function TestForLoopWithoutInit() {
...@@ -666,7 +694,8 @@ function TestForLoopWithoutInit() { ...@@ -666,7 +694,8 @@ function TestForLoopWithoutInit() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(100, _WASMEXP_.asmCompileRun(TestForLoopWithoutInit.toString())); assertEquals(100, _WASMEXP_.instantiateModuleFromAsm(
TestForLoopWithoutInit.toString()).caller());
function TestForLoopWithoutCondition() { function TestForLoopWithoutCondition() {
...@@ -687,7 +716,8 @@ function TestForLoopWithoutCondition() { ...@@ -687,7 +716,8 @@ function TestForLoopWithoutCondition() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(66, _WASMEXP_.asmCompileRun(TestForLoopWithoutCondition.toString())); assertEquals(66, _WASMEXP_.instantiateModuleFromAsm(
TestForLoopWithoutCondition.toString()).caller());
function TestForLoopWithoutNext() { function TestForLoopWithoutNext() {
...@@ -704,7 +734,8 @@ function TestForLoopWithoutNext() { ...@@ -704,7 +734,8 @@ function TestForLoopWithoutNext() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(41, _WASMEXP_.asmCompileRun(TestForLoopWithoutNext.toString())); assertEquals(41, _WASMEXP_.instantiateModuleFromAsm(
TestForLoopWithoutNext.toString()).caller());
function TestForLoopWithoutBody() { function TestForLoopWithoutBody() {
...@@ -720,7 +751,8 @@ function TestForLoopWithoutBody() { ...@@ -720,7 +751,8 @@ function TestForLoopWithoutBody() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(45, _WASMEXP_.asmCompileRun(TestForLoopWithoutBody.toString())); assertEquals(45, _WASMEXP_.instantiateModuleFromAsm(
TestForLoopWithoutBody.toString()).caller());
function TestDoWhile() { function TestDoWhile() {
...@@ -739,7 +771,8 @@ function TestDoWhile() { ...@@ -739,7 +771,8 @@ function TestDoWhile() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(84, _WASMEXP_.asmCompileRun(TestDoWhile.toString())); assertEquals(84, _WASMEXP_.instantiateModuleFromAsm(
TestDoWhile.toString()).caller());
function TestConditional() { function TestConditional() {
...@@ -753,7 +786,8 @@ function TestConditional() { ...@@ -753,7 +786,8 @@ function TestConditional() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(41, _WASMEXP_.asmCompileRun(TestConditional.toString())); assertEquals(41, _WASMEXP_.instantiateModuleFromAsm(
TestConditional.toString()).caller());
function TestSwitch() { function TestSwitch() {
...@@ -781,7 +815,8 @@ function TestSwitch() { ...@@ -781,7 +815,8 @@ function TestSwitch() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(23, _WASMEXP_.asmCompileRun(TestSwitch.toString())); assertEquals(23, _WASMEXP_.instantiateModuleFromAsm(
TestSwitch.toString()).caller());
function TestSwitchFallthrough() { function TestSwitchFallthrough() {
...@@ -803,7 +838,8 @@ function TestSwitchFallthrough() { ...@@ -803,7 +838,8 @@ function TestSwitchFallthrough() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(42, _WASMEXP_.asmCompileRun(TestSwitchFallthrough.toString())); assertEquals(42, _WASMEXP_.instantiateModuleFromAsm(
TestSwitchFallthrough.toString()).caller());
function TestNestedSwitch() { function TestNestedSwitch() {
...@@ -829,7 +865,8 @@ function TestNestedSwitch() { ...@@ -829,7 +865,8 @@ function TestNestedSwitch() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(43, _WASMEXP_.asmCompileRun(TestNestedSwitch.toString())); assertEquals(43, _WASMEXP_.instantiateModuleFromAsm(
TestNestedSwitch.toString()).caller());
function TestInitFunctionWithNoGlobals() { function TestInitFunctionWithNoGlobals() {
...@@ -876,8 +913,8 @@ function TestFunctionTableSingleFunction() { ...@@ -876,8 +913,8 @@ function TestFunctionTableSingleFunction() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(71, assertEquals(71, _WASMEXP_.instantiateModuleFromAsm(
_WASMEXP_.asmCompileRun(TestFunctionTableSingleFunction.toString())); TestFunctionTableSingleFunction.toString()).caller());
function TestFunctionTableMultipleFunctions() { function TestFunctionTableMultipleFunctions() {
...@@ -907,8 +944,8 @@ function TestFunctionTableMultipleFunctions() { ...@@ -907,8 +944,8 @@ function TestFunctionTableMultipleFunctions() {
return {caller:caller}; return {caller:caller};
} }
assertEquals(73, assertEquals(73, _WASMEXP_.instantiateModuleFromAsm(
_WASMEXP_.asmCompileRun(TestFunctionTableMultipleFunctions.toString())); TestFunctionTableMultipleFunctions.toString()).caller());
function TestFunctionTable() { function TestFunctionTable() {
......
...@@ -28,4 +28,4 @@ var data = bytes( ...@@ -28,4 +28,4 @@ var data = bytes(
'm', 'a', 'i', 'n', 0 // name 'm', 'a', 'i', 'n', 0 // name
); );
assertEquals(kReturnValue, _WASMEXP_.compileRun(data)); assertEquals(kReturnValue, _WASMEXP_.instantiateModule(data).main());
...@@ -8,4 +8,5 @@ assertFalse(undefined === _WASMEXP_); ...@@ -8,4 +8,5 @@ assertFalse(undefined === _WASMEXP_);
assertFalse(undefined == _WASMEXP_); assertFalse(undefined == _WASMEXP_);
assertEquals("function", typeof _WASMEXP_.verifyModule); assertEquals("function", typeof _WASMEXP_.verifyModule);
assertEquals("function", typeof _WASMEXP_.verifyFunction); assertEquals("function", typeof _WASMEXP_.verifyFunction);
assertEquals("function", typeof _WASMEXP_.compileRun); assertEquals("function", typeof _WASMEXP_.instantiateModule);
assertEquals("function", typeof _WASMEXP_.instantiateModuleFromAsm);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment