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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 3753 matching lines...) Expand 10 before | Expand all | Expand 10 after
3764 // TODO(svenpanne): Allowing format strings in Comment would be nice here... 3764 // TODO(svenpanne): Allowing format strings in Comment would be nice here...
3765 Comment cmt(masm_, comment); 3765 Comment cmt(masm_, comment);
3766 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); 3766 bool can_overwrite = expr->expression()->ResultOverwriteAllowed();
3767 UnaryOverwriteMode overwrite = 3767 UnaryOverwriteMode overwrite =
3768 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; 3768 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE;
3769 UnaryOpStub stub(expr->op(), overwrite); 3769 UnaryOpStub stub(expr->op(), overwrite);
3770 // GenericUnaryOpStub expects the argument to be in a0. 3770 // GenericUnaryOpStub expects the argument to be in a0.
3771 VisitForAccumulatorValue(expr->expression()); 3771 VisitForAccumulatorValue(expr->expression());
3772 SetSourcePosition(expr->position()); 3772 SetSourcePosition(expr->position());
3773 __ mov(a0, result_register()); 3773 __ mov(a0, result_register());
3774 EmitCallIC(stub.GetCode(), NULL, expr->id()); 3774 EmitCallIC(stub.GetCode(), RelocInfo::CODE_TARGET, expr->id());
3775 context()->Plug(v0); 3775 context()->Plug(v0);
3776 } 3776 }
3777 3777
3778 3778
3779 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 3779 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
3780 Comment cmnt(masm_, "[ CountOperation"); 3780 Comment cmnt(masm_, "[ CountOperation");
3781 SetSourcePosition(expr->position()); 3781 SetSourcePosition(expr->position());
3782 3782
3783 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' 3783 // Invalid left-hand sides are rewritten to have a 'throw ReferenceError'
3784 // as the left-hand side. 3784 // as the left-hand side.
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
4314 __ Addu(at, a1, Operand(masm_->CodeObject())); 4314 __ Addu(at, a1, Operand(masm_->CodeObject()));
4315 __ Jump(at); 4315 __ Jump(at);
4316 } 4316 }
4317 4317
4318 4318
4319 #undef __ 4319 #undef __
4320 4320
4321 } } // namespace v8::internal 4321 } } // namespace v8::internal
4322 4322
4323 #endif // V8_TARGET_ARCH_MIPS 4323 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698