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() || lit->IsUndefined(isolate()) || | 493 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || |
494 !lit->IsUndetectable()); | 494 !lit->IsUndetectable()); |
495 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { | 495 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || |
| 496 lit->IsFalse(isolate())) { |
496 if (false_label_ != fall_through_) __ jmp(false_label_); | 497 if (false_label_ != fall_through_) __ jmp(false_label_); |
497 } else if (lit->IsTrue() || lit->IsJSObject()) { | 498 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { |
498 if (true_label_ != fall_through_) __ jmp(true_label_); | 499 if (true_label_ != fall_through_) __ jmp(true_label_); |
499 } else if (lit->IsString()) { | 500 } else if (lit->IsString()) { |
500 if (String::cast(*lit)->length() == 0) { | 501 if (String::cast(*lit)->length() == 0) { |
501 if (false_label_ != fall_through_) __ jmp(false_label_); | 502 if (false_label_ != fall_through_) __ jmp(false_label_); |
502 } else { | 503 } else { |
503 if (true_label_ != fall_through_) __ jmp(true_label_); | 504 if (true_label_ != fall_through_) __ jmp(true_label_); |
504 } | 505 } |
505 } else if (lit->IsSmi()) { | 506 } else if (lit->IsSmi()) { |
506 if (Smi::cast(*lit)->value() == 0) { | 507 if (Smi::cast(*lit)->value() == 0) { |
507 if (false_label_ != fall_through_) __ jmp(false_label_); | 508 if (false_label_ != fall_through_) __ jmp(false_label_); |
(...skipping 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3710 isolate->builtins()->OnStackReplacement()->entry(), | 3711 isolate->builtins()->OnStackReplacement()->entry(), |
3711 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3712 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3712 return ON_STACK_REPLACEMENT; | 3713 return ON_STACK_REPLACEMENT; |
3713 } | 3714 } |
3714 | 3715 |
3715 | 3716 |
3716 } // namespace internal | 3717 } // namespace internal |
3717 } // namespace v8 | 3718 } // namespace v8 |
3718 | 3719 |
3719 #endif // V8_TARGET_ARCH_IA32 | 3720 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |