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

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

Issue 11125005: Support for type dynamic in VM (Closed) Base URL: http://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/intermediate_language_x64.cc ('k') | runtime/vm/isolate.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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 __ movl(EDI, Address(ESP, + 1 * kWordSize)); // Value. 201 __ movl(EDI, Address(ESP, + 1 * kWordSize)); // Value.
202 // Null value is valid for any type. 202 // Null value is valid for any type.
203 __ cmpl(EDI, raw_null); 203 __ cmpl(EDI, raw_null);
204 __ j(EQUAL, &checked_ok, Assembler::kNearJump); 204 __ j(EQUAL, &checked_ok, Assembler::kNearJump);
205 205
206 __ movl(EBX, Address(ESP, + 3 * kWordSize)); // Array. 206 __ movl(EBX, Address(ESP, + 3 * kWordSize)); // Array.
207 __ movl(EBX, FieldAddress(EBX, type_args_field_offset)); 207 __ movl(EBX, FieldAddress(EBX, type_args_field_offset));
208 // EBX: Type arguments of array. 208 // EBX: Type arguments of array.
209 __ cmpl(EBX, raw_null); 209 __ cmpl(EBX, raw_null);
210 __ j(EQUAL, &checked_ok, Assembler::kNearJump); 210 __ j(EQUAL, &checked_ok, Assembler::kNearJump);
211 // Check if it's Dynamic. 211 // Check if it's dynamic.
212 // For now handle only TypeArguments and bail out if InstantiatedTypeArgs. 212 // For now handle only TypeArguments and bail out if InstantiatedTypeArgs.
213 __ CompareClassId(EBX, kTypeArgumentsCid, EAX); 213 __ CompareClassId(EBX, kTypeArgumentsCid, EAX);
214 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); 214 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
215 // Get type at index 0. 215 // Get type at index 0.
216 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0))); 216 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0)));
217 __ CompareObject(EAX, Type::ZoneHandle(Type::DynamicType())); 217 __ CompareObject(EAX, Type::ZoneHandle(Type::DynamicType()));
218 __ j(EQUAL, &checked_ok, Assembler::kNearJump); 218 __ j(EQUAL, &checked_ok, Assembler::kNearJump);
219 // Check for int and num. 219 // Check for int and num.
220 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi? 220 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi?
221 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value. 221 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value.
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 __ Bind(&is_true); 1546 __ Bind(&is_true);
1547 __ LoadObject(EAX, bool_true); 1547 __ LoadObject(EAX, bool_true);
1548 __ ret(); 1548 __ ret();
1549 return true; 1549 return true;
1550 } 1550 }
1551 1551
1552 #undef __ 1552 #undef __
1553 } // namespace dart 1553 } // namespace dart
1554 1554
1555 #endif // defined TARGET_ARCH_IA32 1555 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698