| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 int gap_instructions_size_; | 400 int gap_instructions_size_; |
| 401 }; | 401 }; |
| 402 | 402 |
| 403 | 403 |
| 404 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { | 404 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { |
| 405 public: | 405 public: |
| 406 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") | 406 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") |
| 407 }; | 407 }; |
| 408 | 408 |
| 409 | 409 |
| 410 class LLabel: public LGap { | 410 class LLabel: public LTemplateInstruction<0, 0, 0> { |
| 411 public: | 411 public: |
| 412 explicit LLabel(HBasicBlock* block) | 412 explicit LLabel(HBasicBlock* block) |
| 413 : LGap(block), replacement_(NULL) { } | 413 : block_(block), replacement_(NULL) { } |
| 414 | 414 |
| 415 DECLARE_CONCRETE_INSTRUCTION(Label, "label") | 415 DECLARE_CONCRETE_INSTRUCTION(Label, "label") |
| 416 | 416 |
| 417 virtual void PrintDataTo(StringStream* stream); | 417 virtual void PrintDataTo(StringStream* stream); |
| 418 | 418 |
| 419 int block_id() const { return block()->block_id(); } | 419 int block_id() const { return block_->block_id(); } |
| 420 bool is_loop_header() const { return block()->IsLoopHeader(); } | 420 bool is_loop_header() const { return block_->IsLoopHeader(); } |
| 421 Label* label() { return &label_; } | 421 Label* label() { return &label_; } |
| 422 LLabel* replacement() const { return replacement_; } | 422 LLabel* replacement() const { return replacement_; } |
| 423 void set_replacement(LLabel* label) { replacement_ = label; } | 423 void set_replacement(LLabel* label) { replacement_ = label; } |
| 424 bool HasReplacement() const { return replacement_ != NULL; } | 424 bool HasReplacement() const { return replacement_ != NULL; } |
| 425 | 425 |
| 426 private: | 426 private: |
| 427 Label label_; | 427 Label label_; |
| 428 HBasicBlock* block_; |
| 428 LLabel* replacement_; | 429 LLabel* replacement_; |
| 429 }; | 430 }; |
| 430 | 431 |
| 431 | 432 |
| 432 class LParameter: public LTemplateInstruction<1, 0, 0> { | 433 class LParameter: public LTemplateInstruction<1, 0, 0> { |
| 433 public: | 434 public: |
| 434 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") | 435 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") |
| 435 }; | 436 }; |
| 436 | 437 |
| 437 | 438 |
| (...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2015 LGap* GetGapAt(int index) const; | 2016 LGap* GetGapAt(int index) const; |
| 2016 bool IsGapAt(int index) const; | 2017 bool IsGapAt(int index) const; |
| 2017 int NearestGapPos(int index) const; | 2018 int NearestGapPos(int index) const; |
| 2018 void MarkEmptyBlocks(); | 2019 void MarkEmptyBlocks(); |
| 2019 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 2020 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
| 2020 LLabel* GetLabel(int block_id) const { | 2021 LLabel* GetLabel(int block_id) const { |
| 2021 HBasicBlock* block = graph_->blocks()->at(block_id); | 2022 HBasicBlock* block = graph_->blocks()->at(block_id); |
| 2022 int first_instruction = block->first_instruction_index(); | 2023 int first_instruction = block->first_instruction_index(); |
| 2023 return LLabel::cast(instructions_[first_instruction]); | 2024 return LLabel::cast(instructions_[first_instruction]); |
| 2024 } | 2025 } |
| 2026 LGap* GetFirstGap(HBasicBlock* block) const { |
| 2027 int first_instruction = block->first_instruction_index(); |
| 2028 return LGap::cast(instructions_[first_instruction + 1]); |
| 2029 } |
| 2025 int LookupDestination(int block_id) const { | 2030 int LookupDestination(int block_id) const { |
| 2026 LLabel* cur = GetLabel(block_id); | 2031 LLabel* cur = GetLabel(block_id); |
| 2027 while (cur->replacement() != NULL) { | 2032 while (cur->replacement() != NULL) { |
| 2028 cur = cur->replacement(); | 2033 cur = cur->replacement(); |
| 2029 } | 2034 } |
| 2030 return cur->block_id(); | 2035 return cur->block_id(); |
| 2031 } | 2036 } |
| 2032 Label* GetAssemblyLabel(int block_id) const { | 2037 Label* GetAssemblyLabel(int block_id) const { |
| 2033 LLabel* label = GetLabel(block_id); | 2038 LLabel* label = GetLabel(block_id); |
| 2034 ASSERT(!label->HasReplacement()); | 2039 ASSERT(!label->HasReplacement()); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2213 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2209 }; | 2214 }; |
| 2210 | 2215 |
| 2211 #undef DECLARE_HYDROGEN_ACCESSOR | 2216 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2212 #undef DECLARE_INSTRUCTION | 2217 #undef DECLARE_INSTRUCTION |
| 2213 #undef DECLARE_CONCRETE_INSTRUCTION | 2218 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2214 | 2219 |
| 2215 } } // namespace v8::internal | 2220 } } // namespace v8::internal |
| 2216 | 2221 |
| 2217 #endif // V8_ARM_LITHIUM_ARM_H_ | 2222 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |