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 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3109 | 3109 |
3110 __ JumpIfSmi(v0, if_false); | 3110 __ JumpIfSmi(v0, if_false); |
3111 __ GetObjectType(v0, a1, a1); | 3111 __ GetObjectType(v0, a1, a1); |
3112 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3112 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3113 Split(eq, a1, Operand(JS_PROXY_TYPE), if_true, if_false, fall_through); | 3113 Split(eq, a1, Operand(JS_PROXY_TYPE), if_true, if_false, fall_through); |
3114 | 3114 |
3115 context()->Plug(if_true, if_false); | 3115 context()->Plug(if_true, if_false); |
3116 } | 3116 } |
3117 | 3117 |
3118 | 3118 |
3119 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | |
3120 ZoneList<Expression*>* args = expr->arguments(); | |
3121 DCHECK(args->length() == 2); | |
3122 | |
3123 // Load the two objects into registers and perform the comparison. | |
3124 VisitForStackValue(args->at(0)); | |
3125 VisitForAccumulatorValue(args->at(1)); | |
3126 | |
3127 Label materialize_true, materialize_false; | |
3128 Label* if_true = NULL; | |
3129 Label* if_false = NULL; | |
3130 Label* fall_through = NULL; | |
3131 context()->PrepareTest(&materialize_true, &materialize_false, | |
3132 &if_true, &if_false, &fall_through); | |
3133 | |
3134 __ pop(a1); | |
3135 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3136 Split(eq, v0, Operand(a1), if_true, if_false, fall_through); | |
3137 | |
3138 context()->Plug(if_true, if_false); | |
3139 } | |
3140 | |
3141 | |
3142 void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { | 3119 void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { |
3143 ZoneList<Expression*>* args = expr->arguments(); | 3120 ZoneList<Expression*>* args = expr->arguments(); |
3144 DCHECK(args->length() == 1); | 3121 DCHECK(args->length() == 1); |
3145 Label done, null, function, non_function_constructor; | 3122 Label done, null, function, non_function_constructor; |
3146 | 3123 |
3147 VisitForAccumulatorValue(args->at(0)); | 3124 VisitForAccumulatorValue(args->at(0)); |
3148 | 3125 |
3149 // If the object is not a JSReceiver, we return null. | 3126 // If the object is not a JSReceiver, we return null. |
3150 __ JumpIfSmi(v0, &null); | 3127 __ JumpIfSmi(v0, &null); |
3151 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 3128 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4617 reinterpret_cast<uint32_t>( | 4594 reinterpret_cast<uint32_t>( |
4618 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4595 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4619 return OSR_AFTER_STACK_CHECK; | 4596 return OSR_AFTER_STACK_CHECK; |
4620 } | 4597 } |
4621 | 4598 |
4622 | 4599 |
4623 } // namespace internal | 4600 } // namespace internal |
4624 } // namespace v8 | 4601 } // namespace v8 |
4625 | 4602 |
4626 #endif // V8_TARGET_ARCH_MIPS | 4603 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |