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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c3bf54ec6fee3b06397893d2f10f1fae8e7af82b8f1640a4ddd305c33922ff7
4
- data.tar.gz: 944d40a75789b4805e53ca70e169fe68fcd4dbca7f24bc4ccc779964085e980d
3
+ metadata.gz: 481ba91ab18504fff44772720b462a9fa302e4eecddb559c3a5942710e081fa9
4
+ data.tar.gz: 288ddfd1d6c9e198ea62e6564addf40ce851c91337801db44f2957c98b9f58f5
5
5
  SHA512:
6
- metadata.gz: 726cdbfcda694f189a96f3f35088cbcbd9a3064e79e3838f7758d7bc393bf8591c0559db1c17993f971f9ae2ee4ca3b4c09f5c0ef6d6675752b00b6948cdfe62
7
- data.tar.gz: b2b7353855183df391d8bc78c247eb7de09c1b65b2753789eb1e1fb0208275d10fec6d2d95745f36771de30af5e32281476100a0654db6f7cf87c8e442b36a65
6
+ metadata.gz: 7f1eefdf5e92e2fa79a03979e36dd810ffcb337c426035acc384473e45fe6201487e8354608b4b87582515561b214e3ef339edd19e3980fab2873e6bc24cb9c5
7
+ data.tar.gz: cd74500c47328634ab7991911f795e7ea9b5cc47c15e3540c7796b39c2d1d83661cd50b45623e92cf1f33cbf1e83c4c8b5796a5e5332c8e1f475d3f1d26c043c
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- typeprof (0.9.0)
5
- rbs (>= 0.20.0)
4
+ typeprof (0.9.1)
5
+ rbs (>= 0.20.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -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
- ctn[entry.type, ep]
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)
@@ -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.bot
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)
@@ -1,3 +1,3 @@
1
1
  module TypeProf
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -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
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_runtime_dependency "rbs", ">= 0.20.0"
33
+ spec.add_runtime_dependency "rbs", ">= 0.20.1"
34
34
  end
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.0
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-07 00:00:00.000000000 Z
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.0
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.0
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.2.0.rc.2
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