| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `diffable` is used to evaluate the impact of a compiler
optimization or checking that a compiler refactoring doesn't change
the result in any significant way, the changes to the compiler source
code produce many differences in the output from `diffable`. The sheer
number of changes in line number directives in the output from, for
example, a reformatting which inserts a line early in a module makes
it hard to notice significant changes in the output.
Prior to this patch `diffable` finds the source code to the
applications it compiles by using `code:root_dir/0` and
`code:lib_dir/1`, that is, it assumes that the source code to compile
is the source for the running system. This patch adds a new command
line flag to `diffable`. The flag, `--erltop <path>`, makes diffable
look for the source code for the applications to compile in a
different tree.
The intended use case is as follows, you have a baseline and a
development tree, located in directories $BASE and $DEV
respectively:
```
$ PATH=$BASE/bin:$PATH $BASE/scripts/diffable --asm \
--deterministic /tmp/baseline
```
Now run `diffable` using the development compiler, but compile the
source code from the baseline:
```
$ PATH=$DEV/bin:$PATH $DEV/scripts/diffable --erltop $BASE --asm \
--deterministic /tmp/dev
```
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When testing the JIT code generator it is useful to run it on a large
number of functions. Running `diffable --dis` does just that, but as
disassembly of loaded code is not supported by the JIT, diffable
unfortunately crashes when trying to find labels in the empty output.
This patch changes diffable:find_labels/3 to not crash on empty input,
thus making diffable useful for exercising the JIT's code generator.
|
| |
|
|
|
|
|
| |
As of 389c0f3d87a6826a608eb532d4926d8cfd5d3d0d all operands are
surrounded with '`':s, account for this change in rejoin_atoms/1.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The beam-assembly dump parser in diffable does not parse atoms
containing spaces correctly, leading to, for example, the atom 'foo
bar' to be considered to be two operands. Diffable compensates for
this parser particularity, when important for the correct functioning
of diffable, by using rejoin_atoms/1 to merge split atoms in the
operand list.
This patch fixes a bug in rejoin_atoms/1 where the attempted merging
would stop as soon as a non-atom operand was found.
|
|
|
|
|
|
| |
Co-authored-by: John Högberg <john@erlang.org>
Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
|
|
|
|
|
|
|
| |
This patch removes the hard-coding of supported compiler options from
diffable. Compiler options can now be given using the `--co <option>`
flag. The implementation of the `--deterministic` flag has been
implemented using the new framework.
|
|
|
|
|
|
|
| |
Refactor command line parser to easily support flags with arguments,
NFC. This change is preparing the parser for a future patch which will
make it possible to pass arbitrary compiler options to compile:file/2
and compile:forms/2.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch adds a new `--deterministic` command line flag to the
diffable script. When enabled, diffable compiles files with the
`deterministic` compiler option enabled. As deterministic compilation
results in line directives only containing the basename of module
files, this greatly reduces the size of diffs when comparing the
results from different build and source trees.
|
| |
|
|
|
|
|
| |
If Elixir is installed along the the Erlang/OTP repository, produce
diff-friendly output for the Elixir standard library.
|
| |
|
|
|
|
|
| |
Now that the compiler has a `diffable` option, use it for a slight
speed up.
|
| |
|
| |
|
| |
|
|
Run scripts/diffable without arguments to print a description
and a few examples.
|