Reviewers: ulan,

Message:
PTAL

Description:
Internalize if not yet internalized

BUG=

Please review this at https://codereview.chromium.org/589543002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -0 lines):
  M src/hydrogen.cc


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);


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to