From 43bb915454e210ed7c201eb58b33c7ffe8dfbdb1 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 1 Dec 2017 14:10:49 +0100 Subject: Rename arguments to paramaters and returns to returnVariables. --- libsolidity/inlineasm/AsmData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/inlineasm/AsmData.h') diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h index a792a1b8..e1753af4 100644 --- a/libsolidity/inlineasm/AsmData.h +++ b/libsolidity/inlineasm/AsmData.h @@ -67,7 +67,7 @@ struct VariableDeclaration { SourceLocation location; TypedNameList variables; s /// Block that creates a scope (frees declared stack variables) struct Block { SourceLocation location; std::vector statements; }; /// Function definition ("function f(a, b) -> (d, e) { ... }") -struct FunctionDefinition { SourceLocation location; std::string name; TypedNameList arguments; TypedNameList returns; Block body; }; +struct FunctionDefinition { SourceLocation location; std::string name; TypedNameList parameters; TypedNameList returnVariables; Block body; }; /// Conditional execution without "else" part. struct If { SourceLocation location; std::shared_ptr condition; Block body; }; /// Switch case or default case -- cgit v1.2.3 From 745eefa36f9bc04c91cb28e81bd16f8d01a11c7c Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 5 Dec 2017 13:44:20 +0000 Subject: Split Instruction and FunctionalInstruction in Julia --- libsolidity/inlineasm/AsmData.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/inlineasm/AsmData.h') diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h index e1753af4..11e56fae 100644 --- a/libsolidity/inlineasm/AsmData.h +++ b/libsolidity/inlineasm/AsmData.h @@ -60,7 +60,7 @@ struct StackAssignment { SourceLocation location; Identifier variableName; }; /// the same amount of items as the number of variables. struct Assignment { SourceLocation location; std::vector variableNames; std::shared_ptr value; }; /// Functional instruction, e.g. "mul(mload(20:u256), add(2:u256, x))" -struct FunctionalInstruction { SourceLocation location; Instruction instruction; std::vector arguments; }; +struct FunctionalInstruction { SourceLocation location; solidity::Instruction instruction; std::vector arguments; }; struct FunctionCall { SourceLocation location; Identifier functionName; std::vector arguments; }; /// Block-scope variable declaration ("let x:u256 := mload(20:u256)"), non-hoisted struct VariableDeclaration { SourceLocation location; TypedNameList variables; std::shared_ptr value; }; -- cgit v1.2.3 From 54b6739962ef45319777ce2aebafdf4b91412d84 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 8 Dec 2017 14:01:22 +0100 Subject: Separate expression and statement. --- libsolidity/inlineasm/AsmData.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libsolidity/inlineasm/AsmData.h') diff --git a/libsolidity/inlineasm/AsmData.h b/libsolidity/inlineasm/AsmData.h index 11e56fae..2982d5e0 100644 --- a/libsolidity/inlineasm/AsmData.h +++ b/libsolidity/inlineasm/AsmData.h @@ -58,23 +58,25 @@ struct StackAssignment { SourceLocation location; Identifier variableName; }; /// Multiple assignment ("x, y := f()"), where the left hand side variables each occupy /// a single stack slot and expects a single expression on the right hand returning /// the same amount of items as the number of variables. -struct Assignment { SourceLocation location; std::vector variableNames; std::shared_ptr value; }; +struct Assignment { SourceLocation location; std::vector variableNames; std::shared_ptr value; }; /// Functional instruction, e.g. "mul(mload(20:u256), add(2:u256, x))" -struct FunctionalInstruction { SourceLocation location; solidity::Instruction instruction; std::vector arguments; }; -struct FunctionCall { SourceLocation location; Identifier functionName; std::vector arguments; }; +struct FunctionalInstruction { SourceLocation location; solidity::Instruction instruction; std::vector arguments; }; +struct FunctionCall { SourceLocation location; Identifier functionName; std::vector arguments; }; +/// Statement that contains only a single expression +struct ExpressionStatement { SourceLocation location; Expression expression; }; /// Block-scope variable declaration ("let x:u256 := mload(20:u256)"), non-hoisted -struct VariableDeclaration { SourceLocation location; TypedNameList variables; std::shared_ptr value; }; +struct VariableDeclaration { SourceLocation location; TypedNameList variables; std::shared_ptr value; }; /// Block that creates a scope (frees declared stack variables) struct Block { SourceLocation location; std::vector statements; }; /// Function definition ("function f(a, b) -> (d, e) { ... }") struct FunctionDefinition { SourceLocation location; std::string name; TypedNameList parameters; TypedNameList returnVariables; Block body; }; /// Conditional execution without "else" part. -struct If { SourceLocation location; std::shared_ptr condition; Block body; }; +struct If { SourceLocation location; std::shared_ptr condition; Block body; }; /// Switch case or default case struct Case { SourceLocation location; std::shared_ptr value; Block body; }; /// Switch statement -struct Switch { SourceLocation location; std::shared_ptr expression; std::vector cases; }; -struct ForLoop { SourceLocation location; Block pre; std::shared_ptr condition; Block post; Block body; }; +struct Switch { SourceLocation location; std::shared_ptr expression; std::vector cases; }; +struct ForLoop { SourceLocation location; Block pre; std::shared_ptr condition; Block post; Block body; }; struct LocationExtractor: boost::static_visitor { -- cgit v1.2.3