Lines Matching refs:bytecode
5 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-jump-table.h"
10 #include "src/interpreter/bytecode-label.h"
11 #include "src/interpreter/bytecode-node.h"
12 #include "src/interpreter/bytecode-register.h"
13 #include "src/interpreter/bytecode-source-info.h"
85 int BytecodeArrayWriter::CheckBytecodeMatches(BytecodeArray bytecode) {
89 if (bytecode_size != bytecode.length()) mismatches = true;
91 // If there's a mismatch only in the length of the bytecode (very unlikely)
92 // then the first mismatch will be the first extra bytecode.
93 int first_mismatch = std::min(bytecode_size, bytecode.length());
95 if (bytecode_ptr[i] != bytecode.get(i)) {
110 DCHECK(!Bytecodes::IsJump(node->bytecode()));
113 UpdateExitSeenInBlock(node->bytecode());
114 MaybeElideLastBytecode(node->bytecode(), node->source_info().is_valid());
121 DCHECK(Bytecodes::IsForwardJump(node->bytecode()));
124 UpdateExitSeenInBlock(node->bytecode());
125 MaybeElideLastBytecode(node->bytecode(), node->source_info().is_valid());
133 DCHECK_EQ(node->bytecode(), Bytecode::kJumpLoop);
136 UpdateExitSeenInBlock(node->bytecode());
137 MaybeElideLastBytecode(node->bytecode(), node->source_info().is_valid());
145 DCHECK(Bytecodes::IsSwitch(node->bytecode()));
148 UpdateExitSeenInBlock(node->bytecode());
149 MaybeElideLastBytecode(node->bytecode(), node->source_info().is_valid());
198 // invalidate the bytecode to avoid eliding it and changing the offset.
206 // invalidate the bytecode to avoid eliding it and changing the offset.
234 void BytecodeArrayWriter::UpdateExitSeenInBlock(Bytecode bytecode) {
235 switch (bytecode) {
255 // If the last bytecode loaded the accumulator without any external effect,
256 // and the next bytecode clobbers this load without reading the accumulator,
257 // then the previous bytecode can be elided as it has no effect.
264 // If the last bytecode had source info we will transfer the source info
265 // to this bytecode.
278 DCHECK_NE(node->bytecode(), Bytecode::kIllegal);
280 Bytecode bytecode = node->bytecode();
287 bytecodes()->push_back(Bytecodes::ToByte(bytecode));
292 Bytecodes::GetOperandSizes(bytecode, operand_scale);
435 // If a prefix scaling bytecode is emitted the target offset is one
436 // less than the case of no prefix scaling bytecode.
463 DCHECK_EQ(node->bytecode(), Bytecode::kJumpLoop);
483 DCHECK(Bytecodes::IsForwardJump(node->bytecode()));
493 // be emitted into the bytecode stream with space for the operand.
498 DCHECK_NE(Bytecode::kJumpLoop, node->bytecode());
517 DCHECK(Bytecodes::IsSwitch(node->bytecode()));