| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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 dartino { |
| 9 | 9 |
| 10 #define NATIVES_DO(N) \ | 10 #define NATIVES_DO(N) \ |
| 11 N(PrintToConsole, "<none>", "printToConsole") \ | 11 N(PrintToConsole, "<none>", "printToConsole") \ |
| 12 N(ExposeGC, "<none>", "_exposeGC") \ | 12 N(ExposeGC, "<none>", "_exposeGC") \ |
| 13 N(GC, "<none>", "_gc") \ | 13 N(GC, "<none>", "_gc") \ |
| 14 \ | 14 \ |
| 15 N(IntParse, "int", "_parse") \ | 15 N(IntParse, "int", "_parse") \ |
| 16 \ | 16 \ |
| 17 N(SmiToDouble, "_Smi", "toDouble") \ | 17 N(SmiToDouble, "_Smi", "toDouble") \ |
| 18 N(SmiToString, "_Smi", "toString") \ | 18 N(SmiToString, "_Smi", "toString") \ |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 N(ProcessQueueSetupProcessDeath, "Process", "_queueSetupProcessDeath") \ | 130 N(ProcessQueueSetupProcessDeath, "Process", "_queueSetupProcessDeath") \ |
| 131 N(ProcessQueueGetChannel, "Process", "_queueGetChannel") \ | 131 N(ProcessQueueGetChannel, "Process", "_queueGetChannel") \ |
| 132 N(ProcessCurrent, "Process", "current") \ | 132 N(ProcessCurrent, "Process", "current") \ |
| 133 \ | 133 \ |
| 134 N(CoroutineCurrent, "Coroutine", "_coroutineCurrent") \ | 134 N(CoroutineCurrent, "Coroutine", "_coroutineCurrent") \ |
| 135 N(CoroutineNewStack, "Coroutine", "_coroutineNewStack") \ | 135 N(CoroutineNewStack, "Coroutine", "_coroutineNewStack") \ |
| 136 \ | 136 \ |
| 137 N(StopwatchFrequency, "Stopwatch", "_frequency") \ | 137 N(StopwatchFrequency, "Stopwatch", "_frequency") \ |
| 138 N(StopwatchNow, "Stopwatch", "_now") \ | 138 N(StopwatchNow, "Stopwatch", "_now") \ |
| 139 \ | 139 \ |
| 140 N(TimerScheduleTimeout, "_FletchTimer", "_scheduleTimeout") \ | 140 N(TimerScheduleTimeout, "_DartinoTimer", "_scheduleTimeout") \ |
| 141 N(EventHandlerSleep, "<none>", "_sleep") \ | 141 N(EventHandlerSleep, "<none>", "_sleep") \ |
| 142 \ | 142 \ |
| 143 N(ForeignLibraryLookup, "ForeignLibrary", "_lookupLibrary") \ | 143 N(ForeignLibraryLookup, "ForeignLibrary", "_lookupLibrary") \ |
| 144 N(ForeignLibraryGetFunction, "ForeignLibrary", "_lookupFunction") \ | 144 N(ForeignLibraryGetFunction, "ForeignLibrary", "_lookupFunction") \ |
| 145 N(ForeignLibraryBundlePath, "ForeignLibrary", "bundleLibraryName") \ | 145 N(ForeignLibraryBundlePath, "ForeignLibrary", "bundleLibraryName") \ |
| 146 \ | 146 \ |
| 147 N(ForeignBitsPerWord, "Foreign", "_bitsPerMachineWord") \ | 147 N(ForeignBitsPerWord, "Foreign", "_bitsPerMachineWord") \ |
| 148 N(ForeignErrno, "Foreign", "_errno") \ | 148 N(ForeignErrno, "Foreign", "_errno") \ |
| 149 N(ForeignPlatform, "Foreign", "_platform") \ | 149 N(ForeignPlatform, "Foreign", "_platform") \ |
| 150 N(ForeignArchitecture, "Foreign", "_architecture") \ | 150 N(ForeignArchitecture, "Foreign", "_architecture") \ |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 N(Uint32DigitsGet, "_Uint32Digits", "_getUint32") \ | 252 N(Uint32DigitsGet, "_Uint32Digits", "_getUint32") \ |
| 253 N(Uint32DigitsSet, "_Uint32Digits", "_setUint32") | 253 N(Uint32DigitsSet, "_Uint32Digits", "_setUint32") |
| 254 | 254 |
| 255 enum Native { | 255 enum Native { |
| 256 #define N(e, c, n) k##e, | 256 #define N(e, c, n) k##e, |
| 257 NATIVES_DO(N) | 257 NATIVES_DO(N) |
| 258 #undef N | 258 #undef N |
| 259 kNumberOfNatives | 259 kNumberOfNatives |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 } // namespace fletch | 262 } // namespace dartino |
| 263 | 263 |
| 264 #endif // SRC_SHARED_NATIVES_H_ | 264 #endif // SRC_SHARED_NATIVES_H_ |
| OLD | NEW |