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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 | 518 |
519 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { | 519 Handle<Object> LCodeGen::ToHandle(LConstantOperand* op) const { |
520 HConstant* constant = chunk_->LookupConstant(op); | 520 HConstant* constant = chunk_->LookupConstant(op); |
521 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); | 521 ASSERT(chunk_->LookupLiteralRepresentation(op).IsSmiOrTagged()); |
522 return constant->handle(); | 522 return constant->handle(); |
523 } | 523 } |
524 | 524 |
525 | 525 |
526 bool LCodeGen::IsInteger32(LConstantOperand* op) const { | 526 bool LCodeGen::IsInteger32(LConstantOperand* op) const { |
527 return chunk_->LookupLiteralRepresentation(op).IsInteger32(); | 527 return chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32(); |
528 } | 528 } |
529 | 529 |
530 | 530 |
531 bool LCodeGen::IsSmi(LConstantOperand* op) const { | 531 bool LCodeGen::IsSmi(LConstantOperand* op) const { |
532 return chunk_->LookupLiteralRepresentation(op).IsSmi(); | 532 return chunk_->LookupLiteralRepresentation(op).IsSmi(); |
533 } | 533 } |
534 | 534 |
535 | 535 |
536 int LCodeGen::ToInteger32(LConstantOperand* op) const { | 536 int LCodeGen::ToInteger32(LConstantOperand* op) const { |
537 HConstant* constant = chunk_->LookupConstant(op); | 537 HConstant* constant = chunk_->LookupConstant(op); |
(...skipping 5448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5986 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5986 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5987 __ ldr(result, FieldMemOperand(scratch, | 5987 __ ldr(result, FieldMemOperand(scratch, |
5988 FixedArray::kHeaderSize - kPointerSize)); | 5988 FixedArray::kHeaderSize - kPointerSize)); |
5989 __ bind(&done); | 5989 __ bind(&done); |
5990 } | 5990 } |
5991 | 5991 |
5992 | 5992 |
5993 #undef __ | 5993 #undef __ |
5994 | 5994 |
5995 } } // namespace v8::internal | 5995 } } // namespace v8::internal |
OLD | NEW |