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 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 assembler->Goto(&loop); | 383 assembler->Goto(&loop); |
384 } | 384 } |
385 | 385 |
386 assembler->Bind(&return_len); | 386 assembler->Bind(&return_len); |
387 assembler->Return(var_len.value()); | 387 assembler->Return(var_len.value()); |
388 | 388 |
389 assembler->Bind(&return_two53minus1); | 389 assembler->Bind(&return_two53minus1); |
390 assembler->Return(assembler->NumberConstant(kMaxSafeInteger)); | 390 assembler->Return(assembler->NumberConstant(kMaxSafeInteger)); |
391 | 391 |
392 assembler->Bind(&return_zero); | 392 assembler->Bind(&return_zero); |
393 assembler->Return(assembler->SmiConstant(Smi::FromInt(0))); | 393 assembler->Return(assembler->SmiConstant(Smi::kZero)); |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
397 void Builtins::Generate_ToInteger(CodeStubAssembler* assembler) { | 397 void Builtins::Generate_ToInteger(CodeStubAssembler* assembler) { |
398 typedef TypeConversionDescriptor Descriptor; | 398 typedef TypeConversionDescriptor Descriptor; |
399 | 399 |
400 compiler::Node* input = assembler->Parameter(Descriptor::kArgument); | 400 compiler::Node* input = assembler->Parameter(Descriptor::kArgument); |
401 compiler::Node* context = assembler->Parameter(Descriptor::kContext); | 401 compiler::Node* context = assembler->Parameter(Descriptor::kContext); |
402 | 402 |
403 assembler->Return(assembler->ToInteger(context, input)); | 403 assembler->Return(assembler->ToInteger(context, input)); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 typedef TypeofDescriptor Descriptor; | 477 typedef TypeofDescriptor Descriptor; |
478 | 478 |
479 Node* object = assembler->Parameter(Descriptor::kObject); | 479 Node* object = assembler->Parameter(Descriptor::kObject); |
480 Node* context = assembler->Parameter(Descriptor::kContext); | 480 Node* context = assembler->Parameter(Descriptor::kContext); |
481 | 481 |
482 assembler->Return(assembler->Typeof(object, context)); | 482 assembler->Return(assembler->Typeof(object, context)); |
483 } | 483 } |
484 | 484 |
485 } // namespace internal | 485 } // namespace internal |
486 } // namespace v8 | 486 } // namespace v8 |
OLD | NEW |