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

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

Issue 154393003: Implement eager instantiation and canonicalization of type arguments at run (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 __ LoadImmediate(T7, reinterpret_cast<int32_t>(Object::null())); 202 __ LoadImmediate(T7, reinterpret_cast<int32_t>(Object::null()));
203 __ beq(T2, T7, &checked_ok); 203 __ beq(T2, T7, &checked_ok);
204 204
205 __ lw(T1, Address(SP, 2 * kWordSize)); // Array. 205 __ lw(T1, Address(SP, 2 * kWordSize)); // Array.
206 __ lw(T1, FieldAddress(T1, type_args_field_offset)); 206 __ lw(T1, FieldAddress(T1, type_args_field_offset));
207 207
208 // T1: Type arguments of array. 208 // T1: Type arguments of array.
209 __ beq(T1, T7, &checked_ok); 209 __ beq(T1, T7, &checked_ok);
210 210
211 // Check if it's dynamic. 211 // Check if it's dynamic.
212 // For now handle only TypeArguments and bail out if InstantiatedTypeArgs.
213 __ LoadClassId(CMPRES1, T1);
214 __ BranchNotEqual(CMPRES1, kTypeArgumentsCid, &fall_through);
215
216 // Get type at index 0. 212 // Get type at index 0.
217 __ lw(T0, FieldAddress(T1, TypeArguments::type_at_offset(0))); 213 __ lw(T0, FieldAddress(T1, TypeArguments::type_at_offset(0)));
218 __ BranchEqual(T0, Type::ZoneHandle(Type::DynamicType()), &checked_ok); 214 __ BranchEqual(T0, Type::ZoneHandle(Type::DynamicType()), &checked_ok);
219 215
220 // Check for int and num. 216 // Check for int and num.
221 __ andi(CMPRES1, T2, Immediate(kSmiTagMask)); 217 __ andi(CMPRES1, T2, Immediate(kSmiTagMask));
222 __ bne(CMPRES1, ZR, &fall_through); // Non-smi value. 218 __ bne(CMPRES1, ZR, &fall_through); // Non-smi value.
223 219
224 __ BranchEqual(T0, Type::ZoneHandle(Type::IntType()), &checked_ok); 220 __ BranchEqual(T0, Type::ZoneHandle(Type::IntType()), &checked_ok);
225 __ BranchNotEqual(T0, Type::ZoneHandle(Type::Number()), &fall_through); 221 __ BranchNotEqual(T0, Type::ZoneHandle(Type::Number()), &fall_through);
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 } 1774 }
1779 1775
1780 1776
1781 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { 1777 void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
1782 StringEquality(assembler, kTwoByteStringCid); 1778 StringEquality(assembler, kTwoByteStringCid);
1783 } 1779 }
1784 1780
1785 } // namespace dart 1781 } // namespace dart
1786 1782
1787 #endif // defined TARGET_ARCH_MIPS 1783 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698