Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/asmjs/asm-js.cc

Issue 2121593002: [wasm] Compile and Instantiation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: module_sym Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/wasm/wasm-js.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/asmjs/asm-js.h" 5 #include "src/asmjs/asm-js.h"
6 6
7 #include "src/api-natives.h" 7 #include "src/api-natives.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/asmjs/asm-typer.h" 9 #include "src/asmjs/asm-typer.h"
10 #include "src/asmjs/asm-wasm-builder.h" 10 #include "src/asmjs/asm-wasm-builder.h"
(...skipping 30 matching lines...) Expand all
41 i::Zone zone(isolate->allocator()); 41 i::Zone zone(isolate->allocator());
42 internal::wasm::ModuleResult result = internal::wasm::DecodeWasmModule( 42 internal::wasm::ModuleResult result = internal::wasm::DecodeWasmModule(
43 isolate, &zone, start, end, false, origin); 43 isolate, &zone, start, end, false, origin);
44 44
45 i::MaybeHandle<i::FixedArray> compiled_module; 45 i::MaybeHandle<i::FixedArray> compiled_module;
46 if (result.failed() && origin == internal::wasm::kAsmJsOrigin) { 46 if (result.failed() && origin == internal::wasm::kAsmJsOrigin) {
47 thrower->Error("Asm.js converted module failed to decode"); 47 thrower->Error("Asm.js converted module failed to decode");
48 } else if (result.failed()) { 48 } else if (result.failed()) {
49 thrower->Failed("", result); 49 thrower->Failed("", result);
50 } else { 50 } else {
51 compiled_module = result.val->CompileFunctions(isolate); 51 compiled_module = result.val->CompileFunctions(isolate, thrower);
52 } 52 }
53 53
54 if (result.val) delete result.val; 54 if (result.val) delete result.val;
55 return compiled_module; 55 return compiled_module;
56 } 56 }
57 57
58 } // namespace 58 } // namespace
59 59
60 MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) { 60 MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) {
61 ErrorThrower thrower(info->isolate(), "Asm.js -> WebAssembly conversion"); 61 ErrorThrower thrower(info->isolate(), "Asm.js -> WebAssembly conversion");
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (retval.is_null()) { 132 if (retval.is_null()) {
133 thrower.Error( 133 thrower.Error(
134 "WASM.instantiateModuleFromAsm(): foreign init function failed"); 134 "WASM.instantiateModuleFromAsm(): foreign init function failed");
135 return MaybeHandle<Object>(); 135 return MaybeHandle<Object>();
136 } 136 }
137 return maybe_module_object; 137 return maybe_module_object;
138 } 138 }
139 139
140 } // namespace internal 140 } // namespace internal
141 } // namespace v8 141 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698