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

Side by Side Diff: src/lithium.h

Issue 256303007: Don't add code dependencies on transitioning stores eagerly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LITHIUM_H_ 5 #ifndef V8_LITHIUM_H_
6 #define V8_LITHIUM_H_ 6 #define V8_LITHIUM_H_
7 7
8 #include <set>
9
8 #include "allocation.h" 10 #include "allocation.h"
9 #include "hydrogen.h" 11 #include "hydrogen.h"
10 #include "safepoint-table.h" 12 #include "safepoint-table.h"
13 #include "zone-allocator.h"
11 14
12 namespace v8 { 15 namespace v8 {
13 namespace internal { 16 namespace internal {
14 17
15 #define LITHIUM_OPERAND_LIST(V) \ 18 #define LITHIUM_OPERAND_LIST(V) \
16 V(ConstantOperand, CONSTANT_OPERAND, 128) \ 19 V(ConstantOperand, CONSTANT_OPERAND, 128) \
17 V(StackSlot, STACK_SLOT, 128) \ 20 V(StackSlot, STACK_SLOT, 128) \
18 V(DoubleStackSlot, DOUBLE_STACK_SLOT, 128) \ 21 V(DoubleStackSlot, DOUBLE_STACK_SLOT, 128) \
19 V(Register, REGISTER, 16) \ 22 V(Register, REGISTER, 16) \
20 V(DoubleRegister, DOUBLE_REGISTER, 16) 23 V(DoubleRegister, DOUBLE_REGISTER, 16)
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 Label* GetAssemblyLabel(int block_id) const; 638 Label* GetAssemblyLabel(int block_id) const;
636 639
637 const ZoneList<Handle<JSFunction> >* inlined_closures() const { 640 const ZoneList<Handle<JSFunction> >* inlined_closures() const {
638 return &inlined_closures_; 641 return &inlined_closures_;
639 } 642 }
640 643
641 void AddInlinedClosure(Handle<JSFunction> closure) { 644 void AddInlinedClosure(Handle<JSFunction> closure) {
642 inlined_closures_.Add(closure, zone()); 645 inlined_closures_.Add(closure, zone());
643 } 646 }
644 647
648 void AddDeprecationDependency(Handle<Map> map) {
649 ASSERT(!map->is_deprecated());
650 if (!map->CanBeDeprecated()) return;
651 ASSERT(!info_->IsStub());
652 deprecation_dependencies_.insert(map);
653 }
654
645 Zone* zone() const { return info_->zone(); } 655 Zone* zone() const { return info_->zone(); }
646 656
647 Handle<Code> Codegen(); 657 Handle<Code> Codegen();
648 658
649 void set_allocated_double_registers(BitVector* allocated_registers); 659 void set_allocated_double_registers(BitVector* allocated_registers);
650 BitVector* allocated_double_registers() { 660 BitVector* allocated_double_registers() {
651 return allocated_double_registers_; 661 return allocated_double_registers_;
652 } 662 }
653 663
654 protected: 664 protected:
655 LChunk(CompilationInfo* info, HGraph* graph); 665 LChunk(CompilationInfo* info, HGraph* graph);
656 666
657 int spill_slot_count_; 667 int spill_slot_count_;
658 668
659 private: 669 private:
670 typedef std::less<Handle<Map> > MapLess;
671 typedef zone_allocator<Handle<Map> > MapAllocator;
672 typedef std::set<Handle<Map>, MapLess, MapAllocator> MapSet;
673
674 void CommitDependencies(Handle<Code> code) const;
675
660 CompilationInfo* info_; 676 CompilationInfo* info_;
661 HGraph* const graph_; 677 HGraph* const graph_;
662 BitVector* allocated_double_registers_; 678 BitVector* allocated_double_registers_;
663 ZoneList<LInstruction*> instructions_; 679 ZoneList<LInstruction*> instructions_;
664 ZoneList<LPointerMap*> pointer_maps_; 680 ZoneList<LPointerMap*> pointer_maps_;
665 ZoneList<Handle<JSFunction> > inlined_closures_; 681 ZoneList<Handle<JSFunction> > inlined_closures_;
682 MapSet deprecation_dependencies_;
666 }; 683 };
667 684
668 685
669 class LChunkBuilderBase BASE_EMBEDDED { 686 class LChunkBuilderBase BASE_EMBEDDED {
670 public: 687 public:
671 explicit LChunkBuilderBase(Zone* zone) 688 explicit LChunkBuilderBase(Zone* zone)
672 : argument_count_(0), 689 : argument_count_(0),
673 zone_(zone) { } 690 zone_(zone) { }
674 691
675 virtual ~LChunkBuilderBase() { } 692 virtual ~LChunkBuilderBase() { }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 private: 730 private:
714 LChunk* chunk_; 731 LChunk* chunk_;
715 732
716 DISALLOW_COPY_AND_ASSIGN(LPhase); 733 DISALLOW_COPY_AND_ASSIGN(LPhase);
717 }; 734 };
718 735
719 736
720 } } // namespace v8::internal 737 } } // namespace v8::internal
721 738
722 #endif // V8_LITHIUM_H_ 739 #endif // V8_LITHIUM_H_
OLDNEW
« src/handles.h ('K') | « src/ia32/lithium-ia32.cc ('k') | src/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698