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

Side by Side Diff: test/common/wasm/wasm-module-runner.cc

Issue 2342263002: [wasm] Fix test-run-wasm-module tests in debug mode. (Closed)
Patch Set: Rename Install functions Created 4 years, 3 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 | « test/common/wasm/wasm-module-runner.h ('k') | test/fuzzer/wasm.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "test/common/wasm/wasm-module-runner.h" 5 #include "test/common/wasm/wasm-module-runner.h"
6 6
7 #include "src/handles.h" 7 #include "src/handles.h"
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/property-descriptor.h" 10 #include "src/property-descriptor.h"
11 #include "src/wasm/module-decoder.h" 11 #include "src/wasm/module-decoder.h"
12 #include "src/wasm/wasm-interpreter.h" 12 #include "src/wasm/wasm-interpreter.h"
13 #include "src/wasm/wasm-js.h"
13 #include "src/wasm/wasm-module.h" 14 #include "src/wasm/wasm-module.h"
14 #include "src/wasm/wasm-result.h" 15 #include "src/wasm/wasm-result.h"
15 #include "src/zone.h" 16 #include "src/zone.h"
16 17
17 namespace v8 { 18 namespace v8 {
18 namespace internal { 19 namespace internal {
19 namespace wasm { 20 namespace wasm {
20 namespace testing { 21 namespace testing {
21 22
22 uint32_t GetMinModuleMemSize(const WasmModule* module) { 23 uint32_t GetMinModuleMemSize(const WasmModule* module) {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (result->IsSmi()) { 193 if (result->IsSmi()) {
193 return Smi::cast(*result)->value(); 194 return Smi::cast(*result)->value();
194 } 195 }
195 if (result->IsHeapNumber()) { 196 if (result->IsHeapNumber()) {
196 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 197 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
197 } 198 }
198 thrower->Error("WASM.compileRun() failed: Return value should be number"); 199 thrower->Error("WASM.compileRun() failed: Return value should be number");
199 return -1; 200 return -1;
200 } 201 }
201 202
203 void SetupIsolateForWasmModule(Isolate* isolate) {
204 WasmJs::InstallWasmFunctionMapIfNeeded(isolate, isolate->native_context());
205 WasmJs::InstallWasmModuleSymbolIfNeeded(isolate, isolate->global_object(),
206 isolate->native_context());
207 }
208
202 } // namespace testing 209 } // namespace testing
203 } // namespace wasm 210 } // namespace wasm
204 } // namespace internal 211 } // namespace internal
205 } // namespace v8 212 } // namespace v8
OLDNEW
« no previous file with comments | « test/common/wasm/wasm-module-runner.h ('k') | test/fuzzer/wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698