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

Unified Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/keyed-load-hole-to-undefined.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-x64.cc
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
index 87c4a64bbb0c5d4b3566cf6295e91c9a66c3e79c..6cffc1c1ecb2ef6a8219f69c5397f8cc9059ee6f 100644
--- a/src/x64/lithium-x64.cc
+++ b/src/x64/lithium-x64.cc
@@ -2217,14 +2217,21 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key));
}
- if ((instr->is_external() || instr->is_fixed_typed_array()) ?
- // see LCodeGen::DoLoadKeyedExternalArray
- ((elements_kind == EXTERNAL_UINT32_ELEMENTS ||
- elements_kind == UINT32_ELEMENTS) &&
- !instr->CheckFlag(HInstruction::kUint32)) :
- // see LCodeGen::DoLoadKeyedFixedDoubleArray and
- // LCodeGen::DoLoadKeyedFixedArray
- instr->RequiresHoleCheck()) {
+ bool needs_environment;
+ if (instr->is_external() || instr->is_fixed_typed_array()) {
+ // see LCodeGen::DoLoadKeyedExternalArray
+ needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS ||
+ elements_kind == UINT32_ELEMENTS) &&
+ !instr->CheckFlag(HInstruction::kUint32);
+ } else {
+ // see LCodeGen::DoLoadKeyedFixedDoubleArray and
+ // LCodeGen::DoLoadKeyedFixedArray
+ needs_environment =
+ instr->RequiresHoleCheck() ||
+ (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
+ }
+
+ if (needs_environment) {
result = AssignEnvironment(result);
}
return result;
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/keyed-load-hole-to-undefined.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698