Skip to content

Commit

Permalink
Make all functions impure by default, add "pure" specifier
Browse files Browse the repository at this point in the history
Change specifiers in stdlib.fc, adjust legacy tests, remove pragma strict-purity-check
  • Loading branch information
SpyCheese committed Nov 30, 2023
1 parent e26dfa6 commit 8f7eebb
Show file tree
Hide file tree
Showing 18 changed files with 1,320 additions and 1,245 deletions.
6 changes: 0 additions & 6 deletions crypto/func/abscode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@ void VarDescrList::show(std::ostream& os) const {
os << " ]\n";
}

void Op::set_impure(const CodeBlob& code) {
if (code.flags & CodeBlob::_ForbidImpure) {
throw src::ParseError{where, "impure operation in pure function"};
}
flags |= _Impure;
}
void Op::flags_set_clear(int set, int clear) {
flags = (flags | set) & ~clear;
for (auto& op : block0) {
Expand Down
10 changes: 5 additions & 5 deletions crypto/func/auto-tests/legacy_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
["jetton-minter/jetton-minter.fc", 9028309926287301331466371999814928201427184114165428257502393474125007156494],
["gg-marketplace/nft-marketplace-v2.fc", 92199806964112524639740773542356508485601908152150843819273107618799016205930],
["jetton-wallet/jetton-wallet.fc", 86251125787443633057458168028617933212663498001665054651523310772884328206542],
["whales-nominators/nominators.fc", 8941364499854379927692172316865293429893094891593442801401542636695127885153],
["whales-nominators/nominators.fc", 64989185004203073400683226767264384908045055609681310145961012819587514238303],


["tact-examples/treasure_Treasure.code.fc", 13962538639825790677138656603323869918938565499584297120566680287245364723897],
["tact-examples/jetton_SampleJetton.code.fc", 94076762218493729104783735200107713211245710256802265203823917715299139499110],
["tact-examples/jetton_JettonDefaultWallet.code.fc", 29421313492520031238091587108198906058157443241743283101866538036369069620563],
["tact-examples/maps_MapTestContract.code.fc", 22556550222249123835909180266811414538971143565993192846012583552876721649744],
["tact-examples/treasure_Treasure.code.fc", 60348994682690664630455354672413353326734169633005380820521037982881341539662],
["tact-examples/jetton_SampleJetton.code.fc", 70075170397574779402104489003369966746142305378310979462742589461276337980270],
["tact-examples/jetton_JettonDefaultWallet.code.fc", 12710666798574325848563501630728896968396634924087634181325633274893128358499],
["tact-examples/maps_MapTestContract.code.fc", 86004071444084135394990759334664637743689750108042267324839281046456545168857],
]

def getenv(name, default=None):
Expand Down
22 changes: 21 additions & 1 deletion crypto/func/auto-tests/legacy_tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
[["elector/elector-code.fc", "115226404411715505328583639896096915745686314074575650766750648324043316883483"], ["config/config-code.fc", "10913070768607625342121305745084703121685937915388357634624451844356456145601"], ["eth-bridge-multisig/multisig-code.fc", "101509909129354488841890823627011033360100627957439967918234053299675481277954"], ["bsc-bridge-collector/votes-collector.fc", "62190447221288642706570413295807615918589884489514159926097051017036969900417"], ["uni-lock-wallet/uni-lockup-wallet.fc", "61959738324779104851267145467044677651344601417998258530238254441977103654381"], ["nft-collection/nft-collection-editable.fc", "45561997735512210616567774035540357815786262097548276229169737015839077731274"], ["dns-collection/nft-collection.fc", "107999822699841936063083742021519765435859194241091312445235370766165379261859"], ["tele-nft-item/nft-item.fc", "69777543125381987786450436977742010705076866061362104025338034583422166453344"], ["storage/storage-contract.fc", "91377830060355733016937375216020277778264560226873154627574229667513068328151"], ["storage/storage-provider.fc", "13618336676213331164384407184540461509022654507176709588621016553953760588122"], ["nominator-pool/pool.fc", "69767057279163099864792356875696330339149706521019810113334238732928422055375"], ["jetton-minter/jetton-minter.fc", "9028309926287301331466371999814928201427184114165428257502393474125007156494"], ["gg-marketplace/nft-marketplace-v2.fc", "92199806964112524639740773542356508485601908152150843819273107618799016205930"], ["jetton-wallet/jetton-wallet.fc", "86251125787443633057458168028617933212663498001665054651523310772884328206542"], ["whales-nominators/nominators.fc", "8941364499854379927692172316865293429893094891593442801401542636695127885153"], ["tact-examples/treasure_Treasure.code.fc", "13962538639825790677138656603323869918938565499584297120566680287245364723897"], ["tact-examples/jetton_SampleJetton.code.fc", "94076762218493729104783735200107713211245710256802265203823917715299139499110"], ["tact-examples/jetton_JettonDefaultWallet.code.fc", "29421313492520031238091587108198906058157443241743283101866538036369069620563"], ["tact-examples/maps_MapTestContract.code.fc", "22556550222249123835909180266811414538971143565993192846012583552876721649744"]]
[
["elector/elector-code.fc", "115226404411715505328583639896096915745686314074575650766750648324043316883483"],
["config/config-code.fc", "10913070768607625342121305745084703121685937915388357634624451844356456145601"],
["eth-bridge-multisig/multisig-code.fc", "101509909129354488841890823627011033360100627957439967918234053299675481277954"],
["bsc-bridge-collector/votes-collector.fc", "62190447221288642706570413295807615918589884489514159926097051017036969900417"],
["uni-lock-wallet/uni-lockup-wallet.fc", "61959738324779104851267145467044677651344601417998258530238254441977103654381"],
["nft-collection/nft-collection-editable.fc", "45561997735512210616567774035540357815786262097548276229169737015839077731274"],
["dns-collection/nft-collection.fc", "107999822699841936063083742021519765435859194241091312445235370766165379261859"],
["tele-nft-item/nft-item.fc", "69777543125381987786450436977742010705076866061362104025338034583422166453344"],
["storage/storage-contract.fc", "91377830060355733016937375216020277778264560226873154627574229667513068328151"],
["storage/storage-provider.fc", "13618336676213331164384407184540461509022654507176709588621016553953760588122"],
["nominator-pool/pool.fc", "69767057279163099864792356875696330339149706521019810113334238732928422055375"],
["jetton-minter/jetton-minter.fc", "9028309926287301331466371999814928201427184114165428257502393474125007156494"],
["gg-marketplace/nft-marketplace-v2.fc", "92199806964112524639740773542356508485601908152150843819273107618799016205930"],
["jetton-wallet/jetton-wallet.fc", "86251125787443633057458168028617933212663498001665054651523310772884328206542"],
["whales-nominators/nominators.fc", "64989185004203073400683226767264384908045055609681310145961012819587514238303"],
["tact-examples/treasure_Treasure.code.fc", "60348994682690664630455354672413353326734169633005380820521037982881341539662"],
["tact-examples/jetton_SampleJetton.code.fc", "70075170397574779402104489003369966746142305378310979462742589461276337980270"],
["tact-examples/jetton_JettonDefaultWallet.code.fc", "12710666798574325848563501630728896968396634924087634181325633274893128358499"],
["tact-examples/maps_MapTestContract.code.fc", "86004071444084135394990759334664637743689750108042267324839281046456545168857"]
]
Loading

0 comments on commit 8f7eebb

Please sign in to comment.