| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 friend class LDeferredCode; | 339 friend class LDeferredCode; |
| 340 friend class LEnvironment; | 340 friend class LEnvironment; |
| 341 friend class SafepointGenerator; | 341 friend class SafepointGenerator; |
| 342 DISALLOW_COPY_AND_ASSIGN(LCodeGen); | 342 DISALLOW_COPY_AND_ASSIGN(LCodeGen); |
| 343 }; | 343 }; |
| 344 | 344 |
| 345 | 345 |
| 346 class LDeferredCode: public ZoneObject { | 346 class LDeferredCode: public ZoneObject { |
| 347 public: | 347 public: |
| 348 explicit LDeferredCode(LCodeGen* codegen) | 348 explicit LDeferredCode(LCodeGen* codegen) |
| 349 : codegen_(codegen), external_exit_(NULL) { | 349 : codegen_(codegen), |
| 350 external_exit_(NULL), |
| 351 instruction_index_(codegen->current_instruction_) { |
| 350 codegen->AddDeferredCode(this); | 352 codegen->AddDeferredCode(this); |
| 351 } | 353 } |
| 352 | 354 |
| 353 virtual ~LDeferredCode() { } | 355 virtual ~LDeferredCode() { } |
| 354 virtual void Generate() = 0; | 356 virtual void Generate() = 0; |
| 357 virtual LInstruction* instr() = 0; |
| 355 | 358 |
| 356 void SetExit(Label *exit) { external_exit_ = exit; } | 359 void SetExit(Label *exit) { external_exit_ = exit; } |
| 357 Label* entry() { return &entry_; } | 360 Label* entry() { return &entry_; } |
| 358 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } | 361 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } |
| 362 int instruction_index() const { return instruction_index_; } |
| 359 | 363 |
| 360 protected: | 364 protected: |
| 361 LCodeGen* codegen() const { return codegen_; } | 365 LCodeGen* codegen() const { return codegen_; } |
| 362 MacroAssembler* masm() const { return codegen_->masm(); } | 366 MacroAssembler* masm() const { return codegen_->masm(); } |
| 363 | 367 |
| 364 private: | 368 private: |
| 365 LCodeGen* codegen_; | 369 LCodeGen* codegen_; |
| 366 Label entry_; | 370 Label entry_; |
| 367 Label exit_; | 371 Label exit_; |
| 368 Label* external_exit_; | 372 Label* external_exit_; |
| 373 int instruction_index_; |
| 369 }; | 374 }; |
| 370 | 375 |
| 371 } } // namespace v8::internal | 376 } } // namespace v8::internal |
| 372 | 377 |
| 373 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 378 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
| OLD | NEW |