OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 483 } |
484 | 484 |
485 | 485 |
486 bool LCodeGen::IsInteger32(LConstantOperand* op) const { | 486 bool LCodeGen::IsInteger32(LConstantOperand* op) const { |
487 return chunk_->LookupLiteralRepresentation(op).IsInteger32(); | 487 return chunk_->LookupLiteralRepresentation(op).IsInteger32(); |
488 } | 488 } |
489 | 489 |
490 | 490 |
491 int LCodeGen::ToInteger32(LConstantOperand* op) const { | 491 int LCodeGen::ToInteger32(LConstantOperand* op) const { |
492 HConstant* constant = chunk_->LookupConstant(op); | 492 HConstant* constant = chunk_->LookupConstant(op); |
493 ASSERT(chunk_->LookupLiteralRepresentation(op).IsInteger32()); | |
494 ASSERT(constant->HasInteger32Value()); | |
495 return constant->Integer32Value(); | 493 return constant->Integer32Value(); |
496 } | 494 } |
497 | 495 |
498 | 496 |
499 double LCodeGen::ToDouble(LConstantOperand* op) const { | 497 double LCodeGen::ToDouble(LConstantOperand* op) const { |
500 HConstant* constant = chunk_->LookupConstant(op); | 498 HConstant* constant = chunk_->LookupConstant(op); |
501 ASSERT(constant->HasDoubleValue()); | 499 ASSERT(constant->HasDoubleValue()); |
502 return constant->DoubleValue(); | 500 return constant->DoubleValue(); |
503 } | 501 } |
504 | 502 |
(...skipping 5326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5831 __ Subu(scratch, result, scratch); | 5829 __ Subu(scratch, result, scratch); |
5832 __ lw(result, FieldMemOperand(scratch, | 5830 __ lw(result, FieldMemOperand(scratch, |
5833 FixedArray::kHeaderSize - kPointerSize)); | 5831 FixedArray::kHeaderSize - kPointerSize)); |
5834 __ bind(&done); | 5832 __ bind(&done); |
5835 } | 5833 } |
5836 | 5834 |
5837 | 5835 |
5838 #undef __ | 5836 #undef __ |
5839 | 5837 |
5840 } } // namespace v8::internal | 5838 } } // namespace v8::internal |
OLD | NEW |