OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 chunk_->LookupLiteralRepresentation(op).IsTagged(); | 446 chunk_->LookupLiteralRepresentation(op).IsTagged(); |
447 } | 447 } |
448 | 448 |
449 | 449 |
450 int LCodeGen::ToInteger32(LConstantOperand* op) const { | 450 int LCodeGen::ToInteger32(LConstantOperand* op) const { |
451 HConstant* constant = chunk_->LookupConstant(op); | 451 HConstant* constant = chunk_->LookupConstant(op); |
452 return constant->Integer32Value(); | 452 return constant->Integer32Value(); |
453 } | 453 } |
454 | 454 |
455 | 455 |
| 456 Smi* LCodeGen::ToSmi(LConstantOperand* op) const { |
| 457 HConstant* constant = chunk_->LookupConstant(op); |
| 458 return Smi::FromInt(constant->Integer32Value()); |
| 459 } |
| 460 |
| 461 |
456 double LCodeGen::ToDouble(LConstantOperand* op) const { | 462 double LCodeGen::ToDouble(LConstantOperand* op) const { |
457 HConstant* constant = chunk_->LookupConstant(op); | 463 HConstant* constant = chunk_->LookupConstant(op); |
458 ASSERT(constant->HasDoubleValue()); | 464 ASSERT(constant->HasDoubleValue()); |
459 return constant->DoubleValue(); | 465 return constant->DoubleValue(); |
460 } | 466 } |
461 | 467 |
462 | 468 |
463 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { | 469 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { |
464 HConstant* constant = chunk_->LookupConstant(op); | 470 HConstant* constant = chunk_->LookupConstant(op); |
465 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); | 471 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); |
(...skipping 5212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5678 FixedArray::kHeaderSize - kPointerSize)); | 5684 FixedArray::kHeaderSize - kPointerSize)); |
5679 __ bind(&done); | 5685 __ bind(&done); |
5680 } | 5686 } |
5681 | 5687 |
5682 | 5688 |
5683 #undef __ | 5689 #undef __ |
5684 | 5690 |
5685 } } // namespace v8::internal | 5691 } } // namespace v8::internal |
5686 | 5692 |
5687 #endif // V8_TARGET_ARCH_X64 | 5693 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |