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

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: Revert more unrelated changes 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') | src/runtime.h » ('J')
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 6ae1466d62de54427cc9992af757099705339594..24b0d5976eea49675defa690630175096dc201a3 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);
Jakob Kummerow 2014/06/27 15:37:51 nit: I think "not_internalized" would more accurat
danno 2014/06/27 17:43:28 Done.
+ internalized.If<HCompareNumericAndBranch>(not_internalized_bit,
+ graph()->GetConstant0(),
+ Token::NE);
+ internalized.Then();
+ Add<HPushArguments>(key);
+ HValue* intern_key = Add<HCallRuntime>(
+ isolate()->factory()->empty_string(),
+ Runtime::FunctionForId(Runtime::kInternalizeString), 1);
+ Push(intern_key);
+
+ internalized.Else();
Push(key);
+
+ internalized.End();
+ // Key guaranteed to be a unqiue string
Jakob Kummerow 2014/06/27 15:37:51 nit: while you're here, "unique"
danno 2014/06/27 17:43:28 Done.
}
string_index_if.JoinContinuation(join_continuation);
}
« no previous file with comments | « no previous file | src/runtime.h » ('j') | src/runtime.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698