| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |