diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 484629694..722ac9690 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,10 +118,7 @@ jobs: mac-intel: name: Mac Intel - # The Hyperledger self-hosted intel macs have the label macos-latest - # and run macos 12. We don't want to build llvm on macos 12, because - # then it can't be used on macos 11. - runs-on: macos-11 + runs-on: macos-12 steps: - name: Checkout sources uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39f17f1e0..6c7fadd46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -199,7 +199,7 @@ jobs: mac-intel: name: Mac Intel - runs-on: macos-11 + runs-on: macos-12 steps: - name: Checkout sources uses: actions/checkout@v3 @@ -223,7 +223,7 @@ jobs: mac-universal: name: Mac Universal Binary - runs-on: macos-11 + runs-on: macos-12 needs: [mac-arm, mac-intel] steps: - uses: actions/download-artifact@v3 diff --git a/Cargo.toml b/Cargo.toml index 2c10d3f47..534ab0ac5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "solang" version = "0.3.3" authors = ["Sean Young ", "Lucas Steuernagel ", "Cyrill Leutwiler "] -homepage = "https://github.com/hyperledger/solang" +repository = "https://github.com/hyperledger/solang" documentation = "https://solang.readthedocs.io/" license = "Apache-2.0" build = "build.rs" diff --git a/solang-parser/Cargo.toml b/solang-parser/Cargo.toml index 043739246..03c48d8d5 100644 --- a/solang-parser/Cargo.toml +++ b/solang-parser/Cargo.toml @@ -2,7 +2,7 @@ name = "solang-parser" version = "0.3.3" authors = ["Sean Young ", "Lucas Steuernagel ", "Cyrill Leutwiler "] -homepage = "https://github.com/hyperledger/solang" +repository = "https://github.com/hyperledger/solang" documentation = "https://solang.readthedocs.io/" license = "Apache-2.0" build = "build.rs" diff --git a/solang-parser/src/lexer.rs b/solang-parser/src/lexer.rs index 73700cd7c..55795eea0 100644 --- a/solang-parser/src/lexer.rs +++ b/solang-parser/src/lexer.rs @@ -246,8 +246,8 @@ impl<'input> fmt::Display for Token<'input> { Token::CloseBracket => write!(f, "]"), Token::BitwiseNot => write!(f, "~"), Token::Question => write!(f, "?"), - Token::ShiftRightAssign => write!(f, "<<="), - Token::ShiftRight => write!(f, "<<"), + Token::ShiftRightAssign => write!(f, ">>="), + Token::ShiftRight => write!(f, ">>"), Token::Less => write!(f, "<"), Token::LessEqual => write!(f, "<="), Token::Bool => write!(f, "bool"), diff --git a/src/codegen/dispatch/soroban.rs b/src/codegen/dispatch/soroban.rs index beb4b99ee..2d31f122a 100644 --- a/src/codegen/dispatch/soroban.rs +++ b/src/codegen/dispatch/soroban.rs @@ -102,8 +102,11 @@ pub fn function_dispatch( wrapper_cfg.add(&mut vartab, placeholder); +<<<<<<< HEAD if value.len() == 1 { +======= +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f // set the msb 8 bits of the return value to 6, the return value is 64 bits. // FIXME: this assumes that the solidity function always returns one value. let shifted = Expression::ShiftLeft { @@ -133,6 +136,7 @@ pub fn function_dispatch( }; wrapper_cfg.add(&mut vartab, Instr::Return { value: vec![added] }); +<<<<<<< HEAD } else { // return 2 as numberliteral @@ -145,6 +149,8 @@ pub fn function_dispatch( wrapper_cfg.add(&mut vartab, Instr::Return { value: vec![two] }); } +======= +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f vartab.finalize(ns, &mut wrapper_cfg); cfg.public = false; diff --git a/src/emit/soroban/mod.rs b/src/emit/soroban/mod.rs index 91fd3f203..a8ff9c699 100644 --- a/src/emit/soroban/mod.rs +++ b/src/emit/soroban/mod.rs @@ -22,7 +22,10 @@ use std::sync; const SOROBAN_ENV_INTERFACE_VERSION: u64 = 90194313216; pub const PUT_CONTRACT_DATA: &str = "l._"; pub const GET_CONTRACT_DATA: &str = "l.1"; +<<<<<<< HEAD pub const LOG_FROM_LINEAR_MEMORY: &str = "x._"; +======= +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f pub struct SorobanTarget; @@ -232,21 +235,27 @@ impl SorobanTarget { .i64_type() .fn_type(&[ty.into(), ty.into()], false); +<<<<<<< HEAD let log_function_ty = binary .context .i64_type() .fn_type(&[ty.into(), ty.into(), ty.into(), ty.into()], false); +======= +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f binary .module .add_function(PUT_CONTRACT_DATA, function_ty_1, Some(Linkage::External)); binary .module .add_function(GET_CONTRACT_DATA, function_ty, Some(Linkage::External)); +<<<<<<< HEAD binary .module .add_function(LOG_FROM_LINEAR_MEMORY, log_function_ty, Some(Linkage::External)); +======= +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f } fn emit_initializer(binary: &mut Binary, _ns: &ast::Namespace) { diff --git a/src/emit/soroban/target.rs b/src/emit/soroban/target.rs index e8f368f33..7ee0a5099 100644 --- a/src/emit/soroban/target.rs +++ b/src/emit/soroban/target.rs @@ -2,8 +2,13 @@ use crate::codegen::cfg::HashTy; use crate::codegen::Expression; +<<<<<<< HEAD use crate::emit::binary::{self, Binary}; use crate::emit::soroban::{SorobanTarget, GET_CONTRACT_DATA, LOG_FROM_LINEAR_MEMORY, PUT_CONTRACT_DATA}; +======= +use crate::emit::binary::Binary; +use crate::emit::soroban::{SorobanTarget, GET_CONTRACT_DATA, PUT_CONTRACT_DATA}; +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f use crate::emit::ContractArgs; use crate::emit::{TargetRuntime, Variable}; use crate::emit_context; @@ -13,10 +18,17 @@ use crate::sema::ast::{Function, Namespace, Type}; use inkwell::types::{BasicTypeEnum, IntType}; use inkwell::values::{ +<<<<<<< HEAD AnyValue, ArrayValue, AsValueRef, BasicMetadataValueEnum, BasicValue, BasicValueEnum, FunctionValue, IntValue, PointerValue }; use inkwell::AddressSpace; +======= + ArrayValue, BasicMetadataValueEnum, BasicValue, BasicValueEnum, FunctionValue, IntValue, + PointerValue, +}; + +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f use solang_parser::pt::Loc; use std::collections::HashMap; @@ -236,6 +248,7 @@ impl<'a> TargetRuntime<'a> for SorobanTarget { /// Prints a string /// TODO: Implement this function, with a call to the `log` function in the Soroban runtime. +<<<<<<< HEAD fn print(&self, bin: &Binary, string: PointerValue, length: IntValue) { @@ -302,6 +315,9 @@ impl<'a> TargetRuntime<'a> for SorobanTarget { ).unwrap(); } +======= + fn print(&self, bin: &Binary, string: PointerValue, length: IntValue) {} +>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f /// Return success without any result fn return_empty_abi(&self, bin: &Binary) {