Matías Aereal Aeón
e902ce1aa0
Removing std:: from std::to_string and include for boost/lexical_cast
2018-08-08 11:26:30 -03:00
chriseth
901550e473
Merge pull request #4692 from ethereum/devcore-path
...
Move absolutePath/sanitizePath helpers from CompilerStack to libdevcore
2018-08-07 16:15:49 +02:00
chriseth
71e26f6adb
Remove clone feature.
2018-08-07 11:10:50 +01:00
Alex Beregszaszi
3de0b8b7f0
Move absolutePath/sanitizePath helpers from CompilerStack to libdevcore
2018-08-06 12:54:22 +01:00
Alex Beregszaszi
f74cff622d
Properly explain all the analsys steps in CompilerStack
2018-07-31 00:39:18 +01:00
Alex Beregszaszi
3fc7da11db
Pull out createCBORMetadata helper
2018-06-25 22:17:33 +02:00
Alex Beregszaszi
a392e0f046
Properly catch optimizer/assembly exception in CompilerStack
2018-06-20 23:19:06 +02:00
Alex Beregszaszi
0a632011be
CompilerStack absolutePath/sanitizePath can be made static
2018-06-20 17:04:22 +02:00
Alex Beregszaszi
dcee8e11ad
Reorder some of the flow in CompilerStack::compileContract for readability
2018-06-20 17:01:17 +02:00
Daniel Kirchner
16e966dea0
Add control flow analyzer and test for uninitialized storage returns.
2018-05-14 20:23:40 +02:00
Daniel Kirchner
995623f0fa
Add control flow graph.
2018-05-14 20:23:40 +02:00
Alex Beregszaszi
3730f68d4b
reindent
2018-04-06 13:52:19 +02:00
Alex Beregszaszi
e8be0e61b3
Catch FatalError in CompilerStack::analysis to cover all the analysis tests
2018-04-06 13:52:19 +02:00
chriseth
6ec4517929
Use EVM version in gas meter and optimizer.
2018-03-05 11:36:33 +01:00
chriseth
a53d6b499d
Use EVM version in type checker.
2018-03-01 17:19:35 +01:00
chriseth
f75a411325
Provide target EVM version in CompilerContext.
2018-03-01 17:19:35 +01:00
chriseth
85785710e6
Store EVM version in settings.
2018-03-01 17:19:34 +01:00
chriseth
5ab4a1ae78
Add ability to set the target EVM version.
2018-03-01 17:19:34 +01:00
chriseth
6807010dc7
Prevent libraries from being called.
2018-01-19 16:27:44 +01:00
Alex Beregszaszi
8d3cfa8cff
Simplify contract lookup in CompileStack
2017-10-18 23:54:32 +01:00
Alex Beregszaszi
2ce35b77be
Implement CompilerStack.lastContractName()
2017-10-18 23:54:32 +01:00
Alex Beregszaszi
f96e932243
Provide optional list of contract names to CompilerStack.compile
2017-10-04 20:30:14 +01:00
chriseth
3f3bcc4f8a
Merge pull request #2848 from ethereum/checkViewPure
...
Enforce view and pure.
2017-09-13 18:29:13 +02:00
Alex Beregszaszi
bbfb16cf5c
Introduce assemblyString
2017-09-11 15:53:20 +01:00
Alex Beregszaszi
50570c6c79
Do not return the stream in asssemblyStream
2017-09-11 15:48:58 +01:00
Alex Beregszaszi
a535a8b06e
Split out the JSON functionality from assembly.stream()
2017-09-11 15:48:52 +01:00
chriseth
5470da4d9a
View-pure checker.
2017-09-06 13:50:49 +02:00
Alex Beregszaszi
8e5f9c5981
Removed unused natspec members of ContractDefinition
2017-08-25 20:29:43 +01:00
Alex Beregszaszi
e6f55fb95e
Do not create a new TypeChecker instance for every contract
2017-08-25 15:43:26 +01:00
Alex Beregszaszi
670df8e874
Attach natspec before type checking
2017-08-25 15:39:20 +01:00
Alex Beregszaszi
d60d4b3031
Remove duplicate work from CompilerStack.analyze()
2017-08-25 15:37:10 +01:00
chriseth
9ac2ac14c1
Rename read file callback.
2017-08-23 17:37:35 +02:00
chriseth
b3f8ed457a
Cleanup.
2017-08-23 14:24:30 +02:00
chriseth
1ece7bf443
z3 conditions
2017-08-23 14:24:04 +02:00
Alex Beregszaszi
4219acaba9
Merge pull request #2771 from ethereum/unused-includes
...
Remove some unused includes
2017-08-21 16:26:44 +01:00
Alex Beregszaszi
b3986f1d07
Remove some unused includes
2017-08-21 14:08:58 +01:00
Alex Beregszaszi
7222fac456
Remove DocumentationType from natspec
2017-08-15 19:56:38 +01:00
Alex Beregszaszi
2d1bab0de8
Output experimental flag in metadata only for risky features
2017-08-11 16:38:43 +01:00
Alex Beregszaszi
4d82d4f57a
Store experimental flag in metadata CBOR
2017-08-11 16:38:43 +01:00
Alex Beregszaszi
c835bcec62
Replace isFullyImplemented with unimplementedFunctions in ASTAnnotations
2017-08-04 14:03:37 +01:00
Alex Beregszaszi
9fc6eccc26
Add isFallback() helper
2017-07-27 21:52:57 +01:00
Alex Beregszaszi
89fadd6935
Merge pull request #2645 from ethereum/asserts
...
Use solAssert where possible
2017-07-27 11:12:30 +01:00
Yoichi Hirai
85b338a019
Merge pull request #2643 from ethereum/compilerstack
...
Reorder CompilerStack to be in logical order
2017-07-27 11:28:08 +02:00
chriseth
1298a8df14
Merge pull request #2566 from ethereum/metadata-only-relevant
...
Metadata: only include relevant files in the source list
2017-07-27 11:07:15 +02:00
Alex Beregszaszi
8098030986
Use solAssert instead of boost throw where possible
2017-07-26 22:23:21 +01:00
Alex Beregszaszi
9982e73dce
Reorder CompilerStack to be in logical order
2017-07-26 22:16:02 +01:00
Alex Beregszaszi
30012db396
Add CompilerStack::setOptimiserSettings
2017-07-26 15:17:07 +01:00
Alex Beregszaszi
6848199b66
Add CompilerStack::setLibraries
2017-07-26 15:05:16 +01:00
Alex Beregszaszi
fa5a7efb45
Remove unused interfaces from CompilerStack
2017-07-26 15:05:16 +01:00
Alex Beregszaszi
c617336587
Only include files usde in metadata
2017-07-19 14:56:40 +01:00
Yoichi Hirai
2a46e1b0e2
Merge pull request #2589 from ethereum/rename-onchainmetadata
...
Rename onChainMetadata to metadata
2017-07-19 11:43:19 +02:00
Alex Beregszaszi
5bb4bfb08b
Remove unneccesary interface from Natspec
2017-07-18 21:05:34 +01:00
Alex Beregszaszi
6d8929a71a
Rename onChainMetadata to metadata
2017-07-18 20:54:28 +01:00
Alex Beregszaszi
555dc4f46f
Remove Why3 generator
2017-06-25 12:26:16 +01:00
Alex Beregszaszi
b99e4bc68b
Rework functionHashes into methodIdentifiers
2017-06-22 11:13:06 +01:00
Edward Ruchevits
5f7bca94e5
Reverted functionHashes output to use method signature as keys
2017-06-13 18:04:33 +01:00
Edward Ruchevits
2e816967d3
Allow including hashes of method signatures in --combined-json output
2017-06-13 17:03:17 +01:00
Alex Beregszaszi
998ca552b8
Fix state after CompilerStack.reset()
2017-06-01 13:44:08 +01:00
Alex Beregszaszi
c212d7c2e6
Remove unused functions from CompilerStack
2017-06-01 13:28:05 +01:00
Rhett Aultman
89b60ffbd4
Refactor error reporting
...
This commit introduces ErrorReporter, a utility class which consolidates
all of the error logging functionality into a common set of functions.
It also replaces all direct interactions with an ErrorList with calls to
an ErrorReporter.
This commit resolves issue #2209
2017-05-30 07:28:31 -07:00
chriseth
40d5d5a956
Also change error message.
2017-05-26 11:13:32 +02:00
Alex Beregszaszi
8c3ec16132
Scanner requires only the SourcesSet state
2017-05-24 22:45:10 +01:00
Alex Beregszaszi
cd5d93da2a
Rename CompilerStack.metadata to CompilerStack.natspec
2017-05-19 16:11:04 +01:00
Alex Beregszaszi
81877cc594
Rename InterfaceHandler to Natspec
2017-05-19 16:11:04 +01:00
Alex Beregszaszi
12328b7848
Split ABI out of InterfaceHandler
2017-05-19 16:11:03 +01:00
Alex Beregszaszi
4bf3cbb09a
Use CompilerStack.contractABI directly
2017-05-19 15:57:36 +01:00
Alex Beregszaszi
8169e149c9
Rename CompilerStack.interface to CompilerStack.contractABI
2017-05-19 15:57:36 +01:00
Alex Beregszaszi
c0f31e4c1b
Ensure proper checks are in CompilerStack
2017-05-11 08:02:03 +01:00
Alex Beregszaszi
5b4b620d8b
Do not crash on AST if parsing failed
2017-05-11 08:02:03 +01:00
djuju
e9954eb325
conditional reset of compilerState-Enum
2017-04-28 18:46:27 +02:00
chriseth
f33614e1f7
Merge pull request #2171 from ethereum/splitParseAndAnalyze
...
refactoring parse() into two separate functions
2017-04-28 17:19:31 +02:00
djuju
a6306a1d44
error fixed
2017-04-28 16:20:32 +02:00
djuju
45f8c5aa88
enumchecks not working
2017-04-28 15:24:59 +02:00
Alex Beregszaszi
b0485e327b
Make assembler errors fatal
2017-04-27 16:34:57 +01:00
Alex Beregszaszi
16276ab10b
Catch assembler exceptions and throw readable Solidity exceptions
2017-04-27 16:06:49 +01:00
djuju
5fd7942173
documentation, checks and renaming
2017-04-27 12:56:56 +02:00
djuju
99a7aefb75
refactoring parse() into two separate functions
2017-04-27 12:38:24 +02:00
Alex Beregszaszi
bf074f3f41
Fix source index allocation in CompilerStack. Depending on compiler(optimisations) this could be off-by-one.
2017-04-20 19:20:14 +01:00
Alex Beregszaszi
54dcb0e11b
Keep gas values as a string in CompilerStack::gasEstimate
2017-04-13 02:18:29 +01:00
Alex Beregszaszi
3fbb48bd46
Exclude fallback function from the internal functions in estimateGas
2017-04-13 02:17:40 +01:00
Alex Beregszaszi
e6221108b6
Move gasEstimate into CompilerStack
2017-04-13 02:17:37 +01:00
Alex Beregszaszi
623b8eb107
Pull out ReadFile from CompilerStack
2017-04-10 12:49:47 +01:00
Alex Beregszaszi
e0ff70778a
Rename ErrorMesage to ErrorMessage
2017-03-16 23:59:36 +00:00
Yoichi Hirai
e364909e06
Merge pull request #1747 from ethereum/fixICEInternalConstructor
...
Move privateness of constructor into AST itself.
2017-03-08 17:49:14 +01:00
chriseth
5c5d83fd70
Check for circular references in constant variables.
2017-03-06 15:05:09 +01:00
chriseth
f300bdb020
Move public constructor property into AST itself.
2017-03-06 14:12:42 +01:00
chriseth
e67faa9839
Extract scopes into compiler stack.
2017-02-14 13:23:44 +01:00
Alex Beregszaszi
fcf483ee6b
Add option to store literal sources in metadata
2017-01-26 13:16:26 +00:00
chriseth
0ef460461a
Check if constructor is public or not.
2017-01-20 19:22:39 +01:00
chriseth
7159944f0f
Reset AST node IDs between compilation runs.
2017-01-20 12:00:16 +01:00
chriseth
005e190885
Merge pull request #1397 from roadriverrail/contract_collision
...
Error out when contracts collide on name
2017-01-18 14:28:00 +01:00
Alex Beregszaszi
350c7e7e2c
Store strict version number in metadata (exclude the platform)
2017-01-17 12:54:58 +00:00
Rhett Aultman
94b092d87c
Provide fall-back method for contract lookup
...
Properly, contracts are now looked up via <source>:<contract> identifiers
called "fully qualified names." As a modicum of backward-compatibility,
failure on a lookup is now backed up by seeing if the ":" exists at all,
and if it doesn't, then the known contracts are scanned for any matching
contract name.
2017-01-16 23:47:04 -05:00
Rhett Aultman
5a2331a9f6
Remove checkLibraryNameClashes()
...
The library name clash checker throws errors when two libraries of the
same name are spotted. In a previous commit, this function was
rewritten to use fully-qualified names instead, which makes it redundant
to the checker for multiply-declared identifiers. Since it no longer
serves a clear purpose, the function is being dropped.
2017-01-16 12:32:58 -05:00
Rhett Aultman
85c55c796a
Remove unique error for contract collision
...
Because contracts are uniquely identified by their source unit, there
is no need for a unique error for this; it's actually covered by the
checker for double-declaration of identifiers.
2017-01-16 12:32:57 -05:00
Rhett Aultman
0c98e4b2da
Stylistic corrections
2017-01-16 12:32:57 -05:00
Rhett Aultman
e3b0827721
Push the error instead of throwing it
...
Throwing a CompilerError on multiple contract definition violates the
expectations of the test suite, which thinks that compile() will
return false if the code can't compile. This brings contract
collision reporting in line with most of the other errors.
2017-01-16 12:32:57 -05:00
Rhett Aultman
071b936b37
Only avoid collision if it's the same file
...
@chriseth had suggested that it would be better if contracts were
referenced in a file:contract notation, and that we output .bin files
that prepend original path names if necessary to avoid a collision.
This commit is mostly a draft; it still needs to be run through the test
suite.
2017-01-16 12:32:57 -05:00
Rhett Aultman
9e88f1eebe
Tab whitespace cleanup (again)
2017-01-16 12:32:57 -05:00
Rhett Aultman
ce3082dec2
Tidy up the error message
2017-01-16 12:32:57 -05:00