| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 } | 751 } |
| 752 | 752 |
| 753 | 753 |
| 754 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, | 754 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, |
| 755 bool should_normalize, | 755 bool should_normalize, |
| 756 Label* if_true, | 756 Label* if_true, |
| 757 Label* if_false) { | 757 Label* if_false) { |
| 758 // Only prepare for bailouts before splits if we're in a test | 758 // Only prepare for bailouts before splits if we're in a test |
| 759 // context. Otherwise, we let the Visit function deal with the | 759 // context. Otherwise, we let the Visit function deal with the |
| 760 // preparation to avoid preparing with the same AST id twice. | 760 // preparation to avoid preparing with the same AST id twice. |
| 761 if (!context()->IsTest() || !info_->IsOptimizable()) return; | 761 if (!context()->IsTest()) return; |
| 762 | 762 |
| 763 Label skip; | 763 Label skip; |
| 764 if (should_normalize) __ jmp(&skip, Label::kNear); | 764 if (should_normalize) __ jmp(&skip, Label::kNear); |
| 765 PrepareForBailout(expr, TOS_REG); | 765 PrepareForBailout(expr, TOS_REG); |
| 766 if (should_normalize) { | 766 if (should_normalize) { |
| 767 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 767 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
| 768 Split(equal, if_true, if_false, NULL); | 768 Split(equal, if_true, if_false, NULL); |
| 769 __ bind(&skip); | 769 __ bind(&skip); |
| 770 } | 770 } |
| 771 } | 771 } |
| (...skipping 4529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5301 Assembler::target_address_at(call_target_address, | 5301 Assembler::target_address_at(call_target_address, |
| 5302 unoptimized_code)); | 5302 unoptimized_code)); |
| 5303 return OSR_AFTER_STACK_CHECK; | 5303 return OSR_AFTER_STACK_CHECK; |
| 5304 } | 5304 } |
| 5305 | 5305 |
| 5306 | 5306 |
| 5307 } // namespace internal | 5307 } // namespace internal |
| 5308 } // namespace v8 | 5308 } // namespace v8 |
| 5309 | 5309 |
| 5310 #endif // V8_TARGET_ARCH_X64 | 5310 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |