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

Unified Diff: src/compiler/js-inlining.cc

Issue 2272393002: Version 5.4.500.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 4 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.h ('k') | test/mjsunit/regress/regress-crbug-640369.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 4f1dc7c708fb0328bb39b12170a0c910353e1ea2..635daa4d761421e87dd10f7ff060e7598ce91803 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -16,6 +16,7 @@
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/operator-properties.h"
+#include "src/compiler/simplified-operator.h"
#include "src/compiler/type-hint-analyzer.h"
#include "src/isolate-inl.h"
#include "src/parsing/parse-info.h"
@@ -435,20 +436,15 @@ Reduction JSInliner::ReduceJSCall(Node* node, Handle<JSFunction> function) {
NodeProperties::ReplaceEffectInput(node, create);
// Insert a check of the return value to determine whether the return
// value or the implicit receiver should be selected as a result of the
- // call. The check is wired into the successful control completion.
- Node* success = graph()->NewNode(common()->IfSuccess(), node);
- Node* check = graph()->NewNode(
- javascript()->CallRuntime(Runtime::kInlineIsJSReceiver, 1), node,
- context, node, success);
+ // call.
+ Node* check = graph()->NewNode(simplified()->ObjectIsReceiver(), node);
Node* select =
graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
check, node, create);
- NodeProperties::ReplaceUses(node, select, check, check, node);
+ NodeProperties::ReplaceUses(node, select, node, node, node);
// Fix-up inputs that have been mangled by the {ReplaceUses} call above.
NodeProperties::ReplaceValueInput(select, node, 1); // Fix-up input.
NodeProperties::ReplaceValueInput(check, node, 0); // Fix-up input.
- NodeProperties::ReplaceEffectInput(check, node); // Fix-up input.
- NodeProperties::ReplaceControlInput(success, node); // Fix-up input.
receiver = create; // The implicit receiver.
}
@@ -527,6 +523,10 @@ JSOperatorBuilder* JSInliner::javascript() const {
CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); }
+SimplifiedOperatorBuilder* JSInliner::simplified() const {
+ return jsgraph()->simplified();
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/js-inlining.h ('k') | test/mjsunit/regress/regress-crbug-640369.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698