Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 26b5414b3a6b79305c066696a13cc0ef1a6622c9..93a86de5cd88ad71b1cd8d6796b36db63ce9804f 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -1061,6 +1061,15 @@ Register TemporaryRegisterScope::NewRegister() { |
} |
+bool TemporaryRegisterScope::RegisterIsAllocatedInThisScope( |
+ Register reg) const { |
+ for (auto i = allocated_.begin(); i != allocated_.end(); i++) { |
+ if (*i == reg.index()) return true; |
+ } |
+ return false; |
+} |
+ |
+ |
void TemporaryRegisterScope::PrepareForConsecutiveAllocations(size_t count) { |
if (static_cast<int>(count) > next_consecutive_count_) { |
next_consecutive_register_ = |