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
f76fb2fe
Commit
f76fb2fe
authored
Aug 08, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add -R option to pyston, enable random seed
parent
bb7e9a9e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/jit.cpp
src/jit.cpp
+10
-1
No files found.
src/jit.cpp
View file @
f76fb2fe
...
@@ -301,7 +301,7 @@ static int main(int argc, char** argv) {
...
@@ -301,7 +301,7 @@ static int main(int argc, char** argv) {
// Suppress getopt errors so we can throw them ourselves
// Suppress getopt errors so we can throw them ourselves
opterr
=
0
;
opterr
=
0
;
while
((
code
=
getopt
(
argc
,
argv
,
"+:OqdIibpjtrsSvnxEac:FuPTGm:"
))
!=
-
1
)
{
while
((
code
=
getopt
(
argc
,
argv
,
"+:OqdIibpjtrs
R
SvnxEac:FuPTGm:"
))
!=
-
1
)
{
if
(
code
==
'c'
)
{
if
(
code
==
'c'
)
{
assert
(
optarg
);
assert
(
optarg
);
command
=
optarg
;
command
=
optarg
;
...
@@ -312,6 +312,9 @@ static int main(int argc, char** argv) {
...
@@ -312,6 +312,9 @@ static int main(int argc, char** argv) {
module
=
optarg
;
module
=
optarg
;
// no more option parsing; the rest of our arguments go into sys.argv.
// no more option parsing; the rest of our arguments go into sys.argv.
break
;
break
;
}
else
if
(
code
==
'R'
)
{
Py_HashRandomizationFlag
=
1
;
break
;
}
else
if
(
code
==
':'
)
{
}
else
if
(
code
==
':'
)
{
fprintf
(
stderr
,
"Argument expected for the -%c option
\n
"
,
optopt
);
fprintf
(
stderr
,
"Argument expected for the -%c option
\n
"
,
optopt
);
return
2
;
return
2
;
...
@@ -324,7 +327,13 @@ static int main(int argc, char** argv) {
...
@@ -324,7 +327,13 @@ static int main(int argc, char** argv) {
return
r
;
return
r
;
}
}
}
}
/* The variable is only tested for existence here; _PyRandom_Init will
check its value further. */
char
*
p
;
if
(
!
Py_HashRandomizationFlag
&&
(
p
=
Py_GETENV
(
"PYTHONHASHSEED"
))
&&
*
p
!=
'\0'
)
Py_HashRandomizationFlag
=
1
;
_PyRandom_Init
();
Stats
::
startEstimatingCPUFreq
();
Stats
::
startEstimatingCPUFreq
();
const
char
*
fn
=
NULL
;
const
char
*
fn
=
NULL
;
...
...
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