| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 frame_type_(frame_type), | 525 frame_type_(frame_type), |
| 526 arguments_stack_height_(argument_count), | 526 arguments_stack_height_(argument_count), |
| 527 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), | 527 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), |
| 528 translation_index_(-1), | 528 translation_index_(-1), |
| 529 ast_id_(ast_id), | 529 ast_id_(ast_id), |
| 530 parameter_count_(parameter_count), | 530 parameter_count_(parameter_count), |
| 531 pc_offset_(-1), | 531 pc_offset_(-1), |
| 532 values_(value_count, zone), | 532 values_(value_count, zone), |
| 533 is_tagged_(value_count, zone), | 533 is_tagged_(value_count, zone), |
| 534 is_uint32_(value_count, zone), | 534 is_uint32_(value_count, zone), |
| 535 spilled_registers_(NULL), | |
| 536 spilled_double_registers_(NULL), | |
| 537 outer_(outer), | 535 outer_(outer), |
| 538 entry_(entry), | 536 entry_(entry), |
| 539 zone_(zone) { } | 537 zone_(zone) { } |
| 540 | 538 |
| 541 Handle<JSFunction> closure() const { return closure_; } | 539 Handle<JSFunction> closure() const { return closure_; } |
| 542 FrameType frame_type() const { return frame_type_; } | 540 FrameType frame_type() const { return frame_type_; } |
| 543 int arguments_stack_height() const { return arguments_stack_height_; } | 541 int arguments_stack_height() const { return arguments_stack_height_; } |
| 544 int deoptimization_index() const { return deoptimization_index_; } | 542 int deoptimization_index() const { return deoptimization_index_; } |
| 545 int translation_index() const { return translation_index_; } | 543 int translation_index() const { return translation_index_; } |
| 546 BailoutId ast_id() const { return ast_id_; } | 544 BailoutId ast_id() const { return ast_id_; } |
| 547 int parameter_count() const { return parameter_count_; } | 545 int parameter_count() const { return parameter_count_; } |
| 548 int pc_offset() const { return pc_offset_; } | 546 int pc_offset() const { return pc_offset_; } |
| 549 LOperand** spilled_registers() const { return spilled_registers_; } | |
| 550 LOperand** spilled_double_registers() const { | |
| 551 return spilled_double_registers_; | |
| 552 } | |
| 553 const ZoneList<LOperand*>* values() const { return &values_; } | 547 const ZoneList<LOperand*>* values() const { return &values_; } |
| 554 LEnvironment* outer() const { return outer_; } | 548 LEnvironment* outer() const { return outer_; } |
| 555 HEnterInlined* entry() { return entry_; } | 549 HEnterInlined* entry() { return entry_; } |
| 556 | 550 |
| 557 void AddValue(LOperand* operand, | 551 void AddValue(LOperand* operand, |
| 558 Representation representation, | 552 Representation representation, |
| 559 bool is_uint32) { | 553 bool is_uint32) { |
| 560 values_.Add(operand, zone()); | 554 values_.Add(operand, zone()); |
| 561 if (representation.IsSmiOrTagged()) { | 555 if (representation.IsSmiOrTagged()) { |
| 562 ASSERT(!is_uint32); | 556 ASSERT(!is_uint32); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 581 int pc_offset) { | 575 int pc_offset) { |
| 582 ASSERT(!HasBeenRegistered()); | 576 ASSERT(!HasBeenRegistered()); |
| 583 deoptimization_index_ = deoptimization_index; | 577 deoptimization_index_ = deoptimization_index; |
| 584 translation_index_ = translation_index; | 578 translation_index_ = translation_index; |
| 585 pc_offset_ = pc_offset; | 579 pc_offset_ = pc_offset; |
| 586 } | 580 } |
| 587 bool HasBeenRegistered() const { | 581 bool HasBeenRegistered() const { |
| 588 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; | 582 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; |
| 589 } | 583 } |
| 590 | 584 |
| 591 void SetSpilledRegisters(LOperand** registers, | |
| 592 LOperand** double_registers) { | |
| 593 spilled_registers_ = registers; | |
| 594 spilled_double_registers_ = double_registers; | |
| 595 } | |
| 596 | |
| 597 void PrintTo(StringStream* stream); | 585 void PrintTo(StringStream* stream); |
| 598 | 586 |
| 599 Zone* zone() const { return zone_; } | 587 Zone* zone() const { return zone_; } |
| 600 | 588 |
| 601 private: | 589 private: |
| 602 Handle<JSFunction> closure_; | 590 Handle<JSFunction> closure_; |
| 603 FrameType frame_type_; | 591 FrameType frame_type_; |
| 604 int arguments_stack_height_; | 592 int arguments_stack_height_; |
| 605 int deoptimization_index_; | 593 int deoptimization_index_; |
| 606 int translation_index_; | 594 int translation_index_; |
| 607 BailoutId ast_id_; | 595 BailoutId ast_id_; |
| 608 int parameter_count_; | 596 int parameter_count_; |
| 609 int pc_offset_; | 597 int pc_offset_; |
| 610 ZoneList<LOperand*> values_; | 598 ZoneList<LOperand*> values_; |
| 611 BitVector is_tagged_; | 599 BitVector is_tagged_; |
| 612 BitVector is_uint32_; | 600 BitVector is_uint32_; |
| 613 | |
| 614 // Allocation index indexed arrays of spill slot operands for registers | |
| 615 // that are also in spill slots at an OSR entry. NULL for environments | |
| 616 // that do not correspond to an OSR entry. | |
| 617 LOperand** spilled_registers_; | |
| 618 LOperand** spilled_double_registers_; | |
| 619 | |
| 620 LEnvironment* outer_; | 601 LEnvironment* outer_; |
| 621 HEnterInlined* entry_; | 602 HEnterInlined* entry_; |
| 622 | 603 |
| 623 Zone* zone_; | 604 Zone* zone_; |
| 624 }; | 605 }; |
| 625 | 606 |
| 626 | 607 |
| 627 // Iterates over the non-null, non-constant operands in an environment. | 608 // Iterates over the non-null, non-constant operands in an environment. |
| 628 class ShallowIterator BASE_EMBEDDED { | 609 class ShallowIterator BASE_EMBEDDED { |
| 629 public: | 610 public: |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 enum NumberUntagDMode { | 751 enum NumberUntagDMode { |
| 771 NUMBER_CANDIDATE_IS_SMI, | 752 NUMBER_CANDIDATE_IS_SMI, |
| 772 NUMBER_CANDIDATE_IS_ANY_TAGGED, | 753 NUMBER_CANDIDATE_IS_ANY_TAGGED, |
| 773 NUMBER_CANDIDATE_IS_ANY_TAGGED_CONVERT_HOLE | 754 NUMBER_CANDIDATE_IS_ANY_TAGGED_CONVERT_HOLE |
| 774 }; | 755 }; |
| 775 | 756 |
| 776 | 757 |
| 777 } } // namespace v8::internal | 758 } } // namespace v8::internal |
| 778 | 759 |
| 779 #endif // V8_LITHIUM_H_ | 760 #endif // V8_LITHIUM_H_ |
| OLD | NEW |