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 4013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4024 VisitForAccumulatorValue(sub_expr); | 4024 VisitForAccumulatorValue(sub_expr); |
4025 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4025 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
4026 if (expr->op() == Token::EQ_STRICT) { | 4026 if (expr->op() == Token::EQ_STRICT) { |
4027 Heap::RootListIndex nil_value = nil == kNullValue | 4027 Heap::RootListIndex nil_value = nil == kNullValue |
4028 ? Heap::kNullValueRootIndex | 4028 ? Heap::kNullValueRootIndex |
4029 : Heap::kUndefinedValueRootIndex; | 4029 : Heap::kUndefinedValueRootIndex; |
4030 __ LoadRoot(r4, nil_value); | 4030 __ LoadRoot(r4, nil_value); |
4031 __ cmp(r3, r4); | 4031 __ cmp(r3, r4); |
4032 Split(eq, if_true, if_false, fall_through); | 4032 Split(eq, if_true, if_false, fall_through); |
4033 } else { | 4033 } else { |
4034 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 4034 __ JumpIfSmi(r3, if_false); |
4035 CallIC(ic, expr->CompareOperationFeedbackId()); | 4035 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); |
4036 __ CompareRoot(r3, Heap::kTrueValueRootIndex); | 4036 __ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset)); |
4037 Split(eq, if_true, if_false, fall_through); | 4037 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); |
| 4038 Split(ne, if_true, if_false, fall_through, cr0); |
4038 } | 4039 } |
4039 context()->Plug(if_true, if_false); | 4040 context()->Plug(if_true, if_false); |
4040 } | 4041 } |
4041 | 4042 |
4042 | 4043 |
4043 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 4044 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
4044 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4045 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
4045 context()->Plug(r3); | 4046 context()->Plug(r3); |
4046 } | 4047 } |
4047 | 4048 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4222 return ON_STACK_REPLACEMENT; | 4223 return ON_STACK_REPLACEMENT; |
4223 } | 4224 } |
4224 | 4225 |
4225 DCHECK(interrupt_address == | 4226 DCHECK(interrupt_address == |
4226 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4227 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4227 return OSR_AFTER_STACK_CHECK; | 4228 return OSR_AFTER_STACK_CHECK; |
4228 } | 4229 } |
4229 } // namespace internal | 4230 } // namespace internal |
4230 } // namespace v8 | 4231 } // namespace v8 |
4231 #endif // V8_TARGET_ARCH_PPC | 4232 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |