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

Side by Side Diff: src/interpreter/bytecode-register-allocator.cc

Issue 1689573004: [interpreter] Support for ES6 super keyword. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/bytecode-register-allocator.h" 5 #include "src/interpreter/bytecode-register-allocator.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Register BytecodeRegisterAllocator::NextConsecutiveRegister() { 217 Register BytecodeRegisterAllocator::NextConsecutiveRegister() {
218 DCHECK_GE(next_consecutive_register_, 0); 218 DCHECK_GE(next_consecutive_register_, 0);
219 DCHECK_GT(next_consecutive_count_, 0); 219 DCHECK_GT(next_consecutive_count_, 0);
220 base_allocator()->BorrowConsecutiveTemporaryRegister( 220 base_allocator()->BorrowConsecutiveTemporaryRegister(
221 next_consecutive_register_); 221 next_consecutive_register_);
222 allocated_.push_back(next_consecutive_register_); 222 allocated_.push_back(next_consecutive_register_);
223 next_consecutive_count_--; 223 next_consecutive_count_--;
224 return Register(next_consecutive_register_++); 224 return Register(next_consecutive_register_++);
225 } 225 }
226 226
227 void BytecodeRegisterAllocator::PrepareAndInitializeConsecutiveAllocations(
228 Register* registers, size_t count) {
229 PrepareForConsecutiveAllocations(count);
230 for (size_t i = 0; i < count; i++) {
231 registers[i] = NextConsecutiveRegister();
232 }
233 }
234
227 } // namespace interpreter 235 } // namespace interpreter
228 } // namespace internal 236 } // namespace internal
229 } // namespace v8 237 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698