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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 1604923002: [Interpreter] Always store current context in the frames context slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_fix_block_context_scope
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | 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-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 if (!FitsInReg8Operand(reg)) { return false; } 1334 if (!FitsInReg8Operand(reg)) { return false; }
1335 break; 1335 break;
1336 case OperandSize::kShort: 1336 case OperandSize::kShort:
1337 if (!FitsInReg16Operand(reg)) { return false; } 1337 if (!FitsInReg16Operand(reg)) { return false; }
1338 break; 1338 break;
1339 case OperandSize::kNone: 1339 case OperandSize::kNone:
1340 UNREACHABLE(); 1340 UNREACHABLE();
1341 return false; 1341 return false;
1342 } 1342 }
1343 1343
1344 if (reg.is_function_context() || reg.is_function_closure() || 1344 if (reg.is_current_context() || reg.is_function_closure() ||
1345 reg.is_new_target()) { 1345 reg.is_new_target()) {
1346 return true; 1346 return true;
1347 } else if (reg.is_parameter()) { 1347 } else if (reg.is_parameter()) {
1348 int parameter_index = reg.ToParameterIndex(parameter_count_); 1348 int parameter_index = reg.ToParameterIndex(parameter_count_);
1349 return parameter_index >= 0 && parameter_index < parameter_count_; 1349 return parameter_index >= 0 && parameter_index < parameter_count_;
1350 } else if (reg.index() < fixed_register_count()) { 1350 } else if (reg.index() < fixed_register_count()) {
1351 return true; 1351 return true;
1352 } else { 1352 } else {
1353 return TemporaryRegisterIsLive(reg); 1353 return TemporaryRegisterIsLive(reg);
1354 } 1354 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1685
1686 1686
1687 // static 1687 // static
1688 bool BytecodeArrayBuilder::FitsInReg16Operand(Register value) { 1688 bool BytecodeArrayBuilder::FitsInReg16Operand(Register value) {
1689 return kMinInt16 <= value.index() && value.index() <= kMaxInt16; 1689 return kMinInt16 <= value.index() && value.index() <= kMaxInt16;
1690 } 1690 }
1691 1691
1692 } // namespace interpreter 1692 } // namespace interpreter
1693 } // namespace internal 1693 } // namespace internal
1694 } // namespace v8 1694 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698