blob: c8bef1ba39122bdbc322e313fb963c8e5613f11f [file] [log] [blame]
Damien George04b91472014-05-03 23:27:38 +01001/*
2 * This file is part of the Micro Python project, http://micropython.org/
3 *
4 * The MIT License (MIT)
5 *
6 * Copyright (c) 2013, 2014 Damien P. George
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26
Damien George51dfcb42015-01-01 20:27:54 +000027#include "py/mpconfig.h"
28
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000029// All the qstr definitions in this file are available as constants.
Damien George0c36da02014-03-08 15:24:39 +000030// That is, they are in ROM and you can reference them simply as MP_QSTR_xxxx.
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000031
Damien George6942f802015-01-11 17:52:45 +000032// qstr configuration passed to makeqstrdata.py of the form QCFG(key, value)
Damien George95836f82015-01-11 22:27:30 +000033QCFG(BYTES_IN_LEN, MICROPY_QSTR_BYTES_IN_LEN)
Damien Georgec3bd9412015-07-20 11:03:13 +000034QCFG(BYTES_IN_HASH, MICROPY_QSTR_BYTES_IN_HASH)
Damien George6942f802015-01-11 17:52:45 +000035
36Q()
Damien George708c0732014-04-27 19:23:46 +010037Q(*)
Damien George035a0a22015-10-12 21:49:03 +010038Q(_)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000039Q(__build_class__)
40Q(__class__)
41Q(__doc__)
Paul Sokolovsky1d938c92014-02-04 00:46:17 +020042Q(__import__)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000043Q(__init__)
Paul Sokolovsky13684fd2014-05-18 20:37:18 +030044Q(__new__)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000045Q(__locals__)
46Q(__main__)
47Q(__module__)
48Q(__name__)
stijn3c014a62014-12-23 14:06:55 +010049Q(__dict__)
stijne00eeaf2014-11-12 14:57:34 +010050Q(__hash__)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000051Q(__next__)
52Q(__qualname__)
Paul Sokolovsky13d52df2014-04-11 23:25:35 +030053Q(__path__)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000054Q(__repl_print__)
Paul Sokolovskyd0f5e612014-07-25 11:00:15 +030055#if MICROPY_PY___FILE__
56Q(__file__)
57#endif
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000058
Damien George09a0c642014-01-30 10:05:33 +000059Q(__bool__)
Paul Sokolovsky036ad762014-04-13 10:39:25 +030060Q(__contains__)
Paul Sokolovsky44307d52014-03-29 04:10:11 +020061Q(__enter__)
62Q(__exit__)
Damien George09a0c642014-01-30 10:05:33 +000063Q(__len__)
Damien George9e6e9352014-03-26 18:37:06 +000064Q(__iter__)
Damien George7c9c6672014-01-25 00:17:36 +000065Q(__getitem__)
Damien George7d0bfbe2014-02-08 19:01:47 +000066Q(__setitem__)
Paul Sokolovsky14de1142014-04-13 23:55:59 +030067Q(__delitem__)
Damien George7c9c6672014-01-25 00:17:36 +000068Q(__add__)
69Q(__sub__)
Paul Sokolovsky51bbf6a2014-03-16 15:16:54 +020070Q(__repr__)
71Q(__str__)
stijn28fa84b2015-02-14 18:43:54 +010072#if MICROPY_PY_DESCRIPTORS
73Q(__get__)
74Q(__set__)
Damien George56606f32015-04-04 20:15:31 +010075Q(__delete__)
stijn28fa84b2015-02-14 18:43:54 +010076#endif
Damien Georgee44d26a2014-03-31 22:57:56 +010077Q(__getattr__)
muxcc849f72014-04-05 15:49:03 +020078Q(__del__)
Paul Sokolovsky755565d2014-04-25 21:15:16 +030079Q(__call__)
Paul Sokolovsky5473f742014-06-08 00:01:46 +030080Q(__lt__)
Damien George779794a2014-08-26 09:31:26 +010081Q(__gt__)
82Q(__eq__)
83Q(__le__)
84Q(__ge__)
Damien George962a5d52015-01-21 00:19:42 +000085Q(__reversed__)
Paul Sokolovsky98c4bc32015-01-30 01:42:49 +020086#if MICROPY_PY_ALL_SPECIAL_METHODS
Paul Sokolovskye06cf892015-02-21 19:35:09 +020087Q(__mul__)
88Q(__truediv__)
89Q(__floordiv__)
Paul Sokolovsky98c4bc32015-01-30 01:42:49 +020090Q(__iadd__)
Paul Sokolovskye06cf892015-02-21 19:35:09 +020091Q(__isub__)
Paul Sokolovsky1bc53422015-03-30 02:29:59 +030092Q(__invert__)
93Q(__neg__)
94Q(__pos__)
Paul Sokolovsky98c4bc32015-01-30 01:42:49 +020095#endif
Damien George7c9c6672014-01-25 00:17:36 +000096
Damien Georgeeb7bfcb2014-01-04 15:57:35 +000097Q(micropython)
Damien George3417bc22014-05-10 10:36:38 +010098Q(bytecode)
Damien George2ac4af62014-08-15 16:45:41 +010099Q(const)
100
Damien Georgec90f59e2014-09-06 23:06:36 +0100101#if MICROPY_EMIT_NATIVE
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000102Q(native)
103Q(viper)
Damien George2ac4af62014-08-15 16:45:41 +0100104Q(uint)
Damien Georgee9dac3b2014-09-29 22:10:41 +0100105Q(ptr)
106Q(ptr8)
107Q(ptr16)
Damien Georgeb8f9ac52015-10-13 00:50:17 +0100108Q(ptr32)
Damien George2ac4af62014-08-15 16:45:41 +0100109#endif
Damien Georgee5f8a772014-04-21 13:33:15 +0100110
111#if MICROPY_EMIT_INLINE_THUMB
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000112Q(asm_thumb)
Damien Georgee5f8a772014-04-21 13:33:15 +0100113Q(label)
114Q(align)
115Q(data)
Damien George8f54c082016-01-15 15:20:43 +0000116Q(uint)
Damien George28adab32016-02-23 15:20:39 +0000117Q(nop)
118Q(mov)
119Q(and_)
120Q(cmp)
121Q(add)
122Q(sub)
123Q(lsl)
124Q(lsr)
125Q(asr)
126Q(ldr)
127Q(ldrb)
128Q(ldrh)
129Q(str)
130Q(strb)
131Q(strh)
132Q(b)
133Q(bl)
134Q(bx)
135Q(push)
136Q(pop)
137Q(cpsid)
138Q(cpsie)
139Q(wfi)
140Q(clz)
141Q(rbit)
142Q(movw)
143Q(movt)
144Q(movwt)
145Q(mrs)
146Q(sdiv)
147Q(udiv)
148Q(ldrex)
149Q(strex)
150#if MICROPY_EMIT_INLINE_THUMB_FLOAT
151Q(vcmp)
152Q(vneg)
153Q(vcvt_f32_s32)
154Q(vcvt_s32_f32)
155Q(vsqrt)
156Q(vmov)
157Q(vmrs)
158Q(vldr)
159Q(vstr)
160#endif
Damien Georgee5f8a772014-04-21 13:33:15 +0100161#endif
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000162
Damien George3d615282014-09-17 23:17:26 +0100163Q(builtins)
164
Damien Georgee9906ac2014-01-04 18:44:46 +0000165Q(Ellipsis)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000166Q(StopIteration)
Paul Sokolovsky5ab5ac52015-05-04 19:45:53 +0300167#if MICROPY_PY_BUILTINS_NOTIMPLEMENTED
168Q(NotImplemented)
169#endif
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000170
Damien Georgec5966122014-02-15 16:10:44 +0000171Q(BaseException)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000172Q(ArithmeticError)
Damien George71c51812014-01-04 20:21:15 +0000173Q(AssertionError)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000174Q(AttributeError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000175Q(BufferError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000176Q(EOFError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000177Q(Exception)
178Q(FileExistsError)
179Q(FileNotFoundError)
180Q(FloatingPointError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000181Q(GeneratorExit)
Paul Sokolovsky7cd54d72014-02-04 03:33:55 +0200182Q(ImportError)
Damien George9528cd62014-01-15 21:23:31 +0000183Q(IndentationError)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000184Q(IndexError)
Damien George124df6f2014-10-25 18:19:55 +0100185Q(KeyboardInterrupt)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000186Q(KeyError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000187Q(LookupError)
188Q(MemoryError)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000189Q(NameError)
Paul Sokolovsky76f06de2014-02-09 13:17:36 +0200190Q(NotImplementedError)
Damien George9528cd62014-01-15 21:23:31 +0000191Q(OSError)
Daniel Campora077812b2015-06-29 22:45:39 +0200192#if MICROPY_PY_BUILTINS_TIMEOUTERROR
193Q(TimeoutError)
194#endif
Paul Sokolovsky166bb402014-01-18 12:46:43 +0200195Q(OverflowError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000196Q(RuntimeError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000197Q(SyntaxError)
Damien George7a4ddd22014-05-24 23:32:19 +0100198Q(SystemExit)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000199Q(TypeError)
200Q(UnboundLocalError)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000201Q(ValueError)
Damien Georgec8b60f02015-04-20 13:29:31 +0000202#if MICROPY_EMIT_NATIVE
203Q(ViperTypeError)
204#endif
Rachel Dowdall300c8bd2014-03-20 22:40:38 +0000205Q(ZeroDivisionError)
Paul Sokolovsky71ebd4b2015-02-23 23:18:36 +0200206#if MICROPY_PY_BUILTINS_STR_UNICODE
207Q(UnicodeError)
208#endif
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000209
Damien George3ec0a1a2014-03-22 21:31:28 +0000210Q(None)
211Q(False)
212Q(True)
213Q(object)
Rachel Dowdall721c55d2014-03-22 15:28:16 +0000214
Damien Georgea71c83a2014-02-15 11:34:50 +0000215Q(NoneType)
216
Paul Sokolovsky0ef01d02015-03-18 01:25:04 +0200217#if MICROPY_PY_COLLECTIONS_ORDEREDDICT
218Q(OrderedDict)
219#endif
220
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000221Q(abs)
222Q(all)
223Q(any)
Paul Sokolovsky9512e9e2014-03-25 01:29:09 +0200224Q(args)
Damien Georgedd4f4532014-10-23 13:34:35 +0100225#if MICROPY_PY_ARRAY
Paul Sokolovsky427905c2014-01-18 19:24:47 +0200226Q(array)
Damien Georgedd4f4532014-10-23 13:34:35 +0100227#endif
Damien George897fe0c2014-04-15 22:03:55 +0100228Q(bin)
229Q({:#b})
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000230Q(bool)
Damien Georgedd4f4532014-10-23 13:34:35 +0100231#if MICROPY_PY_BUILTINS_BYTEARRAY
Paul Sokolovsky427905c2014-01-18 19:24:47 +0200232Q(bytearray)
Damien Georgedd4f4532014-10-23 13:34:35 +0100233#endif
234#if MICROPY_PY_BUILTINS_MEMORYVIEW
235Q(memoryview)
236#endif
Paul Sokolovskya80ff042014-01-20 20:32:50 +0200237Q(bytes)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000238Q(callable)
239Q(chr)
Damien George64131f32014-02-06 20:31:44 +0000240Q(classmethod)
Paul Sokolovsky48fdaad2014-04-13 10:17:04 +0300241Q(_collections)
Damien Georgef20375e2014-08-12 19:57:52 +0100242#if MICROPY_PY_BUILTINS_COMPLEX
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000243Q(complex)
Damien Georgef20375e2014-08-12 19:57:52 +0100244Q(real)
245Q(imag)
246#endif
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000247Q(dict)
Damien George4acb2452014-02-02 22:07:44 +0000248Q(dir)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000249Q(divmod)
Paul Sokolovsky8bf00082015-09-03 19:34:38 +0300250#if MICROPY_PY_BUILTINS_ENUMERATE
John R. Lenton9daa7892014-01-14 23:55:01 +0000251Q(enumerate)
Paul Sokolovsky8bf00082015-09-03 19:34:38 +0300252#endif
Damien Georged02c6d82014-01-15 22:14:03 +0000253Q(eval)
Damien Georgeca476792014-02-03 22:44:10 +0000254Q(exec)
Damien George2a3e2b92014-12-19 13:36:17 +0000255#if MICROPY_PY_BUILTINS_EXECFILE
256Q(execfile)
257#endif
Paul Sokolovsky22ff3972015-08-20 01:01:56 +0300258#if MICROPY_PY_BUILTINS_FILTER
John R. Lentonfca456b2014-01-15 01:37:08 +0000259Q(filter)
Paul Sokolovsky22ff3972015-08-20 01:01:56 +0300260#endif
Damien George75ec22b2014-08-12 20:16:03 +0100261#if MICROPY_PY_BUILTINS_FLOAT
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000262Q(float)
Damien George75ec22b2014-08-12 20:16:03 +0100263#endif
Paul Sokolovskya985b452014-04-09 00:40:58 +0300264Q(from_bytes)
Paul Sokolovskye9137b92014-03-26 23:35:13 +0200265Q(getattr)
stijnc1832fd2015-02-14 17:36:59 +0100266Q(setattr)
Paul Sokolovskycc0af3d2014-04-06 01:00:46 +0300267Q(globals)
Paul Sokolovskyff306662014-05-11 19:05:42 +0300268Q(hasattr)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000269Q(hash)
Damien George58051112014-04-15 12:42:52 +0100270Q(hex)
Damien Georgeb013aea2014-04-15 12:50:21 +0100271Q(%#x)
xbe0ebf8532014-02-01 19:00:41 -0800272Q(id)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000273Q(int)
Damien George004cdce2014-01-09 21:43:51 +0000274Q(isinstance)
275Q(issubclass)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000276Q(iter)
277Q(len)
278Q(list)
Paul Sokolovskycc0af3d2014-04-06 01:00:46 +0300279Q(locals)
John R. Lenton39b174e2014-01-15 01:10:09 +0000280Q(map)
pohmelie354e6882015-12-07 15:35:48 +0300281#if MICROPY_PY_BUILTINS_MIN_MAX
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000282Q(max)
283Q(min)
pohmeliec6ee2732015-12-07 15:45:43 +0300284Q(default)
pohmelie354e6882015-12-07 15:35:48 +0300285#endif
Paul Sokolovskyd08fd682014-02-27 22:22:04 +0200286Q(namedtuple)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000287Q(next)
Damien George897fe0c2014-04-15 22:03:55 +0100288Q(oct)
289Q(%#o)
Damien George27e735f2014-04-05 23:02:23 +0100290Q(open)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000291Q(ord)
Paul Sokolovskye11b17c2014-02-05 00:47:06 +0200292Q(path)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000293Q(pow)
294Q(print)
295Q(range)
Paul Sokolovsky27f5bdd2014-04-26 21:15:56 +0300296Q(read)
Damien Georgee2fb2ba2014-01-15 21:40:48 +0000297Q(repr)
Damien George4c03b3a2014-08-12 18:33:40 +0100298Q(reversed)
Damien George1559a972014-10-31 11:28:50 +0000299Q(round)
John R. Lenton5c768392014-01-13 05:12:50 +0000300Q(sorted)
Damien George64131f32014-02-06 20:31:44 +0000301Q(staticmethod)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000302Q(sum)
Damien George35e2a4e2014-02-05 00:51:47 +0000303Q(super)
Paul Sokolovsky36c44992014-01-13 19:20:46 +0200304Q(str)
Paul Sokolovsky0c59db12014-02-04 07:55:10 +0200305Q(sys)
Paul Sokolovskya985b452014-04-09 00:40:58 +0300306Q(to_bytes)
Damien George71c51812014-01-04 20:21:15 +0000307Q(tuple)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000308Q(type)
Paul Sokolovsky9512e9e2014-03-25 01:29:09 +0200309Q(value)
Paul Sokolovsky27f5bdd2014-04-26 21:15:56 +0300310Q(write)
John R. Lenton07205ec2014-01-13 02:31:00 +0000311Q(zip)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000312
Damien Georgec9fc6202014-10-25 21:59:14 +0100313#if MICROPY_PY_BUILTINS_COMPILE
314Q(compile)
315Q(code)
316Q(single)
317#endif
318
Damien George48815662014-04-02 10:34:44 +0100319Q(sep)
320Q(end)
321
Peter D. Grayb2a237d2015-03-06 14:48:14 -0500322#if MICROPY_PY_BUILTINS_RANGE_ATTRS
323Q(step)
324Q(stop)
325#endif
326
Damien Georgec12b2212014-03-26 20:15:40 +0000327Q(clear)
328Q(copy)
329Q(fromkeys)
330Q(get)
331Q(items)
332Q(keys)
333Q(pop)
334Q(popitem)
335Q(setdefault)
336Q(update)
337Q(values)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000338Q(append)
Damien Georgec12b2212014-03-26 20:15:40 +0000339Q(close)
340Q(send)
341Q(throw)
342Q(count)
343Q(extend)
344Q(index)
345Q(remove)
346Q(insert)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000347Q(pop)
348Q(sort)
349Q(join)
xbe7b0f39f2014-01-08 14:23:45 -0800350Q(strip)
Paul Sokolovsky88107842014-04-26 06:20:08 +0300351Q(lstrip)
352Q(rstrip)
Damien Georgeeb7bfcb2014-01-04 15:57:35 +0000353Q(format)
Damien George7d0bfbe2014-02-08 19:01:47 +0000354Q(key)
355Q(reverse)
Damien Georgec12b2212014-03-26 20:15:40 +0000356Q(add)
357Q(clear)
358Q(copy)
Damien Georgec12b2212014-03-26 20:15:40 +0000359Q(pop)
360Q(remove)
Damien Georgec12b2212014-03-26 20:15:40 +0000361Q(find)
362Q(rfind)
xbe3d9a39e2014-04-08 11:42:19 -0700363Q(rindex)
Damien Georgec12b2212014-03-26 20:15:40 +0000364Q(split)
Paul Sokolovskyac2f7a72015-04-04 00:09:23 +0300365#if MICROPY_PY_BUILTINS_STR_SPLITLINES
366Q(splitlines)
367Q(keepends)
368Q(\n)
369#endif
Paul Sokolovsky2a273652014-05-13 08:07:08 +0300370Q(rsplit)
Damien Georgec12b2212014-03-26 20:15:40 +0000371Q(startswith)
Paul Sokolovskyd098c6b2014-05-24 22:46:51 +0300372Q(endswith)
Damien Georgec12b2212014-03-26 20:15:40 +0000373Q(replace)
374Q(partition)
375Q(rpartition)
Paul Sokolovsky69135212014-05-10 19:47:41 +0300376Q(lower)
377Q(upper)
Kim Bautersa3f4b832014-05-31 07:30:03 +0100378Q(isspace)
379Q(isalpha)
380Q(isdigit)
381Q(isupper)
382Q(islower)
Damien George491cbd62014-05-06 16:38:54 +0000383Q(iterable)
384Q(start)
Paul Sokolovskyab5d0822014-01-24 00:22:00 +0200385
Damien Georgea71c83a2014-02-15 11:34:50 +0000386Q(bound_method)
387Q(closure)
388Q(dict_view)
389Q(function)
390Q(generator)
391Q(iterator)
392Q(module)
393Q(slice)
394
Damien George75ec22b2014-08-12 20:16:03 +0100395#if MICROPY_PY_BUILTINS_SET
396Q(discard)
397Q(difference)
398Q(difference_update)
399Q(intersection)
400Q(intersection_update)
401Q(isdisjoint)
402Q(issubset)
403Q(issuperset)
404Q(set)
405Q(symmetric_difference)
406Q(symmetric_difference_update)
407Q(union)
408Q(update)
409#endif
410
Damien Georgefb510b32014-06-01 13:32:54 +0100411#if MICROPY_PY_BUILTINS_FROZENSET
Paul Sokolovskyb181b582014-05-10 16:02:17 +0300412Q(frozenset)
413#endif
414
Damien Georgeee3fd462014-05-24 23:03:12 +0100415#if MICROPY_PY_MATH || MICROPY_PY_CMATH
Damien George0c36da02014-03-08 15:24:39 +0000416Q(math)
Damien Georgea9256392014-03-20 16:39:22 +0000417Q(e)
Damien George0c36da02014-03-08 15:24:39 +0000418Q(pi)
419Q(sqrt)
420Q(pow)
421Q(exp)
Damien Georgea24eafa2015-11-17 14:10:13 +0000422#if MICROPY_PY_MATH_SPECIAL_FUNCTIONS
Damien George8854e1f2014-03-12 21:31:41 +0000423Q(expm1)
Damien Georgea24eafa2015-11-17 14:10:13 +0000424#endif
Damien George0c36da02014-03-08 15:24:39 +0000425Q(log)
Damien Georgea24eafa2015-11-17 14:10:13 +0000426#if MICROPY_PY_MATH_SPECIAL_FUNCTIONS
Damien George0c36da02014-03-08 15:24:39 +0000427Q(log2)
428Q(log10)
429Q(cosh)
430Q(sinh)
431Q(tanh)
432Q(acosh)
433Q(asinh)
434Q(atanh)
Damien Georgea24eafa2015-11-17 14:10:13 +0000435#endif
Damien George0c36da02014-03-08 15:24:39 +0000436Q(cos)
437Q(sin)
438Q(tan)
439Q(acos)
440Q(asin)
441Q(atan)
442Q(atan2)
Rachel Dowdall5a14a1d2014-03-20 21:26:51 +0000443Q(ceil)
444Q(copysign)
445Q(fabs)
Rachel Dowdall5a14a1d2014-03-20 21:26:51 +0000446Q(fmod)
Rachel Dowdall249b9c72014-03-22 14:39:33 +0000447Q(floor)
Rachel Dowdall5a14a1d2014-03-20 21:26:51 +0000448Q(isfinite)
449Q(isinf)
450Q(isnan)
451Q(trunc)
Rachel Dowdall249b9c72014-03-22 14:39:33 +0000452Q(modf)
453Q(frexp)
454Q(ldexp)
455Q(degrees)
456Q(radians)
Damien George5cbeace2015-02-22 14:48:18 +0000457#if MICROPY_PY_MATH_SPECIAL_FUNCTIONS
Rachel Dowdall249b9c72014-03-22 14:39:33 +0000458Q(erf)
459Q(erfc)
460Q(gamma)
461Q(lgamma)
Damien Georgedbdfee12014-04-17 17:11:03 +0100462#endif
Damien George5cbeace2015-02-22 14:48:18 +0000463#endif
Damien Georgedbdfee12014-04-17 17:11:03 +0100464
Damien Georgeee3fd462014-05-24 23:03:12 +0100465#if MICROPY_PY_CMATH
Damien Georgedbdfee12014-04-17 17:11:03 +0100466Q(cmath)
467Q(phase)
468Q(polar)
469Q(rect)
470#endif
Damien George0c36da02014-03-08 15:24:39 +0000471
Damien George89deec02015-01-09 20:12:54 +0000472#if MICROPY_PY_MICROPYTHON_MEM_INFO
Damien George75ec22b2014-08-12 20:16:03 +0100473#if MICROPY_MEM_STATS
Damien George0c36da02014-03-08 15:24:39 +0000474Q(mem_total)
475Q(mem_current)
476Q(mem_peak)
Damien George89deec02015-01-09 20:12:54 +0000477#endif
Paul Sokolovsky6e8ff9c2014-12-01 20:41:56 +0200478Q(mem_info)
479Q(qstr_info)
Damien Georgedf4ce932016-01-22 16:16:38 +0000480#if MICROPY_STACK_CHECK
481Q(stack_use)
482#endif
483#endif
484#if MICROPY_ENABLE_GC
485Q(heap_lock)
486Q(heap_unlock)
Damien George75ec22b2014-08-12 20:16:03 +0100487#endif
Damien George0c36da02014-03-08 15:24:39 +0000488
Dave Hylands5b7fd202014-07-01 23:46:53 -0700489#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF && (MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE == 0)
490Q(alloc_emergency_exception_buf)
491#endif
Paul Sokolovskye8432b32015-02-15 22:34:31 +0300492Q(maximum recursion depth exceeded)
Dave Hylands5b7fd202014-07-01 23:46:53 -0700493
Paul Sokolovskyab5d0822014-01-24 00:22:00 +0200494Q(<module>)
495Q(<lambda>)
496Q(<listcomp>)
497Q(<dictcomp>)
498Q(<setcomp>)
499Q(<genexpr>)
Damien Georgeb829b5c2014-01-25 13:51:19 +0000500Q(<string>)
Paul Sokolovskyab5d0822014-01-24 00:22:00 +0200501Q(<stdin>)
Paul Sokolovsky73b70272014-04-13 05:28:46 +0300502
503#if MICROPY_CPYTHON_COMPAT
504Q(encode)
505Q(decode)
506Q(utf-8)
507#endif
Paul Sokolovskya3e50ea2014-04-13 06:55:24 +0300508
Damien Georgeee3fd462014-05-24 23:03:12 +0100509#if MICROPY_PY_SYS
Paul Sokolovskya3e50ea2014-04-13 06:55:24 +0300510Q(argv)
Paul Sokolovsky978d2c02014-04-13 09:53:52 +0300511Q(byteorder)
512Q(big)
Paul Sokolovskyd99e9082014-05-10 16:50:45 +0300513Q(exit)
Paul Sokolovsky978d2c02014-04-13 09:53:52 +0300514Q(little)
Paul Sokolovskyb9b93542014-06-07 23:40:04 +0300515#ifdef MICROPY_PY_SYS_PLATFORM
516Q(platform)
517#endif
Paul Sokolovskya3e50ea2014-04-13 06:55:24 +0300518Q(stdin)
519Q(stdout)
520Q(stderr)
Damien George3c4b5d42015-05-13 23:49:21 +0100521#if MICROPY_PY_SYS_STDIO_BUFFER
522Q(buffer)
523#endif
Paul Sokolovskybbae42d2014-04-14 01:46:45 +0300524Q(version)
Paul Sokolovskybaaaf652014-04-13 09:46:58 +0300525Q(version_info)
Damien Georgec3184ae2015-04-21 14:45:04 +0000526#if MICROPY_PY_ATTRTUPLE
527Q(name)
528#endif
529Q(implementation)
Paul Sokolovsky4e0eeeb2014-07-03 16:50:11 +0300530#if MICROPY_PY_SYS_MAXSIZE
531Q(maxsize)
532#endif
Paul Sokolovsky1a1d11f2015-12-05 00:09:10 +0200533#if MICROPY_PY_SYS_MODULES
534Q(modules)
535#endif
Paul Sokolovsky8b85d142015-04-25 03:17:41 +0300536#if MICROPY_PY_SYS_EXC_INFO
537Q(exc_info)
538#endif
Paul Sokolovsky46c3ab22014-12-06 14:29:09 +0200539Q(print_exception)
Paul Sokolovskya3e50ea2014-04-13 06:55:24 +0300540#endif
Damien George777b0f32014-04-13 18:59:45 +0100541
Damien Georgeee3fd462014-05-24 23:03:12 +0100542#if MICROPY_PY_STRUCT
Dave Hylands0dce9a22015-12-27 13:41:12 -0800543Q(struct)
Paul Sokolovsky3d3ef362015-05-04 16:35:40 +0300544Q(ustruct)
Paul Sokolovsky62044602014-04-19 03:13:15 +0300545Q(pack)
Dave Hylandsa17755e2015-12-23 19:11:27 -0800546Q(pack_into)
Paul Sokolovsky62044602014-04-19 03:13:15 +0300547Q(unpack)
Dave Hylandsa17755e2015-12-23 19:11:27 -0800548Q(unpack_from)
Paul Sokolovsky1829d862015-05-04 15:50:05 +0300549Q(calcsize)
Paul Sokolovsky62044602014-04-19 03:13:15 +0300550#endif
551
Paul Sokolovsky82158472014-06-28 03:03:47 +0300552#if MICROPY_PY_UCTYPES
553Q(uctypes)
Paul Sokolovsky3d3ef362015-05-04 16:35:40 +0300554Q(struct)
Paul Sokolovsky82158472014-06-28 03:03:47 +0300555Q(sizeof)
556Q(addressof)
557Q(bytes_at)
558Q(bytearray_at)
559
560Q(NATIVE)
561Q(LITTLE_ENDIAN)
562Q(BIG_ENDIAN)
563
564Q(VOID)
565
566Q(UINT8)
567Q(INT8)
568Q(UINT16)
569Q(INT16)
570Q(UINT32)
571Q(INT32)
572Q(UINT64)
573Q(INT64)
574
575Q(BFUINT8)
576Q(BFINT8)
577Q(BFUINT16)
578Q(BFINT16)
579Q(BFUINT32)
580Q(BFINT32)
581
582Q(FLOAT32)
583Q(FLOAT64)
584
585Q(ARRAY)
586Q(PTR)
587//Q(BITFIELD)
Paul Sokolovsky2097c8b2014-07-11 00:06:36 +0300588
589Q(BF_POS)
590Q(BF_LEN)
Paul Sokolovsky82158472014-06-28 03:03:47 +0300591#endif
592
Damien Georgeee3fd462014-05-24 23:03:12 +0100593#if MICROPY_PY_IO
Paul Sokolovskyfbdf2f12014-06-12 01:22:25 +0300594Q(_io)
Paul Sokolovsky27f5bdd2014-04-26 21:15:56 +0300595Q(readall)
Paul Sokolovsky1a55b6a2014-10-18 22:44:07 +0300596Q(readinto)
Paul Sokolovsky27f5bdd2014-04-26 21:15:56 +0300597Q(readline)
Damien Georged5f5b2f2014-05-03 22:01:32 +0100598Q(readlines)
Paul Sokolovsky838eb1f2014-11-17 00:16:14 +0200599Q(seek)
blmorrisbdd78c32015-08-04 19:45:30 -0400600Q(tell)
Paul Sokolovsky9e296662014-05-19 20:59:13 +0300601Q(FileIO)
602Q(TextIOWrapper)
Paul Sokolovskycb9dc082014-04-26 20:26:14 +0300603Q(StringIO)
604Q(BytesIO)
605Q(getvalue)
Paul Sokolovskycb66f412014-07-13 23:07:42 +0300606Q(file)
stijn2fe4cf72014-10-04 08:51:33 +0200607Q(mode)
608Q(r)
609Q(encoding)
Paul Sokolovskycb9dc082014-04-26 20:26:14 +0300610#endif
611
Damien Georgeee3fd462014-05-24 23:03:12 +0100612#if MICROPY_PY_GC
Paul Sokolovskyf9e54e02014-05-06 02:16:43 +0300613Q(gc)
614Q(collect)
Damien George8c1c7482014-05-08 23:04:49 +0100615Q(disable)
616Q(enable)
Damien George109c1de2014-10-31 21:30:46 +0000617Q(isenabled)
Paul Sokolovsky5aa740c2014-06-24 21:23:40 +0300618Q(mem_free)
619Q(mem_alloc)
Paul Sokolovskyf9e54e02014-05-06 02:16:43 +0300620#endif
621
Damien Georgefb510b32014-06-01 13:32:54 +0100622#if MICROPY_PY_BUILTINS_PROPERTY
Damien George777b0f32014-04-13 18:59:45 +0100623Q(property)
624Q(getter)
625Q(setter)
626Q(deleter)
chrysnf8ba2ec2016-01-13 12:29:17 +0100627Q(doc)
Damien George777b0f32014-04-13 18:59:45 +0100628#endif
Paul Sokolovsky510296f2014-08-08 22:51:40 +0300629
Paul Sokolovsky34162872014-10-12 08:16:34 -0700630#if MICROPY_PY_UZLIB
631Q(uzlib)
632Q(decompress)
633#endif
634
Damien George612045f2014-09-17 22:56:34 +0100635#if MICROPY_PY_UJSON
636Q(ujson)
637Q(dumps)
Damien George89e46572014-09-21 11:40:01 +0100638Q(loads)
Damien George612045f2014-09-17 22:56:34 +0100639#endif
Paul Sokolovskyc71e0452014-09-12 18:48:07 +0300640
641#if MICROPY_PY_URE
642Q(ure)
643Q(compile)
644Q(match)
645Q(search)
646Q(group)
647Q(DEBUG)
648#endif
Damien Georgef5d69792014-10-22 17:37:18 +0000649
650#if MICROPY_PY_UHEAPQ
651Q(uheapq)
652Q(heappush)
653Q(heappop)
654Q(heapify)
655#endif
Paul Sokolovskyf4b19c82014-11-22 01:19:13 +0200656
657#if MICROPY_PY_UHASHLIB
658Q(uhashlib)
659Q(update)
660Q(digest)
Paul Sokolovskyf4b19c82014-11-22 01:19:13 +0200661Q(sha256)
Paul Sokolovskyee1656e2016-01-24 20:52:54 +0200662Q(sha1)
Paul Sokolovskyf4b19c82014-11-22 01:19:13 +0200663#endif
Paul Sokolovskybfdc2052014-11-29 06:19:30 +0200664
665#if MICROPY_PY_UBINASCII
666Q(ubinascii)
667Q(hexlify)
Dave Hylands3ad94d62015-05-18 14:41:25 -0700668Q(unhexlify)
Galen Hazelwood616986a2015-07-01 22:15:06 -0700669Q(a2b_base64)
670Q(b2a_base64)
Paul Sokolovskybfdc2052014-11-29 06:19:30 +0200671#endif
Paul Sokolovsky01162182015-05-03 20:25:40 +0300672
673#if MICROPY_PY_MACHINE
Paul Sokolovsky2eb844e2015-12-18 02:35:33 +0200674Q(umachine)
Paul Sokolovsky01162182015-05-03 20:25:40 +0300675Q(mem)
676Q(mem8)
677Q(mem16)
678Q(mem32)
679#endif
Paul Sokolovskyaaa88672015-10-06 18:10:00 +0300680
681#if MICROPY_PY_USSL
682Q(ussl)
683Q(wrap_socket)
684#endif
Paul Sokolovskye0d77402015-10-27 00:04:33 +0300685
686#if MICROPY_PY_LWIP
687// for lwip module
688Q(lwip)
689Q(reset)
690Q(callback)
691Q(socket)
692Q(AF_INET)
693Q(AF_INET6)
694Q(SOCK_STREAM)
695Q(SOCK_DGRAM)
696Q(SOCK_RAW)
697// for lwip.socket
698Q(close)
699Q(bind)
700Q(listen)
701Q(accept)
702Q(connect)
703Q(send)
704Q(recv)
705Q(sendto)
706Q(recvfrom)
707Q(settimeout)
Paul Sokolovskyed593782015-12-31 22:54:28 +0200708Q(setsockopt)
Paul Sokolovskyf1919b72016-01-01 07:31:16 +0200709Q(makefile)
Paul Sokolovskye0d77402015-10-27 00:04:33 +0300710#if MICROPY_PY_LWIP_SLIP
711// for lwip.slip
712Q(slip)
713Q(status)
714#endif
715#endif
Paul Sokolovskyb4c65c22015-12-25 19:11:37 +0200716
717#if MICROPY_FSUSERMOUNT
718// for user-mountable block devices
719Q(mount)
Damien George0e0ce472016-02-10 16:28:02 +0000720Q(umount)
Paul Sokolovskyb4c65c22015-12-25 19:11:37 +0200721Q(readonly)
722Q(mkfs)
Paul Sokolovskycd6d1892016-02-28 17:17:24 +0200723Q(listdir)
Damien George4f72aa82016-02-29 10:54:00 +0000724Q(mkdir)
725Q(remove)
Paul Sokolovskye0821832016-02-29 01:22:38 +0200726Q(rename)
Paul Sokolovskyb4c65c22015-12-25 19:11:37 +0200727Q(readblocks)
728Q(writeblocks)
Damien Georgec33ad602016-02-09 14:28:50 +0000729Q(ioctl)
Paul Sokolovskyb4c65c22015-12-25 19:11:37 +0200730Q(sync)
731Q(count)
732#endif
Paul Sokolovsky00ee84e2016-01-01 14:19:26 +0200733
734#if MICROPY_PY_OS_DUPTERM
735Q(dupterm)
736#endif
Paul Sokolovskya58a91e2016-01-17 12:10:28 +0200737
738#if MICROPY_PY_URANDOM
739Q(urandom)
740Q(getrandbits)
741Q(seed)
Damien Georgea53af6c2016-01-22 16:19:32 +0000742#if MICROPY_PY_URANDOM_EXTRA_FUNCS
743Q(randrange)
744Q(randint)
745Q(choice)
746Q(random)
747Q(uniform)
748#endif
Paul Sokolovskya58a91e2016-01-17 12:10:28 +0200749#endif
Paul Sokolovsky6cee8692016-02-15 12:48:51 +0200750
751#if MICROPY_VFS_FAT
752Q(VfsFat)
753Q(flush)
754#endif