Index: src/compiler/typer.h |
diff --git a/src/compiler/typer.h b/src/compiler/typer.h |
index 065262907ba278a0aa71f8d5480d419e4672b8e4..5d005476992c418eef3a5df4a48e45c4ddb632ba 100644 |
--- a/src/compiler/typer.h |
+++ b/src/compiler/typer.h |
@@ -5,6 +5,7 @@ |
#ifndef V8_COMPILER_TYPER_H_ |
#define V8_COMPILER_TYPER_H_ |
+#include "src/base/flags.h" |
#include "src/compiler/graph.h" |
#include "src/types.h" |
@@ -12,6 +13,7 @@ namespace v8 { |
namespace internal { |
// Forward declarations. |
+class CompilationDependencies; |
class ZoneTypeCache; |
namespace compiler { |
@@ -19,7 +21,15 @@ namespace compiler { |
class Typer { |
public: |
- Typer(Isolate* isolate, Graph* graph, |
+ // Flags that control the mode of operation. |
+ enum Flag { |
+ kNoFlags = 0u, |
+ kDeoptimizationEnabled = 1u << 0, |
+ }; |
+ typedef base::Flags<Flag> Flags; |
+ |
+ Typer(Isolate* isolate, Graph* graph, Flags flags = kNoFlags, |
+ CompilationDependencies* dependencies = nullptr, |
Type::FunctionType* function_type = nullptr); |
~Typer(); |
@@ -34,10 +44,14 @@ class Typer { |
Graph* graph() const { return graph_; } |
Zone* zone() const { return graph()->zone(); } |
Isolate* isolate() const { return isolate_; } |
+ Flags flags() const { return flags_; } |
+ CompilationDependencies* dependencies() const { return dependencies_; } |
Type::FunctionType* function_type() const { return function_type_; } |
Isolate* const isolate_; |
Graph* const graph_; |
+ Flags const flags_; |
+ CompilationDependencies* const dependencies_; |
Type::FunctionType* function_type_; |
Decorator* decorator_; |
ZoneTypeCache const& cache_; |
@@ -52,6 +66,8 @@ class Typer { |
DISALLOW_COPY_AND_ASSIGN(Typer); |
}; |
+DEFINE_OPERATORS_FOR_FLAGS(Typer::Flags) |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |