Reviewers: titzer,
Description:
Make TurboFan inlining work without deoptimization.
[email protected]
Please review this at https://codereview.chromium.org/726823002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+14, -15 lines):
M src/compiler.h
M src/compiler.cc
M src/compiler/js-inlining.cc
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
b85a830baacf1e1dfbe7ed291a2111846e4355c2..6f448b74aee44cfdb5522278456abc413c48de8c
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -873,7 +873,6 @@ MaybeHandle<Code>
Compiler::GetLazyCode(Handle<JSFunction> function) {
info.MarkAsContextSpecializing();
info.MarkAsTypingEnabled();
- info.MarkAsInliningDisabled();
if (GetOptimizedCodeNow(&info)) {
DCHECK(function->shared()->is_compiled());
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index
c8073feda90dd2875a8783ec829cc2feab5ac207..7aa53b35d54141b59e8e6eb2559b66dbedf335d0
100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -204,8 +204,6 @@ class CompilationInfo {
void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); }
- void MarkAsInliningDisabled() { SetFlag(kInliningEnabled, false); }
-
bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); }
void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); }
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index
f2abb6c8f46122f0e59283967939e501d5a3816e..110cec521d27c5407799482952b105fde5c0dab4
100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -405,19 +405,21 @@ void JSInliner::TryInlineJSCall(Node* call_node) {
Inlinee inlinee(visitor.GetCopy(graph.start()),
visitor.GetCopy(graph.end()));
- Node* outer_frame_state = call.frame_state();
- // Insert argument adaptor frame if required.
- if (call.formal_arguments() != inlinee.formal_parameters()) {
- outer_frame_state =
- CreateArgumentsAdaptorFrameState(&call, function, info.zone());
- }
+ if (FLAG_turbo_deoptimization) {
+ Node* outer_frame_state = call.frame_state();
+ // Insert argument adaptor frame if required.
+ if (call.formal_arguments() != inlinee.formal_parameters()) {
+ outer_frame_state =
+ CreateArgumentsAdaptorFrameState(&call, function, info.zone());
+ }
- for (NodeVectorConstIter it = visitor.copies().begin();
- it != visitor.copies().end(); ++it) {
- Node* node = *it;
- if (node != NULL && node->opcode() == IrOpcode::kFrameState) {
- AddClosureToFrameState(node, function);
- NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
+ for (NodeVectorConstIter it = visitor.copies().begin();
+ it != visitor.copies().end(); ++it) {
+ Node* node = *it;
+ if (node != NULL && node->opcode() == IrOpcode::kFrameState) {
+ AddClosureToFrameState(node, function);
+ NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
+ }
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.