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

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

Issue 1584223006: Remove signature classes from the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
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 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 __ LoadObject(EAX, Bool::True()); 1673 __ LoadObject(EAX, Bool::True());
1674 __ ret(); 1674 __ ret();
1675 } 1675 }
1676 1676
1677 1677
1678 // Return type quickly for simple types (not parameterized and not signature). 1678 // Return type quickly for simple types (not parameterized and not signature).
1679 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) { 1679 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) {
1680 Label fall_through; 1680 Label fall_through;
1681 __ movl(EAX, Address(ESP, + 1 * kWordSize)); 1681 __ movl(EAX, Address(ESP, + 1 * kWordSize));
1682 __ LoadClassIdMayBeSmi(EDI, EAX); 1682 __ LoadClassIdMayBeSmi(EDI, EAX);
1683 __ cmpl(EDI, Immediate(kClosureCid));
1684 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Instance is a closure.
1683 __ LoadClassById(EBX, EDI); 1685 __ LoadClassById(EBX, EDI);
1684 // EBX: class of instance (EAX). 1686 // EBX: class of instance (EAX).
1685 const Immediate& raw_null =
1686 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1687 __ movl(EDI, FieldAddress(EBX, Class::signature_function_offset()));
1688 __ cmpl(EDI, raw_null);
1689 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
1690 1687
1691 __ movzxw(EDI, FieldAddress(EBX, Class::num_type_arguments_offset())); 1688 __ movzxw(EDI, FieldAddress(EBX, Class::num_type_arguments_offset()));
1692 __ cmpl(EDI, Immediate(0)); 1689 __ cmpl(EDI, Immediate(0));
1693 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); 1690 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
1694 __ movl(EAX, FieldAddress(EBX, Class::canonical_types_offset())); 1691 __ movl(EAX, FieldAddress(EBX, Class::canonical_types_offset()));
1695 __ cmpl(EAX, raw_null); 1692 __ CompareObject(EAX, Object::null_object());
1696 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set. 1693 __ j(EQUAL, &fall_through, Assembler::kNearJump); // Not yet set.
1697 __ ret(); 1694 __ ret();
1698 1695
1699 __ Bind(&fall_through); 1696 __ Bind(&fall_through);
1700 } 1697 }
1701 1698
1702 1699
1703 void Intrinsifier::String_getHashCode(Assembler* assembler) { 1700 void Intrinsifier::String_getHashCode(Assembler* assembler) {
1704 Label fall_through; 1701 Label fall_through;
1705 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object. 1702 __ movl(EAX, Address(ESP, + 1 * kWordSize)); // String object.
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2150 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2154 __ LoadIsolate(EAX); 2151 __ LoadIsolate(EAX);
2155 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); 2152 __ movl(EAX, Address(EAX, Isolate::current_tag_offset()));
2156 __ ret(); 2153 __ ret();
2157 } 2154 }
2158 2155
2159 #undef __ 2156 #undef __
2160 } // namespace dart 2157 } // namespace dart
2161 2158
2162 #endif // defined TARGET_ARCH_IA32 2159 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698