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

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

Issue 1782003002: Simplify the VM's typed_data constructors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: added comment Created 4 years, 9 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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/method_recognizer.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 case 4: return TIMES_4; 231 case 4: return TIMES_4;
232 case 8: return TIMES_8; 232 case 8: return TIMES_8;
233 case 16: return TIMES_16; 233 case 16: return TIMES_16;
234 } 234 }
235 UNREACHABLE(); 235 UNREACHABLE();
236 return static_cast<ScaleFactor>(0); 236 return static_cast<ScaleFactor>(0);
237 } 237 }
238 238
239 239
240 #define TYPED_DATA_ALLOCATOR(clazz) \ 240 #define TYPED_DATA_ALLOCATOR(clazz) \
241 void Intrinsifier::TypedData_##clazz##_new(Assembler* assembler) { \
242 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \
243 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \
244 ScaleFactor scale = GetScaleFactor(size); \
245 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \
246 } \
247 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \ 241 void Intrinsifier::TypedData_##clazz##_factory(Assembler* assembler) { \
248 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \ 242 intptr_t size = TypedData::ElementSizeInBytes(kTypedData##clazz##Cid); \
249 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \ 243 intptr_t max_len = TypedData::MaxElements(kTypedData##clazz##Cid); \
250 ScaleFactor scale = GetScaleFactor(size); \ 244 ScaleFactor scale = GetScaleFactor(size); \
251 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \ 245 TYPED_ARRAY_ALLOCATION(TypedData, kTypedData##clazz##Cid, max_len, scale); \
252 } 246 }
253 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR) 247 CLASS_LIST_TYPED_DATA(TYPED_DATA_ALLOCATOR)
254 #undef TYPED_DATA_ALLOCATOR 248 #undef TYPED_DATA_ALLOCATOR
255 249
256 250
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 __ LoadIsolate(RAX); 2100 __ LoadIsolate(RAX);
2107 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); 2101 __ movq(RAX, Address(RAX, Isolate::current_tag_offset()));
2108 __ ret(); 2102 __ ret();
2109 } 2103 }
2110 2104
2111 #undef __ 2105 #undef __
2112 2106
2113 } // namespace dart 2107 } // namespace dart
2114 2108
2115 #endif // defined TARGET_ARCH_X64 2109 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698