| 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/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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|