atomy 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kernel/control-flow.ay +5 -6
- data/kernel/particles.ay +1 -1
- data/kernel/patterns.ay +3 -3
- data/lib/atomy/code/assign.rb +1 -1
- data/lib/atomy/code/pattern/quasi_quote.rb +1 -1
- data/lib/atomy/code/send.rb +1 -2
- data/lib/atomy/method.rb +10 -14
- data/lib/atomy/pattern/and.rb +1 -1
- data/lib/atomy/pattern/or.rb +1 -1
- data/lib/atomy/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9aceb9ef636c07aa78300caf235cc6e28d65d45
|
4
|
+
data.tar.gz: 4ec7c130b15909d5cbbe526d60a710af0e5b601f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a75b4f1d2077ca834d9a063f0ca915d3119ca25d67756496648cb431368973df13c9b4e29e8f5105bb01bc4dceaf6b34a6e51aeae5db6ea54340bbd2d61020
|
7
|
+
data.tar.gz: c820dd093b9e6d1977a82f691c7eb4ce453cad47438943a3993560ffcc2483aa7fd7d43df677287d1240e8b9a9df88870b8dcbf6c4d0a2e797ef3f3a1a6c4f67
|
data/kernel/control-flow.ay
CHANGED
@@ -11,7 +11,7 @@ and = class:
|
|
11
11
|
|
12
12
|
mod compile(gen, @a)
|
13
13
|
gen dup
|
14
|
-
gen
|
14
|
+
gen goto-if-false(done)
|
15
15
|
|
16
16
|
gen pop
|
17
17
|
mod compile(gen, @b)
|
@@ -31,7 +31,7 @@ or = class:
|
|
31
31
|
|
32
32
|
mod compile(gen, @a)
|
33
33
|
gen dup
|
34
|
-
gen
|
34
|
+
gen goto-if-true(done)
|
35
35
|
|
36
36
|
gen pop
|
37
37
|
mod compile(gen, @b)
|
@@ -52,7 +52,7 @@ if-then-else = class:
|
|
52
52
|
done = gen new-label
|
53
53
|
|
54
54
|
mod compile(gen, @if)
|
55
|
-
gen
|
55
|
+
gen goto-if-false(else)
|
56
56
|
|
57
57
|
mod compile(gen, @then)
|
58
58
|
gen goto(done)
|
@@ -80,7 +80,7 @@ negate = class:
|
|
80
80
|
yes = gen new-label
|
81
81
|
|
82
82
|
mod compile(gen, @node)
|
83
|
-
gen
|
83
|
+
gen goto-if-true(yes)
|
84
84
|
|
85
85
|
gen push-true
|
86
86
|
gen goto(done)
|
@@ -181,8 +181,7 @@ super-code = class:
|
|
181
181
|
nil-proc-arg = gen new-label
|
182
182
|
mod compile(gen, @proc-argument)
|
183
183
|
gen dup
|
184
|
-
gen
|
185
|
-
gen git(nil_proc_arg)
|
184
|
+
gen goto-if-nil(nil_proc_arg)
|
186
185
|
gen push-cpath-top
|
187
186
|
gen find-const(.Proc)
|
188
187
|
gen swap
|
data/kernel/particles.ay
CHANGED
data/kernel/patterns.ay
CHANGED
@@ -135,7 +135,7 @@ or-pattern-code = Atomy Code Pattern class:
|
|
135
135
|
gen send(.a, 0)
|
136
136
|
gen swap
|
137
137
|
gen send(.matches?, 1)
|
138
|
-
gen
|
138
|
+
gen goto-if-false(assign-b)
|
139
139
|
|
140
140
|
gen dup-many(2)
|
141
141
|
gen swap
|
@@ -403,7 +403,7 @@ match = class:
|
|
403
403
|
blk send(.matches?, 1)
|
404
404
|
|
405
405
|
-- [pattern, node]
|
406
|
-
blk
|
406
|
+
blk goto-if-false(skip)
|
407
407
|
|
408
408
|
-- [node, pattern]
|
409
409
|
blk swap
|
@@ -549,7 +549,7 @@ rescue = class:
|
|
549
549
|
blk send(.matches?, 1)
|
550
550
|
|
551
551
|
-- [pattern, node]
|
552
|
-
blk
|
552
|
+
blk goto-if-false(skip)
|
553
553
|
|
554
554
|
-- [node, pattern]
|
555
555
|
blk swap
|
data/lib/atomy/code/assign.rb
CHANGED
data/lib/atomy/code/send.rb
CHANGED
data/lib/atomy/method.rb
CHANGED
@@ -178,25 +178,25 @@ module Atomy
|
|
178
178
|
|
179
179
|
# check for too few arguments
|
180
180
|
gen.passed_arg(b.pre_arguments_count - 1)
|
181
|
-
gen.
|
181
|
+
gen.goto_if_false(skip)
|
182
182
|
|
183
183
|
# check for too many arguments
|
184
184
|
unless b.splat_index
|
185
185
|
gen.passed_arg(b.pre_arguments_count + b.default_arguments_count + b.post_arguments_count)
|
186
|
-
gen.
|
186
|
+
gen.goto_if_true(skip)
|
187
187
|
end
|
188
188
|
|
189
189
|
if b.receiver
|
190
190
|
gen.push_self
|
191
191
|
b.receiver.inline_matches?(gen)
|
192
|
-
gen.
|
192
|
+
gen.goto_if_false(skip)
|
193
193
|
end
|
194
194
|
|
195
195
|
arg = 0
|
196
196
|
b.arguments.each do |pat|
|
197
197
|
gen.push_local(arg)
|
198
198
|
pat.inline_matches?(gen)
|
199
|
-
gen.
|
199
|
+
gen.goto_if_false(skip)
|
200
200
|
|
201
201
|
arg += 1
|
202
202
|
end
|
@@ -209,7 +209,7 @@ module Atomy
|
|
209
209
|
|
210
210
|
gen.push_local(arg)
|
211
211
|
pat.inline_matches?(gen)
|
212
|
-
gen.
|
212
|
+
gen.goto_if_false(skip)
|
213
213
|
|
214
214
|
skip_check.set!
|
215
215
|
|
@@ -219,7 +219,7 @@ module Atomy
|
|
219
219
|
if b.splat_argument
|
220
220
|
gen.push_local(b.splat_index)
|
221
221
|
b.splat_argument.inline_matches?(gen)
|
222
|
-
gen.
|
222
|
+
gen.goto_if_false(skip)
|
223
223
|
|
224
224
|
arg += 1
|
225
225
|
end
|
@@ -227,7 +227,7 @@ module Atomy
|
|
227
227
|
b.post_arguments.each do |pat|
|
228
228
|
gen.push_local(arg)
|
229
229
|
pat.inline_matches?(gen)
|
230
|
-
gen.
|
230
|
+
gen.goto_if_false(skip)
|
231
231
|
|
232
232
|
arg += 1
|
233
233
|
end
|
@@ -235,7 +235,7 @@ module Atomy
|
|
235
235
|
if b.proc_argument
|
236
236
|
gen.push_proc
|
237
237
|
b.proc_argument.inline_matches?(gen)
|
238
|
-
gen.
|
238
|
+
gen.goto_if_false(skip)
|
239
239
|
end
|
240
240
|
|
241
241
|
branch_args = 0
|
@@ -316,14 +316,10 @@ module Atomy
|
|
316
316
|
no_super = gen.new_label
|
317
317
|
|
318
318
|
gen.invoke_primitive(:vm_check_super_callable, 0)
|
319
|
-
gen.
|
319
|
+
gen.goto_if_false(no_super)
|
320
320
|
|
321
321
|
gen.push_proc
|
322
|
-
|
323
|
-
gen.zsuper(g.state.super.name)
|
324
|
-
else
|
325
|
-
gen.zsuper(nil)
|
326
|
-
end
|
322
|
+
gen.zsuper(@name)
|
327
323
|
|
328
324
|
gen.goto(done)
|
329
325
|
|
data/lib/atomy/pattern/and.rb
CHANGED
data/lib/atomy/pattern/or.rb
CHANGED
data/lib/atomy/version.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atomy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Suraci
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
prerelease: false
|
15
15
|
type: :runtime
|
16
|
+
name: kpeg
|
16
17
|
version_requirements: !ruby/object:Gem::Requirement
|
17
18
|
requirements:
|
18
19
|
- - "~>"
|
@@ -23,10 +24,10 @@ dependencies:
|
|
23
24
|
- - "~>"
|
24
25
|
- !ruby/object:Gem::Version
|
25
26
|
version: '1.0'
|
26
|
-
prerelease: false
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
|
28
|
+
prerelease: false
|
29
29
|
type: :development
|
30
|
+
name: rake
|
30
31
|
version_requirements: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
33
|
- - "~>"
|
@@ -37,10 +38,10 @@ dependencies:
|
|
37
38
|
- - "~>"
|
38
39
|
- !ruby/object:Gem::Version
|
39
40
|
version: '10.4'
|
40
|
-
prerelease: false
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
|
42
|
+
prerelease: false
|
43
43
|
type: :development
|
44
|
+
name: rspec-its
|
44
45
|
version_requirements: !ruby/object:Gem::Requirement
|
45
46
|
requirements:
|
46
47
|
- - "~>"
|
@@ -51,7 +52,6 @@ dependencies:
|
|
51
52
|
- - "~>"
|
52
53
|
- !ruby/object:Gem::Version
|
53
54
|
version: '1.2'
|
54
|
-
prerelease: false
|
55
55
|
description: "\n A dynamic language targeting the Rubinius VM, focusing on extensibility\n
|
56
56
|
\ and expressiveness through macros and pattern-matching.\n "
|
57
57
|
email: suraci.alex@gmail.com
|