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

Side by Side Diff: vm/stub_code_ia32.cc

Issue 11421117: Fix for issue 6359 - Make snapshots platform independent. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/snapshot.cc ('k') | 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) 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 #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/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/assembler_macros.h" 9 #include "vm/assembler_macros.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 const Immediate raw_null = 1874 const Immediate raw_null =
1875 Immediate(reinterpret_cast<intptr_t>(Object::null())); 1875 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1876 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes)); 1876 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes));
1877 if (n > 1) { 1877 if (n > 1) {
1878 // Get instance type arguments. 1878 // Get instance type arguments.
1879 __ LoadClass(ECX, EAX, EBX); 1879 __ LoadClass(ECX, EAX, EBX);
1880 // Compute instance type arguments into EBX. 1880 // Compute instance type arguments into EBX.
1881 Label has_no_type_arguments; 1881 Label has_no_type_arguments;
1882 __ movl(EBX, raw_null); 1882 __ movl(EBX, raw_null);
1883 __ movl(EDI, FieldAddress(ECX, 1883 __ movl(EDI, FieldAddress(ECX,
1884 Class::type_arguments_field_offset_offset())); 1884 Class::type_arguments_field_offset_in_words_offset()));
1885 __ cmpl(EDI, Immediate(Class::kNoTypeArguments)); 1885 __ cmpl(EDI, Immediate(Class::kNoTypeArguments));
1886 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); 1886 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump);
1887 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_1, 0)); 1887 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_4, 0));
1888 __ Bind(&has_no_type_arguments); 1888 __ Bind(&has_no_type_arguments);
1889 } 1889 }
1890 __ LoadClassId(ECX, EAX); 1890 __ LoadClassId(ECX, EAX);
1891 // EAX: instance, ECX: instance class id. 1891 // EAX: instance, ECX: instance class id.
1892 // EBX: instance type arguments (null if none), used only if n > 1. 1892 // EBX: instance type arguments (null if none), used only if n > 1.
1893 __ movl(EDX, Address(ESP, kCacheOffsetInBytes)); 1893 __ movl(EDX, Address(ESP, kCacheOffsetInBytes));
1894 // EDX: SubtypeTestCache. 1894 // EDX: SubtypeTestCache.
1895 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset())); 1895 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset()));
1896 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag)); 1896 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag));
1897 1897
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 __ Bind(&done); 2212 __ Bind(&done);
2213 __ popl(temp); 2213 __ popl(temp);
2214 __ popl(right); 2214 __ popl(right);
2215 __ popl(left); 2215 __ popl(left);
2216 __ ret(); 2216 __ ret();
2217 } 2217 }
2218 2218
2219 } // namespace dart 2219 } // namespace dart
2220 2220
2221 #endif // defined TARGET_ARCH_IA32 2221 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « vm/snapshot.cc ('k') | vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698