Lines Matching refs:bytecode

5 #include "src/compiler/bytecode-analysis.h"
9 #include "src/compiler/bytecode-liveness-map.h"
10 #include "src/interpreter/bytecode-array-iterator.h"
11 #include "src/interpreter/bytecode-array-random-iterator.h"
105 template <Bytecode bytecode, OperandType operand_type, size_t i>
154 template <Bytecode bytecode, OperandType operand_type, size_t i>
192 template <Bytecode bytecode, ImplicitRegisterUse implicit_register_use,
198 if (bytecode == Bytecode::kSuspendGenerator) {
202 DCHECK(Bytecodes::ReadsAccumulator(bytecode));
206 if (bytecode == Bytecode::kResumeGenerator) {
215 (UpdateInLivenessForOutOperand<bytecode, operand_types, operand_index>(
219 if (Bytecodes::WritesImplicitRegister(bytecode)) {
220 in_liveness->MarkRegisterDead(Register::FromShortStar(bytecode).index());
226 (UpdateInLivenessForInOperand<bytecode, operand_types, operand_index>(
231 template <Bytecode bytecode, ImplicitRegisterUse implicit_register_use,
235 UpdateInLiveness<bytecode, implicit_register_use, operand_types...>(
240 void UpdateInLiveness(Bytecode bytecode, BytecodeLivenessState* in_liveness,
242 switch (bytecode) {
257 // We should have copied the next bytecode's in liveness already in the
263 // If the out-liveness is aliasing the next bytecode's in-liveness,
270 template <bool IsFirstUpdate, Bytecode bytecode>
277 // already aliasing the next bytecode's in-liveness.
281 if (bytecode == Bytecode::kSuspendGenerator ||
282 bytecode == Bytecode::kResumeGenerator) {
292 // Update from next bytecode (unless there isn't one or this is an
295 !Bytecodes::IsUnconditionalJump(bytecode) &&
296 !Bytecodes::Returns(bytecode) &&
297 !Bytecodes::UnconditionallyThrows(bytecode)) {
319 if (Bytecodes::IsForwardJump(bytecode)) {
324 } else if (Bytecodes::IsSwitch(bytecode)) {
334 if (!interpreter::Bytecodes::IsWithoutExternalSideEffects(bytecode)) {
349 // and so shouldn't be considered live coming out of this bytecode just
355 // the start of the handler, but looking up if the current bytecode is
364 void UpdateOutLiveness(Bytecode bytecode, BytecodeLiveness& liveness,
369 switch (bytecode) {
380 template <bool IsFirstUpdate, Bytecode bytecode,
388 UpdateOutLiveness<IsFirstUpdate, bytecode>(
402 UpdateInLiveness<bytecode, implicit_register_use, operand_types...>(
409 void UpdateLiveness(Bytecode bytecode, BytecodeLiveness& liveness,
414 switch (bytecode) {
425 void UpdateAssignments(Bytecode bytecode, BytecodeLoopAssignments* assignments,
427 int num_operands = Bytecodes::NumberOfOperands(bytecode);
428 const OperandType* operand_types = Bytecodes::GetOperandTypes(bytecode);
456 if (Bytecodes::WritesImplicitRegister(bytecode)) {
457 assignments->Add(interpreter::Register::FromShortStar(bytecode));
479 Bytecode bytecode = iterator.current_bytecode();
482 if (bytecode == Bytecode::kSwitchOnGeneratorState) {
485 } else if (bytecode == Bytecode::kJumpLoop) {
496 // osr_loop_end_offset. Note, we are iterating the bytecode in reverse,
511 (bytecode != Bytecode::kJumpLoop ||
522 UpdateAssignments(bytecode, &current_loop_info->assignments(), iterator);
525 if (bytecode == Bytecode::kSuspendGenerator) {
579 } else if (bytecode == Bytecode::kSuspendGenerator) {
592 UpdateLiveness<true>(bytecode, liveness, &next_bytecode_in_liveness,
604 // At this point, every bytecode has a valid in and out liveness, except for
621 // This means that in a pass, we can iterate backwards over the bytecode
651 Bytecode bytecode = iterator.current_bytecode();
654 UpdateLiveness(bytecode, liveness, &next_bytecode_in_liveness, iterator,
693 Bytecode bytecode = iterator.current_bytecode();
698 DCHECK_NE(bytecode, Bytecode::kJumpLoop);
700 UpdateLiveness(bytecode, liveness, &next_bytecode_in_liveness, iterator,
921 // Make sure we're resuming to a Resume bytecode
977 Bytecode bytecode = iterator.current_bytecode();
985 UpdateOutLiveness(bytecode, liveness, next_bytecode_in_liveness, iterator,
988 if (bytecode == Bytecode::kJumpLoop) {
1005 UpdateInLiveness(bytecode, liveness.in, iterator);
1023 Bytecode bytecode = iterator.current_bytecode();
1031 if (!Bytecodes::IsJump(bytecode)) continue;
1036 if (Bytecodes::IsForwardJump(bytecode) &&
1053 // Dump the bytecode, annotated with the liveness and marking loops.