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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | 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_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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698