| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/builtins.h" | 5 #include "src/builtins/builtins.h" |
| 6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
| 7 | 7 |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/property-descriptor.h" | 9 #include "src/property-descriptor.h" |
| 10 | 10 |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 HandleScope scope(isolate); | 899 HandleScope scope(isolate); |
| 900 Handle<Object> object = args.atOrUndefined(isolate, 1); | 900 Handle<Object> object = args.atOrUndefined(isolate, 1); |
| 901 if (object->IsJSReceiver()) { | 901 if (object->IsJSReceiver()) { |
| 902 MAYBE_RETURN(JSReceiver::SetIntegrityLevel(Handle<JSReceiver>::cast(object), | 902 MAYBE_RETURN(JSReceiver::SetIntegrityLevel(Handle<JSReceiver>::cast(object), |
| 903 SEALED, Object::THROW_ON_ERROR), | 903 SEALED, Object::THROW_ON_ERROR), |
| 904 isolate->heap()->exception()); | 904 isolate->heap()->exception()); |
| 905 } | 905 } |
| 906 return *object; | 906 return *object; |
| 907 } | 907 } |
| 908 | 908 |
| 909 // ES6 section 7.3.19 OrdinaryHasInstance ( C, O ) |
| 910 void Builtins::Generate_OrdinaryHasInstance(CodeStubAssembler* assembler) { |
| 911 typedef compiler::Node Node; |
| 912 typedef CompareDescriptor Descriptor; |
| 913 |
| 914 Node* constructor = assembler->Parameter(Descriptor::kLeft); |
| 915 Node* object = assembler->Parameter(Descriptor::kRight); |
| 916 Node* context = assembler->Parameter(Descriptor::kContext); |
| 917 |
| 918 assembler->Return( |
| 919 assembler->OrdinaryHasInstance(context, constructor, object)); |
| 920 } |
| 921 |
| 909 } // namespace internal | 922 } // namespace internal |
| 910 } // namespace v8 | 923 } // namespace v8 |
| OLD | NEW |