| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3881 __ GetObjectType(v0, a1, a1); | 3881 __ GetObjectType(v0, a1, a1); |
| 3882 __ Branch(&done, ne, a1, Operand(JS_VALUE_TYPE)); | 3882 __ Branch(&done, ne, a1, Operand(JS_VALUE_TYPE)); |
| 3883 | 3883 |
| 3884 __ lw(v0, FieldMemOperand(v0, JSValue::kValueOffset)); | 3884 __ lw(v0, FieldMemOperand(v0, JSValue::kValueOffset)); |
| 3885 | 3885 |
| 3886 __ bind(&done); | 3886 __ bind(&done); |
| 3887 context()->Plug(v0); | 3887 context()->Plug(v0); |
| 3888 } | 3888 } |
| 3889 | 3889 |
| 3890 | 3890 |
| 3891 void FullCodeGenerator::EmitThrowIfNotADate(CallRuntime* expr) { | 3891 void FullCodeGenerator::EmitIsDate(CallRuntime* expr) { |
| 3892 ZoneList<Expression*>* args = expr->arguments(); | 3892 ZoneList<Expression*>* args = expr->arguments(); |
| 3893 DCHECK_EQ(1, args->length()); | 3893 DCHECK_EQ(1, args->length()); |
| 3894 | 3894 |
| 3895 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3895 VisitForAccumulatorValue(args->at(0)); |
| 3896 | 3896 |
| 3897 Label done, not_date_object; | 3897 Label materialize_true, materialize_false; |
| 3898 Register object = v0; | 3898 Label* if_true = nullptr; |
| 3899 Register result = v0; | 3899 Label* if_false = nullptr; |
| 3900 Register scratch1 = a1; | 3900 Label* fall_through = nullptr; |
| 3901 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3902 &if_false, &fall_through); |
| 3901 | 3903 |
| 3902 __ JumpIfSmi(object, ¬_date_object); | 3904 __ JumpIfSmi(v0, if_false); |
| 3903 __ GetObjectType(object, scratch1, scratch1); | 3905 __ GetObjectType(v0, a1, a1); |
| 3904 __ Branch(&done, eq, scratch1, Operand(JS_DATE_TYPE)); | 3906 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3905 __ bind(¬_date_object); | 3907 Split(eq, a1, Operand(JS_DATE_TYPE), if_true, if_false, fall_through); |
| 3906 __ CallRuntime(Runtime::kThrowNotDateError, 0); | |
| 3907 | 3908 |
| 3908 __ bind(&done); | 3909 context()->Plug(if_true, if_false); |
| 3909 context()->Plug(result); | |
| 3910 } | 3910 } |
| 3911 | 3911 |
| 3912 | 3912 |
| 3913 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3913 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
| 3914 ZoneList<Expression*>* args = expr->arguments(); | 3914 ZoneList<Expression*>* args = expr->arguments(); |
| 3915 DCHECK(args->length() == 2); | 3915 DCHECK(args->length() == 2); |
| 3916 DCHECK_NOT_NULL(args->at(1)->AsLiteral()); | 3916 DCHECK_NOT_NULL(args->at(1)->AsLiteral()); |
| 3917 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3917 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
| 3918 | 3918 |
| 3919 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3919 VisitForAccumulatorValue(args->at(0)); // Load the object. |
| (...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5553 reinterpret_cast<uint32_t>( | 5553 reinterpret_cast<uint32_t>( |
| 5554 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5554 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5555 return OSR_AFTER_STACK_CHECK; | 5555 return OSR_AFTER_STACK_CHECK; |
| 5556 } | 5556 } |
| 5557 | 5557 |
| 5558 | 5558 |
| 5559 } // namespace internal | 5559 } // namespace internal |
| 5560 } // namespace v8 | 5560 } // namespace v8 |
| 5561 | 5561 |
| 5562 #endif // V8_TARGET_ARCH_MIPS | 5562 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |