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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver)); | 276 return *JSFunction::ToString(Handle<JSFunction>::cast(receiver)); |
277 } | 277 } |
278 THROW_NEW_ERROR_RETURN_FAILURE( | 278 THROW_NEW_ERROR_RETURN_FAILURE( |
279 isolate, NewTypeError(MessageTemplate::kNotGeneric, | 279 isolate, NewTypeError(MessageTemplate::kNotGeneric, |
280 isolate->factory()->NewStringFromAsciiChecked( | 280 isolate->factory()->NewStringFromAsciiChecked( |
281 "Function.prototype.toString"))); | 281 "Function.prototype.toString"))); |
282 } | 282 } |
283 | 283 |
284 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) | 284 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) |
285 void Builtins::Generate_FunctionPrototypeHasInstance( | 285 void Builtins::Generate_FunctionPrototypeHasInstance( |
286 CodeStubAssembler* assembler) { | 286 compiler::CodeAssemblerState* state) { |
287 using compiler::Node; | 287 using compiler::Node; |
| 288 CodeStubAssembler assembler(state); |
288 | 289 |
289 Node* f = assembler->Parameter(0); | 290 Node* f = assembler.Parameter(0); |
290 Node* v = assembler->Parameter(1); | 291 Node* v = assembler.Parameter(1); |
291 Node* context = assembler->Parameter(4); | 292 Node* context = assembler.Parameter(4); |
292 Node* result = assembler->OrdinaryHasInstance(context, f, v); | 293 Node* result = assembler.OrdinaryHasInstance(context, f, v); |
293 assembler->Return(result); | 294 assembler.Return(result); |
294 } | 295 } |
295 | 296 |
296 } // namespace internal | 297 } // namespace internal |
297 } // namespace v8 | 298 } // namespace v8 |
OLD | NEW |