remove system mode and request memoization

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-10-11 15:18:47 +02:00
parent 705d1d7866
commit e131eebf50
20 changed files with 20 additions and 218 deletions
-22
View File
@@ -62,10 +62,6 @@ pub struct Arguments {
#[structopt(long = "fallback-Oz")]
pub fallback_to_optimizing_for_size: bool,
/// Disable the system request memoization.
#[structopt(long = "disable-system-request-memoization")]
pub disable_system_request_memoization: bool,
/// Disable the `solc` optimizer.
/// Use it if your project uses the `MSIZE` instruction, or in other cases.
/// Beware that it will prevent libraries from being inlined.
@@ -123,13 +119,6 @@ pub struct Arguments {
#[structopt(long = "force-evmla")]
pub force_evmla: bool,
/// Enable system contract compilation mode.
/// In this mode PolkaVM extensions are enabled. For example, calls to addresses `0xFFFF` and below
/// are substituted by special PolkaVM instructions.
/// In the Yul mode, the `verbatim_*` instruction family is available.
#[structopt(long = "system-mode")]
pub is_system_mode: bool,
/// Set metadata hash mode.
/// The only supported value is `none` that disables appending the metadata hash.
/// Is enabled by default.
@@ -267,12 +256,6 @@ impl Arguments {
if self.solc.is_some() {
anyhow::bail!("`solc` is not used in LLVM IR and PolkaVM assembly modes.");
}
if self.is_system_mode {
anyhow::bail!(
"System contract mode is not supported in LLVM IR and PolkaVM assembly modes."
);
}
}
if self.combined_json.is_some() {
@@ -319,11 +302,6 @@ impl Arguments {
"Falling back to -Oz must specified in standard JSON input settings."
);
}
if self.disable_system_request_memoization {
anyhow::bail!(
"Disabling the system request memoization must specified in standard JSON input settings."
);
}
if self.metadata_hash.is_some() {
anyhow::bail!("Metadata hash mode must specified in standard JSON input settings.");
}
-8
View File
@@ -101,9 +101,6 @@ fn main_inner() -> anyhow::Result<()> {
if arguments.fallback_to_optimizing_for_size {
optimizer_settings.enable_fallback_to_size();
}
if arguments.disable_system_request_memoization {
optimizer_settings.disable_system_request_memoization();
}
optimizer_settings.is_verify_each_enabled = arguments.llvm_verify_each;
optimizer_settings.is_debug_logging_enabled = arguments.llvm_debug_logging;
@@ -121,7 +118,6 @@ fn main_inner() -> anyhow::Result<()> {
input_files.as_slice(),
&mut solc,
optimizer_settings,
arguments.is_system_mode,
include_metadata_hash,
debug_config,
)
@@ -129,7 +125,6 @@ fn main_inner() -> anyhow::Result<()> {
revive_solidity::llvm_ir(
input_files.as_slice(),
optimizer_settings,
arguments.is_system_mode,
include_metadata_hash,
debug_config,
)
@@ -138,7 +133,6 @@ fn main_inner() -> anyhow::Result<()> {
&mut solc,
arguments.detect_missing_libraries,
arguments.force_evmla,
arguments.is_system_mode,
arguments.base_path,
arguments.include_paths,
arguments.allow_paths,
@@ -155,7 +149,6 @@ fn main_inner() -> anyhow::Result<()> {
!arguments.disable_solc_optimizer,
optimizer_settings,
arguments.force_evmla,
arguments.is_system_mode,
include_metadata_hash,
arguments.base_path,
arguments.include_paths,
@@ -176,7 +169,6 @@ fn main_inner() -> anyhow::Result<()> {
!arguments.disable_solc_optimizer,
optimizer_settings,
arguments.force_evmla,
arguments.is_system_mode,
include_metadata_hash,
arguments.base_path,
arguments.include_paths,