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

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

Issue 27130: Experimental: fix a bug in our handling of the short-circuit boolean... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 10 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/codegen-ia32.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-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 JumpTarget* target = where ? true_target_ : false_target_; 184 JumpTarget* target = where ? true_target_ : false_target_;
185 if (target->is_bound()) { 185 if (target->is_bound()) {
186 target->Jump(); 186 target->Jump();
187 } else { 187 } else {
188 target->Bind(); 188 target->Bind();
189 } 189 }
190 is_used_ = true; 190 is_used_ = true;
191 true_is_fall_through_ = where; 191 true_is_fall_through_ = where;
192 } 192 }
193 193
194 // Mark this jump target as used as if Goto had been called, but
195 // without generating a jump or binding a label (the control effect
196 // should have already happened). This is used when the left
197 // subexpression of the short-circuit boolean operators are
198 // compiled.
199 void Use(bool where) {
200 ASSERT(!is_used_);
201 ASSERT((where ? true_target_ : false_target_)->is_bound());
202 is_used_ = true;
203 true_is_fall_through_ = where;
204 }
205
194 // Swap the true and false targets but keep the same actual label as 206 // Swap the true and false targets but keep the same actual label as
195 // the fall through. This is used when compiling negated 207 // the fall through. This is used when compiling negated
196 // expressions, where we want to swap the targets but preserve the 208 // expressions, where we want to swap the targets but preserve the
197 // state. 209 // state.
198 void Invert() { 210 void Invert() {
199 JumpTarget* temp_target = true_target_; 211 JumpTarget* temp_target = true_target_;
200 true_target_ = false_target_; 212 true_target_ = false_target_;
201 false_target_ = temp_target; 213 false_target_ = temp_target;
202 214
203 true_is_fall_through_ = !true_is_fall_through_; 215 true_is_fall_through_ = !true_is_fall_through_;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 cgen_->set_in_spilled_code(false); 649 cgen_->set_in_spilled_code(false);
638 GetValue(typeof_state); 650 GetValue(typeof_state);
639 cgen_->frame()->SpillAll(); 651 cgen_->frame()->SpillAll();
640 cgen_->set_in_spilled_code(true); 652 cgen_->set_in_spilled_code(true);
641 } 653 }
642 654
643 655
644 } } // namespace v8::internal 656 } } // namespace v8::internal
645 657
646 #endif // V8_CODEGEN_IA32_H_ 658 #endif // V8_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698