KeyedStoreIC: support non-generic handling of Symbol keys

BUG=chromium:450475
LOG=n

Review URL: https://codereview.chromium.org/856333002

Cr-Commit-Position: refs/heads/master@{#26188}
This commit is contained in:
jkummerow 2015-01-21 05:39:14 -08:00 committed by Commit bot
parent cc6c373e2a
commit 89dff787e3

View File

@ -2035,10 +2035,10 @@ MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object,
Handle<Object> store_handle; Handle<Object> store_handle;
Handle<Code> stub = megamorphic_stub(); Handle<Code> stub = megamorphic_stub();
if (key->IsInternalizedString()) { if (key->IsInternalizedString() || key->IsSymbol()) {
ASSIGN_RETURN_ON_EXCEPTION( ASSIGN_RETURN_ON_EXCEPTION(
isolate(), store_handle, isolate(), store_handle,
StoreIC::Store(object, Handle<String>::cast(key), value, StoreIC::Store(object, Handle<Name>::cast(key), value,
JSReceiver::MAY_BE_STORE_FROM_KEYED), JSReceiver::MAY_BE_STORE_FROM_KEYED),
Object); Object);
if (!is_target_set()) { if (!is_target_set()) {