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

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

Issue 1587033002: [Interpreter] Ensure we always have an outer register allocation scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_mythri
Patch Set: Similarity 20 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 | « BUILD.gn ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 1d2edea99ca95c4e69638b50fb74cccf72af2e13..7c23dc3f22caa035e19de98ad7759aef7d6bf15d 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -334,7 +334,8 @@ class BytecodeArrayBuilder final {
ZoneSet<int> free_temporaries_;
class PreviousBytecodeHelper;
- friend class TemporaryRegisterScope;
+ friend class BytecodeRegisterAllocator;
+
DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
};
@@ -379,38 +380,6 @@ class BytecodeLabel final {
friend class BytecodeArrayBuilder;
};
-
-// A stack-allocated class than allows the instantiator to allocate
-// temporary registers that are cleaned up when scope is closed.
-// TODO(oth): Deprecate TemporaryRegisterScope use. Code should be
-// using result scopes as far as possible.
-class TemporaryRegisterScope {
- public:
- explicit TemporaryRegisterScope(BytecodeArrayBuilder* builder);
- ~TemporaryRegisterScope();
- Register NewRegister();
-
- void PrepareForConsecutiveAllocations(size_t count);
- Register NextConsecutiveRegister();
-
- bool RegisterIsAllocatedInThisScope(Register reg) const;
-
- bool hasConsecutiveAllocations() const { return next_consecutive_count_ > 0; }
-
- private:
- void* operator new(size_t size);
- void operator delete(void* p);
-
- BytecodeArrayBuilder* builder_;
- const TemporaryRegisterScope* outer_;
- ZoneVector<int> allocated_;
- int next_consecutive_register_;
- int next_consecutive_count_;
-
- DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
-};
-
-
} // namespace interpreter
} // namespace internal
} // namespace v8
« no previous file with comments | « BUILD.gn ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698