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 "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/compiler/wasm-compiler.h" | 9 #include "src/compiler/wasm-compiler.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Set new buffer to be wasm memory | 103 // Set new buffer to be wasm memory |
104 module_object->SetInternalField(kWasmMemArrayBuffer, *buffer); | 104 module_object->SetInternalField(kWasmMemArrayBuffer, *buffer); |
105 | 105 |
106 CHECK(wasm::UpdateWasmModuleMemory(module_object, old_mem_start, | 106 CHECK(wasm::UpdateWasmModuleMemory(module_object, old_mem_start, |
107 new_mem_start, old_size, new_size)); | 107 new_mem_start, old_size, new_size)); |
108 | 108 |
109 return *isolate->factory()->NewNumberFromInt(old_size / | 109 return *isolate->factory()->NewNumberFromInt(old_size / |
110 wasm::WasmModule::kPageSize); | 110 wasm::WasmModule::kPageSize); |
111 } | 111 } |
| 112 |
| 113 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) { |
| 114 HandleScope scope(isolate); |
| 115 DCHECK_EQ(0, args.length()); |
| 116 THROW_NEW_ERROR_RETURN_FAILURE( |
| 117 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError)); |
| 118 } |
112 } // namespace internal | 119 } // namespace internal |
113 } // namespace v8 | 120 } // namespace v8 |
OLD | NEW |