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

Side by Side Diff: src/lithium.h

Issue 93803003: Fixed Lithium environment generation bug for captured objects (created (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Move common code from LChunkBuilder into a (new) base class Created 7 years 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 // 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 private: 784 private:
785 CompilationInfo* info_; 785 CompilationInfo* info_;
786 HGraph* const graph_; 786 HGraph* const graph_;
787 BitVector* allocated_double_registers_; 787 BitVector* allocated_double_registers_;
788 ZoneList<LInstruction*> instructions_; 788 ZoneList<LInstruction*> instructions_;
789 ZoneList<LPointerMap*> pointer_maps_; 789 ZoneList<LPointerMap*> pointer_maps_;
790 ZoneList<Handle<JSFunction> > inlined_closures_; 790 ZoneList<Handle<JSFunction> > inlined_closures_;
791 }; 791 };
792 792
793 793
794 class LChunkBuilderBase BASE_EMBEDDED {
795 public:
796 explicit LChunkBuilderBase(Zone* zone)
797 : argument_count_(0),
798 zone_(zone) { }
799
800 virtual ~LChunkBuilderBase() { }
801
802 protected:
803 // An input operand in register, stack slot or a constant operand.
804 // Will not be moved to a register even if one is freely available.
805 virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) = 0;
806
807 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env,
808 int* argument_index_accumulator,
809 ZoneList<HValue*>* objects_to_materialize);
810 void AddObjectToMaterialize(HValue* value,
811 ZoneList<HValue*>* objects_to_materialize,
812 LEnvironment* result);
813
814 Zone* zone() const { return zone_; }
815
816 int argument_count_;
817
818 private:
819 Zone* zone_;
820 };
821
822
794 int StackSlotOffset(int index); 823 int StackSlotOffset(int index);
795 824
796 enum NumberUntagDMode { 825 enum NumberUntagDMode {
797 NUMBER_CANDIDATE_IS_SMI, 826 NUMBER_CANDIDATE_IS_SMI,
798 NUMBER_CANDIDATE_IS_ANY_TAGGED 827 NUMBER_CANDIDATE_IS_ANY_TAGGED
799 }; 828 };
800 829
801 830
802 class LPhase : public CompilationPhase { 831 class LPhase : public CompilationPhase {
803 public: 832 public:
804 LPhase(const char* name, LChunk* chunk) 833 LPhase(const char* name, LChunk* chunk)
805 : CompilationPhase(name, chunk->info()), 834 : CompilationPhase(name, chunk->info()),
806 chunk_(chunk) { } 835 chunk_(chunk) { }
807 ~LPhase(); 836 ~LPhase();
808 837
809 private: 838 private:
810 LChunk* chunk_; 839 LChunk* chunk_;
811 840
812 DISALLOW_COPY_AND_ASSIGN(LPhase); 841 DISALLOW_COPY_AND_ASSIGN(LPhase);
813 }; 842 };
814 843
815 844
816 } } // namespace v8::internal 845 } } // namespace v8::internal
817 846
818 #endif // V8_LITHIUM_H_ 847 #endif // V8_LITHIUM_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/lithium.cc » ('j') | src/lithium.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698