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

Unified Diff: src/hydrogen.cc

Issue 1134483002: Allow loading holes from holey smi arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update the DCHECK Created 5 years, 7 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/arm64/lithium-codegen-arm64.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.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 2ac3d520dbfbbba913f20e1e3e729223caf54de0..77890f6fbf8f3aca926641450cbe885d14277ecd 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7098,11 +7098,13 @@ LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) {
// Loads from a "stock" fast holey array can convert the hole to undefined
// with impunity.
LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE;
+ bool holey_smi_elements =
+ *map == isolate()->get_initial_js_array_map(FAST_HOLEY_SMI_ELEMENTS);
bool holey_double_elements =
*map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS);
bool holey_elements =
*map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS);
- if ((holey_double_elements || holey_elements) &&
+ if ((holey_smi_elements || holey_double_elements || holey_elements) &&
isolate()->IsFastArrayConstructorPrototypeChainIntact()) {
load_mode =
holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED;
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698