| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 } | 739 } |
| 740 | 740 |
| 741 | 741 |
| 742 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, | 742 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, |
| 743 bool should_normalize, | 743 bool should_normalize, |
| 744 Label* if_true, | 744 Label* if_true, |
| 745 Label* if_false) { | 745 Label* if_false) { |
| 746 // Only prepare for bailouts before splits if we're in a test | 746 // Only prepare for bailouts before splits if we're in a test |
| 747 // context. Otherwise, we let the Visit function deal with the | 747 // context. Otherwise, we let the Visit function deal with the |
| 748 // preparation to avoid preparing with the same AST id twice. | 748 // preparation to avoid preparing with the same AST id twice. |
| 749 if (!context()->IsTest() || !info_->IsOptimizable()) return; | 749 if (!context()->IsTest()) return; |
| 750 | 750 |
| 751 Label skip; | 751 Label skip; |
| 752 if (should_normalize) __ jmp(&skip, Label::kNear); | 752 if (should_normalize) __ jmp(&skip, Label::kNear); |
| 753 PrepareForBailout(expr, TOS_REG); | 753 PrepareForBailout(expr, TOS_REG); |
| 754 if (should_normalize) { | 754 if (should_normalize) { |
| 755 __ cmp(eax, isolate()->factory()->true_value()); | 755 __ cmp(eax, isolate()->factory()->true_value()); |
| 756 Split(equal, if_true, if_false, NULL); | 756 Split(equal, if_true, if_false, NULL); |
| 757 __ bind(&skip); | 757 __ bind(&skip); |
| 758 } | 758 } |
| 759 } | 759 } |
| (...skipping 4531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5291 Assembler::target_address_at(call_target_address, | 5291 Assembler::target_address_at(call_target_address, |
| 5292 unoptimized_code)); | 5292 unoptimized_code)); |
| 5293 return OSR_AFTER_STACK_CHECK; | 5293 return OSR_AFTER_STACK_CHECK; |
| 5294 } | 5294 } |
| 5295 | 5295 |
| 5296 | 5296 |
| 5297 } // namespace internal | 5297 } // namespace internal |
| 5298 } // namespace v8 | 5298 } // namespace v8 |
| 5299 | 5299 |
| 5300 #endif // V8_TARGET_ARCH_IA32 | 5300 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |