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..fbc54ec3e5789f005636d5491ad936e5a44655b4 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -1061,6 +1061,14 @@ Register TemporaryRegisterScope::NewRegister() { |
} |
+bool TemporaryRegisterScope::AllocatedRegister(Register reg) const { |
oth
2015/10/27 12:30:23
Suggest renaming to RegisterIsAllocated() to match
rmcilroy
2015/10/27 13:13:24
Renamed to RegisterIsAllocatedInThisScope() to be
|
+ 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_ = |