Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

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: Address comment. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-type-feedback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c465720d261e6261f31f04000e49b40f351afa45 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,6 +159,7 @@ Reduction JSIntrinsicLowering::ReduceCreateObjectLiteral(Node* node) {
Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) {
+ // TODO(jarin): This should not depend on the global flag.
if (!FLAG_turbo_deoptimization) return NoChange();
Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-type-feedback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698