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

Side by Side Diff: src/property-details.h

Issue 196353004: Fixed handling of polymorphic array accesses with constant index (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 6 years, 9 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-instructions.cc ('k') | src/property-details-inl.h » ('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 // 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (IsHeapObject()) return other.IsNone(); 141 if (IsHeapObject()) return other.IsNone();
142 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false; 142 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false;
143 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false; 143 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false;
144 return kind_ > other.kind_; 144 return kind_ > other.kind_;
145 } 145 }
146 146
147 bool fits_into(const Representation& other) const { 147 bool fits_into(const Representation& other) const {
148 return other.is_more_general_than(*this) || other.Equals(*this); 148 return other.is_more_general_than(*this) || other.Equals(*this);
149 } 149 }
150 150
151 bool CanContainDouble(double value);
152
151 Representation generalize(Representation other) { 153 Representation generalize(Representation other) {
152 if (other.fits_into(*this)) return *this; 154 if (other.fits_into(*this)) return *this;
153 if (other.is_more_general_than(*this)) return other; 155 if (other.is_more_general_than(*this)) return other;
154 return Representation::Tagged(); 156 return Representation::Tagged();
155 } 157 }
156 158
157 int size() const { 159 int size() const {
158 ASSERT(!IsNone()); 160 ASSERT(!IsNone());
159 if (IsInteger8() || IsUInteger8()) { 161 if (IsInteger8() || IsUInteger8()) {
160 return sizeof(uint8_t); 162 return sizeof(uint8_t);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 PropertyDetails(int value, PropertyAttributes attributes) { 322 PropertyDetails(int value, PropertyAttributes attributes) {
321 value_ = AttributesField::update(value, attributes); 323 value_ = AttributesField::update(value, attributes);
322 } 324 }
323 325
324 uint32_t value_; 326 uint32_t value_;
325 }; 327 };
326 328
327 } } // namespace v8::internal 329 } } // namespace v8::internal
328 330
329 #endif // V8_PROPERTY_DETAILS_H_ 331 #endif // V8_PROPERTY_DETAILS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/property-details-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698