Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array literals implementation #173

Merged
merged 5 commits into from Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core-lib/Benchmarks/DeltaBlue.som
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class DeltaBlue usingPlatform: platform andHarness: harness = (
public changeVar: aVariable newValue: newValue = (
| editConstraint plan |
editConstraint:: EditConstraint var: aVariable strength: #preferred addTo: self.
plan:: self extractPlanFromConstraints: (Array with: editConstraint).
plan:: self extractPlanFromConstraints: { editConstraint }.
10 timesRepeat: [
aVariable value: newValue.
plan execute].
Expand Down Expand Up @@ -251,7 +251,7 @@ class DeltaBlue usingPlatform: platform andHarness: harness = (

StayConstraint var: vars last strength: #strongDefault addTo: planner.
editConstraint:: EditConstraint var: vars first strength: #preferred addTo: planner.
plan:: planner extractPlanFromConstraints: (Array with: editConstraint).
plan:: planner extractPlanFromConstraints: { editConstraint }.

1 to: 100 do: [:v |
vars first value: v.
Expand Down
17 changes: 7 additions & 10 deletions core-lib/Benchmarks/ForkJoin.som
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ForkJoinBenchmarks usingPlatform: platform andHarness: harness = (
| private expected = createExpected.
private N = 10. |
)(
public benchmark = (
public benchmark = (
^ fib: N
)

Expand All @@ -29,15 +29,12 @@ class ForkJoinBenchmarks usingPlatform: platform andHarness: harness = (
)

private createExpected = (
| e |
e:: Vector new.
e, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,
377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711.
e, 28657, 46368, 75025, 121393, 196418, 317811, 514229,
832040, 1346269, 2178309, 3524578, 5702887, 9227465.
e, 14930352, 24157817, 39088169, 63245986, 102334155,
165580141, 267914296, 433494437, 701408733, 1134903170.
^ e asArray
^ { 0. 1. 1. 2. 3. 5. 8. 13. 21. 34. 55. 89. 144. 233,
377. 610. 987. 1597. 2584. 4181. 6765. 10946. 17711.
e. 28657. 46368. 75025. 121393. 196418. 317811. 514229,
832040. 1346269. 2178309. 3524578. 5702887. 9227465.
e. 14930352. 24157817. 39088169. 63245986. 102334155,
165580141. 267914296. 433494437. 701408733. 1134903170 }
)
) : (
public newInstance = ( ^ Fib new )
Expand Down
2 changes: 1 addition & 1 deletion core-lib/Benchmarks/Havlak.som
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Havlak usingPlatform: platform andHarness: harness = (
findLoops: LoopStructureGraph new ].

lsg calculateNestingLevel.
^ Array with: lsg numLoops with: cfg numNodes
^ { lsg numLoops. cfg numNodes }
)

private constructCFG: parLoops p: pparLoops p: ppparLoops = (
Expand Down
Loading