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

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

Issue 7488016: Allow GVN to separately optimize FastDoubleArrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 | « no previous file | no next file » | 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 V(UnaryMathOperation) \ 177 V(UnaryMathOperation) \
178 V(UnknownOSRValue) \ 178 V(UnknownOSRValue) \
179 V(UseConst) \ 179 V(UseConst) \
180 V(ValueOf) 180 V(ValueOf)
181 181
182 #define GVN_FLAG_LIST(V) \ 182 #define GVN_FLAG_LIST(V) \
183 V(Calls) \ 183 V(Calls) \
184 V(InobjectFields) \ 184 V(InobjectFields) \
185 V(BackingStoreFields) \ 185 V(BackingStoreFields) \
186 V(ArrayElements) \ 186 V(ArrayElements) \
187 V(DoubleArrayElements) \
187 V(SpecializedArrayElements) \ 188 V(SpecializedArrayElements) \
188 V(GlobalVars) \ 189 V(GlobalVars) \
189 V(Maps) \ 190 V(Maps) \
190 V(ArrayLengths) \ 191 V(ArrayLengths) \
191 V(ContextSlots) \ 192 V(ContextSlots) \
192 V(OsrEntries) 193 V(OsrEntries)
193 194
194 #define DECLARE_ABSTRACT_INSTRUCTION(type) \ 195 #define DECLARE_ABSTRACT_INSTRUCTION(type) \
195 virtual bool Is##type() const { return true; } \ 196 virtual bool Is##type() const { return true; } \
196 static H##type* cast(HValue* value) { \ 197 static H##type* cast(HValue* value) { \
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3517 virtual bool DataEquals(HValue* other) { return true; } 3518 virtual bool DataEquals(HValue* other) { return true; }
3518 }; 3519 };
3519 3520
3520 3521
3521 class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> { 3522 class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> {
3522 public: 3523 public:
3523 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) { 3524 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) {
3524 SetOperandAt(0, elements); 3525 SetOperandAt(0, elements);
3525 SetOperandAt(1, key); 3526 SetOperandAt(1, key);
3526 set_representation(Representation::Double()); 3527 set_representation(Representation::Double());
3527 SetFlag(kDependsOnArrayElements); 3528 SetFlag(kDependsOnDoubleArrayElements);
3528 SetFlag(kUseGVN); 3529 SetFlag(kUseGVN);
3529 } 3530 }
3530 3531
3531 HValue* elements() { return OperandAt(0); } 3532 HValue* elements() { return OperandAt(0); }
3532 HValue* key() { return OperandAt(1); } 3533 HValue* key() { return OperandAt(1); }
3533 3534
3534 virtual Representation RequiredInputRepresentation(int index) const { 3535 virtual Representation RequiredInputRepresentation(int index) const {
3535 // The key is supposed to be Integer32. 3536 // The key is supposed to be Integer32.
3536 return index == 0 3537 return index == 0
3537 ? Representation::Tagged() 3538 ? Representation::Tagged()
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3735 3736
3736 3737
3737 class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> { 3738 class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> {
3738 public: 3739 public:
3739 HStoreKeyedFastDoubleElement(HValue* elements, 3740 HStoreKeyedFastDoubleElement(HValue* elements,
3740 HValue* key, 3741 HValue* key,
3741 HValue* val) { 3742 HValue* val) {
3742 SetOperandAt(0, elements); 3743 SetOperandAt(0, elements);
3743 SetOperandAt(1, key); 3744 SetOperandAt(1, key);
3744 SetOperandAt(2, val); 3745 SetOperandAt(2, val);
3745 SetFlag(kChangesArrayElements); 3746 SetFlag(kChangesDoubleArrayElements);
3746 } 3747 }
3747 3748
3748 virtual Representation RequiredInputRepresentation(int index) const { 3749 virtual Representation RequiredInputRepresentation(int index) const {
3749 if (index == 1) { 3750 if (index == 1) {
3750 return Representation::Integer32(); 3751 return Representation::Integer32();
3751 } else if (index == 2) { 3752 } else if (index == 2) {
3752 return Representation::Double(); 3753 return Representation::Double();
3753 } else { 3754 } else {
3754 return Representation::Tagged(); 3755 return Representation::Tagged();
3755 } 3756 }
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
4190 4191
4191 DECLARE_CONCRETE_INSTRUCTION(In) 4192 DECLARE_CONCRETE_INSTRUCTION(In)
4192 }; 4193 };
4193 4194
4194 #undef DECLARE_INSTRUCTION 4195 #undef DECLARE_INSTRUCTION
4195 #undef DECLARE_CONCRETE_INSTRUCTION 4196 #undef DECLARE_CONCRETE_INSTRUCTION
4196 4197
4197 } } // namespace v8::internal 4198 } } // namespace v8::internal
4198 4199
4199 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4200 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698