Skip to content

Warn about using loose assembly.#3527

Merged
axic merged 3 commits intodevelopfrom
warnLooseAsm
Mar 6, 2018
Merged

Warn about using loose assembly.#3527
axic merged 3 commits intodevelopfrom
warnLooseAsm

Conversation

@chriseth
Copy link
Contributor

@chriseth chriseth commented Feb 15, 2018

Fixes #1824 #1821 #1822 #1825

Depends on #3476

@chriseth
Copy link
Contributor Author

Ready for review.

@chriseth chriseth requested a review from axic February 15, 2018 16:27
@axic
Copy link
Contributor

axic commented Feb 21, 2018

The assembly part looks good. Need to finish reviewing the scoping changes in the other PR first.

@chriseth chriseth force-pushed the warnLooseAsm branch 2 times, most recently from 5eb500a to 574d140 Compare February 27, 2018 16:14
@chriseth
Copy link
Contributor Author

Rebased.

solAssert(m_flavour == AsmFlavour::Loose, "");
checkLooseFeature(
_label.location,
"The use of labels is deprecated. Please use if, switch, for or function calls instead."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should quote if, switch and for

@chriseth
Copy link
Contributor Author

@axic good to merge?

@chriseth chriseth force-pushed the warnLooseAsm branch 4 times, most recently from 9fbaaa3 to 6e1b172 Compare March 6, 2018 14:52
@axic
Copy link
Contributor

axic commented Mar 6, 2018

Fails on:

inline_assembly_050_bare_instructions - SolidityNameAndTypeResolution
inline_assembly_050_jump - SolidityNameAndTypeResolution
inline_assembly_050_labels - SolidityNameAndTypeResolution
inline_assembly_050_leave_items_on_stack - SolidityNameAndTypeResolution
inline_assembly_050_literals_on_stack - SolidityNameAndTypeResolution
inline_assembly_storage_variable_access_out_of_functions - SolidityNameAndTypeResolution

CHECK_ALLOW_MULTI(text, (std::vector<std::pair<Error::Type, std::string>>{
{Error::Type::SyntaxError, "The use of non-functional"},
{Error::Type::SyntaxError, "The use of non-functional"},
{Error::Type::Warning, "Experimental features are turned on"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails because of these.

@chriseth
Copy link
Contributor Author

chriseth commented Mar 6, 2018

Should work now. Will rebase.

@axic axic merged commit 250a6ba into develop Mar 6, 2018
@axic axic deleted the warnLooseAsm branch March 6, 2018 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants