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
GitLab 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
6d24dc23
Commit
6d24dc23
authored
Jan 31, 2016
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py/emitglue: Move typedef of mp_raw_code_t from .c to .h file.
It's needed by frozen bytecode.
parent
c2a519ba
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/emitglue.c
+0
-22
0 additions, 22 deletions
py/emitglue.c
py/emitglue.h
+21
-1
21 additions, 1 deletion
py/emitglue.h
with
21 additions
and
23 deletions
py/emitglue.c
+
0
−
22
View file @
6d24dc23
...
@@ -49,28 +49,6 @@
...
@@ -49,28 +49,6 @@
mp_uint_t
mp_verbose_flag
=
0
;
mp_uint_t
mp_verbose_flag
=
0
;
#endif
#endif
struct
_mp_raw_code_t
{
mp_raw_code_kind_t
kind
:
3
;
mp_uint_t
scope_flags
:
7
;
mp_uint_t
n_pos_args
:
11
;
union
{
struct
{
const
byte
*
bytecode
;
const
mp_uint_t
*
const_table
;
#if MICROPY_PERSISTENT_CODE_SAVE
mp_uint_t
bc_len
;
uint16_t
n_obj
;
uint16_t
n_raw_code
;
#endif
}
u_byte
;
struct
{
void
*
fun_data
;
const
mp_uint_t
*
const_table
;
mp_uint_t
type_sig
;
// for viper, compressed as 2-bit types; ret is MSB, then arg0, arg1, etc
}
u_native
;
}
data
;
};
mp_raw_code_t
*
mp_emit_glue_new_raw_code
(
void
)
{
mp_raw_code_t
*
mp_emit_glue_new_raw_code
(
void
)
{
mp_raw_code_t
*
rc
=
m_new0
(
mp_raw_code_t
,
1
);
mp_raw_code_t
*
rc
=
m_new0
(
mp_raw_code_t
,
1
);
rc
->
kind
=
MP_CODE_RESERVED
;
rc
->
kind
=
MP_CODE_RESERVED
;
...
...
This diff is collapsed.
Click to expand it.
py/emitglue.h
+
21
−
1
View file @
6d24dc23
...
@@ -39,7 +39,27 @@ typedef enum {
...
@@ -39,7 +39,27 @@ typedef enum {
MP_CODE_NATIVE_ASM
,
MP_CODE_NATIVE_ASM
,
}
mp_raw_code_kind_t
;
}
mp_raw_code_kind_t
;
typedef
struct
_mp_raw_code_t
mp_raw_code_t
;
typedef
struct
_mp_raw_code_t
{
mp_raw_code_kind_t
kind
:
3
;
mp_uint_t
scope_flags
:
7
;
mp_uint_t
n_pos_args
:
11
;
union
{
struct
{
const
byte
*
bytecode
;
const
mp_uint_t
*
const_table
;
#if MICROPY_PERSISTENT_CODE_SAVE
mp_uint_t
bc_len
;
uint16_t
n_obj
;
uint16_t
n_raw_code
;
#endif
}
u_byte
;
struct
{
void
*
fun_data
;
const
mp_uint_t
*
const_table
;
mp_uint_t
type_sig
;
// for viper, compressed as 2-bit types; ret is MSB, then arg0, arg1, etc
}
u_native
;
}
data
;
}
mp_raw_code_t
;
mp_raw_code_t
*
mp_emit_glue_new_raw_code
(
void
);
mp_raw_code_t
*
mp_emit_glue_new_raw_code
(
void
);
...
...
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