chriseth
e7f3c042b6
Struct member access for storage and memory.
2020-06-03 10:37:39 +02:00
chriseth
37e8d78cff
[Sol->Yul] Implement getters.
2020-06-03 10:33:37 +02:00
chriseth
eb923af09c
Do not set source locations for small internal assembly routines.
2020-05-27 18:26:46 +02:00
chriseth
0aa3fb5026
Merge pull request #9014 from ethereum/sol-yul-abidecode
...
[Sol - Yul] Add support for ABIDecode.
2020-05-27 11:44:13 +02:00
chriseth
f066050ec0
Merge pull request #9024 from ethereum/namableTypes
...
Disallow non-namable types for inline arrays.
2020-05-27 09:21:07 +02:00
Kamil Śliwak
f574d8ec3a
Don't assume that an expression cannot be associated with a function declaration
2020-05-27 00:05:18 +02:00
Alexander Arlt
118cb13476
[Sol - Yul] Add support for ABIDecode.
2020-05-26 13:30:37 -05:00
chriseth
309f0fbc8a
Unimplemented assert for conversion from calldata slices to memory.
2020-05-26 18:17:36 +02:00
Kamil Śliwak
1a2e441bc5
Generate internal dispatch only for functions that might actually get called via pointers
...
- This also adds support for internal library calls as a side-effect since they'll now be pulled into the internal dispatch automatically.
2020-05-26 17:01:50 +02:00
Kamil Śliwak
2716b5ff83
Replace conditionally empty whiskers variables for punctuation with <?+> syntax in IRGenerator::generateInternalDispatchFunctions()
2020-05-26 16:33:40 +02:00
chriseth
e6b399c86e
Merge pull request #8942 from ethereum/calldataVariables
...
Calldata variables.
2020-05-26 11:34:40 +02:00
chriseth
499cb0526f
Calldata variables.
2020-05-26 10:51:13 +02:00
chriseth
76d27bcfaa
Fix assumption for member not in memory.
2020-05-26 10:35:04 +02:00
chriseth
6d64095ccf
Merge pull request #8987 from ethereum/sol-yul-bound-functions
...
[Sol->Yul] Bound functions
2020-05-25 16:53:33 +02:00
chriseth
44e62c1fae
Merge pull request #8997 from ethereum/sol-yul-refactor-no-internal-functions-with-arbitrary-parameters
...
[Sol->Yul] Remove unnecessary code for handling internal functions with arbitrary parameters (refactor)
2020-05-25 16:47:10 +02:00
chriseth
042dc965fa
Merge pull request #8952 from ethereum/sol-yul-refactor-simplify-end-visit-for-internal-calls
...
[Sol->Yul] Simplify end visit for internal calls (refactor)
2020-05-25 16:46:36 +02:00
Mathias Baumann
d45bb2aa07
Add proper unipmlemented errors for array copying
2020-05-25 10:48:42 +02:00
a3d4
a499ef16fa
Fix spelling errors
2020-05-25 02:54:37 +02:00
Kamil Śliwak
4a2ce57bed
Add support for bound function calls in IR generator
2020-05-20 21:10:20 +02:00
Kamil Śliwak
a68b4ab7ed
IRGeneratorForStatements: Slightly reorganize local variables in endVisit(MemberAccess)
...
- Add memberFunctionType accessible in the whole function to avoid declaring it multiple times
- Add objectCategory
2020-05-20 21:09:27 +02:00
Kamil Śliwak
87c598863f
IRGeneratorForStatements: Remove unnecessary code for handling internal functions with arbitrary parameters
...
- Internal functions cannot have arbitrary parameters
2020-05-20 21:08:59 +02:00
Kamil Śliwak
0943333276
Simplify endVisit() for internal calls
...
- Define IRHelpers::referencedFunctionDeclaration() to avoid repeating the same dynamic_casts over and over again.
2020-05-20 21:07:37 +02:00
Kamil Śliwak
6c6a8a74e8
IRGenerationContext: Extract code for enumerating dispatchable functions from generateInternalDispatch() into a separate function
2020-05-20 13:16:08 +02:00
Kamil Śliwak
bd75543900
Add IRNames::internalDispatch() and use it in IRGenerationContext
2020-05-20 12:48:49 +02:00
Kamil Śliwak
22c0568d34
IRGenerationContext::internalDispatch(): Remove unused local YulUtilFunctions instance
2020-05-20 12:46:32 +02:00
Kamil Śliwak
7d2292fbaf
Rename IRGenerationContext::internalDispatch() to generateInternalDispatchFunction()
2020-05-20 12:46:31 +02:00
Kamil Śliwak
1a521cc7ac
Use YulArity in IR generator
2020-05-19 23:03:21 +02:00
Kamil Śliwak
16e58449ab
ir/Common: Add YulArity struct
2020-05-19 23:03:15 +02:00
Kamil Śliwak
b0ae85b6b0
IRGenerationContext::internalDispatch(): Don't use asCallableFunction() to get internal function type
2020-05-19 18:00:50 +02:00
Djordje Mijovic
d235d0c166
[Sol->Yul] Implementing Byte array push() and pop()
2020-05-19 14:47:00 +02:00
Kamil Śliwak
465e4d4088
Extract more functions for generating function and variable names into IRNames
2020-05-15 14:51:00 +02:00
Kamil Śliwak
7af7273b60
Move static functions for constructing names from IRGenerationContext into the new Common
module
2020-05-14 19:48:00 +02:00
chriseth
7ef114db9a
Merge pull request #8841 from ethereum/sol_yul_ripemd160_ecrecover
...
[Sol - Yul] Add support for ripemd160 & ecrecover.
2020-05-14 18:43:55 +02:00
Alexander Arlt
91e9d54c71
[Sol - Yul] Add support for ripemd160 & ecrecover.
2020-05-14 10:44:39 -05:00
Djordje Mijovic
472fb21ee0
[Sol->Yul] Enabling new bytes(n)
2020-05-14 12:55:14 +02:00
Daniel Kirchner
97296d8622
Allow ABI encoding for array slices without explicit casts.
2020-05-13 18:20:07 +02:00
Daniel Kirchner
6f04664cfa
Disallow array slicing for arrays with dyanmically encoded base types.
2020-05-13 15:52:22 +02:00
Daniel Kirchner
c2f5a66a79
Implement .creationCode for Sol->Yul.
2020-05-11 18:51:51 +02:00
Daniel Kirchner
3fbde6e782
Merge pull request #8856 from ethereum/implicitConstructorCallvalueCheck
...
Implicit constructor callvalue check
2020-05-11 18:50:36 +02:00
Daniel Kirchner
79b217dfb3
Callvalue checks for implicit constructors.
2020-05-11 16:14:34 +02:00
chriseth
f1e0aa7a56
Merge pull request #8763 from ethereum/bareCall
...
IR code generation for call.
2020-05-11 16:06:54 +02:00
chriseth
e2f7e8a3a7
Merge pull request #8890 from ethereum/fixclangv10
...
Fix clang v10 compilation errors
2020-05-11 15:39:09 +02:00
chriseth
c0bf529236
Support bare calls.
2020-05-11 15:11:46 +02:00
chriseth
0248303c15
Merge pull request #8872 from ethereum/int-min-max
...
implemented type(X).min and type(X).max for all integer types
2020-05-11 15:08:19 +02:00
Mathias Baumann
fe43132003
Fix clang v10 compilation errors
2020-05-11 14:59:51 +02:00
Harikrishnan Mulackal
e54c4eecfc
implemented type(X).min and type(X).max for all integer types
2020-05-11 14:51:13 +05:30
chriseth
a0e291bd06
Implement Yul IR generation for abi.encode*
2020-05-07 19:39:15 +02:00
chriseth
d0b82fe854
Merge pull request #8869 from ethereum/useSlotes
...
Use vector of slots.
2020-05-07 19:03:59 +02:00
chriseth
75ca072ae6
Assertion about getters for non-value type immutables.
2020-05-07 18:18:40 +02:00
chriseth
f38cf85482
Use vector of slots.
2020-05-07 17:54:04 +02:00
Mathias Baumann
eb4926cb48
run addMissingFunctions only once
2020-05-07 17:06:11 +02:00
chriseth
f42dc70c9f
Merge pull request #8863 from ethereum/nonReversedEncoder
...
Introduce non-reversed version of tupleEncoder.
2020-05-07 15:47:32 +02:00
chriseth
e986fde0c1
Introduce non-reversed version of tupleEncoder.
2020-05-07 15:08:09 +02:00
chriseth
6fb112fa8e
Remove some unneeded headers.
2020-05-07 01:49:46 +02:00
Alex Beregszaszi
327c75bc1b
IR generation for shifts
2020-05-06 19:14:23 +02:00
chriseth
76275cf34a
Merge pull request #8824 from ethereum/solYulDirtyMemory
...
Fix accessing memory reference types in yul codegen and clean up on memory reads.
2020-05-06 16:17:19 +02:00
Daniel Kirchner
234ffcf278
Merge pull request #8718 from ethereum/irConstants
...
IR generation for constants.
2020-05-06 16:05:17 +02:00
Daniel Kirchner
c25a3eba14
Fix accessing memory reference types in yul codegen and clean up on memory reads.
2020-05-06 11:34:11 +02:00
chriseth
02c20698c9
IR generation for constants.
2020-05-05 17:07:55 +02:00
Daniel Kirchner
4d739b16a4
Cleanup function for internal function pointers.
2020-05-05 13:07:10 +02:00
Daniel Kirchner
7ad319687d
Sol->Yul: Add cleanup to operations.
2020-05-05 13:06:01 +02:00
Djordje Mijovic
e8f6f63e77
[Sol2Yul] Adding support for builtin revert(string)
2020-05-05 07:05:39 +02:00
Djordje Mijovic
cf607aa887
[Sol->Yul] Checking if there is base contract when calling base constructror via modifier invocation.
2020-05-04 20:38:22 +02:00
chriseth
1aef9c7d20
Merge pull request #8777 from ethereum/sol_yul_simplefunctions
...
[Sol - Yul] Add some built-in functions.
2020-05-04 16:07:10 +02:00
chriseth
51ccb1519f
Yul codegen for immutables.
2020-05-04 15:00:50 +02:00
Alexander Arlt
a9f4d14010
[Sol - Yul] Add support for send(..) & transfer(..)
2020-05-01 08:32:51 -05:00
Alexander Arlt
151e637336
[Sol - Yul] Add some built-in functions.
...
- simplifications for GasLeft, Selfdestruct and BlockHash.
- add support for addmod & mulmod.
2020-04-30 14:10:09 -05:00
Jason Cobb
8973732b74
Compare categories instead of types in ContractCompiler(740)
2020-04-28 13:13:45 -04:00
Djordje Mijovic
f3f729549d
[Sol->Yul] Enabling creation function call
2020-04-27 16:15:57 +02:00
Alex Beregszaszi
99aa821410
Merge pull request #8720 from ethereum/irSha256
...
IR generation for sha256.
2020-04-27 13:44:26 +01:00
Alex Beregszaszi
aa0a69b47f
IRGenerator: include assertion for FunctionType::Kind::Declaration
2020-04-27 12:03:44 +01:00
chriseth
dda883b585
IR generation for sha256.
2020-04-27 11:10:20 +02:00
chriseth
61b1369fc2
Merge pull request #8701 from ethereum/solc-yul-chromosome
...
solc option for selecting yul optimisations
2020-04-27 10:44:14 +02:00
Alexander Arlt
66edaf43f4
[Sol - Yul] Add support for built-in logN().
2020-04-25 11:10:28 -05:00
Alexander Arlt
2fa26f4e92
[Sol - Yul] Add support for built-in selfdestruct(..).
2020-04-24 17:03:41 -05:00
Kamil Śliwak
c41a832f65
Move the default optimisation steps from OptimiserSuite to OptimiserSettings
...
- Now it's a mandatory parameter in OptimiserSuite::run()
2020-04-24 17:30:56 +02:00
Kamil Śliwak
d3da878200
Enable internal library calls
2020-04-24 15:00:51 +02:00
Kamil Śliwak
64bce597a1
IRGenerator: Enable code generation for libraries
2020-04-24 15:00:17 +02:00
Kamil Śliwak
56a85d6cb3
IRGeneratorForStatements: Handle internal calls to functions from specific base contracts as static calls rather than calls via pointers
2020-04-24 15:00:16 +02:00
Kamil Śliwak
397ea18b78
IRVariable: Fix improperly wrapped docstring
2020-04-24 15:00:16 +02:00
chriseth
2b39f3b988
Merge pull request #8766 from ethereum/sol_yul_gasleft
...
[Sol - Yul] Add support for built-in gasleft().
2020-04-24 14:24:01 +02:00
Alexander Arlt
aafa4583df
[Sol - Yul] Add support for built-in gasleft().
2020-04-23 17:14:03 -05:00
Kamil Śliwak
e65a5a562e
IRGenerationContext::internalDispatch(): Fix code generated when the function called via pointer does not return anything
2020-04-23 21:16:41 +02:00
chriseth
16ed53ddd0
Merge pull request #8591 from mijovic/sol2YulConstructorParams
...
[Sol2Yul] Adding support for constructors with parameters (inheritance)
2020-04-23 12:56:54 +02:00
chriseth
edef6a0edd
Merge pull request #8757 from ethereum/removeMove
...
Remove unnecessary move.
2020-04-23 12:28:33 +02:00
chriseth
a371910674
Merge pull request #8642 from ethereum/interfaceid
...
Add support for interfaceId.
2020-04-23 12:24:49 +02:00
chriseth
b864fe1c43
Remove unnecessary move.
2020-04-23 12:13:26 +02:00
Djordje Mijovic
5329da93fb
[Sol2Yul] Adding support for constructors with parameters in case of inheritance
2020-04-22 14:47:08 +02:00
chriseth
4908101ad7
Yul IR generation for member access to type types.
2020-04-22 11:25:27 +02:00
chriseth
1d8e742296
Merge pull request #8684 from ethereum/yulForSelector
...
Yul codegen for `.selector`.
2020-04-20 16:32:11 +02:00
chriseth
55483445e9
Merge pull request #8663 from ethereum/ir-function-generation-queue
...
[Sol->Yul] IR function generation queue (refactor)
2020-04-20 15:17:53 +02:00
hrkrshnn
4760b8589d
Replaced all instances of lValueRequested to willBeWrittenTo
2020-04-20 12:33:30 +05:30
Kamil Śliwak
c7947c1af6
Implement lazy function generation using function generation queue
2020-04-17 13:28:07 +02:00
Kamil Śliwak
1f28f79ae6
IRGenerator::generate(): Remove duplicate call to setMostDerivedContract()
...
- The same call happens in resetContext(_contract) called immediately before
2020-04-17 13:28:07 +02:00
Alexander Arlt
3754a86ab2
Add support for interfaceID.
2020-04-16 12:17:40 -05:00
chriseth
f271dfa2e2
Yul codegen for .selector
.
2020-04-16 13:42:58 +02:00
chriseth
06adbc2c59
Implement bit operations.
2020-04-16 00:33:45 +02:00
Daniel Kirchner
0c5c93f3c2
Fix tuple assignments for empty tuples in Yul IR.
2020-04-15 11:10:52 +02:00
Christian Parpart
d00d3c45b1
[Sol2Yul] Implements codegen part for try/catch statements.
2020-04-14 18:42:37 +02:00
a3d4
aba0b2957c
Fix tuple assignments with multi-slot components.
2020-04-07 18:39:25 +02:00
chriseth
823a119117
Merge pull request #8570 from aarlt/clang-tidy-apply-modernize-use-emplace
...
clang-tidy: Apply modernize-use-emplace.
2020-04-07 17:28:50 +02:00
chriseth
398c515982
Merge pull request #8618 from mijovic/nextConstructorRefactor
...
Refactoring nextConstructor by moving it from CompilerContext to ContractDefinition
2020-04-06 19:31:12 +02:00
Djordje Mijovic
8cc16eb128
Refactoring nextConstructor by moving it from CompilerContext to ContractDefinition
2020-04-06 17:35:08 +02:00
Daniel Kirchner
81652686be
Debug information for immutable references.
2020-04-06 10:56:42 +02:00
Alexander Arlt
90bb1d8a7c
Apply modernize-use-emplace.
2020-04-02 17:35:48 -05:00
chriseth
d7a39c86ce
Accessors for immutable variables.
2020-04-02 19:09:54 +02:00
Leonardo Alt
39ff0deb05
Zero initialize memory arrays
2020-04-02 15:55:18 +02:00
Daniel Kirchner
77ea896b68
Properly handle assignments of immutables at declaration.
2020-04-02 08:35:22 +02:00
Daniel Kirchner
fe9f8d520c
Restrict size for dynamic memory array creation.
2020-04-01 17:25:09 +02:00
chriseth
2853cba3e5
Fix call to internalDispatch.
2020-04-01 12:13:32 +02:00
Djordje Mijovic
89d5ecdd24
[Sol2Yul] Adding support for constructor with parameters
2020-03-27 01:19:11 +01:00
chriseth
173f234860
Refactor: Replace inheritance hierarchy by most derived contract.
2020-03-26 18:27:39 +01:00
Daniel Kirchner
04d8ad2ae1
Legacy codegeneration for immutable state variables.
2020-03-24 16:45:25 +01:00
Leonardo Alt
0fcb1427c9
Fix Yul codegen when dynamic array is used as rhs of assignment
2020-03-20 17:52:51 +01:00
Djordje Mijovic
96d278b101
[Sol->Yul] Adding slicing for call data arrays
2020-03-13 13:40:38 +01:00
chriseth
fa148f2483
Parsing of immutable state variable.
2020-03-12 17:11:24 +01:00
a3d4
a86c511713
Replaced "assert" with "if" (incorrect contract code is not supposed to trigger asserts).
2020-03-12 14:03:27 +01:00
chriseth
6a896f766a
Function call options for YulIR.
2020-03-10 22:38:11 +01:00
Christian Parpart
bb29a7e497
Merge pull request #8460 from ethereum/yulutil-convert-array
...
YulUtilFunctions: convertionFunction() to also handle array string/memory casts
2020-03-10 14:00:34 +01:00
Christian Parpart
5d7a370248
YulUtilFunctions: convertionFunction() to also handle array string/memory casts.
2020-03-10 11:21:12 +01:00
chriseth
b7c001eb7f
Merge pull request #8416 from ethereum/reuseYulCalldataTailAccess
...
Fix yul calldata tail access functions and reuse them for old codegen.
2020-03-09 15:10:48 +01:00
Christian Parpart
105d89bea8
Compilation fix.
2020-03-09 11:42:34 +01:00
Christian Parpart
988bd6780b
Merge pull request #8414 from ethereum/sol2yul-func-type-conversion
...
[Sol2Yul] Implements function-to-function cast.
2020-03-09 11:31:44 +01:00
Christian Parpart
d33376cce6
Merge pull request #8409 from ethereum/multiUseYulFunctionNoSharedPtr
...
Use plain members and references instead of shared pointers for MultiUseYulFunctionCollector
2020-03-09 11:18:40 +01:00
Christian Parpart
e210026e74
[Sol2Yul] Implements function-to-function cast.
2020-03-09 10:40:57 +01:00
Christian Parpart
c8cbb98002
[Sol2Yul] Fixes appendExternalFunctionCall for argumentStrings.size() == 0.
2020-03-09 10:30:07 +01:00
Djordje Mijovic
092827b7ad
Adding sol->yul for f.selector and f.address
2020-03-06 21:43:14 +01:00
Daniel Kirchner
9318dae42c
Merge pull request #8420 from mijovic/iceStackTooDeepFix
...
Throwing stack too deep ICE in case of calling encode with too many a…
2020-03-04 17:41:59 +01:00
Djordje Mijovic
38b219d140
Throwing stack too deep ICE in case of calling encode with too many arguments instead of invalid opcode
2020-03-04 16:29:07 +01:00
Daniel Kirchner
857ed12b05
Use plain members and references instead of shared pointers for MultiUseYulFunctionCollector
2020-03-04 16:16:34 +01:00
Daniel Kirchner
919888ddbc
Use yul function for calldata tail access, fix checks and add additional revert reason.
2020-03-04 14:39:36 +01:00
Daniel Kirchner
561e5d9b27
Rename variables and review suggestion.
2020-03-03 15:12:00 +01:00
Daniel Kirchner
24d6e6295e
Reuse the mechanism for abi functions and move tracking of used functions to CompilerContext
2020-03-03 15:11:18 +01:00
Daniel Kirchner
90fa56c719
Allow use of yul util functions in legacy code generation.
2020-03-02 16:32:30 +01:00
chriseth
45041e5d3a
Allow access to `_slot
` for local storage pointer variables.
2020-02-25 14:28:04 +01:00
chriseth
663a9f892f
Merge pull request #8333 from ethereum/fix-8332
...
Use explicit variant constructor in direct list initializer
2020-02-18 14:46:31 +01:00
chriseth
64f9dc351e
Merge pull request #8337 from mijovic/assembly-multifile
...
Assembly: Added missing source field to legacy assembly json output
2020-02-18 12:47:19 +01:00
Djordje Mijovic
18dea6b69c
Assembly: Added missing source field to legacy assembly json output to complete the source reference
2020-02-18 10:22:34 +01:00
Bhargava Shastry
786c63ec3c
Use explicit type for variant constructor that is part of direct list initializer
2020-02-18 10:42:08 +05:30
Jason Cobb
6db0d50094
Don't use identifiers starting with an underscore followed by an uppercase letter
2020-02-17 12:44:39 -05:00
chriseth
99f88742d6
Merge pull request #8263 from ethereum/functionSelectorPure
...
Mark function selectors accessed via declaration as pure.
2020-02-14 12:34:39 +01:00
Daniel Kirchner
9f094d59b9
Mark function selector accesses as pure for pure expressions and mark function accesses via contract name as pure.
2020-02-14 12:33:33 +01:00
Christian Parpart
c92fe69a60
Finishes external call implementation.
2020-02-14 11:59:04 +01:00
Leonardo Alt
3800391a1a
[Yul] Support conditionals
2020-02-13 17:02:15 -04:00
Daniel Kirchner
df0873d138
Implement calldata arrays for Yul IR
2020-02-12 14:00:29 +01:00
Daniel Kirchner
3c9f18b749
Use IRVariable's in IR code generation and implement tuples.
2020-02-12 12:36:14 +01:00
Mathias Baumann
80bd0f47cc
Unify optimize yul code in CompilerContext/ContractCompiler
2020-02-11 13:55:47 +01:00
Mathias Baumann
1a3998648c
Run yul optimizer on user code without refs
2020-02-11 13:55:47 +01:00
Leonardo Alt
36928c7a35
Add reason string for internal reverts
2020-02-10 11:57:20 -03:00
Daniel Kirchner
af9fc8b634
Mapping getters for Yul IR.
2020-02-04 17:22:03 +01:00
chriseth
ada0cef150
Merge pull request #8068 from ethereum/evmTypedDialect
...
[Yul] EVM typed dialect
2020-01-30 14:53:25 +01:00
cameel
642653ea04
Make yul::Parser::parse() return unique_ptr rather than shared_ptr
...
- unique_ptr is more flexible and generally recommended for factory methods. It gets automatically converted to shared_ptr if necessary. Returning shared_ptr, on the other hand, forces the caller to use shared_ptr because a conversion to unique_ptr is not possible.
2020-01-29 20:07:08 +01:00
chriseth
fbe5bb0cce
Parse default dialect and omit when printing.
2020-01-29 17:25:25 +01:00
chriseth
35820398c2
Merge pull request #8179 from pinkiebell/codegen
...
libsolidity/codegen: Use calldatacopy to cheaply zero memory..
2020-01-28 18:07:30 +01:00
chriseth
6ded158739
Change expression parts to use strings instead of numbers.
2020-01-27 08:55:11 +01:00
Mathias Baumann
a3f23d3158
Implement new with CREATE2 and function call options.
2020-01-23 21:20:01 +01:00
pinkiebell
bb6fb675e0
libsolidity/codegen: Use calldatacopy to cheaply zero memory instead of
...
codecopy.
Motiviation:
Zero'ing memory is commonplace in contracts, but with the upcoming
Layer-2 EVM translation layers and other on-chain verification
mechanisms, using `codecopy` becomes a `costly` operation in those
sandboxes. Using `calldatacopy` achieves the same thing, gas costs
are also the same as codecopy, and is significantly cheaper in the `sandbox` situation.
2020-01-22 17:56:56 +01:00
Daniel Kirchner
ee5ff4df4e
Clean up visibility via contract name and fix ICE on calling unimplemented base function.
2020-01-16 19:13:04 +01:00
Alex Beregszaszi
1d7f25e809
Remove unnecessary statement
2020-01-15 14:33:27 +00:00
chriseth
123ea0a250
Remove asm flavour.
2020-01-14 17:16:09 +01:00
Daniel Kirchner
9535c0f520
Introduce FunctionKind::Declaration and allow accessing function signatures via contract name.
2020-01-09 15:40:41 +01:00
Christian Parpart
345f9928ab
Library libdevcore renamed to libsolutil.
2020-01-07 15:51:50 +01:00
Christian Parpart
6b23412fae
C++ namespace cleanup (except tests).
2020-01-07 15:51:50 +01:00
chriseth
e061f1e743
Merge remote-tracking branch 'origin/develop' into HEAD
2019-12-05 16:44:26 +01:00
Gaith Hallak
4d90180e24
Support referencing other constants in inline assembly
2019-12-05 13:27:17 +03:00
Daniel Kirchner
025a696bb0
Fix unrelated test failure.
2019-11-28 20:01:36 +01:00
Daniel Kirchner
7d1b0c6023
Fix Yul IR push
2019-11-28 18:11:38 +01:00
chriseth
1ebcc757e1
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-27 19:14:08 +01:00
chriseth
0bb88dabb7
Restrict usage of plain "new".
2019-11-27 17:55:11 +01:00
chriseth
b0db64ff5b
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-26 16:19:35 +01:00
Leonardo Alt
ce83bfb088
[Yul] Format string literals back to quoted string literals
2019-11-26 15:28:39 +01:00
chriseth
a00f824479
Merge pull request #7773 from ethereum/develop
...
Merge develop into develop_060
2019-11-21 21:49:22 +01:00
chriseth
a26dd5a428
Remove trailing spaces in output.
2019-11-21 20:09:03 +01:00
chriseth
d5e9271592
Merge pull request #7350 from ethereum/array-length-rvalue
...
Make `length` member read-only
2019-11-21 19:22:42 +01:00
Leonardo Alt
389da5228e
Merge remote-tracking branch 'origin/develop' into merge_develop_060
2019-11-20 12:27:40 +01:00
Daniel Kirchner
372df6b9e1
Implement array push and pop for yul and replace assignments in via yul tests.
2019-11-20 12:04:42 +01:00
chriseth
32f321e416
Merge pull request #7751 from ethereum/replace_boost_variant_std
...
Replace boost::variant by std::variant in libyul
2019-11-19 19:40:39 +01:00
Leonardo Alt
be849b3c47
Replace boost::variant by std::variant in libyul
2019-11-19 17:23:18 +01:00
Mathias Baumann
23cad71c88
Disallow conversion from `super
`
2019-11-19 17:14:11 +01:00
Erik Kundt
ecaed1030f
Makes array length access read-only.
2019-11-19 16:09:21 +01:00
chriseth
216e1749f4
Merge remote-tracking branch 'origin/develop' into develop_060
2019-11-14 13:42:46 +01:00
Daniel Kirchner
ce7268272d
Allow obtaining the address of a library by conversion to `address
`.
2019-11-12 17:09:13 +01:00
chriseth
138ee647f1
Provide different options for reason strings.
2019-11-07 14:13:53 +01:00
chriseth
cb2096c82a
Add modifier depth to source mappings.
2019-11-05 16:50:38 +01:00
Daniel Kirchner
3321fc56ea
Split fallback function and introduce "fallback()" and "receive()" syntax.
2019-11-04 17:17:58 +01:00
chriseth
c30839888f
Use `leave
` in code generator.
2019-10-29 14:32:16 +01:00
chriseth
edf1e83fda
Merge remote-tracking branch 'origin/develop' into develop_060
2019-10-28 15:21:49 +01:00
Christian Parpart
df729b3084
Make use of C++17 std::optional<> instead of boost::optional<>.
2019-10-28 11:39:30 +01:00
Christian Parpart
3c1d12b16c
Assembly: Remove errorTypeForLoose property from AsmAnalyzer.
2019-10-25 15:01:26 +02:00
Christian Parpart
76c72ba89f
Fixes signedness (causes compilation failure on MSVC).
2019-10-23 16:32:41 +02:00
Christian Parpart
c6152b8059
Compile fix.
2019-10-23 13:08:17 +02:00
Mathias L. Baumann
7e01696030
Merge pull request #7554 from ethereum/develop
...
Merge develop into develop_060
2019-10-21 17:05:12 +02:00
chriseth
ebfe7391ff
Use selfbalance for `address(this).balance
`.
2019-10-16 14:25:56 +02:00
chriseth
b5d6d5fcf9
Create.
2019-09-23 17:22:56 +02:00
chriseth
70b796bd1a
Code generator for try/catch.
2019-09-23 17:22:56 +02:00
chriseth
9ecd51c54d
Refactor.
2019-09-18 14:06:03 +02:00
Leonardo Alt
43d6e00b14
Add push() for dynamic storage arrays
2019-09-17 13:47:33 +02:00
chriseth
5b3efee93b
Merge pull request #7442 from ethereum/develop
...
Merge develop into develop_060
2019-09-17 12:16:27 +02:00
Leonardo Alt
eab9f65610
Fix ICE when pop dyn storage array of mapping
2019-09-16 16:33:17 +02:00
Daniel Kirchner
4782c800ec
Initial introduction of array slices with partial implementation for dynamic calldata arrays.
2019-09-13 10:57:53 +02:00
chriseth
ea0a952a69
Merge pull request #7362 from ethereum/develop
...
Merge develop into develop_060
2019-09-05 16:50:44 +02:00
Daniel Kirchner
7148792b8a
Refactor ExpressionCompiler with acceptAndConvert.
2019-09-05 15:05:59 +02:00
Daniel Kirchner
42f30981db
Add unimplemented assertion to IR generation when accessing address member of external function types.
2019-08-19 14:56:04 +02:00
Daniel Kirchner
9f6fff2120
Replace casting of external functions to address by a member named "address".
2019-08-19 14:56:04 +02:00
chriseth
74f16ef186
Refactor IRLValue so that it does not require IRGenerationContext.
2019-08-08 17:27:35 +02:00
chriseth
9955c51769
Merge pull request #7077 from ethereum/sol-yul-delete-fixed-storage
...
[Sol->Yul] Implement delete for fixed-sized storage arrays
2019-08-08 16:47:16 +02:00
mingchuan
15631a7fbe
Split calldataEncodedSize into calldataEncodedSize, calldataEncodedTailSize and calldataHeadSize and fix all usages.
2019-08-08 15:52:21 +02:00
Mathias Baumann
e072885031
[Sol->Yul] Implement delete for fixed-sized storage arrays
2019-08-07 18:28:52 +02:00
chriseth
c8f04b88bf
Merge pull request #7176 from ethereum/decodeMemoryLocation
...
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode
2019-08-07 15:42:14 +02:00
Daniel Kirchner
efb34bdf22
Always copy dynamically-sized memory arrays during CompilerUtils::abiDecode.
2019-08-06 14:11:14 +02:00
Christian Parpart
235638b3fc
Implements constructor code for state variables.
2019-08-05 11:23:01 +02:00
Mathias Baumann
d9addbcf49
Fix error in g++7 with -O2 flag
2019-07-29 16:17:41 +02:00
chriseth
579bdaddb9
Merge pull request #7088 from ethereum/diffLegYul
...
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:59:01 +02:00
chriseth
76d7ea888b
Document differences between legacy Solidity and Solidity via Yul.
2019-07-11 17:48:06 +02:00
chriseth
869d69d293
Supply full object to stack compressor and Optimizer Suite.
2019-07-10 18:49:42 +02:00
Mathias Baumann
d264e3e0ba
[Sol->Yul] Implement getter functions
2019-07-10 13:42:39 +02:00
Mathias Baumann
37f04976a2
[Sol->Yul] Implement keccak256
2019-07-09 18:25:07 +02:00
chriseth
15eb8fec50
Merge pull request #7015 from ethereum/sol-yul-arrays
...
[Sol->Yul] Implement uint256[] memory arrays
2019-07-09 17:34:46 +02:00
Mathias Baumann
0f24fcea17
[Sol->Yul] Implement uint256[] memory arrays
2019-07-09 15:36:02 +02:00
djudjuu
cafa01cbf6
moved SuffixHelper to StringUtils
2019-07-09 13:50:07 +02:00
Mathias Baumann
3e51d14c6d
Fix missing int -> string conversion
2019-07-04 09:31:24 +02:00
chriseth
cdd137e3d1
Support constant numbers in inline assembly.
2019-07-02 14:01:05 +02:00
chriseth
fe9aa59b8f
Fix conversion during storing.
2019-06-25 13:00:02 +02:00
Mathias Baumann
0e812b16c2
Minor indent fix
2019-06-24 14:51:04 +02:00
chriseth
9c129a4087
Merge pull request #6984 from ethereum/yul-reindent
...
yul: adds reindent() function to reindent yul source code and makes us of it in IRGenerator
2019-06-24 12:54:40 +02:00
Christian Parpart
0fd1db533e
yul: adds reindent() function to reindent yul source code and makes use of it in IRGenerator.
...
This function does count curly and round braces and reindents
accordingly the beginning of each line.
It does consider line-comments (// and ///) but not multiline comments (/* ... */).
2019-06-24 12:53:50 +02:00
chriseth
350631ae0d
Merge pull request #6940 from ethereum/sol-yul-storage-array-index
...
[Sol->Yul] Implement index access for storage arrays
2019-06-24 12:49:19 +02:00
Mathias Baumann
1dd63f416e
[Sol->Yul] Implement index access for storage arrays
2019-06-20 16:14:51 +02:00
Mathias Baumann
346c512cd7
[Sol->Yul] Implement _slot/_offset suffix for storage variables
2019-06-20 14:50:52 +02:00
chriseth
9bb7160c4c
Merge pull request #6958 from sifmelcara/fix-abiencoderv2-codegen
...
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-20 13:08:42 +02:00
Daniel Kirchner
fcd3410f26
Implement checked mod for sol->yul code generation.
2019-06-20 12:30:32 +02:00
Daniel Kirchner
a5b9f634ef
Implement signed multiplication for sol->yul code generation.
2019-06-20 12:30:30 +02:00
Daniel Kirchner
e4c884ae13
Unify style of checked integer division for sol->yul code generation.
2019-06-20 12:18:18 +02:00
Daniel Kirchner
5f6af8b374
Implement signed subtraction for sol->yul code generation.
2019-06-20 12:16:56 +02:00
Daniel Kirchner
88988af561
Implement signed addition for sol->yul code generation.
2019-06-20 11:42:50 +02:00
Mathias Baumann
b03cb2bce6
YulUtilFuncs: Add missing/adjust existing documentation
2019-06-19 18:09:23 +02:00
Mathias Baumann
910cb8d329
[Sol->Yul] Implement .length for storage arrays
2019-06-19 18:09:23 +02:00
Mathias Baumann
c5b50039d2
[Sol->Yul] Report error after Ir code
...
this way less scrolling is required
2019-06-19 18:09:23 +02:00
mingchuan
ae273ff3bd
Move code that access calldata array element to separate function
2019-06-19 17:26:35 +08:00
mingchuan
492f945973
Coding style fix
2019-06-19 17:26:34 +08:00
chriseth
cc5045a56e
[Yul] Run optimizer on all dialects.
2019-06-19 10:01:16 +02:00
mingchuan
bfe074b2b1
Fix storage array abi encoding
...
Fix incorrect abi encoding of storage array of data type that occupy multiple storage slots
2019-06-19 10:46:05 +08:00
chriseth
6cb6fe35ef
Make Yul optimizer not fail for wasm.
2019-06-17 18:42:47 +02:00
Mathias Baumann
8ca27c2bb0
[Sol->Yul] Style fixes
...
addresses the points @chriseth mentioned in #6909
2019-06-17 15:26:40 +02:00
Mathias Baumann
6a0976ed5e
[Sol->Yul] Refactor shift functions to be consistent
2019-06-11 17:44:36 +02:00
Mathias Baumann
89c435a167
[Sol->Yul] Make IRStorageItem work with dynamic offsets
2019-06-11 17:44:36 +02:00
Daniel Kirchner
2dbdddc7e5
Fix argument count for require with message and string literals.
2019-06-06 13:17:08 +02:00
chriseth
c3cdae908d
Merge pull request #6767 from ethereum/constantOptimiserForYul
...
[Yul] Constant optimiser
2019-05-28 11:53:04 +02:00
chriseth
b95eebee1c
Merge pull request #6822 from ethereum/uninitializedLoadFromStorage
...
Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.
2019-05-28 11:48:56 +02:00
chriseth
1c16124a09
Constant optimiser for Yul.
2019-05-28 11:35:07 +02:00
chriseth
fbf189151d
[SolYul] Division.
2019-05-27 17:53:46 +02:00
chriseth
5b1a984882
Explicitly turn uninitialized internal function pointers into invalid function when loaded from storage.
2019-05-27 17:26:37 +02:00
chriseth
a600126703
Merge pull request #6833 from sifmelcara/fix-struct-array-mapping
...
Fix assignment of struct containing array of mappings
2019-05-27 11:14:28 +02:00
mingchuan
bf8af89bba
Fix assignment of struct containing array of mappings
2019-05-25 01:33:49 +08:00
chriseth
fb40063253
Compound assignment.
2019-05-23 21:32:30 +02:00
Mathias Baumann
981983089c
[Sol -> Yul] Implement delete for function pointers
2019-05-23 15:51:59 +02:00
Mathias Baumann
81702717b0
[Sol -> Yul] Enable function pointer comparison
2019-05-23 12:52:50 +02:00
chriseth
97fa21841d
Use different way to fall back to FunctionalInstruction for loose assembly.
2019-05-23 11:30:12 +02:00
chriseth
e324deabd6
Merge pull request #6740 from ethereum/unary-ops
...
[Sol -> Yul] Implement Int/Bool Unary: ++, --, ~, !
2019-05-20 18:06:01 +02:00
Daniel Kirchner
b6f4d4e9bc
[Sol - Yul] Implement checked multiplication.
2019-05-20 17:36:53 +02:00
Mathias Baumann
86000fdcce
[Sol -> Yul] Implement unary -
, +
2019-05-20 16:14:46 +02:00
Mathias Baumann
7dbcb80523
[Sol -> Yul] Implement Int/Bool Unary: ++, --, ~, !
2019-05-20 11:43:12 +02:00
chriseth
f2ae30f620
Fix handling of structs of dynamic size as constructor parameters.
2019-05-16 17:10:54 +02:00
Mathias Baumann
f5980f08cc
Remove m_code from IRValue
...
Only one place to append to m_code avoids confusion and bugs
2019-05-14 11:15:04 +02:00
chriseth
8c232e8196
Merge pull request #6690 from ethereum/useConditionalWhiskers
...
Use conditional whiskers
2019-05-13 10:23:30 +02:00
chriseth
a28b6224a4
Merge pull request #6714 from ethereum/finishERC20
...
Finish ERC20
2019-05-13 10:00:38 +02:00
chriseth
e047c8d4d9
Code generator for external function calls.
2019-05-09 18:55:12 +02:00
chriseth
63a072f122
[SolYul] Partially implement constructor.
2019-05-09 17:57:33 +02:00
chriseth
021b312264
Revert with reason.
2019-05-09 17:57:33 +02:00
chriseth
60a42f58a0
Fix internal function calls.
2019-05-09 17:57:33 +02:00
chriseth
45ee3fc007
Subtraction for unsigned integers.
2019-05-09 17:57:30 +02:00
chriseth
b3e51bcae1
Some more compression.
2019-05-09 15:25:21 +02:00
chriseth
d3d205b6eb
Some more compression.
2019-05-09 15:25:21 +02:00
chriseth
c6b9fa96ae
Use conditional Whiskers.
2019-05-09 15:25:21 +02:00
Daniel Kirchner
b83f6d8d46
[Sol -> Yul] Implement if statements
2019-05-09 14:52:20 +02:00
Mathias Baumann
0abe00d393
[Sol -> Yul] Fix ForLoops and implement WhileLoops
2019-05-09 09:46:19 +02:00
chriseth
595544645e
Mappings.
2019-05-08 15:54:52 +02:00
chriseth
b4d6f847b4
Events.
2019-05-08 13:29:11 +02:00
chriseth
acca390ef5
Most trivial members.
2019-05-07 17:19:45 +02:00
chriseth
b99ad2aaa3
Merge pull request #6639 from ethereum/yul-require-assert
...
Yul generation of "require" and "assert"
2019-05-07 16:59:37 +02:00
chriseth
f68c09272b
Simple tuple expressions.
2019-05-07 15:59:56 +02:00
chriseth
c604481cef
Logical operators.
2019-05-07 15:59:35 +02:00
chriseth
785b369b89
Add type helper function.
2019-05-07 12:36:54 +02:00
chriseth
3fa4c3da1e
Comparison operations.
2019-05-07 12:35:05 +02:00
chriseth
4069b19734
Unary operation for literals.
2019-05-07 12:35:04 +02:00
Mathias Baumann
7f14352bbf
Yul generation of require
and assert
2019-05-07 12:19:41 +02:00
chriseth
e6f8aaafa5
Conversion for string literals.
2019-05-07 11:55:17 +02:00
chriseth
3365cb9b4a
Add type helper function.
2019-05-06 12:01:13 +02:00
chriseth
7c62193524
Change some AST elements to post visit.
2019-05-06 11:43:18 +02:00
chriseth
aa4d4afcdc
LValues and state variables of value type.
2019-05-02 17:03:22 +02:00
chriseth
31b7037749
Move storage access functions to utils.
2019-05-02 12:11:41 +02:00
chriseth
e66ab6c036
Helper function to define the value of expressions.
2019-04-30 13:10:37 +02:00
chriseth
0eef51ffa4
Conversion during binary operation.
2019-04-30 13:10:37 +02:00
chriseth
597d37b731
Implement for loops.
2019-04-30 13:10:37 +02:00
chriseth
c1ca16cd33
Implement return.
2019-04-30 13:10:36 +02:00
Erik Kundt
381ed5a302
Unifies behavior for member access of ABI functions.
2019-04-29 14:27:10 +02:00
Erik Kundt
c02257207b
Removes assert on magic ABI functions during codegen.
2019-04-26 15:01:35 +02:00
chriseth
309d3e65cf
Merge pull request #6585 from ethereum/fixInvalidFunctionTags
...
Fix invalid function tags
2019-04-25 16:30:37 +02:00
chriseth
5b991c1e59
Fix use of uninitialized functions stored in storage.
2019-04-25 15:40:48 +02:00
Mathias Baumann
1ef213cc15
Sol -> Yul: Implement explicit cast
2019-04-24 22:52:17 +02:00
Mathias Baumann
441369d5f1
Sol -> Yul Generator: Mark "return" as unimplemented
2019-04-24 22:52:17 +02:00
Mathias Baumann
944ac6fb6d
Sol -> Yul Generation: Implicit conversions
2019-04-24 22:52:17 +02:00
Mathias Baumann
3d061c83d7
IR: Generate inline asm blocks
2019-04-18 16:49:19 +02:00
Christian Parpart
721bf367a3
[libsolidity] TypeProvider: eliminate redundant "Type" suffix in provider function signatures.
2019-04-17 14:42:07 +02:00
Christian Parpart
58a45f2cb6
[libsolidity] TypeProvider: adds explicit uint256() accessor and removes default params in integerType(...).
2019-04-16 18:28:40 +02:00
Christian Parpart
bf43eebea9
libsolidity: Introducing TypeProvider API, for clear type system ownership.
2019-04-16 18:26:45 +02:00
Leonardo
dbc9442f9c
Merge pull request #6484 from sifmelcara/create-SourceReferenceFormatter-shortcut
...
Add a shortcut for formatting error information
2019-04-12 12:34:08 +02:00
chriseth
565d9837e4
Virtual function calls.
2019-04-11 15:45:43 +02:00
chriseth
18ab8aeb85
Overflow-checked addition.
2019-04-11 15:45:14 +02:00
mingchuan
f1374066af
Add shortcuts for formatting error information
2019-04-10 18:44:45 +08:00
Mathias Baumann
b4380a2137
Move convert functions to Yul module
2019-04-09 15:31:46 +02:00
chriseth
3df4936b6f
Merge pull request #6179 from ethereum/solidity-yul1
...
Solidity to Yul compiler
2019-04-04 16:33:39 +02:00
chriseth
420a7dc3d6
Initial IR generator.
2019-04-04 15:02:42 +02:00
Daniel Kirchner
91a2a9a9c3
Implement ABI encoding of calldata arrays and structs.
2019-04-04 13:05:32 +02:00
Daniel Kirchner
d82157d46a
Refactor abi encoding functions to prepare implementing calldata arrays and structs.
2019-04-04 11:18:03 +02:00
Daniel Kirchner
b0cb330397
Allow encoding calldata arrays for base types that do not require cleanup.
2019-04-04 11:18:03 +02:00
Alex Beregszaszi
43008dd08e
Validate value types in decoder of ABIEncoderV2.
2019-04-03 11:32:02 +02:00
Daniel Kirchner
ab8dfed144
Implement copying recursive structs from storage to memory.
2019-04-02 16:01:44 +02:00
chriseth
529aca5cbd
Merge pull request #6407 from ethereum/changeNamespace
...
Remove "using namespace" from header and move Instruction to dev::eth.
2019-03-28 14:32:07 +01:00
chriseth
2308904f68
Remove "using namespace" from header and move Instruction to dev::eth.
2019-03-28 13:48:11 +01:00
chriseth
a1fe2562c4
Move suffixedVariableNameList to utils.
2019-03-27 17:14:17 +01:00
chriseth
d079cdbfaa
Merge pull request #6362 from ethereum/fixABIEncoderV2StorageRead
...
Fix abi encoder v2 storage read
2019-03-26 10:23:08 +01:00
Alex Beregszaszi
d2185bf529
Remove obsolete identifer for the identity precompile
2019-03-25 20:57:59 +00:00
chriseth
6b69c31703
Fix ABIEncoderV2 array overwrite bug.
2019-03-25 18:28:43 +01:00
chriseth
68d4a85575
Properly read and clean value types read from storage.
2019-03-25 18:28:43 +01:00
Daniel Kirchner
66d6711364
ABIFunctions: Split out a function for generating a comma separated list of variable names.
2019-03-25 10:58:18 +01:00
chriseth
38cbf8d230
Pass "optimize stack allocation" flag down to the stack compressor.
2019-03-20 15:03:27 +01:00
chriseth
7c524f794f
Also output optimized yul code if requested.
2019-03-19 17:24:36 +01:00
chriseth
6d1ed93247
Use stack optimizations.
2019-03-14 15:34:23 +01:00
chriseth
2e7794d8a6
Defensively pad memory for `type(C).name
` to multiples of 32.
2019-03-13 18:51:32 +01:00
Daniel Kirchner
66fc7ffab2
Allow dynamically encoded calldata structs with ABIEncoderV2.
2019-03-11 16:40:13 +01:00
chriseth
4d8c57006b
Merge pull request #6195 from ethereum/extractYulUtils
...
[REF] Extract utility functions from ABI encoder.
2019-03-08 00:51:58 +01:00
Daniel Kirchner
f7c6eda2c3
Allow calldata arrays with dynamically encoded base type.
2019-03-06 18:04:12 +01:00
chriseth
d515d77bfe
Extract utility functions from ABI encoder.
2019-03-05 22:13:55 +01:00
chriseth
a27ef3489c
Allow encoding and decoding functions with empty type list.
2019-03-05 15:55:50 +01:00
Alex Beregszaszi
a96cc6e0e8
Add allocateMemory helper with value known at compile time
2019-03-04 17:46:42 +01:00
Alex Beregszaszi
bd51589f1a
Use "if" instead of "switch" in codegen for the deployment time address of a library
2019-03-04 15:16:58 +01:00
chriseth
2e0ea16a0f
Merge pull request #5959 from ethereum/optimiser2
...
Introduce global optimiser settings.
2019-03-04 12:54:59 +01:00
chriseth
6a32f6e1ac
Properly assign reference to context.
2019-03-04 12:00:47 +01:00
chriseth
851dd635eb
Remove defaults in constructor arguments.
2019-03-04 11:41:52 +01:00
chriseth
83d1382e78
Take yul optimizer setting into account.
2019-03-04 11:40:28 +01:00
chriseth
1ff562d28a
Provide full optimiser settings to ContractCompiler.
2019-03-04 11:40:28 +01:00
Alex Beregszaszi
cf5c13f9c7
Introduce global optimiser settings.
2019-03-04 11:40:28 +01:00
Mathias Baumann
e4a52aa2f6
Allow dynamic types in public mappings
2019-02-26 15:48:54 +01:00
Alex Beregszaszi
d2f493268b
Provide access to the name of contracts.
2019-02-26 14:07:03 +00:00
Alex Beregszaszi
358ccbe372
Properly issue unimplemented assertion on FixedPointType in type conversion
2019-02-25 21:21:33 +00:00
Leonardo Alt
2405b2151a
EVMVersion in langutil namespace instead of solidity
2019-02-25 15:29:57 +01:00
chriseth
7f5b335b47
Make EVM version part of EVM dialect.
2019-02-21 21:59:46 +01:00
Mathias Baumann
c65a96d189
Small documentation fixes in the code
2019-02-21 12:54:39 +01:00
chriseth
05541e5adb
Fixed internal error related to ecrecover and ABIEncoderV2.
2019-02-19 14:17:03 +01:00
chriseth
d5791fef41
Fix combination of delegatecall and ABIEncoderV2.
...
We can set the flag to false for bare delegatecall, because we always
send a memory string and never a storage reference.
2019-02-19 13:57:03 +01:00
chriseth
c690f679cb
Allow cleanup for mappings (do nothing).
2019-02-18 18:50:22 +01:00
Daniel Kirchner
0408130338
Merge pull request #6003 from ethereum/moreStyleChecks
...
Even more style checks.
2019-02-15 11:52:32 +01:00
Daniel Kirchner
809b9a95f9
Even more style checks.
2019-02-14 11:53:00 +01:00
Daniel Kirchner
8ca6715e18
More style checks.
2019-02-14 11:41:20 +01:00
Daniel Kirchner
32190dac48
Add stride helpers to ArrayType.
2019-02-14 10:51:39 +01:00
chriseth
1a823f0bf8
Fix tabs/spaces.
2019-02-13 17:05:48 +01:00
chriseth
17ea467e5b
Fix style of "const".
2019-02-13 16:34:53 +01:00
chriseth
02373c2225
Adjust uses of AsmCodeGen.
2019-02-13 11:35:49 +01:00
chriseth
1ff6f2c71c
Move AsmCodeGen.
2019-02-13 11:20:15 +01:00
Daniel Kirchner
0e4912a203
ABIEncoderV2: Implement calldata structs without dynamically encoded members.
2019-02-11 15:46:58 +01:00
chriseth
a8d0ef4bad
Allow indexed structs in events with encoder v2.
2019-02-11 11:37:47 +01:00
chriseth
a08f4f43fa
Add packed encoder V2.
2019-02-11 11:37:47 +01:00
chriseth
1b9d30f05f
Packed encoding.
2019-02-11 11:37:47 +01:00
chriseth
fc18258250
Remove type check that is covered by assertions.
2019-02-07 12:02:15 +01:00
chriseth
49f8fa4cfe
Extract storing length to its own function.
2019-02-06 14:03:49 +01:00
chriseth
77baf6caf7
Compilability checker.
2019-02-04 17:32:05 +01:00
chriseth
cd8cf7745b
Merge pull request #5888 from ethereum/betterStackErrorMessages
...
Better error message for out of stack in assembly.
2019-02-04 15:26:55 +01:00
chriseth
17a1e7aed5
Better error message for out of stack in assembly.
2019-01-30 12:24:10 +01:00
chriseth
35483422f3
Pad code to multiple of 32 bytes.
2019-01-30 11:31:28 +01:00
chriseth
64312584dc
Do not provide access to external assembly variables from within functions.
2019-01-28 14:42:38 +01:00
chriseth
628d665474
Merge pull request #5843 from ethereum/abi-typos
...
Do not ignore revertOnFailure flag when validating Address/Contract
2019-01-22 18:44:09 +01:00
Alex Beregszaszi
3f2898ea47
Do not ignore revertOnFailure flag when validating Address/Contract
2019-01-22 14:45:08 +00:00
chriseth
01e87cfc08
Refactor struct encoder.
2019-01-22 14:45:25 +01:00
chriseth
7a69455c13
Provide ABI encoding options as single struct parameter.
2019-01-21 16:43:32 +01:00
chriseth
29f6aa7d56
Do not create a copy of the assembly.
2019-01-17 20:36:48 +01:00
chriseth
e6fee257e6
Code generation for access to contract code.
2019-01-17 20:36:48 +01:00
chriseth
2fcfb216b5
Syntax for meta type information.
2019-01-17 20:36:48 +01:00
Christian Parpart
62fe57479e
make use of C++ = default
constructor declarations as well as more non-static member initialization syntax.
2018-12-19 11:26:42 +01:00
chriseth
d8218b7eef
Formatting.
2018-12-18 23:50:39 +01:00
Mathias Baumann
1b8570f829
Only generate sort/search code when interface functions exist
2018-12-17 21:24:37 +01:00
Leonardo Alt
ab76676271
Sort includes in libsolidity/codegen
2018-12-17 17:06:11 +01:00
Alex Beregszaszi
c863cbf80d
Add missing header guards
2018-12-12 15:47:05 +00:00
chriseth
fb3a0ac1c7
Codegen for object access.
2018-12-11 19:24:44 +01:00
chriseth
8d49e53995
Provide Dialect to EVMCodeTransform.
2018-12-11 19:24:31 +01:00
chriseth
b5deca0383
Merge pull request #4779 from ethereum/optimise-string-literals
...
Decide better in storing string literals as data
2018-12-11 17:50:14 +01:00
Mathias Baumann
2f6dc2e773
Replace push_back with emplace_back where it makes sense
2018-12-10 19:02:39 +01:00
chriseth
53f531ecb0
Set codecopy limit for data to 32 bytes.
2018-12-10 17:11:48 +01:00
liangdzou
362648a450
Reuse stack slots in Yul to EVM code generation.
2018-12-10 14:28:56 +01:00
chriseth
6a9e8a6fe3
Merge pull request #4936 from ethereum/binSelect
...
Binary search for dispatch.
2018-12-07 00:55:09 +01:00
chriseth
f6ed29b88b
Extend abstract assembly to be able to handle sub-objects.
2018-12-06 14:32:04 +01:00
chriseth
4721cf332f
Expose EthAssemblyAdapter.
2018-12-06 14:32:04 +01:00
Christian Parpart
073b03d90c
liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge
2018-12-06 14:01:01 +01:00
chriseth
7f39c3e522
Binary search for dispatch.
2018-12-06 13:07:14 +01:00
chriseth
7ee1ddc172
Switch namespaces.
2018-12-04 15:36:03 +01:00
chriseth
0b1125281a
Remove some includes.
2018-12-04 15:31:00 +01:00
chriseth
3ebb78a886
Adjust include paths.
2018-12-04 15:20:29 +01:00
chriseth
0ec7a0e72c
Move AsmCodeGen.
2018-12-04 15:20:23 +01:00
chriseth
99db4e3ff4
Introduce the concept of builtin functions.
2018-12-04 12:06:33 +01:00
chriseth
aaeb74f592
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
...
[1/3] SourceLocation related refactoring.
2018-11-30 23:45:31 +01:00