| 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 #ifndef WASM_RUN_UTILS_H |    5 #ifndef WASM_RUN_UTILS_H | 
|    6 #define WASM_RUN_UTILS_H |    6 #define WASM_RUN_UTILS_H | 
|    7  |    7  | 
|    8 #include <setjmp.h> |    8 #include <setjmp.h> | 
|    9 #include <stdint.h> |    9 #include <stdint.h> | 
|   10 #include <stdlib.h> |   10 #include <stdlib.h> | 
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  325     global_offset += size; |  325     global_offset += size; | 
|  326     // limit number of globals. |  326     // limit number of globals. | 
|  327     CHECK_LT(global_offset, kMaxGlobalsSize); |  327     CHECK_LT(global_offset, kMaxGlobalsSize); | 
|  328     return &module->globals.back(); |  328     return &module->globals.back(); | 
|  329   } |  329   } | 
|  330  |  330  | 
|  331   Handle<WasmInstanceObject> InitInstanceObject() { |  331   Handle<WasmInstanceObject> InitInstanceObject() { | 
|  332     Handle<SeqOneByteString> empty_string = Handle<SeqOneByteString>::cast( |  332     Handle<SeqOneByteString> empty_string = Handle<SeqOneByteString>::cast( | 
|  333         isolate_->factory()->NewStringFromOneByte({}).ToHandleChecked()); |  333         isolate_->factory()->NewStringFromOneByte({}).ToHandleChecked()); | 
|  334     Handle<Managed<wasm::WasmModule>> module_wrapper = |  334     Handle<Managed<wasm::WasmModule>> module_wrapper = | 
|  335         Managed<wasm::WasmModule>::New(isolate_, &module_, false); |  335         Managed<wasm::WasmModule>::NewForTesting(isolate_, &module_); | 
|  336     Handle<Script> script = |  336     Handle<Script> script = | 
|  337         isolate_->factory()->NewScript(isolate_->factory()->empty_string()); |  337         isolate_->factory()->NewScript(isolate_->factory()->empty_string()); | 
|  338     script->set_type(Script::TYPE_WASM); |  338     script->set_type(Script::TYPE_WASM); | 
|  339     Handle<WasmSharedModuleData> shared_module_data = |  339     Handle<WasmSharedModuleData> shared_module_data = | 
|  340         WasmSharedModuleData::New(isolate_, module_wrapper, empty_string, |  340         WasmSharedModuleData::New(isolate_, module_wrapper, empty_string, | 
|  341                                   script, Handle<ByteArray>::null()); |  341                                   script, Handle<ByteArray>::null()); | 
|  342     Handle<WasmCompiledModule> compiled_module = |  342     Handle<WasmCompiledModule> compiled_module = | 
|  343         WasmCompiledModule::New(isolate_, shared_module_data); |  343         WasmCompiledModule::New(isolate_, shared_module_data); | 
|  344     // Minimally initialize the compiled module such that IsWasmCompiledModule |  344     // Minimally initialize the compiled module such that IsWasmCompiledModule | 
|  345     // passes. |  345     // passes. | 
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  837   void RunWasm_##name(WasmExecutionMode execution_mode) |  837   void RunWasm_##name(WasmExecutionMode execution_mode) | 
|  838  |  838  | 
|  839 #define WASM_EXEC_COMPILED_TEST(name)                                \ |  839 #define WASM_EXEC_COMPILED_TEST(name)                                \ | 
|  840   void RunWasm_##name(WasmExecutionMode execution_mode);             \ |  840   void RunWasm_##name(WasmExecutionMode execution_mode);             \ | 
|  841   TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ |  841   TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); } \ | 
|  842   void RunWasm_##name(WasmExecutionMode execution_mode) |  842   void RunWasm_##name(WasmExecutionMode execution_mode) | 
|  843  |  843  | 
|  844 }  // namespace |  844 }  // namespace | 
|  845  |  845  | 
|  846 #endif |  846 #endif | 
| OLD | NEW |