Permalink
Browse files

dumpanddie->collect_state

  • Loading branch information...
1 parent d911778 commit 69116dcbe36a37f2ed2bd1e12dd56132cbff3f58 @colder committed Aug 16, 2010
View
6 php/phantm.php
@@ -5,7 +5,7 @@
* Dumps the state of all variables, so that it can be precisely imported
* into phantm
*
- * Call it like that: phantm_dumpanddie(get_defined_vars());
+ * Call it like that: phantm_collect_state(get_defined_vars());
* @param string $path
* @return string
*/
@@ -33,7 +33,7 @@ function phantm_incl($path) {
return $path;
}
-function phantm_dumpanddie(array $vars) {
+function phantm_collect_state(array $vars) {
$bt = debug_backtrace();
$file = $bt[0]['file'];
@@ -82,7 +82,7 @@ function phantm_dumpanddie(array $vars) {
$funcs = get_defined_functions();
foreach ($funcs['user'] as $f) {
- if ($f == 'phantm_incl' || $f == 'phantm_dumpanddie') continue;
+ if ($f == 'phantm_incl' || $f == 'phantm_collect_state') continue;
$rf = new ReflectionFunction($f);
View
4 src/phantm/phases/ASTPruningPhase.scala
@@ -43,7 +43,7 @@ class ASTCollector(functs: Map[String, (String, Int)],
def visit(t: Tree): Boolean = {
t match {
- case FunctionCall(StaticFunctionRef(_, _, Identifier("phantm_dumpanddie")), _) =>
+ case FunctionCall(StaticFunctionRef(_, _, Identifier("phantm_collect_state")), _) =>
// found the call
afterDump = true
case fd @ FunctionDecl(Identifier(name), _, _, _) if !afterDump =>
@@ -74,7 +74,7 @@ class ASTPruner(ast: Program) extends ASTTransform(ast) {
override def trStmts(sts: List[Statement]): List[Statement] = super.trStmts(sts).filter(_ != Void())
override def trStmt(st: Statement): Statement = st match {
- case FunctionCall(StaticFunctionRef(_, _, Identifier("phantm_dumpanddie")), _) =>
+ case FunctionCall(StaticFunctionRef(_, _, Identifier("phantm_collect_state")), _) =>
// found the call
afterDump = true
st
View
2 src/phantm/types/TypeTransferFunction.scala
@@ -173,7 +173,7 @@ case class TypeTransferFunction(silent: Boolean,
case _ =>
TAnyObject
}
- case FunctionCall(AST.Identifier("phantm_dumpanddie"), args) =>
+ case FunctionCall(AST.Identifier("phantm_collect_state"), args) =>
for (unser <- ctx.dumpedData) {
env = unser.heap.importToEnv(env)
}
View
2 src/phantm/util/Unserializer.scala
@@ -166,7 +166,7 @@ class Unserializer(content: String) {
}
}
case _ =>
- throw new UnserializeException("Invalid non-array input for dumpanddie")
+ throw new UnserializeException("Invalid non-array base input found in dump")
}
map
}

0 comments on commit 69116dc

Please sign in to comment.