Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: src/lithium.h

Issue 16381006: Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), rem… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add --always-osr flag. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/lithium-allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 arguments_stack_height_(argument_count), 526 arguments_stack_height_(argument_count),
527 deoptimization_index_(Safepoint::kNoDeoptimizationIndex), 527 deoptimization_index_(Safepoint::kNoDeoptimizationIndex),
528 translation_index_(-1), 528 translation_index_(-1),
529 ast_id_(ast_id), 529 ast_id_(ast_id),
530 translation_size_(value_count), 530 translation_size_(value_count),
531 parameter_count_(parameter_count), 531 parameter_count_(parameter_count),
532 pc_offset_(-1), 532 pc_offset_(-1),
533 values_(value_count, zone), 533 values_(value_count, zone),
534 is_tagged_(value_count, zone), 534 is_tagged_(value_count, zone),
535 is_uint32_(value_count, zone), 535 is_uint32_(value_count, zone),
536 spilled_registers_(NULL),
537 spilled_double_registers_(NULL),
538 outer_(outer), 536 outer_(outer),
539 entry_(entry), 537 entry_(entry),
540 zone_(zone) { } 538 zone_(zone) { }
541 539
542 Handle<JSFunction> closure() const { return closure_; } 540 Handle<JSFunction> closure() const { return closure_; }
543 FrameType frame_type() const { return frame_type_; } 541 FrameType frame_type() const { return frame_type_; }
544 int arguments_stack_height() const { return arguments_stack_height_; } 542 int arguments_stack_height() const { return arguments_stack_height_; }
545 int deoptimization_index() const { return deoptimization_index_; } 543 int deoptimization_index() const { return deoptimization_index_; }
546 int translation_index() const { return translation_index_; } 544 int translation_index() const { return translation_index_; }
547 BailoutId ast_id() const { return ast_id_; } 545 BailoutId ast_id() const { return ast_id_; }
548 int translation_size() const { return translation_size_; } 546 int translation_size() const { return translation_size_; }
549 int parameter_count() const { return parameter_count_; } 547 int parameter_count() const { return parameter_count_; }
550 int pc_offset() const { return pc_offset_; } 548 int pc_offset() const { return pc_offset_; }
551 LOperand** spilled_registers() const { return spilled_registers_; }
552 LOperand** spilled_double_registers() const {
553 return spilled_double_registers_;
554 }
555 const ZoneList<LOperand*>* values() const { return &values_; } 549 const ZoneList<LOperand*>* values() const { return &values_; }
556 LEnvironment* outer() const { return outer_; } 550 LEnvironment* outer() const { return outer_; }
557 HEnterInlined* entry() { return entry_; } 551 HEnterInlined* entry() { return entry_; }
558 Zone* zone() const { return zone_; } 552 Zone* zone() const { return zone_; }
559 553
560 void AddValue(LOperand* operand, 554 void AddValue(LOperand* operand,
561 Representation representation, 555 Representation representation,
562 bool is_uint32) { 556 bool is_uint32) {
563 values_.Add(operand, zone()); 557 values_.Add(operand, zone());
564 if (representation.IsSmiOrTagged()) { 558 if (representation.IsSmiOrTagged()) {
(...skipping 19 matching lines...) Expand all
584 int pc_offset) { 578 int pc_offset) {
585 ASSERT(!HasBeenRegistered()); 579 ASSERT(!HasBeenRegistered());
586 deoptimization_index_ = deoptimization_index; 580 deoptimization_index_ = deoptimization_index;
587 translation_index_ = translation_index; 581 translation_index_ = translation_index;
588 pc_offset_ = pc_offset; 582 pc_offset_ = pc_offset;
589 } 583 }
590 bool HasBeenRegistered() const { 584 bool HasBeenRegistered() const {
591 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex; 585 return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex;
592 } 586 }
593 587
594 void SetSpilledRegisters(LOperand** registers,
595 LOperand** double_registers) {
596 spilled_registers_ = registers;
597 spilled_double_registers_ = double_registers;
598 }
599
600 void PrintTo(StringStream* stream); 588 void PrintTo(StringStream* stream);
601 589
602 private: 590 private:
603 Handle<JSFunction> closure_; 591 Handle<JSFunction> closure_;
604 FrameType frame_type_; 592 FrameType frame_type_;
605 int arguments_stack_height_; 593 int arguments_stack_height_;
606 int deoptimization_index_; 594 int deoptimization_index_;
607 int translation_index_; 595 int translation_index_;
608 BailoutId ast_id_; 596 BailoutId ast_id_;
609 int translation_size_; 597 int translation_size_;
610 int parameter_count_; 598 int parameter_count_;
611 int pc_offset_; 599 int pc_offset_;
612 600
613 // Value array: [parameters] [locals] [expression stack] [de-materialized]. 601 // Value array: [parameters] [locals] [expression stack] [de-materialized].
614 // |>--------- translation_size ---------<| 602 // |>--------- translation_size ---------<|
615 ZoneList<LOperand*> values_; 603 ZoneList<LOperand*> values_;
616 GrowableBitVector is_tagged_; 604 GrowableBitVector is_tagged_;
617 GrowableBitVector is_uint32_; 605 GrowableBitVector is_uint32_;
618
619 // Allocation index indexed arrays of spill slot operands for registers
620 // that are also in spill slots at an OSR entry. NULL for environments
621 // that do not correspond to an OSR entry.
622 LOperand** spilled_registers_;
623 LOperand** spilled_double_registers_;
624
625 LEnvironment* outer_; 606 LEnvironment* outer_;
626 HEnterInlined* entry_; 607 HEnterInlined* entry_;
627 Zone* zone_; 608 Zone* zone_;
628 }; 609 };
629 610
630 611
631 // Iterates over the non-null, non-constant operands in an environment. 612 // Iterates over the non-null, non-constant operands in an environment.
632 class ShallowIterator BASE_EMBEDDED { 613 class ShallowIterator BASE_EMBEDDED {
633 public: 614 public:
634 explicit ShallowIterator(LEnvironment* env) 615 explicit ShallowIterator(LEnvironment* env)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 private: 769 private:
789 LChunk* chunk_; 770 LChunk* chunk_;
790 771
791 DISALLOW_COPY_AND_ASSIGN(LPhase); 772 DISALLOW_COPY_AND_ASSIGN(LPhase);
792 }; 773 };
793 774
794 775
795 } } // namespace v8::internal 776 } } // namespace v8::internal
796 777
797 #endif // V8_LITHIUM_H_ 778 #endif // V8_LITHIUM_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698