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

Unified Diff: src/compiler/typer.h

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 | « src/compiler/pipeline.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.h
diff --git a/src/compiler/typer.h b/src/compiler/typer.h
index 4b91d1d7c112a04fad2b592ed2542b988d76ee01..7f6f90a51753461355b8e7325ee9c55c534560c3 100644
--- a/src/compiler/typer.h
+++ b/src/compiler/typer.h
@@ -18,7 +18,14 @@ class LoopVariableOptimizer;
class V8_EXPORT_PRIVATE Typer {
public:
- Typer(Isolate* isolate, Graph* graph);
+ enum Flag : uint8_t {
+ kNoFlags = 0,
+ kThisIsReceiver = 1u << 0, // Parameter this is an Object.
+ kNewTargetIsReceiver = 1u << 1, // Parameter new.target is an Object.
+ };
+ typedef base::Flags<Flag> Flags;
+
+ Typer(Isolate* isolate, Flags flags, Graph* graph);
~Typer();
void Run();
@@ -30,12 +37,14 @@ class V8_EXPORT_PRIVATE Typer {
class Visitor;
class Decorator;
+ Flags flags() const { return flags_; }
Graph* graph() const { return graph_; }
Zone* zone() const { return graph()->zone(); }
Isolate* isolate() const { return isolate_; }
OperationTyper* operation_typer() { return &operation_typer_; }
Isolate* const isolate_;
+ Flags const flags_;
Graph* const graph_;
Decorator* decorator_;
TypeCache const& cache_;
@@ -50,6 +59,8 @@ class V8_EXPORT_PRIVATE Typer {
DISALLOW_COPY_AND_ASSIGN(Typer);
};
+DEFINE_OPERATORS_FOR_FLAGS(Typer::Flags);
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698