| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 __ bind(&fixed_array); | 1077 __ bind(&fixed_array); |
| 1078 | 1078 |
| 1079 __ EmitLoadTypeFeedbackVector(r4); | 1079 __ EmitLoadTypeFeedbackVector(r4); |
| 1080 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1080 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
| 1081 int vector_index = SmiFromSlot(slot)->value(); | 1081 int vector_index = SmiFromSlot(slot)->value(); |
| 1082 __ StoreP( | 1082 __ StoreP( |
| 1083 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0); | 1083 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0); |
| 1084 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi(1) indicates slow check | 1084 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi(1) indicates slow check |
| 1085 __ Push(r4, r3); // Smi and array | 1085 __ Push(r4, r3); // Smi and array |
| 1086 __ LoadP(r4, FieldMemOperand(r3, FixedArray::kLengthOffset)); | 1086 __ LoadP(r4, FieldMemOperand(r3, FixedArray::kLengthOffset)); |
| 1087 __ Push(r4); // Fixed array length (as smi). |
| 1088 PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS); |
| 1087 __ LoadSmiLiteral(r3, Smi::FromInt(0)); | 1089 __ LoadSmiLiteral(r3, Smi::FromInt(0)); |
| 1088 __ Push(r4, r3); // Fixed array length (as smi) and initial index. | 1090 __ Push(r3); // Initial index. |
| 1089 | 1091 |
| 1090 // Generate code for doing the condition check. | 1092 // Generate code for doing the condition check. |
| 1091 __ bind(&loop); | 1093 __ bind(&loop); |
| 1092 SetExpressionAsStatementPosition(stmt->each()); | 1094 SetExpressionAsStatementPosition(stmt->each()); |
| 1093 | 1095 |
| 1094 // Load the current count to r3, load the length to r4. | 1096 // Load the current count to r3, load the length to r4. |
| 1095 __ LoadP(r3, MemOperand(sp, 0 * kPointerSize)); | 1097 __ LoadP(r3, MemOperand(sp, 0 * kPointerSize)); |
| 1096 __ LoadP(r4, MemOperand(sp, 1 * kPointerSize)); | 1098 __ LoadP(r4, MemOperand(sp, 1 * kPointerSize)); |
| 1097 __ cmpl(r3, r4); // Compare to the array length. | 1099 __ cmpl(r3, r4); // Compare to the array length. |
| 1098 __ bge(loop_statement.break_label()); | 1100 __ bge(loop_statement.break_label()); |
| (...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4787 return ON_STACK_REPLACEMENT; | 4789 return ON_STACK_REPLACEMENT; |
| 4788 } | 4790 } |
| 4789 | 4791 |
| 4790 DCHECK(interrupt_address == | 4792 DCHECK(interrupt_address == |
| 4791 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4793 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4792 return OSR_AFTER_STACK_CHECK; | 4794 return OSR_AFTER_STACK_CHECK; |
| 4793 } | 4795 } |
| 4794 } // namespace internal | 4796 } // namespace internal |
| 4795 } // namespace v8 | 4797 } // namespace v8 |
| 4796 #endif // V8_TARGET_ARCH_PPC | 4798 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |