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 |