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

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

Issue 6651019: Merge revisions 6871, 6981, and 7082 to the 3.0 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.0
Patch Set: Fix cut-n-paste errors. Created 9 years, 9 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.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 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 3003
3004 case Token::VOID: { 3004 case Token::VOID: {
3005 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); 3005 Comment cmnt(masm_, "[ UnaryOperation (VOID)");
3006 VisitForEffect(expr->expression()); 3006 VisitForEffect(expr->expression());
3007 context()->Plug(Heap::kUndefinedValueRootIndex); 3007 context()->Plug(Heap::kUndefinedValueRootIndex);
3008 break; 3008 break;
3009 } 3009 }
3010 3010
3011 case Token::NOT: { 3011 case Token::NOT: {
3012 Comment cmnt(masm_, "[ UnaryOperation (NOT)"); 3012 Comment cmnt(masm_, "[ UnaryOperation (NOT)");
3013 Label materialize_true, materialize_false; 3013 if (context()->IsEffect()) {
3014 Label* if_true = NULL; 3014 // Unary NOT has no side effects so it's only necessary to visit the
3015 Label* if_false = NULL; 3015 // subexpression. Match the optimizing compiler by not branching.
3016 Label* fall_through = NULL; 3016 VisitForEffect(expr->expression());
3017 } else {
3018 Label materialize_true, materialize_false;
3019 Label* if_true = NULL;
3020 Label* if_false = NULL;
3021 Label* fall_through = NULL;
3017 3022
3018 // Notice that the labels are swapped. 3023 // Notice that the labels are swapped.
3019 context()->PrepareTest(&materialize_true, &materialize_false, 3024 context()->PrepareTest(&materialize_true, &materialize_false,
3020 &if_false, &if_true, &fall_through); 3025 &if_false, &if_true, &fall_through);
3021 if (context()->IsTest()) ForwardBailoutToChild(expr); 3026 if (context()->IsTest()) ForwardBailoutToChild(expr);
3022 VisitForControl(expr->expression(), if_true, if_false, fall_through); 3027 VisitForControl(expr->expression(), if_true, if_false, fall_through);
3023 context()->Plug(if_false, if_true); // Labels swapped. 3028 context()->Plug(if_false, if_true); // Labels swapped.
3029 }
3024 break; 3030 break;
3025 } 3031 }
3026 3032
3027 case Token::TYPEOF: { 3033 case Token::TYPEOF: {
3028 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 3034 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
3029 { StackValueContext context(this); 3035 { StackValueContext context(this);
3030 VisitForTypeofValue(expr->expression()); 3036 VisitForTypeofValue(expr->expression());
3031 } 3037 }
3032 __ CallRuntime(Runtime::kTypeof, 1); 3038 __ CallRuntime(Runtime::kTypeof, 1);
3033 context()->Plug(r0); 3039 context()->Plug(r0);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
3601 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3607 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3602 __ add(pc, r1, Operand(masm_->CodeObject())); 3608 __ add(pc, r1, Operand(masm_->CodeObject()));
3603 } 3609 }
3604 3610
3605 3611
3606 #undef __ 3612 #undef __
3607 3613
3608 } } // namespace v8::internal 3614 } } // namespace v8::internal
3609 3615
3610 #endif // V8_TARGET_ARCH_ARM 3616 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698