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
1228d981
Commit
1228d981
authored
Sep 07, 2016
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BST: remove column field
parent
f2365ec7
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
107 deletions
+32
-107
src/analysis/type_analysis.cpp
src/analysis/type_analysis.cpp
+2
-4
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+1
-1
src/core/bst.h
src/core/bst.h
+11
-13
src/core/cfg.cpp
src/core/cfg.cpp
+15
-85
src/core/types.h
src/core/types.h
+2
-3
src/runtime/cxx_unwind.cpp
src/runtime/cxx_unwind.cpp
+1
-1
No files found.
src/analysis/type_analysis.cpp
View file @
1228d981
...
@@ -219,8 +219,7 @@ private:
...
@@ -219,8 +219,7 @@ private:
}
}
if
(
VERBOSITY
()
>=
2
&&
rtn
==
UNDEF
)
{
if
(
VERBOSITY
()
>=
2
&&
rtn
==
UNDEF
)
{
printf
(
"Think %s.%s is undefined, at %d:%d
\n
"
,
t
->
debugName
().
c_str
(),
node
->
attr
.
c_str
(),
node
->
lineno
,
printf
(
"Think %s.%s is undefined, at %d
\n
"
,
t
->
debugName
().
c_str
(),
node
->
attr
.
c_str
(),
node
->
lineno
);
node
->
col_offset
);
print_bst
(
node
);
print_bst
(
node
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
@@ -231,8 +230,7 @@ private:
...
@@ -231,8 +230,7 @@ private:
CompilerType
*
t
=
getType
(
node
->
value
);
CompilerType
*
t
=
getType
(
node
->
value
);
CompilerType
*
rtn
=
t
->
getattrType
(
node
->
attr
,
true
);
CompilerType
*
rtn
=
t
->
getattrType
(
node
->
attr
,
true
);
if
(
VERBOSITY
()
>=
2
&&
rtn
==
UNDEF
)
{
if
(
VERBOSITY
()
>=
2
&&
rtn
==
UNDEF
)
{
printf
(
"Think %s.%s is undefined, at %d:%d
\n
"
,
t
->
debugName
().
c_str
(),
node
->
attr
.
c_str
(),
node
->
lineno
,
printf
(
"Think %s.%s is undefined, at %d
\n
"
,
t
->
debugName
().
c_str
(),
node
->
attr
.
c_str
(),
node
->
lineno
);
node
->
col_offset
);
print_bst
(
node
);
print_bst
(
node
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
...
src/codegen/unwinding.cpp
View file @
1228d981
...
@@ -490,7 +490,7 @@ static const LineInfo lineInfoForFrameInfo(FrameInfo* frame_info) {
...
@@ -490,7 +490,7 @@ static const LineInfo lineInfoForFrameInfo(FrameInfo* frame_info) {
auto
*
code
=
frame_info
->
code
;
auto
*
code
=
frame_info
->
code
;
assert
(
code
);
assert
(
code
);
return
LineInfo
(
current_stmt
->
lineno
,
c
urrent_stmt
->
col_offset
,
c
ode
->
filename
,
code
->
name
);
return
LineInfo
(
current_stmt
->
lineno
,
code
->
filename
,
code
->
name
);
}
}
// A class that converts a C stack trace to a Python stack trace.
// A class that converts a C stack trace to a Python stack trace.
...
...
src/core/bst.h
View file @
1228d981
...
@@ -171,7 +171,7 @@ public:
...
@@ -171,7 +171,7 @@ public:
virtual
~
BST
()
{}
virtual
~
BST
()
{}
const
BST_TYPE
::
BST_TYPE
type
;
const
BST_TYPE
::
BST_TYPE
type
;
uint32_t
lineno
,
col_offset
;
uint32_t
lineno
;
virtual
void
accept
(
BSTVisitor
*
v
)
=
0
;
virtual
void
accept
(
BSTVisitor
*
v
)
=
0
;
...
@@ -185,10 +185,9 @@ private:
...
@@ -185,10 +185,9 @@ private:
public:
public:
BST
(
BST_TYPE
::
BST_TYPE
type
);
BST
(
BST_TYPE
::
BST_TYPE
type
);
#else
#else
BST
(
BST_TYPE
::
BST_TYPE
type
)
:
type
(
type
),
lineno
(
0
)
,
col_offset
(
0
)
{}
BST
(
BST_TYPE
::
BST_TYPE
type
)
:
type
(
type
),
lineno
(
0
)
{}
#endif
#endif
BST
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
,
uint32_t
col_offset
=
0
)
BST
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
)
:
type
(
type
),
lineno
(
lineno
)
{}
:
type
(
type
),
lineno
(
lineno
),
col_offset
(
col_offset
)
{}
};
};
class
BST_expr
:
public
BST
{
class
BST_expr
:
public
BST
{
...
@@ -196,7 +195,7 @@ public:
...
@@ -196,7 +195,7 @@ public:
virtual
void
*
accept_expr
(
ExprVisitor
*
v
)
=
0
;
virtual
void
*
accept_expr
(
ExprVisitor
*
v
)
=
0
;
BST_expr
(
BST_TYPE
::
BST_TYPE
type
)
:
BST
(
type
)
{}
BST_expr
(
BST_TYPE
::
BST_TYPE
type
)
:
BST
(
type
)
{}
BST_expr
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
,
uint32_t
col_offset
=
0
)
:
BST
(
type
,
lineno
,
col_offset
)
{}
BST_expr
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
)
:
BST
(
type
,
lineno
)
{}
};
};
class
BST_stmt
:
public
BST
{
class
BST_stmt
:
public
BST
{
...
@@ -212,14 +211,14 @@ class BST_slice : public BST {
...
@@ -212,14 +211,14 @@ class BST_slice : public BST {
public:
public:
virtual
void
*
accept_slice
(
SliceVisitor
*
s
)
=
0
;
virtual
void
*
accept_slice
(
SliceVisitor
*
s
)
=
0
;
BST_slice
(
BST_TYPE
::
BST_TYPE
type
)
:
BST
(
type
)
{}
BST_slice
(
BST_TYPE
::
BST_TYPE
type
)
:
BST
(
type
)
{}
BST_slice
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
,
uint32_t
col_offset
=
0
)
:
BST
(
type
,
lineno
,
col_offset
)
{}
BST_slice
(
BST_TYPE
::
BST_TYPE
type
,
uint32_t
lineno
)
:
BST
(
type
,
lineno
)
{}
};
};
class
BST_Name
;
class
BST_Name
;
class
BST_arguments
:
public
BST
{
class
BST_arguments
:
public
BST
{
public:
public:
// no lineno
, col_offset
attributes
// no lineno attributes
std
::
vector
<
BST_expr
*>
defaults
;
std
::
vector
<
BST_expr
*>
defaults
;
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
accept
(
BSTVisitor
*
v
);
...
@@ -445,7 +444,7 @@ public:
...
@@ -445,7 +444,7 @@ public:
class
BST_keyword
:
public
BST
{
class
BST_keyword
:
public
BST
{
public:
public:
// no lineno
, col_offset
attributes
// no lineno attributes
BST_expr
*
value
;
BST_expr
*
value
;
InternedString
arg
;
InternedString
arg
;
...
@@ -493,8 +492,8 @@ public:
...
@@ -493,8 +492,8 @@ public:
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
BST_Name
(
InternedString
id
,
AST_TYPE
::
AST_TYPE
ctx_type
,
int
lineno
,
int
col_offset
=
0
)
BST_Name
(
InternedString
id
,
AST_TYPE
::
AST_TYPE
ctx_type
,
int
lineno
)
:
BST_expr
(
BST_TYPE
::
Name
,
lineno
,
col_offset
),
:
BST_expr
(
BST_TYPE
::
Name
,
lineno
),
ctx_type
(
ctx_type
),
ctx_type
(
ctx_type
),
id
(
id
),
id
(
id
),
lookup_type
(
ScopeInfo
::
VarScopeType
::
UNKNOWN
),
lookup_type
(
ScopeInfo
::
VarScopeType
::
UNKNOWN
),
...
@@ -676,8 +675,7 @@ public:
...
@@ -676,8 +675,7 @@ public:
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
BST_MakeFunction
(
BST_FunctionDef
*
fd
)
BST_MakeFunction
(
BST_FunctionDef
*
fd
)
:
BST_expr
(
BST_TYPE
::
MakeFunction
,
fd
->
lineno
),
function_def
(
fd
)
{}
:
BST_expr
(
BST_TYPE
::
MakeFunction
,
fd
->
lineno
,
fd
->
col_offset
),
function_def
(
fd
)
{}
static
const
BST_TYPE
::
BST_TYPE
TYPE
=
BST_TYPE
::
MakeFunction
;
static
const
BST_TYPE
::
BST_TYPE
TYPE
=
BST_TYPE
::
MakeFunction
;
};
};
...
@@ -689,7 +687,7 @@ public:
...
@@ -689,7 +687,7 @@ public:
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
accept
(
BSTVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
virtual
void
*
accept_expr
(
ExprVisitor
*
v
);
BST_MakeClass
(
BST_ClassDef
*
cd
)
:
BST_expr
(
BST_TYPE
::
MakeClass
,
cd
->
lineno
,
cd
->
col_offset
),
class_def
(
cd
)
{}
BST_MakeClass
(
BST_ClassDef
*
cd
)
:
BST_expr
(
BST_TYPE
::
MakeClass
,
cd
->
lineno
),
class_def
(
cd
)
{}
static
const
BST_TYPE
::
BST_TYPE
TYPE
=
BST_TYPE
::
MakeClass
;
static
const
BST_TYPE
::
BST_TYPE
TYPE
=
BST_TYPE
::
MakeClass
;
};
};
...
...
src/core/cfg.cpp
View file @
1228d981
...
@@ -54,11 +54,11 @@ ParamNames::ParamNames(AST_arguments* arguments, InternedStringPool& pool)
...
@@ -54,11 +54,11 @@ ParamNames::ParamNames(AST_arguments* arguments, InternedStringPool& pool)
AST_expr
*
arg
=
arguments
->
args
[
i
];
AST_expr
*
arg
=
arguments
->
args
[
i
];
if
(
arg
->
type
==
AST_TYPE
::
Name
)
{
if
(
arg
->
type
==
AST_TYPE
::
Name
)
{
AST_Name
*
name
=
ast_cast
<
AST_Name
>
(
arg
);
AST_Name
*
name
=
ast_cast
<
AST_Name
>
(
arg
);
BST_Name
*
new_name
=
new
BST_Name
(
name
->
id
,
name
->
ctx_type
,
name
->
lineno
,
name
->
col_offset
);
BST_Name
*
new_name
=
new
BST_Name
(
name
->
id
,
name
->
ctx_type
,
name
->
lineno
);
all_args
.
emplace_back
(
new_name
);
all_args
.
emplace_back
(
new_name
);
}
else
{
}
else
{
InternedString
dot_arg_name
=
pool
.
get
(
"."
+
std
::
to_string
(
i
));
InternedString
dot_arg_name
=
pool
.
get
(
"."
+
std
::
to_string
(
i
));
auto
new_name
=
new
BST_Name
(
dot_arg_name
,
AST_TYPE
::
Param
,
arg
->
lineno
,
arg
->
col_offset
);
auto
new_name
=
new
BST_Name
(
dot_arg_name
,
AST_TYPE
::
Param
,
arg
->
lineno
);
new_name
->
lookup_type
=
ScopeInfo
::
VarScopeType
::
FAST
;
new_name
->
lookup_type
=
ScopeInfo
::
VarScopeType
::
FAST
;
all_args
.
emplace_back
(
new_name
);
all_args
.
emplace_back
(
new_name
);
}
}
...
@@ -67,16 +67,14 @@ ParamNames::ParamNames(AST_arguments* arguments, InternedStringPool& pool)
...
@@ -67,16 +67,14 @@ ParamNames::ParamNames(AST_arguments* arguments, InternedStringPool& pool)
auto
vararg_name
=
arguments
->
vararg
;
auto
vararg_name
=
arguments
->
vararg
;
if
(
vararg_name
)
{
if
(
vararg_name
)
{
has_vararg_name
=
1
;
has_vararg_name
=
1
;
BST_Name
*
new_name
BST_Name
*
new_name
=
new
BST_Name
(
vararg_name
->
id
,
vararg_name
->
ctx_type
,
vararg_name
->
lineno
);
=
new
BST_Name
(
vararg_name
->
id
,
vararg_name
->
ctx_type
,
vararg_name
->
lineno
,
vararg_name
->
col_offset
);
all_args
.
emplace_back
(
new_name
);
all_args
.
emplace_back
(
new_name
);
}
}
auto
kwarg_name
=
arguments
->
kwarg
;
auto
kwarg_name
=
arguments
->
kwarg
;
if
(
kwarg_name
)
{
if
(
kwarg_name
)
{
has_kwarg_name
=
1
;
has_kwarg_name
=
1
;
BST_Name
*
new_name
BST_Name
*
new_name
=
new
BST_Name
(
kwarg_name
->
id
,
kwarg_name
->
ctx_type
,
kwarg_name
->
lineno
);
=
new
BST_Name
(
kwarg_name
->
id
,
kwarg_name
->
ctx_type
,
kwarg_name
->
lineno
,
kwarg_name
->
col_offset
);
all_args
.
emplace_back
(
new_name
);
all_args
.
emplace_back
(
new_name
);
}
}
}
}
...
@@ -374,24 +372,23 @@ private:
...
@@ -374,24 +372,23 @@ private:
return
name
;
return
name
;
}
}
BST_Name
*
makeName
(
InternedString
id
,
AST_TYPE
::
AST_TYPE
ctx_type
,
int
lineno
,
int
col_offset
=
0
,
BST_Name
*
makeName
(
InternedString
id
,
AST_TYPE
::
AST_TYPE
ctx_type
,
int
lineno
,
bool
is_kill
=
false
)
{
bool
is_kill
=
false
)
{
BST_Name
*
name
=
new
BST_Name
(
id
,
ctx_type
,
lineno
);
BST_Name
*
name
=
new
BST_Name
(
id
,
ctx_type
,
lineno
,
col_offset
);
fillScopingInfo
(
name
,
scoping
);
fillScopingInfo
(
name
,
scoping
);
name
->
is_kill
=
is_kill
;
name
->
is_kill
=
is_kill
;
return
name
;
return
name
;
}
}
BST_Name
*
makeLoad
(
InternedString
id
,
AST
*
node
,
bool
is_kill
=
false
)
{
BST_Name
*
makeLoad
(
InternedString
id
,
AST
*
node
,
bool
is_kill
=
false
)
{
return
makeName
(
id
,
AST_TYPE
::
Load
,
node
->
lineno
,
0
,
is_kill
);
return
makeName
(
id
,
AST_TYPE
::
Load
,
node
->
lineno
,
is_kill
);
}
}
BST_Name
*
makeLoad
(
InternedString
id
,
BST
*
node
,
bool
is_kill
=
false
)
{
BST_Name
*
makeLoad
(
InternedString
id
,
BST
*
node
,
bool
is_kill
=
false
)
{
return
makeName
(
id
,
AST_TYPE
::
Load
,
node
->
lineno
,
0
,
is_kill
);
return
makeName
(
id
,
AST_TYPE
::
Load
,
node
->
lineno
,
is_kill
);
}
}
BST_Name
*
makeLoad
(
InternedString
id
,
int
lineno
,
bool
is_kill
=
false
)
{
BST_Name
*
makeLoad
(
InternedString
id
,
int
lineno
,
bool
is_kill
=
false
)
{
return
makeName
(
id
,
AST_TYPE
::
Load
,
lineno
,
0
,
is_kill
);
return
makeName
(
id
,
AST_TYPE
::
Load
,
lineno
,
is_kill
);
}
}
void
pushLoopContinuation
(
CFGBlock
*
continue_dest
,
CFGBlock
*
break_dest
)
{
void
pushLoopContinuation
(
CFGBlock
*
continue_dest
,
CFGBlock
*
break_dest
)
{
...
@@ -425,7 +422,6 @@ private:
...
@@ -425,7 +422,6 @@ private:
BST_Return
*
node
=
new
BST_Return
();
BST_Return
*
node
=
new
BST_Return
();
node
->
value
=
value
;
node
->
value
=
value
;
node
->
col_offset
=
value
->
col_offset
;
node
->
lineno
=
value
->
lineno
;
node
->
lineno
=
value
->
lineno
;
push_back
(
node
);
push_back
(
node
);
curblock
=
NULL
;
curblock
=
NULL
;
...
@@ -469,7 +465,6 @@ private:
...
@@ -469,7 +465,6 @@ private:
BST_LangPrimitive
*
call
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
NONZERO
);
BST_LangPrimitive
*
call
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
NONZERO
);
call
->
args
.
push_back
(
e
);
call
->
args
.
push_back
(
e
);
call
->
lineno
=
e
->
lineno
;
call
->
lineno
=
e
->
lineno
;
call
->
col_offset
=
e
->
col_offset
;
// Simple optimization: allow the generation of nested nodes if there isn't a
// Simple optimization: allow the generation of nested nodes if there isn't a
// current exc handler.
// current exc handler.
...
@@ -484,7 +479,7 @@ private:
...
@@ -484,7 +479,7 @@ private:
BST_Name
*
remapName
(
AST_Name
*
name
)
{
BST_Name
*
remapName
(
AST_Name
*
name
)
{
if
(
!
name
)
if
(
!
name
)
return
NULL
;
return
NULL
;
BST_Name
*
rtn
=
new
BST_Name
(
name
->
id
,
name
->
ctx_type
,
name
->
lineno
,
name
->
col_offset
);
BST_Name
*
rtn
=
new
BST_Name
(
name
->
id
,
name
->
ctx_type
,
name
->
lineno
);
fillScopingInfo
(
rtn
,
scoping
);
fillScopingInfo
(
rtn
,
scoping
);
return
rtn
;
return
rtn
;
}
}
...
@@ -492,7 +487,6 @@ private:
...
@@ -492,7 +487,6 @@ private:
BST_Num
*
remapNum
(
AST_Num
*
num
)
{
BST_Num
*
remapNum
(
AST_Num
*
num
)
{
auto
r
=
new
BST_Num
();
auto
r
=
new
BST_Num
();
r
->
lineno
=
num
->
lineno
;
r
->
lineno
=
num
->
lineno
;
r
->
col_offset
=
num
->
col_offset
;
r
->
num_type
=
num
->
num_type
;
r
->
num_type
=
num
->
num_type
;
switch
(
r
->
num_type
)
{
switch
(
r
->
num_type
)
{
case
AST_Num
:
:
INT
:
case
AST_Num
:
:
INT
:
...
@@ -514,7 +508,6 @@ private:
...
@@ -514,7 +508,6 @@ private:
r
->
str_data
=
str
->
str_data
;
r
->
str_data
=
str
->
str_data
;
r
->
str_type
=
str
->
str_type
;
r
->
str_type
=
str
->
str_type
;
r
->
lineno
=
str
->
lineno
;
r
->
lineno
=
str
->
lineno
;
r
->
col_offset
=
str
->
col_offset
;
return
r
;
return
r
;
}
}
...
@@ -568,7 +561,6 @@ private:
...
@@ -568,7 +561,6 @@ private:
// printf("Body block for comp %d is %d\n", i, body_block->idx);
// printf("Body block for comp %d is %d\n", i, body_block->idx);
BST_Branch
*
br
=
new
BST_Branch
();
BST_Branch
*
br
=
new
BST_Branch
();
br
->
col_offset
=
node
->
col_offset
;
br
->
lineno
=
node
->
lineno
;
br
->
lineno
=
node
->
lineno
;
br
->
test
=
test
;
br
->
test
=
test
;
br
->
iftrue
=
body_block
;
br
->
iftrue
=
body_block
;
...
@@ -662,7 +654,6 @@ private:
...
@@ -662,7 +654,6 @@ private:
BST_Branch
*
makeBranch
(
BST_expr
*
test
)
{
BST_Branch
*
makeBranch
(
BST_expr
*
test
)
{
BST_Branch
*
rtn
=
new
BST_Branch
();
BST_Branch
*
rtn
=
new
BST_Branch
();
rtn
->
test
=
callNonzero
(
test
);
rtn
->
test
=
callNonzero
(
test
);
rtn
->
col_offset
=
test
->
col_offset
;
rtn
->
lineno
=
test
->
lineno
;
rtn
->
lineno
=
test
->
lineno
;
return
rtn
;
return
rtn
;
}
}
...
@@ -725,7 +716,6 @@ private:
...
@@ -725,7 +716,6 @@ private:
attr
->
attr
=
name
;
attr
->
attr
=
name
;
rtn
=
attr
;
rtn
=
attr
;
}
}
rtn
->
col_offset
=
base
->
col_offset
;
rtn
->
lineno
=
base
->
lineno
;
rtn
->
lineno
=
base
->
lineno
;
return
rtn
;
return
rtn
;
}
}
...
@@ -758,7 +748,6 @@ private:
...
@@ -758,7 +748,6 @@ private:
call
->
starargs
=
NULL
;
call
->
starargs
=
NULL
;
call
->
kwargs
=
NULL
;
call
->
kwargs
=
NULL
;
call
->
func
=
func
;
call
->
func
=
func
;
call
->
col_offset
=
func
->
col_offset
;
call
->
lineno
=
func
->
lineno
;
call
->
lineno
=
func
->
lineno
;
return
call
;
return
call
;
}
}
...
@@ -796,7 +785,6 @@ private:
...
@@ -796,7 +785,6 @@ private:
auto
index
=
new
BST_Index
();
auto
index
=
new
BST_Index
();
index
->
value
=
value
;
index
->
value
=
value
;
index
->
lineno
=
value
->
lineno
;
index
->
lineno
=
value
->
lineno
;
index
->
col_offset
=
value
->
col_offset
;
return
index
;
return
index
;
}
}
...
@@ -806,7 +794,6 @@ private:
...
@@ -806,7 +794,6 @@ private:
subscript
->
value
=
value
;
subscript
->
value
=
value
;
subscript
->
slice
=
slice
;
subscript
->
slice
=
slice
;
subscript
->
lineno
=
slice
->
lineno
;
subscript
->
lineno
=
slice
->
lineno
;
subscript
->
col_offset
=
slice
->
col_offset
;
return
subscript
;
return
subscript
;
}
}
...
@@ -816,7 +803,6 @@ private:
...
@@ -816,7 +803,6 @@ private:
void
pushAssign
(
BST_expr
*
target
,
BST_expr
*
val
)
{
void
pushAssign
(
BST_expr
*
target
,
BST_expr
*
val
)
{
BST_Assign
*
assign
=
new
BST_Assign
();
BST_Assign
*
assign
=
new
BST_Assign
();
assign
->
value
=
val
;
assign
->
value
=
val
;
assign
->
col_offset
=
val
->
col_offset
;
assign
->
lineno
=
val
->
lineno
;
assign
->
lineno
=
val
->
lineno
;
assign
->
target
=
target
;
assign
->
target
=
target
;
push_back
(
assign
);
push_back
(
assign
);
...
@@ -825,7 +811,6 @@ private:
...
@@ -825,7 +811,6 @@ private:
void
pushAssign
(
AST_expr
*
target
,
BST_expr
*
val
)
{
void
pushAssign
(
AST_expr
*
target
,
BST_expr
*
val
)
{
BST_Assign
*
assign
=
new
BST_Assign
();
BST_Assign
*
assign
=
new
BST_Assign
();
assign
->
value
=
val
;
assign
->
value
=
val
;
assign
->
col_offset
=
val
->
col_offset
;
assign
->
lineno
=
val
->
lineno
;
assign
->
lineno
=
val
->
lineno
;
if
(
target
->
type
==
AST_TYPE
::
Name
)
{
if
(
target
->
type
==
AST_TYPE
::
Name
)
{
...
@@ -839,7 +824,6 @@ private:
...
@@ -839,7 +824,6 @@ private:
s_target
->
value
=
remapExpr
(
s
->
value
);
s_target
->
value
=
remapExpr
(
s
->
value
);
s_target
->
slice
=
remapSlice
(
s
->
slice
);
s_target
->
slice
=
remapSlice
(
s
->
slice
);
s_target
->
ctx_type
=
AST_TYPE
::
Store
;
s_target
->
ctx_type
=
AST_TYPE
::
Store
;
s_target
->
col_offset
=
s
->
col_offset
;
s_target
->
lineno
=
s
->
lineno
;
s_target
->
lineno
=
s
->
lineno
;
assign
->
target
=
s_target
;
assign
->
target
=
s_target
;
...
@@ -852,7 +836,6 @@ private:
...
@@ -852,7 +836,6 @@ private:
a_target
->
value
=
remapExpr
(
a
->
value
);
a_target
->
value
=
remapExpr
(
a
->
value
);
a_target
->
attr
=
scoping
->
mangleName
(
a
->
attr
);
a_target
->
attr
=
scoping
->
mangleName
(
a
->
attr
);
a_target
->
ctx_type
=
AST_TYPE
::
Store
;
a_target
->
ctx_type
=
AST_TYPE
::
Store
;
a_target
->
col_offset
=
a
->
col_offset
;
a_target
->
lineno
=
a
->
lineno
;
a_target
->
lineno
=
a
->
lineno
;
assign
->
target
=
a_target
;
assign
->
target
=
a_target
;
...
@@ -872,7 +855,6 @@ private:
...
@@ -872,7 +855,6 @@ private:
BST_Tuple
*
new_target
=
new
BST_Tuple
();
BST_Tuple
*
new_target
=
new
BST_Tuple
();
new_target
->
ctx_type
=
AST_TYPE
::
Store
;
new_target
->
ctx_type
=
AST_TYPE
::
Store
;
new_target
->
lineno
=
target
->
lineno
;
new_target
->
lineno
=
target
->
lineno
;
new_target
->
col_offset
=
target
->
col_offset
;
// A little hackery: push the assign, even though we're not done constructing it yet,
// A little hackery: push the assign, even though we're not done constructing it yet,
// so that we can iteratively push more stuff after it
// so that we can iteratively push more stuff after it
...
@@ -893,7 +875,6 @@ private:
...
@@ -893,7 +875,6 @@ private:
void
pushAssign
(
InternedString
id
,
BST_expr
*
val
)
{
void
pushAssign
(
InternedString
id
,
BST_expr
*
val
)
{
BST_Assign
*
assign
=
new
BST_Assign
();
BST_Assign
*
assign
=
new
BST_Assign
();
assign
->
value
=
val
;
assign
->
value
=
val
;
assign
->
col_offset
=
val
->
col_offset
;
assign
->
lineno
=
val
->
lineno
;
assign
->
lineno
=
val
->
lineno
;
assign
->
target
=
makeName
(
id
,
AST_TYPE
::
Store
,
val
->
lineno
,
0
);
assign
->
target
=
makeName
(
id
,
AST_TYPE
::
Store
,
val
->
lineno
,
0
);
push_back
(
assign
);
push_back
(
assign
);
...
@@ -911,7 +892,6 @@ private:
...
@@ -911,7 +892,6 @@ private:
BST_Expr
*
stmt
=
new
BST_Expr
();
BST_Expr
*
stmt
=
new
BST_Expr
();
stmt
->
value
=
expr
;
stmt
->
value
=
expr
;
stmt
->
lineno
=
expr
->
lineno
;
stmt
->
lineno
=
expr
->
lineno
;
stmt
->
col_offset
=
expr
->
col_offset
;
return
stmt
;
return
stmt
;
}
}
...
@@ -926,7 +906,6 @@ private:
...
@@ -926,7 +906,6 @@ private:
BST_expr
*
remapAttribute
(
AST_Attribute
*
node
)
{
BST_expr
*
remapAttribute
(
AST_Attribute
*
node
)
{
BST_Attribute
*
rtn
=
new
BST_Attribute
();
BST_Attribute
*
rtn
=
new
BST_Attribute
();
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
attr
=
scoping
->
mangleName
(
node
->
attr
);
rtn
->
attr
=
scoping
->
mangleName
(
node
->
attr
);
...
@@ -937,7 +916,6 @@ private:
...
@@ -937,7 +916,6 @@ private:
BST_expr
*
remapBinOp
(
AST_BinOp
*
node
)
{
BST_expr
*
remapBinOp
(
AST_BinOp
*
node
)
{
BST_BinOp
*
rtn
=
new
BST_BinOp
();
BST_BinOp
*
rtn
=
new
BST_BinOp
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
op_type
=
remapBinOpType
(
node
->
op_type
);
rtn
->
op_type
=
remapBinOpType
(
node
->
op_type
);
rtn
->
left
=
remapExpr
(
node
->
left
);
rtn
->
left
=
remapExpr
(
node
->
left
);
rtn
->
right
=
remapExpr
(
node
->
right
);
rtn
->
right
=
remapExpr
(
node
->
right
);
...
@@ -950,13 +928,11 @@ private:
...
@@ -950,13 +928,11 @@ private:
}
else
if
(
val
->
type
==
BST_TYPE
::
Ellipsis
)
{
}
else
if
(
val
->
type
==
BST_TYPE
::
Ellipsis
)
{
BST_Ellipsis
*
orig
=
bst_cast
<
BST_Ellipsis
>
(
val
);
BST_Ellipsis
*
orig
=
bst_cast
<
BST_Ellipsis
>
(
val
);
BST_Ellipsis
*
made
=
new
BST_Ellipsis
();
BST_Ellipsis
*
made
=
new
BST_Ellipsis
();
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
return
made
;
return
made
;
}
else
if
(
val
->
type
==
BST_TYPE
::
ExtSlice
)
{
}
else
if
(
val
->
type
==
BST_TYPE
::
ExtSlice
)
{
BST_ExtSlice
*
orig
=
bst_cast
<
BST_ExtSlice
>
(
val
);
BST_ExtSlice
*
orig
=
bst_cast
<
BST_ExtSlice
>
(
val
);
BST_ExtSlice
*
made
=
new
BST_ExtSlice
();
BST_ExtSlice
*
made
=
new
BST_ExtSlice
();
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
made
->
dims
.
reserve
(
orig
->
dims
.
size
());
made
->
dims
.
reserve
(
orig
->
dims
.
size
());
for
(
BST_slice
*
item
:
orig
->
dims
)
{
for
(
BST_slice
*
item
:
orig
->
dims
)
{
...
@@ -967,13 +943,11 @@ private:
...
@@ -967,13 +943,11 @@ private:
BST_Index
*
orig
=
bst_cast
<
BST_Index
>
(
val
);
BST_Index
*
orig
=
bst_cast
<
BST_Index
>
(
val
);
BST_Index
*
made
=
new
BST_Index
();
BST_Index
*
made
=
new
BST_Index
();
made
->
value
=
_dup
(
orig
->
value
);
made
->
value
=
_dup
(
orig
->
value
);
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
return
made
;
return
made
;
}
else
if
(
val
->
type
==
BST_TYPE
::
Slice
)
{
}
else
if
(
val
->
type
==
BST_TYPE
::
Slice
)
{
BST_Slice
*
orig
=
bst_cast
<
BST_Slice
>
(
val
);
BST_Slice
*
orig
=
bst_cast
<
BST_Slice
>
(
val
);
BST_Slice
*
made
=
new
BST_Slice
();
BST_Slice
*
made
=
new
BST_Slice
();
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
made
->
lower
=
_dup
(
orig
->
lower
);
made
->
lower
=
_dup
(
orig
->
lower
);
made
->
upper
=
_dup
(
orig
->
upper
);
made
->
upper
=
_dup
(
orig
->
upper
);
...
@@ -996,7 +970,7 @@ private:
...
@@ -996,7 +970,7 @@ private:
if
(
val
->
type
==
BST_TYPE
::
Name
)
{
if
(
val
->
type
==
BST_TYPE
::
Name
)
{
BST_Name
*
orig
=
bst_cast
<
BST_Name
>
(
val
);
BST_Name
*
orig
=
bst_cast
<
BST_Name
>
(
val
);
BST_Name
*
made
=
makeName
(
orig
->
id
,
orig
->
ctx_type
,
orig
->
lineno
,
orig
->
col_offset
);
BST_Name
*
made
=
makeName
(
orig
->
id
,
orig
->
ctx_type
,
orig
->
lineno
);
return
made
;
return
made
;
}
else
if
(
val
->
type
==
BST_TYPE
::
Num
)
{
}
else
if
(
val
->
type
==
BST_TYPE
::
Num
)
{
BST_Num
*
orig
=
bst_cast
<
BST_Num
>
(
val
);
BST_Num
*
orig
=
bst_cast
<
BST_Num
>
(
val
);
...
@@ -1004,7 +978,6 @@ private:
...
@@ -1004,7 +978,6 @@ private:
made
->
num_type
=
orig
->
num_type
;
made
->
num_type
=
orig
->
num_type
;
made
->
n_int
=
orig
->
n_int
;
made
->
n_int
=
orig
->
n_int
;
made
->
n_long
=
orig
->
n_long
;
made
->
n_long
=
orig
->
n_long
;
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
return
made
;
return
made
;
}
else
if
(
val
->
type
==
BST_TYPE
::
Str
)
{
}
else
if
(
val
->
type
==
BST_TYPE
::
Str
)
{
...
@@ -1012,7 +985,6 @@ private:
...
@@ -1012,7 +985,6 @@ private:
BST_Str
*
made
=
new
BST_Str
();
BST_Str
*
made
=
new
BST_Str
();
made
->
str_type
=
orig
->
str_type
;
made
->
str_type
=
orig
->
str_type
;
made
->
str_data
=
orig
->
str_data
;
made
->
str_data
=
orig
->
str_data
;
made
->
col_offset
=
orig
->
col_offset
;
made
->
lineno
=
orig
->
lineno
;
made
->
lineno
=
orig
->
lineno
;
return
made
;
return
made
;
}
else
{
}
else
{
...
@@ -1072,7 +1044,6 @@ private:
...
@@ -1072,7 +1044,6 @@ private:
BST_expr
*
remapCall
(
AST_Call
*
node
)
{
BST_expr
*
remapCall
(
AST_Call
*
node
)
{
BST_Call
*
rtn
=
new
BST_Call
();
BST_Call
*
rtn
=
new
BST_Call
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
if
(
node
->
func
->
type
==
AST_TYPE
::
Attribute
)
{
if
(
node
->
func
->
type
==
AST_TYPE
::
Attribute
)
{
// TODO this is a cludge to make sure that "callattrs" stick together.
// TODO this is a cludge to make sure that "callattrs" stick together.
...
@@ -1106,7 +1077,6 @@ private:
...
@@ -1106,7 +1077,6 @@ private:
BST_expr
*
remapClsAttribute
(
AST_ClsAttribute
*
node
)
{
BST_expr
*
remapClsAttribute
(
AST_ClsAttribute
*
node
)
{
BST_ClsAttribute
*
rtn
=
new
BST_ClsAttribute
();
BST_ClsAttribute
*
rtn
=
new
BST_ClsAttribute
();
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
attr
=
node
->
attr
;
rtn
->
attr
=
node
->
attr
;
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
value
=
remapExpr
(
node
->
value
);
...
@@ -1120,7 +1090,6 @@ private:
...
@@ -1120,7 +1090,6 @@ private:
if
(
node
->
ops
.
size
()
==
1
)
{
if
(
node
->
ops
.
size
()
==
1
)
{
BST_Compare
*
rtn
=
new
BST_Compare
();
BST_Compare
*
rtn
=
new
BST_Compare
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
op
=
node
->
ops
[
0
];
rtn
->
op
=
node
->
ops
[
0
];
...
@@ -1141,7 +1110,6 @@ private:
...
@@ -1141,7 +1110,6 @@ private:
BST_expr
*
right
=
remapExpr
(
node
->
comparators
[
i
]);
BST_expr
*
right
=
remapExpr
(
node
->
comparators
[
i
]);
BST_Compare
*
val
=
new
BST_Compare
;
BST_Compare
*
val
=
new
BST_Compare
;
val
->
col_offset
=
node
->
col_offset
;
val
->
lineno
=
node
->
lineno
;
val
->
lineno
=
node
->
lineno
;
val
->
left
=
left
;
val
->
left
=
left
;
if
(
i
<
node
->
ops
.
size
()
-
1
)
if
(
i
<
node
->
ops
.
size
()
-
1
)
...
@@ -1188,7 +1156,6 @@ private:
...
@@ -1188,7 +1156,6 @@ private:
BST_expr
*
remapDict
(
AST_Dict
*
node
)
{
BST_expr
*
remapDict
(
AST_Dict
*
node
)
{
BST_Dict
*
rtn
=
new
BST_Dict
();
BST_Dict
*
rtn
=
new
BST_Dict
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
InternedString
dict_name
=
nodeName
();
InternedString
dict_name
=
nodeName
();
...
@@ -1207,14 +1174,12 @@ private:
...
@@ -1207,14 +1174,12 @@ private:
BST_slice
*
remapEllipsis
(
AST_Ellipsis
*
node
)
{
BST_slice
*
remapEllipsis
(
AST_Ellipsis
*
node
)
{
auto
r
=
new
BST_Ellipsis
();
auto
r
=
new
BST_Ellipsis
();
r
->
lineno
=
node
->
lineno
;
r
->
lineno
=
node
->
lineno
;
r
->
col_offset
=
node
->
col_offset
;
return
r
;
return
r
;
}
}
BST_slice
*
remapExtSlice
(
AST_ExtSlice
*
node
)
{
BST_slice
*
remapExtSlice
(
AST_ExtSlice
*
node
)
{
BST_ExtSlice
*
rtn
=
new
BST_ExtSlice
();
BST_ExtSlice
*
rtn
=
new
BST_ExtSlice
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
for
(
auto
*
e
:
node
->
dims
)
for
(
auto
*
e
:
node
->
dims
)
rtn
->
dims
.
push_back
(
remapSlice
(
e
));
rtn
->
dims
.
push_back
(
remapSlice
(
e
));
...
@@ -1386,7 +1351,6 @@ private:
...
@@ -1386,7 +1351,6 @@ private:
BST_slice
*
remapIndex
(
AST_Index
*
node
)
{
BST_slice
*
remapIndex
(
AST_Index
*
node
)
{
BST_Index
*
rtn
=
new
BST_Index
();
BST_Index
*
rtn
=
new
BST_Index
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
value
=
remapExpr
(
node
->
value
);
return
rtn
;
return
rtn
;
}
}
...
@@ -1401,13 +1365,11 @@ private:
...
@@ -1401,13 +1365,11 @@ private:
BST_expr
*
remapLambda
(
AST_Lambda
*
node
)
{
BST_expr
*
remapLambda
(
AST_Lambda
*
node
)
{
auto
stmt
=
new
AST_Return
;
auto
stmt
=
new
AST_Return
;
stmt
->
lineno
=
node
->
lineno
;
stmt
->
lineno
=
node
->
lineno
;
stmt
->
col_offset
=
node
->
col_offset
;
stmt
->
value
=
node
->
body
;
// don't remap now; will be CFG'ed later
stmt
->
value
=
node
->
body
;
// don't remap now; will be CFG'ed later
auto
bdef
=
new
BST_FunctionDef
();
auto
bdef
=
new
BST_FunctionDef
();
bdef
->
lineno
=
node
->
lineno
;
bdef
->
lineno
=
node
->
lineno
;
bdef
->
col_offset
=
node
->
col_offset
;
bdef
->
args
=
remapArguments
(
node
->
args
);
bdef
->
args
=
remapArguments
(
node
->
args
);
...
@@ -1424,7 +1386,6 @@ private:
...
@@ -1424,7 +1386,6 @@ private:
// AST_LangPrimitive can be PRINT_EXPR
// AST_LangPrimitive can be PRINT_EXPR
assert
(
node
->
opcode
==
AST_LangPrimitive
::
PRINT_EXPR
);
assert
(
node
->
opcode
==
AST_LangPrimitive
::
PRINT_EXPR
);
BST_LangPrimitive
*
rtn
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
PRINT_EXPR
);
BST_LangPrimitive
*
rtn
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
PRINT_EXPR
);
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
for
(
AST_expr
*
arg
:
node
->
args
)
{
for
(
AST_expr
*
arg
:
node
->
args
)
{
...
@@ -1438,7 +1399,6 @@ private:
...
@@ -1438,7 +1399,6 @@ private:
BST_List
*
rtn
=
new
BST_List
();
BST_List
*
rtn
=
new
BST_List
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
ctx_type
=
node
->
ctx_type
;
for
(
auto
elt
:
node
->
elts
)
{
for
(
auto
elt
:
node
->
elts
)
{
...
@@ -1450,7 +1410,6 @@ private:
...
@@ -1450,7 +1410,6 @@ private:
BST_expr
*
remapRepr
(
AST_Repr
*
node
)
{
BST_expr
*
remapRepr
(
AST_Repr
*
node
)
{
BST_Repr
*
rtn
=
new
BST_Repr
();
BST_Repr
*
rtn
=
new
BST_Repr
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
value
=
remapExpr
(
node
->
value
);
return
rtn
;
return
rtn
;
}
}
...
@@ -1458,7 +1417,6 @@ private:
...
@@ -1458,7 +1417,6 @@ private:
BST_expr
*
remapSet
(
AST_Set
*
node
)
{
BST_expr
*
remapSet
(
AST_Set
*
node
)
{
BST_Set
*
rtn
=
new
BST_Set
();
BST_Set
*
rtn
=
new
BST_Set
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
for
(
auto
e
:
node
->
elts
)
{
for
(
auto
e
:
node
->
elts
)
{
rtn
->
elts
.
push_back
(
remapExpr
(
e
));
rtn
->
elts
.
push_back
(
remapExpr
(
e
));
...
@@ -1470,7 +1428,6 @@ private:
...
@@ -1470,7 +1428,6 @@ private:
BST_slice
*
remapSlice
(
AST_Slice
*
node
)
{
BST_slice
*
remapSlice
(
AST_Slice
*
node
)
{
BST_Slice
*
rtn
=
new
BST_Slice
();
BST_Slice
*
rtn
=
new
BST_Slice
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
lower
=
remapExpr
(
node
->
lower
);
rtn
->
lower
=
remapExpr
(
node
->
lower
);
rtn
->
upper
=
remapExpr
(
node
->
upper
);
rtn
->
upper
=
remapExpr
(
node
->
upper
);
...
@@ -1484,7 +1441,6 @@ private:
...
@@ -1484,7 +1441,6 @@ private:
BST_Tuple
*
rtn
=
new
BST_Tuple
();
BST_Tuple
*
rtn
=
new
BST_Tuple
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
ctx_type
=
node
->
ctx_type
;
for
(
auto
elt
:
node
->
elts
)
{
for
(
auto
elt
:
node
->
elts
)
{
...
@@ -1496,7 +1452,6 @@ private:
...
@@ -1496,7 +1452,6 @@ private:
BST_expr
*
remapSubscript
(
AST_Subscript
*
node
)
{
BST_expr
*
remapSubscript
(
AST_Subscript
*
node
)
{
BST_Subscript
*
rtn
=
new
BST_Subscript
();
BST_Subscript
*
rtn
=
new
BST_Subscript
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
ctx_type
=
node
->
ctx_type
;
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
slice
=
remapSlice
(
node
->
slice
);
rtn
->
slice
=
remapSlice
(
node
->
slice
);
...
@@ -1506,7 +1461,6 @@ private:
...
@@ -1506,7 +1461,6 @@ private:
BST_expr
*
remapUnaryOp
(
AST_UnaryOp
*
node
)
{
BST_expr
*
remapUnaryOp
(
AST_UnaryOp
*
node
)
{
BST_UnaryOp
*
rtn
=
new
BST_UnaryOp
();
BST_UnaryOp
*
rtn
=
new
BST_UnaryOp
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
op_type
=
node
->
op_type
;
rtn
->
op_type
=
node
->
op_type
;
rtn
->
operand
=
remapExpr
(
node
->
operand
);
rtn
->
operand
=
remapExpr
(
node
->
operand
);
return
rtn
;
return
rtn
;
...
@@ -1515,7 +1469,6 @@ private:
...
@@ -1515,7 +1469,6 @@ private:
BST_expr
*
remapYield
(
AST_Yield
*
node
)
{
BST_expr
*
remapYield
(
AST_Yield
*
node
)
{
BST_Yield
*
rtn
=
new
BST_Yield
();
BST_Yield
*
rtn
=
new
BST_Yield
();
rtn
->
lineno
=
node
->
lineno
;
rtn
->
lineno
=
node
->
lineno
;
rtn
->
col_offset
=
node
->
col_offset
;
rtn
->
value
=
remapExpr
(
node
->
value
);
rtn
->
value
=
remapExpr
(
node
->
value
);
InternedString
node_name
(
nodeName
());
InternedString
node_name
(
nodeName
());
...
@@ -1815,7 +1768,6 @@ public:
...
@@ -1815,7 +1768,6 @@ public:
BST_Invoke
*
invoke
=
new
BST_Invoke
(
node
);
BST_Invoke
*
invoke
=
new
BST_Invoke
(
node
);
invoke
->
normal_dest
=
normal_dest
;
invoke
->
normal_dest
=
normal_dest
;
invoke
->
exc_dest
=
exc_dest
;
invoke
->
exc_dest
=
exc_dest
;
invoke
->
col_offset
=
node
->
col_offset
;
invoke
->
lineno
=
node
->
lineno
;
invoke
->
lineno
=
node
->
lineno
;
curblock
->
push_back
(
invoke
);
curblock
->
push_back
(
invoke
);
...
@@ -1849,7 +1801,6 @@ public:
...
@@ -1849,7 +1801,6 @@ public:
bool
visit_classdef
(
AST_ClassDef
*
node
)
override
{
bool
visit_classdef
(
AST_ClassDef
*
node
)
override
{
auto
def
=
new
BST_ClassDef
();
auto
def
=
new
BST_ClassDef
();
def
->
lineno
=
node
->
lineno
;
def
->
lineno
=
node
->
lineno
;
def
->
col_offset
=
node
->
col_offset
;
def
->
name
=
node
->
name
;
def
->
name
=
node
->
name
;
// Decorators are evaluated before bases:
// Decorators are evaluated before bases:
...
@@ -1865,7 +1816,7 @@ public:
...
@@ -1865,7 +1816,7 @@ public:
auto
tmp
=
nodeName
();
auto
tmp
=
nodeName
();
pushAssign
(
tmp
,
new
BST_MakeClass
(
def
));
pushAssign
(
tmp
,
new
BST_MakeClass
(
def
));
pushAssign
(
scoping
->
mangleName
(
def
->
name
),
makeName
(
tmp
,
AST_TYPE
::
Load
,
node
->
lineno
,
0
,
true
));
pushAssign
(
scoping
->
mangleName
(
def
->
name
),
makeName
(
tmp
,
AST_TYPE
::
Load
,
node
->
lineno
,
true
));
return
true
;
return
true
;
}
}
...
@@ -1873,7 +1824,6 @@ public:
...
@@ -1873,7 +1824,6 @@ public:
bool
visit_functiondef
(
AST_FunctionDef
*
node
)
override
{
bool
visit_functiondef
(
AST_FunctionDef
*
node
)
override
{
auto
def
=
new
BST_FunctionDef
();
auto
def
=
new
BST_FunctionDef
();
def
->
lineno
=
node
->
lineno
;
def
->
lineno
=
node
->
lineno
;
def
->
col_offset
=
node
->
col_offset
;
def
->
name
=
node
->
name
;
def
->
name
=
node
->
name
;
// Decorators are evaluated before the defaults, so this *must* go before remapArguments().
// Decorators are evaluated before the defaults, so this *must* go before remapArguments().
...
@@ -1889,7 +1839,7 @@ public:
...
@@ -1889,7 +1839,7 @@ public:
auto
tmp
=
nodeName
();
auto
tmp
=
nodeName
();
pushAssign
(
tmp
,
new
BST_MakeFunction
(
def
));
pushAssign
(
tmp
,
new
BST_MakeFunction
(
def
));
pushAssign
(
scoping
->
mangleName
(
def
->
name
),
makeName
(
tmp
,
AST_TYPE
::
Load
,
node
->
lineno
,
node
->
col_offset
,
true
));
pushAssign
(
scoping
->
mangleName
(
def
->
name
),
makeName
(
tmp
,
AST_TYPE
::
Load
,
node
->
lineno
,
true
));
return
true
;
return
true
;
}
}
...
@@ -1912,7 +1862,6 @@ public:
...
@@ -1912,7 +1862,6 @@ public:
for
(
AST_alias
*
a
:
node
->
names
)
{
for
(
AST_alias
*
a
:
node
->
names
)
{
BST_LangPrimitive
*
import
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_NAME
);
BST_LangPrimitive
*
import
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_NAME
);
import
->
lineno
=
node
->
lineno
;
import
->
lineno
=
node
->
lineno
;
import
->
col_offset
=
node
->
col_offset
;
import
->
args
.
push_back
(
new
BST_Num
());
import
->
args
.
push_back
(
new
BST_Num
());
static_cast
<
BST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
static_cast
<
BST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
...
@@ -1965,7 +1914,6 @@ public:
...
@@ -1965,7 +1914,6 @@ public:
bool
visit_importfrom
(
AST_ImportFrom
*
node
)
override
{
bool
visit_importfrom
(
AST_ImportFrom
*
node
)
override
{
BST_LangPrimitive
*
import
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_NAME
);
BST_LangPrimitive
*
import
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_NAME
);
import
->
lineno
=
node
->
lineno
;
import
->
lineno
=
node
->
lineno
;
import
->
col_offset
=
node
->
col_offset
;
import
->
args
.
push_back
(
new
BST_Num
());
import
->
args
.
push_back
(
new
BST_Num
());
static_cast
<
BST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
static_cast
<
BST_Num
*>
(
import
->
args
[
0
])
->
num_type
=
AST_Num
::
INT
;
...
@@ -1998,19 +1946,16 @@ public:
...
@@ -1998,19 +1946,16 @@ public:
BST_LangPrimitive
*
import_star
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_STAR
);
BST_LangPrimitive
*
import_star
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_STAR
);
import_star
->
lineno
=
node
->
lineno
;
import_star
->
lineno
=
node
->
lineno
;
import_star
->
col_offset
=
node
->
col_offset
;
import_star
->
args
.
push_back
(
makeLoad
(
tmp_module_name
,
node
,
is_kill
));
import_star
->
args
.
push_back
(
makeLoad
(
tmp_module_name
,
node
,
is_kill
));
BST_Expr
*
import_star_expr
=
new
BST_Expr
();
BST_Expr
*
import_star_expr
=
new
BST_Expr
();
import_star_expr
->
value
=
import_star
;
import_star_expr
->
value
=
import_star
;
import_star_expr
->
lineno
=
node
->
lineno
;
import_star_expr
->
lineno
=
node
->
lineno
;
import_star_expr
->
col_offset
=
node
->
col_offset
;
push_back
(
import_star_expr
);
push_back
(
import_star_expr
);
}
else
{
}
else
{
BST_LangPrimitive
*
import_from
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_FROM
);
BST_LangPrimitive
*
import_from
=
new
BST_LangPrimitive
(
BST_LangPrimitive
::
IMPORT_FROM
);
import_from
->
lineno
=
node
->
lineno
;
import_from
->
lineno
=
node
->
lineno
;
import_from
->
col_offset
=
node
->
col_offset
;
import_from
->
args
.
push_back
(
makeLoad
(
tmp_module_name
,
node
,
is_kill
));
import_from
->
args
.
push_back
(
makeLoad
(
tmp_module_name
,
node
,
is_kill
));
import_from
->
args
.
push_back
(
new
BST_Str
(
a
->
name
.
s
()));
import_from
->
args
.
push_back
(
new
BST_Str
(
a
->
name
.
s
()));
...
@@ -2053,7 +1998,6 @@ public:
...
@@ -2053,7 +1998,6 @@ public:
fake_test
->
n_int
=
0
;
fake_test
->
n_int
=
0
;
remapped
->
test
=
fake_test
;
remapped
->
test
=
fake_test
;
remapped
->
lineno
=
node
->
lineno
;
remapped
->
lineno
=
node
->
lineno
;
remapped
->
col_offset
=
node
->
col_offset
;
push_back
(
remapped
);
push_back
(
remapped
);
curblock
=
iftrue
;
curblock
=
iftrue
;
...
@@ -2115,14 +2059,12 @@ public:
...
@@ -2115,14 +2059,12 @@ public:
s_target
->
value
=
remapExpr
(
s
->
value
);
s_target
->
value
=
remapExpr
(
s
->
value
);
s_target
->
slice
=
remapSlice
(
s
->
slice
);
s_target
->
slice
=
remapSlice
(
s
->
slice
);
s_target
->
ctx_type
=
AST_TYPE
::
Store
;
s_target
->
ctx_type
=
AST_TYPE
::
Store
;
s_target
->
col_offset
=
s
->
col_offset
;
s_target
->
lineno
=
s
->
lineno
;
s_target
->
lineno
=
s
->
lineno
;
remapped_target
=
s_target
;
remapped_target
=
s_target
;
BST_Subscript
*
s_lhs
=
new
BST_Subscript
();
BST_Subscript
*
s_lhs
=
new
BST_Subscript
();
s_lhs
->
value
=
_dup
(
s_target
->
value
);
s_lhs
->
value
=
_dup
(
s_target
->
value
);
s_lhs
->
slice
=
_dup
(
s_target
->
slice
);
s_lhs
->
slice
=
_dup
(
s_target
->
slice
);
s_lhs
->
col_offset
=
s
->
col_offset
;
s_lhs
->
lineno
=
s
->
lineno
;
s_lhs
->
lineno
=
s
->
lineno
;
s_lhs
->
ctx_type
=
AST_TYPE
::
Load
;
s_lhs
->
ctx_type
=
AST_TYPE
::
Load
;
remapped_lhs
=
wrap
(
s_lhs
);
remapped_lhs
=
wrap
(
s_lhs
);
...
@@ -2137,7 +2079,6 @@ public:
...
@@ -2137,7 +2079,6 @@ public:
a_target
->
value
=
remapExpr
(
a
->
value
);
a_target
->
value
=
remapExpr
(
a
->
value
);
a_target
->
attr
=
scoping
->
mangleName
(
a
->
attr
);
a_target
->
attr
=
scoping
->
mangleName
(
a
->
attr
);
a_target
->
ctx_type
=
AST_TYPE
::
Store
;
a_target
->
ctx_type
=
AST_TYPE
::
Store
;
a_target
->
col_offset
=
a
->
col_offset
;
a_target
->
lineno
=
a
->
lineno
;
a_target
->
lineno
=
a
->
lineno
;
remapped_target
=
a_target
;
remapped_target
=
a_target
;
...
@@ -2145,7 +2086,6 @@ public:
...
@@ -2145,7 +2086,6 @@ public:
a_lhs
->
value
=
_dup
(
a_target
->
value
);
a_lhs
->
value
=
_dup
(
a_target
->
value
);
a_lhs
->
attr
=
a_target
->
attr
;
a_lhs
->
attr
=
a_target
->
attr
;
a_lhs
->
ctx_type
=
AST_TYPE
::
Load
;
a_lhs
->
ctx_type
=
AST_TYPE
::
Load
;
a_lhs
->
col_offset
=
a
->
col_offset
;
a_lhs
->
lineno
=
a
->
lineno
;
a_lhs
->
lineno
=
a
->
lineno
;
remapped_lhs
=
wrap
(
a_lhs
);
remapped_lhs
=
wrap
(
a_lhs
);
...
@@ -2159,7 +2099,6 @@ public:
...
@@ -2159,7 +2099,6 @@ public:
binop
->
op_type
=
remapBinOpType
(
node
->
op_type
);
binop
->
op_type
=
remapBinOpType
(
node
->
op_type
);
binop
->
left
=
remapped_lhs
;
binop
->
left
=
remapped_lhs
;
binop
->
right
=
remapExpr
(
node
->
value
);
binop
->
right
=
remapExpr
(
node
->
value
);
binop
->
col_offset
=
node
->
col_offset
;
binop
->
lineno
=
node
->
lineno
;
binop
->
lineno
=
node
->
lineno
;
InternedString
node_name
(
nodeName
());
InternedString
node_name
(
nodeName
());
...
@@ -2230,7 +2169,6 @@ public:
...
@@ -2230,7 +2169,6 @@ public:
if
(
target
!=
NULL
)
{
if
(
target
!=
NULL
)
{
BST_Delete
*
astdel
=
new
BST_Delete
();
BST_Delete
*
astdel
=
new
BST_Delete
();
astdel
->
lineno
=
node
->
lineno
;
astdel
->
lineno
=
node
->
lineno
;
astdel
->
col_offset
=
node
->
col_offset
;
astdel
->
target
=
target
;
astdel
->
target
=
target
;
push_back
(
astdel
);
push_back
(
astdel
);
}
}
...
@@ -2242,7 +2180,6 @@ public:
...
@@ -2242,7 +2180,6 @@ public:
bool
visit_expr
(
AST_Expr
*
node
)
override
{
bool
visit_expr
(
AST_Expr
*
node
)
override
{
BST_Expr
*
remapped
=
new
BST_Expr
();
BST_Expr
*
remapped
=
new
BST_Expr
();
remapped
->
lineno
=
node
->
lineno
;
remapped
->
lineno
=
node
->
lineno
;
remapped
->
col_offset
=
node
->
col_offset
;
remapped
->
value
=
remapExpr
(
node
->
value
,
false
);
remapped
->
value
=
remapExpr
(
node
->
value
,
false
);
push_back
(
remapped
);
push_back
(
remapped
);
return
true
;
return
true
;
...
@@ -2254,7 +2191,6 @@ public:
...
@@ -2254,7 +2191,6 @@ public:
int
i
=
0
;
int
i
=
0
;
for
(
auto
v
:
node
->
values
)
{
for
(
auto
v
:
node
->
values
)
{
BST_Print
*
remapped
=
new
BST_Print
();
BST_Print
*
remapped
=
new
BST_Print
();
remapped
->
col_offset
=
node
->
col_offset
;
remapped
->
lineno
=
node
->
lineno
;
remapped
->
lineno
=
node
->
lineno
;
if
(
i
<
node
->
values
.
size
()
-
1
)
{
if
(
i
<
node
->
values
.
size
()
-
1
)
{
...
@@ -2275,7 +2211,6 @@ public:
...
@@ -2275,7 +2211,6 @@ public:
assert
(
node
->
nl
);
assert
(
node
->
nl
);
BST_Print
*
final
=
new
BST_Print
();
BST_Print
*
final
=
new
BST_Print
();
final
->
col_offset
=
node
->
col_offset
;
final
->
lineno
=
node
->
lineno
;
final
->
lineno
=
node
->
lineno
;
// TODO not good to reuse 'dest' like this
// TODO not good to reuse 'dest' like this
final
->
dest
=
dest
;
final
->
dest
=
dest
;
...
@@ -2306,7 +2241,6 @@ public:
...
@@ -2306,7 +2241,6 @@ public:
assert
(
curblock
);
assert
(
curblock
);
BST_Branch
*
br
=
new
BST_Branch
();
BST_Branch
*
br
=
new
BST_Branch
();
br
->
col_offset
=
node
->
col_offset
;
br
->
lineno
=
node
->
lineno
;
br
->
lineno
=
node
->
lineno
;
br
->
test
=
callNonzero
(
remapExpr
(
node
->
test
));
br
->
test
=
callNonzero
(
remapExpr
(
node
->
test
));
push_back
(
br
);
push_back
(
br
);
...
@@ -2373,7 +2307,6 @@ public:
...
@@ -2373,7 +2307,6 @@ public:
bool
visit_exec
(
AST_Exec
*
node
)
override
{
bool
visit_exec
(
AST_Exec
*
node
)
override
{
BST_Exec
*
astexec
=
new
BST_Exec
();
BST_Exec
*
astexec
=
new
BST_Exec
();
astexec
->
lineno
=
node
->
lineno
;
astexec
->
lineno
=
node
->
lineno
;
astexec
->
col_offset
=
node
->
col_offset
;
astexec
->
body
=
remapExpr
(
node
->
body
);
astexec
->
body
=
remapExpr
(
node
->
body
);
astexec
->
globals
=
remapExpr
(
node
->
globals
);
astexec
->
globals
=
remapExpr
(
node
->
globals
);
astexec
->
locals
=
remapExpr
(
node
->
locals
);
astexec
->
locals
=
remapExpr
(
node
->
locals
);
...
@@ -2441,7 +2374,7 @@ public:
...
@@ -2441,7 +2374,7 @@ public:
BST_stmt
*
makeKill
(
InternedString
name
)
{
BST_stmt
*
makeKill
(
InternedString
name
)
{
// There might be a better way to represent this, maybe with a dedicated AST_Kill bytecode?
// There might be a better way to represent this, maybe with a dedicated AST_Kill bytecode?
auto
del
=
new
BST_Delete
();
auto
del
=
new
BST_Delete
();
del
->
target
=
makeName
(
name
,
AST_TYPE
::
Del
,
0
,
0
,
false
);
del
->
target
=
makeName
(
name
,
AST_TYPE
::
Del
,
0
,
false
);
return
del
;
return
del
;
}
}
...
@@ -2553,7 +2486,6 @@ public:
...
@@ -2553,7 +2486,6 @@ public:
assert
(
curblock
);
assert
(
curblock
);
BST_Raise
*
remapped
=
new
BST_Raise
();
BST_Raise
*
remapped
=
new
BST_Raise
();
remapped
->
col_offset
=
node
->
col_offset
;
remapped
->
lineno
=
node
->
lineno
;
remapped
->
lineno
=
node
->
lineno
;
if
(
node
->
arg0
)
if
(
node
->
arg0
)
...
@@ -3110,8 +3042,7 @@ static CFG* computeCFG(llvm::ArrayRef<AST_stmt*> body, AST_TYPE::AST_TYPE ast_ty
...
@@ -3110,8 +3042,7 @@ static CFG* computeCFG(llvm::ArrayRef<AST_stmt*> body, AST_TYPE::AST_TYPE ast_ty
for
(
AST_expr
*
arg_expr
:
args
->
args
)
{
for
(
AST_expr
*
arg_expr
:
args
->
args
)
{
if
(
arg_expr
->
type
==
AST_TYPE
::
Tuple
)
{
if
(
arg_expr
->
type
==
AST_TYPE
::
Tuple
)
{
InternedString
arg_name
=
stringpool
.
get
(
"."
+
std
::
to_string
(
counter
));
InternedString
arg_name
=
stringpool
.
get
(
"."
+
std
::
to_string
(
counter
));
BST_Name
*
arg_name_expr
BST_Name
*
arg_name_expr
=
new
BST_Name
(
arg_name
,
AST_TYPE
::
Load
,
arg_expr
->
lineno
);
=
new
BST_Name
(
arg_name
,
AST_TYPE
::
Load
,
arg_expr
->
lineno
,
arg_expr
->
col_offset
);
assert
(
scoping
->
getScopeTypeOfName
(
arg_name
)
==
ScopeInfo
::
VarScopeType
::
FAST
);
assert
(
scoping
->
getScopeTypeOfName
(
arg_name
)
==
ScopeInfo
::
VarScopeType
::
FAST
);
arg_name_expr
->
lookup_type
=
ScopeInfo
::
VarScopeType
::
FAST
;
arg_name_expr
->
lookup_type
=
ScopeInfo
::
VarScopeType
::
FAST
;
visitor
.
pushAssign
(
arg_expr
,
arg_name_expr
);
visitor
.
pushAssign
(
arg_expr
,
arg_name_expr
);
...
@@ -3144,7 +3075,6 @@ static CFG* computeCFG(llvm::ArrayRef<AST_stmt*> body, AST_TYPE::AST_TYPE ast_ty
...
@@ -3144,7 +3075,6 @@ static CFG* computeCFG(llvm::ArrayRef<AST_stmt*> body, AST_TYPE::AST_TYPE ast_ty
// having to support not having a return statement:
// having to support not having a return statement:
BST_Return
*
return_stmt
=
new
BST_Return
();
BST_Return
*
return_stmt
=
new
BST_Return
();
return_stmt
->
lineno
=
getLastLineno
(
body
,
lineno
);
return_stmt
->
lineno
=
getLastLineno
(
body
,
lineno
);
return_stmt
->
col_offset
=
0
;
return_stmt
->
value
=
NULL
;
return_stmt
->
value
=
NULL
;
visitor
.
push_back
(
return_stmt
);
visitor
.
push_back
(
return_stmt
);
}
}
...
...
src/core/types.h
View file @
1228d981
...
@@ -997,11 +997,10 @@ void raiseSyntaxErrorHelper(llvm::StringRef file, llvm::StringRef func, AST* nod
...
@@ -997,11 +997,10 @@ void raiseSyntaxErrorHelper(llvm::StringRef file, llvm::StringRef func, AST* nod
// A data structure used for storing information for tracebacks.
// A data structure used for storing information for tracebacks.
struct
LineInfo
{
struct
LineInfo
{
public:
public:
int
line
,
column
;
int
line
;
BoxedString
*
file
,
*
func
;
BoxedString
*
file
,
*
func
;
LineInfo
(
int
line
,
int
column
,
BoxedString
*
file
,
BoxedString
*
func
)
LineInfo
(
int
line
,
BoxedString
*
file
,
BoxedString
*
func
)
:
line
(
line
),
file
(
file
),
func
(
func
)
{}
:
line
(
line
),
column
(
column
),
file
(
file
),
func
(
func
)
{}
};
};
// A data structure to simplify passing around all the data about a thrown exception.
// A data structure to simplify passing around all the data about a thrown exception.
...
...
src/runtime/cxx_unwind.cpp
View file @
1228d981
...
@@ -361,7 +361,7 @@ static void print_frame(unw_cursor_t* cursor, const unw_proc_info_t* pip) {
...
@@ -361,7 +361,7 @@ static void print_frame(unw_cursor_t* cursor, const unw_proc_info_t* pip) {
if
(
frame_type
==
INTERPRETED
&&
cf
&&
cur_stmt
)
{
if
(
frame_type
==
INTERPRETED
&&
cf
&&
cur_stmt
)
{
auto
source
=
cf
->
code_obj
->
source
.
get
();
auto
source
=
cf
->
code_obj
->
source
.
get
();
// FIXME: dup'ed from lineInfoForFrame
// FIXME: dup'ed from lineInfoForFrame
LineInfo
line
(
cur_stmt
->
lineno
,
c
ur_stmt
->
col_offset
,
c
f
->
code_obj
->
filename
,
cf
->
code_obj
->
name
);
LineInfo
line
(
cur_stmt
->
lineno
,
cf
->
code_obj
->
filename
,
cf
->
code_obj
->
name
);
printf
(
" File
\"
%s
\"
, line %d, in %s
\n
"
,
line
.
file
->
c_str
(),
line
.
line
,
line
.
func
->
c_str
());
printf
(
" File
\"
%s
\"
, line %d, in %s
\n
"
,
line
.
file
->
c_str
(),
line
.
line
,
line
.
func
->
c_str
());
}
}
}
}
...
...
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