1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 10:07:45 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Joel Martin
20e8dea043 Refactor to use run scripts, remove *_RUNSTEP
- Add */run script for every implementation.

- Refactor Clojure build to allow individual jar files for each step.

- Update FFI version for es6 and miniMAL to work with newer node
  versions.

The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
2016-05-18 22:29:18 -07:00
Joel Martin
dca6b58578 Tests: move step5 non-TCO tests to per impl.
- Remove most of the step5 excludes in the Makefile except for ones
  which don't have TCO capability at all (or the implementation is too
  slow): bash, make, mal, matlab.

- Make perf_EXCLUDES consistent with other excludes.

- Add a print-FOO target which prints the resolved value of Makefile
  variable FOO. For example, `make print-IMPLS` to print the list of
  implementations.
2016-03-14 23:39:21 -05:00
Joel Martin
b8ab80ba3a Swift3: add meta to all collections. Simplify types.
Also, tweak swift stats targets to more align with others.
2016-03-01 14:58:59 -06:00
Joel Martin
c391c80cd8 Swift*: add seq/string?. swift: gensym/or macro fix 2016-02-24 16:49:25 -06:00
Dov Murik
b5f4363f2d swift: Fix (rest nil) 2016-02-03 21:23:49 -05:00
Joel Martin
d5b81cc072 julia, matlab, r, rust, swift: fix macro result evaluation
Related to issue #142.
2016-01-26 14:16:20 -06:00
Dov Murik
29ba1fb6c0 Add gensym and clean or macro to stepA of 19 implementations (part 3)
* awk
* cpp
* cs
* es6
* factor
* fsharp
* groovy
* haskell
* java
* julia
* kotlin
* matlab
* php
* r
* rpython
* rust
* scala
* swift
* vb
2016-01-25 16:30:54 -05:00
Joel Martin
f15b4021db All: show comments with stats target.
- Put guile into correct alphabetical order.
2015-10-26 22:33:49 -05:00
Joel Martin
ea25808e8a swift: add status rule. Fix Makefile on Linux. 2015-10-24 15:54:11 -05:00
Keith Rollin
425305df78 Update for Xcode 7.0
Optimizations:

* In Environment, skip checking unused local slots if we’ve switched
  over to the general map.
* Mark as much as possible with “final” and “private”, and build with
  -whole-module-optimization, per
  https://developer.apple.com/swift/blog/?id=27.
* Refactor to include alternate types.swift with an implementation based
  on “enum”. Add Makefile variable allowing us to switch between the two
  so that we can compare the results. (At the time of this writing,
  using the class-based implementation is better in terms of both size
  and speed.)

Swift 1.2:

* Use the form of “if-let-as” that allows us to unwrap multiple
  optionals at once.
* Use Swift’s as? rather than our own predicates after determining that
  the former did not incur a performance hit.

Swift 2.0:

* Remove some Array conversions where Foundation/Cocoa is now declared
  to return arrays of the desired type.
* println -> print.
* print() -> print("")
* Remove some NSError* parameters; changed to do/try/catch.
* Use Swift exception handling rather than tunneling that information in
  MalError.
* Use `guard` statements where it makes sense. Especially `guard let a =
  b as? c` statements in order to reduce subsequent forced unwrapping.
* Changed count(str) -> str.characters.count.
* Changed Swift.reduce(coll, ...) -> coll.reduce(...).
* Changed reverse(coll) -> coll.reverse().
* Changed use of .allZeros -> default OptionSet c'tor.
* Changed Printable -> CustomStringConvertible.
* Changed Sequence.extend -> Sequence.appendContentsOf
* Changed String.join -> Sequence.joinWithSeparator
* Changed advance(index, delta) -> index.advancedBy(delta)
* Addressed change in function parameter name requirements.
* Added and used substring(s, begin, end).
* Changed “for ch in str” to “for ch in str.characters”
* Changed some switch/case statements to briefer if/case statements.
* Slices are no longer necessarily 0-based.
* Sprinkle in some @noescapes.
* Search for the most recent swiftc compiler to use if Xcode and
  Xcode-beta are both installed.

Other:
* Delete debugger symbols in `make clean`.
* Rebuild if Makefile is changed.
2015-09-21 18:26:47 -07:00
Keith Rollin
1c76df7dc6 Convert to Swift 1.2:
* Change "Array" to "ArraySlice"
* Change "as" keyword to "as!"
* Use count(str.utf16) rather than str.utf16count)
* Add "combine:" parameter label to call to slice.reduce
2015-04-08 14:38:22 -07:00
Keith Rollin
3829ee8cb4 refactor: use a switch instead of a ramp of if's. 2015-04-08 14:38:22 -07:00
Keith Rollin
b3ec2290a4 refactor: move some code out of EVAL into their own functions for clarity (and, for profiling purposes, to help idenfity hotspots). 2015-04-08 14:38:22 -07:00
Keith Rollin
7728b50bd5 optimization: for small Environment records, store names/values in hard-coded slots rather than general dictionary 2015-04-08 14:38:22 -07:00
Keith Rollin
2c4b8bd1f8 optimization: conditionally remove some debugging code 2015-04-08 14:38:22 -07:00
Keith Rollin
2539e6af82 Initial Swift implementation. 2015-03-23 01:23:27 -07:00