Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
0d0c27e9
Commit
0d0c27e9
authored
Jan 10, 2012
by
Matthias Braun
Browse files
do not cache types in global variables
(or multiple ir_init/ir_finishs will fail)
parent
afe65912
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ir/irtypes.h
View file @
0d0c27e9
...
...
@@ -629,6 +629,7 @@ struct ir_prog {
ir_type
*
none_type
;
/**< unique 'none'-type */
ir_type
*
code_type
;
/**< unique 'code'-type */
ir_type
*
unknown_type
;
/**< unique 'unknown'-type */
ir_type
*
byte_type
;
/**< type for a 'byte' */
ident
**
global_asms
;
/**< An array of global ASM insertions. */
/* -- states of and access to generated information -- */
...
...
ir/tr/type.c
View file @
0d0c27e9
...
...
@@ -2026,20 +2026,19 @@ ir_entity *frame_alloc_area(ir_type *frame_type, int size, unsigned alignment,
char
buf
[
32
];
int
offset
,
frame_size
;
static
unsigned
area_cnt
=
0
;
static
ir_type
*
a_byte
=
NULL
;
assert
(
is_frame_type
(
frame_type
));
assert
(
get_type_state
(
frame_type
)
==
layout_fixed
);
assert
(
get_type_alignment_bytes
(
frame_type
)
>
0
);
set_type_state
(
frame_type
,
layout_undefined
);
if
(
!
a_byte
)
a_byt
e
=
new_type_primitive
(
mode_Bu
);
if
(
irp
->
byte_type
==
NULL
)
irp
->
byte_typ
e
=
new_type_primitive
(
mode_Bu
);
snprintf
(
buf
,
sizeof
(
buf
),
"area%u"
,
area_cnt
++
);
name
=
new_id_from_str
(
buf
);
tp
=
new_type_array
(
1
,
a_byt
e
);
tp
=
new_type_array
(
1
,
irp
->
byte_typ
e
);
set_array_bounds_int
(
tp
,
0
,
0
,
size
);
set_type_alignment_bytes
(
tp
,
alignment
);
set_type_size_bytes
(
tp
,
size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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