| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return ThrowRuntimeError(isolate, message_id, 0, false); | 129 return ThrowRuntimeError(isolate, message_id, 0, false); |
| 130 } | 130 } |
| 131 | 131 |
| 132 RUNTIME_FUNCTION(Runtime_ThrowWasmError) { | 132 RUNTIME_FUNCTION(Runtime_ThrowWasmError) { |
| 133 DCHECK_EQ(2, args.length()); | 133 DCHECK_EQ(2, args.length()); |
| 134 CONVERT_SMI_ARG_CHECKED(message_id, 0); | 134 CONVERT_SMI_ARG_CHECKED(message_id, 0); |
| 135 CONVERT_SMI_ARG_CHECKED(byte_offset, 1); | 135 CONVERT_SMI_ARG_CHECKED(byte_offset, 1); |
| 136 return ThrowRuntimeError(isolate, message_id, byte_offset, true); | 136 return ThrowRuntimeError(isolate, message_id, byte_offset, true); |
| 137 } | 137 } |
| 138 | 138 |
| 139 RUNTIME_FUNCTION(Runtime_ThrowWasmStackOverflow) { |
| 140 SealHandleScope shs(isolate); |
| 141 DCHECK_LE(0, args.length()); |
| 142 DCHECK_NULL(isolate->context()); |
| 143 isolate->set_context(GetWasmContextOnStackTop(isolate)); |
| 144 return isolate->StackOverflow(); |
| 145 } |
| 146 |
| 139 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) { | 147 RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) { |
| 140 HandleScope scope(isolate); | 148 HandleScope scope(isolate); |
| 141 DCHECK_EQ(0, args.length()); | 149 DCHECK_EQ(0, args.length()); |
| 142 THROW_NEW_ERROR_RETURN_FAILURE( | 150 THROW_NEW_ERROR_RETURN_FAILURE( |
| 143 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError)); | 151 isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError)); |
| 144 } | 152 } |
| 145 | 153 |
| 146 RUNTIME_FUNCTION(Runtime_WasmThrow) { | 154 RUNTIME_FUNCTION(Runtime_WasmThrow) { |
| 147 HandleScope scope(isolate); | 155 HandleScope scope(isolate); |
| 148 DCHECK_EQ(2, args.length()); | 156 DCHECK_EQ(2, args.length()); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 236 |
| 229 RUNTIME_FUNCTION(Runtime_WasmCompileLazy) { | 237 RUNTIME_FUNCTION(Runtime_WasmCompileLazy) { |
| 230 DCHECK(args.length() == 0); | 238 DCHECK(args.length() == 0); |
| 231 HandleScope scope(isolate); | 239 HandleScope scope(isolate); |
| 232 | 240 |
| 233 return *wasm::CompileLazy(isolate); | 241 return *wasm::CompileLazy(isolate); |
| 234 } | 242 } |
| 235 | 243 |
| 236 } // namespace internal | 244 } // namespace internal |
| 237 } // namespace v8 | 245 } // namespace v8 |
| OLD | NEW |