rubinius-ast 3.8 → 3.9

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: 0fcd85af7bb6b46d7cc98969f55e3d1f7ca2461f
4
- data.tar.gz: f841f69e37c46dbabdec8cc008b3bf0ef9cfe9a9
3
+ metadata.gz: d867b8dbe5184f19f8f332e2e0ca106e6508cbb1
4
+ data.tar.gz: 8deb10a4f19850ee6fad3ae64083982a0cdac5d5
5
5
  SHA512:
6
- metadata.gz: 32b46b170eaefa666d06a7dd2489de4e0fc584650eca3f5397a7c4b4607b6d24e458fec4eca3b42fcedb38308bda340a8667097c49c2e6cb5fdcc64dc92d0d76
7
- data.tar.gz: 6b4818f6358ada39bebbe7e7036c9f213f11aa335146d0bd132a29894886a74961a8ac09828b18485198bd6ec4b950b50575bc34b6263b40b1e015733476fb0f
6
+ metadata.gz: 61b46cfcebb9444b301f1e80513d510ae891342fefaf9344a6de6f90229fcd7f9682ec76f01ea54c1f4b1c9035f405060a1a12949b239d9cb1e5e899621300d0
7
+ data.tar.gz: 3f16067d2677866fefed206f191bf11a205a653b5c94fbcd89fab4e1c901d26af02054a8495e5f6eda7ef755c4e2834ed5f364552cefafcee3ab4740033c280d
@@ -83,6 +83,7 @@ module CodeTools
83
83
 
84
84
  ex = g.new_label
85
85
  ok = g.new_label
86
+ g.state.push_unwind g.new_unwind_label
86
87
  g.setup_unwind ex, RescueType
87
88
 
88
89
  @parent.bytecode(g)
@@ -94,6 +95,7 @@ module CodeTools
94
95
  end
95
96
  g.invoke_primitive :vm_const_defined_under, 3
96
97
 
98
+ g.state.pop_unwind
97
99
  g.pop_unwind
98
100
  g.goto ok
99
101
 
@@ -169,6 +171,7 @@ module CodeTools
169
171
 
170
172
  ex = g.new_label
171
173
  ok = g.new_label
174
+ g.state.push_unwind g.new_unwind_label
172
175
  g.setup_unwind ex, RescueType
173
176
 
174
177
  g.push_cpath_top
@@ -176,6 +179,7 @@ module CodeTools
176
179
  g.push_false
177
180
  g.invoke_primitive :vm_const_defined_under, 3
178
181
 
182
+ g.state.pop_unwind
179
183
  g.pop_unwind
180
184
  g.goto ok
181
185
 
@@ -264,11 +268,13 @@ module CodeTools
264
268
 
265
269
  ex = g.new_label
266
270
  ok = g.new_label
271
+ g.state.push_unwind g.new_unwind_label
267
272
  g.setup_unwind ex, RescueType
268
273
 
269
274
  g.push_literal @name
270
275
  g.invoke_primitive :vm_const_defined, 1
271
276
 
277
+ g.state.pop_unwind
272
278
  g.pop_unwind
273
279
  g.goto ok
274
280
 
@@ -40,6 +40,7 @@ module CodeTools
40
40
 
41
41
  ok = g.new_label
42
42
  ex = g.new_label
43
+ g.state.push_unwind g.new_unwind_label
43
44
  g.setup_unwind ex, EnsureType
44
45
 
45
46
  # TODO: ?
@@ -65,6 +66,7 @@ module CodeTools
65
66
  g.break = old_break
66
67
  g.next = old_next
67
68
 
69
+ g.state.pop_unwind
68
70
  g.pop_unwind
69
71
  g.goto ok
70
72
 
@@ -214,6 +216,7 @@ module CodeTools
214
216
 
215
217
  this_retry.set!
216
218
  ex = g.new_label
219
+ g.state.push_unwind g.new_unwind_label
217
220
  g.setup_unwind ex, RescueType
218
221
 
219
222
  # TODO: ?
@@ -241,6 +244,7 @@ module CodeTools
241
244
  end
242
245
 
243
246
  @body.bytecode(g)
247
+ g.state.pop_unwind
244
248
  g.pop_unwind
245
249
  g.goto els
246
250
 
@@ -285,6 +285,7 @@ module CodeTools
285
285
  @op_asgn = 0
286
286
  @rescue = []
287
287
  @name = []
288
+ @unwinds = []
288
289
  @check_for_locals = true
289
290
  end
290
291
 
@@ -403,6 +404,18 @@ module CodeTools
403
404
  def loop?
404
405
  @loop > 0
405
406
  end
407
+
408
+ def push_unwind(label)
409
+ @unwinds << label
410
+ end
411
+
412
+ def pop_unwind
413
+ @unwinds.pop
414
+ end
415
+
416
+ def unwind_label
417
+ @unwinds.last
418
+ end
406
419
  end
407
420
  end
408
421
  end
@@ -50,10 +50,12 @@ module CodeTools
50
50
 
51
51
  ok = g.new_label
52
52
  ex = g.new_label
53
+ g.state.push_unwind g.new_unwind_label
53
54
  g.setup_unwind ex, RescueType
54
55
 
55
56
  bytecode(g)
56
57
 
58
+ g.state.pop_unwind
57
59
  g.pop_unwind
58
60
  g.goto ok
59
61
 
@@ -1,5 +1,5 @@
1
1
  module CodeTools
2
2
  module AST
3
- VERSION = "3.8"
3
+ VERSION = "3.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.8'
4
+ version: '3.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-15 00:00:00.000000000 Z
11
+ date: 2017-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler