| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 __ jmp(&exit); | 1018 __ jmp(&exit); |
| 1019 | 1019 |
| 1020 // We got a fixed array in register eax. Iterate through that. | 1020 // We got a fixed array in register eax. Iterate through that. |
| 1021 __ bind(&fixed_array); | 1021 __ bind(&fixed_array); |
| 1022 | 1022 |
| 1023 // No need for a write barrier, we are storing a Smi in the feedback vector. | 1023 // No need for a write barrier, we are storing a Smi in the feedback vector. |
| 1024 __ EmitLoadTypeFeedbackVector(ebx); | 1024 __ EmitLoadTypeFeedbackVector(ebx); |
| 1025 int vector_index = SmiFromSlot(slot)->value(); | 1025 int vector_index = SmiFromSlot(slot)->value(); |
| 1026 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)), | 1026 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)), |
| 1027 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1027 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
| 1028 __ push(Immeadiate(Smi::FromInt(1))); // Smi(1) undicates slow check | 1028 __ push(Immediate(Smi::FromInt(1))); // Smi(1) undicates slow check |
| 1029 __ push(eax); // Array | 1029 __ push(eax); // Array |
| 1030 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); | 1030 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); |
| 1031 __ push(eax); // Fixed array length (as smi). | 1031 __ push(eax); // Fixed array length (as smi). |
| 1032 __ push(Immediate(Smi::FromInt(0))); // Initial index. | 1032 __ push(Immediate(Smi::FromInt(0))); // Initial index. |
| 1033 | 1033 |
| 1034 // Generate code for doing the condition check. | 1034 // Generate code for doing the condition check. |
| 1035 __ bind(&loop); | 1035 __ bind(&loop); |
| 1036 SetExpressionAsStatementPosition(stmt->each()); | 1036 SetExpressionAsStatementPosition(stmt->each()); |
| 1037 | 1037 |
| 1038 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. | 1038 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. |
| (...skipping 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4758 Assembler::target_address_at(call_target_address, | 4758 Assembler::target_address_at(call_target_address, |
| 4759 unoptimized_code)); | 4759 unoptimized_code)); |
| 4760 return OSR_AFTER_STACK_CHECK; | 4760 return OSR_AFTER_STACK_CHECK; |
| 4761 } | 4761 } |
| 4762 | 4762 |
| 4763 | 4763 |
| 4764 } // namespace internal | 4764 } // namespace internal |
| 4765 } // namespace v8 | 4765 } // namespace v8 |
| 4766 | 4766 |
| 4767 #endif // V8_TARGET_ARCH_X87 | 4767 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |