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
36bfb94e
Commit
36bfb94e
authored
Oct 10, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ifdef out some only-for-debug variables
parent
07158a65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
src/runtime/rewrite_args.h
src/runtime/rewrite_args.h
+17
-2
No files found.
src/runtime/rewrite_args.h
View file @
36bfb94e
...
@@ -55,14 +55,21 @@ private:
...
@@ -55,14 +55,21 @@ private:
bool
out_success
;
bool
out_success
;
RewriterVar
*
out_rtn
;
RewriterVar
*
out_rtn
;
ReturnConvention
out_return_convention
;
ReturnConvention
out_return_convention
;
#ifndef NDEBUG
bool
return_convention_checked
;
bool
return_convention_checked
;
#endif
public:
public:
_ReturnConventionBase
()
_ReturnConventionBase
()
:
out_success
(
false
),
:
out_success
(
false
),
out_rtn
(
NULL
),
out_rtn
(
NULL
),
out_return_convention
(
ReturnConvention
::
UNSPECIFIED
),
out_return_convention
(
ReturnConvention
::
UNSPECIFIED
)
return_convention_checked
(
false
)
{}
#ifndef NDEBUG
,
return_convention_checked
(
false
)
#endif
{
}
#ifndef NDEBUG
#ifndef NDEBUG
~
_ReturnConventionBase
()
{
~
_ReturnConventionBase
()
{
...
@@ -112,13 +119,17 @@ public:
...
@@ -112,13 +119,17 @@ public:
out_success
=
false
;
out_success
=
false
;
out_rtn
=
NULL
;
out_rtn
=
NULL
;
out_return_convention
=
ReturnConvention
::
UNSPECIFIED
;
out_return_convention
=
ReturnConvention
::
UNSPECIFIED
;
#ifndef NDEBUG
return_convention_checked
=
false
;
return_convention_checked
=
false
;
#endif
}
}
RewriterVar
*
getReturn
(
ReturnConvention
required_convention
)
{
RewriterVar
*
getReturn
(
ReturnConvention
required_convention
)
{
assert
(
isSuccessful
());
assert
(
isSuccessful
());
assert
(
this
->
out_return_convention
==
required_convention
);
assert
(
this
->
out_return_convention
==
required_convention
);
#ifndef NDEBUG
return_convention_checked
=
true
;
return_convention_checked
=
true
;
#endif
return
this
->
out_rtn
;
return
this
->
out_rtn
;
}
}
...
@@ -126,12 +137,16 @@ public:
...
@@ -126,12 +137,16 @@ public:
assert
(
isSuccessful
());
assert
(
isSuccessful
());
ASSERT
(
this
->
out_return_convention
==
required_convention
,
"user asked for convention %d but got %d"
,
ASSERT
(
this
->
out_return_convention
==
required_convention
,
"user asked for convention %d but got %d"
,
required_convention
,
this
->
out_return_convention
);
required_convention
,
this
->
out_return_convention
);
#ifndef NDEBUG
return_convention_checked
=
true
;
return_convention_checked
=
true
;
#endif
}
}
std
::
pair
<
RewriterVar
*
,
ReturnConvention
>
getReturn
()
{
std
::
pair
<
RewriterVar
*
,
ReturnConvention
>
getReturn
()
{
assert
(
isSuccessful
());
assert
(
isSuccessful
());
#ifndef NDEBUG
return_convention_checked
=
true
;
return_convention_checked
=
true
;
#endif
return
std
::
make_pair
(
this
->
out_rtn
,
this
->
out_return_convention
);
return
std
::
make_pair
(
this
->
out_rtn
,
this
->
out_return_convention
);
}
}
...
...
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