Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
5ca51694
Commit
5ca51694
authored
Oct 07, 2015
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deopt: support non parent module globals
parent
de7a980e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
CMakeLists.txt
CMakeLists.txt
+1
-1
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+7
-4
No files found.
CMakeLists.txt
View file @
5ca51694
...
...
@@ -286,7 +286,7 @@ macro(add_pyston_test testname directory)
endmacro
()
# tests testname directory arguments
add_pyston_test
(
defaults tests --order-by-mtime
)
add_pyston_test
(
defaults tests --order-by-mtime
-t50
)
add_pyston_test
(
force_llvm tests -a=-n -a=-x -t50
)
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Release"
)
add_pyston_test
(
max_compilation_tier tests -a=-O -a=-x -t50
)
...
...
src/codegen/ast_interpreter.cpp
View file @
5ca51694
...
...
@@ -1854,9 +1854,8 @@ static Box* astInterpretDeoptInner(CLFunction* clfunc, AST_expr* after_expr, AST
}
ASTInterpreter
interpreter
(
clfunc
,
vregs
);
assert
(
clfunc
->
source
->
scoping
->
areGlobalsFromModule
());
interpreter
.
setGlobals
(
source_info
->
parent_module
);
if
(
source_info
->
scoping
->
areGlobalsFromModule
())
interpreter
.
setGlobals
(
source_info
->
parent_module
);
for
(
const
auto
&
p
:
*
frame_state
.
locals
)
{
assert
(
p
.
first
->
cls
==
str_cls
);
...
...
@@ -1867,6 +1866,9 @@ static Box* astInterpretDeoptInner(CLFunction* clfunc, AST_expr* after_expr, AST
interpreter
.
setPassedClosure
(
p
.
second
);
}
else
if
(
name
==
CREATED_CLOSURE_NAME
)
{
interpreter
.
setCreatedClosure
(
p
.
second
);
}
else
if
(
name
==
PASSED_GLOBALS_NAME
)
{
assert
(
!
source_info
->
scoping
->
areGlobalsFromModule
());
interpreter
.
setGlobals
(
p
.
second
);
}
else
{
InternedString
interned
=
clfunc
->
source
->
getInternedStrings
().
get
(
name
);
interpreter
.
addSymbol
(
interned
,
p
.
second
,
false
);
...
...
@@ -1880,7 +1882,7 @@ static Box* astInterpretDeoptInner(CLFunction* clfunc, AST_expr* after_expr, AST
while
(
true
)
{
if
(
enclosing_stmt
->
type
==
AST_TYPE
::
Assign
)
{
auto
asgn
=
ast_cast
<
AST_Assign
>
(
enclosing_stmt
);
assert
(
asgn
->
value
==
after_expr
);
RELEASE_ASSERT
(
asgn
->
value
==
after_expr
,
"%p %p"
,
asgn
->
value
,
after_expr
);
assert
(
asgn
->
targets
.
size
()
==
1
);
assert
(
asgn
->
targets
[
0
]
->
type
==
AST_TYPE
::
Name
);
auto
name
=
ast_cast
<
AST_Name
>
(
asgn
->
targets
[
0
]);
...
...
@@ -1889,6 +1891,7 @@ static Box* astInterpretDeoptInner(CLFunction* clfunc, AST_expr* after_expr, AST
break
;
}
else
if
(
enclosing_stmt
->
type
==
AST_TYPE
::
Expr
)
{
auto
expr
=
ast_cast
<
AST_Expr
>
(
enclosing_stmt
);
RELEASE_ASSERT
(
expr
->
value
==
after_expr
,
"%p %p"
,
expr
->
value
,
after_expr
);
assert
(
expr
->
value
==
after_expr
);
break
;
}
else
if
(
enclosing_stmt
->
type
==
AST_TYPE
::
Invoke
)
{
...
...
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