| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { | 509 void FullCodeGenerator::StackValueContext::Plug(Handle<Object> lit) const { |
| 510 // Immediates cannot be pushed directly. | 510 // Immediates cannot be pushed directly. |
| 511 __ mov(result_register(), Operand(lit)); | 511 __ mov(result_register(), Operand(lit)); |
| 512 codegen()->PushOperand(result_register()); | 512 codegen()->PushOperand(result_register()); |
| 513 } | 513 } |
| 514 | 514 |
| 515 | 515 |
| 516 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { | 516 void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const { |
| 517 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, | 517 codegen()->PrepareForBailoutBeforeSplit(condition(), true, true_label_, |
| 518 false_label_); | 518 false_label_); |
| 519 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || | 519 DCHECK(lit->IsNull(isolate()) || lit->IsUndefined(isolate()) || |
| 520 !lit->IsUndetectable()); | 520 !lit->IsUndetectable()); |
| 521 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { | 521 if (lit->IsUndefined(isolate()) || lit->IsNull(isolate()) || |
| 522 lit->IsFalse(isolate())) { |
| 522 if (false_label_ != fall_through_) __ b(false_label_); | 523 if (false_label_ != fall_through_) __ b(false_label_); |
| 523 } else if (lit->IsTrue() || lit->IsJSObject()) { | 524 } else if (lit->IsTrue(isolate()) || lit->IsJSObject()) { |
| 524 if (true_label_ != fall_through_) __ b(true_label_); | 525 if (true_label_ != fall_through_) __ b(true_label_); |
| 525 } else if (lit->IsString()) { | 526 } else if (lit->IsString()) { |
| 526 if (String::cast(*lit)->length() == 0) { | 527 if (String::cast(*lit)->length() == 0) { |
| 527 if (false_label_ != fall_through_) __ b(false_label_); | 528 if (false_label_ != fall_through_) __ b(false_label_); |
| 528 } else { | 529 } else { |
| 529 if (true_label_ != fall_through_) __ b(true_label_); | 530 if (true_label_ != fall_through_) __ b(true_label_); |
| 530 } | 531 } |
| 531 } else if (lit->IsSmi()) { | 532 } else if (lit->IsSmi()) { |
| 532 if (Smi::cast(*lit)->value() == 0) { | 533 if (Smi::cast(*lit)->value() == 0) { |
| 533 if (false_label_ != fall_through_) __ b(false_label_); | 534 if (false_label_ != fall_through_) __ b(false_label_); |
| (...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 | 3806 |
| 3806 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3807 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
| 3807 | 3808 |
| 3808 DCHECK(interrupt_address == | 3809 DCHECK(interrupt_address == |
| 3809 isolate->builtins()->OnStackReplacement()->entry()); | 3810 isolate->builtins()->OnStackReplacement()->entry()); |
| 3810 return ON_STACK_REPLACEMENT; | 3811 return ON_STACK_REPLACEMENT; |
| 3811 } | 3812 } |
| 3812 } // namespace internal | 3813 } // namespace internal |
| 3813 } // namespace v8 | 3814 } // namespace v8 |
| 3814 #endif // V8_TARGET_ARCH_PPC | 3815 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |