aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/ethereum/serpent-go/serpent/functions.h
blob: 68a1c69cef5023e314c872bd1bedc067d877ab67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef ETHSERP_FUNCTIONS
#define ETHSERP_FUNCTIONS

#include <stdio.h>
#include <iostream>
#include <vector>
#include <map>
#include "util.h"
#include "lllparser.h"
#include "bignum.h"
#include "optimize.h"
#include "rewriteutils.h"
#include "preprocess.h"


class argPack {
    public:
        argPack(Node a, Node b, Node c) {
            pre = a;
            datastart = b;
            datasz = c;
        }
    Node pre;
    Node datastart;
    Node datasz;
};

// Get a signature from a function
std::string getSignature(std::vector<Node> args);

// Convert a list of arguments into a <pre, mstart, msize> node
// triple, given the signature of a function
Node packArguments(std::vector<Node> args, std::string sig,
                   int funId, Metadata m);

// Create a node for argument unpacking
Node unpackArguments(std::vector<Node> vars, Metadata m);

#endif