Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 1630523002: [turbofan] Switch JSForInPrepare to %ForInPrepare style. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1040
1041 // No need for a write barrier, we are storing a Smi in the feedback vector. 1041 // No need for a write barrier, we are storing a Smi in the feedback vector.
1042 __ EmitLoadTypeFeedbackVector(ebx); 1042 __ EmitLoadTypeFeedbackVector(ebx);
1043 int vector_index = SmiFromSlot(slot)->value(); 1043 int vector_index = SmiFromSlot(slot)->value();
1044 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)), 1044 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)),
1045 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1045 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1046 __ push(Immediate(Smi::FromInt(1))); // Smi(1) undicates slow check 1046 __ push(Immediate(Smi::FromInt(1))); // Smi(1) undicates slow check
1047 __ push(eax); // Array 1047 __ push(eax); // Array
1048 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset)); 1048 __ mov(eax, FieldOperand(eax, FixedArray::kLengthOffset));
1049 __ push(eax); // Fixed array length (as smi). 1049 __ push(eax); // Fixed array length (as smi).
1050 PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS);
1050 __ push(Immediate(Smi::FromInt(0))); // Initial index. 1051 __ push(Immediate(Smi::FromInt(0))); // Initial index.
1051 1052
1052 // Generate code for doing the condition check. 1053 // Generate code for doing the condition check.
1053 __ bind(&loop); 1054 __ bind(&loop);
1054 SetExpressionAsStatementPosition(stmt->each()); 1055 SetExpressionAsStatementPosition(stmt->each());
1055 1056
1056 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index. 1057 __ mov(eax, Operand(esp, 0 * kPointerSize)); // Get the current index.
1057 __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length. 1058 __ cmp(eax, Operand(esp, 1 * kPointerSize)); // Compare to the array length.
1058 __ j(above_equal, loop_statement.break_label()); 1059 __ j(above_equal, loop_statement.break_label());
1059 1060
(...skipping 3670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4730 Assembler::target_address_at(call_target_address, 4731 Assembler::target_address_at(call_target_address,
4731 unoptimized_code)); 4732 unoptimized_code));
4732 return OSR_AFTER_STACK_CHECK; 4733 return OSR_AFTER_STACK_CHECK;
4733 } 4734 }
4734 4735
4735 4736
4736 } // namespace internal 4737 } // namespace internal
4737 } // namespace v8 4738 } // namespace v8
4738 4739
4739 #endif // V8_TARGET_ARCH_X87 4740 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698