Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Unified Diff: runtime/vm/native_entry_test.cc

Issue 11411072: Simplify CodePatcher::GetStaticCallAt. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_entry_test.cc
===================================================================
--- runtime/vm/native_entry_test.cc (revision 15100)
+++ runtime/vm/native_entry_test.cc (working copy)
@@ -58,20 +58,15 @@
// Test code patching.
void TestStaticCallPatching(Dart_NativeArguments args) {
Dart_EnterScope();
- Function& target_function = Function::Handle();
DartFrameIterator iterator;
iterator.NextFrame(); // Skip native call.
StackFrame* static_caller_frame = iterator.NextFrame();
- uword target_address = 0;
- CodePatcher::GetStaticCallAt(static_caller_frame->pc(),
- &target_function,
- &target_address);
+ uword target_address =
+ CodePatcher::GetStaticCallTargetAt(static_caller_frame->pc());
const Code& code = Code::Handle(static_caller_frame->LookupDartCode());
- const Function& target_function_2 =
+ const Function& target_function =
Function::Handle(code.GetStaticCallTargetFunctionAt(
static_caller_frame->pc()));
- EXPECT(!target_function_2.IsNull());
- EXPECT_EQ(target_function_2.raw(), target_function.raw());
EXPECT(String::Handle(target_function.name()).
Equals(String::Handle(String::New("NativePatchStaticCall"))));
const uword function_entry_address =
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698