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.h

Issue 1248483007: Store offset between fixed typed array base and data start in object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 9d95033080757ff489e43d7991e6a985995833f2..3d3c56cc4063d4ad4859b060a9509c92be84da58 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -4895,6 +4895,8 @@ class HAdd final : public HArithmeticBinaryOperation {
right()->representation().IsTagged()));
}
+ ExternalAddType external_add_type() const { return external_add_type_; }
+
DECLARE_CONCRETE_INSTRUCTION(Add)
protected:
@@ -4913,6 +4915,8 @@ class HAdd final : public HArithmeticBinaryOperation {
DCHECK(left->representation().IsExternal());
DCHECK(right->representation().IsTagged());
SetDependsOnFlag(kNewSpacePromotion);
+ ClearFlag(HValue::kCanOverflow);
+ SetFlag(kHasNoObservableSideEffects);
break;
case NoExternalAdd:
@@ -6028,6 +6032,12 @@ class HObjectAccess final {
Representation::Tagged());
}
+ static HObjectAccess ForFixedTypedArrayBaseExternalPointer() {
+ return HObjectAccess::ForObservableJSObjectOffset(
+ FixedTypedArrayBase::kExternalPointerOffset,
+ Representation::External());
+ }
+
static HObjectAccess ForStringHashField() {
return HObjectAccess(kInobject,
String::kHashFieldOffset,
@@ -6648,11 +6658,11 @@ class HLoadKeyed final : public HTemplateInstruction<3>,
Representation RequiredInputRepresentation(int index) override {
// kind_fast: tagged[int32] (none)
// kind_double: tagged[int32] (none)
- // kind_fixed_typed_array: tagged[int32] (none)
+ // kind_fixed_typed_array: external[int32] (none)
// kind_external: external[int32] (none)
if (index == 0) {
- return is_external() ? Representation::External()
- : Representation::Tagged();
+ return is_typed_elements() ? Representation::External()
+ : Representation::Tagged();
}
if (index == 1) {
return ArrayInstructionInterface::KeyedAccessIndexRequirement(
@@ -7113,8 +7123,8 @@ class HStoreKeyed final : public HTemplateInstruction<3>,
// kind_fixed_typed_array: tagged[int32] = (double | int32)
// kind_external: external[int32] = (double | int32)
if (index == 0) {
- return is_external() ? Representation::External()
- : Representation::Tagged();
+ return is_typed_elements() ? Representation::External()
+ : Representation::Tagged();
} else if (index == 1) {
return ArrayInstructionInterface::KeyedAccessIndexRequirement(
OperandAt(1)->representation());
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698