OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 | 1735 |
1736 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { | 1736 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { |
1737 HandleScope scope(isolate); | 1737 HandleScope scope(isolate); |
1738 DCHECK(args.length() == 1); | 1738 DCHECK(args.length() == 1); |
1739 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); | 1739 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); |
1740 THROW_NEW_ERROR_RETURN_FAILURE( | 1740 THROW_NEW_ERROR_RETURN_FAILURE( |
1741 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); | 1741 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); |
1742 } | 1742 } |
1743 | 1743 |
1744 | 1744 |
1745 RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) { | |
1746 HandleScope scope(isolate); | |
1747 DCHECK(args.length() == 0); | |
1748 THROW_NEW_ERROR_RETURN_FAILURE( | |
1749 isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0))); | |
1750 } | |
1751 | |
1752 | |
1753 RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) { | |
1754 HandleScope scope(isolate); | |
1755 DCHECK(args.length() == 0); | |
1756 THROW_NEW_ERROR_RETURN_FAILURE( | |
1757 isolate, | |
1758 NewReferenceError("unsupported_super", HandleVector<Object>(NULL, 0))); | |
1759 } | |
1760 | |
1761 | |
1762 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { | 1745 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { |
1763 DCHECK(args.length() == 3); | 1746 DCHECK(args.length() == 3); |
1764 HandleScope scope(isolate); | 1747 HandleScope scope(isolate); |
1765 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 1748 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
1766 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 1749 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
1767 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); | 1750 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); |
1768 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); | 1751 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); |
1769 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); | 1752 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); |
1770 // Do not report if we actually have a handler. | 1753 // Do not report if we actually have a handler. |
1771 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { | 1754 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { |
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 } | 3314 } |
3332 return NULL; | 3315 return NULL; |
3333 } | 3316 } |
3334 | 3317 |
3335 | 3318 |
3336 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 3319 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
3337 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 3320 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
3338 } | 3321 } |
3339 } | 3322 } |
3340 } // namespace v8::internal | 3323 } // namespace v8::internal |
OLD | NEW |