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

Side by Side Diff: src/interpreter/bytecodes.cc

Issue 1651133002: [interpreter] Move temporary register allocator into own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate review comments from rmcilroy. 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/bytecodes.h ('k') | src/interpreter/constant-array-builder.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/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/interpreter/bytecode-traits.h" 8 #include "src/interpreter/bytecode-traits.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode) || 255 return IsJumpImmediate(bytecode) || IsJumpConstant(bytecode) ||
256 IsJumpConstantWide(bytecode); 256 IsJumpConstantWide(bytecode);
257 } 257 }
258 258
259 259
260 // static 260 // static
261 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { 261 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) {
262 return bytecode == Bytecode::kReturn || IsJump(bytecode); 262 return bytecode == Bytecode::kReturn || IsJump(bytecode);
263 } 263 }
264 264
265 bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) {
266 return (operand_type == OperandType::kMaybeReg8 ||
267 operand_type == OperandType::kMaybeReg16);
268 }
269
270 bool Bytecodes::IsRegisterCountOperandType(OperandType operand_type) {
271 return (operand_type == OperandType::kRegCount8 ||
272 operand_type == OperandType::kRegCount16);
273 }
274
265 // static 275 // static
266 bool Bytecodes::IsRegisterOperandType(OperandType operand_type) { 276 bool Bytecodes::IsRegisterOperandType(OperandType operand_type) {
267 switch (operand_type) { 277 switch (operand_type) {
268 #define CASE(Name, _) \ 278 #define CASE(Name, _) \
269 case OperandType::k##Name: \ 279 case OperandType::k##Name: \
270 return true; 280 return true;
271 REGISTER_OPERAND_TYPE_LIST(CASE) 281 REGISTER_OPERAND_TYPE_LIST(CASE)
272 #undef CASE 282 #undef CASE
273 #define CASE(Name, _) \ 283 #define CASE(Name, _) \
274 case OperandType::k##Name: \ 284 case OperandType::k##Name: \
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } else { 577 } else {
568 std::ostringstream s; 578 std::ostringstream s;
569 s << "r" << index(); 579 s << "r" << index();
570 return s.str(); 580 return s.str();
571 } 581 }
572 } 582 }
573 583
574 } // namespace interpreter 584 } // namespace interpreter
575 } // namespace internal 585 } // namespace internal
576 } // namespace v8 586 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/constant-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698