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
c579c976
Commit
c579c976
authored
Jan 10, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify NONZERO irgen to allow patchpointing
parent
89c5f52b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/codegen/ast_interpreter.cpp
src/codegen/ast_interpreter.cpp
+1
-1
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+3
-4
No files found.
src/codegen/ast_interpreter.cpp
View file @
c579c976
...
...
@@ -748,7 +748,7 @@ Value ASTInterpreter::visit_assert(AST_Assert* node) {
#ifndef NDEBUG
// Currently we only generate "assert 0" statements
Value
v
=
visit_expr
(
node
->
test
);
assert
(
v
.
n
==
0
);
assert
(
v
.
o
->
cls
==
int_cls
&&
static_cast
<
BoxedInt
*>
(
v
.
o
)
->
n
==
0
);
#endif
assertFail
(
source_info
->
parent_module
,
node
->
msg
?
visit_expr
(
node
->
msg
).
o
:
0
);
...
...
src/codegen/irgen/irgenerator.cpp
View file @
c579c976
...
...
@@ -547,10 +547,9 @@ private:
assert
(
node
->
args
.
size
()
==
1
);
CompilerVariable
*
obj
=
evalExpr
(
node
->
args
[
0
],
unw_info
);
ConcreteCompilerVariable
*
converted_obj
=
obj
->
makeConverted
(
emitter
,
obj
->
getBoxType
());
obj
->
decvref
(
emitter
);
llvm
::
Value
*
v
=
emitter
.
createCall
(
unw_info
,
g
.
funcs
.
nonzero
,
{
converted_obj
->
getValue
()
});
ConcreteCompilerVariable
*
rtn
=
obj
->
nonzero
(
emitter
,
getOpInfoForNode
(
node
,
unw_info
));
assert
(
rtn
->
getType
()
==
BOOL
);
llvm
::
Value
*
v
=
i1FromBool
(
emitter
,
rtn
);
assert
(
v
->
getType
()
==
g
.
i1
);
return
boolFromI1
(
emitter
,
v
);
...
...
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