Changeset 223318 in webkit for trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp
- Timestamp:
- Oct 14, 2017, 8:35:48 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.cpp
r222689 r223318 361 361 362 362 template<class Block> 363 void BytecodeDumper<Block>::printCompareJump(PrintStream& out, const typename Block::Instruction*, const typename Block::Instruction*& it, int location, const char* op) 364 { 365 int r0 = (++it)->u.operand; 366 int r1 = (++it)->u.operand; 367 int offset = (++it)->u.operand; 368 printLocationAndOp(out, location, it, op); 369 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 370 } 371 372 template<class Block> 363 373 void BytecodeDumper<Block>::printGetByIdOp(PrintStream& out, int location, const typename Block::Instruction*& it) 364 374 { … … 835 845 break; 836 846 } 847 case op_below: { 848 printBinaryOp(out, location, it, "below"); 849 break; 850 } 851 case op_beloweq: { 852 printBinaryOp(out, location, it, "beloweq"); 853 break; 854 } 837 855 case op_inc: { 838 856 int r0 = (++it)->u.operand; … … 1198 1216 } 1199 1217 case op_jless: { 1200 int r0 = (++it)->u.operand; 1201 int r1 = (++it)->u.operand; 1202 int offset = (++it)->u.operand; 1203 printLocationAndOp(out, location, it, "jless"); 1204 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1218 printCompareJump(out, begin, it, location, "jless"); 1205 1219 break; 1206 1220 } 1207 1221 case op_jlesseq: { 1208 int r0 = (++it)->u.operand; 1209 int r1 = (++it)->u.operand; 1210 int offset = (++it)->u.operand; 1211 printLocationAndOp(out, location, it, "jlesseq"); 1212 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1222 printCompareJump(out, begin, it, location, "jlesseq"); 1213 1223 break; 1214 1224 } 1215 1225 case op_jgreater: { 1216 int r0 = (++it)->u.operand; 1217 int r1 = (++it)->u.operand; 1218 int offset = (++it)->u.operand; 1219 printLocationAndOp(out, location, it, "jgreater"); 1220 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1226 printCompareJump(out, begin, it, location, "jgreater"); 1221 1227 break; 1222 1228 } 1223 1229 case op_jgreatereq: { 1224 int r0 = (++it)->u.operand; 1225 int r1 = (++it)->u.operand; 1226 int offset = (++it)->u.operand; 1227 printLocationAndOp(out, location, it, "jgreatereq"); 1228 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1230 printCompareJump(out, begin, it, location, "jgreatereq"); 1229 1231 break; 1230 1232 } 1231 1233 case op_jnless: { 1232 int r0 = (++it)->u.operand; 1233 int r1 = (++it)->u.operand; 1234 int offset = (++it)->u.operand; 1235 printLocationAndOp(out, location, it, "jnless"); 1236 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1234 printCompareJump(out, begin, it, location, "jnless"); 1237 1235 break; 1238 1236 } 1239 1237 case op_jnlesseq: { 1240 int r0 = (++it)->u.operand; 1241 int r1 = (++it)->u.operand; 1242 int offset = (++it)->u.operand; 1243 printLocationAndOp(out, location, it, "jnlesseq"); 1244 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1238 printCompareJump(out, begin, it, location, "jnlesseq"); 1245 1239 break; 1246 1240 } 1247 1241 case op_jngreater: { 1248 int r0 = (++it)->u.operand; 1249 int r1 = (++it)->u.operand; 1250 int offset = (++it)->u.operand; 1251 printLocationAndOp(out, location, it, "jngreater"); 1252 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1242 printCompareJump(out, begin, it, location, "jngreater"); 1253 1243 break; 1254 1244 } 1255 1245 case op_jngreatereq: { 1256 int r0 = (++it)->u.operand; 1257 int r1 = (++it)->u.operand; 1258 int offset = (++it)->u.operand; 1259 printLocationAndOp(out, location, it, "jngreatereq"); 1260 out.printf("%s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), offset, location + offset); 1246 printCompareJump(out, begin, it, location, "jngreatereq"); 1247 break; 1248 } 1249 case op_jbelow: { 1250 printCompareJump(out, begin, it, location, "jbelow"); 1251 break; 1252 } 1253 case op_jbeloweq: { 1254 printCompareJump(out, begin, it, location, "jbeloweq"); 1261 1255 break; 1262 1256 }
Note:
See TracChangeset
for help on using the changeset viewer.