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

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

Issue 59023003: Generate TypedArrayInitialize builtin in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 years, 1 month 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
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool IsCompatibleForLoad(const Representation& other) const { 124 bool IsCompatibleForLoad(const Representation& other) const {
125 return (IsDouble() && other.IsDouble()) || 125 return (IsDouble() && other.IsDouble()) ||
126 (!IsDouble() && !other.IsDouble()); 126 (!IsDouble() && !other.IsDouble());
127 } 127 }
128 128
129 bool IsCompatibleForStore(const Representation& other) const { 129 bool IsCompatibleForStore(const Representation& other) const {
130 return Equals(other); 130 return Equals(other);
131 } 131 }
132 132
133 bool is_more_general_than(const Representation& other) const { 133 bool is_more_general_than(const Representation& other) const {
134 if (kind_ == kExternal && other.kind_ == kNone) return true;
135 if (kind_ == kExternal && other.kind_ == kExternal) return false;
136 if (kind_ == kNone && other.kind_ == kExternal) return false;
137
134 ASSERT(kind_ != kExternal); 138 ASSERT(kind_ != kExternal);
135 ASSERT(other.kind_ != kExternal); 139 ASSERT(other.kind_ != kExternal);
136 if (IsHeapObject()) return other.IsDouble() || other.IsNone(); 140 if (IsHeapObject()) return other.IsDouble() || other.IsNone();
137 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false; 141 if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false;
138 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false; 142 if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false;
139 return kind_ > other.kind_; 143 return kind_ > other.kind_;
140 } 144 }
141 145
142 bool fits_into(const Representation& other) const { 146 bool fits_into(const Representation& other) const {
143 return other.is_more_general_than(*this) || other.Equals(*this); 147 return other.is_more_general_than(*this) || other.Equals(*this);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 PropertyDetails(int value, PropertyAttributes attributes) { 319 PropertyDetails(int value, PropertyAttributes attributes) {
316 value_ = AttributesField::update(value, attributes); 320 value_ = AttributesField::update(value, attributes);
317 } 321 }
318 322
319 uint32_t value_; 323 uint32_t value_;
320 }; 324 };
321 325
322 } } // namespace v8::internal 326 } } // namespace v8::internal
323 327
324 #endif // V8_PROPERTY_DETAILS_H_ 328 #endif // V8_PROPERTY_DETAILS_H_
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-ia32.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698