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

Unified Diff: runtime/vm/dart_entry.cc

Issue 11968022: Lookup functions by name that contains the private key, except for dart_api which allows ignoring t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/dart_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
===================================================================
--- runtime/vm/dart_entry.cc (revision 17175)
+++ runtime/vm/dart_entry.cc (working copy)
@@ -148,12 +148,16 @@
ASSERT(receiver.raw() == arguments.At(0));
// Allocate an InvocationMirror object.
const Library& core_lib = Library::Handle(Library::CoreLibrary());
+
Class& invocation_mirror_class = Class::Handle(
- core_lib.LookupClassAllowPrivate(Symbols::InvocationMirror()));
+ core_lib.LookupClass(
+ String::Handle(core_lib.PrivateName(Symbols::InvocationMirror()))));
ASSERT(!invocation_mirror_class.IsNull());
+ const String& function_name =
+ String::Handle(core_lib.PrivateName(Symbols::AllocateInvocationMirror()));
const Function& allocation_function = Function::Handle(
Resolver::ResolveStaticByName(invocation_mirror_class,
- Symbols::AllocateInvocationMirror(),
+ function_name,
Resolver::kIsQualified));
ASSERT(!allocation_function.IsNull());
const int kNumAllocationArgs = 3;
@@ -401,9 +405,11 @@
ASSERT(!isolate_lib.IsNull());
const String& class_name =
String::Handle(isolate_lib.PrivateName(Symbols::_ReceivePortImpl()));
+ const String& function_name =
+ String::Handle(isolate_lib.PrivateName(Symbols::_lookupReceivePort()));
function = Resolver::ResolveStatic(isolate_lib,
class_name,
- Symbols::_lookupReceivePort(),
+ function_name,
kNumArguments,
Object::empty_array(),
Resolver::kIsQualified);
@@ -430,9 +436,11 @@
ASSERT(!isolate_lib.IsNull());
const String& class_name =
String::Handle(isolate_lib.PrivateName(Symbols::_ReceivePortImpl()));
+ const String& function_name =
+ String::Handle(isolate_lib.PrivateName(Symbols::_handleMessage()));
function = Resolver::ResolveStatic(isolate_lib,
class_name,
- Symbols::_handleMessage(),
+ function_name,
kNumArguments,
Object::empty_array(),
Resolver::kIsQualified);
@@ -455,10 +463,12 @@
const String& class_name =
String::Handle(isolate_lib.PrivateName(Symbols::_SendPortImpl()));
const int kNumArguments = 1;
+ const String& function_name =
+ String::Handle(isolate_lib.PrivateName(Symbols::_create()));
const Function& function = Function::Handle(
Resolver::ResolveStatic(isolate_lib,
class_name,
- Symbols::_create(),
+ function_name,
kNumArguments,
Object::empty_array(),
Resolver::kIsQualified));
@@ -490,7 +500,10 @@
RawObject* DartLibraryCalls::PortGetId(const Instance& port) {
const Class& cls = Class::Handle(port.clazz());
- const String& func_name = String::Handle(Field::GetterName(Symbols::_id()));
+ const Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
+ const String& func_name =
+ String::Handle(isolate_lib.PrivateName(
+ String::Handle(Field::GetterName(Symbols::_id()))));
const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name));
ASSERT(!func.IsNull());
const Array& args = Array::Handle(Array::New(1));
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698