| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 4038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4049 NilValue nil) { | 4049 NilValue nil) { |
| 4050 Label materialize_true, materialize_false; | 4050 Label materialize_true, materialize_false; |
| 4051 Label* if_true = NULL; | 4051 Label* if_true = NULL; |
| 4052 Label* if_false = NULL; | 4052 Label* if_false = NULL; |
| 4053 Label* fall_through = NULL; | 4053 Label* fall_through = NULL; |
| 4054 context()->PrepareTest(&materialize_true, &materialize_false, | 4054 context()->PrepareTest(&materialize_true, &materialize_false, |
| 4055 &if_true, &if_false, &fall_through); | 4055 &if_true, &if_false, &fall_through); |
| 4056 | 4056 |
| 4057 VisitForAccumulatorValue(sub_expr); | 4057 VisitForAccumulatorValue(sub_expr); |
| 4058 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4058 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 4059 __ mov(a0, result_register()); | |
| 4060 if (expr->op() == Token::EQ_STRICT) { | 4059 if (expr->op() == Token::EQ_STRICT) { |
| 4061 Heap::RootListIndex nil_value = nil == kNullValue ? | 4060 Heap::RootListIndex nil_value = nil == kNullValue ? |
| 4062 Heap::kNullValueRootIndex : | 4061 Heap::kNullValueRootIndex : |
| 4063 Heap::kUndefinedValueRootIndex; | 4062 Heap::kUndefinedValueRootIndex; |
| 4064 __ LoadRoot(a1, nil_value); | 4063 __ LoadRoot(a1, nil_value); |
| 4065 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); | 4064 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); |
| 4066 } else { | 4065 } else { |
| 4067 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 4066 __ JumpIfSmi(v0, if_false); |
| 4068 CallIC(ic, expr->CompareOperationFeedbackId()); | 4067 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 4069 __ LoadRoot(a1, Heap::kTrueValueRootIndex); | 4068 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
| 4070 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); | 4069 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
| 4070 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
| 4071 } | 4071 } |
| 4072 context()->Plug(if_true, if_false); | 4072 context()->Plug(if_true, if_false); |
| 4073 } | 4073 } |
| 4074 | 4074 |
| 4075 | 4075 |
| 4076 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 4076 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
| 4077 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4077 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 4078 context()->Plug(v0); | 4078 context()->Plug(v0); |
| 4079 } | 4079 } |
| 4080 | 4080 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4268 reinterpret_cast<uint32_t>( | 4268 reinterpret_cast<uint32_t>( |
| 4269 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4269 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4270 return OSR_AFTER_STACK_CHECK; | 4270 return OSR_AFTER_STACK_CHECK; |
| 4271 } | 4271 } |
| 4272 | 4272 |
| 4273 | 4273 |
| 4274 } // namespace internal | 4274 } // namespace internal |
| 4275 } // namespace v8 | 4275 } // namespace v8 |
| 4276 | 4276 |
| 4277 #endif // V8_TARGET_ARCH_MIPS | 4277 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |