| Index: runtime/vm/stub_code_ia32_test.cc
|
| ===================================================================
|
| --- runtime/vm/stub_code_ia32_test.cc (revision 2143)
|
| +++ runtime/vm/stub_code_ia32_test.cc (working copy)
|
| @@ -5,7 +5,6 @@
|
| #include "vm/globals.h"
|
| #if defined(TARGET_ARCH_IA32)
|
|
|
| -#include "vm/code_index_table.h"
|
| #include "vm/isolate.h"
|
| #include "vm/dart_entry.h"
|
| #include "vm/native_entry.h"
|
| @@ -22,29 +21,6 @@
|
| DECLARE_RUNTIME_ENTRY(TestSmiSub);
|
|
|
|
|
| -// Add function to a class and that class to the class dictionary so that
|
| -// frame walking can be used.
|
| -static const Function& RegisterFakeFunction(const char* name,
|
| - const Code& code) {
|
| - const String& function_name = String::ZoneHandle(String::NewSymbol(name));
|
| - const Function& function = Function::ZoneHandle(
|
| - Function::New(function_name, RawFunction::kFunction, true, false, 0));
|
| - Class& cls = Class::ZoneHandle();
|
| - const Script& script = Script::Handle();
|
| - cls = Class::New(function_name, script);
|
| - const Array& functions = Array::Handle(Array::New(1));
|
| - functions.SetAt(0, function);
|
| - cls.SetFunctions(functions);
|
| - Library& lib = Library::Handle(Library::CoreLibrary());
|
| - lib.AddClass(cls);
|
| - function.SetCode(code);
|
| - CodeIndexTable* code_index_table = Isolate::Current()->code_index_table();
|
| - ASSERT(code_index_table != NULL);
|
| - code_index_table->AddFunction(function);
|
| - return function;
|
| -}
|
| -
|
| -
|
| // Test calls to stub code which calls into the runtime.
|
| static void GenerateCallToCallRuntimeStub(Assembler* assembler,
|
| int value1, int value2) {
|
| @@ -76,7 +52,7 @@
|
| GenerateCallToCallRuntimeStub(&_assembler_, value1, value2);
|
| const Code& code = Code::Handle(
|
| Code::FinalizeCode("Test_CallRuntimeStubCode", &_assembler_));
|
| - const Function& function = RegisterFakeFunction(kName, code);
|
| + const Function& function = RuntimeEntry::RegisterFakeFunction(kName, code);
|
| GrowableArray<const Object*> arguments;
|
| const Array& kNoArgumentNames = Array::Handle();
|
| Smi& result = Smi::Handle();
|
| @@ -122,7 +98,7 @@
|
| GenerateCallToCallNativeCFunctionStub(&_assembler_, value1, value2);
|
| const Code& code = Code::Handle(
|
| Code::FinalizeCode(kName, &_assembler_));
|
| - const Function& function = RegisterFakeFunction(kName, code);
|
| + const Function& function = RuntimeEntry::RegisterFakeFunction(kName, code);
|
| GrowableArray<const Object*> arguments;
|
| const Array& kNoArgumentNames = Array::Handle();
|
| Smi& result = Smi::Handle();
|
|
|