typeprof 0.21.11 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -31
  3. data/bin/typeprof +5 -0
  4. data/doc/doc.ja.md +134 -0
  5. data/doc/doc.md +136 -0
  6. data/lib/typeprof/cli/cli.rb +180 -0
  7. data/lib/typeprof/cli.rb +2 -133
  8. data/lib/typeprof/code_range.rb +112 -0
  9. data/lib/typeprof/core/ast/base.rb +263 -0
  10. data/lib/typeprof/core/ast/call.rb +251 -0
  11. data/lib/typeprof/core/ast/const.rb +126 -0
  12. data/lib/typeprof/core/ast/control.rb +432 -0
  13. data/lib/typeprof/core/ast/meta.rb +150 -0
  14. data/lib/typeprof/core/ast/method.rb +335 -0
  15. data/lib/typeprof/core/ast/misc.rb +263 -0
  16. data/lib/typeprof/core/ast/module.rb +123 -0
  17. data/lib/typeprof/core/ast/pattern.rb +140 -0
  18. data/lib/typeprof/core/ast/sig_decl.rb +471 -0
  19. data/lib/typeprof/core/ast/sig_type.rb +663 -0
  20. data/lib/typeprof/core/ast/value.rb +319 -0
  21. data/lib/typeprof/core/ast/variable.rb +315 -0
  22. data/lib/typeprof/core/ast.rb +472 -0
  23. data/lib/typeprof/core/builtin.rb +146 -0
  24. data/lib/typeprof/core/env/method.rb +137 -0
  25. data/lib/typeprof/core/env/method_entity.rb +55 -0
  26. data/lib/typeprof/core/env/module_entity.rb +408 -0
  27. data/lib/typeprof/core/env/static_read.rb +155 -0
  28. data/lib/typeprof/core/env/type_alias_entity.rb +27 -0
  29. data/lib/typeprof/core/env/value_entity.rb +32 -0
  30. data/lib/typeprof/core/env.rb +360 -0
  31. data/lib/typeprof/core/graph/box.rb +991 -0
  32. data/lib/typeprof/core/graph/change_set.rb +224 -0
  33. data/lib/typeprof/core/graph/filter.rb +155 -0
  34. data/lib/typeprof/core/graph/vertex.rb +222 -0
  35. data/lib/typeprof/core/graph.rb +3 -0
  36. data/lib/typeprof/core/service.rb +522 -0
  37. data/lib/typeprof/core/type.rb +348 -0
  38. data/lib/typeprof/core/util.rb +81 -0
  39. data/lib/typeprof/core.rb +32 -0
  40. data/lib/typeprof/diagnostic.rb +35 -0
  41. data/lib/typeprof/lsp/messages.rb +430 -0
  42. data/lib/typeprof/lsp/server.rb +177 -0
  43. data/lib/typeprof/lsp/text.rb +69 -0
  44. data/lib/typeprof/lsp/util.rb +61 -0
  45. data/lib/typeprof/lsp.rb +4 -907
  46. data/lib/typeprof/version.rb +1 -1
  47. data/lib/typeprof.rb +4 -18
  48. data/typeprof.gemspec +5 -7
  49. metadata +48 -35
  50. data/.github/dependabot.yml +0 -6
  51. data/.github/workflows/main.yml +0 -39
  52. data/.gitignore +0 -9
  53. data/Gemfile +0 -17
  54. data/Gemfile.lock +0 -41
  55. data/Rakefile +0 -10
  56. data/exe/typeprof +0 -10
  57. data/lib/typeprof/analyzer.rb +0 -2598
  58. data/lib/typeprof/arguments.rb +0 -414
  59. data/lib/typeprof/block.rb +0 -176
  60. data/lib/typeprof/builtin.rb +0 -893
  61. data/lib/typeprof/code-range.rb +0 -177
  62. data/lib/typeprof/config.rb +0 -158
  63. data/lib/typeprof/container-type.rb +0 -912
  64. data/lib/typeprof/export.rb +0 -589
  65. data/lib/typeprof/import.rb +0 -852
  66. data/lib/typeprof/insns-def.rb +0 -65
  67. data/lib/typeprof/iseq.rb +0 -864
  68. data/lib/typeprof/method.rb +0 -355
  69. data/lib/typeprof/type.rb +0 -1140
  70. data/lib/typeprof/utils.rb +0 -212
  71. data/tools/coverage.rb +0 -14
  72. data/tools/setup-insns-def.rb +0 -30
  73. data/typeprof-lsp +0 -3
@@ -1,65 +0,0 @@
1
- TypeProf::INSN_TABLE = {:nop=>[],
2
- :getlocal=>["lindex_t", "rb_num_t"],
3
- :setlocal=>["lindex_t", "rb_num_t"],
4
- :getblockparam=>["lindex_t", "rb_num_t"],
5
- :setblockparam=>["lindex_t", "rb_num_t"],
6
- :getblockparamproxy=>["lindex_t", "rb_num_t"],
7
- :getspecial=>["rb_num_t", "rb_num_t"],
8
- :setspecial=>["rb_num_t"],
9
- :getinstancevariable=>["ID", "IVC"],
10
- :setinstancevariable=>["ID", "IVC"],
11
- :getclassvariable=>["ID"],
12
- :setclassvariable=>["ID"],
13
- :getconstant=>["ID"],
14
- :setconstant=>["ID"],
15
- :getglobal=>["GENTRY"],
16
- :setglobal=>["GENTRY"],
17
- :putnil=>[],
18
- :putself=>[],
19
- :putobject=>["VALUE"],
20
- :putspecialobject=>["rb_num_t"],
21
- :putstring=>["VALUE"],
22
- :concatstrings=>["rb_num_t"],
23
- :tostring=>[],
24
- :objtostring=>[],
25
- :anytostring=>[],
26
- :freezestring=>["VALUE"],
27
- :toregexp=>["rb_num_t", "rb_num_t"],
28
- :intern=>[],
29
- :newarray=>["rb_num_t"],
30
- :newarraykwsplat=>["rb_num_t"],
31
- :duparray=>["VALUE"],
32
- :duphash=>["VALUE"],
33
- :expandarray=>["rb_num_t", "rb_num_t"],
34
- :concatarray=>[],
35
- :concattoarray=>[],
36
- :pushtoarray=>["rb_num_t"],
37
- :splatarray=>["VALUE"],
38
- :newhash=>["rb_num_t"],
39
- :newrange=>["rb_num_t"],
40
- :pop=>[],
41
- :dup=>[],
42
- :dupn=>["rb_num_t"],
43
- :swap=>[],
44
- :reverse=>["rb_num_t"],
45
- :topn=>["rb_num_t"],
46
- :setn=>["rb_num_t"],
47
- :adjuststack=>["rb_num_t"],
48
- :defined=>["rb_num_t", "VALUE", "VALUE"],
49
- :checkmatch=>["rb_num_t"],
50
- :checkkeyword=>["lindex_t", "lindex_t"],
51
- :checktype=>["rb_num_t"],
52
- :defineclass=>["ID", "ISEQ", "rb_num_t"],
53
- :definemethod=>["ID", "ISEQ"],
54
- :definesmethod=>["ID", "ISEQ"],
55
- :send=>["CALL_DATA", "ISEQ"],
56
- :invokesuper=>["CALL_DATA", "ISEQ"],
57
- :invokeblock=>["CALL_DATA"],
58
- :leave=>[],
59
- :throw=>["rb_num_t"],
60
- :jump=>["OFFSET"],
61
- :branchif=>["OFFSET"],
62
- :branchunless=>["OFFSET"],
63
- :branchnil=>["OFFSET"],
64
- :once=>["ISEQ", "ISE"],
65
- :invokebuiltin=>["RB_BUILTIN"]}