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

Side by Side Diff: runtime/vm/stub_code_arm64.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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 // Used to check class and type arguments. Arguments passed in registers: 1858 // Used to check class and type arguments. Arguments passed in registers:
1859 // LR: return address. 1859 // LR: return address.
1860 // R0: instance (must be preserved). 1860 // R0: instance (must be preserved).
1861 // R1: instantiator type arguments or NULL. 1861 // R1: instantiator type arguments or NULL.
1862 // R2: cache array. 1862 // R2: cache array.
1863 // Result in R1: null -> not found, otherwise result (true or false). 1863 // Result in R1: null -> not found, otherwise result (true or false).
1864 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { 1864 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
1865 ASSERT((1 <= n) && (n <= 3)); 1865 ASSERT((1 <= n) && (n <= 3));
1866 if (n > 1) { 1866 if (n > 1) {
1867 // Get instance type arguments. 1867 // Get instance type arguments.
1868 __ LoadClass(R3, R0, kNoPP); 1868 __ LoadClass(R3, R0, Isolate::Current(), kNoPP);
1869 // Compute instance type arguments into R4. 1869 // Compute instance type arguments into R4.
1870 Label has_no_type_arguments; 1870 Label has_no_type_arguments;
1871 __ LoadObject(R4, Object::null_object(), PP); 1871 __ LoadObject(R4, Object::null_object(), PP);
1872 __ LoadFieldFromOffset(R5, R3, 1872 __ LoadFieldFromOffset(R5, R3,
1873 Class::type_arguments_field_offset_in_words_offset(), kNoPP, kWord); 1873 Class::type_arguments_field_offset_in_words_offset(), kNoPP, kWord);
1874 __ CompareImmediate(R5, Class::kNoTypeArguments, kNoPP); 1874 __ CompareImmediate(R5, Class::kNoTypeArguments, kNoPP);
1875 __ b(&has_no_type_arguments, EQ); 1875 __ b(&has_no_type_arguments, EQ);
1876 __ add(R5, R0, Operand(R5, LSL, 3)); 1876 __ add(R5, R0, Operand(R5, LSL, 3));
1877 __ LoadFieldFromOffset(R4, R5, 0, kNoPP); 1877 __ LoadFieldFromOffset(R4, R5, 0, kNoPP);
1878 __ Bind(&has_no_type_arguments); 1878 __ Bind(&has_no_type_arguments);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 const Register right = R0; 2124 const Register right = R0;
2125 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); 2125 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP);
2126 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); 2126 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP);
2127 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 2127 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
2128 __ ret(); 2128 __ ret();
2129 } 2129 }
2130 2130
2131 } // namespace dart 2131 } // namespace dart
2132 2132
2133 #endif // defined TARGET_ARCH_ARM64 2133 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698