Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
0fb80c30
Commit
0fb80c30
authored
May 10, 2014
by
Damien George
Browse files
py: Compress a little the bytecode emitter structure.
parent
9597771f
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/emitbc.c
View file @
0fb80c30
...
...
@@ -48,9 +48,11 @@
#define DUMMY_DATA_SIZE (BYTES_FOR_INT)
struct
_emit_t
{
pass_kind_t
pass
;
pass_kind_t
pass
:
8
;
uint
last_emit_was_return_value
:
8
;
byte
dummy_data
[
DUMMY_DATA_SIZE
];
int
stack_size
;
bool
last_emit_was_return_value
;
scope_t
*
scope
;
...
...
@@ -65,7 +67,6 @@ struct _emit_t {
uint
bytecode_offset
;
uint
bytecode_size
;
byte
*
code_base
;
// stores both byte code and code info
byte
dummy_data
[
DUMMY_DATA_SIZE
];
};
STATIC
void
emit_bc_rot_two
(
emit_t
*
emit
);
...
...
py/gc.c
View file @
0fb80c30
...
...
@@ -113,7 +113,7 @@ STATIC machine_uint_t gc_lock_depth;
void
gc_init
(
void
*
start
,
void
*
end
)
{
// align end pointer on block boundary
end
=
(
void
*
)((
machine_uint_t
)
end
&
(
~
(
BYTES_PER_BLOCK
-
1
)));
DEBUG_printf
(
"Initializing GC heap: %p..%p =
%ld
bytes
\n
"
,
start
,
end
,
end
-
start
);
DEBUG_printf
(
"Initializing GC heap: %p..%p =
"
UINT_FMT
"
bytes
\n
"
,
start
,
end
,
end
-
start
);
// calculate parameters for GC (T=total, A=alloc table, F=finaliser table, P=pool; all in bytes):
// T = A + F + P
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment