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
84797a2e
Commit
84797a2e
authored
Apr 12, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some exec fixes
parent
15be392b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+1
-1
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+3
-1
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+1
-1
test/tests/exec_in_test.py
test/tests/exec_in_test.py
+0
-1
test/tests/osr_frameinfo.py
test/tests/osr_frameinfo.py
+0
-1
No files found.
src/codegen/irgen/hooks.cpp
View file @
84797a2e
...
...
@@ -516,7 +516,7 @@ static void pickGlobalsAndLocals(Box*& globals, Box*& locals) {
PyDict_SetItemString
(
globals_dict
,
"__builtins__"
,
builtins_module
);
else
RELEASE_ASSERT
(
requested_builtins
==
builtins_module
||
requested_builtins
==
autoDecref
(
builtins_module
->
getAttrWrapper
()
),
||
requested_builtins
==
builtins_module
->
getAttrWrapper
(
),
"we don't support overriding __builtins__"
);
}
}
...
...
src/codegen/irgen/irgenerator.cpp
View file @
84797a2e
...
...
@@ -235,6 +235,7 @@ void IRGenState::setupFrameInfoVar(llvm::Value* passed_closure, llvm::Value* pas
if
(
getScopeInfo
()
->
usesNameLookup
())
{
// load frame_info.boxedLocals
this
->
boxed_locals
=
builder
.
CreateLoad
(
getBoxedLocalsGep
(
builder
,
this
->
frame_info
));
getRefcounts
()
->
setType
(
this
->
boxed_locals
,
RefType
::
BORROWED
);
}
}
else
{
...
...
@@ -1914,10 +1915,11 @@ private:
module
->
setattr
(
emitter
,
getEmptyOpInfo
(
unw_info
),
name
.
getBox
(),
val
);
}
else
{
auto
converted
=
val
->
makeConverted
(
emitter
,
val
->
getBoxType
());
emitter
.
createCall3
(
auto
cs
=
emitter
.
createCall3
(
unw_info
,
g
.
funcs
.
setGlobal
,
irstate
->
getGlobals
(),
emitter
.
setType
(
embedRelocatablePtr
(
name
.
getBox
(),
g
.
llvm_boxedstring_type_ptr
),
RefType
::
BORROWED
),
converted
->
getValue
());
emitter
.
refConsumed
(
converted
->
getValue
(),
cs
);
}
}
else
if
(
vst
==
ScopeInfo
::
VarScopeType
::
NAME
)
{
// TODO inefficient
...
...
src/runtime/objmodel.cpp
View file @
84797a2e
...
...
@@ -7245,7 +7245,6 @@ extern "C" Box* getGlobal(Box* globals, BoxedString* name) {
extern
"C"
void
setGlobal
(
Box
*
globals
,
BoxedString
*
name
,
STOLEN
(
Box
*
)
value
)
{
if
(
globals
->
cls
==
attrwrapper_cls
)
{
assert
(
0
&&
"check refcounting"
);
globals
=
unwrapAttrWrapper
(
globals
);
RELEASE_ASSERT
(
globals
->
cls
==
module_cls
,
"%s"
,
globals
->
cls
->
tp_name
);
}
...
...
@@ -7262,6 +7261,7 @@ extern "C" void setGlobal(Box* globals, BoxedString* name, STOLEN(Box*) value) {
}
else
{
RELEASE_ASSERT
(
globals
->
cls
==
dict_cls
,
"%s"
,
globals
->
cls
->
tp_name
);
int
r
=
PyDict_SetItem
(
globals
,
name
,
value
);
Py_DECREF
(
value
);
if
(
r
==
-
1
)
throwCAPIException
();
}
...
...
test/tests/exec_in_test.py
View file @
84797a2e
# expected: reffail
print
'Test getting'
g
=
{
'a'
:
1
}
...
...
test/tests/osr_frameinfo.py
View file @
84797a2e
# expected: reffail
try
:
import
__pyston__
__pyston__
.
setOption
(
"OSR_THRESHOLD_BASELINE"
,
50
)
...
...
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