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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 409 |
410 | 410 |
411 bool LCodeGen::IsTaggedConstant(LConstantOperand* op) const { | 411 bool LCodeGen::IsTaggedConstant(LConstantOperand* op) const { |
412 return op->IsConstantOperand() && | 412 return op->IsConstantOperand() && |
413 chunk_->LookupLiteralRepresentation(op).IsTagged(); | 413 chunk_->LookupLiteralRepresentation(op).IsTagged(); |
414 } | 414 } |
415 | 415 |
416 | 416 |
417 int LCodeGen::ToInteger32(LConstantOperand* op) const { | 417 int LCodeGen::ToInteger32(LConstantOperand* op) const { |
418 HConstant* constant = chunk_->LookupConstant(op); | 418 HConstant* constant = chunk_->LookupConstant(op); |
| 419 ASSERT(chunk_->LookupLiteralRepresentation(op).IsInteger32()); |
| 420 ASSERT(constant->HasInteger32Value()); |
419 return constant->Integer32Value(); | 421 return constant->Integer32Value(); |
420 } | 422 } |
421 | 423 |
422 | 424 |
423 double LCodeGen::ToDouble(LConstantOperand* op) const { | 425 double LCodeGen::ToDouble(LConstantOperand* op) const { |
424 HConstant* constant = chunk_->LookupConstant(op); | 426 HConstant* constant = chunk_->LookupConstant(op); |
425 ASSERT(constant->HasDoubleValue()); | 427 ASSERT(constant->HasDoubleValue()); |
426 return constant->DoubleValue(); | 428 return constant->DoubleValue(); |
427 } | 429 } |
428 | 430 |
(...skipping 5143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5572 FixedArray::kHeaderSize - kPointerSize)); | 5574 FixedArray::kHeaderSize - kPointerSize)); |
5573 __ bind(&done); | 5575 __ bind(&done); |
5574 } | 5576 } |
5575 | 5577 |
5576 | 5578 |
5577 #undef __ | 5579 #undef __ |
5578 | 5580 |
5579 } } // namespace v8::internal | 5581 } } // namespace v8::internal |
5580 | 5582 |
5581 #endif // V8_TARGET_ARCH_X64 | 5583 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |