Arthur Baars
b13bae6a4e
Resolve instance method calls
2021-05-20 14:27:13 +02:00
Tom Hvitved
6b6aeb10c7
Improve performance of internal/Module.qll
2021-05-19 14:33:52 +02:00
Tom Hvitved
ff06e724b1
AST synthesis framework
2021-05-12 19:58:52 +02:00
Arthur Baars
549e5ab9d6
Revert "Rename Method -> MethodDeclaration"
...
This reverts commit d361ef37af .
2021-04-21 10:50:47 +02:00
Arthur Baars
122315db3f
Remove 'Method' class
2021-04-20 13:41:11 +02:00
Arthur Baars
bf4f91e038
Address comments
2021-04-16 16:37:42 +02:00
Arthur Baars
bf556a2b53
Implement method lookup
2021-04-15 11:32:43 +02:00
Arthur Baars
24bb11b20a
Improve module/class resolution
2021-04-14 17:14:38 +02:00
Arthur Baars
9afda342bc
Address comments
2021-04-14 09:57:49 +02:00
Arthur Baars
754bfdd136
Ignore include/prepend statements in blocks
...
Include and prepend statements are rarely used in block in normal code and when
used in normal code they tend to be in blocks that are passed to methods like
`module_eval` which is a builtin method that evaluates a block in the context
of some other module (typically created with Module.new). We currently don't attempt
to track such "dynamically" constructed modules, and ignoring such modules
and the `module_eval` calls on them seems fine for now.
Another, much more frequent use of include/prepend statements in blocks is in Rspec.describe and
Rspec.context method calls in tests. Rspec also evaluates those blocks in the context of some
special Rspec class. Precisely tracking such calls during the initial construction of the module/class
hierarchy would be really hard and there would be little benefit because the interesting modules and classes of
an application are not defined in test files.
2021-04-14 09:53:19 +02:00
Arthur Baars
cdfabbc95d
Make Cached module private
2021-04-09 16:47:02 +02:00
Arthur Baars
a247544fc5
Add comments
2021-04-09 16:35:23 +02:00
Arthur Baars
7bc5be93ff
Module: make main predicates cached
2021-04-09 13:29:27 +02:00
Arthur Baars
2db999d0da
Improve module resolution
2021-04-09 09:51:24 +02:00
Arthur Baars
84f6e902ea
AST: move some scope related methods to AstNode
2021-04-07 17:16:10 +02:00
Arthur Baars
063b085078
Address comments
2021-04-07 15:57:13 +02:00
Arthur Baars
50b8b6b257
Also resolve constants with respect to the ancestors
...
of the enclosing module.
2021-04-06 15:47:13 +02:00
Arthur Baars
f12e6ea8ea
Avoid 'Object::' prefixes
2021-03-30 16:14:21 +02:00
Arthur Baars
201c1e4b81
Basic module resolution
2021-03-30 15:40:03 +02:00
Tom Hvitved
7eaf02a0bf
Make external AstNode an IPA type
2021-03-16 12:50:20 +01:00
Arthur Baars
00260db58f
Add Scope.qll
2021-03-09 09:46:42 +01:00
Arthur Baars
a7ddd642ea
AST: introduce 'Namespace' as super class of Class/Module
2021-02-19 13:34:34 +01:00
Arthur Baars
5659388ec0
AST: implement AstNode::child
2021-02-18 14:37:58 +01:00
Arthur Baars
874ac121d9
AST: Toplevel and BEGIN/ END blocks
2021-02-12 15:26:30 +01:00
Arthur Baars
ada652b6f0
Merge branch 'main' into constants_scopes
2021-02-11 17:00:50 +01:00
Arthur Baars
426bf30822
AST: ensure and else blocks
2021-02-11 14:27:23 +01:00
Nick Rolfe
6ff0ebb94a
Add ConstantAccess class
2021-02-11 12:29:25 +00:00
Nick Rolfe
452a343e86
Remove ScopeResolution from AST
...
Now we handle it specially in calls and class/module names, so they have
predicate to get the scope expr.
2021-02-10 17:53:25 +00:00
Tom Hvitved
32daf28b34
Rangify AstNode
2021-02-09 12:17:21 +01:00
Nick Rolfe
c5fca0cb6b
Add ModuleBase base class and combine class/module tests
2021-02-03 16:13:59 +00:00
Nick Rolfe
ee03e84d7f
Rename Class.qll to Module.qll
2021-02-02 18:00:29 +00:00