rubinius-compiler 3.25 → 3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a6beb07321b5fa2a724d03f66d8626ffc7fe694
|
4
|
+
data.tar.gz: e98a2577a4d11d718f4c3e10cec1e9a1e7ef292a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41ce3227f9f7a0045f2d426e73ee7ac088f769fcfaf618720ffce29ceaf20fc69ec8d823b97502a2dc58663bb1474f47b045a0cdad2dc72547ae87fd4492e4e4
|
7
|
+
data.tar.gz: 247b4d7696a7777fa484a55e286ce6ed75660ee164cf37eb83b38c1575c1c372c1cb502d575bbc76839abf3e6963586977daa2a904a3522db259f29fb9e8c1cf
|
@@ -274,6 +274,7 @@ module CodeTools
|
|
274
274
|
@keywords = nil
|
275
275
|
@kwrest_index = nil
|
276
276
|
@local_count = 0
|
277
|
+
@registers = 0
|
277
278
|
|
278
279
|
@state = []
|
279
280
|
@generators = []
|
@@ -452,6 +453,10 @@ module CodeTools
|
|
452
453
|
Label.new(self)
|
453
454
|
end
|
454
455
|
|
456
|
+
def new_register
|
457
|
+
(@registers += 1) - 1
|
458
|
+
end
|
459
|
+
|
455
460
|
# Helpers
|
456
461
|
|
457
462
|
def new_basic_block
|
@@ -810,6 +810,7 @@ module CodeTools
|
|
810
810
|
@instruction = 98
|
811
811
|
end
|
812
812
|
|
813
|
+
# Parsing Expression Grammar instructions
|
813
814
|
def p_any(arg1)
|
814
815
|
@stream << 99 << arg1
|
815
816
|
@ip += 2
|
@@ -918,6 +919,7 @@ module CodeTools
|
|
918
919
|
@instruction = 116
|
919
920
|
end
|
920
921
|
|
922
|
+
# Instrumentation instructions
|
921
923
|
def m_bytes(arg1, arg2)
|
922
924
|
@stream << 117 << arg1 << arg2
|
923
925
|
@ip += 3
|
@@ -959,5 +961,178 @@ module CodeTools
|
|
959
961
|
@ip += 3
|
960
962
|
@instruction = 123
|
961
963
|
end
|
964
|
+
|
965
|
+
# Branching instructions
|
966
|
+
def b_if_serial(arg1, arg2, arg3)
|
967
|
+
@stream << 124 << arg1 << arg2 << arg3
|
968
|
+
@ip += 4
|
969
|
+
@instruction = 124
|
970
|
+
end
|
971
|
+
|
972
|
+
def b_if_int(arg1, arg2, arg3)
|
973
|
+
@stream << 125 << arg1 << arg2 << arg3
|
974
|
+
@ip += 4
|
975
|
+
@instruction = 125
|
976
|
+
end
|
977
|
+
|
978
|
+
def b_if(arg1, arg2)
|
979
|
+
@stream << 126 << arg1 << arg2
|
980
|
+
@ip += 3
|
981
|
+
@instruction = 126
|
982
|
+
end
|
983
|
+
|
984
|
+
# Register movement instructions
|
985
|
+
def r_load_local(arg1, arg2)
|
986
|
+
@stream << 127 << arg1 << arg2
|
987
|
+
@ip += 3
|
988
|
+
@instructions = 127
|
989
|
+
end
|
990
|
+
|
991
|
+
def r_store_local(arg1, arg2)
|
992
|
+
@stream << 128 << arg1 << arg2
|
993
|
+
@ip += 3
|
994
|
+
@instructions = 128
|
995
|
+
end
|
996
|
+
|
997
|
+
def r_load_local_depth(arg1, arg2, arg3)
|
998
|
+
@stream << 129 << arg1 << arg2 << arg3
|
999
|
+
@ip += 4
|
1000
|
+
@instructions = 129
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
def r_store_local_depth(arg1, arg2, arg3)
|
1004
|
+
@stream << 130 << arg1 << arg2 << arg3
|
1005
|
+
@ip += 4
|
1006
|
+
@instructions = 130
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
def r_load_stack(arg1)
|
1010
|
+
@stream << 131 << arg1
|
1011
|
+
@ip += 2
|
1012
|
+
@instructions = 131
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
def r_store_stack(arg1)
|
1016
|
+
@stream << 132 << arg1
|
1017
|
+
@ip += 2
|
1018
|
+
@current_block.add_stack(0, 1)
|
1019
|
+
@instructions = 132
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
def r_load_literal(arg1, arg2)
|
1023
|
+
@stream << 133 << arg1 << arg2
|
1024
|
+
@ip += 3
|
1025
|
+
@instruction = 133
|
1026
|
+
end
|
1027
|
+
|
1028
|
+
def r_load_int(arg1, arg2)
|
1029
|
+
@stream << 134 << arg1 << arg2
|
1030
|
+
@ip += 3
|
1031
|
+
@instruction = 134
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
def r_store_int(arg1, arg2)
|
1035
|
+
@stream << 135 << arg1 << arg2
|
1036
|
+
@ip += 3
|
1037
|
+
@instruction = 135
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
def r_copy(arg1, arg2)
|
1041
|
+
@stream << 136 << arg1 << arg2
|
1042
|
+
@ip += 3
|
1043
|
+
@instruction = 136
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
# Native signed integer instructions
|
1047
|
+
def n_iadd(arg1, arg2, arg3)
|
1048
|
+
@stream << 137 << arg1 << arg2 << arg3
|
1049
|
+
@ip += 4
|
1050
|
+
@instruction = 137
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
def n_isub(arg1, arg2, arg3)
|
1054
|
+
@stream << 138 << arg1 << arg2 << arg3
|
1055
|
+
@ip += 4
|
1056
|
+
@instruction = 138
|
1057
|
+
end
|
1058
|
+
|
1059
|
+
def n_imul(arg1, arg2, arg3)
|
1060
|
+
@stream << 139 << arg1 << arg2 << arg3
|
1061
|
+
@ip += 4
|
1062
|
+
@instruction = 139
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
def n_idiv(arg1, arg2, arg3)
|
1066
|
+
@stream << 140 << arg1 << arg2 << arg3
|
1067
|
+
@ip += 4
|
1068
|
+
@instruction = 140
|
1069
|
+
end
|
1070
|
+
|
1071
|
+
def n_iadd_o(arg1, arg2, arg3)
|
1072
|
+
@stream << 141 << arg1 << arg2 << arg3
|
1073
|
+
@ip += 4
|
1074
|
+
@instruction = 141
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
def n_isub_o(arg1, arg2, arg3)
|
1078
|
+
@stream << 142 << arg1 << arg2 << arg3
|
1079
|
+
@ip += 4
|
1080
|
+
@instruction = 142
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
def n_imul_o(arg1, arg2, arg3)
|
1084
|
+
@stream << 143 << arg1 << arg2 << arg3
|
1085
|
+
@ip += 4
|
1086
|
+
@instruction = 143
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
def n_idiv_o(arg1, arg2, arg3)
|
1090
|
+
@stream << 144 << arg1 << arg2 << arg3
|
1091
|
+
@ip += 4
|
1092
|
+
@instruction = 144
|
1093
|
+
end
|
1094
|
+
|
1095
|
+
def n_ieq(arg1, arg2, arg3)
|
1096
|
+
@stream << 145 << arg1 << arg2 << arg3
|
1097
|
+
@ip += 4
|
1098
|
+
@instruction = 145
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
def n_ine(arg1, arg2, arg3)
|
1102
|
+
@stream << 146 << arg1 << arg2 << arg3
|
1103
|
+
@ip += 4
|
1104
|
+
@instruction = 146
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
def n_ilt(arg1, arg2, arg3)
|
1108
|
+
@stream << 147 << arg1 << arg2 << arg3
|
1109
|
+
@ip += 4
|
1110
|
+
@instruction = 147
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
def n_ile(arg1, arg2, arg3)
|
1114
|
+
@stream << 148 << arg1 << arg2 << arg3
|
1115
|
+
@ip += 4
|
1116
|
+
@instruction = 148
|
1117
|
+
end
|
1118
|
+
|
1119
|
+
def n_igt(arg1, arg2, arg3)
|
1120
|
+
@stream << 149 << arg1 << arg2 << arg3
|
1121
|
+
@ip += 4
|
1122
|
+
@instruction = 149
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
def n_ige(arg1, arg2, arg3)
|
1126
|
+
@stream << 150 << arg1 << arg2 << arg3
|
1127
|
+
@ip += 4
|
1128
|
+
@instruction = 150
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
def n_ipopcnt(arg1, arg2)
|
1132
|
+
@stream << 151 << arg1 << arg2
|
1133
|
+
@ip += 3
|
1134
|
+
@instruction = 151
|
1135
|
+
end
|
1136
|
+
|
962
1137
|
end
|
963
1138
|
end
|
@@ -104,6 +104,8 @@ module Rubinius
|
|
104
104
|
opcode 96, :yield_stack, :stack => [[0,1], 1], :args => [:count], :control_flow => :yield
|
105
105
|
opcode 97, :zsuper, :stack => [1, 1], :args => [:literal], :control_flow => :next
|
106
106
|
opcode 98, :push_file, :stack => [0, 1], :args => [], :control_flow => :next
|
107
|
+
|
108
|
+
# Parsing Expression Grammar instructions
|
107
109
|
opcode 99, :p_any, :stack => [0, 0], :args => [:r0], :control_flow => :next
|
108
110
|
opcode 100, :p_call, :stack => [0, 0], :args => [:ip], :control_flow => :next
|
109
111
|
opcode 101, :p_char, :stack => [0, 0], :args => [:chr], :control_flow => :next
|
@@ -122,6 +124,8 @@ module Rubinius
|
|
122
124
|
opcode 114, :p_test_char, :stack => [0, 0], :args => [:chr, :ip], :control_flow => :next
|
123
125
|
opcode 115, :p_test_char_set, :stack => [0, 0], :args => [:chr_set, :ip], :control_flow => :next
|
124
126
|
opcode 116, :p_init, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next
|
127
|
+
|
128
|
+
# Instrumentation instructions
|
125
129
|
opcode 117, :m_bytes, :stack => [0, 0], :args => [:value, :r0], :control_flow => :next
|
126
130
|
opcode 118, :m_counter, :stack => [0, 0], :args => [:value], :control_flow => :next
|
127
131
|
opcode 119, :m_sum, :stack => [0, 0], :args => [:value, :r0], :control_flow => :next
|
@@ -129,5 +133,40 @@ module Rubinius
|
|
129
133
|
opcode 121, :m_time_stamp, :stack => [0, 0], :args => [:value, :flag], :control_flow => :next
|
130
134
|
opcode 122, :m_timer_start, :stack => [0, 0], :args => [:timer], :control_flow => :next
|
131
135
|
opcode 123, :m_timer_stop, :stack => [0, 0], :args => [:ip, :flag], :control_flow => :next
|
136
|
+
|
137
|
+
# Branching instructions
|
138
|
+
opcode 124, :b_if_serial, :stack => [0, 0], :args => [:r0, :r1, :ip], :control_flow => :branch
|
139
|
+
opcode 125, :b_if_int, :stack => [0, 0], :args => [:r0, :r1, :ip], :control_flow => :branch
|
140
|
+
opcode 126, :b_if, :stack => [0, 0], :args => [:r0, :ip], :control_flow => :branch
|
141
|
+
|
142
|
+
# Register movement instructions
|
143
|
+
opcode 127, :r_load_local, :stack => [0, 0], :args => [:r0, :local], :control_flow => :next
|
144
|
+
opcode 128, :r_store_local, :stack => [0, 0], :args => [:r0, :local], :control_flow => :next
|
145
|
+
opcode 129, :r_load_local_depth, :stack => [0, 0], :args => [:r0, :local, :depth], :control_flow => :next
|
146
|
+
opcode 130, :r_store_local_depth, :stack => [0, 0], :args => [:r0, :local, :depth], :control_flow => :next
|
147
|
+
opcode 131, :r_load_stack, :stack => [0, 0], :args => [:r0], :control_flow => :next
|
148
|
+
opcode 132, :r_store_stack, :stack => [0, 1], :args => [:r0], :control_flow => :next
|
149
|
+
opcode 133, :r_load_literal, :stack => [0, 0], :args => [:r0, :literal], :control_flow => :next
|
150
|
+
opcode 134, :r_load_int, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next
|
151
|
+
opcode 135, :r_store_int, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next
|
152
|
+
opcode 136, :r_copy, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next
|
153
|
+
|
154
|
+
# Native signed integer instructions
|
155
|
+
opcode 137, :n_iadd, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
156
|
+
opcode 138, :n_isub, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
157
|
+
opcode 139, :n_imul, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
158
|
+
opcode 140, :n_idiv, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
159
|
+
opcode 141, :n_iadd_o, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
160
|
+
opcode 142, :n_isub_o, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
161
|
+
opcode 143, :n_imul_o, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
162
|
+
opcode 144, :n_idiv_o, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
163
|
+
opcode 145, :n_ieq, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
164
|
+
opcode 146, :n_ine, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
165
|
+
opcode 147, :n_ilt, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
166
|
+
opcode 148, :n_ile, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
167
|
+
opcode 149, :n_igt, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
168
|
+
opcode 150, :n_ige, :stack => [0, 0], :args => [:r0, :r1, :r2], :control_flow => :next
|
169
|
+
opcode 151, :n_ipopcnt, :stack => [0, 0], :args => [:r0, :r1], :control_flow => :next
|
170
|
+
|
132
171
|
end
|
133
172
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubinius-compiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '3.
|
4
|
+
version: '3.26'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Shirai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|