Home | History | Annotate | Download | only in interpreter

Lines Matching full:bytecode

12 #include "src/interpreter/bytecode-peephole-table.h"
33 std::string BytecodeName(Bytecode bytecode) {
34 return "Bytecode::k" + std::string(Bytecodes::ToString(bytecode));
40 static_cast<size_t>(Bytecode::kLast) + 1;
59 PeepholeActionAndData LookupActionAndData(Bytecode last, Bytecode current);
60 void BuildRow(Bytecode last, Row* row);
81 Bytecode last, Bytecode current) {
84 if (current == Bytecode::kToName && Bytecodes::PutsNameInAccumulator(last)) {
85 return {PeepholeAction::kChangeBytecodeAction, Bytecode::kStar};
90 if (last == Bytecode::kNop) {
92 return {PeepholeAction::kElideLastBeforeJumpAction, Bytecode::kIllegal};
94 return {PeepholeAction::kElideLastAction, Bytecode::kIllegal};
103 return {PeepholeAction::kElideLastAction, Bytecode::kIllegal};
111 return {PeepholeAction::kElideLastAction, Bytecode::kIllegal};
115 // values. Only the first bytecode is needed if there's a sequence
119 Bytecode::kIllegal};
130 } else if (current == Bytecode::kToBooleanLogicalNot) {
131 return {PeepholeAction::kChangeBytecodeAction, Bytecode::kLogicalNot};
137 if (last == Bytecode::kLdaSmi) {
139 case Bytecode::kAdd:
141 Bytecode::kAddSmi};
142 case Bytecode::kSub:
144 Bytecode::kSubSmi};
145 case Bytecode::kBitwiseAnd:
147 Bytecode::kBitwiseAndSmi};
148 case Bytecode::kBitwiseOr:
150 Bytecode::kBitwiseOrSmi};
151 case Bytecode::kShiftLeft:
153 Bytecode::kShiftLeftSmi};
154 case Bytecode::kShiftRight:
156 Bytecode::kShiftRightSmi};
164 if (last == Bytecode::kLdaZero) {
166 case Bytecode::kAdd:
169 Bytecode::kAddSmi};
170 case Bytecode::kSub:
173 Bytecode::kSubSmi};
174 case Bytecode::kBitwiseAnd:
177 Bytecode::kBitwiseAndSmi};
178 case Bytecode::kBitwiseOr:
181 Bytecode::kBitwiseOrSmi};
182 case Bytecode::kShiftLeft:
185 Bytecode::kShiftLeftSmi};
186 case Bytecode::kShiftRight:
189 Bytecode::kShiftRightSmi};
195 // If there is no last bytecode to optimize against, store the incoming
196 // bytecode or for jumps emit incoming bytecode immediately.
197 if (last == Bytecode::kIllegal) {
199 return {PeepholeAction::kUpdateLastJumpAction, Bytecode::kIllegal};
200 } else if (current == Bytecode::kNop) {
202 Bytecode::kIllegal};
204 return {PeepholeAction::kUpdateLastAction, Bytecode::kIllegal};
210 return {PeepholeAction::kDefaultJumpAction, Bytecode::kIllegal};
212 return {PeepholeAction::kDefaultAction, Bytecode::kIllegal};
234 os << "#include \"src/interpreter/bytecode-peephole-table.h\"\n\n";
262 << BytecodeName(action_data.bytecode) << "},\n";
282 << "PeepholeActionTable::Lookup(Bytecode last, Bytecode current) {\n"
293 Bytecode last = Bytecodes::FromByte(byte_value);
300 void PeepholeActionTableWriter::BuildRow(Bytecode last, Row* row) {
303 Bytecode current = Bytecodes::FromByte(byte_value);