| 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 "src/builtins.h" | 5 #include "src/builtins.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 HandleScope scope(isolate); | 1569 HandleScope scope(isolate); |
| 1570 DCHECK_EQ(2, args.length()); | 1570 DCHECK_EQ(2, args.length()); |
| 1571 Handle<Object> target = args.at<Object>(1); | 1571 Handle<Object> target = args.at<Object>(1); |
| 1572 | 1572 |
| 1573 if (!target->IsJSReceiver()) { | 1573 if (!target->IsJSReceiver()) { |
| 1574 THROW_NEW_ERROR_RETURN_FAILURE( | 1574 THROW_NEW_ERROR_RETURN_FAILURE( |
| 1575 isolate, NewTypeError(MessageTemplate::kCalledOnNonObject, | 1575 isolate, NewTypeError(MessageTemplate::kCalledOnNonObject, |
| 1576 isolate->factory()->NewStringFromAsciiChecked( | 1576 isolate->factory()->NewStringFromAsciiChecked( |
| 1577 "Reflect.getPrototypeOf"))); | 1577 "Reflect.getPrototypeOf"))); |
| 1578 } | 1578 } |
| 1579 | 1579 Handle<Object> prototype; |
| 1580 return *Object::GetPrototype(isolate, target); | 1580 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, prototype, |
| 1581 Object::GetPrototype(isolate, target)); |
| 1582 return *prototype; |
| 1581 } | 1583 } |
| 1582 | 1584 |
| 1583 | 1585 |
| 1584 // ES6 section 26.1.9 Reflect.has | 1586 // ES6 section 26.1.9 Reflect.has |
| 1585 BUILTIN(ReflectHas) { | 1587 BUILTIN(ReflectHas) { |
| 1586 HandleScope scope(isolate); | 1588 HandleScope scope(isolate); |
| 1587 DCHECK_EQ(3, args.length()); | 1589 DCHECK_EQ(3, args.length()); |
| 1588 Handle<Object> target = args.at<Object>(1); | 1590 Handle<Object> target = args.at<Object>(1); |
| 1589 Handle<Object> key = args.at<Object>(2); | 1591 Handle<Object> key = args.at<Object>(2); |
| 1590 | 1592 |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 2389 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 2388 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 2390 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 2389 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 2391 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 2390 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 2392 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 2391 #undef DEFINE_BUILTIN_ACCESSOR_C | 2393 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 2392 #undef DEFINE_BUILTIN_ACCESSOR_A | 2394 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 2393 | 2395 |
| 2394 | 2396 |
| 2395 } // namespace internal | 2397 } // namespace internal |
| 2396 } // namespace v8 | 2398 } // namespace v8 |
| OLD | NEW |