| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4057 NilValue nil) { | 4057 NilValue nil) { |
| 4058 Label materialize_true, materialize_false; | 4058 Label materialize_true, materialize_false; |
| 4059 Label* if_true = NULL; | 4059 Label* if_true = NULL; |
| 4060 Label* if_false = NULL; | 4060 Label* if_false = NULL; |
| 4061 Label* fall_through = NULL; | 4061 Label* fall_through = NULL; |
| 4062 context()->PrepareTest(&materialize_true, &materialize_false, | 4062 context()->PrepareTest(&materialize_true, &materialize_false, |
| 4063 &if_true, &if_false, &fall_through); | 4063 &if_true, &if_false, &fall_through); |
| 4064 | 4064 |
| 4065 VisitForAccumulatorValue(sub_expr); | 4065 VisitForAccumulatorValue(sub_expr); |
| 4066 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4066 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 4067 __ mov(a0, result_register()); | |
| 4068 if (expr->op() == Token::EQ_STRICT) { | 4067 if (expr->op() == Token::EQ_STRICT) { |
| 4069 Heap::RootListIndex nil_value = nil == kNullValue ? | 4068 Heap::RootListIndex nil_value = nil == kNullValue ? |
| 4070 Heap::kNullValueRootIndex : | 4069 Heap::kNullValueRootIndex : |
| 4071 Heap::kUndefinedValueRootIndex; | 4070 Heap::kUndefinedValueRootIndex; |
| 4072 __ LoadRoot(a1, nil_value); | 4071 __ LoadRoot(a1, nil_value); |
| 4073 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); | 4072 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); |
| 4074 } else { | 4073 } else { |
| 4075 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 4074 __ JumpIfSmi(v0, if_false); |
| 4076 CallIC(ic, expr->CompareOperationFeedbackId()); | 4075 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 4077 __ LoadRoot(a1, Heap::kTrueValueRootIndex); | 4076 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
| 4078 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); | 4077 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
| 4078 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
| 4079 } | 4079 } |
| 4080 context()->Plug(if_true, if_false); | 4080 context()->Plug(if_true, if_false); |
| 4081 } | 4081 } |
| 4082 | 4082 |
| 4083 | 4083 |
| 4084 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 4084 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
| 4085 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4085 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 4086 context()->Plug(v0); | 4086 context()->Plug(v0); |
| 4087 } | 4087 } |
| 4088 | 4088 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4281 reinterpret_cast<uint64_t>( | 4281 reinterpret_cast<uint64_t>( |
| 4282 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4282 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4283 return OSR_AFTER_STACK_CHECK; | 4283 return OSR_AFTER_STACK_CHECK; |
| 4284 } | 4284 } |
| 4285 | 4285 |
| 4286 | 4286 |
| 4287 } // namespace internal | 4287 } // namespace internal |
| 4288 } // namespace v8 | 4288 } // namespace v8 |
| 4289 | 4289 |
| 4290 #endif // V8_TARGET_ARCH_MIPS64 | 4290 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |