OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3823 break; | 3823 break; |
3824 | 3824 |
3825 default: | 3825 default: |
3826 UNREACHABLE(); | 3826 UNREACHABLE(); |
3827 } | 3827 } |
3828 } | 3828 } |
3829 | 3829 |
3830 | 3830 |
3831 void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr, | 3831 void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr, |
3832 const char* comment) { | 3832 const char* comment) { |
3833 // TODO(svenpanne): Allowing format strings in Comment would be nice here... | |
Sven Panne
2011/08/12 09:41:40
Not really related to the current patch, but I gue
| |
3834 Comment cmt(masm_, comment); | 3833 Comment cmt(masm_, comment); |
3835 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); | 3834 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); |
3836 UnaryOverwriteMode overwrite = | 3835 UnaryOverwriteMode overwrite = |
3837 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; | 3836 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; |
3838 UnaryOpStub stub(expr->op(), overwrite); | 3837 UnaryOpStub stub(expr->op(), overwrite); |
3839 // UnaryOpStub expects the argument to be in the | 3838 // UnaryOpStub expects the argument to be in the |
3840 // accumulator register eax. | 3839 // accumulator register eax. |
3841 VisitForAccumulatorValue(expr->expression()); | 3840 VisitForAccumulatorValue(expr->expression()); |
3842 SetSourcePosition(expr->position()); | 3841 SetSourcePosition(expr->position()); |
3843 __ call(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); | 3842 __ call(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4370 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 4369 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
4371 __ jmp(Operand(edx)); | 4370 __ jmp(Operand(edx)); |
4372 } | 4371 } |
4373 | 4372 |
4374 | 4373 |
4375 #undef __ | 4374 #undef __ |
4376 | 4375 |
4377 } } // namespace v8::internal | 4376 } } // namespace v8::internal |
4378 | 4377 |
4379 #endif // V8_TARGET_ARCH_IA32 | 4378 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |