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/js-context-specialization.h b/src/compiler/js-context-specialization.h
index 298d3a3..ef784fc 100644
--- a/src/compiler/js-context-specialization.h
+++ b/src/compiler/js-context-specialization.h
@@ -6,34 +6,46 @@
#define V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_
#include "src/compiler/graph-reducer.h"
-#include "src/compiler/js-graph.h"
-#include "src/contexts.h"
-#include "src/v8.h"
namespace v8 {
namespace internal {
namespace compiler {
+// Forward declarations.
+class JSGraph;
+class JSOperatorBuilder;
+
+
// Specializes a given JSGraph to a given context, potentially constant folding
// some {LoadContext} nodes or strength reducing some {StoreContext} nodes.
-class JSContextSpecializer : public Reducer {
+class JSContextSpecialization final : public AdvancedReducer {
public:
- JSContextSpecializer(CompilationInfo* info, JSGraph* jsgraph, Node* context)
- : info_(info), jsgraph_(jsgraph), context_(context) {}
+ JSContextSpecialization(Editor* editor, JSGraph* jsgraph,
+ MaybeHandle<Context> context)
+ : AdvancedReducer(editor), jsgraph_(jsgraph), context_(context) {}
- Reduction Reduce(Node* node) OVERRIDE;
+ Reduction Reduce(Node* node) final;
- // Visible for unit testing.
+ private:
Reduction ReduceJSLoadContext(Node* node);
Reduction ReduceJSStoreContext(Node* node);
- private:
- CompilationInfo* info_;
- JSGraph* jsgraph_;
- Node* context_;
+ // Returns the {Context} to specialize {node} to (if any).
+ MaybeHandle<Context> GetSpecializationContext(Node* node);
+
+ Isolate* isolate() const;
+ JSOperatorBuilder* javascript() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ MaybeHandle<Context> context() const { return context_; }
+
+ JSGraph* const jsgraph_;
+ MaybeHandle<Context> context_;
+
+ DISALLOW_COPY_AND_ASSIGN(JSContextSpecialization);
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_