]> sourceware.org Git - systemtap.git/commit - parse.h
PR18431: Function overloading
authorFelix Lu <flu@redhat.com>
Tue, 23 Feb 2016 20:38:00 +0000 (15:38 -0500)
committerFelix Lu <flu@redhat.com>
Wed, 2 Mar 2016 00:36:38 +0000 (19:36 -0500)
commit7b5b30a8f05963d99e8defa351c15e1478e504d0
tree6900e6f97b989c89cc06f16070ed9c5b89e242bf
parentd15242da6df0190d1916576ae41fc6994fb07ed3
PR18431: Function overloading

A functioncall may now have a variety of implementations
and have the selection happen during runtime. Overloading
by number of parameters during compile time is also
available.

* elaborate.cxx:
  - no_var_mutation_during_iteration_check::visit_functioncall:
    Adapt to referents list.
  - symresolution_info::visit_functioncall: Likewise + sort functioncalls.
  - symresolution_info::find_function -> find_functions: Likewise.
  - void_statement_reducer::visit_functioncall: Likewise.
  - duplicate_function_remover::visit_functioncall: Likewise.
  - autocast_expanding_visitor::resolve_functioncall: Likewise.
  - typeresolution_info::visit_arrindex: Likewise.
  - get_functionsig: Use unmangled name.
* elaborate.h: find_function -> find_functions.
* main.cxx: Set parser user_file indicator flag.
* parse.cxx: Parser user_file flag, accept function declaration
  priority label syntax, remove duplicate function name checking,
  allow next in functions.
* parse.h: pf_user_file flag.
* common_probe_context.h: New "next" flag.
* session.h: New overload_count map for overload name resolution.
* staptree.cxx:
  - functioncall::functioncall: Remove referent initializer list.
  - functiondecl::functiondecl: Initialize default function priority.
  - functioncall_traversing_visitor::visit_functioncall:
    Adapt to referents list.
  - deep_copy_visitor::visit_functioncall: Likewise.
* staptree.h:
  - functioncall: Now holds list of referents.
  - functiondecl: New priority value.
  - function_priority_order: New functor for sorting.
* tapset-method.cxx: Adapt to referents list.
* tapsets.cxx: Adapt to referents list.
* parseko/eleven.stp: Invalidated.
* parseko/nineteen.stp: Invalidated.
* parseko/private02.stp: Invalidated.
* semko/fifty.stpL Invalidated.
* systemtap.base/optim_arridx.exp: Make compatible with overloading.
* translate.cxx:
  - c_unparser: New fc_counter to generate functioncall end labels.
  - c_unparser::emit_function: Reset context next flag, output STAP_NEXT
    macro.
  - c_unparser::visit_next_statement: Set context next flag, allow next
    in functions.
  - c_unparser::visit_functioncall: Main overloading logic.
  - recursion_info::visit_functioncall: Adapt to referents list.
21 files changed:
NEWS
doc/langref.tex
elaborate.cxx
elaborate.h
main.cxx
man/stap.1.in
parse.cxx
parse.h
runtime/common_probe_context.h
session.h
staptree.cxx
staptree.h
tapset-method.cxx
tapset-utrace.cxx
tapsets.cxx
testsuite/parseko/eleven.stp [deleted file]
testsuite/parseko/nineteen.stp [deleted file]
testsuite/parseko/private02.stp [deleted file]
testsuite/semko/fifty.stp [deleted file]
testsuite/systemtap.base/optim_arridx.exp
translate.cxx
This page took 0.03167 seconds and 5 git commands to generate.