rubinius-ast 2.2.3 → 2.2.4

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: 99683e876af3e1613bd1972099cc510a9eed27ba
4
- data.tar.gz: 48be16076f392660fd32ca711e3488415d986968
3
+ metadata.gz: 9a7851656bf49dfc51a484b281e4e26fc26ba8ac
4
+ data.tar.gz: 90237b04c583847cc647810514a8129726e05885
5
5
  SHA512:
6
- metadata.gz: e94fd71400a89085a78c2e5da18debfb4b6bdf32192c0b843e55b17e3b861194b17a648500aeae95cef6be0bcde954deb5915d2e610bac5203da1286f9bcd506
7
- data.tar.gz: f92279ffeef1e1a75b6938d600049ec468ce01082146a6138b82458dc03157bc7384f40a8b70a3d3b4ffabdfdb9b3b26d1c3672c1617caf42d0764dc06003ca9
6
+ metadata.gz: 5c6753402e9bf52244614b435e52c85d341c3f9d60bf5a85f0ce5e1691d07af71b556b1c36996ccd9a30f06d20f1a4e615d55495a4e1cf3b6eebebbf60d68992
7
+ data.tar.gz: faed2b96a7ebead3df82c4a92527dce3445d0dc95195ddf11e0403055c6e99e15e9ff6eb82e672a74b7c31522292732128a295fcd3afc2d8d806a3d259d01907
@@ -565,8 +565,6 @@ module CodeTools
565
565
  arg.variable.get_bytecode(g)
566
566
  g.send :equal?, 1, 0
567
567
  g.gif done
568
- # g.passed_arg arg.variable.slot
569
- # g.git done
570
568
  arg.bytecode(g)
571
569
  g.pop
572
570
 
@@ -645,9 +643,7 @@ module CodeTools
645
643
  @value.bytecode(g)
646
644
 
647
645
  g.dup
648
- g.push :nil
649
- g.swap
650
- g.send :equal?, 1, true
646
+ g.is_nil
651
647
  g.gif check_hash
652
648
 
653
649
  g.pop
@@ -14,9 +14,13 @@ module CodeTools
14
14
  done = g.new_label
15
15
  coerce = g.new_label
16
16
  make_array = g.new_label
17
+ array_dup = g.new_label
18
+ dup_as_array = g.new_label
17
19
 
18
20
  @value.bytecode(g)
19
- kind_of_array(g, done)
21
+
22
+ instance_of_array(g, array_dup)
23
+ kind_of_array(g, dup_as_array)
20
24
 
21
25
  g.dup
22
26
  g.push_literal :to_a
@@ -28,16 +32,24 @@ module CodeTools
28
32
  g.make_array 1
29
33
  g.goto done
30
34
 
35
+ discard = g.new_label
36
+
37
+ dup_as_array.set!
38
+ g.dup
39
+ g.push_rubinius
40
+ g.find_const :Runtime
41
+ g.swap
42
+ g.send :dup_as_array, 1, true
43
+ g.goto discard
44
+
31
45
  coerce.set!
32
46
  g.dup
33
47
  g.send :to_a, 0, true
34
48
 
35
- discard = g.new_label
36
49
  check_array = g.new_label
37
50
 
38
51
  g.dup
39
- g.push :nil
40
- g.send :equal?, 1, true
52
+ g.is_nil
41
53
  g.gif check_array
42
54
 
43
55
  g.pop
@@ -54,6 +66,10 @@ module CodeTools
54
66
  g.send :coerce_to_type_error, 4, true
55
67
  g.goto done
56
68
 
69
+ array_dup.set!
70
+ g.send :dup, 0, true
71
+ g.goto done
72
+
57
73
  discard.set!
58
74
  g.swap
59
75
  g.pop
@@ -61,6 +77,15 @@ module CodeTools
61
77
  done.set!
62
78
  end
63
79
 
80
+ def instance_of_array(g, label)
81
+ g.dup
82
+ g.push_cpath_top
83
+ g.find_const :Array
84
+ g.swap
85
+ g.instance_of
86
+ g.git label
87
+ end
88
+
64
89
  def kind_of_array(g, label)
65
90
  g.dup
66
91
  g.push_cpath_top
@@ -123,8 +148,7 @@ module CodeTools
123
148
  check_array = g.new_label
124
149
 
125
150
  g.dup
126
- g.push :nil
127
- g.send :equal?, 1, true
151
+ g.is_nil
128
152
  g.gif check_array
129
153
 
130
154
  g.pop
@@ -713,8 +713,10 @@ module CodeTools
713
713
  done = g.new_label
714
714
  coerce = g.new_label
715
715
  make_array = g.new_label
716
+ dup_as_array = g.new_label
716
717
 
717
- kind_of_array(g, done)
718
+ instance_of_array(g, done)
719
+ kind_of_array(g, dup_as_array)
718
720
 
719
721
  g.dup
720
722
  g.push_literal :to_ary
@@ -726,16 +728,24 @@ module CodeTools
726
728
  g.make_array 1
727
729
  g.goto done
728
730
 
731
+ discard = g.new_label
732
+
733
+ dup_as_array.set!
734
+ g.dup
735
+ g.push_rubinius
736
+ g.find_const :Runtime
737
+ g.swap
738
+ g.send :dup_as_array, 1, true
739
+ g.goto discard
740
+
729
741
  coerce.set!
730
742
  g.dup
731
743
  g.send :to_ary, 0, true
732
744
 
733
- discard = g.new_label
734
745
  check_array = g.new_label
735
746
 
736
747
  g.dup
737
- g.push :nil
738
- g.send :equal?, 1, true
748
+ g.is_nil
739
749
  g.gif check_array
740
750
 
741
751
  g.pop
@@ -759,6 +769,15 @@ module CodeTools
759
769
  done.set!
760
770
  end
761
771
 
772
+ def instance_of_array(g, label)
773
+ g.dup
774
+ g.push_cpath_top
775
+ g.find_const :Array
776
+ g.swap
777
+ g.instance_of
778
+ g.git label
779
+ end
780
+
762
781
  def kind_of_array(g, label)
763
782
  g.dup
764
783
  g.push_cpath_top
@@ -1,5 +1,5 @@
1
1
  module CodeTools
2
2
  module AST
3
- VERSION = "2.2.3"
3
+ VERSION = "2.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
21
+ requirement: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
25
  version: '1.3'
26
+ prerelease: false
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
35
+ requirement: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
39
  version: '10.0'
40
+ prerelease: false
41
41
  description: An Abstract Syntax Tree for Ruby.
42
42
  email:
43
43
  - brixen@gmail.com