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

Unified Diff: src/hydrogen.cc

Issue 356213003: Support non-internalized string key lookups in Hydrogen KeyedLoadIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge ToT Created 6 years, 6 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 | « no previous file | src/runtime.h » ('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 89f61decba5c833f9bafc5e94a829fc3b2216ee1..1b6cb11c54c0e9d41c407f4eebbaef673ae61950 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1513,13 +1513,23 @@ void HGraphBuilder::BuildKeyedIndexCheck(HValue* key,
Token::BIT_AND,
instance_type,
Add<HConstant>(static_cast<int>(kIsNotInternalizedMask)));
- DeoptimizeIf<HCompareNumericAndBranch>(
- not_internalized_bit,
- graph()->GetConstant0(),
- Token::NE,
- "BuildKeyedIndexCheck: string isn't internalized");
- // Key guaranteed to be a unqiue string
+
+ IfBuilder internalized(this);
+ internalized.If<HCompareNumericAndBranch>(not_internalized_bit,
+ graph()->GetConstant0(),
+ Token::EQ);
+ internalized.Then();
Push(key);
+
+ internalized.Else();
+ Add<HPushArguments>(key);
+ HValue* intern_key = Add<HCallRuntime>(
+ isolate()->factory()->empty_string(),
+ Runtime::FunctionForId(Runtime::kInternalizeString), 1);
+ Push(intern_key);
+
+ internalized.End();
+ // Key guaranteed to be a unique string
}
string_index_if.JoinContinuation(join_continuation);
}
« no previous file with comments | « no previous file | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698