⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 codeblock.cpp

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻 CPP
📖 第 1 页 / 共 5 页
字号:
            break;        }        case op_is_object: {            printUnaryOp(location, it, "is_object");            break;        }        case op_is_function: {            printUnaryOp(location, it, "is_function");            break;        }        case op_in: {            printBinaryOp(location, it, "in");            break;        }        case op_resolve: {            int r0 = (++it)->u.operand;            int id0 = (++it)->u.operand;            printf("[%4d] resolve\t\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str());            break;        }        case op_resolve_skip: {            int r0 = (++it)->u.operand;            int id0 = (++it)->u.operand;            int skipLevels = (++it)->u.operand;            printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels);            break;        }        case op_resolve_global: {            int r0 = (++it)->u.operand;            JSValuePtr scope = JSValuePtr((++it)->u.jsCell);            int id0 = (++it)->u.operand;            printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str());            it += 2;            break;        }        case op_get_scoped_var: {            int r0 = (++it)->u.operand;            int index = (++it)->u.operand;            int skipLevels = (++it)->u.operand;            printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(r0).c_str(), index, skipLevels);            break;        }        case op_put_scoped_var: {            int index = (++it)->u.operand;            int skipLevels = (++it)->u.operand;            int r0 = (++it)->u.operand;            printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(r0).c_str());            break;        }        case op_get_global_var: {            int r0 = (++it)->u.operand;            JSValuePtr scope = JSValuePtr((++it)->u.jsCell);            int index = (++it)->u.operand;            printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), index);            break;        }        case op_put_global_var: {            JSValuePtr scope = JSValuePtr((++it)->u.jsCell);            int index = (++it)->u.operand;            int r0 = (++it)->u.operand;            printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(r0).c_str());            break;        }        case op_resolve_base: {            int r0 = (++it)->u.operand;            int id0 = (++it)->u.operand;            printf("[%4d] resolve_base\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str());            break;        }        case op_resolve_with_base: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int id0 = (++it)->u.operand;            printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str());            break;        }        case op_resolve_func: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int id0 = (++it)->u.operand;            printf("[%4d] resolve_func\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str());            break;        }        case op_get_by_id: {            printGetByIdOp(location, it, m_identifiers, "get_by_id");            break;        }        case op_get_by_id_self: {            printGetByIdOp(location, it, m_identifiers, "get_by_id_self");            break;        }        case op_get_by_id_self_list: {            printGetByIdOp(location, it, m_identifiers, "get_by_id_self_list");            break;        }        case op_get_by_id_proto: {            printGetByIdOp(location, it, m_identifiers, "get_by_id_proto");            break;        }        case op_get_by_id_proto_list: {            printGetByIdOp(location, it, m_identifiers, "op_get_by_id_proto_list");            break;        }        case op_get_by_id_chain: {            printGetByIdOp(location, it, m_identifiers, "get_by_id_chain");            break;        }        case op_get_by_id_generic: {            printGetByIdOp(location, it, m_identifiers, "get_by_id_generic");            break;        }        case op_get_array_length: {            printGetByIdOp(location, it, m_identifiers, "get_array_length");            break;        }        case op_get_string_length: {            printGetByIdOp(location, it, m_identifiers, "get_string_length");            break;        }        case op_put_by_id: {            printPutByIdOp(location, it, m_identifiers, "put_by_id");            break;        }        case op_put_by_id_replace: {            printPutByIdOp(location, it, m_identifiers, "put_by_id_replace");            break;        }        case op_put_by_id_transition: {            printPutByIdOp(location, it, m_identifiers, "put_by_id_transition");            break;        }        case op_put_by_id_generic: {            printPutByIdOp(location, it, m_identifiers, "put_by_id_generic");            break;        }        case op_put_getter: {            int r0 = (++it)->u.operand;            int id0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str());            break;        }        case op_put_setter: {            int r0 = (++it)->u.operand;            int id0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str());            break;        }        case op_del_by_id: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int id0 = (++it)->u.operand;            printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str());            break;        }        case op_get_by_val: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int r2 = (++it)->u.operand;            printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str());            break;        }        case op_put_by_val: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int r2 = (++it)->u.operand;            printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str());            break;        }        case op_del_by_val: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int r2 = (++it)->u.operand;            printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str());            break;        }        case op_put_by_index: {            int r0 = (++it)->u.operand;            unsigned n0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(r0).c_str(), n0, registerName(r1).c_str());            break;        }        case op_jmp: {            int offset = (++it)->u.operand;            printf("[%4d] jmp\t\t %d(->%d)\n", location, offset, locationForOffset(begin, it, offset));            break;        }        case op_loop: {            int offset = (++it)->u.operand;            printf("[%4d] loop\t\t %d(->%d)\n", location, offset, locationForOffset(begin, it, offset));            break;        }        case op_jtrue: {            printConditionalJump(begin, it, location, "jtrue");            break;        }        case op_loop_if_true: {            printConditionalJump(begin, it, location, "loop_if_true");            break;        }        case op_jfalse: {            printConditionalJump(begin, it, location, "jfalse");            break;        }        case op_jeq_null: {            printConditionalJump(begin, it, location, "jeq_null");            break;        }        case op_jneq_null: {            printConditionalJump(begin, it, location, "jneq_null");            break;        }        case op_jnless: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int offset = (++it)->u.operand;            printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset));            break;        }        case op_loop_if_less: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int offset = (++it)->u.operand;            printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset));            break;        }        case op_loop_if_lesseq: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            int offset = (++it)->u.operand;            printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset));            break;        }        case op_switch_imm: {            int tableIndex = (++it)->u.operand;            int defaultTarget = (++it)->u.operand;            int scrutineeRegister = (++it)->u.operand;            printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str());            break;        }        case op_switch_char: {            int tableIndex = (++it)->u.operand;            int defaultTarget = (++it)->u.operand;            int scrutineeRegister = (++it)->u.operand;            printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str());            break;        }        case op_switch_string: {            int tableIndex = (++it)->u.operand;            int defaultTarget = (++it)->u.operand;            int scrutineeRegister = (++it)->u.operand;            printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, locationForOffset(begin, it, defaultTarget), registerName(scrutineeRegister).c_str());            break;        }        case op_new_func: {            int r0 = (++it)->u.operand;            int f0 = (++it)->u.operand;            printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(r0).c_str(), f0);            break;        }        case op_new_func_exp: {            int r0 = (++it)->u.operand;            int f0 = (++it)->u.operand;            printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(r0).c_str(), f0);            break;        }        case op_call: {            int dst = (++it)->u.operand;            int func = (++it)->u.operand;            int argCount = (++it)->u.operand;            int registerOffset = (++it)->u.operand;            printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset);            break;        }        case op_call_eval: {            int dst = (++it)->u.operand;            int func = (++it)->u.operand;            int argCount = (++it)->u.operand;            int registerOffset = (++it)->u.operand;            printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset);            break;        }        case op_tear_off_activation: {            int r0 = (++it)->u.operand;            printf("[%4d] tear_off_activation\t %s\n", location, registerName(r0).c_str());            break;        }        case op_tear_off_arguments: {            printf("[%4d] tear_off_arguments\n", location);            break;        }        case op_ret: {            int r0 = (++it)->u.operand;            printf("[%4d] ret\t\t %s\n", location, registerName(r0).c_str());            break;        }        case op_construct: {            int dst = (++it)->u.operand;            int func = (++it)->u.operand;            int argCount = (++it)->u.operand;            int registerOffset = (++it)->u.operand;            int proto = (++it)->u.operand;            int thisRegister = (++it)->u.operand;            printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset, registerName(proto).c_str(), registerName(thisRegister).c_str());            break;        }        case op_construct_verify: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str());            break;        }        case op_get_pnames: {            int r0 = (++it)->u.operand;            int r1 = (++it)->u.operand;            printf("[%4d] get_pnames\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str());            break;        }        case op_next_pname: {            int dest = (++it)->u.operand;            int iter = (++it)->u.operand;            int offset = (++it)->u.operand;            printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(dest).c_str(), registerName(iter).c_str(), offset, locationForOffset(begin, it, offset));            break;        }        case op_push_scope: {            int r0 = (++it)->u.operand;            printf("[%4d] push_scope\t %s\n", location, registerName(r0).c_str());            break;        }        case op_pop_scope: {            printf("[%4d] pop_scope\n", location);            break;        }        case op_push_new_scope: {            int r0 = (++it)->u.operand;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -