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

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

Issue 9854030: Improve checked mode a little (more to come in a different CL). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/code_generator_ia32.cc ('k') | runtime/vm/object.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return false; 213 return false;
214 } 214 }
215 215
216 216
217 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 217 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
218 // update. Array length is always a Smi. 218 // update. Array length is always a Smi.
219 static bool Array_setIndexed(Assembler* assembler) { 219 static bool Array_setIndexed(Assembler* assembler) {
220 if (FLAG_enable_type_checks) { 220 if (FLAG_enable_type_checks) {
221 return false; 221 return false;
222 } 222 }
223 const Immediate raw_null =
224 Immediate(reinterpret_cast<intptr_t>(Object::null()));
225 Label fall_through; 223 Label fall_through;
226 __ movl(EBX, Address(ESP, + 2 * kWordSize)); // Index. 224 __ movl(EBX, Address(ESP, + 2 * kWordSize)); // Index.
227 __ testl(EBX, Immediate(kSmiTagMask)); 225 __ testl(EBX, Immediate(kSmiTagMask));
228 // Index not Smi. 226 // Index not Smi.
229 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); 227 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump);
230 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array. 228 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array.
231 // Range check. 229 // Range check.
232 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset())); 230 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset()));
233 // Runtime throws exception. 231 // Runtime throws exception.
234 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump); 232 __ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } \ 1244 } \
1247 1245
1248 INTRINSIC_LIST(FIND_INTRINSICS); 1246 INTRINSIC_LIST(FIND_INTRINSICS);
1249 #undef FIND_INTRINSICS 1247 #undef FIND_INTRINSICS
1250 return false; 1248 return false;
1251 } 1249 }
1252 1250
1253 } // namespace dart 1251 } // namespace dart
1254 1252
1255 #endif // defined TARGET_ARCH_IA32 1253 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698