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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 DCHECK(args.length() == 0); | 49 DCHECK(args.length() == 0); |
50 return isolate->PromoteScheduledException(); | 50 return isolate->PromoteScheduledException(); |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { | 54 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { |
55 HandleScope scope(isolate); | 55 HandleScope scope(isolate); |
56 DCHECK(args.length() == 1); | 56 DCHECK(args.length() == 1); |
57 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); | 57 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); |
58 THROW_NEW_ERROR_RETURN_FAILURE( | 58 THROW_NEW_ERROR_RETURN_FAILURE( |
59 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); | 59 isolate, NewReferenceError(MessageTemplate::kNotDefined, name)); |
60 } | 60 } |
61 | 61 |
62 | 62 |
63 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | 63 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { |
64 HandleScope scope(isolate); | 64 HandleScope scope(isolate); |
65 DCHECK(args.length() == 1); | 65 DCHECK(args.length() == 1); |
66 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 66 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
67 THROW_NEW_ERROR_RETURN_FAILURE( | 67 THROW_NEW_ERROR_RETURN_FAILURE( |
68 isolate, | 68 isolate, |
69 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); | 69 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 return args[0]; | 403 return args[0]; |
404 } | 404 } |
405 | 405 |
406 | 406 |
407 RUNTIME_FUNCTION(Runtime_HarmonyToString) { | 407 RUNTIME_FUNCTION(Runtime_HarmonyToString) { |
408 // TODO(caitp): Delete this runtime method when removing --harmony-tostring | 408 // TODO(caitp): Delete this runtime method when removing --harmony-tostring |
409 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); | 409 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); |
410 } | 410 } |
411 } | 411 } |
412 } // namespace v8::internal | 412 } // namespace v8::internal |
OLD | NEW |