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

Side by Side Diff: src/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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen-instructions.h » ('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 6959 matching lines...) Expand 10 before | Expand all | Expand 10 after
6970 return result; 6970 return result;
6971 } else { 6971 } else {
6972 return New<HStoreKeyedGeneric>(object, key, value, function_language_mode(), 6972 return New<HStoreKeyedGeneric>(object, key, value, function_language_mode(),
6973 PREMONOMORPHIC); 6973 PREMONOMORPHIC);
6974 } 6974 }
6975 } 6975 }
6976 6976
6977 6977
6978 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) { 6978 LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) {
6979 // Loads from a "stock" fast holey double arrays can elide the hole check. 6979 // Loads from a "stock" fast holey double arrays can elide the hole check.
6980 // Loads from a "stock" fast holey array can convert the hole to undefined
6981 // with impunity.
6980 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE; 6982 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE;
6981 if (*map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS) && 6983 bool holey_double_elements =
6984 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS);
6985 bool holey_elements =
6986 *map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS);
6987 if ((holey_double_elements || holey_elements) &&
6982 isolate()->IsFastArrayConstructorPrototypeChainIntact()) { 6988 isolate()->IsFastArrayConstructorPrototypeChainIntact()) {
6989 load_mode =
6990 holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED;
6991
6983 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate()); 6992 Handle<JSObject> prototype(JSObject::cast(map->prototype()), isolate());
6984 Handle<JSObject> object_prototype = isolate()->initial_object_prototype(); 6993 Handle<JSObject> object_prototype = isolate()->initial_object_prototype();
6985 BuildCheckPrototypeMaps(prototype, object_prototype); 6994 BuildCheckPrototypeMaps(prototype, object_prototype);
6986 load_mode = ALLOW_RETURN_HOLE;
6987 graph()->MarkDependsOnEmptyArrayProtoElements(); 6995 graph()->MarkDependsOnEmptyArrayProtoElements();
6988 } 6996 }
6989
6990 return load_mode; 6997 return load_mode;
6991 } 6998 }
6992 6999
6993 7000
6994 HInstruction* HOptimizedGraphBuilder::BuildMonomorphicElementAccess( 7001 HInstruction* HOptimizedGraphBuilder::BuildMonomorphicElementAccess(
6995 HValue* object, 7002 HValue* object,
6996 HValue* key, 7003 HValue* key,
6997 HValue* val, 7004 HValue* val,
6998 HValue* dependency, 7005 HValue* dependency,
6999 Handle<Map> map, 7006 Handle<Map> map,
(...skipping 5996 matching lines...) Expand 10 before | Expand all | Expand 10 after
12996 if (ShouldProduceTraceOutput()) { 13003 if (ShouldProduceTraceOutput()) {
12997 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13004 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12998 } 13005 }
12999 13006
13000 #ifdef DEBUG 13007 #ifdef DEBUG
13001 graph_->Verify(false); // No full verify. 13008 graph_->Verify(false); // No full verify.
13002 #endif 13009 #endif
13003 } 13010 }
13004 13011
13005 } } // namespace v8::internal 13012 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698