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

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

Issue 385136: Step next should respect do/while condition block. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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/codegen-ia32.h ('k') | src/parser.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2442 } 2442 }
2443 2443
2444 2444
2445 void CodeGenerator::VisitReturnStatement(ReturnStatement* node) { 2445 void CodeGenerator::VisitReturnStatement(ReturnStatement* node) {
2446 ASSERT(!in_spilled_code()); 2446 ASSERT(!in_spilled_code());
2447 Comment cmnt(masm_, "[ ReturnStatement"); 2447 Comment cmnt(masm_, "[ ReturnStatement");
2448 2448
2449 CodeForStatementPosition(node); 2449 CodeForStatementPosition(node);
2450 Load(node->expression()); 2450 Load(node->expression());
2451 Result return_value = frame_->Pop(); 2451 Result return_value = frame_->Pop();
2452 masm()->WriteRecordedPositions();
2452 if (function_return_is_shadowed_) { 2453 if (function_return_is_shadowed_) {
2453 function_return_.Jump(&return_value); 2454 function_return_.Jump(&return_value);
2454 } else { 2455 } else {
2455 frame_->PrepareForReturn(); 2456 frame_->PrepareForReturn();
2456 if (function_return_.is_bound()) { 2457 if (function_return_.is_bound()) {
2457 // If the function return label is already bound we reuse the 2458 // If the function return label is already bound we reuse the
2458 // code by jumping to the return site. 2459 // code by jumping to the return site.
2459 function_return_.Jump(&return_value); 2460 function_return_.Jump(&return_value);
2460 } else { 2461 } else {
2461 function_return_.Bind(&return_value); 2462 function_return_.Bind(&return_value);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 node->break_target()->Bind(); 2706 node->break_target()->Bind();
2706 } 2707 }
2707 break; 2708 break;
2708 case DONT_KNOW: 2709 case DONT_KNOW:
2709 // We have to compile the test expression if it can be reached by 2710 // We have to compile the test expression if it can be reached by
2710 // control flow falling out of the body or via continue. 2711 // control flow falling out of the body or via continue.
2711 if (node->continue_target()->is_linked()) { 2712 if (node->continue_target()->is_linked()) {
2712 node->continue_target()->Bind(); 2713 node->continue_target()->Bind();
2713 } 2714 }
2714 if (has_valid_frame()) { 2715 if (has_valid_frame()) {
2716 Comment cmnt(masm_, "[ DoWhileCondition");
2717 CodeForDoWhileConditionPosition(node);
2715 ControlDestination dest(&body, node->break_target(), false); 2718 ControlDestination dest(&body, node->break_target(), false);
2716 LoadCondition(node->cond(), &dest, true); 2719 LoadCondition(node->cond(), &dest, true);
2717 } 2720 }
2718 if (node->break_target()->is_linked()) { 2721 if (node->break_target()->is_linked()) {
2719 node->break_target()->Bind(); 2722 node->break_target()->Bind();
2720 } 2723 }
2721 break; 2724 break;
2722 } 2725 }
2723 2726
2724 DecrementLoopNesting(); 2727 DecrementLoopNesting();
(...skipping 5382 matching lines...) Expand 10 before | Expand all | Expand 10 after
8107 8110
8108 int CompareStub::MinorKey() { 8111 int CompareStub::MinorKey() {
8109 // Encode the two parameters in a unique 16 bit value. 8112 // Encode the two parameters in a unique 16 bit value.
8110 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); 8113 ASSERT(static_cast<unsigned>(cc_) < (1 << 15));
8111 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); 8114 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0);
8112 } 8115 }
8113 8116
8114 #undef __ 8117 #undef __
8115 8118
8116 } } // namespace v8::internal 8119 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698