Commit Graph

35 Commits

Author SHA1 Message Date
practicalswift
c69ffe4eb6 [Python] Use new style class definitions: "class A" → "class A(object)" 2016-03-09 09:42:42 +01:00
Brian Gesiak
c9000af795 Merge pull request #1526 from practicalswift/fix-pep8-violations-ii
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
2016-03-08 23:55:46 -05:00
practicalswift
265835fdfc [Python] Use consistent import ordering for Python code
Ordering used:
1.) standard library imports
2.) third party imports
3.) local package imports

Each group is individually alphabetized.
2016-03-07 23:25:16 +01:00
practicalswift
183da818df [Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
2016-03-07 22:36:23 +01:00
practicalswift
04afd6e640 [Python] Improve consistency: "block comment should start with '# '" (PEP-8) 2016-03-05 14:03:16 +01:00
practicalswift
e33f1747a9 [Python] Improve Python consistency: "variable in function should be lowercase" (N806)
The repo contains roughly 80 Python scripts. "snake_case" naming is used for
local variables in all those scripts. This is the form recommended by the PEP 8
naming recommendations (Python Software Foundation) and typically associated
with idiomatic Python code.

However, in nine of the 80 scripts there were at least one instance of
"camelCase" naming prior to this commit.

This commit improves consistency in the Python code base by making sure that
these nine remaining files follow the variable naming convention used for
Python code in the project.

References:
* PEP 8: https://www.python.org/dev/peps/pep-0008/
* pep8-naming: https://pypi.python.org/pypi/pep8-naming
2016-03-02 18:56:47 +01:00
practicalswift
f6d6585ee0 [Python] Improve Python consistency: Use function_name(…) throughout (PEP8) 2016-02-29 22:49:19 +01:00
practicalswift
d8a7c4b447 [Python] Argument names should be lowercase by convention 2016-02-20 23:29:41 +01:00
practicalswift
970216434d [Python] Fix "too many leading '#' for block comment"
See discussion with @gribozavr in https://github.com/apple/swift/pull/1287#issuecomment-183413319
2016-02-12 23:02:10 +01:00
practicalswift
679f1853d2 PEP8: Fix all violations of type "at least two spaces before inline comment" (E261) 2016-01-24 10:10:55 +01:00
practicalswift
d021aedbdc PEP8: Fix all violations of type "too many blank lines" (E303) 2016-01-24 10:10:50 +01:00
practicalswift
2d2fb22ac0 [gardening] PEP8: Fix remaining "missing whitespace around arithmetic operator" violation.
utils/swift-bench.py:358:33: E226 missing whitespace around arithmetic operator
2016-01-24 08:49:07 +01:00
practicalswift
1cd4d4e9c9 [gardening] Fix violations of non-controversial PEP8 rules
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
2016-01-23 09:23:33 +01:00
practicalswift
516913dfbb [gardening] Use the idiomatic convention of naming unused variables "_" 2016-01-22 23:38:42 +01:00
atrick
8afab353ff Merge pull request #989 from practicalswift/remove-numpy-dependency
Remove numpy dependency
2016-01-21 11:23:19 -08:00
practicalswift
0ac88dc53a Remove numpy dependency. 2016-01-16 01:21:53 +01:00
Anton Blanchard
b1827d8a8f Add powerpc64le Linux support
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.

The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Alex Chan
1f2a39c5f3 Tidy up Python file handlers
Rather than using `f = open(path).read()`, which leaves the file open
for an indeterminate period of time, switch to the `with open(path) as f`
idiom, which ensures the file is always closed correctly.
2015-12-22 22:33:18 +00:00
practicalswift
335270e9f2 Remove local variables that are assigned but never used. 2015-12-21 10:24:08 +01:00
practicalswift
cd337dc83b Remove unused imports. 2015-12-21 10:24:08 +01:00
Alex Chan
ce7ce98a01 Update Python build scripts to use the print function
In Python 3, 'print' was changed from a statement to a function.  Using
the __future__ module allows scripts to use print function whether
running with Python 2.6+ or Python 3.x.  This commit changes as many
instances of print as I could find to use the print function and the
__future__ module.
2015-12-18 23:00:55 +00:00
Justas Brazauskas
e799d3e93e Fix typos 2015-12-11 10:58:23 +02:00
Maarten Bode
ba807a2594 Fixed typo
Mesaure > Measure
2015-12-03 22:36:14 +01:00
Joe Groff
fbd2e4d872 Rename @asmname to @_silgen_name.
This reflects the fact that the attribute's only for compiler-internal use, and isn't really equivalent to C's asm attribute, since it doesn't change the calling convention to be C-compatible.
2015-11-17 14:13:48 -08:00
Mikhail Zolotukhin
0df4eb6f41 Swift-bench: Create all new files in the working directory.
Swift SVN r21588
2014-08-29 19:20:55 +00:00
Mikhail Zolotukhin
842bb804a9 Swift-bench: Cache compilation results.
Swift SVN r21587
2014-08-29 19:20:53 +00:00
Mikhail Zolotukhin
6e7498cc11 Swift-bench: Add opaque for optimizer functions getInt32 and getInt64.
Swift SVN r21586
2014-08-29 19:20:50 +00:00
Mikhail Zolotukhin
8536c07ea6 Swift-bench: Handle tests whose running time doesn't depend on number of iterations.
Swift SVN r21585
2014-08-29 19:20:46 +00:00
Mikhail Zolotukhin
31de6fb6f2 Swift-bench: Add opt-flags argument.
Swift SVN r21583
2014-08-29 17:57:36 +00:00
Mikhail Zolotukhin
fb9040e213 Swift-bench: Improve logging.
Swift SVN r21582
2014-08-29 17:45:05 +00:00
Mikhail Zolotukhin
8f4e701883 Swift-bench: Add a wrapper class and implement arguments parsing.
Swift SVN r21580
2014-08-29 15:39:06 +00:00
Dmitri Hrybenko
4098c9a267 swift-bench: add shebang
Swift SVN r21532
2014-08-28 15:14:26 +00:00
Dmitri Hrybenko
60bf3c14f2 swift-bench: add standard license header
Swift SVN r21531
2014-08-28 15:11:44 +00:00
Mikhail Zolotukhin
db381956ad Add utils/swift-bench.py, which is a new test harness.
Currently it's in early development stage, and is not intented for
massive usage.

Feature requests can be posted here:
<rdar://problem/18072938>

Swift SVN r21530
2014-08-28 15:06:40 +00:00