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

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

Issue 1126413005: Add support for on-heap typed arrays to HLoadKeyed::InferRange (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/double.h" 8 #include "src/double.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/hydrogen-infer-representation.h" 10 #include "src/hydrogen-infer-representation.h"
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 if (access().IsStringLength()) { 3191 if (access().IsStringLength()) {
3192 return new(zone) Range(0, String::kMaxLength); 3192 return new(zone) Range(0, String::kMaxLength);
3193 } 3193 }
3194 return HValue::InferRange(zone); 3194 return HValue::InferRange(zone);
3195 } 3195 }
3196 3196
3197 3197
3198 Range* HLoadKeyed::InferRange(Zone* zone) { 3198 Range* HLoadKeyed::InferRange(Zone* zone) {
3199 switch (elements_kind()) { 3199 switch (elements_kind()) {
3200 case EXTERNAL_INT8_ELEMENTS: 3200 case EXTERNAL_INT8_ELEMENTS:
3201 case INT8_ELEMENTS:
3201 return new(zone) Range(kMinInt8, kMaxInt8); 3202 return new(zone) Range(kMinInt8, kMaxInt8);
3202 case EXTERNAL_UINT8_ELEMENTS: 3203 case EXTERNAL_UINT8_ELEMENTS:
3203 case EXTERNAL_UINT8_CLAMPED_ELEMENTS: 3204 case EXTERNAL_UINT8_CLAMPED_ELEMENTS:
3205 case UINT8_ELEMENTS:
3206 case UINT8_CLAMPED_ELEMENTS:
3204 return new(zone) Range(kMinUInt8, kMaxUInt8); 3207 return new(zone) Range(kMinUInt8, kMaxUInt8);
3205 case EXTERNAL_INT16_ELEMENTS: 3208 case EXTERNAL_INT16_ELEMENTS:
3209 case INT16_ELEMENTS:
3206 return new(zone) Range(kMinInt16, kMaxInt16); 3210 return new(zone) Range(kMinInt16, kMaxInt16);
3207 case EXTERNAL_UINT16_ELEMENTS: 3211 case EXTERNAL_UINT16_ELEMENTS:
3212 case UINT16_ELEMENTS:
3208 return new(zone) Range(kMinUInt16, kMaxUInt16); 3213 return new(zone) Range(kMinUInt16, kMaxUInt16);
3209 default: 3214 default:
3210 return HValue::InferRange(zone); 3215 return HValue::InferRange(zone);
3211 } 3216 }
3212 } 3217 }
3213 3218
3214 3219
3215 std::ostream& HCompareGeneric::PrintDataTo(std::ostream& os) const { // NOLINT 3220 std::ostream& HCompareGeneric::PrintDataTo(std::ostream& os) const { // NOLINT
3216 os << Token::Name(token()) << " "; 3221 os << Token::Name(token()) << " ";
3217 return HBinaryOperation::PrintDataTo(os); 3222 return HBinaryOperation::PrintDataTo(os);
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
4719 break; 4724 break;
4720 case HObjectAccess::kExternalMemory: 4725 case HObjectAccess::kExternalMemory:
4721 os << "[external-memory]"; 4726 os << "[external-memory]";
4722 break; 4727 break;
4723 } 4728 }
4724 4729
4725 return os << "@" << access.offset(); 4730 return os << "@" << access.offset();
4726 } 4731 }
4727 4732
4728 } } // namespace v8::internal 4733 } } // namespace v8::internal
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