peter klausler
d2703b38e5
[flang] address review comments
...
Original-commit: flang-compiler/f18@a98942e396
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
2018-08-06 09:43:43 -07:00
peter klausler
d4b12d4e84
[flang] Remove defined assignments from runtime representation.
...
Original-commit: flang-compiler/f18@720e71c5db
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:55:36 -07:00
peter klausler
3ace3e39c6
[flang] Rename some NaNs.
...
Original-commit: flang-compiler/f18@34eac17ddc
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:03 -07:00
peter klausler
9859b91602
[flang] clean up g++ 8.2.0 build warnings
...
Original-commit: flang-compiler/f18@0c946bef66
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:02 -07:00
peter klausler
fac96c4612
[flang] test and debug RESHAPE
...
Original-commit: flang-compiler/f18@c20ce350c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:02 -07:00
peter klausler
a8fed82258
[flang] Implement and test RESHAPE. Avoid G++ workaround when compiled with GNU 8.2.0.
...
Original-commit: flang-compiler/f18@80257ee0d2
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:01 -07:00
peter klausler
6f9fa21d50
[flang] Move descriptor flags into addendum.
...
Original-commit: flang-compiler/f18@f5839874ef
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:00 -07:00
peter klausler
51b3ceaafe
[flang] Use a common enum class in evaluate and runtime for type category.
...
Original-commit: flang-compiler/f18@5012e652af
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:24:00 -07:00
peter klausler
2dce7b9554
[flang] break up runtime into multiple headers and source files
...
Original-commit: flang-compiler/f18@7863350552
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:59 -07:00
peter klausler
79c74948cc
[flang] more descriptor work
...
Original-commit: flang-compiler/f18@0ab17048ed
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:59 -07:00
peter klausler
e20784149f
[flang] comments
...
Original-commit: flang-compiler/f18@b4423e3b1c
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:59 -07:00
peter klausler
adc597b032
[flang] checkpoint work on descriptors
...
Original-commit: flang-compiler/f18@5e68ebea25
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:58 -07:00
peter klausler
ab9d0987a2
[flang] character folding
...
Original-commit: flang-compiler/f18@5adc208bf2
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:58 -07:00
peter klausler
fd6312ea05
[flang] complex and character comparisons
...
Original-commit: flang-compiler/f18@77ed88d24f
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:57 -07:00
peter klausler
439ddb334f
[flang] Use std::nullopt in place of empty braces in return statements.
...
Original-commit: flang-compiler/f18@90e556301c
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:57 -07:00
peter klausler
b861018e3a
[flang] COMPLEX folding
...
Original-commit: flang-compiler/f18@6f1ef45b2f
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:56 -07:00
peter klausler
bd146ed3e8
[flang] fold real**int
...
Original-commit: flang-compiler/f18@2dc2c2a6a5
Reviewed-on: https://github.com/flang-compiler/f18/pull/162
Tree-same-pre-rewrite: false
2018-08-03 16:23:56 -07:00
Peter Klausler
b9631a5d74
[flang] Merge pull request flang-compiler/f18#163 from flang-compiler/pmk1
...
Restore buildability with clang
Original-commit: flang-compiler/f18@65c88ddf0f
Reviewed-on: https://github.com/flang-compiler/f18/pull/163
2018-08-03 16:23:23 -07:00
peter klausler
fd3a82772f
[flang] Update README to reflect buildability with GCC 8.2.0.
...
Original-commit: flang-compiler/f18@f64a9f5b82
Reviewed-on: https://github.com/flang-compiler/f18/pull/163
2018-08-03 16:11:29 -07:00
peter klausler
ca5c265569
[flang] Add virtual IntExpr::~IntExpr to silence Clang warning about non-virtual dtor in a class with virtual functions.
...
Original-commit: flang-compiler/f18@b024ba50e1
Reviewed-on: https://github.com/flang-compiler/f18/pull/163
Tree-same-pre-rewrite: false
2018-08-03 16:07:58 -07:00
Peter Klausler
3e4cf24ed4
[flang] Merge pull request flang-compiler/f18#161 from flang-compiler/pmk1
...
issue#159 - better error messages in face of garbled source that resembles Hollerith
Original-commit: flang-compiler/f18@5aedd0d72c
Reviewed-on: https://github.com/flang-compiler/f18/pull/161
2018-08-03 15:29:13 -07:00
peter klausler
837b6960a5
[flang] Make prescanner tokenization message re: Hollerith truncation a warning, so parser get a shot at it. Merge messages from failed parsing alternatives more informatively.
...
Original-commit: flang-compiler/f18@16ed01d8f3
Reviewed-on: https://github.com/flang-compiler/f18/pull/161
2018-08-03 14:16:16 -07:00
Tim Keith
e6528c15d5
[flang] Merge pull request flang-compiler/f18#160 from flang-compiler/tsk9
...
Add support for submodules
Original-commit: flang-compiler/f18@79f3632fc2
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
2018-08-03 11:33:14 -07:00
Tim Keith
ee51223da7
[flang] Changes based on review comments
...
Original-commit: flang-compiler/f18@fc4c0c39d5
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
2018-08-03 11:32:21 -07:00
Tim Keith
e90d137108
[flang] Make module files read-only.
...
Original-commit: flang-compiler/f18@c7752ab5fb
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
Tree-same-pre-rewrite: false
2018-08-02 16:38:36 -07:00
Tim Keith
96b187efdf
[flang] Add support for submodules
...
Symbols for submodules have `ModuleDetails` with `isSubmodule` set.
Scopes for submodules have `Module` kind and have a parent scope that
is also `Module` kind.
Scopes for modules now contain a mapping of submodule name to scope
so that we can find them without having to search the scope tree or
re-read their `.mod` file.
The module file for submodule `s` with ancestor module `m` is named `m-s.mod`.
The tree structure of scopes means module file writing is now recursive.
Similarly, reading the module file for a submodule may require reading
the module files of its parent and ancestor. `ResolveNames` now requires
the parent scope to be passed in -- it is not always the global scope.
`test_modfiles.sh` now handles an argument that is a filename glob so
that the test can involve multiple files. This allows `modfile09` to
test reading of `.mod` files for modules and submodules.
Original-commit: flang-compiler/f18@2e4424dbc8
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
Tree-same-pre-rewrite: false
2018-08-02 16:21:27 -07:00
Tim Keith
4a20cc8478
[flang] Refactor to remove move semantics for Details
...
The classes in the Details union don't own resources so it makes things
simpler to copy them instead of moving. Same with ProcInterface.
Original-commit: flang-compiler/f18@d9ee19cbc4
Reviewed-on: https://github.com/flang-compiler/f18/pull/160
Tree-same-pre-rewrite: false
2018-08-02 15:51:07 -07:00
Peter Klausler
4d3195f80c
[flang] Merge pull request flang-compiler/f18#156 from flang-compiler/pmk1
...
Better program unit END statement error recovery.
Original-commit: flang-compiler/f18@902054b883
Reviewed-on: https://github.com/flang-compiler/f18/pull/156
2018-07-31 12:35:42 -07:00
peter klausler
81b92ae6da
[flang] Clean up end-of-statement error recovery. And fix issue#157.
...
Original-commit: flang-compiler/f18@23d8368571
Reviewed-on: https://github.com/flang-compiler/f18/pull/156
2018-07-31 12:35:06 -07:00
peter klausler
e1b584468c
[flang] Even better program unit END statement error recovery.
...
Original-commit: flang-compiler/f18@31f456ebc5
Reviewed-on: https://github.com/flang-compiler/f18/pull/156
Tree-same-pre-rewrite: false
2018-07-30 16:33:55 -07:00
peter klausler
6135c20380
[flang] better program unit END statement error recovery
...
Original-commit: flang-compiler/f18@62799c88ff
Reviewed-on: https://github.com/flang-compiler/f18/pull/156
Tree-same-pre-rewrite: false
2018-07-30 15:31:06 -07:00
Peter Klausler
e9a123623a
[flang] Merge pull request flang-compiler/f18#155 from flang-compiler/pmk1
...
issue#153
Original-commit: flang-compiler/f18@bcac43a2c1
Reviewed-on: https://github.com/flang-compiler/f18/pull/155
2018-07-30 15:12:22 -07:00
peter klausler
7473cd711a
[flang] issue#153
...
Original-commit: flang-compiler/f18@64272abddd
Reviewed-on: https://github.com/flang-compiler/f18/pull/155
2018-07-30 13:56:44 -07:00
Peter Klausler
7e05019220
[flang] Merge pull request flang-compiler/f18#154 from flang-compiler/pmk2
...
issue#152 and a little clean-up
Original-commit: flang-compiler/f18@220c6eb2c8
Reviewed-on: https://github.com/flang-compiler/f18/pull/154
2018-07-30 13:55:19 -07:00
peter klausler
5369b346c3
[flang] issue#152 and a little clean-up
...
Original-commit: flang-compiler/f18@54d74dc1e8
Reviewed-on: https://github.com/flang-compiler/f18/pull/154
2018-07-30 12:56:58 -07:00
Peter Klausler
8cbd3ef76a
[flang] Merge pull request flang-compiler/f18#151 from flang-compiler/pmk1
...
Tweaks to source provenance and messaging in support of module files
Original-commit: flang-compiler/f18@21bb12c9d6
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
2018-07-30 11:38:54 -07:00
peter klausler
56cc22fdfe
[flang] Use std::nullopt rather than {}.
...
Original-commit: flang-compiler/f18@9a740acf83
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
2018-07-30 11:08:22 -07:00
peter klausler
d90437bd91
[flang] address review comments
...
Original-commit: flang-compiler/f18@a18aba21fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 17:06:55 -07:00
peter klausler
851a5a00f9
[flang] add isModuleFile flag to parser::Options, use it
...
Original-commit: flang-compiler/f18@0727140f53
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 15:18:36 -07:00
peter klausler
4c5dfecb3e
[flang] Let multiple CookedSource instances share a ref-counted AllSources.
...
Original-commit: flang-compiler/f18@98a170e3e5
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 14:58:14 -07:00
peter klausler
108e9b4678
[flang] Support resolution of provenances in messages from CharBlocks to ProvenanceRanges
...
Original-commit: flang-compiler/f18@aa57287959
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 14:01:19 -07:00
peter klausler
28ed1390cd
[flang] complete merge to current master
...
Original-commit: flang-compiler/f18@ca43f45616
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 13:38:24 -07:00
peter klausler
fa30061f09
[flang] fix double deallocation bug from previous commit
...
Original-commit: flang-compiler/f18@f216b6bb82
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 13:27:33 -07:00
peter klausler
544f9d5e74
[flang] Tweaks to provenance data structures, in preparation for better module file support.
...
Original-commit: flang-compiler/f18@a7b7b2b680
Reviewed-on: https://github.com/flang-compiler/f18/pull/151
Tree-same-pre-rewrite: false
2018-07-27 13:27:30 -07:00
Tim Keith
4790f692f5
[flang] Merge pull request flang-compiler/f18#149 from flang-compiler/tsk5
...
Refactor ModFileReader to use parser::Parsing
Original-commit: flang-compiler/f18@451e9e4ee4
Reviewed-on: https://github.com/flang-compiler/f18/pull/149
2018-07-27 10:57:29 -07:00
Tim Keith
11225c978b
[flang] Remove unnecessary unique_ptr.
...
The unique_ptr around the vector of char was unnecessary. We can just
move the vector itself and it still keeps the same stream of chars.
Original-commit: flang-compiler/f18@24672adba9
Reviewed-on: https://github.com/flang-compiler/f18/pull/149
2018-07-27 08:12:37 -07:00
Tim Keith
6f4f772685
[flang] Change how cooked source is saved
...
Rather than save the entire CookedSource object in the module scope,
all we need is the vector of characters that CharBlock has references
into. This avoids the problem that CookedSource object has a dangling
reference to an AllSources object (which shouldn't be needed by the
CharBlocks in the symbol table, but is there).
This also decouples Scope from parser classes other than CharBlock.
Original-commit: flang-compiler/f18@fdbf5c841e
Reviewed-on: https://github.com/flang-compiler/f18/pull/149
Tree-same-pre-rewrite: false
2018-07-26 16:03:31 -07:00
Tim Keith
9e48304374
[flang] Refactor ModFileReader to use parser::Parsing
...
parser::Parsing does most of the work needed to prescan and parse a file.
The only problem is that for module files we need to take ownership of
the cooked character stream so that it lives as long as the module scope
does.
To achieve this, change Parsing::cooked_ to be a unique_ptr and add a
member function to allow the caller to take ownership of it.
Original-commit: flang-compiler/f18@9088891ab2
Reviewed-on: https://github.com/flang-compiler/f18/pull/149
Tree-same-pre-rewrite: false
2018-07-26 10:57:51 -07:00
Austin Wells
fb8950ee93
[flang] Update README.md ( flang-compiler/f18#150 )
...
Corrected the URL in README.md to point to the correct public URL for this repository.
Original-commit: flang-compiler/f18@7005e9ad7b
Reviewed-on: https://github.com/flang-compiler/f18/pull/150
2018-07-27 08:46:33 -07:00
Tim Keith
88f57c6c28
[flang] Merge pull request flang-compiler/f18#147 from flang-compiler/tsk5
...
Add support for -module option
Original-commit: flang-compiler/f18@e3d4d7e6fd
Reviewed-on: https://github.com/flang-compiler/f18/pull/147
2018-07-26 10:40:27 -07:00