| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 RUNTIME_FUNCTION(Runtime_ThrowIncompatibleMethodReceiver) { | 223 RUNTIME_FUNCTION(Runtime_ThrowIncompatibleMethodReceiver) { |
| 224 HandleScope scope(isolate); | 224 HandleScope scope(isolate); |
| 225 DCHECK_EQ(2, args.length()); | 225 DCHECK_EQ(2, args.length()); |
| 226 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0); | 226 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0); |
| 227 CONVERT_ARG_HANDLE_CHECKED(Object, arg1, 1); | 227 CONVERT_ARG_HANDLE_CHECKED(Object, arg1, 1); |
| 228 THROW_NEW_ERROR_RETURN_FAILURE( | 228 THROW_NEW_ERROR_RETURN_FAILURE( |
| 229 isolate, | 229 isolate, |
| 230 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, arg0, arg1)); | 230 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, arg0, arg1)); |
| 231 } | 231 } |
| 232 | 232 |
| 233 RUNTIME_FUNCTION(Runtime_ThrowInvalidStringLength) { |
| 234 HandleScope scope(isolate); |
| 235 THROW_NEW_ERROR_RETURN_FAILURE( |
| 236 isolate, NewRangeError(MessageTemplate::kInvalidStringLength)); |
| 237 } |
| 238 |
| 233 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | 239 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { |
| 234 HandleScope scope(isolate); | 240 HandleScope scope(isolate); |
| 235 DCHECK(args.length() == 1); | 241 DCHECK(args.length() == 1); |
| 236 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 242 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
| 237 THROW_NEW_ERROR_RETURN_FAILURE( | 243 THROW_NEW_ERROR_RETURN_FAILURE( |
| 238 isolate, | 244 isolate, |
| 239 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); | 245 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); |
| 240 } | 246 } |
| 241 | 247 |
| 242 RUNTIME_FUNCTION(Runtime_ThrowNotGeneric) { | 248 RUNTIME_FUNCTION(Runtime_ThrowNotGeneric) { |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 HandleScope scope(isolate); | 639 HandleScope scope(isolate); |
| 634 DCHECK_EQ(1, args.length()); | 640 DCHECK_EQ(1, args.length()); |
| 635 CONVERT_ARG_CHECKED(Object, object, 0); | 641 CONVERT_ARG_CHECKED(Object, object, 0); |
| 636 bool is_wasm_object = | 642 bool is_wasm_object = |
| 637 object->IsJSObject() && wasm::IsWasmObject(JSObject::cast(object)); | 643 object->IsJSObject() && wasm::IsWasmObject(JSObject::cast(object)); |
| 638 return *isolate->factory()->ToBoolean(is_wasm_object); | 644 return *isolate->factory()->ToBoolean(is_wasm_object); |
| 639 } | 645 } |
| 640 | 646 |
| 641 } // namespace internal | 647 } // namespace internal |
| 642 } // namespace v8 | 648 } // namespace v8 |
| OLD | NEW |