Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
3751512e
Commit
3751512e
authored
6 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/emit: Move MP_EMIT_OPT_xxx enums from compile.h to emitglue.h.
parent
abb536da
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
py/compile.h
+0
-9
0 additions, 9 deletions
py/compile.h
py/emitglue.h
+9
-0
9 additions, 0 deletions
py/emitglue.h
py/scope.h
+1
-1
1 addition, 1 deletion
py/scope.h
with
10 additions
and
10 deletions
py/compile.h
+
0
−
9
View file @
3751512e
...
...
@@ -30,15 +30,6 @@
#include
"py/parse.h"
#include
"py/emitglue.h"
// These must fit in 8 bits; see scope.h
enum
{
MP_EMIT_OPT_NONE
,
MP_EMIT_OPT_BYTECODE
,
MP_EMIT_OPT_NATIVE_PYTHON
,
MP_EMIT_OPT_VIPER
,
MP_EMIT_OPT_ASM
,
};
// the compiler will raise an exception if an error occurred
// the compiler will clear the parse tree before it returns
mp_obj_t
mp_compile
(
mp_parse_tree_t
*
parse_tree
,
qstr
source_file
,
uint
emit_opt
,
bool
is_repl
);
...
...
This diff is collapsed.
Click to expand it.
py/emitglue.h
+
9
−
0
View file @
3751512e
...
...
@@ -30,6 +30,15 @@
// These variables and functions glue the code emitters to the runtime.
// These must fit in 8 bits; see scope.h
enum
{
MP_EMIT_OPT_NONE
,
MP_EMIT_OPT_BYTECODE
,
MP_EMIT_OPT_NATIVE_PYTHON
,
MP_EMIT_OPT_VIPER
,
MP_EMIT_OPT_ASM
,
};
typedef
enum
{
MP_CODE_UNUSED
,
MP_CODE_RESERVED
,
...
...
This diff is collapsed.
Click to expand it.
py/scope.h
+
1
−
1
View file @
3751512e
...
...
@@ -75,7 +75,7 @@ typedef struct _scope_t {
uint16_t
simple_name
;
// a qstr
mp_raw_code_t
*
raw_code
;
uint8_t
scope_flags
;
// see runtime0.h
uint8_t
emit_options
;
// see
compil
e.h
uint8_t
emit_options
;
// see
emitglu
e.h
uint16_t
num_pos_args
;
uint16_t
num_kwonly_args
;
uint16_t
num_def_pos_args
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment