Skip to content

[Yul] Codegen for objects access#5616

Merged
chriseth merged 2 commits intodevelopfrom
codegenForObjectsAccess
Dec 11, 2018
Merged

[Yul] Codegen for objects access#5616
chriseth merged 2 commits intodevelopfrom
codegenForObjectsAccess

Conversation

@chriseth
Copy link
Contributor

@chriseth chriseth commented Dec 10, 2018

Fixes #3334
Fixes #5510

This re-attaches the builtin function query function directly to the dialect and gets rid of the intermediate Builtins struct.

It also splits the Dialect into Dialect and EVMDialect. The latter returns a different BuiltinFuncitonForEVM (which derives from BuiltinFunction), which takes an AbstractAssembly for code generation.

After this change and relevant changes to the optimizer, we can turn all EVM instructions into builtin functions.

@ekpyron

This comment has been minimized.

@chriseth chriseth force-pushed the codegenForObjectsAccess branch from 7a50ff3 to 56f1c3d Compare December 10, 2018 16:07
@chriseth
Copy link
Contributor Author

Updated.

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #5616 into develop will increase coverage by <.01%.
The diff coverage is 92.99%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5616      +/-   ##
===========================================
+ Coverage    88.12%   88.13%   +<.01%     
===========================================
  Files          337      337              
  Lines        32386    32454      +68     
  Branches      3875     3884       +9     
===========================================
+ Hits         28539    28602      +63     
- Misses        2530     2539       +9     
+ Partials      1317     1313       -4
Flag Coverage Δ
#all 88.13% <92.99%> (ø) ⬆️
#syntax 28.57% <12.1%> (-0.06%) ⬇️

@chriseth chriseth force-pushed the codegenForObjectsAccess branch from 56f1c3d to 5fbef0c Compare December 10, 2018 16:50
@chriseth chriseth changed the title Codegen for objects access [Yul] Codegen for objects access Dec 10, 2018
Copy link
Collaborator

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

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

I think this is fine - only a minor comment.

BOOST_AUTO_TEST_CASE(builtins_analysis)
{
struct SimpleBuiltinsAnalysis: public Builtins
struct SimpleDialectAnalysis: public Dialect
Copy link
Collaborator

Choose a reason for hiding this comment

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

This struct itself doesn't analyze much, does it? Maybe it should just be called SimpleDialect, same as above?


addFunction("datasize", 1, 1, true, [this](
FunctionCall const& _call,
AbstractAssembly& _asm,
Copy link
Collaborator

@ekpyron ekpyron Dec 11, 2018

Choose a reason for hiding this comment

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

It seems like you need to rename _asm for the windows build, though.

@chriseth chriseth force-pushed the codegenForObjectsAccess branch from 5fbef0c to a7d0220 Compare December 11, 2018 17:22
@chriseth
Copy link
Contributor Author

Two renames plus a rebase.

ekpyron
ekpyron previously approved these changes Dec 11, 2018
ekpyron
ekpyron previously approved these changes Dec 11, 2018
@chriseth chriseth force-pushed the codegenForObjectsAccess branch from 1fc1c05 to fb3a0ac Compare December 11, 2018 18:24
@chriseth chriseth merged commit e74d9df into develop Dec 11, 2018
@ekpyron ekpyron deleted the codegenForObjectsAccess branch December 12, 2018 00:53
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

Comments