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

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

Issue 12377082: Recognize more list factories. Recognizing list factories (Array, Bytearrays, etc) allows the type … (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/vm/intermediate_language.cc ('k') | runtime/vm/intrinsifier_arm.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525) \ 81 V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525) \
82 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \ 82 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \
83 83
84 84
85 #define MATH_LIB_INTRINSIC_LIST(V) \ 85 #define MATH_LIB_INTRINSIC_LIST(V) \
86 V(::, sqrt, Math_sqrt, 1662640002) \ 86 V(::, sqrt, Math_sqrt, 1662640002) \
87 V(::, sin, Math_sin, 1273932041) \ 87 V(::, sin, Math_sin, 1273932041) \
88 V(::, cos, Math_cos, 1749547468) \ 88 V(::, cos, Math_cos, 1749547468) \
89 89
90 90
91 // Note that any intrinsified function is not inlined. Some optimizations
92 // rely on seeing the factories below instead of their inlined code.
91 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \ 93 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \
92 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \ 94 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \
95 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \
96 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \
93 V(_Int8Array, _new, Int8Array_new, 535958453) \ 97 V(_Int8Array, _new, Int8Array_new, 535958453) \
94 V(_Uint8Array, _new, Uint8Array_new, 604355565) \ 98 V(_Uint8Array, _new, Uint8Array_new, 604355565) \
95 V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \ 99 V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \
96 V(_Int16Array, _new, Int16Array_new, 903723993) \ 100 V(_Int16Array, _new, Int16Array_new, 903723993) \
97 V(_Uint16Array, _new, Uint16Array_new, 133542762) \ 101 V(_Uint16Array, _new, Uint16Array_new, 133542762) \
98 V(_Int32Array, _new, Int32Array_new, 8218286) \ 102 V(_Int32Array, _new, Int32Array_new, 8218286) \
99 V(_Uint32Array, _new, Uint32Array_new, 469402161) \ 103 V(_Uint32Array, _new, Uint32Array_new, 469402161) \
100 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \
101 V(_Int64Array, _new, Int64Array_new, 60605075) \ 104 V(_Int64Array, _new, Int64Array_new, 60605075) \
102 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \
103 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ 105 V(_Uint64Array, _new, Uint64Array_new, 624354107) \
104 V(_Float32Array, _new, Float32Array_new, 109944959) \ 106 V(_Float32Array, _new, Float32Array_new, 109944959) \
105 V(_Float64Array, _new, Float64Array_new, 147668392) \ 107 V(_Float64Array, _new, Float64Array_new, 147668392) \
106 108 V(Int8List, ., Int8Array_factory, 817410959) \
109 V(Uint8List, ., Uint8Array_factory, 220896178) \
110 V(Uint8ClampedList, ., Uint8ClampedArray_factory, 422034060) \
111 V(Int16List, ., Int16Array_factory, 214246025) \
112 V(Uint16List, ., Uint16Array_factory, 137929963) \
113 V(Int32List, ., Int32Array_factory, 1977571010) \
114 V(Uint32List, ., Uint32Array_factory, 407638944) \
115 V(Int64List, ., Int64Array_factory, 885130273) \
116 V(Uint64List, ., Uint64Array_factory, 1471017221) \
117 V(Float32List, ., Float32Array_factory, 2035252095) \
118 V(Float64List, ., Float64Array_factory, 1037441059) \
107 119
108 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and 120 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and
109 // _FixedSizeArrayIterator, moveNext. 121 // _FixedSizeArrayIterator, moveNext.
110 122
111 // Forward declarations. 123 // Forward declarations.
112 class Assembler; 124 class Assembler;
113 class Function; 125 class Function;
114 126
115 class Intrinsifier : public AllStatic { 127 class Intrinsifier : public AllStatic {
116 public: 128 public:
(...skipping 11 matching lines...) Expand all
128 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 140 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
129 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 141 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
130 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 142 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
131 143
132 #undef DECLARE_FUNCTION 144 #undef DECLARE_FUNCTION
133 }; 145 };
134 146
135 } // namespace dart 147 } // namespace dart
136 148
137 #endif // VM_INTRINSIFIER_H_ 149 #endif // VM_INTRINSIFIER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698