| Index: runtime/vm/find_code_object_test.cc
|
| ===================================================================
|
| --- runtime/vm/find_code_object_test.cc (revision 30603)
|
| +++ runtime/vm/find_code_object_test.cc (working copy)
|
| @@ -22,6 +22,12 @@
|
| const int kScriptSize = 512 * KB;
|
| const int kNumFunctions = 1024;
|
| char scriptChars[kScriptSize];
|
| +
|
| + // Get access to the code index table.
|
| + Isolate* isolate = Isolate::Current();
|
| + ASSERT(isolate != NULL);
|
| +
|
| + StackZone zone(isolate);
|
| String& url = String::Handle(String::New("dart-test:FindCodeObject"));
|
| String& source = String::Handle();
|
| Script& script = Script::Handle();
|
| @@ -32,10 +38,6 @@
|
| Function& function = Function::Handle();
|
| char buffer[256];
|
|
|
| - // Get access to the code index table.
|
| - Isolate* isolate = Isolate::Current();
|
| - ASSERT(isolate != NULL);
|
| -
|
| lib = Library::CoreLibrary();
|
|
|
| // Load up class A with 1024 functions.
|
| @@ -62,6 +64,8 @@
|
| function = clsA.LookupStaticFunction(function_name);
|
| EXPECT(!function.IsNull());
|
| EXPECT(CompilerTest::TestCompileFunction(function));
|
| + const Code& code = Code::ZoneHandle(function.CurrentCode());
|
| + EXPECT(!code.IsNull())
|
| EXPECT(function.HasCode());
|
| }
|
|
|
| @@ -110,6 +114,8 @@
|
| function = clsB.LookupStaticFunction(function_name);
|
| EXPECT(!function.IsNull());
|
| EXPECT(CompilerTest::TestCompileFunction(function));
|
| + const Code& code = Code::ZoneHandle(function.CurrentCode());
|
| + EXPECT(!code.IsNull());
|
| EXPECT(function.HasCode());
|
| }
|
|
|
|
|