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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a9888ee63dc09f7608343c32a27868a0b203b3d
4
- data.tar.gz: 6e7791b5f59c3bef6e6436f62a69dbcaf69f6734
3
+ metadata.gz: c9aceb9ef636c07aa78300caf235cc6e28d65d45
4
+ data.tar.gz: 4ec7c130b15909d5cbbe526d60a710af0e5b601f
5
5
  SHA512:
6
- metadata.gz: 79b715a6872a89ad9a78d1f56e44df2195d1ec7600d644040e17e6a644ea86f610c29f6a34c3f0ac7405c2507cfde600e1b2ed37ba1ebe02c07e76a43eb70d7b
7
- data.tar.gz: 588fe0708acd47b8fd77d19eec04233aa8d09711aedd272dfb870d8c4ec2d9713b63b4bb00ad04f371724747e061352a73faf309d1ca5b494f2a753aae9b41dc
6
+ metadata.gz: c4a75b4f1d2077ca834d9a063f0ca915d3119ca25d67756496648cb431368973df13c9b4e29e8f5105bb01bc4dceaf6b34a6e51aeae5db6ea54340bbd2d61020
7
+ data.tar.gz: c820dd093b9e6d1977a82f691c7eb4ce453cad47438943a3993560ffcc2483aa7fd7d43df677287d1240e8b9a9df88870b8dcbf6c4d0a2e797ef3f3a1a6c4f67
@@ -11,7 +11,7 @@ and = class:
11
11
 
12
12
  mod compile(gen, @a)
13
13
  gen dup
14
- gen gif(done)
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 git(done)
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 gif(else)
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 git(yes)
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 is-nil
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
@@ -121,7 +121,7 @@ particle-pattern-code = Atomy Code Pattern class:
121
121
  gen find-const(.Symbol)
122
122
  gen swap
123
123
  gen kind-of
124
- gen git(assign-symbol)
124
+ gen goto-if-true(assign-symbol)
125
125
 
126
126
  gen dup-many(2)
127
127
  gen send(.receiver, 0)
@@ -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 gif(assign-b)
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 gif(skip)
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 gif(skip)
552
+ blk goto-if-false(skip)
553
553
 
554
554
  -- [node, pattern]
555
555
  blk swap
@@ -29,7 +29,7 @@ module Atomy
29
29
  gen.send(:matches?, 1)
30
30
 
31
31
  # [value, pattern, value]
32
- gen.gif(mismatch)
32
+ gen.goto_if_false(mismatch)
33
33
 
34
34
  # [value, pattern, value]
35
35
  pattern.assign(gen)
@@ -174,7 +174,7 @@ class Atomy::Code::Pattern
174
174
  def push_path
175
175
  @path.each do |m, args|
176
176
  args.each do |a|
177
- @gen.push(a)
177
+ @gen.push_int(a)
178
178
  end
179
179
 
180
180
  @gen.send(m, args.size)
@@ -96,8 +96,7 @@ module Atomy
96
96
  nil_proc_arg = gen.new_label
97
97
  mod.compile(gen, @proc_argument)
98
98
  gen.dup
99
- gen.is_nil
100
- gen.git(nil_proc_arg)
99
+ gen.goto_if_nil(nil_proc_arg)
101
100
  gen.push_cpath_top
102
101
  gen.find_const(:Proc)
103
102
  gen.swap
@@ -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.gif(skip)
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.git(skip)
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.gif(skip)
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.gif(skip)
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.gif(skip)
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.gif(skip)
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.gif(skip)
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.gif(skip)
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.gif(no_super)
319
+ gen.goto_if_false(no_super)
320
320
 
321
321
  gen.push_proc
322
- if gen.state.super?
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
 
@@ -24,7 +24,7 @@ class Atomy::Pattern
24
24
  @a.inline_matches?(gen)
25
25
 
26
26
  # [value]
27
- gen.gif(mismatch)
27
+ gen.goto_if_false(mismatch)
28
28
 
29
29
  # [bool]
30
30
  @b.inline_matches?(gen)
@@ -24,7 +24,7 @@ class Atomy::Pattern
24
24
  @a.inline_matches?(gen)
25
25
 
26
26
  # [value]
27
- gen.git(match)
27
+ gen.goto_if_true(match)
28
28
 
29
29
  # [bool]
30
30
  @b.inline_matches?(gen)
@@ -1,3 +1,3 @@
1
1
  module Atomy
2
- VERSION = "0.6.10"
2
+ VERSION = "0.6.11"
3
3
  end
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.10
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-09 00:00:00.000000000 Z
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: kpeg
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
- name: rake
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
- name: rspec-its
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