Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
2c220656
Commit
2c220656
authored
Nov 02, 2014
by
Maxime Perrotin
Browse files
Fix support of Sequence of in LLVM backend
parent
3014573b
Changes
1
Hide whitespace changes
Inline
Side-by-side
LlvmGenerator.py
View file @
2c220656
...
...
@@ -558,7 +558,7 @@ def generate_startup_func(process, ctx):
if
expr
:
global_var
=
ctx
.
scope
.
resolve
(
str
(
name
))
right
=
expression
(
expr
,
ctx
)
if
isinstance
(
right
,
SDLStringLiteral
):
if
isinstance
(
right
,
(
SDLStringLiteral
,
SDLSequenceOf
)
):
# Assigning string literal - make sure the left type is known
right
.
typeof
=
ty
sdl_assign
(
global_var
,
right
,
ctx
)
...
...
@@ -1574,7 +1574,11 @@ def _prim_sequence(prim, ctx):
field_idx_cons
=
lc
.
Constant
.
int
(
ctx
.
i32
,
struct
.
idx
(
field_name
))
field_ptr
=
ctx
.
builder
.
gep
(
struct_ptr
,
[
ctx
.
zero
,
field_idx_cons
])
sdl_assign
(
field_ptr
,
expression
(
field_expr
,
ctx
),
ctx
)
right
=
expression
(
field_expr
,
ctx
)
if
isinstance
(
right
,
(
SDLStringLiteral
,
SDLSequenceOf
)):
# Assigning string literal - make sure the left type is known
right
.
typeof
=
field_expr
.
exprType
sdl_assign
(
field_ptr
,
right
,
ctx
)
return
struct_ptr
...
...
Write
Preview
Supports
Markdown
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