Skip to content

Commit

Permalink
Add patchAPI/src/Command.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 6256d62 commit 12ef273
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions patchAPI/src/Command.C
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ bool BatchCommand::undo() {
return true;
}

/* Public Interface: Patcher, which accepts instrumentation requests from users. */

bool Patcher::run() {

// We implicitly add the instrumentation engine
Expand All @@ -115,9 +113,6 @@ bool Patcher::run() {
return true;
}

/* Public Interface: Insert Snippet by pushing the the front of
snippet instance list */

bool PushFrontCommand::run() {
instance_ = pt_->pushFront(snip_);
return true;
Expand All @@ -127,9 +122,6 @@ bool PushFrontCommand::undo() {
return pt_->remove(instance_);
}

/* Public Interface: Insert Snippet by pushing the the end of
snippet instance list */

bool PushBackCommand::run() {
instance_ = pt_->pushBack(snip_);
return true;
Expand All @@ -139,8 +131,6 @@ bool PushBackCommand::undo() {
return pt_->remove(instance_);
}

/* Public Interface: Remove Snippet */

bool RemoveSnippetCommand::run() {
return instance_->destroy();
}
Expand All @@ -150,19 +140,14 @@ bool RemoveSnippetCommand::undo() {
return true;
}

/* Public Interface: Remove Function Call */

bool RemoveCallCommand::run() {
return mgr_->instrumenter()->removeCall(call_block_, context_);
}


bool RemoveCallCommand::undo() {
return mgr_->instrumenter()->revertModifiedCall(call_block_, context_);
}

/* Public Interface: Replace Function Call */

bool ReplaceCallCommand::run() {
return mgr_->instrumenter()->modifyCall(call_block_, new_callee_, context_);
}
Expand All @@ -171,8 +156,6 @@ bool ReplaceCallCommand::undo() {
return mgr_->instrumenter()->revertModifiedCall(call_block_, context_);
}

/* Public Interface: Replace Function */

bool ReplaceFuncCommand::run() {
return mgr_->instrumenter()->replaceFunction(old_func_, new_func_);
}
Expand Down

0 comments on commit 12ef273

Please sign in to comment.