summaryrefslogtreecommitdiff
path: root/py/scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/scope.c')
-rw-r--r--py/scope.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/py/scope.c b/py/scope.c
index 4739ac323..f9b1fb122 100644
--- a/py/scope.c
+++ b/py/scope.c
@@ -149,59 +149,3 @@ void scope_close_over_in_parents(scope_t *scope, qstr qst) {
}
assert(0); // we should have found the variable in one of the parents
}
-
-#if MICROPY_EMIT_CPYTHON
-#include <stdio.h>
-
-void scope_print_info(scope_t *s) {
- if (s->kind == SCOPE_MODULE) {
- printf("code <module>\n");
- } else if (s->kind == SCOPE_LAMBDA) {
- printf("code <lambda>\n");
- } else if (s->kind == SCOPE_LIST_COMP) {
- printf("code <listcomp>\n");
- } else if (s->kind == SCOPE_DICT_COMP) {
- printf("code <dictcomp>\n");
- } else if (s->kind == SCOPE_SET_COMP) {
- printf("code <setcomp>\n");
- } else if (s->kind == SCOPE_GEN_EXPR) {
- printf("code <genexpr>\n");
- } else {
- printf("code %s\n", qstr_str(s->simple_name));
- }
- /*
- printf("var global:");
- for (int i = 0; i < s->id_info_len; i++) {
- if (s->id_info[i].kind == ID_INFO_KIND_GLOBAL_EXPLICIT) {
- printf(" %s", qstr_str(s->id_info[i].qst));
- }
- }
- printf("\n");
- printf("var name:");
- for (int i = 0; i < s->id_info_len; i++) {
- if (s->id_info[i].kind == ID_INFO_KIND_GLOBAL_IMPLICIT) {
- printf(" %s", qstr_str(s->id_info[i].qst));
- }
- }
- printf("\n");
- printf("var local:");
- for (int i = 0; i < s->id_info_len; i++) {
- if (s->id_info[i].kind == ID_INFO_KIND_LOCAL) {
- printf(" %s", qstr_str(s->id_info[i].qst));
- }
- }
- printf("\n");
- printf("var free:");
- for (int i = 0; i < s->id_info_len; i++) {
- if (s->id_info[i].kind == ID_INFO_KIND_FREE) {
- printf(" %s", qstr_str(s->id_info[i].qst));
- }
- }
- printf("\n");
- */
- printf(" flags %04x\n", s->scope_flags);
- printf(" argcount %d\n", s->num_pos_args);
- printf(" nlocals %d\n", s->num_locals);
- printf(" stacksize %d\n", s->stack_size);
-}
-#endif