| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1033   __ bind(&convert); | 1033   __ bind(&convert); | 
| 1034   ToObjectStub stub(isolate()); | 1034   ToObjectStub stub(isolate()); | 
| 1035   __ CallStub(&stub); | 1035   __ CallStub(&stub); | 
| 1036   __ mov(a0, v0); | 1036   __ mov(a0, v0); | 
| 1037   __ bind(&done_convert); | 1037   __ bind(&done_convert); | 
| 1038   PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 1038   PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); | 
| 1039   __ push(a0); | 1039   __ push(a0); | 
| 1040 | 1040 | 
| 1041   // Check for proxies. | 1041   // Check for proxies. | 
| 1042   Label call_runtime; | 1042   Label call_runtime; | 
| 1043   STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |  | 
| 1044   __ GetObjectType(a0, a1, a1); | 1043   __ GetObjectType(a0, a1, a1); | 
| 1045   __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE)); | 1044   __ Branch(&call_runtime, eq, a1, Operand(JS_PROXY_TYPE)); | 
| 1046 | 1045 | 
| 1047   // Check cache validity in generated code. This is a fast case for | 1046   // Check cache validity in generated code. This is a fast case for | 
| 1048   // the JSObject::IsSimpleEnum cache validity checks. If we cannot | 1047   // the JSObject::IsSimpleEnum cache validity checks. If we cannot | 
| 1049   // guarantee cache validity, call the runtime system to check cache | 1048   // guarantee cache validity, call the runtime system to check cache | 
| 1050   // validity or get the property names in a fixed array. | 1049   // validity or get the property names in a fixed array. | 
| 1051   __ CheckEnumCache(null_value, &call_runtime); | 1050   __ CheckEnumCache(null_value, &call_runtime); | 
| 1052 | 1051 | 
| 1053   // The enum cache is valid.  Load the map of the object being | 1052   // The enum cache is valid.  Load the map of the object being | 
| 1054   // iterated over and use the cache for the iteration. | 1053   // iterated over and use the cache for the iteration. | 
| 1055   Label use_cache; | 1054   Label use_cache; | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1095   Label non_proxy; | 1094   Label non_proxy; | 
| 1096   __ bind(&fixed_array); | 1095   __ bind(&fixed_array); | 
| 1097 | 1096 | 
| 1098   __ EmitLoadTypeFeedbackVector(a1); | 1097   __ EmitLoadTypeFeedbackVector(a1); | 
| 1099   __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1098   __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 
| 1100   int vector_index = SmiFromSlot(slot)->value(); | 1099   int vector_index = SmiFromSlot(slot)->value(); | 
| 1101   __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); | 1100   __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); | 
| 1102 | 1101 | 
| 1103   __ li(a1, Operand(Smi::FromInt(1)));  // Smi indicates slow check | 1102   __ li(a1, Operand(Smi::FromInt(1)));  // Smi indicates slow check | 
| 1104   __ lw(a2, MemOperand(sp, 0 * kPointerSize));  // Get enumerated object | 1103   __ lw(a2, MemOperand(sp, 0 * kPointerSize));  // Get enumerated object | 
| 1105   STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | 1104   STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | 
| 1106   __ GetObjectType(a2, a3, a3); | 1105   __ GetObjectType(a2, a3, a3); | 
| 1107   __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); | 1106   __ Branch(&non_proxy, gt, a3, Operand(JS_PROXY_TYPE)); | 
| 1108   __ li(a1, Operand(Smi::FromInt(0)));  // Zero indicates proxy | 1107   __ li(a1, Operand(Smi::FromInt(0)));  // Zero indicates proxy | 
| 1109   __ bind(&non_proxy); | 1108   __ bind(&non_proxy); | 
| 1110   __ Push(a1, v0);  // Smi and array | 1109   __ Push(a1, v0);  // Smi and array | 
| 1111   __ lw(a1, FieldMemOperand(v0, FixedArray::kLengthOffset)); | 1110   __ lw(a1, FieldMemOperand(v0, FixedArray::kLengthOffset)); | 
| 1112   __ li(a0, Operand(Smi::FromInt(0))); | 1111   __ li(a0, Operand(Smi::FromInt(0))); | 
| 1113   __ Push(a1, a0);  // Fixed array length (as smi) and initial index. | 1112   __ Push(a1, a0);  // Fixed array length (as smi) and initial index. | 
| 1114 | 1113 | 
| 1115   // Generate code for doing the condition check. | 1114   // Generate code for doing the condition check. | 
| 1116   __ bind(&loop); | 1115   __ bind(&loop); | 
| 1117   SetExpressionAsStatementPosition(stmt->each()); | 1116   SetExpressionAsStatementPosition(stmt->each()); | 
| (...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3243   VisitForAccumulatorValue(args->at(0)); | 3242   VisitForAccumulatorValue(args->at(0)); | 
| 3244 | 3243 | 
| 3245   Label materialize_true, materialize_false; | 3244   Label materialize_true, materialize_false; | 
| 3246   Label* if_true = NULL; | 3245   Label* if_true = NULL; | 
| 3247   Label* if_false = NULL; | 3246   Label* if_false = NULL; | 
| 3248   Label* fall_through = NULL; | 3247   Label* fall_through = NULL; | 
| 3249   context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 3248   context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 
| 3250                          &if_false, &fall_through); | 3249                          &if_false, &fall_through); | 
| 3251 | 3250 | 
| 3252   __ JumpIfSmi(v0, if_false); | 3251   __ JumpIfSmi(v0, if_false); | 
| 3253   Register map = a1; | 3252   __ GetObjectType(v0, a1, a1); | 
| 3254   Register type_reg = a2; |  | 
| 3255   __ GetObjectType(v0, map, type_reg); |  | 
| 3256   __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |  | 
| 3257   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3253   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
| 3258   Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), | 3254   Split(eq, a1, Operand(JS_PROXY_TYPE), if_true, if_false, fall_through); | 
| 3259         if_true, if_false, fall_through); |  | 
| 3260 | 3255 | 
| 3261   context()->Plug(if_true, if_false); | 3256   context()->Plug(if_true, if_false); | 
| 3262 } | 3257 } | 
| 3263 | 3258 | 
| 3264 | 3259 | 
| 3265 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3260 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 
| 3266   ZoneList<Expression*>* args = expr->arguments(); | 3261   ZoneList<Expression*>* args = expr->arguments(); | 
| 3267   DCHECK(args->length() == 2); | 3262   DCHECK(args->length() == 2); | 
| 3268 | 3263 | 
| 3269   // Load the two objects into registers and perform the comparison. | 3264   // Load the two objects into registers and perform the comparison. | 
| (...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4924          reinterpret_cast<uint32_t>( | 4919          reinterpret_cast<uint32_t>( | 
| 4925              isolate->builtins()->OsrAfterStackCheck()->entry())); | 4920              isolate->builtins()->OsrAfterStackCheck()->entry())); | 
| 4926   return OSR_AFTER_STACK_CHECK; | 4921   return OSR_AFTER_STACK_CHECK; | 
| 4927 } | 4922 } | 
| 4928 | 4923 | 
| 4929 | 4924 | 
| 4930 }  // namespace internal | 4925 }  // namespace internal | 
| 4931 }  // namespace v8 | 4926 }  // namespace v8 | 
| 4932 | 4927 | 
| 4933 #endif  // V8_TARGET_ARCH_MIPS | 4928 #endif  // V8_TARGET_ARCH_MIPS | 
| OLD | NEW | 
|---|