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

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

Issue 605533003: Make subtype test stubs isolate-specific. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
« runtime/vm/isolate.h ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | 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) 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 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1776 // TOS + 3: SubtypeTestCache. 1776 // TOS + 3: SubtypeTestCache.
1777 // Result in RCX: null -> not found, otherwise result (true or false). 1777 // Result in RCX: null -> not found, otherwise result (true or false).
1778 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { 1778 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
1779 ASSERT((1 <= n) && (n <= 3)); 1779 ASSERT((1 <= n) && (n <= 3));
1780 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; 1780 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize;
1781 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; 1781 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize;
1782 const intptr_t kCacheOffsetInBytes = 3 * kWordSize; 1782 const intptr_t kCacheOffsetInBytes = 3 * kWordSize;
1783 __ movq(RAX, Address(RSP, kInstanceOffsetInBytes)); 1783 __ movq(RAX, Address(RSP, kInstanceOffsetInBytes));
1784 __ LoadObject(R12, Object::null_object(), PP); 1784 __ LoadObject(R12, Object::null_object(), PP);
1785 if (n > 1) { 1785 if (n > 1) {
1786 __ LoadClass(R10, RAX); 1786 __ LoadClass(R10, RAX, Isolate::Current(), kNoRegister);
1787 // Compute instance type arguments into R13. 1787 // Compute instance type arguments into R13.
1788 Label has_no_type_arguments; 1788 Label has_no_type_arguments;
1789 __ movq(R13, R12); 1789 __ movq(R13, R12);
1790 __ movl(RDI, FieldAddress(R10, 1790 __ movl(RDI, FieldAddress(R10,
1791 Class::type_arguments_field_offset_in_words_offset())); 1791 Class::type_arguments_field_offset_in_words_offset()));
1792 __ cmpl(RDI, Immediate(Class::kNoTypeArguments)); 1792 __ cmpl(RDI, Immediate(Class::kNoTypeArguments));
1793 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); 1793 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump);
1794 __ movq(R13, FieldAddress(RAX, RDI, TIMES_8, 0)); 1794 __ movq(R13, FieldAddress(RAX, RDI, TIMES_8, 0));
1795 __ Bind(&has_no_type_arguments); 1795 __ Bind(&has_no_type_arguments);
1796 } 1796 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 2055
2056 __ movq(left, Address(RSP, 2 * kWordSize)); 2056 __ movq(left, Address(RSP, 2 * kWordSize));
2057 __ movq(right, Address(RSP, 1 * kWordSize)); 2057 __ movq(right, Address(RSP, 1 * kWordSize));
2058 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 2058 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
2059 __ ret(); 2059 __ ret();
2060 } 2060 }
2061 2061
2062 } // namespace dart 2062 } // namespace dart
2063 2063
2064 #endif // defined TARGET_ARCH_X64 2064 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/isolate.h ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698