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

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

Issue 331493006: GVN fix, preventing loads hoisting above stores to the same field when HObjectAccess's representati… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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-gvn.cc ('k') | test/mjsunit/regress/regress-gvn-ftt.js » ('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 // 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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 6184 matching lines...) Expand 10 before | Expand all | Expand 10 after
6195 JSArrayBufferView::kByteLengthOffset); 6195 JSArrayBufferView::kByteLengthOffset);
6196 } 6196 }
6197 6197
6198 static HObjectAccess ForGlobalObjectNativeContext() { 6198 static HObjectAccess ForGlobalObjectNativeContext() {
6199 return HObjectAccess(kInobject, GlobalObject::kNativeContextOffset); 6199 return HObjectAccess(kInobject, GlobalObject::kNativeContextOffset);
6200 } 6200 }
6201 6201
6202 void PrintTo(StringStream* stream) const; 6202 void PrintTo(StringStream* stream) const;
6203 6203
6204 inline bool Equals(HObjectAccess that) const { 6204 inline bool Equals(HObjectAccess that) const {
6205 return value_ == that.value_; // portion and offset must match 6205 return value_ == that.value_;
6206 }
6207
6208 // Returns true if |this| access refers to the same field as |that|, which
6209 // means that both have same |offset| and |portion| values.
6210 inline bool SameField(HObjectAccess that) const {
6211 uint32_t mask = PortionField::kMask | OffsetField::kMask;
6212 return (value_ & mask) == (that.value_ & mask);
6206 } 6213 }
6207 6214
6208 protected: 6215 protected:
6209 void SetGVNFlags(HValue *instr, PropertyAccessType access_type); 6216 void SetGVNFlags(HValue *instr, PropertyAccessType access_type);
6210 6217
6211 private: 6218 private:
6212 // internal use only; different parts of an object or array 6219 // internal use only; different parts of an object or array
6213 enum Portion { 6220 enum Portion {
6214 kMaps, // map of an object 6221 kMaps, // map of an object
6215 kArrayLengths, // the length of an array 6222 kArrayLengths, // the length of an array
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
7802 }; 7809 };
7803 7810
7804 7811
7805 7812
7806 #undef DECLARE_INSTRUCTION 7813 #undef DECLARE_INSTRUCTION
7807 #undef DECLARE_CONCRETE_INSTRUCTION 7814 #undef DECLARE_CONCRETE_INSTRUCTION
7808 7815
7809 } } // namespace v8::internal 7816 } } // namespace v8::internal
7810 7817
7811 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7818 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-gvn.cc ('k') | test/mjsunit/regress/regress-gvn-ftt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698