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

Unified Diff: src/arm64/lithium-arm64.cc

Issue 1100083002: Don't MISS if you read the hole from certain FastHoley arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and fix arm64 compilation. Created 5 years, 8 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/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/lithium-arm64.cc
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc
index c57cb689a042cf8ea9e717bbeb26a3d08db7c9c4..2dfcdb08615f6b69ba721d1d50d19c7d82ce332a 100644
--- a/src/arm64/lithium-arm64.cc
+++ b/src/arm64/lithium-arm64.cc
@@ -1712,21 +1712,24 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
instr->RequiresHoleCheck())
? TempRegister()
: NULL;
-
- LLoadKeyedFixedDouble* result =
- new(zone()) LLoadKeyedFixedDouble(elements, key, temp);
- return instr->RequiresHoleCheck()
- ? AssignEnvironment(DefineAsRegister(result))
- : DefineAsRegister(result);
+ LInstruction* result = DefineAsRegister(
+ new (zone()) LLoadKeyedFixedDouble(elements, key, temp));
+ if (instr->RequiresHoleCheck()) {
+ result = AssignEnvironment(result);
+ }
+ return result;
} else {
DCHECK(instr->representation().IsSmiOrTagged() ||
instr->representation().IsInteger32());
LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister();
- LLoadKeyedFixed* result =
- new(zone()) LLoadKeyedFixed(elements, key, temp);
- return instr->RequiresHoleCheck()
- ? AssignEnvironment(DefineAsRegister(result))
- : DefineAsRegister(result);
+ LInstruction* result =
+ DefineAsRegister(new (zone()) LLoadKeyedFixed(elements, key, temp));
+ if (instr->RequiresHoleCheck() ||
+ (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED &&
+ info()->IsStub())) {
+ result = AssignEnvironment(result);
+ }
+ return result;
}
} else {
DCHECK((instr->representation().IsInteger32() &&
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698