Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 562 case OperandType::k##Name: \ | 562 case OperandType::k##Name: \ |
| 563 break; | 563 break; |
| 564 NON_REGISTER_OPERAND_TYPE_LIST(CASE) | 564 NON_REGISTER_OPERAND_TYPE_LIST(CASE) |
| 565 REGISTER_INPUT_OPERAND_TYPE_LIST(CASE) | 565 REGISTER_INPUT_OPERAND_TYPE_LIST(CASE) |
| 566 #undef CASE | 566 #undef CASE |
| 567 } | 567 } |
| 568 return false; | 568 return false; |
| 569 } | 569 } |
| 570 | 570 |
| 571 // static | 571 // static |
| 572 bool Bytecodes::IsStarLookahead(Bytecode bytecode, OperandScale operand_scale) { | |
| 573 if (operand_scale == OperandScale::kSingle) { | |
| 574 switch (bytecode) { | |
| 575 case Bytecode::kLdaZero: | |
|
oth
2016/07/18 08:05:40
Is there data driving the selected bytecodes here?
klaasb
2016/07/18 09:48:54
Some experiments are in the earlier patchsets (alt
| |
| 576 case Bytecode::kLdaSmi: | |
| 577 case Bytecode::kLdaNull: | |
| 578 case Bytecode::kLdaConstant: | |
| 579 case Bytecode::kMov: | |
|
rmcilroy
2016/07/18 11:07:51
kMov seems an unusual one since it doesn't update
klaasb
2016/07/18 15:15:28
I thought about that too. It is the top 10-20 for
| |
| 580 case Bytecode::kAdd: | |
| 581 case Bytecode::kSub: | |
| 582 case Bytecode::kMul: | |
| 583 case Bytecode::kAddSmi: | |
| 584 case Bytecode::kSubSmi: | |
| 585 case Bytecode::kInc: | |
| 586 case Bytecode::kDec: | |
| 587 case Bytecode::kCall: | |
| 588 case Bytecode::kNew: | |
| 589 return true; | |
| 590 default: | |
| 591 return false; | |
| 592 } | |
| 593 } | |
| 594 return false; | |
| 595 } | |
| 596 | |
| 597 // static | |
| 572 int Bytecodes::GetNumberOfRegistersRepresentedBy(OperandType operand_type) { | 598 int Bytecodes::GetNumberOfRegistersRepresentedBy(OperandType operand_type) { |
| 573 switch (operand_type) { | 599 switch (operand_type) { |
| 574 case OperandType::kMaybeReg: | 600 case OperandType::kMaybeReg: |
| 575 case OperandType::kReg: | 601 case OperandType::kReg: |
| 576 case OperandType::kRegOut: | 602 case OperandType::kRegOut: |
| 577 return 1; | 603 return 1; |
| 578 case OperandType::kRegPair: | 604 case OperandType::kRegPair: |
| 579 case OperandType::kRegOutPair: | 605 case OperandType::kRegOutPair: |
| 580 return 2; | 606 return 2; |
| 581 case OperandType::kRegOutTriple: | 607 case OperandType::kRegOutTriple: |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 945 if (!FLAG_always_opt && !FLAG_prepare_always_opt && | 971 if (!FLAG_always_opt && !FLAG_prepare_always_opt && |
| 946 pretenure == NOT_TENURED && is_function_scope) { | 972 pretenure == NOT_TENURED && is_function_scope) { |
| 947 result |= FastNewClosureBit::encode(true); | 973 result |= FastNewClosureBit::encode(true); |
| 948 } | 974 } |
| 949 return result; | 975 return result; |
| 950 } | 976 } |
| 951 | 977 |
| 952 } // namespace interpreter | 978 } // namespace interpreter |
| 953 } // namespace internal | 979 } // namespace internal |
| 954 } // namespace v8 | 980 } // namespace v8 |
| OLD | NEW |