| 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 3678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3689 // TODO(svenpanne): Allowing format strings in Comment would be nice here... | 3689 // TODO(svenpanne): Allowing format strings in Comment would be nice here... |
| 3690 Comment cmt(masm_, comment); | 3690 Comment cmt(masm_, comment); |
| 3691 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); | 3691 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); |
| 3692 UnaryOverwriteMode overwrite = | 3692 UnaryOverwriteMode overwrite = |
| 3693 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; | 3693 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; |
| 3694 UnaryOpStub stub(expr->op(), overwrite); | 3694 UnaryOpStub stub(expr->op(), overwrite); |
| 3695 // UnaryOpStub expects the argument to be in the | 3695 // UnaryOpStub expects the argument to be in the |
| 3696 // accumulator register eax. | 3696 // accumulator register eax. |
| 3697 VisitForAccumulatorValue(expr->expression()); | 3697 VisitForAccumulatorValue(expr->expression()); |
| 3698 SetSourcePosition(expr->position()); | 3698 SetSourcePosition(expr->position()); |
| 3699 EmitCallIC(stub.GetCode(), NULL, expr->id()); | 3699 EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id()); |
| 3700 context()->Plug(eax); | 3700 context()->Plug(eax); |
| 3701 } | 3701 } |
| 3702 | 3702 |
| 3703 | 3703 |
| 3704 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 3704 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 3705 Comment cmnt(masm_, "[ CountOperation"); | 3705 Comment cmnt(masm_, "[ CountOperation"); |
| 3706 SetSourcePosition(expr->position()); | 3706 SetSourcePosition(expr->position()); |
| 3707 | 3707 |
| 3708 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' | 3708 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' |
| 3709 // as the left-hand side. | 3709 // as the left-hand side. |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4259 // And return. | 4259 // And return. |
| 4260 __ ret(0); | 4260 __ ret(0); |
| 4261 } | 4261 } |
| 4262 | 4262 |
| 4263 | 4263 |
| 4264 #undef __ | 4264 #undef __ |
| 4265 | 4265 |
| 4266 } } // namespace v8::internal | 4266 } } // namespace v8::internal |
| 4267 | 4267 |
| 4268 #endif // V8_TARGET_ARCH_IA32 | 4268 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |