OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { | 496 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { |
497 // Immediates cannot be pushed directly. | 497 // Immediates cannot be pushed directly. |
498 __ mov(result_register(), Operand(lit)); | 498 __ mov(result_register(), Operand(lit)); |
499 codegen()->PushOperand(result_register()); | 499 codegen()->PushOperand(result_register()); |
500 } | 500 } |
501 | 501 |
502 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 502 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
503 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, | 503 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, |
504 false_label_); | 504 false_label_); |
505 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || | 505 DCHECK(lit->IsNullOrUndefined(isolate()) || !lit->IsUndetectable()); |
506 !lit->IsUndetectable()); | 506 if (lit->IsNullOrUndefined(isolate()) || lit->IsFalse(isolate())) { |
507 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || | |
508 lit->IsFalse(isolate())) { | |
509 if (false_label_ != fall_through_) __ b(false_label_); | 507 if (false_label_ != fall_through_) __ b(false_label_); |
510 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { | 508 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { |
511 if (true_label_ != fall_through_) __ b(true_label_); | 509 if (true_label_ != fall_through_) __ b(true_label_); |
512 } else if (lit->IsString()) { | 510 } else if (lit->IsString()) { |
513 if (String::cast(*lit)->length() == 0) { | 511 if (String::cast(*lit)->length() == 0) { |
514 if (false_label_ != fall_through_) __ b(false_label_); | 512 if (false_label_ != fall_through_) __ b(false_label_); |
515 } else { | 513 } else { |
516 if (true_label_ != fall_through_) __ b(true_label_); | 514 if (true_label_ != fall_through_) __ b(true_label_); |
517 } | 515 } |
518 } else if (lit->IsSmi()) { | 516 } else if (lit->IsSmi()) { |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 | 2703 |
2706 // Expect BRC to be patched to NOP branch. | 2704 // Expect BRC to be patched to NOP branch. |
2707 // i.e. BRC 0x0, +XXXX (0xA704XXXX) | 2705 // i.e. BRC 0x0, +XXXX (0xA704XXXX) |
2708 USE(kOSRBranchInstruction); | 2706 USE(kOSRBranchInstruction); |
2709 DCHECK(kOSRBranchInstruction == br_instr); | 2707 DCHECK(kOSRBranchInstruction == br_instr); |
2710 | 2708 |
2711 DCHECK(interrupt_address == | 2709 DCHECK(interrupt_address == |
2712 isolate->builtins()->OnStackReplacement()->entry()); | 2710 isolate->builtins()->OnStackReplacement()->entry()); |
2713 return ON_STACK_REPLACEMENT; | 2711 return ON_STACK_REPLACEMENT; |
2714 } | 2712 } |
2715 | |
2716 } // namespace internal | 2713 } // namespace internal |
2717 } // namespace v8 | 2714 } // namespace v8 |
2718 #endif // V8_TARGET_ARCH_S390 | 2715 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |