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

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

Issue 2178943002: [builtins] move remaining builtins into separate files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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-call.cc ('k') | src/builtins/builtins-generator.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
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return *JSBoundFunction::ToString(Handle<JSBoundFunction>::cast(receiver)); 290 return *JSBoundFunction::ToString(Handle<JSBoundFunction>::cast(receiver));
291 } else if (receiver->IsJSFunction()) { 291 } else if (receiver->IsJSFunction()) {
292 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver)); 292 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver));
293 } 293 }
294 THROW_NEW_ERROR_RETURN_FAILURE( 294 THROW_NEW_ERROR_RETURN_FAILURE(
295 isolate, NewTypeError(MessageTemplate::kNotGeneric, 295 isolate, NewTypeError(MessageTemplate::kNotGeneric,
296 isolate->factory()->NewStringFromAsciiChecked( 296 isolate->factory()->NewStringFromAsciiChecked(
297 "Function.prototype.toString"))); 297 "Function.prototype.toString")));
298 } 298 }
299 299
300 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V )
301 void Builtins::Generate_FunctionPrototypeHasInstance(
302 CodeStubAssembler* assembler) {
303 using compiler::Node;
304
305 Node* f = assembler->Parameter(0);
306 Node* v = assembler->Parameter(1);
307 Node* context = assembler->Parameter(4);
308 Node* result = assembler->OrdinaryHasInstance(context, f, v);
309 assembler->Return(result);
310 }
311
300 } // namespace internal 312 } // namespace internal
301 } // namespace v8 313 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-call.cc ('k') | src/builtins/builtins-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698