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

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

Issue 685003002: Add missing StoreIntoObject calls in generated code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 Label fall_through; 237 Label fall_through;
238 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Array. 238 __ movl(EAX, Address(ESP, + 2 * kWordSize)); // Array.
239 __ movl(EBX, FieldAddress(EAX, GrowableObjectArray::length_offset())); 239 __ movl(EBX, FieldAddress(EAX, GrowableObjectArray::length_offset()));
240 // EBX: length. 240 // EBX: length.
241 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset())); 241 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset()));
242 // EDI: data. 242 // EDI: data.
243 // Compare length with capacity. 243 // Compare length with capacity.
244 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset())); 244 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset()));
245 __ j(EQUAL, &fall_through); // Must grow data. 245 __ j(EQUAL, &fall_through); // Must grow data.
246 const Immediate& value_one = 246 __ IncrementSmiField(FieldAddress(EAX, GrowableObjectArray::length_offset()),
247 Immediate(reinterpret_cast<int32_t>(Smi::New(1))); 247 1);
248 // len = len + 1;
249 __ addl(FieldAddress(EAX, GrowableObjectArray::length_offset()), value_one);
250 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Value 248 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // Value
251 ASSERT(kSmiTagShift == 1); 249 ASSERT(kSmiTagShift == 1);
252 __ StoreIntoObject(EDI, 250 __ StoreIntoObject(EDI,
253 FieldAddress(EDI, EBX, TIMES_2, Array::data_offset()), 251 FieldAddress(EDI, EBX, TIMES_2, Array::data_offset()),
254 EAX); 252 EAX);
255 const Immediate& raw_null = 253 const Immediate& raw_null =
256 Immediate(reinterpret_cast<int32_t>(Object::null())); 254 Immediate(reinterpret_cast<int32_t>(Object::null()));
257 __ movl(EAX, raw_null); 255 __ movl(EAX, raw_null);
258 __ ret(); 256 __ ret();
259 __ Bind(&fall_through); 257 __ Bind(&fall_through);
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 Isolate::current_tag_offset()); 2091 Isolate::current_tag_offset());
2094 // Set return value to Isolate::current_tag_. 2092 // Set return value to Isolate::current_tag_.
2095 __ movl(EAX, current_tag_addr); 2093 __ movl(EAX, current_tag_addr);
2096 __ ret(); 2094 __ ret();
2097 } 2095 }
2098 2096
2099 #undef __ 2097 #undef __
2100 } // namespace dart 2098 } // namespace dart
2101 2099
2102 #endif // defined TARGET_ARCH_IA32 2100 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698