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

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

Issue 11000025: Revert hiding of VM-only coreimpl list implementation types. While I (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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.cc ('k') | runtime/vm/intrinsifier_x64.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return false; 167 return false;
168 } 168 }
169 169
170 170
171 bool Intrinsifier::ImmutableArray_getIndexed(Assembler* assembler) { 171 bool Intrinsifier::ImmutableArray_getIndexed(Assembler* assembler) {
172 return Array_getIndexed(assembler); 172 return Array_getIndexed(assembler);
173 } 173 }
174 174
175 175
176 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { 176 static intptr_t ComputeObjectArrayTypeArgumentsOffset() {
177 const String& class_name = String::Handle(Symbols::New("_ObjectArray")); 177 const String& class_name = String::Handle(Symbols::New("ObjectArray"));
178 const Library& coreimpl_lib = Library::Handle(Library::CoreImplLibrary()); 178 const Class& cls = Class::Handle(
179 const Class& cls = 179 Library::Handle(Library::CoreImplLibrary()).LookupClass(class_name));
180 Class::Handle(coreimpl_lib.LookupClassAllowPrivate(class_name));
181 ASSERT(!cls.IsNull()); 180 ASSERT(!cls.IsNull());
182 ASSERT(cls.HasTypeArguments()); 181 ASSERT(cls.HasTypeArguments());
183 ASSERT(cls.NumTypeArguments() == 1); 182 ASSERT(cls.NumTypeArguments() == 1);
184 const intptr_t field_offset = cls.type_arguments_instance_field_offset(); 183 const intptr_t field_offset = cls.type_arguments_instance_field_offset();
185 ASSERT(field_offset != Class::kNoTypeArguments); 184 ASSERT(field_offset != Class::kNoTypeArguments);
186 return field_offset; 185 return field_offset;
187 } 186 }
188 187
189 188
190 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 189 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 __ ret(); 244 __ ret();
246 __ Bind(&fall_through); 245 __ Bind(&fall_through);
247 return false; 246 return false;
248 } 247 }
249 248
250 249
251 static intptr_t GetOffsetForField(const char* class_name_p, 250 static intptr_t GetOffsetForField(const char* class_name_p,
252 const char* field_name_p) { 251 const char* field_name_p) {
253 const String& class_name = String::Handle(Symbols::New(class_name_p)); 252 const String& class_name = String::Handle(Symbols::New(class_name_p));
254 const String& field_name = String::Handle(Symbols::New(field_name_p)); 253 const String& field_name = String::Handle(Symbols::New(field_name_p));
255 const Library& coreimpl_lib = Library::Handle(Library::CoreImplLibrary()); 254 const Class& cls = Class::Handle(Library::Handle(
256 const Class& cls = 255 Library::CoreImplLibrary()).LookupClass(class_name));
257 Class::Handle(coreimpl_lib.LookupClassAllowPrivate(class_name));
258 ASSERT(!cls.IsNull()); 256 ASSERT(!cls.IsNull());
259 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); 257 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name));
260 ASSERT(!field.IsNull()); 258 ASSERT(!field.IsNull());
261 return field.Offset(); 259 return field.Offset();
262 } 260 }
263 261
264 262
265 // Allocate a GrowableObjectArray using the backing array specified. 263 // Allocate a GrowableObjectArray using the backing array specified.
266 // On stack: type argument (+2), data (+1), return-address (+0). 264 // On stack: type argument (+2), data (+1), return-address (+0).
267 bool Intrinsifier::GArray_Allocate(Assembler* assembler) { 265 bool Intrinsifier::GArray_Allocate(Assembler* assembler) {
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 __ j(EQUAL, &is_true, Assembler::kNearJump); 1283 __ j(EQUAL, &is_true, Assembler::kNearJump);
1286 __ LoadObject(EAX, bool_false); 1284 __ LoadObject(EAX, bool_false);
1287 __ ret(); 1285 __ ret();
1288 __ Bind(&is_true); 1286 __ Bind(&is_true);
1289 __ LoadObject(EAX, bool_true); 1287 __ LoadObject(EAX, bool_true);
1290 __ ret(); 1288 __ ret();
1291 return true; 1289 return true;
1292 } 1290 }
1293 1291
1294 1292
1295 static const char* kFixedSizeArrayIteratorClassName = "_FixedSizeArrayIterator"; 1293 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator";
1296 1294
1297 1295
1298 // Class 'FixedSizeArrayIterator': 1296 // Class 'FixedSizeArrayIterator':
1299 // T next() { 1297 // T next() {
1300 // return _array[_pos++]; 1298 // return _array[_pos++];
1301 // } 1299 // }
1302 // Intrinsify: return _array[_pos++]; 1300 // Intrinsify: return _array[_pos++];
1303 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator 1301 // TODO(srdjan): Throw a 'NoMoreElementsException' exception if the iterator
1304 // has no more elements. 1302 // has no more elements.
1305 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) { 1303 bool Intrinsifier::FixedSizeArrayIterator_next(Assembler* assembler) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 __ Bind(&is_true); 1428 __ Bind(&is_true);
1431 __ LoadObject(EAX, bool_true); 1429 __ LoadObject(EAX, bool_true);
1432 __ ret(); 1430 __ ret();
1433 return true; 1431 return true;
1434 } 1432 }
1435 1433
1436 #undef __ 1434 #undef __
1437 } // namespace dart 1435 } // namespace dart
1438 1436
1439 #endif // defined TARGET_ARCH_IA32 1437 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698