Index: src/compiler/js-operator.h |
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
index 6bd6516af3be488a633ba9e6025d8ebf008ead40..18aa5c3595310d026c5c8b410f1b28b09a20e28a 100644 |
--- a/src/compiler/js-operator.h |
+++ b/src/compiler/js-operator.h |
@@ -54,6 +54,31 @@ size_t hash_value(TailCallMode); |
std::ostream& operator<<(std::ostream&, TailCallMode); |
+// Defines the arity and the feedback for a JavaScript constructor call. This is |
+// used as a parameter by JSCallConstruct operators. |
+class CallConstructParameters final { |
+ public: |
+ CallConstructParameters(size_t arity, VectorSlotPair const& feedback) |
+ : arity_(arity), feedback_(feedback) {} |
+ |
+ size_t arity() const { return arity_; } |
+ VectorSlotPair const& feedback() const { return feedback_; } |
+ |
+ private: |
+ size_t const arity_; |
+ VectorSlotPair const feedback_; |
+}; |
+ |
+bool operator==(CallConstructParameters const&, CallConstructParameters const&); |
+bool operator!=(CallConstructParameters const&, CallConstructParameters const&); |
+ |
+size_t hash_value(CallConstructParameters const&); |
+ |
+std::ostream& operator<<(std::ostream&, CallConstructParameters const&); |
+ |
+CallConstructParameters const& CallConstructParametersOf(Operator const*); |
+ |
+ |
// Defines the arity and the call flags for a JavaScript function call. This is |
// used as a parameter by JSCallFunction operators. |
class CallFunctionParameters final { |
@@ -327,6 +352,33 @@ const CreateArgumentsParameters& CreateArgumentsParametersOf( |
const Operator* op); |
+// Defines shared information for the array that should be created. This is |
+// used as parameter by JSCreateArray operators. |
+class CreateArrayParameters final { |
+ public: |
+ explicit CreateArrayParameters( |
+ size_t arity, |
+ MaybeHandle<AllocationSite> site = MaybeHandle<AllocationSite>()) |
+ : arity_(arity), site_(site) {} |
+ |
+ size_t arity() const { return arity_; } |
+ MaybeHandle<AllocationSite> site() const { return site_; } |
+ |
+ private: |
+ size_t const arity_; |
+ MaybeHandle<AllocationSite> const site_; |
+}; |
+ |
+bool operator==(CreateArrayParameters const&, CreateArrayParameters const&); |
+bool operator!=(CreateArrayParameters const&, CreateArrayParameters const&); |
+ |
+size_t hash_value(CreateArrayParameters const&); |
+ |
+std::ostream& operator<<(std::ostream&, CreateArrayParameters const&); |
+ |
+const CreateArrayParameters& CreateArrayParametersOf(const Operator* op); |
+ |
+ |
// Defines shared information for the closure that should be created. This is |
// used as a parameter by JSCreateClosure operators. |
class CreateClosureParameters final { |
@@ -391,6 +443,7 @@ class JSOperatorBuilder final : public ZoneObject { |
const Operator* Create(); |
const Operator* CreateArguments(CreateArgumentsParameters::Type type, |
int start_index); |
+ const Operator* CreateArray(size_t arity, MaybeHandle<AllocationSite> site); |
const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
PretenureFlag pretenure); |
const Operator* CreateLiteralArray(int literal_flags); |
@@ -402,7 +455,8 @@ class JSOperatorBuilder final : public ZoneObject { |
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, |
TailCallMode tail_call_mode = TailCallMode::kDisallow); |
const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |
- const Operator* CallConstruct(int arguments); |
+ const Operator* CallConstruct( |
+ size_t arity, VectorSlotPair const& feedback = VectorSlotPair()); |
Michael Starzinger
2015/11/20 12:06:47
nit: Could we drop the default value? I would vote
Benedikt Meurer
2015/11/20 12:28:52
Done.
|
const Operator* ConvertReceiver(ConvertReceiverMode convert_mode); |
@@ -430,6 +484,8 @@ class JSOperatorBuilder final : public ZoneObject { |
const Operator* LoadContext(size_t depth, size_t index, bool immutable); |
const Operator* StoreContext(size_t depth, size_t index); |
+ const Operator* LoadNativeContext(); |
Michael Starzinger
2015/11/20 12:06:47
nit: Move this down a bit so that the variable loa
Benedikt Meurer
2015/11/20 12:28:52
As discussed offline: This will die once the conte
Benedikt Meurer
2015/11/20 12:28:52
Done.
|
+ |
const Operator* LoadDynamic(const Handle<String>& name, |
TypeofMode typeof_mode); |