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

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

Issue 10080015: Implement checked mode in new compiler. (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/intermediate_language.h ('k') | runtime/vm/stub_code_x64.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 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 } 1755 }
1756 1756
1757 1757
1758 // Check if an instance class is a subtype of class/interface using simple 1758 // Check if an instance class is a subtype of class/interface using simple
1759 // superchain and interface array traversal. Does not take type parameters into 1759 // superchain and interface array traversal. Does not take type parameters into
1760 // account. 1760 // account.
1761 // EAX: instance (preserved) 1761 // EAX: instance (preserved)
1762 // EDX: class/interface to test against (is class of instance a subtype of it). 1762 // EDX: class/interface to test against (is class of instance a subtype of it).
1763 // (preserved). 1763 // (preserved).
1764 // Result in EBX: 1 is subtype, 0 maybe not. 1764 // Result in EBX: 1 is subtype, 0 maybe not.
1765 // Destroys EBX, ECX. 1765 // Destroys EBX, EDI, ECX.
1766 void StubCode::GenerateIsRawSubTypeStub(Assembler* assembler) { 1766 void StubCode::GenerateIsRawSubTypeStub(Assembler* assembler) {
1767 const Immediate raw_null = 1767 const Immediate raw_null =
1768 Immediate(reinterpret_cast<intptr_t>(Object::null())); 1768 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1769 Label test_class, not_found, found, class_loaded_in_ECX, smi_value; 1769 Label test_class, not_found, found, class_loaded_in_ECX, smi_value;
1770 __ EnterFrame(0); 1770 __ EnterFrame(0);
1771 __ testl(EAX, Immediate(kSmiTagMask)); 1771 __ testl(EAX, Immediate(kSmiTagMask));
1772 __ j(ZERO, &smi_value, Assembler::kNearJump); 1772 __ j(ZERO, &smi_value, Assembler::kNearJump);
1773 __ movl(ECX, FieldAddress(EAX, Object::class_offset())); 1773 __ movl(ECX, FieldAddress(EAX, Object::class_offset()));
1774 __ jmp(&class_loaded_in_ECX, Assembler::kNearJump); 1774 __ jmp(&class_loaded_in_ECX, Assembler::kNearJump);
1775 __ Bind(&smi_value); 1775 __ Bind(&smi_value);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 __ movl(ECX, FieldAddress(ECX, Class::super_type_offset())); 1826 __ movl(ECX, FieldAddress(ECX, Class::super_type_offset()));
1827 // The supertype of Object is a null object. 1827 // The supertype of Object is a null object.
1828 __ cmpl(ECX, raw_null); 1828 __ cmpl(ECX, raw_null);
1829 __ j(EQUAL, &not_found, Assembler::kNearJump); 1829 __ j(EQUAL, &not_found, Assembler::kNearJump);
1830 __ movl(ECX, FieldAddress(ECX, Type::type_class_offset())); 1830 __ movl(ECX, FieldAddress(ECX, Type::type_class_offset()));
1831 __ cmpl(EDX, ECX); 1831 __ cmpl(EDX, ECX);
1832 __ j(NOT_EQUAL, &super_loop, Assembler::kNearJump); 1832 __ j(NOT_EQUAL, &super_loop, Assembler::kNearJump);
1833 __ jmp(&found, Assembler::kNearJump); 1833 __ jmp(&found, Assembler::kNearJump);
1834 } 1834 }
1835 1835
1836
1837 } // namespace dart 1836 } // namespace dart
1838 1837
1839 #endif // defined TARGET_ARCH_IA32 1838 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698