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

Side by Side Diff: runtime/vm/intrinsifier_arm.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/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 void Intrinsifier::ImmutableList_getIndexed(Assembler* assembler) { 163 void Intrinsifier::ImmutableList_getIndexed(Assembler* assembler) {
164 return Array_getIndexed(assembler); 164 return Array_getIndexed(assembler);
165 } 165 }
166 166
167 167
168 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { 168 static intptr_t ComputeObjectArrayTypeArgumentsOffset() {
169 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 169 const Library& core_lib = Library::Handle(Library::CoreLibrary());
170 const Class& cls = Class::Handle( 170 const Class& cls = Class::Handle(
171 core_lib.LookupClassAllowPrivate(Symbols::_List())); 171 core_lib.LookupClassAllowPrivate(Symbols::_List()));
172 ASSERT(!cls.IsNull()); 172 ASSERT(!cls.IsNull());
173 ASSERT(cls.HasTypeArguments());
174 ASSERT(cls.NumTypeArguments() == 1); 173 ASSERT(cls.NumTypeArguments() == 1);
175 const intptr_t field_offset = cls.type_arguments_field_offset(); 174 const intptr_t field_offset = cls.type_arguments_field_offset();
176 ASSERT(field_offset != Class::kNoTypeArguments); 175 ASSERT(field_offset != Class::kNoTypeArguments);
177 return field_offset; 176 return field_offset;
178 } 177 }
179 178
180 179
181 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 180 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
182 // update. Array length is always a Smi. 181 // update. Array length is always a Smi.
183 void Intrinsifier::Array_setIndexed(Assembler* assembler) { 182 void Intrinsifier::Array_setIndexed(Assembler* assembler) {
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 1650
1652 __ Bind(&ok); 1651 __ Bind(&ok);
1653 __ Ret(); 1652 __ Ret();
1654 1653
1655 __ Bind(&fall_through); 1654 __ Bind(&fall_through);
1656 } 1655 }
1657 1656
1658 } // namespace dart 1657 } // namespace dart
1659 1658
1660 #endif // defined TARGET_ARCH_ARM 1659 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698