diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-24 15:13:03 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 15:13:03 -0700 |
commit | e33c10328caec29616a5433b1d1df9088f3a84df (patch) | |
tree | 723cc38803bb10032d28be9a9a161232d05d0fd1 /s_expression.h | |
parent | 9290e0dd28e646c3dc810e0a6405582f8bf643b6 (diff) | |
parent | 26bbfb7917a71d46d9227bbf960606cb673636d3 (diff) |
Merge remote branch 'cworth/master'
Conflicts:
ast_to_hir.cpp
ir.cpp
This brings in the talloc-based memory management work, so that the
compiler (almost) no longer leaks memory.
Diffstat (limited to 's_expression.h')
-rw-r--r-- | s_expression.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/s_expression.h b/s_expression.h index d5e52c16e8..1a0c03c218 100644 --- a/s_expression.h +++ b/s_expression.h @@ -46,13 +46,13 @@ class s_expression : public exec_node { public: - virtual ~s_expression() { } - /** * Read an S-Expression from the given string. * Advances the supplied pointer to just after the expression read. + * + * Any allocation will be performed with 'ctx' as the talloc owner. */ - static s_expression *read_expression(const char *&src); + static s_expression *read_expression(void *ctx, const char *&src); /** * Print out an S-Expression. Useful for debugging. @@ -73,8 +73,6 @@ protected: class s_number : public s_expression { public: - virtual ~s_number() { } - bool is_number() const { return true; } virtual float fvalue() = 0; @@ -87,7 +85,6 @@ class s_int : public s_number { public: s_int(int x) : val(x) { } - virtual ~s_int() { } bool is_int() const { return true; } @@ -104,7 +101,6 @@ class s_float : public s_number { public: s_float(float x) : val(x) { } - virtual ~s_float() { } float fvalue() { return this->val; } @@ -118,7 +114,6 @@ class s_symbol : public s_expression { public: s_symbol(const char *); - virtual ~s_symbol(); bool is_symbol() const { return true; } @@ -135,7 +130,6 @@ class s_list : public s_expression { public: s_list(); - virtual ~s_list(); virtual bool is_list() const { return true; } unsigned length() const; |