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/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 __ push(Immediate(lit)); | 473 __ push(Immediate(lit)); |
474 } | 474 } |
475 } | 475 } |
476 | 476 |
477 | 477 |
478 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 478 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
479 codegen()->PrepareForBailoutBeforeSplit(condition(), | 479 codegen()->PrepareForBailoutBeforeSplit(condition(), |
480 true, | 480 true, |
481 true_label_, | 481 true_label_, |
482 false_label_); | 482 false_label_); |
483 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 483 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); |
484 !lit->IsUndetectable()); | 484 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { |
485 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | |
486 lit->IsFalse(isolate())) { | |
487 if (false_label_ != fall_through_) __ jmp(false_label_); | 485 if (false_label_ != fall_through_) __ jmp(false_label_); |
488 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 486 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { |
489 if (true_label_ != fall_through_) __ jmp(true_label_); | 487 if (true_label_ != fall_through_) __ jmp(true_label_); |
490 } else if (lit->IsString()) { | 488 } else if (lit->IsString()) { |
491 if (String::cast(*lit)->length() == 0) { | 489 if (String::cast(*lit)->length() == 0) { |
492 if (false_label_ != fall_through_) __ jmp(false_label_); | 490 if (false_label_ != fall_through_) __ jmp(false_label_); |
493 } else { | 491 } else { |
494 if (true_label_ != fall_through_) __ jmp(true_label_); | 492 if (true_label_ != fall_through_) __ jmp(true_label_); |
495 } | 493 } |
496 } else if (lit->IsSmi()) { | 494 } else if (lit->IsSmi()) { |
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2706 isolate->builtins()->OnStackReplacement()->entry(), | 2704 isolate->builtins()->OnStackReplacement()->entry(), |
2707 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2705 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2708 return ON_STACK_REPLACEMENT; | 2706 return ON_STACK_REPLACEMENT; |
2709 } | 2707 } |
2710 | 2708 |
2711 | 2709 |
2712 } // namespace internal | 2710 } // namespace internal |
2713 } // namespace v8 | 2711 } // namespace v8 |
2714 | 2712 |
2715 #endif // V8_TARGET_ARCH_IA32 | 2713 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |