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

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

Issue 3539019: Backport r5607 to branches/2.3. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: Created 10 years, 2 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/version.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1007
1008 1008
1009 void FullCodeGenerator::VisitConditional(Conditional* expr) { 1009 void FullCodeGenerator::VisitConditional(Conditional* expr) {
1010 Comment cmnt(masm_, "[ Conditional"); 1010 Comment cmnt(masm_, "[ Conditional");
1011 Label true_case, false_case, done; 1011 Label true_case, false_case, done;
1012 VisitForControl(expr->condition(), &true_case, &false_case, &true_case); 1012 VisitForControl(expr->condition(), &true_case, &false_case, &true_case);
1013 1013
1014 __ bind(&true_case); 1014 __ bind(&true_case);
1015 SetExpressionPosition(expr->then_expression(), 1015 SetExpressionPosition(expr->then_expression(),
1016 expr->then_expression_position()); 1016 expr->then_expression_position());
1017 Visit(expr->then_expression());
1018 // If control flow falls through Visit, jump to done.
1019 if (context_ == Expression::kEffect || context_ == Expression::kValue) { 1017 if (context_ == Expression::kEffect || context_ == Expression::kValue) {
1018 Visit(expr->then_expression());
1020 __ jmp(&done); 1019 __ jmp(&done);
1020 } else {
1021 VisitForControl(expr->then_expression(), true_label_, false_label_, NULL);
1021 } 1022 }
1022 1023
1023 __ bind(&false_case); 1024 __ bind(&false_case);
1024 SetExpressionPosition(expr->else_expression(), 1025 SetExpressionPosition(expr->else_expression(),
1025 expr->else_expression_position()); 1026 expr->else_expression_position());
1026 Visit(expr->else_expression()); 1027 Visit(expr->else_expression());
1027 // If control flow falls through Visit, merge it with true case here. 1028 // If control flow falls through Visit, merge it with true case here.
1028 if (context_ == Expression::kEffect || context_ == Expression::kValue) { 1029 if (context_ == Expression::kEffect || context_ == Expression::kValue) {
1029 __ bind(&done); 1030 __ bind(&done);
1030 } 1031 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 ASSERT(args->length() == 1); 1108 ASSERT(args->length() == 1);
1108 VisitForValue(args->at(0), kStack); 1109 VisitForValue(args->at(0), kStack);
1109 __ CallRuntime(Runtime::kRegExpCloneResult, 1); 1110 __ CallRuntime(Runtime::kRegExpCloneResult, 1);
1110 Apply(context_, result_register()); 1111 Apply(context_, result_register());
1111 } 1112 }
1112 1113
1113 #undef __ 1114 #undef __
1114 1115
1115 1116
1116 } } // namespace v8::internal 1117 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698