Changeset 34576 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- Jun 15, 2008, 4:59:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r34562 r34576 510 510 } 511 511 512 RegisterID* CodeGenerator::emit Not(RegisterID* dst, RegisterID* src)513 { 514 emitOpcode(op _not);512 RegisterID* CodeGenerator::emitUnaryOp(OpcodeID opcode, RegisterID* dst, RegisterID* src) 513 { 514 emitOpcode(opcode); 515 515 instructions().append(dst->index()); 516 516 instructions().append(src->index()); … … 548 548 } 549 549 550 RegisterID* CodeGenerator::emitToJSNumber(RegisterID* dst, RegisterID* src)551 {552 emitOpcode(op_to_jsnumber);553 instructions().append(dst->index());554 instructions().append(src->index());555 return dst;556 }557 558 RegisterID* CodeGenerator::emitNegate(RegisterID* dst, RegisterID* src)559 {560 emitOpcode(op_negate);561 instructions().append(dst->index());562 instructions().append(src->index());563 return dst;564 }565 566 RegisterID* CodeGenerator::emitBitNot(RegisterID* dst, RegisterID* src)567 {568 emitOpcode(op_bitnot);569 instructions().append(dst->index());570 instructions().append(src->index());571 return dst;572 }573 574 550 RegisterID* CodeGenerator::emitBinaryOp(OpcodeID opcode, RegisterID* dst, RegisterID* src1, RegisterID* src2) 575 551 { … … 581 557 } 582 558 583 RegisterID* CodeGenerator::emitInstanceOf(RegisterID* dst, RegisterID* value, RegisterID* base)584 {585 emitOpcode(op_instanceof);586 instructions().append(dst->index());587 instructions().append(value->index());588 instructions().append(base->index());589 return dst;590 }591 592 RegisterID* CodeGenerator::emitTypeOf(RegisterID* dst, RegisterID* src)593 {594 emitOpcode(op_typeof);595 instructions().append(dst->index());596 instructions().append(src->index());597 return dst;598 }599 600 RegisterID* CodeGenerator::emitIn(RegisterID* dst, RegisterID* property, RegisterID* base)601 {602 emitOpcode(op_in);603 instructions().append(dst->index());604 instructions().append(property->index());605 instructions().append(base->index());606 return dst;607 }608 609 559 RegisterID* CodeGenerator::emitLoad(RegisterID* dst, bool b) 610 560 { … … 631 581 } 632 582 633 RegisterID* CodeGenerator::emitNewObject(RegisterID* dst) 634 { 635 emitOpcode(op_new_object); 636 instructions().append(dst->index()); 637 return dst; 638 } 639 640 RegisterID* CodeGenerator::emitNewArray(RegisterID* dst) 641 { 642 emitOpcode(op_new_array); 583 RegisterID* CodeGenerator::emitNullaryOp(OpcodeID opcode, RegisterID* dst) 584 { 585 emitOpcode(opcode); 643 586 instructions().append(dst->index()); 644 587 return dst; … … 896 839 } 897 840 898 RegisterID* CodeGenerator::emitReturn(RegisterID* r0) 899 { 900 emitOpcode(op_ret); 901 instructions().append(r0->index()); 902 return r0; 903 } 904 905 RegisterID* CodeGenerator::emitEnd(RegisterID* dst) 906 { 907 emitOpcode(op_end); 908 instructions().append(dst->index()); 909 return dst; 841 RegisterID* CodeGenerator::emitUnaryNoDstOp(OpcodeID opcode, RegisterID* src) 842 { 843 emitOpcode(opcode); 844 instructions().append(src->index()); 845 return src; 910 846 } 911 847 … … 936 872 { 937 873 m_codeBlock->needsFullScopeChain = true; 938 emitOpcode(op_push_scope);939 instructions().append(scope->index());940 941 874 ControlFlowContext context; 942 875 context.isFinallyBlock = false; 943 876 m_scopeContextStack.append(context); 944 877 m_dynamicScopeDepth++; 945 return scope; 878 879 return emitUnaryNoDstOp(op_push_scope, scope); 946 880 } 947 881 … … 1118 1052 } 1119 1053 1120 RegisterID* CodeGenerator::emitGetPropertyNames(RegisterID* dst, RegisterID* base)1121 {1122 emitOpcode(op_get_pnames);1123 instructions().append(dst->index());1124 instructions().append(base->index());1125 return dst;1126 }1127 1128 1054 RegisterID* CodeGenerator::emitCatch(RegisterID* targetRegister, LabelID* start, LabelID* end) 1129 1055 { … … 1135 1061 } 1136 1062 1137 void CodeGenerator::emitThrow(RegisterID* exception)1138 {1139 emitOpcode(op_throw);1140 instructions().append(exception->index());1141 }1142 1143 1063 RegisterID* CodeGenerator::emitNewError(RegisterID* dst, ErrorType type, JSValue* message) 1144 1064 {
Note:
See TracChangeset
for help on using the changeset viewer.