| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 isolate, NewTypeError(MessageTemplate::kCannotConvertToPrimitive)); | 215 isolate, NewTypeError(MessageTemplate::kCannotConvertToPrimitive)); |
| 216 } | 216 } |
| 217 | 217 |
| 218 RUNTIME_FUNCTION(Runtime_ThrowIllegalInvocation) { | 218 RUNTIME_FUNCTION(Runtime_ThrowIllegalInvocation) { |
| 219 HandleScope scope(isolate); | 219 HandleScope scope(isolate); |
| 220 DCHECK(args.length() == 0); | 220 DCHECK(args.length() == 0); |
| 221 THROW_NEW_ERROR_RETURN_FAILURE( | 221 THROW_NEW_ERROR_RETURN_FAILURE( |
| 222 isolate, NewTypeError(MessageTemplate::kIllegalInvocation)); | 222 isolate, NewTypeError(MessageTemplate::kIllegalInvocation)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 RUNTIME_FUNCTION(Runtime_ThrowIllegalOperation) { |
| 226 HandleScope scope(isolate); |
| 227 DCHECK(args.length() == 0); |
| 228 return isolate->ThrowIllegalOperation(); |
| 229 } |
| 230 |
| 225 RUNTIME_FUNCTION(Runtime_ThrowIncompatibleMethodReceiver) { | 231 RUNTIME_FUNCTION(Runtime_ThrowIncompatibleMethodReceiver) { |
| 226 HandleScope scope(isolate); | 232 HandleScope scope(isolate); |
| 227 DCHECK_EQ(2, args.length()); | 233 DCHECK_EQ(2, args.length()); |
| 228 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0); | 234 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0); |
| 229 CONVERT_ARG_HANDLE_CHECKED(Object, arg1, 1); | 235 CONVERT_ARG_HANDLE_CHECKED(Object, arg1, 1); |
| 230 THROW_NEW_ERROR_RETURN_FAILURE( | 236 THROW_NEW_ERROR_RETURN_FAILURE( |
| 231 isolate, | 237 isolate, |
| 232 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, arg0, arg1)); | 238 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver, arg0, arg1)); |
| 233 } | 239 } |
| 234 | 240 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 610 |
| 605 RUNTIME_FUNCTION(Runtime_Typeof) { | 611 RUNTIME_FUNCTION(Runtime_Typeof) { |
| 606 HandleScope scope(isolate); | 612 HandleScope scope(isolate); |
| 607 DCHECK_EQ(1, args.length()); | 613 DCHECK_EQ(1, args.length()); |
| 608 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 614 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 609 return *Object::TypeOf(isolate, object); | 615 return *Object::TypeOf(isolate, object); |
| 610 } | 616 } |
| 611 | 617 |
| 612 } // namespace internal | 618 } // namespace internal |
| 613 } // namespace v8 | 619 } // namespace v8 |
| OLD | NEW |