| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 private: | 446 private: |
| 447 ZoneList<LOperand*> pointer_operands_; | 447 ZoneList<LOperand*> pointer_operands_; |
| 448 ZoneList<LOperand*> untagged_operands_; | 448 ZoneList<LOperand*> untagged_operands_; |
| 449 int position_; | 449 int position_; |
| 450 int lithium_position_; | 450 int lithium_position_; |
| 451 }; | 451 }; |
| 452 | 452 |
| 453 | 453 |
| 454 class LEnvironment: public ZoneObject { | 454 class LEnvironment: public ZoneObject { |
| 455 public: | 455 public: |
| 456 LEnvironment(Handle<JSFunction> closure, | 456 LEnvironment(HEnvironment* hydrogen, // Mutable! Do not store. |
| 457 FrameType frame_type, | |
| 458 BailoutId ast_id, | |
| 459 int parameter_count, | |
| 460 int argument_count, | 457 int argument_count, |
| 461 int value_count, | |
| 462 LEnvironment* outer, | 458 LEnvironment* outer, |
| 463 Zone* zone) | 459 Zone* zone) |
| 464 : closure_(closure), | 460 : closure_(hydrogen->closure()), |
| 465 frame_type_(frame_type), | 461 frame_type_(hydrogen->frame_type()), |
| 466 arguments_stack_height_(argument_count), | 462 arguments_stack_height_(argument_count), |
| 463 handler_count_(hydrogen->handler_count()), |
| 467 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), | 464 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), |
| 468 translation_index_(-1), | 465 translation_index_(-1), |
| 469 ast_id_(ast_id), | 466 ast_id_(hydrogen->ast_id()), |
| 470 parameter_count_(parameter_count), | 467 parameter_count_(hydrogen->parameter_count()), |
| 471 pc_offset_(-1), | 468 pc_offset_(-1), |
| 472 values_(value_count, zone), | 469 values_(hydrogen->length(), zone), |
| 473 is_tagged_(value_count, zone), | 470 is_tagged_(hydrogen->length(), zone), |
| 474 is_uint32_(value_count, zone), | 471 is_uint32_(hydrogen->length(), zone), |
| 475 spilled_registers_(NULL), | 472 spilled_registers_(NULL), |
| 476 spilled_double_registers_(NULL), | 473 spilled_double_registers_(NULL), |
| 477 outer_(outer), | 474 outer_(outer), |
| 478 zone_(zone) { } | 475 zone_(zone) { } |
| 479 | 476 |
| 480 Handle<JSFunction> closure() const { return closure_; } | 477 Handle<JSFunction> closure() const { return closure_; } |
| 481 FrameType frame_type() const { return frame_type_; } | 478 FrameType frame_type() const { return frame_type_; } |
| 482 int arguments_stack_height() const { return arguments_stack_height_; } | 479 int arguments_stack_height() const { return arguments_stack_height_; } |
| 480 int handler_count() const { return handler_count_; } |
| 483 int deoptimization_index() const { return deoptimization_index_; } | 481 int deoptimization_index() const { return deoptimization_index_; } |
| 484 int translation_index() const { return translation_index_; } | 482 int translation_index() const { return translation_index_; } |
| 485 BailoutId ast_id() const { return ast_id_; } | 483 BailoutId ast_id() const { return ast_id_; } |
| 486 int parameter_count() const { return parameter_count_; } | 484 int parameter_count() const { return parameter_count_; } |
| 487 int pc_offset() const { return pc_offset_; } | 485 int pc_offset() const { return pc_offset_; } |
| 488 LOperand** spilled_registers() const { return spilled_registers_; } | 486 LOperand** spilled_registers() const { return spilled_registers_; } |
| 489 LOperand** spilled_double_registers() const { | 487 LOperand** spilled_double_registers() const { |
| 490 return spilled_double_registers_; | 488 return spilled_double_registers_; |
| 491 } | 489 } |
| 492 const ZoneList<LOperand*>* values() const { return &values_; } | 490 const ZoneList<LOperand*>* values() const { return &values_; } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 531 } |
| 534 | 532 |
| 535 void PrintTo(StringStream* stream); | 533 void PrintTo(StringStream* stream); |
| 536 | 534 |
| 537 Zone* zone() const { return zone_; } | 535 Zone* zone() const { return zone_; } |
| 538 | 536 |
| 539 private: | 537 private: |
| 540 Handle<JSFunction> closure_; | 538 Handle<JSFunction> closure_; |
| 541 FrameType frame_type_; | 539 FrameType frame_type_; |
| 542 int arguments_stack_height_; | 540 int arguments_stack_height_; |
| 541 int handler_count_; |
| 543 int deoptimization_index_; | 542 int deoptimization_index_; |
| 544 int translation_index_; | 543 int translation_index_; |
| 545 BailoutId ast_id_; | 544 BailoutId ast_id_; |
| 546 int parameter_count_; | 545 int parameter_count_; |
| 547 int pc_offset_; | 546 int pc_offset_; |
| 548 ZoneList<LOperand*> values_; | 547 ZoneList<LOperand*> values_; |
| 549 BitVector is_tagged_; | 548 BitVector is_tagged_; |
| 550 BitVector is_uint32_; | 549 BitVector is_uint32_; |
| 551 | 550 |
| 552 // Allocation index indexed arrays of spill slot operands for registers | 551 // Allocation index indexed arrays of spill slot operands for registers |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 ZoneList<Handle<JSFunction> > inlined_closures_; | 696 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 698 }; | 697 }; |
| 699 | 698 |
| 700 | 699 |
| 701 int ElementsKindToShiftSize(ElementsKind elements_kind); | 700 int ElementsKindToShiftSize(ElementsKind elements_kind); |
| 702 | 701 |
| 703 | 702 |
| 704 } } // namespace v8::internal | 703 } } // namespace v8::internal |
| 705 | 704 |
| 706 #endif // V8_LITHIUM_H_ | 705 #endif // V8_LITHIUM_H_ |
| OLD | NEW |