summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-02-18 12:53:08 -0800
committerJosh Stone <jistone@redhat.com>2009-02-18 12:53:08 -0800
commit23ad66b41ded81502948584816390c634f66c5ee (patch)
treedb900ca0141a16152c3bf27395cd4975cad6a1ab /translate.cxx
parent2aa2ccb83142c3bf98ac8ee1558a0ee72dff3a1f (diff)
parent482fe2af17347b472232c5d7c4b26e53606e395e (diff)
downloadsystemtap-steved-23ad66b41ded81502948584816390c634f66c5ee.tar.gz
systemtap-steved-23ad66b41ded81502948584816390c634f66c5ee.tar.xz
systemtap-steved-23ad66b41ded81502948584816390c634f66c5ee.zip
Enable typecasting with @cast
println(@cast(myptr, "task_struct")->pid) println(@cast(myptr, "task_struct", "kernel")->pid) Merge branch 'typecast', bump ChangeLog entries to push date
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx
index 9b7bf6ed..31f2043f 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -1,5 +1,5 @@
// translation pass
-// Copyright (C) 2005-2008 Red Hat Inc.
+// Copyright (C) 2005-2009 Red Hat Inc.
// Copyright (C) 2005-2008 Intel Corporation.
//
// This file is part of systemtap, and is free software. You can
@@ -150,6 +150,7 @@ struct c_unparser: public unparser, public visitor
void visit_print_format (print_format* e);
void visit_stat_op (stat_op* e);
void visit_hist_op (hist_op* e);
+ void visit_cast_op (cast_op* e);
};
// A shadow visitor, meant to generate temporary variable declarations
@@ -3488,6 +3489,13 @@ c_unparser::visit_target_symbol (target_symbol* e)
void
+c_unparser::visit_cast_op (cast_op* e)
+{
+ throw semantic_error("cannot translate general cast expression", e->tok);
+}
+
+
+void
c_tmpcounter::load_map_indices(arrayindex *e)
{
symbol *array;