94 Commits
Author SHA1 Message Date
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
Rhett Aultman b24ca4fa23 Fix tab, drop stupid '!!!', change error message. 2017-01-16 12:32:57 -05:00
Rhett Aultman f3a84eab91 Error out when contracts collide on name
The previous behaviour, courtesy of the [] operator in std::map, would
uncritically store a new ContractDefinition in m_contracts even when a
ContractDefinition already existed.  This "resolved" collissions on contract
names by clobbering the original one with the new one, and could lead to
scenarios where the clobber would only be discovered when the original
ContractDefinition could not be found or referred to, which was an unhelpful
InternalCompilerError.

This change checks the m_contracts map for a collision first and will not let
the ContractDefinition be changed to a new one once it's set, throwing a
CompilerError with information about the conflict.
2017-01-16 12:32:57 -05:00
VoR0220 b6508ca992 fixed
Signed-off-by: VoR0220 <rj@erisindustries.com>
2017-01-11 12:03:54 -06:00