typeprof 0.14.0 → 0.14.1
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 +4 -4
- data/Gemfile.lock +10 -10
- data/lib/typeprof/iseq.rb +4 -1
- data/lib/typeprof/version.rb +1 -1
- data/typeprof.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5828bf5dda203756a758bba9809d3b1fe81b284cc1373f00ff75ca175afe998
|
4
|
+
data.tar.gz: c274d8bda556407a33c70227a4caea57f1ae91f79ee546f9076d6ffac01891a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e32f209894645a18b36a24c2347e86e249ffa0bcd2c93565d1920551ef143e73f6f3c58011250a545d761e9212aee032e99a44503e4dad5e1975d73de412d3c9
|
7
|
+
data.tar.gz: f3463cbae97beff6b359acb14a3a871f83d0ed37332e46ce38d846b2c486a9af3e6864a5450fe82e0abae79763b71ed55a26f1ab03d6a04aa9eb62232dd435fe
|
data/Gemfile.lock
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
typeprof (0.
|
5
|
-
rbs (>= 1.
|
4
|
+
typeprof (0.14.1)
|
5
|
+
rbs (>= 1.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
coverage-helpers (1.0.0)
|
11
|
-
docile (1.
|
12
|
-
power_assert (
|
11
|
+
docile (1.4.0)
|
12
|
+
power_assert (2.0.0)
|
13
13
|
rake (13.0.1)
|
14
|
-
rbs (1.0
|
15
|
-
simplecov (0.
|
14
|
+
rbs (1.2.0)
|
15
|
+
simplecov (0.21.2)
|
16
16
|
docile (~> 1.1)
|
17
17
|
simplecov-html (~> 0.11)
|
18
18
|
simplecov_json_formatter (~> 0.1)
|
19
19
|
simplecov-html (0.12.3)
|
20
|
-
simplecov_json_formatter (0.1.
|
21
|
-
stackprof (0.2.
|
22
|
-
test-unit (3.
|
20
|
+
simplecov_json_formatter (0.1.3)
|
21
|
+
stackprof (0.2.17)
|
22
|
+
test-unit (3.4.1)
|
23
23
|
power_assert
|
24
24
|
|
25
25
|
PLATFORMS
|
@@ -36,4 +36,4 @@ DEPENDENCIES
|
|
36
36
|
typeprof!
|
37
37
|
|
38
38
|
BUNDLED WITH
|
39
|
-
2.
|
39
|
+
2.3.0.dev
|
data/lib/typeprof/iseq.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
module TypeProf
|
2
2
|
class ISeq
|
3
|
+
# https://github.com/ruby/ruby/pull/4468
|
4
|
+
CASE_WHEN_CHECKMATCH = RubyVM::InstructionSequence.compile("case 1; when Integer; end").to_a.last.any? {|insn,| insn == :checkmatch }
|
5
|
+
|
3
6
|
include Utils::StructuralEquality
|
4
7
|
|
5
8
|
def self.compile(file)
|
@@ -210,7 +213,7 @@ module TypeProf
|
|
210
213
|
# find a pattern: getlocal, (dup, putobject(true), getconstant(class name), checkmatch, branch)* for ..Ruby 3.0
|
211
214
|
# find a pattern: getlocal, (putobject(true), getconstant(class name), top(1), send(===), branch)* for Ruby 3.1..
|
212
215
|
case_branch_list = []
|
213
|
-
if
|
216
|
+
if CASE_WHEN_CHECKMATCH
|
214
217
|
(@insns.size - 1).times do |i|
|
215
218
|
insn0, getlocal_operands = @insns[i]
|
216
219
|
next unless [:getlocal, :getblockparam, :getblockparamproxy].include?(insn0) && getlocal_operands[1] == 0
|
data/lib/typeprof/version.rb
CHANGED
data/typeprof.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typeprof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke Endoh
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.2.0
|
27
27
|
description: |
|
28
28
|
TypeProf performs a type analysis of non-annotated Ruby code.
|
29
29
|
|
@@ -411,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
411
411
|
- !ruby/object:Gem::Version
|
412
412
|
version: '0'
|
413
413
|
requirements: []
|
414
|
-
rubygems_version: 3.
|
414
|
+
rubygems_version: 3.2.15
|
415
415
|
signing_key:
|
416
416
|
specification_version: 4
|
417
417
|
summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation
|