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

Side by Side Diff: runtime/vm/intrinsifier.h

Issue 12547018: Add the allocator intrinsics for dart:typeddata implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/lib/typeddata.cc ('k') | runtime/vm/intrinsifier.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Class for intrinsifying functions. 4 // Class for intrinsifying functions.
5 5
6 #ifndef VM_INTRINSIFIER_H_ 6 #ifndef VM_INTRINSIFIER_H_
7 #define VM_INTRINSIFIER_H_ 7 #define VM_INTRINSIFIER_H_
8 8
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 V(Uint8ClampedList, ., Uint8ClampedArray_factory, 422034060) \ 110 V(Uint8ClampedList, ., Uint8ClampedArray_factory, 422034060) \
111 V(Int16List, ., Int16Array_factory, 214246025) \ 111 V(Int16List, ., Int16Array_factory, 214246025) \
112 V(Uint16List, ., Uint16Array_factory, 137929963) \ 112 V(Uint16List, ., Uint16Array_factory, 137929963) \
113 V(Int32List, ., Int32Array_factory, 1977571010) \ 113 V(Int32List, ., Int32Array_factory, 1977571010) \
114 V(Uint32List, ., Uint32Array_factory, 407638944) \ 114 V(Uint32List, ., Uint32Array_factory, 407638944) \
115 V(Int64List, ., Int64Array_factory, 885130273) \ 115 V(Int64List, ., Int64Array_factory, 885130273) \
116 V(Uint64List, ., Uint64Array_factory, 1471017221) \ 116 V(Uint64List, ., Uint64Array_factory, 1471017221) \
117 V(Float32List, ., Float32Array_factory, 2035252095) \ 117 V(Float32List, ., Float32Array_factory, 2035252095) \
118 V(Float64List, ., Float64Array_factory, 1037441059) \ 118 V(Float64List, ., Float64Array_factory, 1037441059) \
119 119
120 #define TYPEDDATA_LIB_INTRINSIC_LIST(V) \
121 V(_TypedList, get:length, TypedData_getLength, 231908172) \
122 V(_Int8Array, _new, TypedData_Int8Array_new, 844274443) \
123 V(_Uint8Array, _new, TypedData_Uint8Array_new, 997951645) \
124 V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 1025045044) \
125 V(_Int16Array, _new, TypedData_Int16Array_new, 1064563368) \
126 V(_Uint16Array, _new, TypedData_Uint16Array_new, 110927177) \
127 V(_Int32Array, _new, TypedData_Int32Array_new, 770802406) \
128 V(_Uint32Array, _new, TypedData_Uint32Array_new, 856841876) \
129 V(_Int64Array, _new, TypedData_Int64Array_new, 941769528) \
130 V(_Uint64Array, _new, TypedData_Uint64Array_new, 977566635) \
131 V(_Float32Array, _new, TypedData_Float32Array_new, 1053133615) \
132 V(_Float64Array, _new, TypedData_Float64Array_new, 936673303) \
133 V(_Int8Array, ., TypedData_Int8Array_factory, 1852699666) \
134 V(_Uint8Array, ., TypedData_Uint8Array_factory, 1014667000) \
135 V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 519376744) \
136 V(_Int16Array, ., TypedData_Int16Array_factory, 1069515268) \
137 V(_Uint16Array, ., TypedData_Uint16Array_factory, 1892182763) \
138 V(_Int32Array, ., TypedData_Int32Array_factory, 1724127394) \
139 V(_Uint32Array, ., TypedData_Uint32Array_factory, 1251657079) \
140 V(_Int64Array, ., TypedData_Int64Array_factory, 1922050636) \
141 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1279581075) \
142 V(_Float32Array, ., TypedData_Float32Array_factory, 112704438) \
143 V(_Float64Array, ., TypedData_Float64Array_factory, 41426340) \
144
120 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and 145 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and
121 // _FixedSizeArrayIterator, moveNext. 146 // _FixedSizeArrayIterator, moveNext.
122 147
123 // Forward declarations. 148 // Forward declarations.
124 class Assembler; 149 class Assembler;
125 class Function; 150 class Function;
126 151
127 class Intrinsifier : public AllStatic { 152 class Intrinsifier : public AllStatic {
128 public: 153 public:
129 // Try to intrinsify 'function'. Returns true if the function intrinsified 154 // Try to intrinsify 'function'. Returns true if the function intrinsified
130 // completely and the code does not need to be generated (i.e., no slow 155 // completely and the code does not need to be generated (i.e., no slow
131 // path possible). 156 // path possible).
132 static bool Intrinsify(const Function& function, Assembler* assembler); 157 static bool Intrinsify(const Function& function, Assembler* assembler);
133 static bool CanIntrinsify(const Function& function); 158 static bool CanIntrinsify(const Function& function);
134 static void InitializeState(); 159 static void InitializeState();
135 160
136 private: 161 private:
137 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ 162 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \
138 static bool destination(Assembler* assembler); 163 static bool destination(Assembler* assembler);
139 164
140 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 165 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
141 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 166 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
142 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 167 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
168 TYPEDDATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
143 169
144 #undef DECLARE_FUNCTION 170 #undef DECLARE_FUNCTION
145 }; 171 };
146 172
147 } // namespace dart 173 } // namespace dart
148 174
149 #endif // VM_INTRINSIFIER_H_ 175 #endif // VM_INTRINSIFIER_H_
OLDNEW
« no previous file with comments | « runtime/lib/typeddata.cc ('k') | runtime/vm/intrinsifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698