Changeset 39141 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Dec 9, 2008, 11:19:04 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r39122 r39141 286 286 emitGetVirtualRegister(instruction[i + 2].u.operand, X86::eax, i); 287 287 emitPutVirtualRegister(instruction[i + 1].u.operand); 288 i += 3;288 i += OPCODE_LENGTH(op_mov); 289 289 break; 290 290 } … … 316 316 } 317 317 318 i += 5;318 i += OPCODE_LENGTH(op_add); 319 319 break; 320 320 } … … 325 325 __ pushl_m(RegisterFile::ReturnPC * static_cast<int>(sizeof(Register)), X86::edi); 326 326 __ ret(); 327 i += 2;327 i += OPCODE_LENGTH(op_end); 328 328 break; 329 329 } … … 331 331 unsigned target = instruction[i + 1].u.operand; 332 332 m_jmpTable.append(JmpTable(jump(), i + 1 + target)); 333 i += 2;333 i += OPCODE_LENGTH(op_jmp); 334 334 break; 335 335 } … … 340 340 m_slowCases.append(SlowCaseEntry(joAdd32(Imm32(getDeTaggedConstantImmediate(JSImmediate::oneImmediate())), X86::eax), i)); 341 341 emitPutVirtualRegister(srcDst); 342 i += 2;342 i += OPCODE_LENGTH(op_pre_inc); 343 343 break; 344 344 } … … 348 348 unsigned target = instruction[i + 1].u.operand; 349 349 m_jmpTable.append(JmpTable(jump(), i + 1 + target)); 350 i += 2;350 i += OPCODE_LENGTH(op_end); 351 351 break; 352 352 } … … 366 366 m_jmpTable.append(JmpTable(jl32(X86::eax, X86::edx), i + 3 + target)); 367 367 } 368 i += 4;368 i += OPCODE_LENGTH(op_loop_if_less); 369 369 break; 370 370 } … … 384 384 m_jmpTable.append(JmpTable(jle32(X86::eax, X86::edx), i + 3 + target)); 385 385 } 386 i += 4;386 i += OPCODE_LENGTH(op_loop_if_lesseq); 387 387 break; 388 388 } … … 390 390 emitCTICall(i, Interpreter::cti_op_new_object); 391 391 emitPutVirtualRegister(instruction[i + 1].u.operand); 392 i += 2;392 i += OPCODE_LENGTH(op_new_object); 393 393 break; 394 394 } 395 395 case op_put_by_id: { 396 396 compilePutByIdHotPath(instruction[i + 1].u.operand, &(m_codeBlock->identifier(instruction[i + 2].u.operand)), instruction[i + 3].u.operand, i, propertyAccessInstructionIndex++); 397 i += 8;397 i += OPCODE_LENGTH(op_put_by_id); 398 398 break; 399 399 } 400 400 case op_get_by_id: { 401 401 compileGetByIdHotPath(instruction[i + 1].u.operand, instruction[i + 2].u.operand, &(m_codeBlock->identifier(instruction[i + 3].u.operand)), i, propertyAccessInstructionIndex++); 402 i += 8;402 i += OPCODE_LENGTH(op_get_by_id); 403 403 break; 404 404 } … … 459 459 emitPutVirtualRegister(instruction[i + 1].u.operand); 460 460 461 i += 5;461 i += OPCODE_LENGTH(op_instanceof); 462 462 break; 463 463 } … … 468 468 emitCTICall(i, Interpreter::cti_op_del_by_id); 469 469 emitPutVirtualRegister(instruction[i + 1].u.operand); 470 i += 4;470 i += OPCODE_LENGTH(op_del_by_id); 471 471 break; 472 472 } … … 497 497 compileBinaryArithOp(op_mul, instruction[i + 1].u.operand, instruction[i + 2].u.operand, instruction[i + 3].u.operand, OperandTypes::fromInt(instruction[i + 4].u.operand), i); 498 498 499 i += 5;499 i += OPCODE_LENGTH(op_mul); 500 500 break; 501 501 } … … 505 505 emitCTICall(i, Interpreter::cti_op_new_func); 506 506 emitPutVirtualRegister(instruction[i + 1].u.operand); 507 i += 3;507 i += OPCODE_LENGTH(op_new_func); 508 508 break; 509 509 } … … 512 512 case op_construct: { 513 513 compileOpCall(opcodeID, instruction + i, i, callLinkInfoIndex++); 514 i += (opcodeID == op_construct ? 7 : 5);514 i += (opcodeID == op_construct ? OPCODE_LENGTH(op_construct) : OPCODE_LENGTH(op_call)); 515 515 break; 516 516 } … … 520 520 emitGetVariableObjectRegister(X86::eax, instruction[i + 3].u.operand, X86::eax); 521 521 emitPutVirtualRegister(instruction[i + 1].u.operand); 522 i += 4;522 i += OPCODE_LENGTH(op_get_global_var); 523 523 break; 524 524 } … … 528 528 move(ImmPtr(globalObject), X86::eax); 529 529 emitPutVariableObjectRegister(X86::edx, X86::eax, instruction[i + 2].u.operand); 530 i += 4;530 i += OPCODE_LENGTH(op_put_global_var); 531 531 break; 532 532 } … … 541 541 emitGetVariableObjectRegister(X86::eax, instruction[i + 2].u.operand, X86::eax); 542 542 emitPutVirtualRegister(instruction[i + 1].u.operand); 543 i += 4;543 i += OPCODE_LENGTH(op_get_scoped_var); 544 544 break; 545 545 } … … 554 554 loadPtr(Address(X86::edx, FIELD_OFFSET(ScopeChainNode, object)), X86::edx); 555 555 emitPutVariableObjectRegister(X86::eax, X86::edx, instruction[i + 1].u.operand); 556 i += 4;556 i += OPCODE_LENGTH(op_put_scoped_var); 557 557 break; 558 558 } … … 560 560 emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::ecx); 561 561 emitCTICall(i, Interpreter::cti_op_tear_off_activation); 562 i += 2;562 i += OPCODE_LENGTH(op_tear_off_activation); 563 563 break; 564 564 } 565 565 case op_tear_off_arguments: { 566 566 emitCTICall(i, Interpreter::cti_op_tear_off_arguments); 567 i += 1;567 i += OPCODE_LENGTH(op_tear_off_arguments); 568 568 break; 569 569 } … … 586 586 __ ret(); 587 587 588 i += 2;588 i += OPCODE_LENGTH(op_ret); 589 589 break; 590 590 } … … 595 595 emitCTICall(i, Interpreter::cti_op_new_array); 596 596 emitPutVirtualRegister(instruction[i + 1].u.operand); 597 i += 4;597 i += OPCODE_LENGTH(op_new_array); 598 598 break; 599 599 } … … 603 603 emitCTICall(i, Interpreter::cti_op_resolve); 604 604 emitPutVirtualRegister(instruction[i + 1].u.operand); 605 i += 3;605 i += OPCODE_LENGTH(op_resolve); 606 606 break; 607 607 } … … 619 619 __ link(isObject, __ label()); 620 620 621 i += 3;621 i += OPCODE_LENGTH(op_construct_verify); 622 622 break; 623 623 } … … 638 638 __ movl_mr(FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*), X86::eax); 639 639 emitPutVirtualRegister(instruction[i + 1].u.operand); 640 i += 4;640 i += OPCODE_LENGTH(op_get_by_val); 641 641 break; 642 642 } … … 647 647 emitPutVirtualRegister(instruction[i + 2].u.operand, X86::edx); 648 648 emitPutVirtualRegister(instruction[i + 1].u.operand); 649 i += 4;649 i += OPCODE_LENGTH(op_resolve_func); 650 650 break; 651 651 } 652 652 case op_sub: { 653 653 compileBinaryArithOp(op_sub, instruction[i + 1].u.operand, instruction[i + 2].u.operand, instruction[i + 3].u.operand, OperandTypes::fromInt(instruction[i + 4].u.operand), i); 654 i += 5;654 i += OPCODE_LENGTH(op_sub); 655 655 break; 656 656 } … … 680 680 emitGetVirtualRegister(instruction[i + 3].u.operand, X86::eax, i); 681 681 __ movl_rm(X86::eax, FIELD_OFFSET(ArrayStorage, m_vector[0]), X86::ecx, X86::edx, sizeof(JSValue*)); 682 i += 4;682 i += OPCODE_LENGTH(op_put_by_val); 683 683 break; 684 684 } … … 701 701 702 702 __ link(isZero, __ label()); 703 i += 3;703 i += OPCODE_LENGTH(op_loop_if_true); 704 704 break; 705 705 }; … … 709 709 emitCTICall(i, Interpreter::cti_op_resolve_base); 710 710 emitPutVirtualRegister(instruction[i + 1].u.operand); 711 i += 3;711 i += OPCODE_LENGTH(op_resolve_base); 712 712 break; 713 713 } … … 716 716 emitCTICall(i, Interpreter::cti_op_negate); 717 717 emitPutVirtualRegister(instruction[i + 1].u.operand); 718 i += 3;718 i += OPCODE_LENGTH(op_negate); 719 719 break; 720 720 } … … 725 725 emitCTICall(i, Interpreter::cti_op_resolve_skip); 726 726 emitPutVirtualRegister(instruction[i + 1].u.operand); 727 i += 4;727 i += OPCODE_LENGTH(op_resolve_skip); 728 728 break; 729 729 } … … 756 756 emitPutVirtualRegister(instruction[i + 1].u.operand); 757 757 __ link(end, __ label()); 758 i += 6;758 i += OPCODE_LENGTH(op_resolve_global); 759 759 break; 760 760 } … … 767 767 m_slowCases.append(SlowCaseEntry(__ jo(), i)); 768 768 emitPutVirtualRegister(srcDst); 769 i += 2;769 i += OPCODE_LENGTH(op_pre_dec); 770 770 break; 771 771 } … … 785 785 m_jmpTable.append(JmpTable(__ jge(), i + 3 + target)); 786 786 } 787 i += 4;787 i += OPCODE_LENGTH(op_jnless); 788 788 break; 789 789 } … … 795 795 __ xorl_i8r((JSImmediate::FullTagTypeBool | JSImmediate::ExtendedPayloadBitBoolValue), X86::eax); 796 796 emitPutVirtualRegister(instruction[i + 1].u.operand); 797 i += 3;797 i += OPCODE_LENGTH(op_not); 798 798 break; 799 799 } … … 813 813 814 814 __ link(isNonZero, __ label()); 815 i += 3;815 i += OPCODE_LENGTH(op_jfalse); 816 816 break; 817 817 }; … … 834 834 835 835 wasNotImmediate.link(this); 836 i += 3;836 i += OPCODE_LENGTH(op_jeq_null); 837 837 break; 838 838 }; … … 856 856 wasNotImmediate.link(this); 857 857 858 i += 3;858 i += OPCODE_LENGTH(op_jneq_null); 859 859 break; 860 860 } … … 868 868 emitPutVirtualRegister(srcDst, X86::edx); 869 869 emitPutVirtualRegister(instruction[i + 1].u.operand); 870 i += 3;870 i += OPCODE_LENGTH(op_post_inc); 871 871 break; 872 872 } … … 875 875 __ movl_i32r(asInteger(v), X86::eax); 876 876 emitPutVirtualRegister(instruction[i + 1].u.operand); 877 i += 3;877 i += OPCODE_LENGTH(op_unexpected_load); 878 878 break; 879 879 } … … 886 886 JmpDst sretTarget = __ label(); 887 887 m_jsrSites.append(JSRInfo(addrPosition, sretTarget)); 888 i += 3;888 i += OPCODE_LENGTH(op_jsr); 889 889 break; 890 890 } 891 891 case op_sret: { 892 892 __ jmp_m(sizeof(Register) * instruction[i + 1].u.operand, X86::edi); 893 i += 2;893 i += OPCODE_LENGTH(op_sret); 894 894 break; 895 895 } … … 902 902 emitTagAsBoolImmediate(X86::eax); 903 903 emitPutVirtualRegister(instruction[i + 1].u.operand); 904 i += 4;904 i += OPCODE_LENGTH(op_eq); 905 905 break; 906 906 } … … 914 914 emitFastArithIntToImmOrSlowCase(X86::eax, i); 915 915 emitPutVirtualRegister(instruction[i + 1].u.operand); 916 i += 4;916 i += OPCODE_LENGTH(op_lshift); 917 917 break; 918 918 } … … 937 937 emitPutVirtualRegister(dst); 938 938 } 939 i += 5;939 i += OPCODE_LENGTH(op_bitand); 940 940 break; 941 941 } … … 957 957 emitFastArithPotentiallyReTagImmediate(X86::eax); 958 958 emitPutVirtualRegister(instruction[i + 1].u.operand); 959 i += 4;959 i += OPCODE_LENGTH(op_rshift); 960 960 break; 961 961 } … … 965 965 __ xorl_i8r(~JSImmediate::TagBitTypeInteger, X86::eax); 966 966 emitPutVirtualRegister(instruction[i + 1].u.operand); 967 i += 3;967 i += OPCODE_LENGTH(op_bitnot); 968 968 break; 969 969 } … … 974 974 emitPutVirtualRegister(instruction[i + 2].u.operand, X86::edx); 975 975 emitPutVirtualRegister(instruction[i + 1].u.operand); 976 i += 4;976 i += OPCODE_LENGTH(op_resolve_with_base); 977 977 break; 978 978 } … … 982 982 emitCTICall(i, Interpreter::cti_op_new_func_exp); 983 983 emitPutVirtualRegister(instruction[i + 1].u.operand); 984 i += 3;984 i += OPCODE_LENGTH(op_new_func_exp); 985 985 break; 986 986 } … … 996 996 __ movl_rr(X86::edx, X86::eax); 997 997 emitPutVirtualRegister(instruction[i + 1].u.operand); 998 i += 4;998 i += OPCODE_LENGTH(op_mod); 999 999 break; 1000 1000 } … … 1014 1014 1015 1015 __ link(isZero, __ label()); 1016 i += 3;1016 i += OPCODE_LENGTH(op_jtrue); 1017 1017 break; 1018 1018 } … … 1029 1029 emitPutVirtualRegister(instruction[i + 1].u.operand); 1030 1030 1031 i += 4;1031 i += OPCODE_LENGTH(op_neq); 1032 1032 break; 1033 1033 } … … 1041 1041 emitPutVirtualRegister(srcDst, X86::edx); 1042 1042 emitPutVirtualRegister(instruction[i + 1].u.operand); 1043 i += 3;1043 i += OPCODE_LENGTH(op_post_dec); 1044 1044 break; 1045 1045 } … … 1051 1051 emitFastArithReTagImmediate(X86::eax); 1052 1052 emitPutVirtualRegister(instruction[i + 1].u.operand); 1053 i += 5;1053 i += OPCODE_LENGTH(op_bitxor); 1054 1054 break; 1055 1055 } … … 1059 1059 emitCTICall(i, Interpreter::cti_op_new_regexp); 1060 1060 emitPutVirtualRegister(instruction[i + 1].u.operand); 1061 i += 3;1061 i += OPCODE_LENGTH(op_new_regexp); 1062 1062 break; 1063 1063 } … … 1067 1067 __ orl_rr(X86::edx, X86::eax); 1068 1068 emitPutVirtualRegister(instruction[i + 1].u.operand); 1069 i += 5;1069 i += OPCODE_LENGTH(op_bitor); 1070 1070 break; 1071 1071 } … … 1078 1078 __ popl_r(X86::esi); 1079 1079 __ ret(); 1080 i += 2;1080 i += OPCODE_LENGTH(op_throw); 1081 1081 break; 1082 1082 } … … 1085 1085 emitCTICall(i, Interpreter::cti_op_get_pnames); 1086 1086 emitPutVirtualRegister(instruction[i + 1].u.operand); 1087 i += 3;1087 i += OPCODE_LENGTH(op_get_pnames); 1088 1088 break; 1089 1089 } … … 1097 1097 m_jmpTable.append(JmpTable(__ jmp(), i + 3 + target)); 1098 1098 __ link(endOfIter, __ label()); 1099 i += 4;1099 i += OPCODE_LENGTH(op_next_pname); 1100 1100 break; 1101 1101 } … … 1103 1103 emitPutCTIArgFromVirtualRegister(instruction[i + 1].u.operand, 0, X86::ecx); 1104 1104 emitCTICall(i, Interpreter::cti_op_push_scope); 1105 i += 2;1105 i += OPCODE_LENGTH(op_push_scope); 1106 1106 break; 1107 1107 } 1108 1108 case op_pop_scope: { 1109 1109 emitCTICall(i, Interpreter::cti_op_pop_scope); 1110 i += 1;1110 i += OPCODE_LENGTH(op_pop_scope); 1111 1111 break; 1112 1112 } … … 1120 1120 case op_stricteq: { 1121 1121 compileOpStrictEq(instruction + i, i, OpStrictEq); 1122 i += 4;1122 i += OPCODE_LENGTH(op_stricteq); 1123 1123 break; 1124 1124 } 1125 1125 case op_nstricteq: { 1126 1126 compileOpStrictEq(instruction + i, i, OpNStrictEq); 1127 i += 4;1127 i += OPCODE_LENGTH(op_nstricteq); 1128 1128 break; 1129 1129 } … … 1145 1145 1146 1146 emitPutVirtualRegister(instruction[i + 1].u.operand); 1147 i += 3;1147 i += OPCODE_LENGTH(op_to_jsnumber); 1148 1148 break; 1149 1149 } … … 1153 1153 emitCTICall(i, Interpreter::cti_op_in); 1154 1154 emitPutVirtualRegister(instruction[i + 1].u.operand); 1155 i += 4;1155 i += OPCODE_LENGTH(op_in); 1156 1156 break; 1157 1157 } … … 1162 1162 emitCTICall(i, Interpreter::cti_op_push_new_scope); 1163 1163 emitPutVirtualRegister(instruction[i + 1].u.operand); 1164 i += 4;1164 i += OPCODE_LENGTH(op_push_new_scope); 1165 1165 break; 1166 1166 } … … 1168 1168 emitGetCTIParam(CTI_ARGS_callFrame, X86::edi); // edi := r 1169 1169 emitPutVirtualRegister(instruction[i + 1].u.operand); 1170 i += 2;1170 i += OPCODE_LENGTH(op_catch); 1171 1171 break; 1172 1172 } … … 1177 1177 unsigned target = instruction[i + 2].u.operand; 1178 1178 m_jmpTable.append(JmpTable(__ jmp(), i + 2 + target)); 1179 i += 3;1179 i += OPCODE_LENGTH(op_jmp_scopes); 1180 1180 break; 1181 1181 } … … 1185 1185 emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx); 1186 1186 emitCTICall(i, Interpreter::cti_op_put_by_index); 1187 i += 4;1187 i += OPCODE_LENGTH(op_put_by_index); 1188 1188 break; 1189 1189 } … … 1202 1202 emitCTICall(i, Interpreter::cti_op_switch_imm); 1203 1203 __ jmp_r(X86::eax); 1204 i += 4;1204 i += OPCODE_LENGTH(op_switch_imm); 1205 1205 break; 1206 1206 } … … 1219 1219 emitCTICall(i, Interpreter::cti_op_switch_char); 1220 1220 __ jmp_r(X86::eax); 1221 i += 4;1221 i += OPCODE_LENGTH(op_switch_char); 1222 1222 break; 1223 1223 } … … 1235 1235 emitCTICall(i, Interpreter::cti_op_switch_string); 1236 1236 __ jmp_r(X86::eax); 1237 i += 4;1237 i += OPCODE_LENGTH(op_switch_string); 1238 1238 break; 1239 1239 } … … 1243 1243 emitCTICall(i, Interpreter::cti_op_del_by_val); 1244 1244 emitPutVirtualRegister(instruction[i + 1].u.operand); 1245 i += 4;1245 i += OPCODE_LENGTH(op_del_by_val); 1246 1246 break; 1247 1247 } … … 1252 1252 emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx); 1253 1253 emitCTICall(i, Interpreter::cti_op_put_getter); 1254 i += 4;1254 i += OPCODE_LENGTH(op_put_getter); 1255 1255 break; 1256 1256 } … … 1261 1261 emitPutCTIArgFromVirtualRegister(instruction[i + 3].u.operand, 8, X86::ecx); 1262 1262 emitCTICall(i, Interpreter::cti_op_put_setter); 1263 i += 4;1263 i += OPCODE_LENGTH(op_put_setter); 1264 1264 break; 1265 1265 } … … 1271 1271 emitCTICall(i, Interpreter::cti_op_new_error); 1272 1272 emitPutVirtualRegister(instruction[i + 1].u.operand); 1273 i += 4;1273 i += OPCODE_LENGTH(op_new_error); 1274 1274 break; 1275 1275 } … … 1279 1279 emitPutCTIArgConstant(instruction[i + 3].u.operand, 8); 1280 1280 emitCTICall(i, Interpreter::cti_op_debug); 1281 i += 4;1281 i += OPCODE_LENGTH(op_debug); 1282 1282 break; 1283 1283 } … … 1304 1304 emitPutVirtualRegister(dst); 1305 1305 1306 i += 3;1306 i += OPCODE_LENGTH(op_eq_null); 1307 1307 break; 1308 1308 } … … 1329 1329 emitPutVirtualRegister(dst); 1330 1330 1331 i += 3;1331 i += OPCODE_LENGTH(op_neq_null); 1332 1332 break; 1333 1333 } … … 1340 1340 emitInitRegister(j); 1341 1341 1342 i += 1;1342 i += OPCODE_LENGTH(op_enter); 1343 1343 break; 1344 1344 } … … 1354 1354 emitPutVirtualRegister(instruction[i + 1].u.operand); 1355 1355 1356 i += 2;1356 i += OPCODE_LENGTH(op_enter_with_activation); 1357 1357 break; 1358 1358 } 1359 1359 case op_create_arguments: { 1360 1360 emitCTICall(i, (m_codeBlock->m_numParameters == 1) ? Interpreter::cti_op_create_arguments_no_params : Interpreter::cti_op_create_arguments); 1361 i += 1;1361 i += OPCODE_LENGTH(op_create_arguments); 1362 1362 break; 1363 1363 } … … 1370 1370 m_slowCases.append(SlowCaseEntry(__ jnz(), i)); 1371 1371 1372 i += 2;1372 i += OPCODE_LENGTH(op_convert_this); 1373 1373 break; 1374 1374 } … … 1381 1381 __ link(noProfiler, __ label()); 1382 1382 1383 i += 2;1383 i += OPCODE_LENGTH(op_profile_will_call); 1384 1384 break; 1385 1385 } … … 1392 1392 __ link(noProfiler, __ label()); 1393 1393 1394 i += 2;1394 i += OPCODE_LENGTH(op_profile_did_call); 1395 1395 break; 1396 1396 } … … 1456 1456 emitCTICall(i, Interpreter::cti_op_convert_this); 1457 1457 emitPutVirtualRegister(instruction[i + 1].u.operand); 1458 i += 2;1458 i += OPCODE_LENGTH(op_convert_this); 1459 1459 break; 1460 1460 } … … 1489 1489 } 1490 1490 1491 i += 5;1491 i += OPCODE_LENGTH(op_add); 1492 1492 break; 1493 1493 } … … 1521 1521 emitPutVirtualRegister(instruction[i + 1].u.operand, X86::eax); 1522 1522 1523 i += 4;1523 i += OPCODE_LENGTH(op_get_by_val); 1524 1524 break; 1525 1525 } 1526 1526 case op_sub: { 1527 1527 compileBinaryArithOpSlowCase(op_sub, iter, instruction[i + 1].u.operand, instruction[i + 2].u.operand, instruction[i + 3].u.operand, OperandTypes::fromInt(instruction[i + 4].u.operand), i); 1528 i += 5;1528 i += OPCODE_LENGTH(op_sub); 1529 1529 break; 1530 1530 } … … 1542 1542 emitCTICall(i, Interpreter::cti_op_rshift); 1543 1543 emitPutVirtualRegister(instruction[i + 1].u.operand); 1544 i += 4;1544 i += OPCODE_LENGTH(op_rshift); 1545 1545 break; 1546 1546 } … … 1556 1556 emitCTICall(i, Interpreter::cti_op_lshift); 1557 1557 emitPutVirtualRegister(instruction[i + 1].u.operand); 1558 i += 4;1558 i += OPCODE_LENGTH(op_lshift); 1559 1559 break; 1560 1560 } … … 1578 1578 __ link(__ jne(), m_labels[i + 3 + target]); 1579 1579 } 1580 i += 4;1580 i += OPCODE_LENGTH(op_loop_if_less); 1581 1581 break; 1582 1582 } 1583 1583 case op_put_by_id: { 1584 1584 compilePutByIdSlowCase(instruction[i + 1].u.operand, &(m_codeBlock->identifier(instruction[i + 2].u.operand)), instruction[i + 3].u.operand, i, iter, propertyAccessInstructionIndex++); 1585 i += 8;1585 i += OPCODE_LENGTH(op_put_by_id); 1586 1586 break; 1587 1587 } 1588 1588 case op_get_by_id: { 1589 1589 compileGetByIdSlowCase(instruction[i + 1].u.operand, instruction[i + 2].u.operand, &(m_codeBlock->identifier(instruction[i + 3].u.operand)), i, iter, propertyAccessInstructionIndex++); 1590 i += 8;1590 i += OPCODE_LENGTH(op_get_by_id); 1591 1591 break; 1592 1592 } … … 1610 1610 __ link(__ jne(), m_labels[i + 3 + target]); 1611 1611 } 1612 i += 4;1612 i += OPCODE_LENGTH(op_loop_if_lesseq); 1613 1613 break; 1614 1614 } … … 1622 1622 emitCTICall(i, Interpreter::cti_op_pre_inc); 1623 1623 emitPutVirtualRegister(srcDst); 1624 i += 2;1624 i += OPCODE_LENGTH(op_pre_inc); 1625 1625 break; 1626 1626 } … … 1648 1648 emitCTICall(i, Interpreter::cti_op_put_by_val_array); 1649 1649 1650 i += 4;1650 i += OPCODE_LENGTH(op_put_by_val); 1651 1651 break; 1652 1652 } … … 1658 1658 unsigned target = instruction[i + 2].u.operand; 1659 1659 __ link(__ jne(), m_labels[i + 2 + target]); 1660 i += 3;1660 i += OPCODE_LENGTH(op_loop_if_true); 1661 1661 break; 1662 1662 } … … 1670 1670 emitCTICall(i, Interpreter::cti_op_pre_dec); 1671 1671 emitPutVirtualRegister(srcDst); 1672 i += 2;1672 i += OPCODE_LENGTH(op_pre_dec); 1673 1673 break; 1674 1674 } … … 1692 1692 __ link(__ je(), m_labels[i + 3 + target]); 1693 1693 } 1694 i += 4;1694 i += OPCODE_LENGTH(op_jnless); 1695 1695 break; 1696 1696 } … … 1701 1701 emitCTICall(i, Interpreter::cti_op_not); 1702 1702 emitPutVirtualRegister(instruction[i + 1].u.operand); 1703 i += 3;1703 i += OPCODE_LENGTH(op_not); 1704 1704 break; 1705 1705 } … … 1711 1711 unsigned target = instruction[i + 2].u.operand; 1712 1712 __ link(__ je(), m_labels[i + 2 + target]); // inverted! 1713 i += 3;1713 i += OPCODE_LENGTH(op_jfalse); 1714 1714 break; 1715 1715 } … … 1722 1722 emitPutVirtualRegister(srcDst, X86::edx); 1723 1723 emitPutVirtualRegister(instruction[i + 1].u.operand); 1724 i += 3;1724 i += OPCODE_LENGTH(op_post_inc); 1725 1725 break; 1726 1726 } … … 1730 1730 emitCTICall(i, Interpreter::cti_op_bitnot); 1731 1731 emitPutVirtualRegister(instruction[i + 1].u.operand); 1732 i += 3;1732 i += OPCODE_LENGTH(op_bitnot); 1733 1733 break; 1734 1734 } … … 1756 1756 emitPutVirtualRegister(dst); 1757 1757 } 1758 i += 5;1758 i += OPCODE_LENGTH(op_bitand); 1759 1759 break; 1760 1760 } … … 1766 1766 unsigned target = instruction[i + 2].u.operand; 1767 1767 __ link(__ jne(), m_labels[i + 2 + target]); 1768 i += 3;1768 i += OPCODE_LENGTH(op_jtrue); 1769 1769 break; 1770 1770 } … … 1777 1777 emitPutVirtualRegister(srcDst, X86::edx); 1778 1778 emitPutVirtualRegister(instruction[i + 1].u.operand); 1779 i += 3;1779 i += OPCODE_LENGTH(op_post_dec); 1780 1780 break; 1781 1781 } … … 1786 1786 emitCTICall(i, Interpreter::cti_op_bitxor); 1787 1787 emitPutVirtualRegister(instruction[i + 1].u.operand); 1788 i += 5;1788 i += OPCODE_LENGTH(op_bitxor); 1789 1789 break; 1790 1790 } … … 1795 1795 emitCTICall(i, Interpreter::cti_op_bitor); 1796 1796 emitPutVirtualRegister(instruction[i + 1].u.operand); 1797 i += 5;1797 i += OPCODE_LENGTH(op_bitor); 1798 1798 break; 1799 1799 } … … 1804 1804 emitCTICall(i, Interpreter::cti_op_eq); 1805 1805 emitPutVirtualRegister(instruction[i + 1].u.operand); 1806 i += 4;1806 i += OPCODE_LENGTH(op_eq); 1807 1807 break; 1808 1808 } … … 1813 1813 emitCTICall(i, Interpreter::cti_op_neq); 1814 1814 emitPutVirtualRegister(instruction[i + 1].u.operand); 1815 i += 4;1815 i += OPCODE_LENGTH(op_neq); 1816 1816 break; 1817 1817 } … … 1824 1824 emitCTICall(i, Interpreter::cti_op_stricteq); 1825 1825 emitPutVirtualRegister(instruction[i + 1].u.operand); 1826 i += 4;1826 i += OPCODE_LENGTH(op_stricteq); 1827 1827 break; 1828 1828 } … … 1835 1835 emitCTICall(i, Interpreter::cti_op_nstricteq); 1836 1836 emitPutVirtualRegister(instruction[i + 1].u.operand); 1837 i += 4;1837 i += OPCODE_LENGTH(op_nstricteq); 1838 1838 break; 1839 1839 } … … 1847 1847 emitCTICall(i, Interpreter::cti_op_instanceof); 1848 1848 emitPutVirtualRegister(instruction[i + 1].u.operand); 1849 i += 5;1849 i += OPCODE_LENGTH(op_instanceof); 1850 1850 break; 1851 1851 } … … 1862 1862 emitCTICall(i, Interpreter::cti_op_mod); 1863 1863 emitPutVirtualRegister(instruction[i + 1].u.operand); 1864 i += 4;1864 i += OPCODE_LENGTH(op_mod); 1865 1865 break; 1866 1866 } … … 1890 1890 } else 1891 1891 compileBinaryArithOpSlowCase(op_mul, iter, dst, src1, src2, OperandTypes::fromInt(instruction[i + 4].u.operand), i); 1892 i += 5;1892 i += OPCODE_LENGTH(op_mul); 1893 1893 break; 1894 1894 } … … 1898 1898 case op_construct: { 1899 1899 compileOpCallSlowCase(instruction + i, i, iter, callLinkInfoIndex++, opcodeID); 1900 i += (opcodeID == op_construct ? 7 : 5);1900 i += (opcodeID == op_construct ? OPCODE_LENGTH(op_construct) : OPCODE_LENGTH(op_call)); 1901 1901 break; 1902 1902 } … … 1910 1910 1911 1911 emitPutVirtualRegister(instruction[i + 1].u.operand); 1912 i += 3;1912 i += OPCODE_LENGTH(op_to_jsnumber); 1913 1913 break; 1914 1914 }
Note:
See TracChangeset
for help on using the changeset viewer.