Commit c3218375 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Implement %_NewObject using FastNewObjectStub.

The inline allocation sequence in the optimizing compilers cannot deal
well with funky types like JSRegExp, which have some magic fields in
addition to the inobject properties. In Crankshaft we already use the
FastNewObjectStub for %_NewObject in general, so fix TurboFan to the same.
Hopefully one day we can kill %_NewObject completely.

R=jarin@chromium.org
BUG=chromium:609029
LOG=n

Review-Url: https://codereview.chromium.org/1943403004
Cr-Commit-Position: refs/heads/master@{#36006}
parent b84b01e6
......@@ -397,15 +397,7 @@ Reduction JSIntrinsicLowering::ReduceCall(Node* node) {
}
Reduction JSIntrinsicLowering::ReduceNewObject(Node* node) {
Node* constructor = NodeProperties::GetValueInput(node, 0);
Node* new_target = NodeProperties::GetValueInput(node, 1);
Node* context = NodeProperties::GetContextInput(node);
Node* effect = NodeProperties::GetEffectInput(node);
Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
Node* value = graph()->NewNode(javascript()->Create(), constructor,
new_target, context, frame_state, effect);
ReplaceWithValue(node, value, value);
return Replace(value);
return Change(node, CodeFactory::FastNewObject(isolate()), 0);
}
Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) {
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --always-opt --function-context-specialization --gc-interval=14
// Flags: --turbo-filter=match --verify-heap
"xxx".match();
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