From 3f9f725737dd04485211fedc8533fdac983f2b04 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Fri, 18 Nov 2016 17:13:20 -0600 Subject: Fix licensing headers Signed-off-by: VoR0220 --- libsolidity/codegen/ContractCompiler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libsolidity/codegen/ContractCompiler.cpp') diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 8d60d6b3..437c484a 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -1,18 +1,18 @@ /* - This file is part of cpp-ethereum. + This file is part of solidity. - cpp-ethereum is free software: you can redistribute it and/or modify + solidity is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - cpp-ethereum is distributed in the hope that it will be useful, + solidity is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see . + along with solidity. If not, see . */ /** * @author Christian -- cgit v1.2.3 From e29047b24d149e6b27962f9fe89e8275e213c11d Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Thu, 1 Dec 2016 11:58:34 +0100 Subject: codegen: assertion did not assert non-nullness This commit strengthens an assertion so that it makes sure that a pointer is not null. Moreover, `isLocalVariable(variable)` is now positively asserted, following the error message. --- libsolidity/codegen/ContractCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/codegen/ContractCompiler.cpp') diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 437c484a..124546de 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -583,7 +583,7 @@ bool ContractCompiler::visit(InlineAssembly const& _inlineAssembly) // lvalue context auto variable = dynamic_cast(decl); solAssert( - !!variable || !m_context.isLocalVariable(variable), + !!variable && m_context.isLocalVariable(variable), "Can only assign to stack variables in inline assembly." ); unsigned size = variable->type()->sizeOnStack(); -- cgit v1.2.3 From 1e791f30aa6283ff16a6850fbbc8774ee60447d1 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Thu, 1 Dec 2016 12:03:25 +0100 Subject: codegen: this commit removes one of duplicate assignments --- libsolidity/codegen/ContractCompiler.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'libsolidity/codegen/ContractCompiler.cpp') diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 437c484a..93083e25 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -862,8 +862,6 @@ void ContractCompiler::appendModifierOrFunctionCode() CompilerUtils::sizeOnStack(modifier.parameters()) + CompilerUtils::sizeOnStack(modifier.localVariables()); codeBlock = &modifier.body(); - - codeBlock = &modifier.body(); } } -- cgit v1.2.3