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

Unified Diff: src/compiler/pipeline.cc

Issue 2223873002: [turbofan] Assign proper types to Parameter nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and fix. Created 4 years, 1 month 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 | « no previous file | src/compiler/typer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index f05ccfa8a8e6afff2a8f61825e54fdf6ad905170..e480520f6691459ed14d380adbcd540f0ba3c680 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -868,7 +868,7 @@ struct OsrTyperPhase {
// to compute loop variable bounds on OSR.
LoopVariableOptimizer induction_vars(data->jsgraph()->graph(),
data->common(), temp_zone);
- Typer typer(data->isolate(), data->graph());
+ Typer typer(data->isolate(), Typer::kNoFlags, data->graph());
typer.Run(roots, &induction_vars);
}
};
@@ -1545,10 +1545,22 @@ bool PipelineImpl::CreateGraph() {
// Run the type-sensitive lowerings and optimizations on the graph.
{
+ // Determine the Typer operation flags.
+ Typer::Flags flags = Typer::kNoFlags;
+ if (is_sloppy(info()->shared_info()->language_mode()) &&
+ !info()->shared_info()->IsBuiltin()) {
+ // Sloppy mode functions always have an Object for this.
+ flags |= Typer::kThisIsReceiver;
+ }
+ if (IsClassConstructor(info()->shared_info()->kind())) {
+ // Class constructors cannot be [[Call]]ed.
+ flags |= Typer::kNewTargetIsReceiver;
+ }
+
// Type the graph and keep the Typer running on newly created nodes within
// this scope; the Typer is automatically unlinked from the Graph once we
// leave this scope below.
- Typer typer(isolate(), data->graph());
+ Typer typer(isolate(), flags, data->graph());
Run<TyperPhase>(&typer);
RunPrintAndVerify("Typed");
« no previous file with comments | « no previous file | src/compiler/typer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698