From 124190336b0a70ea32d5f8ca0c4b364f1fc774d0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 13 Dec 2017 14:40:54 +0100 Subject: Split inline assembly into loose and strict flavours. --- libsolidity/codegen/CompilerContext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity/codegen/CompilerContext.h') diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 7743fd3f..0e8b639c 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -187,8 +187,8 @@ public: CompilerContext& operator<<(u256 const& _value) { m_asm->append(_value); return *this; } CompilerContext& operator<<(bytes const& _data) { m_asm->append(_data); return *this; } - /// Appends inline assembly. @a _replacements are string-matching replacements that are performed - /// prior to parsing the inline assembly. + /// Appends inline assembly (strict mode). + /// @a _replacements are string-matching replacements that are performed prior to parsing the inline assembly. /// @param _localVariables assigns stack positions to variables with the last one being the stack top /// @param _system if true, this is a "system-level" assembly where all functions use named labels. void appendInlineAssembly( -- cgit v1.2.3 From 6807010dc7864500d89a833e4f6e7f338e58b948 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 14 Nov 2017 12:58:04 +0100 Subject: Prevent libraries from being called. --- libsolidity/codegen/CompilerContext.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libsolidity/codegen/CompilerContext.h') diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 0e8b639c..a155a3a5 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -174,6 +174,9 @@ public: eth::AssemblyItem appendData(bytes const& _data) { return m_asm->append(_data); } /// Appends the address (virtual, will be filled in by linker) of a library. void appendLibraryAddress(std::string const& _identifier) { m_asm->appendLibraryAddress(_identifier); } + /// Appends a zero-address that can be replaced by something else at deploy time (if the + /// position in bytecode is known). + void appendDeployTimeAddress() { m_asm->append(eth::PushDeployTimeAddress); } /// Resets the stack of visited nodes with a new stack having only @c _node void resetVisitedNodes(ASTNode const* _node); /// Pops the stack of visited nodes -- cgit v1.2.3