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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 __ mov(result_register(), Operand(lit)); | 533 __ mov(result_register(), Operand(lit)); |
534 codegen()->PushOperand(result_register()); | 534 codegen()->PushOperand(result_register()); |
535 } | 535 } |
536 | 536 |
537 | 537 |
538 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 538 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
539 codegen()->PrepareForBailoutBeforeSplit(condition(), | 539 codegen()->PrepareForBailoutBeforeSplit(condition(), |
540 true, | 540 true, |
541 true_label_, | 541 true_label_, |
542 false_label_); | 542 false_label_); |
543 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 543 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || |
544 !lit->IsUndetectable()); | 544 !lit->IsUndetectable()); |
545 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | 545 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { |
546 lit->IsFalse(isolate())) { | |
547 if (false_label_ != fall_through_) __ b(false_label_); | 546 if (false_label_ != fall_through_) __ b(false_label_); |
548 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 547 } else if (lit->IsTrue() || lit->IsJSObject()) { |
549 if (true_label_ != fall_through_) __ b(true_label_); | 548 if (true_label_ != fall_through_) __ b(true_label_); |
550 } else if (lit->IsString()) { | 549 } else if (lit->IsString()) { |
551 if (String::cast(*lit)->length() == 0) { | 550 if (String::cast(*lit)->length() == 0) { |
552 if (false_label_ != fall_through_) __ b(false_label_); | 551 if (false_label_ != fall_through_) __ b(false_label_); |
553 } else { | 552 } else { |
554 if (true_label_ != fall_through_) __ b(true_label_); | 553 if (true_label_ != fall_through_) __ b(true_label_); |
555 } | 554 } |
556 } else if (lit->IsSmi()) { | 555 } else if (lit->IsSmi()) { |
557 if (Smi::cast(*lit)->value() == 0) { | 556 if (Smi::cast(*lit)->value() == 0) { |
558 if (false_label_ != fall_through_) __ b(false_label_); | 557 if (false_label_ != fall_through_) __ b(false_label_); |
(...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3876 DCHECK(interrupt_address == | 3875 DCHECK(interrupt_address == |
3877 isolate->builtins()->OnStackReplacement()->entry()); | 3876 isolate->builtins()->OnStackReplacement()->entry()); |
3878 return ON_STACK_REPLACEMENT; | 3877 return ON_STACK_REPLACEMENT; |
3879 } | 3878 } |
3880 | 3879 |
3881 | 3880 |
3882 } // namespace internal | 3881 } // namespace internal |
3883 } // namespace v8 | 3882 } // namespace v8 |
3884 | 3883 |
3885 #endif // V8_TARGET_ARCH_ARM | 3884 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |