Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: src/builtins/builtins-function.cc

Issue 2422573002: [builtins] Remove template argument from args.target(). (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-error.cc ('k') | src/builtins/builtins-global.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler.h" 8 #include "src/compiler.h"
9 #include "src/string-builder.h" 9 #include "src/string-builder.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 namespace { 14 namespace {
15 15
16 // ES6 section 19.2.1.1.1 CreateDynamicFunction 16 // ES6 section 19.2.1.1.1 CreateDynamicFunction
17 MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate, 17 MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate,
18 BuiltinArguments args, 18 BuiltinArguments args,
19 const char* token) { 19 const char* token) {
20 // Compute number of arguments, ignoring the receiver. 20 // Compute number of arguments, ignoring the receiver.
21 DCHECK_LE(1, args.length()); 21 DCHECK_LE(1, args.length());
22 int const argc = args.length() - 1; 22 int const argc = args.length() - 1;
23 23
24 Handle<JSFunction> target = args.target<JSFunction>(); 24 Handle<JSFunction> target = args.target();
25 Handle<JSObject> target_global_proxy(target->global_proxy(), isolate); 25 Handle<JSObject> target_global_proxy(target->global_proxy(), isolate);
26 26
27 if (!Builtins::AllowDynamicFunction(isolate, target, target_global_proxy)) { 27 if (!Builtins::AllowDynamicFunction(isolate, target, target_global_proxy)) {
28 isolate->CountUsage(v8::Isolate::kFunctionConstructorReturnedUndefined); 28 isolate->CountUsage(v8::Isolate::kFunctionConstructorReturnedUndefined);
29 return isolate->factory()->undefined_value(); 29 return isolate->factory()->undefined_value();
30 } 30 }
31 31
32 // Build the source string. 32 // Build the source string.
33 Handle<String> source; 33 Handle<String> source;
34 { 34 {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 Node* f = assembler->Parameter(0); 289 Node* f = assembler->Parameter(0);
290 Node* v = assembler->Parameter(1); 290 Node* v = assembler->Parameter(1);
291 Node* context = assembler->Parameter(4); 291 Node* context = assembler->Parameter(4);
292 Node* result = assembler->OrdinaryHasInstance(context, f, v); 292 Node* result = assembler->OrdinaryHasInstance(context, f, v);
293 assembler->Return(result); 293 assembler->Return(result);
294 } 294 }
295 295
296 } // namespace internal 296 } // namespace internal
297 } // namespace v8 297 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-error.cc ('k') | src/builtins/builtins-global.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698