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

Unified Diff: runtime/vm/code_index_table_test.cc

Issue 9475031: Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 months 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/code_index_table.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_index_table_test.cc
===================================================================
--- runtime/vm/code_index_table_test.cc (revision 4655)
+++ runtime/vm/code_index_table_test.cc (working copy)
@@ -123,20 +123,18 @@
function_name = String::New(buffer);
function = clsA.LookupStaticFunction(function_name);
EXPECT(!function.IsNull());
- code = function.code();
+ code = function.CurrentCode();
EXPECT(code.Size() > 16);
pc = code.EntryPoint() + 16;
- EXPECT(code_index_table->LookupFunction(pc) == function.raw());
EXPECT(code_index_table->LookupCode(pc) == code.raw());
OS::SNPrint(buffer, 256, "moo%d", 54);
function_name = String::New(buffer);
function = clsB.LookupStaticFunction(function_name);
EXPECT(!function.IsNull());
- code = function.code();
+ code = function.CurrentCode();
EXPECT(code.Size() > 16);
pc = code.EntryPoint() + 16;
- EXPECT(code_index_table->LookupFunction(pc) == function.raw());
EXPECT(code_index_table->LookupCode(pc) == code.raw());
// Lookup the large function
@@ -144,15 +142,13 @@
function_name = String::New(buffer);
function = clsB.LookupStaticFunction(function_name);
EXPECT(!function.IsNull());
- code = function.code();
+ code = function.CurrentCode();
EXPECT(code.Size() > 16);
pc = code.EntryPoint() + 16;
EXPECT(code.Size() > PageSpace::kPageSize);
- EXPECT(code_index_table->LookupFunction(pc) == function.raw());
EXPECT(code_index_table->LookupCode(pc) == code.raw());
EXPECT(code.Size() > (1 * MB));
pc = code.EntryPoint() + (1 * MB);
- EXPECT(code_index_table->LookupFunction(pc) == function.raw());
EXPECT(code_index_table->LookupCode(pc) == code.raw());
}
« no previous file with comments | « runtime/vm/code_index_table.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698