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/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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 __ Mov(result_register(), Operand(lit)); | 512 __ Mov(result_register(), Operand(lit)); |
513 codegen()->PushOperand(result_register()); | 513 codegen()->PushOperand(result_register()); |
514 } | 514 } |
515 | 515 |
516 | 516 |
517 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 517 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
518 codegen()->PrepareForBailoutBeforeSplit(condition(), | 518 codegen()->PrepareForBailoutBeforeSplit(condition(), |
519 true, | 519 true, |
520 true_label_, | 520 true_label_, |
521 false_label_); | 521 false_label_); |
522 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 522 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); |
523 !lit->IsUndetectable()); | 523 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { |
524 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | |
525 lit->IsFalse(isolate())) { | |
526 if (false_label_ != fall_through_) __ B(false_label_); | 524 if (false_label_ != fall_through_) __ B(false_label_); |
527 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 525 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { |
528 if (true_label_ != fall_through_) __ B(true_label_); | 526 if (true_label_ != fall_through_) __ B(true_label_); |
529 } else if (lit->IsString()) { | 527 } else if (lit->IsString()) { |
530 if (String::cast(*lit)->length() == 0) { | 528 if (String::cast(*lit)->length() == 0) { |
531 if (false_label_ != fall_through_) __ B(false_label_); | 529 if (false_label_ != fall_through_) __ B(false_label_); |
532 } else { | 530 } else { |
533 if (true_label_ != fall_through_) __ B(true_label_); | 531 if (true_label_ != fall_through_) __ B(true_label_); |
534 } | 532 } |
535 } else if (lit->IsSmi()) { | 533 } else if (lit->IsSmi()) { |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2838 } | 2836 } |
2839 | 2837 |
2840 return INTERRUPT; | 2838 return INTERRUPT; |
2841 } | 2839 } |
2842 | 2840 |
2843 | 2841 |
2844 } // namespace internal | 2842 } // namespace internal |
2845 } // namespace v8 | 2843 } // namespace v8 |
2846 | 2844 |
2847 #endif // V8_TARGET_ARCH_ARM64 | 2845 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |