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

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

Issue 26682003: Cache number of type arguments in class object instead of recalculating it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void Intrinsifier::ImmutableList_getIndexed(Assembler* assembler) { 171 void Intrinsifier::ImmutableList_getIndexed(Assembler* assembler) {
172 return Array_getIndexed(assembler); 172 return Array_getIndexed(assembler);
173 } 173 }
174 174
175 175
176 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { 176 static intptr_t ComputeObjectArrayTypeArgumentsOffset() {
177 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 177 const Library& core_lib = Library::Handle(Library::CoreLibrary());
178 const Class& cls = Class::Handle( 178 const Class& cls = Class::Handle(
179 core_lib.LookupClassAllowPrivate(Symbols::_List())); 179 core_lib.LookupClassAllowPrivate(Symbols::_List()));
180 ASSERT(!cls.IsNull()); 180 ASSERT(!cls.IsNull());
181 ASSERT(cls.HasTypeArguments());
182 ASSERT(cls.NumTypeArguments() == 1); 181 ASSERT(cls.NumTypeArguments() == 1);
183 const intptr_t field_offset = cls.type_arguments_field_offset(); 182 const intptr_t field_offset = cls.type_arguments_field_offset();
184 ASSERT(field_offset != Class::kNoTypeArguments); 183 ASSERT(field_offset != Class::kNoTypeArguments);
185 return field_offset; 184 return field_offset;
186 } 185 }
187 186
188 187
189 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 188 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
190 // update. Array length is always a Smi. 189 // update. Array length is always a Smi.
191 void Intrinsifier::Array_setIndexed(Assembler* assembler) { 190 void Intrinsifier::Array_setIndexed(Assembler* assembler) {
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 1733
1735 __ Bind(&ok); 1734 __ Bind(&ok);
1736 __ Ret(); 1735 __ Ret();
1737 1736
1738 __ Bind(&fall_through); 1737 __ Bind(&fall_through);
1739 } 1738 }
1740 1739
1741 } // namespace dart 1740 } // namespace dart
1742 1741
1743 #endif // defined TARGET_ARCH_MIPS 1742 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698