• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/builtins/builtins-utils-gen.h"
6 #include "src/builtins/builtins.h"
7 #include "src/code-stub-assembler.h"
8 
9 namespace v8 {
10 namespace internal {
11 
12 // ES section #sec-reflect.has
TF_BUILTIN(ReflectHas,CodeStubAssembler)13 TF_BUILTIN(ReflectHas, CodeStubAssembler) {
14   Node* target = Parameter(Descriptor::kTarget);
15   Node* key = Parameter(Descriptor::kKey);
16   Node* context = Parameter(Descriptor::kContext);
17 
18   ThrowIfNotJSReceiver(context, target, MessageTemplate::kCalledOnNonObject,
19                        "Reflect.has");
20 
21   Return(CallBuiltin(Builtins::kHasProperty, context, target, key));
22 }
23 
24 }  // namespace internal
25 }  // namespace v8
26