| OLD | NEW |
| 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" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 return Smi::cast(*result)->value(); | 194 return Smi::cast(*result)->value(); |
| 195 } | 195 } |
| 196 if (result->IsHeapNumber()) { | 196 if (result->IsHeapNumber()) { |
| 197 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); | 197 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); |
| 198 } | 198 } |
| 199 thrower->Error("WASM.compileRun() failed: Return value should be number"); | 199 thrower->Error("WASM.compileRun() failed: Return value should be number"); |
| 200 return -1; | 200 return -1; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void SetupIsolateForWasmModule(Isolate* isolate) { | 203 void SetupIsolateForWasmModule(Isolate* isolate) { |
| 204 WasmJs::InstallWasmFunctionMapIfNeeded(isolate, isolate->native_context()); | 204 WasmJs::InstallWasmMapsIfNeeded(isolate, isolate->native_context()); |
| 205 WasmJs::InstallWasmModuleSymbolIfNeeded(isolate, isolate->global_object(), | 205 WasmJs::InstallWasmModuleSymbolIfNeeded(isolate, isolate->global_object(), |
| 206 isolate->native_context()); | 206 isolate->native_context()); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace testing | 209 } // namespace testing |
| 210 } // namespace wasm | 210 } // namespace wasm |
| 211 } // namespace internal | 211 } // namespace internal |
| 212 } // namespace v8 | 212 } // namespace v8 |
| OLD | NEW |