Changeset 34032 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- May 22, 2008, 12:55:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r33979 r34032 944 944 } 945 945 946 RegisterID* CodeGenerator::emitCall(RegisterID* r0, RegisterID* r1, RegisterID* r2, ArgumentsNode* argumentsNode)947 { 948 return emitCall(op_call, r0, r1, r2, argumentsNode);949 } 950 951 RegisterID* CodeGenerator::emitCallEval(RegisterID* r0, RegisterID* r1, RegisterID* r2, ArgumentsNode* argumentsNode)952 { 953 return emitCall(op_call_eval, r0, r1, r2, argumentsNode);954 } 955 956 RegisterID* CodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* r0, RegisterID* r1, RegisterID* r2, ArgumentsNode* argumentsNode)946 RegisterID* CodeGenerator::emitCall(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode* argumentsNode) 947 { 948 return emitCall(op_call, dst, func, base, argumentsNode); 949 } 950 951 RegisterID* CodeGenerator::emitCallEval(RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode* argumentsNode) 952 { 953 return emitCall(op_call_eval, dst, func, base, argumentsNode); 954 } 955 956 RegisterID* CodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, RegisterID* func, RegisterID* base, ArgumentsNode* argumentsNode) 957 957 { 958 958 ASSERT(opcodeID == op_call || opcodeID == op_call_eval); 959 959 960 RefPtr<RegisterID> ref 1 = r1;961 RefPtr<RegisterID> ref 2 = r2;960 RefPtr<RegisterID> refFunc = func; 961 RefPtr<RegisterID> refBase = base; 962 962 963 963 // Reserve space for call frame. … … 975 975 976 976 instructions().append(machine().getOpcode(opcodeID)); 977 instructions().append( r0->index());978 instructions().append( r1->index());979 instructions().append( r2 ? r2->index() : missingThisObjectMarker()); // We encode the "this" value in the instruction stream, to avoid an explicit instruction for copying or loading it.977 instructions().append(dst->index()); 978 instructions().append(func->index()); 979 instructions().append(base ? base->index() : missingThisObjectMarker()); // We encode the "this" value in the instruction stream, to avoid an explicit instruction for copying or loading it. 980 980 instructions().append(argv.size() ? argv[0]->index() : m_temporaries.size()); // argv 981 981 instructions().append(argv.size()); // argc 982 983 return r0; 982 return dst; 984 983 } 985 984 … … 991 990 } 992 991 993 RegisterID* CodeGenerator::emitEnd(RegisterID* r0)992 RegisterID* CodeGenerator::emitEnd(RegisterID* dst) 994 993 { 995 994 instructions().append(machine().getOpcode(op_end)); 996 instructions().append( r0->index());997 return r0;998 } 999 1000 RegisterID* CodeGenerator::emitConstruct(RegisterID* r0, RegisterID* r1, ArgumentsNode* argumentsNode)995 instructions().append(dst->index()); 996 return dst; 997 } 998 999 RegisterID* CodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func, ArgumentsNode* argumentsNode) 1001 1000 { 1002 1001 // Reserve space for call frame. … … 1014 1013 1015 1014 instructions().append(machine().getOpcode(op_construct)); 1016 instructions().append( r0->index());1017 instructions().append( r1->index());1015 instructions().append(dst->index()); 1016 instructions().append(func->index()); 1018 1017 instructions().append(argv.size() ? argv[0]->index() : m_temporaries.size()); // argv 1019 1018 instructions().append(argv.size()); // argc 1020 return r0;1019 return dst; 1021 1020 } 1022 1021
Note:
See TracChangeset
for help on using the changeset viewer.