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

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

Issue 1721723002: [interpreter] Clean super property handling. (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
« no previous file with comments | « src/interpreter/bytecode-register-allocator.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
235 } // namespace interpreter 227 } // namespace interpreter
236 } // namespace internal 228 } // namespace internal
237 } // namespace v8 229 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-register-allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698