| 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/runtime/runtime.h" | 10 #include "src/runtime/runtime.h" |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 return *result; | 758 return *result; |
| 759 } | 759 } |
| 760 | 760 |
| 761 | 761 |
| 762 RUNTIME_FUNCTION(Runtime_DeleteProperty) { | 762 RUNTIME_FUNCTION(Runtime_DeleteProperty) { |
| 763 HandleScope scope(isolate); | 763 HandleScope scope(isolate); |
| 764 DCHECK(args.length() == 3); | 764 DCHECK(args.length() == 3); |
| 765 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); | 765 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); |
| 766 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); | 766 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); |
| 767 CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 2); | 767 CONVERT_STRICT_MODE_ARG_CHECKED(strict_mode, 2); |
| 768 JSReceiver::DeleteMode delete_mode = strict_mode == STRICT | |
| 769 ? JSReceiver::STRICT_DELETION | |
| 770 : JSReceiver::NORMAL_DELETION; | |
| 771 Handle<Object> result; | 768 Handle<Object> result; |
| 772 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 769 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 773 isolate, result, JSReceiver::DeleteProperty(object, key, delete_mode)); | 770 isolate, result, JSReceiver::DeleteProperty(object, key, strict_mode)); |
| 774 return *result; | 771 return *result; |
| 775 } | 772 } |
| 776 | 773 |
| 777 | 774 |
| 778 static Object* HasOwnPropertyImplementation(Isolate* isolate, | 775 static Object* HasOwnPropertyImplementation(Isolate* isolate, |
| 779 Handle<JSObject> object, | 776 Handle<JSObject> object, |
| 780 Handle<Name> key) { | 777 Handle<Name> key) { |
| 781 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key); | 778 Maybe<bool> maybe = JSReceiver::HasOwnProperty(object, key); |
| 782 if (!maybe.has_value) return isolate->heap()->exception(); | 779 if (!maybe.has_value) return isolate->heap()->exception(); |
| 783 if (maybe.value) return isolate->heap()->true_value(); | 780 if (maybe.value) return isolate->heap()->true_value(); |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 | 1598 |
| 1602 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { | 1599 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { |
| 1603 SealHandleScope shs(isolate); | 1600 SealHandleScope shs(isolate); |
| 1604 DCHECK(args.length() == 1); | 1601 DCHECK(args.length() == 1); |
| 1605 CONVERT_ARG_CHECKED(Object, obj, 0); | 1602 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 1606 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); | 1603 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); |
| 1607 return JSReceiver::cast(obj)->class_name(); | 1604 return JSReceiver::cast(obj)->class_name(); |
| 1608 } | 1605 } |
| 1609 } | 1606 } |
| 1610 } // namespace v8::internal | 1607 } // namespace v8::internal |
| OLD | NEW |