Lines Matching full:bytecode
5 #include "src/interpreter/bytecode-peephole-optimizer.h"
16 : next_stage_(next_stage), last_(Bytecode::kIllegal, BytecodeSourceInfo()) {
56 // bytecode to next stage as appropriate.
68 last_.set_bytecode(Bytecode::kIllegal);
72 return last_.bytecode() != Bytecode::kIllegal;
76 // An action shouldn't leave a NOP as last bytecode unless it has
79 DCHECK(node->bytecode() != Bytecode::kNop || node->source_info().is_valid());
86 // The rules for allowing the elision of the last bytecode based
101 // expression positions. Whenever the last bytecode is elided it's
105 // The last bytecode could be elided for the MAYBE cases if the last
106 // bytecode is known not to throw. If it throws, the system would
109 // default, the upstream bytecode generator filters out unneeded
119 void TransformLdaSmiBinaryOpToBinaryOpWithSmi(Bytecode new_bytecode,
122 DCHECK_EQ(last->bytecode(), Bytecode::kLdaSmi);
130 void TransformLdaZeroBinaryOpToBinaryOpWithZero(Bytecode new_bytecode,
133 DCHECK_EQ(last->bytecode(), Bytecode::kLdaZero);
146 DCHECK(!Bytecodes::IsJump(node->bytecode()));
155 DCHECK(!Bytecodes::IsJump(node->bytecode()));
163 DCHECK(!Bytecodes::IsJump(node->bytecode()));
173 DCHECK(!Bytecodes::IsJump(node->bytecode()));
176 // Preserve the source information by replacing the node bytecode
177 // with a no op bytecode.
178 node->set_bytecode(Bytecode::kNop);
181 // Nothing to do, keep last and wait for next bytecode to pair with it.
188 DCHECK(!Bytecodes::IsJump(node->bytecode()));
200 DCHECK(!Bytecodes::IsJump(node->bytecode()));
218 DCHECK(!Bytecodes::IsJump(node->bytecode()));
220 node->replace_bytecode(action_data->bytecode);
227 DCHECK(!Bytecodes::IsJump(node->bytecode()));
231 TransformLdaSmiBinaryOpToBinaryOpWithSmi(action_data->bytecode, last(),
243 DCHECK(!Bytecodes::IsJump(node->bytecode()));
246 TransformLdaZeroBinaryOpToBinaryOpWithZero(action_data->bytecode, last(),
257 DCHECK(Bytecodes::IsJump(node->bytecode()));
266 DCHECK(Bytecodes::IsJump(node->bytecode()));
272 DCHECK(Bytecodes::IsJump(node->bytecode()));
276 node->set_bytecode(action_data->bytecode, node->operand(0));
282 DCHECK(Bytecodes::IsJump(node->bytecode()));
296 // have different processing logic, in particular a jump bytecode
299 PeepholeActionTable::Lookup(last()->bytecode(), node->bytecode());