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

Unified Diff: runtime/vm/native_entry_test.cc

Issue 11418046: First part of static call cleanup: store static call targets into code object, referenced by code-o… (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
Index: runtime/vm/native_entry_test.cc
===================================================================
--- runtime/vm/native_entry_test.cc (revision 15037)
+++ runtime/vm/native_entry_test.cc (working copy)
@@ -58,14 +58,18 @@
// Test code patching.
void TestStaticCallPatching(Dart_NativeArguments args) {
Dart_EnterScope();
- uword target_address = 0;
Function& target_function = Function::Handle();
DartFrameIterator iterator;
iterator.NextFrame(); // Skip native call.
StackFrame* static_caller_frame = iterator.NextFrame();
+ uword target_address = 0;
siva 2012/11/16 23:15:23 TODO that you will replace GetStaticCallAt with Co
srdjan 2012/11/17 00:47:24 Addressed as discussed
CodePatcher::GetStaticCallAt(static_caller_frame->pc(),
&target_function,
&target_address);
+ const Function& target_function_2 =
+ Function::Handle(Code::GetStaticCallTargetAt(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 =

Powered by Google App Engine
This is Rietveld 408576698