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

Side by Side Diff: runtime/vm/stub_code_mips.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) 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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 // RA: return address. 1962 // RA: return address.
1963 // A0: instance (must be preserved). 1963 // A0: instance (must be preserved).
1964 // A1: instantiator type arguments or NULL. 1964 // A1: instantiator type arguments or NULL.
1965 // A2: cache array. 1965 // A2: cache array.
1966 // Result in V0: null -> not found, otherwise result (true or false). 1966 // Result in V0: null -> not found, otherwise result (true or false).
1967 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { 1967 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) {
1968 __ TraceSimMsg("SubtypeNTestCacheStub"); 1968 __ TraceSimMsg("SubtypeNTestCacheStub");
1969 ASSERT((1 <= n) && (n <= 3)); 1969 ASSERT((1 <= n) && (n <= 3));
1970 if (n > 1) { 1970 if (n > 1) {
1971 // Get instance type arguments. 1971 // Get instance type arguments.
1972 __ LoadClass(T0, A0); 1972 __ LoadClass(T0, A0, Isolate::Current());
1973 // Compute instance type arguments into T1. 1973 // Compute instance type arguments into T1.
1974 Label has_no_type_arguments; 1974 Label has_no_type_arguments;
1975 __ LoadImmediate(T1, reinterpret_cast<intptr_t>(Object::null())); 1975 __ LoadImmediate(T1, reinterpret_cast<intptr_t>(Object::null()));
1976 __ lw(T2, FieldAddress(T0, 1976 __ lw(T2, FieldAddress(T0,
1977 Class::type_arguments_field_offset_in_words_offset())); 1977 Class::type_arguments_field_offset_in_words_offset()));
1978 __ BranchEqual(T2, Class::kNoTypeArguments, &has_no_type_arguments); 1978 __ BranchEqual(T2, Class::kNoTypeArguments, &has_no_type_arguments);
1979 __ sll(T2, T2, 2); 1979 __ sll(T2, T2, 2);
1980 __ addu(T2, A0, T2); // T2 <- A0 + T2 * 4 1980 __ addu(T2, A0, T2); // T2 <- A0 + T2 * 4
1981 __ lw(T1, FieldAddress(T2, 0)); 1981 __ lw(T1, FieldAddress(T2, 0));
1982 __ Bind(&has_no_type_arguments); 1982 __ Bind(&has_no_type_arguments);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 const Register right = T0; 2265 const Register right = T0;
2266 __ lw(left, Address(SP, 1 * kWordSize)); 2266 __ lw(left, Address(SP, 1 * kWordSize));
2267 __ lw(right, Address(SP, 0 * kWordSize)); 2267 __ lw(right, Address(SP, 0 * kWordSize));
2268 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2268 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2269 __ Ret(); 2269 __ Ret();
2270 } 2270 }
2271 2271
2272 } // namespace dart 2272 } // namespace dart
2273 2273
2274 #endif // defined TARGET_ARCH_MIPS 2274 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698