Changeset 56560 in webkit for trunk/JavaScriptCore/bytecode
- Timestamp:
- Mar 25, 2010, 11:20:17 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r55564 r56560 142 142 int r1 = (++it)->u.operand; 143 143 144 printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(exec, r0). c_str(), registerName(exec, r1).c_str());144 printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(exec, r0).data(), registerName(exec, r1).data()); 145 145 } 146 146 … … 150 150 int r1 = (++it)->u.operand; 151 151 int r2 = (++it)->u.operand; 152 printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());152 printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); 153 153 } 154 154 … … 157 157 int r0 = (++it)->u.operand; 158 158 int offset = (++it)->u.operand; 159 printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(exec, r0). c_str(), offset, location + offset);159 printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(exec, r0).data(), offset, location + offset); 160 160 } 161 161 … … 165 165 int r1 = (++it)->u.operand; 166 166 int id0 = (++it)->u.operand; 167 printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());167 printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); 168 168 it += 4; 169 169 } … … 174 174 int id0 = (++it)->u.operand; 175 175 int r1 = (++it)->u.operand; 176 printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());176 printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); 177 177 it += 4; 178 178 } … … 224 224 static void printGlobalResolveInfo(const GlobalResolveInfo& resolveInfo, unsigned instructionOffset) 225 225 { 226 printf(" [%4d] %s: %s\n", instructionOffset, "resolve_global", pointerToSourceString(resolveInfo.structure).UTF8String(). c_str());226 printf(" [%4d] %s: %s\n", instructionOffset, "resolve_global", pointerToSourceString(resolveInfo.structure).UTF8String().data()); 227 227 } 228 228 … … 231 231 switch (stubInfo.accessType) { 232 232 case access_get_by_id_self: 233 printf(" [%4d] %s: %s\n", instructionOffset, "get_by_id_self", pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String(). c_str());233 printf(" [%4d] %s: %s\n", instructionOffset, "get_by_id_self", pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().data()); 234 234 return; 235 235 case access_get_by_id_proto: 236 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String(). c_str(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().c_str());236 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().data()); 237 237 return; 238 238 case access_get_by_id_chain: 239 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String(). c_str(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().c_str());239 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().data()); 240 240 return; 241 241 case access_get_by_id_self_list: 242 printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_self_list", pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String(). c_str(), stubInfo.u.getByIdSelfList.listSize);242 printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_self_list", pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().data(), stubInfo.u.getByIdSelfList.listSize); 243 243 return; 244 244 case access_get_by_id_proto_list: 245 printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_proto_list", pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String(). c_str(), stubInfo.u.getByIdProtoList.listSize);245 printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_proto_list", pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().data(), stubInfo.u.getByIdProtoList.listSize); 246 246 return; 247 247 case access_put_by_id_transition: 248 printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String(). c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().c_str());248 printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().data(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().data(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().data()); 249 249 return; 250 250 case access_put_by_id_replace: 251 printf(" [%4d] %s: %s\n", instructionOffset, "put_by_id_replace", pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String(). c_str());251 printf(" [%4d] %s: %s\n", instructionOffset, "put_by_id_replace", pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().data()); 252 252 return; 253 253 case access_get_by_id: … … 278 278 { 279 279 unsigned instructionOffset = vPC - m_instructions.begin(); 280 printf(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).UTF8String(). c_str());280 printf(" [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structure).UTF8String().data()); 281 281 } 282 282 … … 295 295 } 296 296 if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { 297 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structure).UTF8String(). c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str());297 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structure).UTF8String().data()); 298 298 return; 299 299 } 300 300 if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) { 301 printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(vPC[4].u.structure).UTF8String(). c_str(), pointerToSourceString(vPC[5].u.structure).UTF8String().c_str(), pointerToSourceString(vPC[6].u.structureChain).UTF8String().c_str());301 printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structure).UTF8String().data(), pointerToSourceString(vPC[6].u.structureChain).UTF8String().data()); 302 302 return; 303 303 } 304 304 if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { 305 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structure).UTF8String(). c_str(), pointerToSourceString(vPC[5].u.structureChain).UTF8String().c_str());305 printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structure).UTF8String().data(), pointerToSourceString(vPC[5].u.structureChain).UTF8String().data()); 306 306 return; 307 307 } … … 483 483 case op_enter_with_activation: { 484 484 int r0 = (++it)->u.operand; 485 printf("[%4d] enter_with_activation %s\n", location, registerName(exec, r0). c_str());485 printf("[%4d] enter_with_activation %s\n", location, registerName(exec, r0).data()); 486 486 break; 487 487 } … … 496 496 case op_convert_this: { 497 497 int r0 = (++it)->u.operand; 498 printf("[%4d] convert_this %s\n", location, registerName(exec, r0). c_str());498 printf("[%4d] convert_this %s\n", location, registerName(exec, r0).data()); 499 499 break; 500 500 } 501 501 case op_new_object: { 502 502 int r0 = (++it)->u.operand; 503 printf("[%4d] new_object\t %s\n", location, registerName(exec, r0). c_str());503 printf("[%4d] new_object\t %s\n", location, registerName(exec, r0).data()); 504 504 break; 505 505 } … … 508 508 int argv = (++it)->u.operand; 509 509 int argc = (++it)->u.operand; 510 printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(exec, dst). c_str(), registerName(exec, argv).c_str(), argc);510 printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(exec, dst).data(), registerName(exec, argv).data(), argc); 511 511 break; 512 512 } … … 514 514 int r0 = (++it)->u.operand; 515 515 int re0 = (++it)->u.operand; 516 printf("[%4d] new_regexp\t %s, %s\n", location, registerName(exec, r0). c_str(), regexpName(re0, regexp(re0)).c_str());516 printf("[%4d] new_regexp\t %s, %s\n", location, registerName(exec, r0).data(), regexpName(re0, regexp(re0)).data()); 517 517 break; 518 518 } … … 520 520 int r0 = (++it)->u.operand; 521 521 int r1 = (++it)->u.operand; 522 printf("[%4d] mov\t\t %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str());522 printf("[%4d] mov\t\t %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data()); 523 523 break; 524 524 } … … 561 561 case op_pre_inc: { 562 562 int r0 = (++it)->u.operand; 563 printf("[%4d] pre_inc\t\t %s\n", location, registerName(exec, r0). c_str());563 printf("[%4d] pre_inc\t\t %s\n", location, registerName(exec, r0).data()); 564 564 break; 565 565 } 566 566 case op_pre_dec: { 567 567 int r0 = (++it)->u.operand; 568 printf("[%4d] pre_dec\t\t %s\n", location, registerName(exec, r0). c_str());568 printf("[%4d] pre_dec\t\t %s\n", location, registerName(exec, r0).data()); 569 569 break; 570 570 } … … 645 645 int r2 = (++it)->u.operand; 646 646 int r3 = (++it)->u.operand; 647 printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str());647 printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data()); 648 648 break; 649 649 } … … 683 683 int r0 = (++it)->u.operand; 684 684 int id0 = (++it)->u.operand; 685 printf("[%4d] resolve\t\t %s, %s\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str());685 printf("[%4d] resolve\t\t %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); 686 686 break; 687 687 } … … 690 690 int id0 = (++it)->u.operand; 691 691 int skipLevels = (++it)->u.operand; 692 printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels);692 printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), skipLevels); 693 693 break; 694 694 } … … 697 697 JSValue scope = JSValue((++it)->u.jsCell); 698 698 int id0 = (++it)->u.operand; 699 printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str());699 printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(exec, r0).data(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).data()); 700 700 it += 2; 701 701 break; … … 705 705 int index = (++it)->u.operand; 706 706 int skipLevels = (++it)->u.operand; 707 printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(exec, r0). c_str(), index, skipLevels);707 printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(exec, r0).data(), index, skipLevels); 708 708 break; 709 709 } … … 712 712 int skipLevels = (++it)->u.operand; 713 713 int r0 = (++it)->u.operand; 714 printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(exec, r0). c_str());714 printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(exec, r0).data()); 715 715 break; 716 716 } … … 719 719 JSValue scope = JSValue((++it)->u.jsCell); 720 720 int index = (++it)->u.operand; 721 printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(exec, r0). c_str(), valueToSourceString(exec, scope).ascii(), index);721 printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(exec, r0).data(), valueToSourceString(exec, scope).ascii(), index); 722 722 break; 723 723 } … … 726 726 int index = (++it)->u.operand; 727 727 int r0 = (++it)->u.operand; 728 printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0). c_str());728 printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0).data()); 729 729 break; 730 730 } … … 732 732 int r0 = (++it)->u.operand; 733 733 int id0 = (++it)->u.operand; 734 printf("[%4d] resolve_base\t %s, %s\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str());734 printf("[%4d] resolve_base\t %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data()); 735 735 break; 736 736 } … … 739 739 int r1 = (++it)->u.operand; 740 740 int id0 = (++it)->u.operand; 741 printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());741 printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); 742 742 break; 743 743 } … … 838 838 int id0 = (++it)->u.operand; 839 839 int r1 = (++it)->u.operand; 840 printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());840 printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); 841 841 break; 842 842 } … … 845 845 int id0 = (++it)->u.operand; 846 846 int r1 = (++it)->u.operand; 847 printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());847 printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); 848 848 break; 849 849 } … … 856 856 int r1 = (++it)->u.operand; 857 857 int id0 = (++it)->u.operand; 858 printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str());858 printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), idName(id0, m_identifiers[id0]).data()); 859 859 break; 860 860 } … … 863 863 int r1 = (++it)->u.operand; 864 864 int r2 = (++it)->u.operand; 865 printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());865 printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); 866 866 break; 867 867 } … … 873 873 int r4 = (++it)->u.operand; 874 874 int r5 = (++it)->u.operand; 875 printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), registerName(exec, r4).c_str(), registerName(exec, r5).c_str());875 printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), registerName(exec, r4).data(), registerName(exec, r5).data()); 876 876 break; 877 877 } … … 880 880 int r1 = (++it)->u.operand; 881 881 int r2 = (++it)->u.operand; 882 printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());882 printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); 883 883 break; 884 884 } … … 887 887 int r1 = (++it)->u.operand; 888 888 int r2 = (++it)->u.operand; 889 printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str());889 printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data()); 890 890 break; 891 891 } … … 894 894 unsigned n0 = (++it)->u.operand; 895 895 int r1 = (++it)->u.operand; 896 printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(exec, r0). c_str(), n0, registerName(exec, r1).c_str());896 printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(exec, r0).data(), n0, registerName(exec, r1).data()); 897 897 break; 898 898 } … … 935 935 int r1 = (++it)->u.operand; 936 936 int offset = (++it)->u.operand; 937 printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);937 printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 938 938 break; 939 939 } … … 942 942 int r1 = (++it)->u.operand; 943 943 int offset = (++it)->u.operand; 944 printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);944 printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 945 945 break; 946 946 } … … 949 949 int r1 = (++it)->u.operand; 950 950 int offset = (++it)->u.operand; 951 printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);951 printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 952 952 break; 953 953 } … … 956 956 int r1 = (++it)->u.operand; 957 957 int offset = (++it)->u.operand; 958 printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);958 printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 959 959 break; 960 960 } … … 963 963 int r1 = (++it)->u.operand; 964 964 int offset = (++it)->u.operand; 965 printf("[%4d] jless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);965 printf("[%4d] jless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 966 966 break; 967 967 } … … 970 970 int r1 = (++it)->u.operand; 971 971 int offset = (++it)->u.operand; 972 printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), offset, location + offset);972 printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), offset, location + offset); 973 973 break; 974 974 } … … 977 977 int defaultTarget = (++it)->u.operand; 978 978 int scrutineeRegister = (++it)->u.operand; 979 printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister). c_str());979 printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); 980 980 break; 981 981 } … … 984 984 int defaultTarget = (++it)->u.operand; 985 985 int scrutineeRegister = (++it)->u.operand; 986 printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister). c_str());986 printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); 987 987 break; 988 988 } … … 991 991 int defaultTarget = (++it)->u.operand; 992 992 int scrutineeRegister = (++it)->u.operand; 993 printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister). c_str());993 printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).data()); 994 994 break; 995 995 } … … 997 997 int r0 = (++it)->u.operand; 998 998 int f0 = (++it)->u.operand; 999 printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(exec, r0). c_str(), f0);999 printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(exec, r0).data(), f0); 1000 1000 break; 1001 1001 } … … 1003 1003 int r0 = (++it)->u.operand; 1004 1004 int f0 = (++it)->u.operand; 1005 printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(exec, r0). c_str(), f0);1005 printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(exec, r0).data(), f0); 1006 1006 break; 1007 1007 } … … 1011 1011 int argCount = (++it)->u.operand; 1012 1012 int registerOffset = (++it)->u.operand; 1013 printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(exec, dst). c_str(), registerName(exec, func).c_str(), argCount, registerOffset);1013 printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset); 1014 1014 break; 1015 1015 } … … 1019 1019 int argCount = (++it)->u.operand; 1020 1020 int registerOffset = (++it)->u.operand; 1021 printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(exec, dst). c_str(), registerName(exec, func).c_str(), argCount, registerOffset);1021 printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset); 1022 1022 break; 1023 1023 } … … 1027 1027 int argCount = (++it)->u.operand; 1028 1028 int registerOffset = (++it)->u.operand; 1029 printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(exec, dst). c_str(), registerName(exec, func).c_str(), registerName(exec, argCount).c_str(), registerOffset);1029 printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(exec, dst).data(), registerName(exec, func).data(), registerName(exec, argCount).data(), registerOffset); 1030 1030 break; 1031 1031 } … … 1036 1036 case op_tear_off_activation: { 1037 1037 int r0 = (++it)->u.operand; 1038 printf("[%4d] tear_off_activation\t %s\n", location, registerName(exec, r0). c_str());1038 printf("[%4d] tear_off_activation\t %s\n", location, registerName(exec, r0).data()); 1039 1039 break; 1040 1040 } … … 1045 1045 case op_ret: { 1046 1046 int r0 = (++it)->u.operand; 1047 printf("[%4d] ret\t\t %s\n", location, registerName(exec, r0). c_str());1047 printf("[%4d] ret\t\t %s\n", location, registerName(exec, r0).data()); 1048 1048 break; 1049 1049 } … … 1055 1055 int proto = (++it)->u.operand; 1056 1056 int thisRegister = (++it)->u.operand; 1057 printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(exec, dst). c_str(), registerName(exec, func).c_str(), argCount, registerOffset, registerName(exec, proto).c_str(), registerName(exec, thisRegister).c_str());1057 printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(exec, dst).data(), registerName(exec, func).data(), argCount, registerOffset, registerName(exec, proto).data(), registerName(exec, thisRegister).data()); 1058 1058 break; 1059 1059 } … … 1061 1061 int r0 = (++it)->u.operand; 1062 1062 int r1 = (++it)->u.operand; 1063 printf("[%4d] construct_verify\t %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str());1063 printf("[%4d] construct_verify\t %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data()); 1064 1064 break; 1065 1065 } … … 1068 1068 int r1 = (++it)->u.operand; 1069 1069 int count = (++it)->u.operand; 1070 printf("[%4d] strcat\t\t %s, %s, %d\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), count);1070 printf("[%4d] strcat\t\t %s, %s, %d\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), count); 1071 1071 break; 1072 1072 } … … 1074 1074 int r0 = (++it)->u.operand; 1075 1075 int r1 = (++it)->u.operand; 1076 printf("[%4d] to_primitive\t %s, %s\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str());1076 printf("[%4d] to_primitive\t %s, %s\n", location, registerName(exec, r0).data(), registerName(exec, r1).data()); 1077 1077 break; 1078 1078 } … … 1083 1083 int r3 = it[4].u.operand; 1084 1084 int offset = it[5].u.operand; 1085 printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(exec, r0). c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), offset, location + offset);1085 printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(exec, r0).data(), registerName(exec, r1).data(), registerName(exec, r2).data(), registerName(exec, r3).data(), offset, location + offset); 1086 1086 it += OPCODE_LENGTH(op_get_pnames) - 1; 1087 1087 break; … … 1091 1091 int iter = it[4].u.operand; 1092 1092 int offset = it[5].u.operand; 1093 printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(exec, dest). c_str(), registerName(exec, iter).c_str(), offset, location + offset);1093 printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(exec, dest).data(), registerName(exec, iter).data(), offset, location + offset); 1094 1094 it += OPCODE_LENGTH(op_next_pname) - 1; 1095 1095 break; … … 1097 1097 case op_push_scope: { 1098 1098 int r0 = (++it)->u.operand; 1099 printf("[%4d] push_scope\t %s\n", location, registerName(exec, r0). c_str());1099 printf("[%4d] push_scope\t %s\n", location, registerName(exec, r0).data()); 1100 1100 break; 1101 1101 } … … 1108 1108 int id0 = (++it)->u.operand; 1109 1109 int r1 = (++it)->u.operand; 1110 printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(exec, r0). c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str());1110 printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(exec, r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(exec, r1).data()); 1111 1111 break; 1112 1112 } … … 1119 1119 case op_catch: { 1120 1120 int r0 = (++it)->u.operand; 1121 printf("[%4d] catch\t\t %s\n", location, registerName(exec, r0). c_str());1121 printf("[%4d] catch\t\t %s\n", location, registerName(exec, r0).data()); 1122 1122 break; 1123 1123 } 1124 1124 case op_throw: { 1125 1125 int r0 = (++it)->u.operand; 1126 printf("[%4d] throw\t\t %s\n", location, registerName(exec, r0). c_str());1126 printf("[%4d] throw\t\t %s\n", location, registerName(exec, r0).data()); 1127 1127 break; 1128 1128 } … … 1131 1131 int errorType = (++it)->u.operand; 1132 1132 int k0 = (++it)->u.operand; 1133 printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(exec, r0). c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str());1133 printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(exec, r0).data(), errorType, constantName(exec, k0, getConstant(k0)).data()); 1134 1134 break; 1135 1135 } … … 1137 1137 int retAddrDst = (++it)->u.operand; 1138 1138 int offset = (++it)->u.operand; 1139 printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(exec, retAddrDst). c_str(), offset, location + offset);1139 printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(exec, retAddrDst).data(), offset, location + offset); 1140 1140 break; 1141 1141 } 1142 1142 case op_sret: { 1143 1143 int retAddrSrc = (++it)->u.operand; 1144 printf("[%4d] sret\t\t %s\n", location, registerName(exec, retAddrSrc). c_str());1144 printf("[%4d] sret\t\t %s\n", location, registerName(exec, retAddrSrc).data()); 1145 1145 break; 1146 1146 } … … 1154 1154 case op_profile_will_call: { 1155 1155 int function = (++it)->u.operand; 1156 printf("[%4d] profile_will_call %s\n", location, registerName(exec, function). c_str());1156 printf("[%4d] profile_will_call %s\n", location, registerName(exec, function).data()); 1157 1157 break; 1158 1158 } 1159 1159 case op_profile_did_call: { 1160 1160 int function = (++it)->u.operand; 1161 printf("[%4d] profile_did_call\t %s\n", location, registerName(exec, function). c_str());1161 printf("[%4d] profile_did_call\t %s\n", location, registerName(exec, function).data()); 1162 1162 break; 1163 1163 } 1164 1164 case op_end: { 1165 1165 int r0 = (++it)->u.operand; 1166 printf("[%4d] end\t\t %s\n", location, registerName(exec, r0). c_str());1166 printf("[%4d] end\t\t %s\n", location, registerName(exec, r0).data()); 1167 1167 break; 1168 1168 }
Note:
See TracChangeset
for help on using the changeset viewer.