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

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

Issue 286903019: Don't replace initializing smi stores during store elimination. (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
« no previous file with comments | « no previous file | src/hydrogen-store-elimination.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 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 "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 6735 matching lines...) Expand 10 before | Expand all | Expand 10 after
6746 } 6746 }
6747 6747
6748 Representation field_representation() const { 6748 Representation field_representation() const {
6749 return access_.representation(); 6749 return access_.representation();
6750 } 6750 }
6751 6751
6752 void UpdateValue(HValue* value) { 6752 void UpdateValue(HValue* value) {
6753 SetOperandAt(1, value); 6753 SetOperandAt(1, value);
6754 } 6754 }
6755 6755
6756 bool CanBeReplacedWith(HStoreNamedField* that) const {
6757 if (!this->access().Equals(that->access())) return false;
6758 if (SmiValuesAre32Bits() &&
6759 this->field_representation().IsSmi() &&
6760 this->store_mode() == INITIALIZING_STORE &&
6761 that->store_mode() == STORE_TO_INITIALIZED_ENTRY) {
6762 // We cannot replace an initializing store to a smi field with a store to
6763 // an initialized entry on 64-bit architectures (with 32-bit smis).
6764 return false;
6765 }
6766 return true;
6767 }
6768
6756 private: 6769 private:
6757 HStoreNamedField(HValue* obj, 6770 HStoreNamedField(HValue* obj,
6758 HObjectAccess access, 6771 HObjectAccess access,
6759 HValue* val, 6772 HValue* val,
6760 StoreFieldOrKeyedMode store_mode = INITIALIZING_STORE) 6773 StoreFieldOrKeyedMode store_mode = INITIALIZING_STORE)
6761 : access_(access), 6774 : access_(access),
6762 new_space_dominator_(NULL), 6775 new_space_dominator_(NULL),
6763 has_transition_(false), 6776 has_transition_(false),
6764 store_mode_(store_mode) { 6777 store_mode_(store_mode) {
6765 // Stores to a non existing in-object property are allowed only to the 6778 // Stores to a non existing in-object property are allowed only to the
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
7712 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7725 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7713 }; 7726 };
7714 7727
7715 7728
7716 #undef DECLARE_INSTRUCTION 7729 #undef DECLARE_INSTRUCTION
7717 #undef DECLARE_CONCRETE_INSTRUCTION 7730 #undef DECLARE_CONCRETE_INSTRUCTION
7718 7731
7719 } } // namespace v8::internal 7732 } } // namespace v8::internal
7720 7733
7721 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7734 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-store-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698