Index: src/compiler/js-operator.h |
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h |
index e9f161ff599e2b7bcacad819f8efbf7bfc5fdf97..9d744a8f2dea1000b81602b7999dfd44961e6be0 100644 |
--- a/src/compiler/js-operator.h |
+++ b/src/compiler/js-operator.h |
@@ -403,6 +403,34 @@ std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); |
+// Defines shared information for the literal that should be created. This is |
+// used as parameter by JSCreateLiteralArray and JSCreateLiteralObject |
+// operators. |
+class CreateLiteralParameters final { |
+ public: |
+ CreateLiteralParameters(Handle<FixedArray> constants, int flags, int index) |
+ : constants_(constants), flags_(flags), index_(index) {} |
+ |
+ Handle<FixedArray> constants() const { return constants_; } |
+ int flags() const { return flags_; } |
+ int index() const { return index_; } |
+ |
+ private: |
+ Handle<FixedArray> const constants_; |
+ int const flags_; |
+ int const index_; |
+}; |
+ |
+bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); |
+bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); |
+ |
+size_t hash_value(CreateLiteralParameters const&); |
+ |
+std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
+ |
+const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); |
+ |
+ |
// Interface for building JavaScript-level operators, e.g. directly from the |
// AST. Most operators have no parameters, thus can be globally shared for all |
// graphs. |
@@ -444,8 +472,10 @@ class JSOperatorBuilder final : public ZoneObject { |
const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
PretenureFlag pretenure); |
- const Operator* CreateLiteralArray(int literal_flags); |
- const Operator* CreateLiteralObject(int literal_flags); |
+ const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, |
+ int literal_flags, int literal_index); |
+ const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
+ int literal_flags, int literal_index); |
const Operator* CallFunction( |
size_t arity, LanguageMode language_mode, |