Chromium Code Reviews

Unified Diff: src/code-stubs-hydrogen.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.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/code-stubs.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 3ca301ca6c3a6c215097d6f0afbfa575e5df08e7..9e9d29d075284656e76183b69e39f68ac417ad9f 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -578,11 +578,15 @@ Handle<Code> StoreScriptContextFieldStub::GenerateCode() {
template <>
HValue* CodeStubGraphBuilder<LoadFastElementStub>::BuildCodeStub() {
+ LoadKeyedHoleMode hole_mode = casted_stub()->convert_hole_to_undefined()
+ ? CONVERT_HOLE_TO_UNDEFINED
+ : NEVER_RETURN_HOLE;
+
HInstruction* load = BuildUncheckedMonomorphicElementAccess(
GetParameter(LoadDescriptor::kReceiverIndex),
GetParameter(LoadDescriptor::kNameIndex), NULL,
casted_stub()->is_js_array(), casted_stub()->elements_kind(), LOAD,
- NEVER_RETURN_HOLE, STANDARD_STORE);
+ hole_mode, STANDARD_STORE);
return load;
}
« no previous file with comments | « src/code-stubs.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine