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

Side by Side Diff: src/shared/natives.h

Issue 1209033003: Work in progres, please take a look and give early feedback if this is the way we want to structure… (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: address comments Created 5 years, 5 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 | « src/shared/names.h ('k') | src/vm/ffi.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) 2014, the Fletch project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Fletch 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_SHARED_NATIVES_H_ 5 #ifndef SRC_SHARED_NATIVES_H_
6 #define SRC_SHARED_NATIVES_H_ 6 #define SRC_SHARED_NATIVES_H_
7 7
8 namespace fletch { 8 namespace fletch {
9 9
10 #define NATIVES_DO(N) \ 10 #define NATIVES_DO(N) \
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 N(ProcessDivide, "Process", "_divide") \ 128 N(ProcessDivide, "Process", "_divide") \
129 N(ProcessQueueGetMessage, "Process", "_queueGetMessage") \ 129 N(ProcessQueueGetMessage, "Process", "_queueGetMessage") \
130 N(ProcessQueueGetChannel, "Process", "_queueGetChannel") \ 130 N(ProcessQueueGetChannel, "Process", "_queueGetChannel") \
131 \ 131 \
132 N(CoroutineCurrent, "Coroutine", "_coroutineCurrent") \ 132 N(CoroutineCurrent, "Coroutine", "_coroutineCurrent") \
133 N(CoroutineNewStack, "Coroutine", "_coroutineNewStack") \ 133 N(CoroutineNewStack, "Coroutine", "_coroutineNewStack") \
134 \ 134 \
135 N(StopwatchFrequency, "Stopwatch", "_frequency") \ 135 N(StopwatchFrequency, "Stopwatch", "_frequency") \
136 N(StopwatchNow, "Stopwatch", "_now") \ 136 N(StopwatchNow, "Stopwatch", "_now") \
137 \ 137 \
138 N(ForeignLookup, "Foreign", "_lookup") \ 138 N(ForeignLibraryLookup, "ForeignLibrary", "_lookupLibrary") \
139 N(ForeignAllocate, "Foreign", "_allocate") \ 139 N(ForeignLibraryClose, "ForeignLibrary", "_closeLibrary") \
140 N(ForeignFree, "Foreign", "_free") \ 140 N(ForeignLibraryGetFunction, "ForeignLibrary", "_lookupFunction") \
141 N(ForeignMarkForFinalization, "Foreign", "_markForFinalization") \ 141 N(ForeignLibraryBundlePath, "ForeignLibrary", "bundleLibraryName") \
142 \
142 N(ForeignBitsPerWord, "Foreign", "_bitsPerMachineWord") \ 143 N(ForeignBitsPerWord, "Foreign", "_bitsPerMachineWord") \
143 N(ForeignErrno, "Foreign", "_errno") \ 144 N(ForeignErrno, "Foreign", "_errno") \
144 N(ForeignPlatform, "Foreign", "_platform") \ 145 N(ForeignPlatform, "Foreign", "_platform") \
145 N(ForeignArchitecture, "Foreign", "_architecture") \ 146 N(ForeignArchitecture, "Foreign", "_architecture") \
146 N(ForeignConvertPort, "Foreign", "_convertPort") \ 147 N(ForeignConvertPort, "Foreign", "_convertPort") \
147 \ 148 \
148 N(ForeignICall0, "Foreign", "_icall$0") \ 149 N(ForeignICall0, "ForeignFunction", "_icall$0") \
149 N(ForeignICall1, "Foreign", "_icall$1") \ 150 N(ForeignICall1, "ForeignFunction", "_icall$1") \
150 N(ForeignICall2, "Foreign", "_icall$2") \ 151 N(ForeignICall2, "ForeignFunction", "_icall$2") \
151 N(ForeignICall3, "Foreign", "_icall$3") \ 152 N(ForeignICall3, "ForeignFunction", "_icall$3") \
152 N(ForeignICall4, "Foreign", "_icall$4") \ 153 N(ForeignICall4, "ForeignFunction", "_icall$4") \
153 N(ForeignICall5, "Foreign", "_icall$5") \ 154 N(ForeignICall5, "ForeignFunction", "_icall$5") \
154 N(ForeignICall6, "Foreign", "_icall$6") \ 155 N(ForeignICall6, "ForeignFunction", "_icall$6") \
155 \ 156 \
156 N(ForeignVCall0, "Foreign", "_vcall$0") \ 157 N(ForeignVCall0, "ForeignFunction", "_vcall$0") \
157 N(ForeignVCall1, "Foreign", "_vcall$1") \ 158 N(ForeignVCall1, "ForeignFunction", "_vcall$1") \
158 N(ForeignVCall2, "Foreign", "_vcall$2") \ 159 N(ForeignVCall2, "ForeignFunction", "_vcall$2") \
159 N(ForeignVCall3, "Foreign", "_vcall$3") \ 160 N(ForeignVCall3, "ForeignFunction", "_vcall$3") \
160 N(ForeignVCall4, "Foreign", "_vcall$4") \ 161 N(ForeignVCall4, "ForeignFunction", "_vcall$4") \
161 N(ForeignVCall5, "Foreign", "_vcall$5") \ 162 N(ForeignVCall5, "ForeignFunction", "_vcall$5") \
162 N(ForeignVCall6, "Foreign", "_vcall$6") \ 163 N(ForeignVCall6, "ForeignFunction", "_vcall$6") \
163 \ 164 \
164 N(ForeignLCallwLw, "Foreign", "_Lcall$wLw") \ 165 N(ForeignLCallwLw, "ForeignFunction", "_Lcall$wLw") \
165 \ 166 \
166 N(ForeignGetInt8, "Foreign", "_getInt8") \ 167 N(ForeignMarkForFinalization, "ForeignMemory", "_markForFinalization")\
167 N(ForeignGetInt16, "Foreign", "_getInt16") \ 168 N(ForeignAllocate, "ForeignMemory", "_allocate") \
168 N(ForeignGetInt32, "Foreign", "_getInt32") \ 169 N(ForeignFree, "ForeignMemory", "_free") \
169 N(ForeignGetInt64, "Foreign", "_getInt64") \
170 \ 170 \
171 N(ForeignSetInt8, "Foreign", "_setInt8") \ 171 N(ForeignGetInt8, "ForeignMemory", "_getInt8") \
172 N(ForeignSetInt16, "Foreign", "_setInt16") \ 172 N(ForeignGetInt16, "ForeignMemory", "_getInt16") \
173 N(ForeignSetInt32, "Foreign", "_setInt32") \ 173 N(ForeignGetInt32, "ForeignMemory", "_getInt32") \
174 N(ForeignSetInt64, "Foreign", "_setInt64") \ 174 N(ForeignGetInt64, "ForeignMemory", "_getInt64") \
175 \ 175 \
176 N(ForeignGetUint8, "Foreign", "_getUint8") \ 176 N(ForeignSetInt8, "ForeignMemory", "_setInt8") \
177 N(ForeignGetUint16, "Foreign", "_getUint16") \ 177 N(ForeignSetInt16, "ForeignMemory", "_setInt16") \
178 N(ForeignGetUint32, "Foreign", "_getUint32") \ 178 N(ForeignSetInt32, "ForeignMemory", "_setInt32") \
179 N(ForeignGetUint64, "Foreign", "_getUint64") \ 179 N(ForeignSetInt64, "ForeignMemory", "_setInt64") \
180 \ 180 \
181 N(ForeignSetUint8, "Foreign", "_setUint8") \ 181 N(ForeignGetUint8, "ForeignMemory", "_getUint8") \
182 N(ForeignSetUint16, "Foreign", "_setUint16") \ 182 N(ForeignGetUint16, "ForeignMemory", "_getUint16") \
183 N(ForeignSetUint32, "Foreign", "_setUint32") \ 183 N(ForeignGetUint32, "ForeignMemory", "_getUint32") \
184 N(ForeignSetUint64, "Foreign", "_setUint64") \ 184 N(ForeignGetUint64, "ForeignMemory", "_getUint64") \
185 \ 185 \
186 N(ForeignGetFloat32, "Foreign", "_getFloat32") \ 186 N(ForeignSetUint8, "ForeignMemory", "_setUint8") \
187 N(ForeignGetFloat64, "Foreign", "_getFloat64") \ 187 N(ForeignSetUint16, "ForeignMemory", "_setUint16") \
188 N(ForeignSetUint32, "ForeignMemory", "_setUint32") \
189 N(ForeignSetUint64, "ForeignMemory", "_setUint64") \
188 \ 190 \
189 N(ForeignSetFloat32, "Foreign", "_setFloat32") \ 191 N(ForeignGetFloat32, "ForeignMemory", "_getFloat32") \
190 N(ForeignSetFloat64, "Foreign", "_setFloat64") \ 192 N(ForeignGetFloat64, "ForeignMemory", "_getFloat64") \
193 \
194 N(ForeignSetFloat32, "ForeignMemory", "_setFloat32") \
195 N(ForeignSetFloat64, "ForeignMemory", "_setFloat64") \
191 \ 196 \
192 N(StringAdd, "_StringImpl", "+") \ 197 N(StringAdd, "_StringImpl", "+") \
193 N(StringCodeUnitAt, "_StringImpl", "codeUnitAt") \ 198 N(StringCodeUnitAt, "_StringImpl", "codeUnitAt") \
194 N(StringCreate, "_StringImpl", "_create") \ 199 N(StringCreate, "_StringImpl", "_create") \
195 N(StringEqual, "_StringImpl", "==") \ 200 N(StringEqual, "_StringImpl", "==") \
196 N(StringLength, "_StringImpl", "length") \ 201 N(StringLength, "_StringImpl", "length") \
197 N(StringSetCodeUnitAt, "_StringImpl", "_setCodeUnitAt") \ 202 N(StringSetCodeUnitAt, "_StringImpl", "_setCodeUnitAt") \
198 N(StringSubstring, "_StringImpl", "_substring") \ 203 N(StringSubstring, "_StringImpl", "_substring") \
199 N(StringToLowerCase, "_StringImpl", "toLowerCase") \ 204 N(StringToLowerCase, "_StringImpl", "toLowerCase") \
200 N(StringToUpperCase, "_StringImpl", "toUpperCase") \ 205 N(StringToUpperCase, "_StringImpl", "toUpperCase") \
(...skipping 15 matching lines...) Expand all
216 enum Native { 221 enum Native {
217 #define N(e, c, n) k##e, 222 #define N(e, c, n) k##e,
218 NATIVES_DO(N) 223 NATIVES_DO(N)
219 #undef N 224 #undef N
220 kNumberOfNatives 225 kNumberOfNatives
221 }; 226 };
222 227
223 } // namespace fletch 228 } // namespace fletch
224 229
225 #endif // SRC_SHARED_NATIVES_H_ 230 #endif // SRC_SHARED_NATIVES_H_
OLDNEW
« no previous file with comments | « src/shared/names.h ('k') | src/vm/ffi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698