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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 codegen->AddDeferredCode(this); | 541 codegen->AddDeferredCode(this); |
542 } | 542 } |
543 | 543 |
544 virtual ~LDeferredCode() {} | 544 virtual ~LDeferredCode() {} |
545 virtual void Generate() = 0; | 545 virtual void Generate() = 0; |
546 virtual LInstruction* instr() = 0; | 546 virtual LInstruction* instr() = 0; |
547 | 547 |
548 void SetExit(Label* exit) { external_exit_ = exit; } | 548 void SetExit(Label* exit) { external_exit_ = exit; } |
549 Label* entry() { return &entry_; } | 549 Label* entry() { return &entry_; } |
550 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } | 550 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } |
551 Label* done() { return &done_; } | 551 Label* done() { return codegen_->NeedsDeferredFrame() ? &done_ : exit(); } |
552 int instruction_index() const { return instruction_index_; } | 552 int instruction_index() const { return instruction_index_; } |
553 const LCodeGen::X87Stack& x87_stack() const { return x87_stack_; } | 553 const LCodeGen::X87Stack& x87_stack() const { return x87_stack_; } |
554 | 554 |
555 protected: | 555 protected: |
556 LCodeGen* codegen() const { return codegen_; } | 556 LCodeGen* codegen() const { return codegen_; } |
557 MacroAssembler* masm() const { return codegen_->masm(); } | 557 MacroAssembler* masm() const { return codegen_->masm(); } |
558 | 558 |
559 private: | 559 private: |
560 LCodeGen* codegen_; | 560 LCodeGen* codegen_; |
561 Label entry_; | 561 Label entry_; |
562 Label exit_; | 562 Label exit_; |
563 Label* external_exit_; | 563 Label* external_exit_; |
564 Label done_; | 564 Label done_; |
565 int instruction_index_; | 565 int instruction_index_; |
566 LCodeGen::X87Stack x87_stack_; | 566 LCodeGen::X87Stack x87_stack_; |
567 }; | 567 }; |
568 | 568 |
569 } } // namespace v8::internal | 569 } } // namespace v8::internal |
570 | 570 |
571 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 571 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |