Browse Source

Fixed sha3

cl-refactor
Vitalik Buterin 10 years ago
parent
commit
f34fb6d7cf
  1. 4
      libserpent/rewriter.cpp
  2. 6
      setup.py

4
libserpent/rewriter.cpp

@ -132,7 +132,7 @@ std::string macros[][2] = {
},
{
"(sha3 $x)",
"(seq (set $1 $x) (sha3 (ref $1) 32))"
"(seq (set $1 $x) (~sha3 (ref $1) 32))"
},
{
"(sha3 $mstart $msize)",
@ -350,7 +350,7 @@ Node array_lit_transform(Node node) {
o2.push_back(astnode("alloc", o1, node.metadata));
std::vector<Node> o3;
o3.push_back(astnode("set", o2, node.metadata));
for (unsigned i = 0; i < node.args.size(); i++) {
for (int i = 0; i < node.args.size(); i++) {
// (mstore (add (get symb) i*32) v)
std::vector<Node> o5;
o5.push_back(token(symb, node.metadata));

6
setup.py

@ -14,8 +14,10 @@ class build_me(build):
def run(self):
build.run(self)
# if os.uname()[0] == 'Linux' and os.geteuid() == 0:
# call(['sudo', 'apt-get', 'install', 'build-essential'])
# call(['sudo', 'apt-get', 'install', 'g++-4.8'])
# call(['sudo', 'apt-get', 'install', 'cmake'])
# call(['sudo', 'apt-get', 'install', 'libboost-dev'])
# call(['sudo', 'apt-get', 'install', 'libboost-all-dev'])
call(['mkdir', 'build'])
os.chdir('build')
call(['cmake', '..', '-DLANGUAGES=1'])
@ -43,7 +45,7 @@ def read(fname):
setup(
name='ethereum-serpent',
version='1.4.6',
version='1.4.11',
description='Serpent compiler',
maintainer='Vitalik Buterin',
maintainer_email='v@buterin.com',

Loading…
Cancel
Save