Upgrade V8 to version 4.9.385.28
https://chromium.googlesource.com/v8/v8/+/4.9.385.28
FPIIM-449
Change-Id: I4b2e74289d4bf3667f2f3dc8aa2e541f63e26eb4
diff --git a/src/compiler/typer.h b/src/compiler/typer.h
index b65a9a5..4177026 100644
--- a/src/compiler/typer.h
+++ b/src/compiler/typer.h
@@ -5,70 +5,70 @@
#ifndef V8_COMPILER_TYPER_H_
#define V8_COMPILER_TYPER_H_
-#include "src/v8.h"
-
+#include "src/base/flags.h"
#include "src/compiler/graph.h"
-#include "src/compiler/opcodes.h"
#include "src/types.h"
namespace v8 {
namespace internal {
-namespace compiler {
// Forward declarations.
-class LazyTypeCache;
+class CompilationDependencies;
+class TypeCache;
+
+namespace compiler {
class Typer {
public:
- explicit Typer(Graph* graph, MaybeHandle<Context> context);
+ // 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();
void Run();
-
- Graph* graph() { return graph_; }
- MaybeHandle<Context> context() { return context_; }
- Zone* zone() { return graph_->zone(); }
- Isolate* isolate() { return zone()->isolate(); }
+ // TODO(bmeurer,jarin): Remove this once we have a notion of "roots" on Graph.
+ void Run(const ZoneVector<Node*>& roots);
private:
class Visitor;
class Decorator;
- Graph* graph_;
- MaybeHandle<Context> context_;
+ 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_;
+ TypeCache const& cache_;
- Zone* zone_;
- Type* boolean_or_number;
- Type* undefined_or_null;
- Type* undefined_or_number;
- Type* negative_signed32;
- Type* non_negative_signed32;
- Type* singleton_false;
- Type* singleton_true;
- Type* singleton_zero;
- Type* singleton_one;
- Type* zero_or_one;
- Type* zeroish;
- Type* signed32ish;
- Type* unsigned32ish;
- Type* falsish;
- Type* truish;
- Type* integer;
- Type* weakint;
- Type* number_fun0_;
- Type* number_fun1_;
- Type* number_fun2_;
- Type* weakint_fun1_;
- Type* random_fun_;
- LazyTypeCache* cache_;
+ Type* singleton_false_;
+ Type* singleton_true_;
+ Type* singleton_the_hole_;
+ Type* signed32ish_;
+ Type* unsigned32ish_;
+ Type* falsish_;
+ Type* truish_;
- ZoneVector<Handle<Object> > weaken_min_limits_;
- ZoneVector<Handle<Object> > weaken_max_limits_;
DISALLOW_COPY_AND_ASSIGN(Typer);
};
+DEFINE_OPERATORS_FOR_FLAGS(Typer::Flags)
+
} // namespace compiler
} // namespace internal
} // namespace v8