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

Unified Diff: src/compiler/access-builder.cc

Issue 617853002: [turbofan] Add BoundsCheckMode to ElementAccess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename Created 6 years, 3 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 | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-builder.cc
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc
index 749c04a0c5b1470a37e49513555fa7c44df586d2..7f3b0846ec4b3e89d3e130a00e26f748c61d0d54 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -53,7 +53,8 @@ FieldAccess AccessBuilder::ForExternalArrayPointer() {
// static
ElementAccess AccessBuilder::ForFixedArrayElement() {
- return {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), kMachAnyTagged};
+ return {kNoBoundsCheck, kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
+ kMachAnyTagged};
}
@@ -64,25 +65,33 @@ ElementAccess AccessBuilder::ForTypedArrayElement(ExternalArrayType type,
int header_size = is_external ? 0 : FixedTypedArrayBase::kDataOffset;
switch (type) {
case kExternalInt8Array:
- return {taggedness, header_size, Type::Signed32(), kMachInt8};
+ return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Signed32(),
+ kMachInt8};
case kExternalUint8Array:
case kExternalUint8ClampedArray:
- return {taggedness, header_size, Type::Unsigned32(), kMachUint8};
+ return {kTypedArrayBoundsCheck, taggedness, header_size,
+ Type::Unsigned32(), kMachUint8};
case kExternalInt16Array:
- return {taggedness, header_size, Type::Signed32(), kMachInt16};
+ return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Signed32(),
+ kMachInt16};
case kExternalUint16Array:
- return {taggedness, header_size, Type::Unsigned32(), kMachUint16};
+ return {kTypedArrayBoundsCheck, taggedness, header_size,
+ Type::Unsigned32(), kMachUint16};
case kExternalInt32Array:
- return {taggedness, header_size, Type::Signed32(), kMachInt32};
+ return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Signed32(),
+ kMachInt32};
case kExternalUint32Array:
- return {taggedness, header_size, Type::Unsigned32(), kMachUint32};
+ return {kTypedArrayBoundsCheck, taggedness, header_size,
+ Type::Unsigned32(), kMachUint32};
case kExternalFloat32Array:
- return {taggedness, header_size, Type::Number(), kRepFloat32};
+ return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(),
+ kRepFloat32};
case kExternalFloat64Array:
- return {taggedness, header_size, Type::Number(), kRepFloat64};
+ return {kTypedArrayBoundsCheck, taggedness, header_size, Type::Number(),
+ kRepFloat64};
}
UNREACHABLE();
- return {kUntaggedBase, 0, Type::None(), kMachNone};
+ return {kTypedArrayBoundsCheck, kUntaggedBase, 0, Type::None(), kMachNone};
}
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698