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

Unified Diff: src/hydrogen.cc

Issue 589543002: Internalize if not yet internalized (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | no next file » | 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 ae63db7d538cb23f2bb463accf63ca6cd52a09ac..e5a93a7bd5b1f4ec513e0427d54f033b0fdf5dce 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7138,6 +7138,10 @@ HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess(
uint32_t array_index;
if (constant->IsString() &&
!Handle<String>::cast(constant)->AsArrayIndex(&array_index)) {
+ if (!constant->IsUniqueName()) {
+ constant = isolate()->factory()->InternalizeString(
+ Handle<String>::cast(constant));
+ }
HInstruction* instr =
BuildNamedAccess(access_type, expr->id(), return_id, expr, obj,
Handle<String>::cast(constant), val, false);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698