Chromium Code Reviews

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1106613003: [turbofan] Unify frame state inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index 7b6c878e040e5c14383882fe4dce1bd25550b68c..a976b9d2fc859c73f6b1e933c9601c726be4c304 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -1,4 +1,3 @@
-
// Copyright 2015 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.
@@ -13,6 +12,7 @@
#include "src/compiler/linkage.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
+#include "src/compiler/operator-properties.h"
namespace v8 {
namespace internal {
@@ -114,8 +114,9 @@ Reduction JSIntrinsicLowering::ReduceCreateArrayLiteral(Node* node) {
Callable callable = CodeFactory::FastCloneShallowArray(isolate);
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
isolate, graph()->zone(), callable.descriptor(), 0,
- FLAG_turbo_deoptimization ? CallDescriptor::kNeedsFrameState
- : CallDescriptor::kNoFlags);
+ (OperatorProperties::GetFrameStateInputCount(node->op()) != 0)
+ ? CallDescriptor::kNeedsFrameState
+ : CallDescriptor::kNoFlags);
const Operator* new_op = common()->Call(desc);
Node* stub_code = jsgraph()->HeapConstant(callable.code());
node->RemoveInput(3); // Remove flags input from node.
@@ -143,8 +144,9 @@ Reduction JSIntrinsicLowering::ReduceCreateObjectLiteral(Node* node) {
Callable callable = CodeFactory::FastCloneShallowObject(isolate, length);
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
isolate, graph()->zone(), callable.descriptor(), 0,
- FLAG_turbo_deoptimization ? CallDescriptor::kNeedsFrameState
- : CallDescriptor::kNoFlags);
+ (OperatorProperties::GetFrameStateInputCount(node->op()) != 0)
+ ? CallDescriptor::kNeedsFrameState
+ : CallDescriptor::kNoFlags);
const Operator* new_op = common()->Call(desc);
Node* stub_code = jsgraph()->HeapConstant(callable.code());
node->InsertInput(graph()->zone(), 0, stub_code);
@@ -157,7 +159,7 @@ Reduction JSIntrinsicLowering::ReduceCreateObjectLiteral(Node* node) {
Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) {
- if (!FLAG_turbo_deoptimization) return NoChange();
+ // TODO(bmeurer): if (!FLAG_turbo_deoptimization) return NoChange();
Jarin 2015/04/23 08:33:08 I think we should keep the check here, so that we
Benedikt Meurer 2015/04/23 08:35:34 Done.
Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
DCHECK_EQ(frame_state->opcode(), IrOpcode::kFrameState);

Powered by Google App Engine