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() || !lit->IsUndetectable()); | 519 DCHECK(lit->IsNull() || lit->IsUndefined(isolate()) || |
520 if (lit->IsUndefined() || lit->IsNull() || lit->IsFalse()) { | 520 !lit->IsUndetectable()); |
| 521 if (lit->IsUndefined(isolate()) || lit->IsNull() || lit->IsFalse()) { |
521 if (false_label_ != fall_through_) __ b(false_label_); | 522 if (false_label_ != fall_through_) __ b(false_label_); |
522 } else if (lit->IsTrue() || lit->IsJSObject()) { | 523 } else if (lit->IsTrue() || lit->IsJSObject()) { |
523 if (true_label_ != fall_through_) __ b(true_label_); | 524 if (true_label_ != fall_through_) __ b(true_label_); |
524 } else if (lit->IsString()) { | 525 } else if (lit->IsString()) { |
525 if (String::cast(*lit)->length() == 0) { | 526 if (String::cast(*lit)->length() == 0) { |
526 if (false_label_ != fall_through_) __ b(false_label_); | 527 if (false_label_ != fall_through_) __ b(false_label_); |
527 } else { | 528 } else { |
528 if (true_label_ != fall_through_) __ b(true_label_); | 529 if (true_label_ != fall_through_) __ b(true_label_); |
529 } | 530 } |
530 } else if (lit->IsSmi()) { | 531 } else if (lit->IsSmi()) { |
(...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3804 | 3805 |
3805 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3806 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3806 | 3807 |
3807 DCHECK(interrupt_address == | 3808 DCHECK(interrupt_address == |
3808 isolate->builtins()->OnStackReplacement()->entry()); | 3809 isolate->builtins()->OnStackReplacement()->entry()); |
3809 return ON_STACK_REPLACEMENT; | 3810 return ON_STACK_REPLACEMENT; |
3810 } | 3811 } |
3811 } // namespace internal | 3812 } // namespace internal |
3812 } // namespace v8 | 3813 } // namespace v8 |
3813 #endif // V8_TARGET_ARCH_PPC | 3814 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |