Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: src/interpreter/constant-array-builder.h

Issue 1651133002: [interpreter] Move temporary register allocator into own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate review comments from rmcilroy. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/constant-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/constant-array-builder.h
diff --git a/src/interpreter/constant-array-builder.h b/src/interpreter/constant-array-builder.h
index 12d6f0cebe10c9d52ef777abac55a1994a02d21a..d7e41e377102ced2e9d38341a5d6467770c31cda 100644
--- a/src/interpreter/constant-array-builder.h
+++ b/src/interpreter/constant-array-builder.h
@@ -16,8 +16,11 @@ class Isolate;
namespace interpreter {
-// A helper class for constructing constant arrays for the interpreter.
-class ConstantArrayBuilder final : public ZoneObject {
+// A helper class for constructing constant arrays for the
+// interpreter. Each instance of this class is intended to be used to
+// generate exactly one FixedArray of constants via the ToFixedArray
+// method.
+class ConstantArrayBuilder final BASE_EMBEDDED {
public:
// Capacity of the 8-bit operand slice.
static const size_t kLowCapacity = 1u << kBitsPerByte;
@@ -31,7 +34,7 @@ class ConstantArrayBuilder final : public ZoneObject {
ConstantArrayBuilder(Isolate* isolate, Zone* zone);
// Generate a fixed array of constants based on inserted objects.
- Handle<FixedArray> ToFixedArray() const;
+ Handle<FixedArray> ToFixedArray();
// Returns the object in the constant pool array that at index
// |index|.
@@ -83,6 +86,8 @@ class ConstantArrayBuilder final : public ZoneObject {
DISALLOW_COPY_AND_ASSIGN(ConstantArraySlice);
};
+ IdentityMap<index_t>* constants_map() { return &constants_map_; }
+
Isolate* isolate_;
ConstantArraySlice idx8_slice_;
ConstantArraySlice idx16_slice_;
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/constant-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698