TransitionAndStoreStub bailout needs to transition (and store).

Performance regression found in test regress-2185-2.js. The problem was
that the bailout method for TransitionAndStoreStub was not performing
the appropriate transition.

BUG=
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5ccd6978
......@@ -2257,9 +2257,14 @@ RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss) {
ASSERT(args.length() == 4);
KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
Handle<Object> value = args.at<Object>(0);
Handle<Map> map = args.at<Map>(1);
Handle<Object> key = args.at<Object>(2);
Handle<Object> object = args.at<Object>(3);
StrictModeFlag strict_mode = ic.strict_mode();
if (object->IsJSObject()) {
JSObject::TransitionElementsKind(Handle<JSObject>::cast(object),
map->elements_kind());
}
return Runtime::SetObjectProperty(isolate,
object,
key,
......
......@@ -148,8 +148,12 @@ if (support_smi_only_arrays) {
assertKind(elements_kind.fast_double, obj);
obj = fastliteralcase([3, 6, 2], 1.5);
assertKind(elements_kind.fast_double, obj);
// Note: thanks to pessimistic transition store stubs, we'll attempt
// to transition to the most general elements kind seen at a particular
// store site. So, the elements kind will be double.
obj = fastliteralcase([2, 6, 3], 2);
assertKind(elements_kind.fast_smi_only, obj);
assertKind(elements_kind.fast_double, obj);
}
// Verify that we will not pretransition the double->fast path.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment