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/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 __ push(Immediate(lit)); | 483 __ push(Immediate(lit)); |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 | 487 |
488 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 488 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
489 codegen()->PrepareForBailoutBeforeSplit(condition(), | 489 codegen()->PrepareForBailoutBeforeSplit(condition(), |
490 true, | 490 true, |
491 true_label_, | 491 true_label_, |
492 false_label_); | 492 false_label_); |
493 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 493 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || |
494 !lit->IsUndetectable()); | 494 !lit->IsUndetectable()); |
495 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | 495 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { |
496 lit->IsFalse(isolate())) { | |
497 if (false_label_ != fall_through_) __ jmp(false_label_); | 496 if (false_label_ != fall_through_) __ jmp(false_label_); |
498 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 497 } else if (lit->IsTrue() || lit->IsJSObject()) { |
499 if (true_label_ != fall_through_) __ jmp(true_label_); | 498 if (true_label_ != fall_through_) __ jmp(true_label_); |
500 } else if (lit->IsString()) { | 499 } else if (lit->IsString()) { |
501 if (String::cast(*lit)->length() == 0) { | 500 if (String::cast(*lit)->length() == 0) { |
502 if (false_label_ != fall_through_) __ jmp(false_label_); | 501 if (false_label_ != fall_through_) __ jmp(false_label_); |
503 } else { | 502 } else { |
504 if (true_label_ != fall_through_) __ jmp(true_label_); | 503 if (true_label_ != fall_through_) __ jmp(true_label_); |
505 } | 504 } |
506 } else if (lit->IsSmi()) { | 505 } else if (lit->IsSmi()) { |
507 if (Smi::cast(*lit)->value() == 0) { | 506 if (Smi::cast(*lit)->value() == 0) { |
508 if (false_label_ != fall_through_) __ jmp(false_label_); | 507 if (false_label_ != fall_through_) __ jmp(false_label_); |
(...skipping 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3711 isolate->builtins()->OnStackReplacement()->entry(), | 3710 isolate->builtins()->OnStackReplacement()->entry(), |
3712 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3711 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3713 return ON_STACK_REPLACEMENT; | 3712 return ON_STACK_REPLACEMENT; |
3714 } | 3713 } |
3715 | 3714 |
3716 | 3715 |
3717 } // namespace internal | 3716 } // namespace internal |
3718 } // namespace v8 | 3717 } // namespace v8 |
3719 | 3718 |
3720 #endif // V8_TARGET_ARCH_IA32 | 3719 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |