| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca> | 3 * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(r0).c_
str(), f0); | 805 printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(r0).c_
str(), f0); |
| 806 break; | 806 break; |
| 807 } | 807 } |
| 808 case op_new_func_exp: { | 808 case op_new_func_exp: { |
| 809 int r0 = (++it)->u.operand; | 809 int r0 = (++it)->u.operand; |
| 810 int f0 = (++it)->u.operand; | 810 int f0 = (++it)->u.operand; |
| 811 printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(r0).
c_str(), f0); | 811 printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(r0).
c_str(), f0); |
| 812 break; | 812 break; |
| 813 } | 813 } |
| 814 case op_call: { | 814 case op_call: { |
| 815 int r0 = (++it)->u.operand; | 815 int dst = (++it)->u.operand; |
| 816 int r1 = (++it)->u.operand; | 816 int func = (++it)->u.operand; |
| 817 int r2 = (++it)->u.operand; | |
| 818 int tempCount = (++it)->u.operand; | |
| 819 int argCount = (++it)->u.operand; | 817 int argCount = (++it)->u.operand; |
| 820 int registerOffset = (++it)->u.operand; | 818 int registerOffset = (++it)->u.operand; |
| 821 printf("[%4d] call\t\t %s, %s, %s, %d, %d, %d\n", location, register
Name(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), tempCount,
argCount, registerOffset); | 819 printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(dst
).c_str(), registerName(func).c_str(), argCount, registerOffset); |
| 822 break; | 820 break; |
| 823 } | 821 } |
| 824 case op_call_eval: { | 822 case op_call_eval: { |
| 825 int r0 = (++it)->u.operand; | 823 int dst = (++it)->u.operand; |
| 826 int r1 = (++it)->u.operand; | 824 int func = (++it)->u.operand; |
| 827 int r2 = (++it)->u.operand; | |
| 828 int tempCount = (++it)->u.operand; | |
| 829 int argCount = (++it)->u.operand; | 825 int argCount = (++it)->u.operand; |
| 830 int registerOffset = (++it)->u.operand; | 826 int registerOffset = (++it)->u.operand; |
| 831 printf("[%4d] call_eval\t\t %s, %s, %s, %d, %d, %d\n", location, reg
isterName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), tempC
ount, argCount, registerOffset); | 827 printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(
dst).c_str(), registerName(func).c_str(), argCount, registerOffset); |
| 832 break; | 828 break; |
| 833 } | 829 } |
| 834 case op_tear_off_activation: { | 830 case op_tear_off_activation: { |
| 835 int r0 = (++it)->u.operand; | 831 int r0 = (++it)->u.operand; |
| 836 printf("[%4d] tear_off_activation\t %s\n", location, registerName(r0
).c_str()); | 832 printf("[%4d] tear_off_activation\t %s\n", location, registerName(r0
).c_str()); |
| 837 break; | 833 break; |
| 838 } | 834 } |
| 839 case op_tear_off_arguments: { | 835 case op_tear_off_arguments: { |
| 840 printf("[%4d] tear_off_arguments\n", location); | 836 printf("[%4d] tear_off_arguments\n", location); |
| 841 break; | 837 break; |
| 842 } | 838 } |
| 843 case op_ret: { | 839 case op_ret: { |
| 844 int r0 = (++it)->u.operand; | 840 int r0 = (++it)->u.operand; |
| 845 printf("[%4d] ret\t\t %s\n", location, registerName(r0).c_str()); | 841 printf("[%4d] ret\t\t %s\n", location, registerName(r0).c_str()); |
| 846 break; | 842 break; |
| 847 } | 843 } |
| 848 case op_construct: { | 844 case op_construct: { |
| 849 int r0 = (++it)->u.operand; | 845 int dst = (++it)->u.operand; |
| 850 int r1 = (++it)->u.operand; | 846 int func = (++it)->u.operand; |
| 851 int r2 = (++it)->u.operand; | |
| 852 int tempCount = (++it)->u.operand; | |
| 853 int argCount = (++it)->u.operand; | 847 int argCount = (++it)->u.operand; |
| 854 int registerOffset = (++it)->u.operand; | 848 int registerOffset = (++it)->u.operand; |
| 855 printf("[%4d] construct\t %s, %s, %s, %d, %d, %d\n", location, regis
terName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), tempCou
nt, argCount, registerOffset); | 849 int proto = (++it)->u.operand; |
| 850 int thisRegister = (++it)->u.operand; |
| 851 printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, regis
terName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset, regi
sterName(proto).c_str(), registerName(thisRegister).c_str()); |
| 856 break; | 852 break; |
| 857 } | 853 } |
| 858 case op_construct_verify: { | 854 case op_construct_verify: { |
| 859 int r0 = (++it)->u.operand; | 855 int r0 = (++it)->u.operand; |
| 860 int r1 = (++it)->u.operand; | 856 int r1 = (++it)->u.operand; |
| 861 printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r
0).c_str(), registerName(r1).c_str()); | 857 printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r
0).c_str(), registerName(r1).c_str()); |
| 862 break; | 858 break; |
| 863 } | 859 } |
| 864 case op_get_pnames: { | 860 case op_get_pnames: { |
| 865 int r0 = (++it)->u.operand; | 861 int r0 = (++it)->u.operand; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 { | 1171 { |
| 1176 if (value >= min && static_cast<uint32_t>(value - min) < branchOffsets.size(
)) { | 1172 if (value >= min && static_cast<uint32_t>(value - min) < branchOffsets.size(
)) { |
| 1177 int32_t offset = branchOffsets[value - min]; | 1173 int32_t offset = branchOffsets[value - min]; |
| 1178 if (offset) | 1174 if (offset) |
| 1179 return offset; | 1175 return offset; |
| 1180 } | 1176 } |
| 1181 return defaultOffset; | 1177 return defaultOffset; |
| 1182 } | 1178 } |
| 1183 | 1179 |
| 1184 } // namespace JSC | 1180 } // namespace JSC |
| OLD | NEW |