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

Unified Diff: src/hydrogen-instructions.cc

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 10f4bf3f57cf89d46b6d8d051505821d5c21063e..24259c8b7bb4b1251851a6e336f16877c6df81fc 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3207,13 +3207,18 @@
Range* HLoadKeyed::InferRange(Zone* zone) {
switch (elements_kind()) {
+ case EXTERNAL_INT8_ELEMENTS:
case INT8_ELEMENTS:
return new(zone) Range(kMinInt8, kMaxInt8);
+ case EXTERNAL_UINT8_ELEMENTS:
+ case EXTERNAL_UINT8_CLAMPED_ELEMENTS:
case UINT8_ELEMENTS:
case UINT8_CLAMPED_ELEMENTS:
return new(zone) Range(kMinUInt8, kMaxUInt8);
+ case EXTERNAL_INT16_ELEMENTS:
case INT16_ELEMENTS:
return new(zone) Range(kMinInt16, kMaxInt16);
+ case EXTERNAL_UINT16_ELEMENTS:
case UINT16_ELEMENTS:
return new(zone) Range(kMinUInt16, kMaxUInt16);
default:
@@ -3456,11 +3461,11 @@
std::ostream& HLoadKeyed::PrintDataTo(std::ostream& os) const { // NOLINT
- if (!is_fixed_typed_array()) {
+ if (!is_external()) {
os << NameOf(elements());
} else {
- DCHECK(elements_kind() >= FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND &&
- elements_kind() <= LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND);
+ DCHECK(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
+ elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND);
os << NameOf(elements()) << "." << ElementsKindToString(elements_kind());
}
@@ -3495,7 +3500,7 @@
return false;
}
- if (IsFixedTypedArrayElementsKind(elements_kind())) {
+ if (IsExternalArrayElementsKind(elements_kind())) {
return false;
}
@@ -3535,7 +3540,7 @@
return false;
}
- if (IsFixedTypedArrayElementsKind(elements_kind())) {
+ if (IsExternalArrayElementsKind(elements_kind())) {
return false;
}
@@ -3610,11 +3615,11 @@
std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT
- if (!is_fixed_typed_array()) {
+ if (!is_external()) {
os << NameOf(elements());
} else {
- DCHECK(elements_kind() >= FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND &&
- elements_kind() <= LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND);
+ DCHECK(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
+ elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND);
os << NameOf(elements()) << "." << ElementsKindToString(elements_kind());
}
@@ -3978,7 +3983,8 @@
switch (value()->opcode()) {
case kLoadKeyed: {
ElementsKind load_kind = HLoadKeyed::cast(value())->elements_kind();
- return IsFixedFloatElementsKind(load_kind);
+ return IsExternalFloatOrDoubleElementsKind(load_kind) ||
+ IsFixedFloatElementsKind(load_kind);
}
case kChange: {
Representation from = HChange::cast(value())->from();
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698