| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // code generation attempt succeeded. | 116 // code generation attempt succeeded. |
| 117 bool GenerateCode(); | 117 bool GenerateCode(); |
| 118 | 118 |
| 119 // Finish the code by setting stack height, safepoint, and bailout | 119 // Finish the code by setting stack height, safepoint, and bailout |
| 120 // information on it. | 120 // information on it. |
| 121 void FinishCode(Handle<Code> code); | 121 void FinishCode(Handle<Code> code); |
| 122 | 122 |
| 123 // Deferred code support. | 123 // Deferred code support. |
| 124 void DoDeferredNumberTagD(LNumberTagD* instr); | 124 void DoDeferredNumberTagD(LNumberTagD* instr); |
| 125 void DoDeferredNumberTagU(LNumberTagU* instr); | 125 void DoDeferredNumberTagU(LNumberTagU* instr); |
| 126 void DoDeferredTaggedToI(LTaggedToI* instr); | 126 void DoDeferredTaggedToI(LTaggedToI* instr, Label* done); |
| 127 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); | 127 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); |
| 128 void DoDeferredStackCheck(LStackCheck* instr); | 128 void DoDeferredStackCheck(LStackCheck* instr); |
| 129 void DoDeferredRandom(LRandom* instr); | 129 void DoDeferredRandom(LRandom* instr); |
| 130 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 130 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
| 131 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 131 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
| 132 void DoDeferredAllocate(LAllocate* instr); | 132 void DoDeferredAllocate(LAllocate* instr); |
| 133 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 133 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 134 Label* map_check); | 134 Label* map_check); |
| 135 void DoDeferredInstanceMigration(LCheckMaps* instr, Register object); | 135 void DoDeferredInstanceMigration(LCheckMaps* instr, Register object); |
| 136 | 136 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 codegen->AddDeferredCode(this); | 420 codegen->AddDeferredCode(this); |
| 421 } | 421 } |
| 422 | 422 |
| 423 virtual ~LDeferredCode() {} | 423 virtual ~LDeferredCode() {} |
| 424 virtual void Generate() = 0; | 424 virtual void Generate() = 0; |
| 425 virtual LInstruction* instr() = 0; | 425 virtual LInstruction* instr() = 0; |
| 426 | 426 |
| 427 void SetExit(Label* exit) { external_exit_ = exit; } | 427 void SetExit(Label* exit) { external_exit_ = exit; } |
| 428 Label* entry() { return &entry_; } | 428 Label* entry() { return &entry_; } |
| 429 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } | 429 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } |
| 430 Label* done() { return codegen_->NeedsDeferredFrame() ? &done_ : exit(); } |
| 430 int instruction_index() const { return instruction_index_; } | 431 int instruction_index() const { return instruction_index_; } |
| 431 | 432 |
| 432 protected: | 433 protected: |
| 433 LCodeGen* codegen() const { return codegen_; } | 434 LCodeGen* codegen() const { return codegen_; } |
| 434 MacroAssembler* masm() const { return codegen_->masm(); } | 435 MacroAssembler* masm() const { return codegen_->masm(); } |
| 435 | 436 |
| 436 private: | 437 private: |
| 437 LCodeGen* codegen_; | 438 LCodeGen* codegen_; |
| 438 Label entry_; | 439 Label entry_; |
| 439 Label exit_; | 440 Label exit_; |
| 441 Label done_; |
| 440 Label* external_exit_; | 442 Label* external_exit_; |
| 441 int instruction_index_; | 443 int instruction_index_; |
| 442 }; | 444 }; |
| 443 | 445 |
| 444 } } // namespace v8::internal | 446 } } // namespace v8::internal |
| 445 | 447 |
| 446 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 448 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
| OLD | NEW |