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

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 478653002: Fix bugs from my last CL in intrinsics code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Store the type argument field in the growable array object. 160 // Store the type argument field in the growable array object.
161 __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument. 161 __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument.
162 __ StoreIntoObjectNoBarrier( 162 __ StoreIntoObjectNoBarrier(
163 EAX, 163 EAX,
164 FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()), 164 FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()),
165 EBX); 165 EBX);
166 166
167 // Set the length field in the growable array object to 0. 167 // Set the length field in the growable array object to 0.
168 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), 168 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()),
169 Immediate(0)); 169 Immediate(0));
170 __ UpdateAllocationStats(kGrowableObjectArrayCid, EBX);
171 __ ret(); // returns the newly allocated object in EAX. 170 __ ret(); // returns the newly allocated object in EAX.
172 171
173 __ Bind(&fall_through); 172 __ Bind(&fall_through);
174 } 173 }
175 174
176 175
177 // Get length of growable object array. 176 // Get length of growable object array.
178 // On stack: growable array (+1), return-address (+0). 177 // On stack: growable array (+1), return-address (+0).
179 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { 178 void Intrinsifier::GrowableList_getLength(Assembler* assembler) {
180 __ movl(EAX, Address(ESP, + 1 * kWordSize)); 179 __ movl(EAX, Address(ESP, + 1 * kWordSize));
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 Isolate::current_tag_offset()); 1747 Isolate::current_tag_offset());
1749 // Set return value to Isolate::current_tag_. 1748 // Set return value to Isolate::current_tag_.
1750 __ movl(EAX, current_tag_addr); 1749 __ movl(EAX, current_tag_addr);
1751 __ ret(); 1750 __ ret();
1752 } 1751 }
1753 1752
1754 #undef __ 1753 #undef __
1755 } // namespace dart 1754 } // namespace dart
1756 1755
1757 #endif // defined TARGET_ARCH_IA32 1756 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698