Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/compiler/js-create-lowering.h b/src/compiler/js-create-lowering.h
new file mode 100644
index 0000000..d9d184b
--- /dev/null
+++ b/src/compiler/js-create-lowering.h
@@ -0,0 +1,99 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_JS_CREATE_LOWERING_H_
+#define V8_COMPILER_JS_CREATE_LOWERING_H_
+
+#include "src/compiler/graph-reducer.h"
+
+namespace v8 {
+namespace internal {
+
+// Forward declarations.
+class AllocationSiteUsageContext;
+class CompilationDependencies;
+class Factory;
+
+
+namespace compiler {
+
+// Forward declarations.
+class CommonOperatorBuilder;
+class JSGraph;
+class JSOperatorBuilder;
+class MachineOperatorBuilder;
+class SimplifiedOperatorBuilder;
+
+
+// Lowers JSCreate-level operators to fast (inline) allocations.
+class JSCreateLowering final : public AdvancedReducer {
+ public:
+ JSCreateLowering(Editor* editor, CompilationDependencies* dependencies,
+ JSGraph* jsgraph, MaybeHandle<LiteralsArray> literals_array,
+ Zone* zone)
+ : AdvancedReducer(editor),
+ dependencies_(dependencies),
+ jsgraph_(jsgraph),
+ literals_array_(literals_array),
+ zone_(zone) {}
+ ~JSCreateLowering() final {}
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Reduction ReduceJSCreate(Node* node);
+ Reduction ReduceJSCreateArguments(Node* node);
+ Reduction ReduceJSCreateArray(Node* node);
+ Reduction ReduceJSCreateIterResultObject(Node* node);
+ Reduction ReduceJSCreateLiteral(Node* node);
+ Reduction ReduceJSCreateFunctionContext(Node* node);
+ Reduction ReduceJSCreateWithContext(Node* node);
+ Reduction ReduceJSCreateCatchContext(Node* node);
+ Reduction ReduceJSCreateBlockContext(Node* node);
+ Reduction ReduceNewArray(Node* node, Node* length, int capacity,
+ Handle<AllocationSite> site);
+
+ Node* AllocateArguments(Node* effect, Node* control, Node* frame_state);
+ Node* AllocateRestArguments(Node* effect, Node* control, Node* frame_state,
+ int start_index);
+ Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state,
+ Node* context, Handle<SharedFunctionInfo>,
+ bool* has_aliased_arguments);
+ Node* AllocateElements(Node* effect, Node* control,
+ ElementsKind elements_kind, int capacity,
+ PretenureFlag pretenure);
+ Node* AllocateFastLiteral(Node* effect, Node* control,
+ Handle<JSObject> boilerplate,
+ AllocationSiteUsageContext* site_context);
+ Node* AllocateFastLiteralElements(Node* effect, Node* control,
+ Handle<JSObject> boilerplate,
+ PretenureFlag pretenure,
+ AllocationSiteUsageContext* site_context);
+ Node* AllocateMutableHeapNumber(double value, Node* effect, Node* control);
+
+ // Infers the LiteralsArray to use for a given {node}.
+ MaybeHandle<LiteralsArray> GetSpecializationLiterals(Node* node);
+
+ Factory* factory() const;
+ Graph* graph() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ Isolate* isolate() const;
+ JSOperatorBuilder* javascript() const;
+ CommonOperatorBuilder* common() const;
+ SimplifiedOperatorBuilder* simplified() const;
+ MachineOperatorBuilder* machine() const;
+ CompilationDependencies* dependencies() const { return dependencies_; }
+ Zone* zone() const { return zone_; }
+
+ CompilationDependencies* const dependencies_;
+ JSGraph* const jsgraph_;
+ MaybeHandle<LiteralsArray> const literals_array_;
+ Zone* const zone_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_JS_CREATE_LOWERING_H_