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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 // No need for a write barrier, we are storing a Smi in the feedback vector. | 1070 // No need for a write barrier, we are storing a Smi in the feedback vector. |
1071 __ EmitLoadTypeFeedbackVector(rbx); | 1071 __ EmitLoadTypeFeedbackVector(rbx); |
1072 int vector_index = SmiFromSlot(slot)->value(); | 1072 int vector_index = SmiFromSlot(slot)->value(); |
1073 __ Move(FieldOperand(rbx, FixedArray::OffsetOfElementAt(vector_index)), | 1073 __ Move(FieldOperand(rbx, FixedArray::OffsetOfElementAt(vector_index)), |
1074 TypeFeedbackVector::MegamorphicSentinel(isolate())); | 1074 TypeFeedbackVector::MegamorphicSentinel(isolate())); |
1075 __ movp(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object | 1075 __ movp(rcx, Operand(rsp, 0 * kPointerSize)); // Get enumerated object |
1076 __ Push(Smi::FromInt(1)); // Smi(1) indicates slow check | 1076 __ Push(Smi::FromInt(1)); // Smi(1) indicates slow check |
1077 __ Push(rax); // Array | 1077 __ Push(rax); // Array |
1078 __ movp(rax, FieldOperand(rax, FixedArray::kLengthOffset)); | 1078 __ movp(rax, FieldOperand(rax, FixedArray::kLengthOffset)); |
1079 __ Push(rax); // Fixed array length (as smi). | 1079 __ Push(rax); // Fixed array length (as smi). |
| 1080 PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS); |
1080 __ Push(Smi::FromInt(0)); // Initial index. | 1081 __ Push(Smi::FromInt(0)); // Initial index. |
1081 | 1082 |
1082 // Generate code for doing the condition check. | 1083 // Generate code for doing the condition check. |
1083 __ bind(&loop); | 1084 __ bind(&loop); |
1084 SetExpressionAsStatementPosition(stmt->each()); | 1085 SetExpressionAsStatementPosition(stmt->each()); |
1085 | 1086 |
1086 __ movp(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index. | 1087 __ movp(rax, Operand(rsp, 0 * kPointerSize)); // Get the current index. |
1087 __ cmpp(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length. | 1088 __ cmpp(rax, Operand(rsp, 1 * kPointerSize)); // Compare to the array length. |
1088 __ j(above_equal, loop_statement.break_label()); | 1089 __ j(above_equal, loop_statement.break_label()); |
1089 | 1090 |
(...skipping 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4719 Assembler::target_address_at(call_target_address, | 4720 Assembler::target_address_at(call_target_address, |
4720 unoptimized_code)); | 4721 unoptimized_code)); |
4721 return OSR_AFTER_STACK_CHECK; | 4722 return OSR_AFTER_STACK_CHECK; |
4722 } | 4723 } |
4723 | 4724 |
4724 | 4725 |
4725 } // namespace internal | 4726 } // namespace internal |
4726 } // namespace v8 | 4727 } // namespace v8 |
4727 | 4728 |
4728 #endif // V8_TARGET_ARCH_X64 | 4729 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |