From: verwaest@chromium.org Date: Fri, 19 Sep 2014 15:09:50 +0000 (+0000) Subject: Internalize if not yet internalized X-Git-Tag: upstream/4.7.83~6795 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22cf55afc0bfb3aba0125b5873bc55b79a016f0d;p=platform%2Fupstream%2Fv8.git Internalize if not yet internalized BUG= R=ulan@chromium.org Review URL: https://codereview.chromium.org/589543002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen.cc b/src/hydrogen.cc index ae63db7d5..e5a93a7bd 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -7138,6 +7138,10 @@ HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess( uint32_t array_index; if (constant->IsString() && !Handle::cast(constant)->AsArrayIndex(&array_index)) { + if (!constant->IsUniqueName()) { + constant = isolate()->factory()->InternalizeString( + Handle::cast(constant)); + } HInstruction* instr = BuildNamedAccess(access_type, expr->id(), return_id, expr, obj, Handle::cast(constant), val, false);