From 394cf5111d62b196f5bdd569e975cfd67842c37c Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Tue, 12 Feb 2013 10:56:04 +0000 Subject: [PATCH] Calculate proper receiver map for monomorphic transitioning ICs. This fixes a regression caused by https://chromiumcodereview.appspot.com/11953025/ Review URL: https://chromiumcodereview.appspot.com/12217131 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/ic.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ic.cc b/src/ic.cc index b74b0d9..e19edfc 100644 --- a/src/ic.cc +++ b/src/ic.cc @@ -1544,9 +1544,10 @@ Handle KeyedStoreIC::StoreElementStub(Handle receiver, if (ic_state == UNINITIALIZED || ic_state == PREMONOMORPHIC) { // Optimistically assume that ICs that haven't reached the MONOMORPHIC state // yet will do so and stay there. + Handle monomorphic_map = ComputeTransitionedMap(receiver, stub_kind); stub_kind = GetNoTransitionStubKind(stub_kind); return isolate()->stub_cache()->ComputeKeyedStoreElement( - receiver_map, stub_kind, strict_mode, grow_mode); + monomorphic_map, stub_kind, strict_mode, grow_mode); } GetReceiverMapsForStub(Handle(target()), &target_receiver_maps); @@ -1633,8 +1634,7 @@ Handle KeyedStoreIC::ComputeTransitionedMap(Handle receiver, FAST_HOLEY_DOUBLE_ELEMENTS); case STORE_NO_TRANSITION: case STORE_AND_GROW_NO_TRANSITION: - UNREACHABLE(); - break; + return Handle(receiver->map()); } return Handle::null(); } -- 2.7.4