OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 __ Mov(result_register(), Operand(lit)); | 524 __ Mov(result_register(), Operand(lit)); |
525 codegen()->PushOperand(result_register()); | 525 codegen()->PushOperand(result_register()); |
526 } | 526 } |
527 | 527 |
528 | 528 |
529 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 529 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
530 codegen()->PrepareForBailoutBeforeSplit(condition(), | 530 codegen()->PrepareForBailoutBeforeSplit(condition(), |
531 true, | 531 true, |
532 true_label_, | 532 true_label_, |
533 false_label_); | 533 false_label_); |
534 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 534 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || |
535 !lit->IsUndetectable()); | 535 !lit->IsUndetectable()); |
536 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | 536 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { |
537 lit->IsFalse(isolate())) { | |
538 if (false_label_ != fall_through_) __ B(false_label_); | 537 if (false_label_ != fall_through_) __ B(false_label_); |
539 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 538 } else if (lit->IsTrue() || lit->IsJSObject()) { |
540 if (true_label_ != fall_through_) __ B(true_label_); | 539 if (true_label_ != fall_through_) __ B(true_label_); |
541 } else if (lit->IsString()) { | 540 } else if (lit->IsString()) { |
542 if (String::cast(*lit)->length() == 0) { | 541 if (String::cast(*lit)->length() == 0) { |
543 if (false_label_ != fall_through_) __ B(false_label_); | 542 if (false_label_ != fall_through_) __ B(false_label_); |
544 } else { | 543 } else { |
545 if (true_label_ != fall_through_) __ B(true_label_); | 544 if (true_label_ != fall_through_) __ B(true_label_); |
546 } | 545 } |
547 } else if (lit->IsSmi()) { | 546 } else if (lit->IsSmi()) { |
548 if (Smi::cast(*lit)->value() == 0) { | 547 if (Smi::cast(*lit)->value() == 0) { |
549 if (false_label_ != fall_through_) __ B(false_label_); | 548 if (false_label_ != fall_through_) __ B(false_label_); |
(...skipping 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3884 } | 3883 } |
3885 | 3884 |
3886 return INTERRUPT; | 3885 return INTERRUPT; |
3887 } | 3886 } |
3888 | 3887 |
3889 | 3888 |
3890 } // namespace internal | 3889 } // namespace internal |
3891 } // namespace v8 | 3890 } // namespace v8 |
3892 | 3891 |
3893 #endif // V8_TARGET_ARCH_ARM64 | 3892 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |