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

Side by Side Diff: src/hydrogen-instructions.h

Issue 7112032: Re-land r8140: Deoptimize on never-executed code-paths. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 V(OuterContext) \ 139 V(OuterContext) \
140 V(Parameter) \ 140 V(Parameter) \
141 V(Power) \ 141 V(Power) \
142 V(PushArgument) \ 142 V(PushArgument) \
143 V(RegExpLiteral) \ 143 V(RegExpLiteral) \
144 V(Return) \ 144 V(Return) \
145 V(Sar) \ 145 V(Sar) \
146 V(Shl) \ 146 V(Shl) \
147 V(Shr) \ 147 V(Shr) \
148 V(Simulate) \ 148 V(Simulate) \
149 V(SoftDeoptimize) \
149 V(StackCheck) \ 150 V(StackCheck) \
150 V(StoreContextSlot) \ 151 V(StoreContextSlot) \
151 V(StoreGlobalCell) \ 152 V(StoreGlobalCell) \
152 V(StoreGlobalGeneric) \ 153 V(StoreGlobalGeneric) \
153 V(StoreKeyedFastElement) \ 154 V(StoreKeyedFastElement) \
154 V(StoreKeyedGeneric) \ 155 V(StoreKeyedGeneric) \
155 V(StoreKeyedSpecializedArrayElement) \ 156 V(StoreKeyedSpecializedArrayElement) \
156 V(StoreNamedField) \ 157 V(StoreNamedField) \
157 V(StoreNamedGeneric) \ 158 V(StoreNamedGeneric) \
158 V(StringAdd) \ 159 V(StringAdd) \
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 class HBlockEntry: public HTemplateInstruction<0> { 841 class HBlockEntry: public HTemplateInstruction<0> {
841 public: 842 public:
842 virtual Representation RequiredInputRepresentation(int index) const { 843 virtual Representation RequiredInputRepresentation(int index) const {
843 return Representation::None(); 844 return Representation::None();
844 } 845 }
845 846
846 DECLARE_CONCRETE_INSTRUCTION(BlockEntry) 847 DECLARE_CONCRETE_INSTRUCTION(BlockEntry)
847 }; 848 };
848 849
849 850
851 // We insert soft-deoptimize when we hit code with unknown typefeedback,
852 // so that we get a chance of re-optimizing with useful typefeedback.
853 // HSoftDeoptimize does not end a basic block as opposed to HDeoptimize.
854 class HSoftDeoptimize: public HTemplateInstruction<0> {
855 public:
856 virtual Representation RequiredInputRepresentation(int index) const {
857 return Representation::None();
858 }
859
860 DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize)
861 };
862
863
850 class HDeoptimize: public HControlInstruction { 864 class HDeoptimize: public HControlInstruction {
851 public: 865 public:
852 explicit HDeoptimize(int environment_length) 866 explicit HDeoptimize(int environment_length)
853 : HControlInstruction(NULL, NULL), 867 : HControlInstruction(NULL, NULL),
854 values_(environment_length) { } 868 values_(environment_length) { }
855 869
856 virtual Representation RequiredInputRepresentation(int index) const { 870 virtual Representation RequiredInputRepresentation(int index) const {
857 return Representation::None(); 871 return Representation::None();
858 } 872 }
859 873
860 virtual int OperandCount() { return values_.length(); } 874 virtual int OperandCount() { return values_.length(); }
861 virtual HValue* OperandAt(int index) { return values_[index]; } 875 virtual HValue* OperandAt(int index) { return values_[index]; }
876 virtual void PrintDataTo(StringStream* stream);
862 877
863 void AddEnvironmentValue(HValue* value) { 878 void AddEnvironmentValue(HValue* value) {
864 values_.Add(NULL); 879 values_.Add(NULL);
865 SetOperandAt(values_.length() - 1, value); 880 SetOperandAt(values_.length() - 1, value);
866 } 881 }
867 882
868 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) 883 DECLARE_CONCRETE_INSTRUCTION(Deoptimize)
869 884
870 enum UseEnvironment { 885 enum UseEnvironment {
871 kNoUses, 886 kNoUses,
(...skipping 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 4047
4033 DECLARE_CONCRETE_INSTRUCTION(In) 4048 DECLARE_CONCRETE_INSTRUCTION(In)
4034 }; 4049 };
4035 4050
4036 #undef DECLARE_INSTRUCTION 4051 #undef DECLARE_INSTRUCTION
4037 #undef DECLARE_CONCRETE_INSTRUCTION 4052 #undef DECLARE_CONCRETE_INSTRUCTION
4038 4053
4039 } } // namespace v8::internal 4054 } } // namespace v8::internal
4040 4055
4041 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4056 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698