Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
py/vmentrytable.h@0:5868e8752d44, 2016-04-16 (annotated)
- Committer:
- pythontech
- Date:
- Sat Apr 16 17:11:56 2016 +0000
- Revision:
- 0:5868e8752d44
Split off library from repl
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pythontech | 0:5868e8752d44 | 1 | /* |
| pythontech | 0:5868e8752d44 | 2 | * This file is part of the Micro Python project, http://micropython.org/ |
| pythontech | 0:5868e8752d44 | 3 | * |
| pythontech | 0:5868e8752d44 | 4 | * The MIT License (MIT) |
| pythontech | 0:5868e8752d44 | 5 | * |
| pythontech | 0:5868e8752d44 | 6 | * Copyright (c) 2013, 2014 Damien P. George |
| pythontech | 0:5868e8752d44 | 7 | * |
| pythontech | 0:5868e8752d44 | 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| pythontech | 0:5868e8752d44 | 9 | * of this software and associated documentation files (the "Software"), to deal |
| pythontech | 0:5868e8752d44 | 10 | * in the Software without restriction, including without limitation the rights |
| pythontech | 0:5868e8752d44 | 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| pythontech | 0:5868e8752d44 | 12 | * copies of the Software, and to permit persons to whom the Software is |
| pythontech | 0:5868e8752d44 | 13 | * furnished to do so, subject to the following conditions: |
| pythontech | 0:5868e8752d44 | 14 | * |
| pythontech | 0:5868e8752d44 | 15 | * The above copyright notice and this permission notice shall be included in |
| pythontech | 0:5868e8752d44 | 16 | * all copies or substantial portions of the Software. |
| pythontech | 0:5868e8752d44 | 17 | * |
| pythontech | 0:5868e8752d44 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| pythontech | 0:5868e8752d44 | 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| pythontech | 0:5868e8752d44 | 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| pythontech | 0:5868e8752d44 | 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| pythontech | 0:5868e8752d44 | 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| pythontech | 0:5868e8752d44 | 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| pythontech | 0:5868e8752d44 | 24 | * THE SOFTWARE. |
| pythontech | 0:5868e8752d44 | 25 | */ |
| pythontech | 0:5868e8752d44 | 26 | |
| pythontech | 0:5868e8752d44 | 27 | #if __clang__ |
| pythontech | 0:5868e8752d44 | 28 | #pragma clang diagnostic push |
| pythontech | 0:5868e8752d44 | 29 | #pragma clang diagnostic ignored "-Winitializer-overrides" |
| pythontech | 0:5868e8752d44 | 30 | #endif // __clang__ |
| pythontech | 0:5868e8752d44 | 31 | |
| pythontech | 0:5868e8752d44 | 32 | static void* entry_table[256] = { |
| pythontech | 0:5868e8752d44 | 33 | [0 ... 255] = &&entry_default, |
| pythontech | 0:5868e8752d44 | 34 | [MP_BC_LOAD_CONST_FALSE] = &&entry_MP_BC_LOAD_CONST_FALSE, |
| pythontech | 0:5868e8752d44 | 35 | [MP_BC_LOAD_CONST_NONE] = &&entry_MP_BC_LOAD_CONST_NONE, |
| pythontech | 0:5868e8752d44 | 36 | [MP_BC_LOAD_CONST_TRUE] = &&entry_MP_BC_LOAD_CONST_TRUE, |
| pythontech | 0:5868e8752d44 | 37 | [MP_BC_LOAD_CONST_SMALL_INT] = &&entry_MP_BC_LOAD_CONST_SMALL_INT, |
| pythontech | 0:5868e8752d44 | 38 | [MP_BC_LOAD_CONST_STRING] = &&entry_MP_BC_LOAD_CONST_STRING, |
| pythontech | 0:5868e8752d44 | 39 | [MP_BC_LOAD_CONST_OBJ] = &&entry_MP_BC_LOAD_CONST_OBJ, |
| pythontech | 0:5868e8752d44 | 40 | [MP_BC_LOAD_NULL] = &&entry_MP_BC_LOAD_NULL, |
| pythontech | 0:5868e8752d44 | 41 | [MP_BC_LOAD_FAST_N] = &&entry_MP_BC_LOAD_FAST_N, |
| pythontech | 0:5868e8752d44 | 42 | [MP_BC_LOAD_DEREF] = &&entry_MP_BC_LOAD_DEREF, |
| pythontech | 0:5868e8752d44 | 43 | [MP_BC_LOAD_NAME] = &&entry_MP_BC_LOAD_NAME, |
| pythontech | 0:5868e8752d44 | 44 | [MP_BC_LOAD_GLOBAL] = &&entry_MP_BC_LOAD_GLOBAL, |
| pythontech | 0:5868e8752d44 | 45 | [MP_BC_LOAD_ATTR] = &&entry_MP_BC_LOAD_ATTR, |
| pythontech | 0:5868e8752d44 | 46 | [MP_BC_LOAD_METHOD] = &&entry_MP_BC_LOAD_METHOD, |
| pythontech | 0:5868e8752d44 | 47 | [MP_BC_LOAD_BUILD_CLASS] = &&entry_MP_BC_LOAD_BUILD_CLASS, |
| pythontech | 0:5868e8752d44 | 48 | [MP_BC_LOAD_SUBSCR] = &&entry_MP_BC_LOAD_SUBSCR, |
| pythontech | 0:5868e8752d44 | 49 | [MP_BC_STORE_FAST_N] = &&entry_MP_BC_STORE_FAST_N, |
| pythontech | 0:5868e8752d44 | 50 | [MP_BC_STORE_DEREF] = &&entry_MP_BC_STORE_DEREF, |
| pythontech | 0:5868e8752d44 | 51 | [MP_BC_STORE_NAME] = &&entry_MP_BC_STORE_NAME, |
| pythontech | 0:5868e8752d44 | 52 | [MP_BC_STORE_GLOBAL] = &&entry_MP_BC_STORE_GLOBAL, |
| pythontech | 0:5868e8752d44 | 53 | [MP_BC_STORE_ATTR] = &&entry_MP_BC_STORE_ATTR, |
| pythontech | 0:5868e8752d44 | 54 | [MP_BC_STORE_SUBSCR] = &&entry_MP_BC_STORE_SUBSCR, |
| pythontech | 0:5868e8752d44 | 55 | [MP_BC_DELETE_FAST] = &&entry_MP_BC_DELETE_FAST, |
| pythontech | 0:5868e8752d44 | 56 | [MP_BC_DELETE_DEREF] = &&entry_MP_BC_DELETE_DEREF, |
| pythontech | 0:5868e8752d44 | 57 | [MP_BC_DELETE_NAME] = &&entry_MP_BC_DELETE_NAME, |
| pythontech | 0:5868e8752d44 | 58 | [MP_BC_DELETE_GLOBAL] = &&entry_MP_BC_DELETE_GLOBAL, |
| pythontech | 0:5868e8752d44 | 59 | [MP_BC_DUP_TOP] = &&entry_MP_BC_DUP_TOP, |
| pythontech | 0:5868e8752d44 | 60 | [MP_BC_DUP_TOP_TWO] = &&entry_MP_BC_DUP_TOP_TWO, |
| pythontech | 0:5868e8752d44 | 61 | [MP_BC_POP_TOP] = &&entry_MP_BC_POP_TOP, |
| pythontech | 0:5868e8752d44 | 62 | [MP_BC_ROT_TWO] = &&entry_MP_BC_ROT_TWO, |
| pythontech | 0:5868e8752d44 | 63 | [MP_BC_ROT_THREE] = &&entry_MP_BC_ROT_THREE, |
| pythontech | 0:5868e8752d44 | 64 | [MP_BC_JUMP] = &&entry_MP_BC_JUMP, |
| pythontech | 0:5868e8752d44 | 65 | [MP_BC_POP_JUMP_IF_TRUE] = &&entry_MP_BC_POP_JUMP_IF_TRUE, |
| pythontech | 0:5868e8752d44 | 66 | [MP_BC_POP_JUMP_IF_FALSE] = &&entry_MP_BC_POP_JUMP_IF_FALSE, |
| pythontech | 0:5868e8752d44 | 67 | [MP_BC_JUMP_IF_TRUE_OR_POP] = &&entry_MP_BC_JUMP_IF_TRUE_OR_POP, |
| pythontech | 0:5868e8752d44 | 68 | [MP_BC_JUMP_IF_FALSE_OR_POP] = &&entry_MP_BC_JUMP_IF_FALSE_OR_POP, |
| pythontech | 0:5868e8752d44 | 69 | [MP_BC_SETUP_WITH] = &&entry_MP_BC_SETUP_WITH, |
| pythontech | 0:5868e8752d44 | 70 | [MP_BC_WITH_CLEANUP] = &&entry_MP_BC_WITH_CLEANUP, |
| pythontech | 0:5868e8752d44 | 71 | [MP_BC_UNWIND_JUMP] = &&entry_MP_BC_UNWIND_JUMP, |
| pythontech | 0:5868e8752d44 | 72 | [MP_BC_SETUP_EXCEPT] = &&entry_MP_BC_SETUP_EXCEPT, |
| pythontech | 0:5868e8752d44 | 73 | [MP_BC_SETUP_FINALLY] = &&entry_MP_BC_SETUP_FINALLY, |
| pythontech | 0:5868e8752d44 | 74 | [MP_BC_END_FINALLY] = &&entry_MP_BC_END_FINALLY, |
| pythontech | 0:5868e8752d44 | 75 | [MP_BC_GET_ITER] = &&entry_MP_BC_GET_ITER, |
| pythontech | 0:5868e8752d44 | 76 | [MP_BC_FOR_ITER] = &&entry_MP_BC_FOR_ITER, |
| pythontech | 0:5868e8752d44 | 77 | [MP_BC_POP_BLOCK] = &&entry_MP_BC_POP_BLOCK, |
| pythontech | 0:5868e8752d44 | 78 | [MP_BC_POP_EXCEPT] = &&entry_MP_BC_POP_EXCEPT, |
| pythontech | 0:5868e8752d44 | 79 | [MP_BC_BUILD_TUPLE] = &&entry_MP_BC_BUILD_TUPLE, |
| pythontech | 0:5868e8752d44 | 80 | [MP_BC_BUILD_LIST] = &&entry_MP_BC_BUILD_LIST, |
| pythontech | 0:5868e8752d44 | 81 | [MP_BC_LIST_APPEND] = &&entry_MP_BC_LIST_APPEND, |
| pythontech | 0:5868e8752d44 | 82 | [MP_BC_BUILD_MAP] = &&entry_MP_BC_BUILD_MAP, |
| pythontech | 0:5868e8752d44 | 83 | [MP_BC_STORE_MAP] = &&entry_MP_BC_STORE_MAP, |
| pythontech | 0:5868e8752d44 | 84 | [MP_BC_MAP_ADD] = &&entry_MP_BC_MAP_ADD, |
| pythontech | 0:5868e8752d44 | 85 | #if MICROPY_PY_BUILTINS_SET |
| pythontech | 0:5868e8752d44 | 86 | [MP_BC_BUILD_SET] = &&entry_MP_BC_BUILD_SET, |
| pythontech | 0:5868e8752d44 | 87 | [MP_BC_SET_ADD] = &&entry_MP_BC_SET_ADD, |
| pythontech | 0:5868e8752d44 | 88 | #endif |
| pythontech | 0:5868e8752d44 | 89 | #if MICROPY_PY_BUILTINS_SLICE |
| pythontech | 0:5868e8752d44 | 90 | [MP_BC_BUILD_SLICE] = &&entry_MP_BC_BUILD_SLICE, |
| pythontech | 0:5868e8752d44 | 91 | #endif |
| pythontech | 0:5868e8752d44 | 92 | [MP_BC_UNPACK_SEQUENCE] = &&entry_MP_BC_UNPACK_SEQUENCE, |
| pythontech | 0:5868e8752d44 | 93 | [MP_BC_UNPACK_EX] = &&entry_MP_BC_UNPACK_EX, |
| pythontech | 0:5868e8752d44 | 94 | [MP_BC_MAKE_FUNCTION] = &&entry_MP_BC_MAKE_FUNCTION, |
| pythontech | 0:5868e8752d44 | 95 | [MP_BC_MAKE_FUNCTION_DEFARGS] = &&entry_MP_BC_MAKE_FUNCTION_DEFARGS, |
| pythontech | 0:5868e8752d44 | 96 | [MP_BC_MAKE_CLOSURE] = &&entry_MP_BC_MAKE_CLOSURE, |
| pythontech | 0:5868e8752d44 | 97 | [MP_BC_MAKE_CLOSURE_DEFARGS] = &&entry_MP_BC_MAKE_CLOSURE_DEFARGS, |
| pythontech | 0:5868e8752d44 | 98 | [MP_BC_CALL_FUNCTION] = &&entry_MP_BC_CALL_FUNCTION, |
| pythontech | 0:5868e8752d44 | 99 | [MP_BC_CALL_FUNCTION_VAR_KW] = &&entry_MP_BC_CALL_FUNCTION_VAR_KW, |
| pythontech | 0:5868e8752d44 | 100 | [MP_BC_CALL_METHOD] = &&entry_MP_BC_CALL_METHOD, |
| pythontech | 0:5868e8752d44 | 101 | [MP_BC_CALL_METHOD_VAR_KW] = &&entry_MP_BC_CALL_METHOD_VAR_KW, |
| pythontech | 0:5868e8752d44 | 102 | [MP_BC_RETURN_VALUE] = &&entry_MP_BC_RETURN_VALUE, |
| pythontech | 0:5868e8752d44 | 103 | [MP_BC_RAISE_VARARGS] = &&entry_MP_BC_RAISE_VARARGS, |
| pythontech | 0:5868e8752d44 | 104 | [MP_BC_YIELD_VALUE] = &&entry_MP_BC_YIELD_VALUE, |
| pythontech | 0:5868e8752d44 | 105 | [MP_BC_YIELD_FROM] = &&entry_MP_BC_YIELD_FROM, |
| pythontech | 0:5868e8752d44 | 106 | [MP_BC_IMPORT_NAME] = &&entry_MP_BC_IMPORT_NAME, |
| pythontech | 0:5868e8752d44 | 107 | [MP_BC_IMPORT_FROM] = &&entry_MP_BC_IMPORT_FROM, |
| pythontech | 0:5868e8752d44 | 108 | [MP_BC_IMPORT_STAR] = &&entry_MP_BC_IMPORT_STAR, |
| pythontech | 0:5868e8752d44 | 109 | [MP_BC_LOAD_CONST_SMALL_INT_MULTI ... MP_BC_LOAD_CONST_SMALL_INT_MULTI + 63] = &&entry_MP_BC_LOAD_CONST_SMALL_INT_MULTI, |
| pythontech | 0:5868e8752d44 | 110 | [MP_BC_LOAD_FAST_MULTI ... MP_BC_LOAD_FAST_MULTI + 15] = &&entry_MP_BC_LOAD_FAST_MULTI, |
| pythontech | 0:5868e8752d44 | 111 | [MP_BC_STORE_FAST_MULTI ... MP_BC_STORE_FAST_MULTI + 15] = &&entry_MP_BC_STORE_FAST_MULTI, |
| pythontech | 0:5868e8752d44 | 112 | [MP_BC_UNARY_OP_MULTI ... MP_BC_UNARY_OP_MULTI + 6] = &&entry_MP_BC_UNARY_OP_MULTI, |
| pythontech | 0:5868e8752d44 | 113 | [MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + 35] = &&entry_MP_BC_BINARY_OP_MULTI, |
| pythontech | 0:5868e8752d44 | 114 | }; |
| pythontech | 0:5868e8752d44 | 115 | |
| pythontech | 0:5868e8752d44 | 116 | #if __clang__ |
| pythontech | 0:5868e8752d44 | 117 | #pragma clang diagnostic pop |
| pythontech | 0:5868e8752d44 | 118 | #endif // __clang__ |