Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 7280005: Simplify the way we call UnaryOpStubs, saving one unused no-op after the call itself. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698