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
302118d3
Commit
302118d3
authored
Jun 04, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format changed again; these changes look better
parent
f6167379
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
22 deletions
+13
-22
src/codegen/compvars.h
src/codegen/compvars.h
+1
-3
src/codegen/entry.cpp
src/codegen/entry.cpp
+2
-2
src/codegen/llvm_interpreter.cpp
src/codegen/llvm_interpreter.cpp
+3
-4
src/gc/root_finder.cpp
src/gc/root_finder.cpp
+1
-1
src/jit.cpp
src/jit.cpp
+2
-4
src/runtime/objmodel.cpp
src/runtime/objmodel.cpp
+2
-4
src/runtime/types.h
src/runtime/types.h
+2
-4
No files found.
src/codegen/compvars.h
View file @
302118d3
...
...
@@ -132,9 +132,7 @@ public:
}
};
template
<
class
V
>
class
ValuedCompilerType
:
public
_ValuedCompilerType
<
V
>
{
public:
};
template
<
class
V
>
class
ValuedCompilerType
:
public
_ValuedCompilerType
<
V
>
{
public
:
};
template
<
>
class
ValuedCompilerType
<
llvm
::
Value
*>
:
public
_ValuedCompilerType
<
llvm
::
Value
*>
{
public:
...
...
src/codegen/entry.cpp
View file @
302118d3
...
...
@@ -80,14 +80,14 @@ static llvm::Module* loadStdlib() {
// Make sure the stdlib got linked in correctly; check the magic number at the beginning:
assert
(
STDLIB_BC_START
[
0
]
==
'B'
);
assert
(
STDLIB_BC_START
[
1
]
==
'C'
);
intptr_t
size
=
(
intptr_t
)
&
STDLIB_BC_SIZE
;
intptr_t
size
=
(
intptr_t
)
&
STDLIB_BC_SIZE
;
assert
(
size
>
0
&&
size
<
1
<<
30
);
// make sure the size is being loaded correctly
data
=
llvm
::
StringRef
(
STDLIB_BC_START
,
size
);
}
else
{
// Make sure the stdlib got linked in correctly; check the magic number at the beginning:
assert
(
STRIPPED_STDLIB_BC_START
[
0
]
==
'B'
);
assert
(
STRIPPED_STDLIB_BC_START
[
1
]
==
'C'
);
intptr_t
size
=
(
intptr_t
)
&
STRIPPED_STDLIB_BC_SIZE
;
intptr_t
size
=
(
intptr_t
)
&
STRIPPED_STDLIB_BC_SIZE
;
assert
(
size
>
0
&&
size
<
1
<<
30
);
// make sure the size is being loaded correctly
data
=
llvm
::
StringRef
(
STRIPPED_STDLIB_BC_START
,
size
);
}
...
...
src/codegen/llvm_interpreter.cpp
View file @
302118d3
...
...
@@ -182,7 +182,7 @@ Val fetch(llvm::Value* v, const llvm::DataLayout& dl, const SymMap& symbols) {
// Typically this happens if we need to propagate the 'value' of an
// maybe-defined Python variable; we won't actually read from it if
// it's undef, since it should be guarded by an !is_defined variable.
return
(
int64_t
)
-
1337
;
return
(
int64_t
)
-
1337
;
case
llvm
:
:
Value
::
ConstantPointerNullVal
:
return
(
int64_t
)
0
;
default:
...
...
@@ -328,7 +328,7 @@ Box* interpretFunction(llvm::Function* f, int nargs, Box* arg1, Box* arg2, Box*
#define SET(v) set(symbols, inst, (v))
if
(
llvm
::
LandingPadInst
*
lpad
=
llvm
::
dyn_cast
<
llvm
::
LandingPadInst
>
(
inst
))
{
SET
((
intptr_t
)
&
landingpad_value
);
SET
((
intptr_t
)
&
landingpad_value
);
continue
;
}
else
if
(
llvm
::
ExtractValueInst
*
ev
=
llvm
::
dyn_cast
<
llvm
::
ExtractValueInst
>
(
inst
))
{
Val
r
=
fetch
(
ev
->
getAggregateOperand
(),
dl
,
symbols
);
...
...
@@ -660,8 +660,7 @@ Box* interpretFunction(llvm::Function* f, int nargs, Box* arg1, Box* arg2, Box*
prevblock
=
curblock
;
curblock
=
invoke
->
getNormalDest
();
}
}
catch
(
Box
*
e
)
{
}
catch
(
Box
*
e
)
{
if
(
VERBOSITY
(
"interpreter"
)
>=
2
)
{
printf
(
"Caught exception: %p
\n
"
,
e
);
}
...
...
src/gc/root_finder.cpp
View file @
302118d3
...
...
@@ -111,7 +111,7 @@ void collectStackRoots(TraceStack* stack) {
unw_proc_info_t
pip
;
unw_get_proc_info
(
&
cursor
,
&
pip
);
if
(
pip
.
start_ip
==
(
uintptr_t
)
&
__libc_start_main
)
{
if
(
pip
.
start_ip
==
(
uintptr_t
)
&
__libc_start_main
)
{
break
;
}
...
...
src/jit.cpp
View file @
302118d3
...
...
@@ -143,8 +143,7 @@ int main(int argc, char** argv) {
try
{
compileAndRunModule
(
m
,
main
);
}
catch
(
Box
*
b
)
{
}
catch
(
Box
*
b
)
{
std
::
string
msg
=
formatException
(
b
);
printLastTraceback
();
fprintf
(
stderr
,
"%s
\n
"
,
msg
.
c_str
());
...
...
@@ -228,8 +227,7 @@ int main(int argc, char** argv) {
try
{
compileAndRunModule
(
m
,
main
);
}
catch
(
Box
*
b
)
{
}
catch
(
Box
*
b
)
{
std
::
string
msg
=
formatException
(
b
);
printLastTraceback
();
fprintf
(
stderr
,
"%s
\n
"
,
msg
.
c_str
());
...
...
src/runtime/objmodel.cpp
View file @
302118d3
...
...
@@ -1059,8 +1059,7 @@ extern "C" BoxedString* reprOrNull(Box* obj) {
Box
*
r
=
repr
(
obj
);
assert
(
r
->
cls
==
str_cls
);
// this should be checked by repr()
return
static_cast
<
BoxedString
*>
(
r
);
}
catch
(
Box
*
b
)
{
}
catch
(
Box
*
b
)
{
return
nullptr
;
}
}
...
...
@@ -1069,8 +1068,7 @@ extern "C" BoxedString* strOrNull(Box* obj) {
try
{
BoxedString
*
r
=
str
(
obj
);
return
static_cast
<
BoxedString
*>
(
r
);
}
catch
(
Box
*
b
)
{
}
catch
(
Box
*
b
)
{
return
nullptr
;
}
}
...
...
src/runtime/types.h
View file @
302118d3
...
...
@@ -129,16 +129,14 @@ public:
StlCompatAllocator
()
{}
template
<
class
U
>
StlCompatAllocator
(
const
StlCompatAllocator
<
U
>&
other
)
{}
template
<
class
U
>
struct
rebind
{
typedef
StlCompatAllocator
<
U
>
other
;
};
template
<
class
U
>
struct
rebind
{
typedef
StlCompatAllocator
<
U
>
other
;
};
pointer
allocate
(
size_t
n
)
{
size_t
to_allocate
=
n
*
sizeof
(
value_type
);
// assert(to_allocate < (1<<16));
ConservativeWrapper
*
rtn
=
new
(
to_allocate
)
ConservativeWrapper
(
to_allocate
);
return
(
pointer
)
&
rtn
->
data
[
0
];
return
(
pointer
)
&
rtn
->
data
[
0
];
}
void
deallocate
(
pointer
p
,
size_t
n
)
{
...
...
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