| OLD | NEW |
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 205 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
| 206 // Get type at index 0. | 206 // Get type at index 0. |
| 207 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0))); | 207 __ movl(EAX, FieldAddress(EBX, TypeArguments::type_at_offset(0))); |
| 208 __ CompareObject(EAX, Type::ZoneHandle(Type::DynamicType())); | 208 __ CompareObject(EAX, Type::ZoneHandle(Type::DynamicType())); |
| 209 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 209 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 210 // Check for int and num. | 210 // Check for int and num. |
| 211 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi? | 211 __ testl(EDI, Immediate(kSmiTagMask)); // Value is Smi? |
| 212 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value. | 212 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); // Non-smi value. |
| 213 __ CompareObject(EAX, Type::ZoneHandle(Type::IntInterface())); | 213 __ CompareObject(EAX, Type::ZoneHandle(Type::IntInterface())); |
| 214 __ j(EQUAL, &checked_ok, Assembler::kNearJump); | 214 __ j(EQUAL, &checked_ok, Assembler::kNearJump); |
| 215 __ CompareObject(EAX, Type::ZoneHandle(Type::NumberInterface())); | 215 __ CompareObject(EAX, Type::ZoneHandle(Type::Number())); |
| 216 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 216 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
| 217 __ Bind(&checked_ok); | 217 __ Bind(&checked_ok); |
| 218 } | 218 } |
| 219 __ movl(EBX, Address(ESP, + 2 * kWordSize)); // Index. | 219 __ movl(EBX, Address(ESP, + 2 * kWordSize)); // Index. |
| 220 __ testl(EBX, Immediate(kSmiTagMask)); | 220 __ testl(EBX, Immediate(kSmiTagMask)); |
| 221 // Index not Smi. | 221 // Index not Smi. |
| 222 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); | 222 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); |
| 223 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array. | 223 __ movl(EAX, Address(ESP, + 3 * kWordSize)); // Array. |
| 224 // Range check. | 224 // Range check. |
| 225 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset())); | 225 __ cmpl(EBX, FieldAddress(EAX, Array::length_offset())); |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 __ Bind(&is_true); | 1364 __ Bind(&is_true); |
| 1365 __ LoadObject(EAX, bool_true); | 1365 __ LoadObject(EAX, bool_true); |
| 1366 __ ret(); | 1366 __ ret(); |
| 1367 return true; | 1367 return true; |
| 1368 } | 1368 } |
| 1369 | 1369 |
| 1370 #undef __ | 1370 #undef __ |
| 1371 } // namespace dart | 1371 } // namespace dart |
| 1372 | 1372 |
| 1373 #endif // defined TARGET_ARCH_IA32 | 1373 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |