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

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

Issue 13902013: Improve handling of unary plus. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 8 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 | « no previous file | src/hydrogen.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3958 matching lines...) Expand 10 before | Expand all | Expand 10 after
3969 case Token::TYPEOF: { 3969 case Token::TYPEOF: {
3970 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 3970 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
3971 { StackValueContext context(this); 3971 { StackValueContext context(this);
3972 VisitForTypeofValue(expr->expression()); 3972 VisitForTypeofValue(expr->expression());
3973 } 3973 }
3974 __ CallRuntime(Runtime::kTypeof, 1); 3974 __ CallRuntime(Runtime::kTypeof, 1);
3975 context()->Plug(r0); 3975 context()->Plug(r0);
3976 break; 3976 break;
3977 } 3977 }
3978 3978
3979 case Token::ADD: {
3980 Comment cmt(masm_, "[ UnaryOperation (ADD)");
3981 VisitForAccumulatorValue(expr->expression());
3982 Label no_conversion;
3983 __ JumpIfSmi(result_register(), &no_conversion);
3984 ToNumberStub convert_stub;
3985 __ CallStub(&convert_stub);
3986 __ bind(&no_conversion);
3987 context()->Plug(result_register());
3988 break;
3989 }
3990
3991 case Token::SUB: 3979 case Token::SUB:
3992 EmitUnaryOperation(expr, "[ UnaryOperation (SUB)"); 3980 EmitUnaryOperation(expr, "[ UnaryOperation (SUB)");
3993 break; 3981 break;
3994 3982
3995 case Token::BIT_NOT: 3983 case Token::BIT_NOT:
3996 EmitUnaryOperation(expr, "[ UnaryOperation (BIT_NOT)"); 3984 EmitUnaryOperation(expr, "[ UnaryOperation (BIT_NOT)");
3997 break; 3985 break;
3998 3986
3999 default: 3987 default:
4000 UNREACHABLE(); 3988 UNREACHABLE();
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 *context_length = 0; 4556 *context_length = 0;
4569 return previous_; 4557 return previous_;
4570 } 4558 }
4571 4559
4572 4560
4573 #undef __ 4561 #undef __
4574 4562
4575 } } // namespace v8::internal 4563 } } // namespace v8::internal
4576 4564
4577 #endif // V8_TARGET_ARCH_ARM 4565 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698