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

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

Issue 2118183002: [interpeter] Move to table based peephole optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo experimental in last patch set. Created 4 years, 5 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/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 case Bytecode::kDebugBreakExtraWide: 494 case Bytecode::kDebugBreakExtraWide:
495 case Bytecode::kWide: 495 case Bytecode::kWide:
496 case Bytecode::kDebugBreakWide: 496 case Bytecode::kDebugBreakWide:
497 return true; 497 return true;
498 default: 498 default:
499 return false; 499 return false;
500 } 500 }
501 } 501 }
502 502
503 // static 503 // static
504 bool Bytecodes::PutsNameInAccumulator(Bytecode bytecode) {
505 return bytecode == Bytecode::kToName || bytecode == Bytecode::kTypeOf;
506 }
507
508 // static
504 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { 509 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) {
505 return bytecode == Bytecode::kReturn || IsJump(bytecode); 510 return bytecode == Bytecode::kReturn || IsJump(bytecode);
506 } 511 }
507 512
508 // static 513 // static
509 bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) { 514 bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) {
510 return operand_type == OperandType::kMaybeReg; 515 return operand_type == OperandType::kMaybeReg;
511 } 516 }
512 517
513 // static 518 // static
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 if (!FLAG_always_opt && !FLAG_prepare_always_opt && 945 if (!FLAG_always_opt && !FLAG_prepare_always_opt &&
941 pretenure == NOT_TENURED && is_function_scope) { 946 pretenure == NOT_TENURED && is_function_scope) {
942 result |= FastNewClosureBit::encode(true); 947 result |= FastNewClosureBit::encode(true);
943 } 948 }
944 return result; 949 return result;
945 } 950 }
946 951
947 } // namespace interpreter 952 } // namespace interpreter
948 } // namespace internal 953 } // namespace internal
949 } // namespace v8 954 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698