Skip to content

Commit c768ec7

Browse files
author
Dimitry Kh
committed
support native yul args
:yul berlin optimise object "C"
1 parent 1311dd4 commit c768ec7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

retesteth/compiler/Compiler.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,19 @@ bool tryCustomCompiler(string const& _code, string& _compiledCode)
8080
{
8181
size_t codeStartPos = pos + compilerPrefix.length() + 1;
8282
string arg;
83+
string nativeArg;
8384
if (afterPrefix == ' ')
8485
{
8586
auto const argArr = parseArgsFromStringIntoArray(_code, codeStartPos);
8687
for (auto const& el : argArr)
87-
arg += el + " ";
88+
{
89+
if (el == "object" || el == "\"C\"")
90+
nativeArg += el + " "; // Special case for native yul args
91+
else
92+
arg += el + " ";
93+
}
8894
}
89-
string const customCode = _code.substr(codeStartPos);
95+
string const customCode = nativeArg + _code.substr(codeStartPos);
9096
fs::path path(fs::temp_directory_path() / fs::unique_path());
9197
string cmd = compilerScript.string() + " " + path.string() + " " + arg;
9298
writeFile(path.string(), customCode);

0 commit comments

Comments
 (0)