typeprof 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/typeprof/analyzer.rb +3 -1
- data/lib/typeprof/builtin.rb +1 -1
- data/lib/typeprof/version.rb +1 -1
- data/smoke/ivar4.rb +20 -0
- data/typeprof.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 481ba91ab18504fff44772720b462a9fa302e4eecddb559c3a5942710e081fa9
|
4
|
+
data.tar.gz: 288ddfd1d6c9e198ea62e6564addf40ce851c91337801db44f2957c98b9f58f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f1eefdf5e92e2fa79a03979e36dd810ffcb337c426035acc384473e45fe6201487e8354608b4b87582515561b214e3ef339edd19e3980fab2873e6bc24cb9c5
|
7
|
+
data.tar.gz: cd74500c47328634ab7991911f795e7ea9b5cc47c15e3540c7796b39c2d1d83661cd50b45623e92cf1f33cbf1e83c4c8b5796a5e5332c8e1f475d3f1d26c043c
|
data/Gemfile.lock
CHANGED
data/lib/typeprof/analyzer.rb
CHANGED
@@ -689,7 +689,9 @@ module TypeProf
|
|
689
689
|
entry = @tbl[site] ||= Entry.new(false, {}, Type.bot, Utils::MutableSet.new)
|
690
690
|
entry.read_continuations[ep] = ctn
|
691
691
|
entry.absolute_paths << ep.ctx.iseq.absolute_path if ep.ctx.is_a?(Context)
|
692
|
-
|
692
|
+
ty = entry.type
|
693
|
+
ty = Type.nil if ty == Type.bot
|
694
|
+
ctn[ty, ep]
|
693
695
|
end
|
694
696
|
|
695
697
|
def add_write!(site, ty, ep, scratch)
|
data/lib/typeprof/builtin.rb
CHANGED
@@ -445,7 +445,7 @@ module TypeProf
|
|
445
445
|
return
|
446
446
|
end
|
447
447
|
scratch.add_ivar_read!(Type::Instance.new(struct_klass), :_members, ep) do |member_ary_ty, ep|
|
448
|
-
next if member_ary_ty == Type.
|
448
|
+
next if member_ary_ty == Type.nil
|
449
449
|
member_ary_ty.elems.lead_tys.zip(aargs.lead_tys) do |sym, ty|
|
450
450
|
ty ||= Type.nil
|
451
451
|
scratch.set_instance_variable(recv, sym.sym, ty, ep, env)
|
data/lib/typeprof/version.rb
CHANGED
data/smoke/ivar4.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
def foo
|
2
|
+
bot = @undefined_ivar
|
3
|
+
unless bot
|
4
|
+
bot.nil?
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
foo # There were a bug that type profiling is terminated at this line
|
9
|
+
|
10
|
+
def bar
|
11
|
+
end
|
12
|
+
|
13
|
+
__END__
|
14
|
+
# Classes
|
15
|
+
class Object
|
16
|
+
@undefined_ivar: bot
|
17
|
+
private
|
18
|
+
def foo: -> bool
|
19
|
+
def bar: -> nil
|
20
|
+
end
|
data/typeprof.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typeprof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke Endoh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.20.
|
19
|
+
version: 0.20.1
|
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: 0.20.
|
26
|
+
version: 0.20.1
|
27
27
|
description: |
|
28
28
|
TypeProf performs a type analysis of non-annotated Ruby code.
|
29
29
|
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- smoke/ivar2.rb
|
216
216
|
- smoke/ivar3.rb
|
217
217
|
- smoke/ivar3.rbs
|
218
|
+
- smoke/ivar4.rb
|
218
219
|
- smoke/kernel-class.rb
|
219
220
|
- smoke/keyword1.rb
|
220
221
|
- smoke/keyword2.rb
|
@@ -389,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
389
390
|
- !ruby/object:Gem::Version
|
390
391
|
version: '0'
|
391
392
|
requirements: []
|
392
|
-
rubygems_version: 3.
|
393
|
+
rubygems_version: 3.1.4
|
393
394
|
signing_key:
|
394
395
|
specification_version: 4
|
395
396
|
summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation
|