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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 469 |
470 void PrintDataTo(StringStream* stream) const; | 470 void PrintDataTo(StringStream* stream) const; |
471 | 471 |
472 private: | 472 private: |
473 ZoneList<LMoveOperands> move_operands_; | 473 ZoneList<LMoveOperands> move_operands_; |
474 }; | 474 }; |
475 | 475 |
476 | 476 |
477 class LPointerMap V8_FINAL : public ZoneObject { | 477 class LPointerMap V8_FINAL : public ZoneObject { |
478 public: | 478 public: |
479 explicit LPointerMap(int position, Zone* zone) | 479 explicit LPointerMap(Zone* zone) |
480 : pointer_operands_(8, zone), | 480 : pointer_operands_(8, zone), |
481 untagged_operands_(0, zone), | 481 untagged_operands_(0, zone), |
482 position_(position), | |
483 lithium_position_(-1) { } | 482 lithium_position_(-1) { } |
484 | 483 |
485 const ZoneList<LOperand*>* GetNormalizedOperands() { | 484 const ZoneList<LOperand*>* GetNormalizedOperands() { |
486 for (int i = 0; i < untagged_operands_.length(); ++i) { | 485 for (int i = 0; i < untagged_operands_.length(); ++i) { |
487 RemovePointer(untagged_operands_[i]); | 486 RemovePointer(untagged_operands_[i]); |
488 } | 487 } |
489 untagged_operands_.Clear(); | 488 untagged_operands_.Clear(); |
490 return &pointer_operands_; | 489 return &pointer_operands_; |
491 } | 490 } |
492 int position() const { return position_; } | |
493 int lithium_position() const { return lithium_position_; } | 491 int lithium_position() const { return lithium_position_; } |
494 | 492 |
495 void set_lithium_position(int pos) { | 493 void set_lithium_position(int pos) { |
496 ASSERT(lithium_position_ == -1); | 494 ASSERT(lithium_position_ == -1); |
497 lithium_position_ = pos; | 495 lithium_position_ = pos; |
498 } | 496 } |
499 | 497 |
500 void RecordPointer(LOperand* op, Zone* zone); | 498 void RecordPointer(LOperand* op, Zone* zone); |
501 void RemovePointer(LOperand* op); | 499 void RemovePointer(LOperand* op); |
502 void RecordUntagged(LOperand* op, Zone* zone); | 500 void RecordUntagged(LOperand* op, Zone* zone); |
503 void PrintTo(StringStream* stream); | 501 void PrintTo(StringStream* stream); |
504 | 502 |
505 private: | 503 private: |
506 ZoneList<LOperand*> pointer_operands_; | 504 ZoneList<LOperand*> pointer_operands_; |
507 ZoneList<LOperand*> untagged_operands_; | 505 ZoneList<LOperand*> untagged_operands_; |
508 int position_; | |
509 int lithium_position_; | 506 int lithium_position_; |
510 }; | 507 }; |
511 | 508 |
512 | 509 |
513 class LEnvironment V8_FINAL : public ZoneObject { | 510 class LEnvironment V8_FINAL : public ZoneObject { |
514 public: | 511 public: |
515 LEnvironment(Handle<JSFunction> closure, | 512 LEnvironment(Handle<JSFunction> closure, |
516 FrameType frame_type, | 513 FrameType frame_type, |
517 BailoutId ast_id, | 514 BailoutId ast_id, |
518 int parameter_count, | 515 int parameter_count, |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 private: | 810 private: |
814 LChunk* chunk_; | 811 LChunk* chunk_; |
815 | 812 |
816 DISALLOW_COPY_AND_ASSIGN(LPhase); | 813 DISALLOW_COPY_AND_ASSIGN(LPhase); |
817 }; | 814 }; |
818 | 815 |
819 | 816 |
820 } } // namespace v8::internal | 817 } } // namespace v8::internal |
821 | 818 |
822 #endif // V8_LITHIUM_H_ | 819 #endif // V8_LITHIUM_H_ |
OLD | NEW |