OLD | NEW |
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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 __ movl(EAX, Address(ESP, + 1 * kWordSize)); | 1690 __ movl(EAX, Address(ESP, + 1 * kWordSize)); |
1691 __ LoadClassIdMayBeSmi(EDI, EAX); | 1691 __ LoadClassIdMayBeSmi(EDI, EAX); |
1692 __ cmpl(EDI, Immediate(kClosureCid)); | 1692 __ cmpl(EDI, Immediate(kClosureCid)); |
1693 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. | 1693 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure. |
1694 __ LoadClassById(EBX, EDI); | 1694 __ LoadClassById(EBX, EDI); |
1695 // EBX: class of instance (EAX). | 1695 // EBX: class of instance (EAX). |
1696 | 1696 |
1697 __ movzxw(EDI, FieldAddress(EBX, Class::num_type_arguments_offset())); | 1697 __ movzxw(EDI, FieldAddress(EBX, Class::num_type_arguments_offset())); |
1698 __ cmpl(EDI, Immediate(0)); | 1698 __ cmpl(EDI, Immediate(0)); |
1699 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 1699 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
1700 __ movl(EAX, FieldAddress(EBX, Class::canonical_types_offset())); | 1700 __ movl(EAX, FieldAddress(EBX, Class::canonical_type_offset())); |
1701 __ CompareObject(EAX, Object::null_object()); | 1701 __ CompareObject(EAX, Object::null_object()); |
1702 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. | 1702 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. |
1703 __ ret(); | 1703 __ ret(); |
1704 | 1704 |
1705 __ Bind(&fall_through); | 1705 __ Bind(&fall_through); |
1706 } | 1706 } |
1707 | 1707 |
1708 | 1708 |
1709 void Intrinsifier::String_getHashCode(Assembler* assembler) { | 1709 void Intrinsifier::String_getHashCode(Assembler* assembler) { |
1710 Label fall_through; | 1710 Label fall_through; |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2128 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2129 __ LoadIsolate(EAX); | 2129 __ LoadIsolate(EAX); |
2130 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2130 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
2131 __ ret(); | 2131 __ ret(); |
2132 } | 2132 } |
2133 | 2133 |
2134 #undef __ | 2134 #undef __ |
2135 } // namespace dart | 2135 } // namespace dart |
2136 | 2136 |
2137 #endif // defined TARGET_ARCH_IA32 | 2137 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |