Skip to content

Commit fd5cdca

Browse files
merge
Signed-off-by: salaheldinsoliman <[email protected]>
2 parents e398828 + 06798cd commit fd5cdca

File tree

8 files changed

+38
-10
lines changed

8 files changed

+38
-10
lines changed

.github/workflows/release.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,7 @@ jobs:
118118

119119
mac-intel:
120120
name: Mac Intel
121-
# The Hyperledger self-hosted intel macs have the label macos-latest
122-
# and run macos 12. We don't want to build llvm on macos 12, because
123-
# then it can't be used on macos 11.
124-
runs-on: macos-11
121+
runs-on: macos-12
125122
steps:
126123
- name: Checkout sources
127124
uses: actions/checkout@v3

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ jobs:
199199

200200
mac-intel:
201201
name: Mac Intel
202-
runs-on: macos-11
202+
runs-on: macos-12
203203
steps:
204204
- name: Checkout sources
205205
uses: actions/checkout@v3
@@ -223,7 +223,7 @@ jobs:
223223

224224
mac-universal:
225225
name: Mac Universal Binary
226-
runs-on: macos-11
226+
runs-on: macos-12
227227
needs: [mac-arm, mac-intel]
228228
steps:
229229
- uses: actions/download-artifact@v3

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "solang"
33
version = "0.3.3"
44
authors = ["Sean Young <[email protected]>", "Lucas Steuernagel <[email protected]>", "Cyrill Leutwiler <[email protected]>"]
5-
homepage = "https://github.com/hyperledger/solang"
5+
repository = "https://github.com/hyperledger/solang"
66
documentation = "https://solang.readthedocs.io/"
77
license = "Apache-2.0"
88
build = "build.rs"

solang-parser/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "solang-parser"
33
version = "0.3.3"
44
authors = ["Sean Young <[email protected]>", "Lucas Steuernagel <[email protected]>", "Cyrill Leutwiler <[email protected]>"]
5-
homepage = "https://github.com/hyperledger/solang"
5+
repository = "https://github.com/hyperledger/solang"
66
documentation = "https://solang.readthedocs.io/"
77
license = "Apache-2.0"
88
build = "build.rs"

solang-parser/src/lexer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ impl<'input> fmt::Display for Token<'input> {
246246
Token::CloseBracket => write!(f, "]"),
247247
Token::BitwiseNot => write!(f, "~"),
248248
Token::Question => write!(f, "?"),
249-
Token::ShiftRightAssign => write!(f, "<<="),
250-
Token::ShiftRight => write!(f, "<<"),
249+
Token::ShiftRightAssign => write!(f, ">>="),
250+
Token::ShiftRight => write!(f, ">>"),
251251
Token::Less => write!(f, "<"),
252252
Token::LessEqual => write!(f, "<="),
253253
Token::Bool => write!(f, "bool"),

src/codegen/dispatch/soroban.rs

+6
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ pub fn function_dispatch(
102102

103103
wrapper_cfg.add(&mut vartab, placeholder);
104104

105+
<<<<<<< HEAD
105106

106107
if value.len() == 1 {
108+
=======
109+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
107110
// set the msb 8 bits of the return value to 6, the return value is 64 bits.
108111
// FIXME: this assumes that the solidity function always returns one value.
109112
let shifted = Expression::ShiftLeft {
@@ -133,6 +136,7 @@ pub fn function_dispatch(
133136
};
134137

135138
wrapper_cfg.add(&mut vartab, Instr::Return { value: vec![added] });
139+
<<<<<<< HEAD
136140
} else {
137141

138142
// return 2 as numberliteral
@@ -145,6 +149,8 @@ pub fn function_dispatch(
145149
wrapper_cfg.add(&mut vartab, Instr::Return { value: vec![two] });
146150
}
147151

152+
=======
153+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
148154

149155
vartab.finalize(ns, &mut wrapper_cfg);
150156
cfg.public = false;

src/emit/soroban/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ use std::sync;
2222
const SOROBAN_ENV_INTERFACE_VERSION: u64 = 90194313216;
2323
pub const PUT_CONTRACT_DATA: &str = "l._";
2424
pub const GET_CONTRACT_DATA: &str = "l.1";
25+
<<<<<<< HEAD
2526
pub const LOG_FROM_LINEAR_MEMORY: &str = "x._";
27+
=======
28+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
2629

2730
pub struct SorobanTarget;
2831

@@ -232,21 +235,27 @@ impl SorobanTarget {
232235
.i64_type()
233236
.fn_type(&[ty.into(), ty.into()], false);
234237

238+
<<<<<<< HEAD
235239
let log_function_ty = binary
236240
.context
237241
.i64_type()
238242
.fn_type(&[ty.into(), ty.into(), ty.into(), ty.into()], false);
239243

244+
=======
245+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
240246
binary
241247
.module
242248
.add_function(PUT_CONTRACT_DATA, function_ty_1, Some(Linkage::External));
243249
binary
244250
.module
245251
.add_function(GET_CONTRACT_DATA, function_ty, Some(Linkage::External));
252+
<<<<<<< HEAD
246253

247254
binary
248255
.module
249256
.add_function(LOG_FROM_LINEAR_MEMORY, log_function_ty, Some(Linkage::External));
257+
=======
258+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
250259
}
251260

252261
fn emit_initializer(binary: &mut Binary, _ns: &ast::Namespace) {

src/emit/soroban/target.rs

+16
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
use crate::codegen::cfg::HashTy;
44
use crate::codegen::Expression;
5+
<<<<<<< HEAD
56
use crate::emit::binary::{self, Binary};
67
use crate::emit::soroban::{SorobanTarget, GET_CONTRACT_DATA, LOG_FROM_LINEAR_MEMORY, PUT_CONTRACT_DATA};
8+
=======
9+
use crate::emit::binary::Binary;
10+
use crate::emit::soroban::{SorobanTarget, GET_CONTRACT_DATA, PUT_CONTRACT_DATA};
11+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
712
use crate::emit::ContractArgs;
813
use crate::emit::{TargetRuntime, Variable};
914
use crate::emit_context;
@@ -13,10 +18,17 @@ use crate::sema::ast::{Function, Namespace, Type};
1318

1419
use inkwell::types::{BasicTypeEnum, IntType};
1520
use inkwell::values::{
21+
<<<<<<< HEAD
1622
AnyValue, ArrayValue, AsValueRef, BasicMetadataValueEnum, BasicValue, BasicValueEnum, FunctionValue, IntValue, PointerValue
1723
};
1824

1925
use inkwell::AddressSpace;
26+
=======
27+
ArrayValue, BasicMetadataValueEnum, BasicValue, BasicValueEnum, FunctionValue, IntValue,
28+
PointerValue,
29+
};
30+
31+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
2032
use solang_parser::pt::Loc;
2133

2234
use std::collections::HashMap;
@@ -236,6 +248,7 @@ impl<'a> TargetRuntime<'a> for SorobanTarget {
236248

237249
/// Prints a string
238250
/// TODO: Implement this function, with a call to the `log` function in the Soroban runtime.
251+
<<<<<<< HEAD
239252
fn print(&self, bin: &Binary, string: PointerValue, length: IntValue) {
240253

241254

@@ -302,6 +315,9 @@ impl<'a> TargetRuntime<'a> for SorobanTarget {
302315
).unwrap();
303316

304317
}
318+
=======
319+
fn print(&self, bin: &Binary, string: PointerValue, length: IntValue) {}
320+
>>>>>>> 06798cdeac6fd62ee98f5ae7da38f3af4933dc0f
305321

306322
/// Return success without any result
307323
fn return_empty_abi(&self, bin: &Binary) {

0 commit comments

Comments
 (0)