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
0ba1cac6
Commit
0ba1cac6
authored
Feb 11, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues found by coverity
Thanks to @denji for the report!
parent
038eb9de
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
11 deletions
+12
-11
src/analysis/type_analysis.cpp
src/analysis/type_analysis.cpp
+3
-2
src/codegen/compvars.cpp
src/codegen/compvars.cpp
+2
-2
src/codegen/irgen.cpp
src/codegen/irgen.cpp
+4
-4
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+1
-1
src/codegen/irgen/irgenerator.cpp
src/codegen/irgen/irgenerator.cpp
+1
-1
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+1
-1
No files found.
src/analysis/type_analysis.cpp
View file @
0ba1cac6
...
...
@@ -661,9 +661,10 @@ public:
ASSERT
(
0
,
"dont know how to merge these types: %s, %s"
,
lhs
->
debugName
().
c_str
(),
rhs
->
debugName
().
c_str
());
abort
();
}
static
bool
merge
(
const
TypeMap
&
ending
,
TypeMap
&
next
)
{
bool
changed
=
false
;
for
(
TypeMap
::
const_iterator
it
=
ending
.
begin
();
it
!=
ending
.
end
();
it
++
)
{
for
(
TypeMap
::
const_iterator
it
=
ending
.
begin
();
it
!=
ending
.
end
();
++
it
)
{
CompilerType
*&
prev
=
next
[
it
->
first
];
changed
=
merge
(
it
->
second
,
prev
)
||
changed
;
}
...
...
@@ -706,7 +707,7 @@ public:
in_queue
.
insert
(
cfg
->
getStartingBlock
());
int
num_evaluations
=
0
;
while
(
queue
.
size
())
{
while
(
!
queue
.
empty
())
{
ASSERT
(
queue
.
size
()
==
in_queue
.
size
(),
"%ld %ld"
,
queue
.
size
(),
in_queue
.
size
());
num_evaluations
++
;
CFGBlock
*
block
=
queue
.
top
();
...
...
src/codegen/compvars.cpp
View file @
0ba1cac6
...
...
@@ -433,8 +433,8 @@ CompilerVariable* UnknownType::getattr(IREmitter& emitter, const OpInfo& info, C
}
static
ConcreteCompilerVariable
*
_call
(
IREmitter
&
emitter
,
const
OpInfo
&
info
,
llvm
::
Value
*
func
,
void
*
func_addr
,
const
std
::
vector
<
llvm
::
Value
*>
other_args
,
ArgPassSpec
argspec
,
const
std
::
vector
<
CompilerVariable
*>
args
,
const
std
::
vector
<
llvm
::
Value
*>
&
other_args
,
ArgPassSpec
argspec
,
const
std
::
vector
<
CompilerVariable
*>
&
args
,
const
std
::
vector
<
const
std
::
string
*>*
keyword_names
,
ConcreteCompilerType
*
rtn_type
)
{
bool
pass_keyword_names
=
(
keyword_names
!=
nullptr
);
...
...
src/codegen/irgen.cpp
View file @
0ba1cac6
...
...
@@ -786,7 +786,7 @@ static void emitBBs(IRGenState* irstate, const char* bb_type, GuardList& out_gua
// And go through and add phi nodes:
ConcreteSymbolTable
*
pred_st
=
phi_ending_symbol_tables
[
pred
];
for
(
ConcreteSymbolTable
::
iterator
it
=
pred_st
->
begin
();
it
!=
pred_st
->
end
();
it
++
)
{
for
(
ConcreteSymbolTable
::
iterator
it
=
pred_st
->
begin
();
it
!=
pred_st
->
end
();
++
it
)
{
// printf("adding phi for %s\n", it->first.c_str());
llvm
::
PHINode
*
phi
=
emitter
->
getBuilder
()
->
CreatePHI
(
it
->
second
->
getType
()
->
llvmType
(),
block
->
predecessors
.
size
(),
it
->
first
.
str
());
...
...
@@ -868,7 +868,7 @@ static void emitBBs(IRGenState* irstate, const char* bb_type, GuardList& out_gua
// which we won't read until after all new BBs have been added.
std
::
vector
<
std
::
tuple
<
llvm
::
PHINode
*
,
llvm
::
Value
*
,
llvm
::
BasicBlock
*&>>
phi_args
;
for
(
PHITable
::
iterator
it
=
phis
->
begin
();
it
!=
phis
->
end
();
it
++
)
{
for
(
PHITable
::
iterator
it
=
phis
->
begin
();
it
!=
phis
->
end
();
++
it
)
{
llvm
::
PHINode
*
llvm_phi
=
it
->
second
.
second
;
for
(
int
j
=
0
;
j
<
b
->
predecessors
.
size
();
j
++
)
{
CFGBlock
*
b2
=
b
->
predecessors
[
j
];
...
...
@@ -993,11 +993,11 @@ static void emitBBs(IRGenState* irstate, const char* bb_type, GuardList& out_gua
if
(
ending_symbol_tables
[
b
]
==
NULL
)
continue
;
for
(
SymbolTable
::
iterator
it
=
ending_symbol_tables
[
b
]
->
begin
();
it
!=
ending_symbol_tables
[
b
]
->
end
();
it
++
)
{
for
(
SymbolTable
::
iterator
it
=
ending_symbol_tables
[
b
]
->
begin
();
it
!=
ending_symbol_tables
[
b
]
->
end
();
++
it
)
{
it
->
second
->
decvrefNodrop
();
}
for
(
ConcreteSymbolTable
::
iterator
it
=
phi_ending_symbol_tables
[
b
]
->
begin
();
it
!=
phi_ending_symbol_tables
[
b
]
->
end
();
it
++
)
{
it
!=
phi_ending_symbol_tables
[
b
]
->
end
();
++
it
)
{
it
->
second
->
decvrefNodrop
();
}
delete
phi_ending_symbol_tables
[
b
];
...
...
src/codegen/irgen/hooks.cpp
View file @
0ba1cac6
...
...
@@ -393,7 +393,7 @@ CompiledFunction* compilePartialFuncInternal(OSRExit* exit) {
// new_effort = EffortLevel::MAXIMAL;
CompiledFunction
*
compiled
=
compileFunction
(
exit
->
parent_cf
->
clfunc
,
exit
->
parent_cf
->
spec
,
new_effort
,
exit
->
entry
);
assert
(
compiled
=
new_cf
);
assert
(
compiled
=
=
new_cf
);
}
return
new_cf
;
...
...
src/codegen/irgen/irgenerator.cpp
View file @
0ba1cac6
...
...
@@ -2413,7 +2413,7 @@ public:
void
copySymbolsFrom
(
SymbolTable
*
st
)
override
{
assert
(
st
);
DupCache
cache
;
for
(
SymbolTable
::
iterator
it
=
st
->
begin
();
it
!=
st
->
end
();
it
++
)
{
for
(
SymbolTable
::
iterator
it
=
st
->
begin
();
it
!=
st
->
end
();
++
it
)
{
// printf("Copying in %s: %p, %d\n", it->first.c_str(), it->second, it->second->getVrefs());
symbol_table
[
it
->
first
]
=
it
->
second
->
dup
(
cache
);
// printf("got: %p, %d\n", symbol_table[it->first], symbol_table[it->first]->getVrefs());
...
...
src/codegen/unwinding.cpp
View file @
0ba1cac6
...
...
@@ -54,7 +54,7 @@ void parseEhFrame(uint64_t start_addr, uint64_t size, uint64_t* out_data, uint64
u32
=
(
uint32_t
*
)
start_addr
;
int
cie_length
=
*
u32
;
*
u32
++
;
u32
++
;
assert
(
*
u32
==
0
);
// CIE ID
...
...
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