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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 7080 matching lines...) Expand 10 before | Expand all | Expand 10 after
7091 PREMONOMORPHIC); 7091 PREMONOMORPHIC);
7092 } 7092 }
7093 } 7093 }
7094 7094
7095 7095
7096 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) { 7096 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) {
7097 // Loads from a "stock" fast holey double arrays can elide the hole check. 7097 // Loads from a "stock" fast holey double arrays can elide the hole check.
7098 // Loads from a "stock" fast holey array can convert the hole to undefined 7098 // Loads from a "stock" fast holey array can convert the hole to undefined
7099 // with impunity. 7099 // with impunity.
7100 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE; 7100 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE;
7101 bool holey_smi_elements =
7102 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_SMI_ELEMENTS);
7101 bool holey_double_elements = 7103 bool holey_double_elements =
7102 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS); 7104 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS);
7103 bool holey_elements = 7105 bool holey_elements =
7104 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS); 7106 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS);
7105 if ((holey_double_elements || holey_elements) && 7107 if ((holey_smi_elements || holey_double_elements || holey_elements) &&
7106 isolate()->IsFastArrayConstructorPrototypeChainIntact()) { 7108 isolate()->IsFastArrayConstructorPrototypeChainIntact()) {
7107 load_mode = 7109 load_mode =
7108 holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED; 7110 holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED;
7109 7111
7110 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate()); 7112 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate());
7111 Handle<JSObject> object_prototype = isolate()->initial_object_prototype(); 7113 Handle<JSObject> object_prototype = isolate()->initial_object_prototype();
7112 BuildCheckPrototypeMaps(prototype, object_prototype); 7114 BuildCheckPrototypeMaps(prototype, object_prototype);
7113 graph()->MarkDependsOnEmptyArrayProtoElements(); 7115 graph()->MarkDependsOnEmptyArrayProtoElements();
7114 } 7116 }
7115 return load_mode; 7117 return load_mode;
(...skipping 6034 matching lines...) Expand 10 before | Expand all | Expand 10 after
13150 if (ShouldProduceTraceOutput()) { 13152 if (ShouldProduceTraceOutput()) {
13151 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13153 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13152 } 13154 }
13153 13155
13154 #ifdef DEBUG 13156 #ifdef DEBUG
13155 graph_->Verify(false); // No full verify. 13157 graph_->Verify(false); // No full verify.
13156 #endif 13158 #endif
13157 } 13159 }
13158 13160
13159 } } // namespace v8::internal 13161 } } // namespace v8::internal
OLDNEW
« 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