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

Unified Diff: vm/intrinsifier.cc

Issue 12095110: Restore factory names in the intrinsifier list to the way they were (is used in a special way durin… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « vm/intrinsifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intrinsifier.cc
===================================================================
--- vm/intrinsifier.cc (revision 17995)
+++ vm/intrinsifier.cc (working copy)
@@ -64,6 +64,19 @@
const char* function_name,
const char* test_class_name,
const char* test_function_name) {
+ // If test_function_name starts with a '.' we use that to indicate
+ // that it is a named constructor in the class. Therefore, if
+ // the class matches and the rest of the method name starting with
+ // the dot matches, we have found a match.
+ // We do not store the entire factory constructor name with the class
+ // (e.g: _GrowableObjectArray.withData) because the actual function name
+ // that we see here includes the private key.
+ if (test_function_name[0] == '.') {
+ function_name = strstr(function_name, ".");
+ if (function_name == NULL) {
+ return false;
+ }
+ }
return CompareNames(lib, test_class_name, function_class_name) &&
CompareNames(lib, test_function_name, function_name);
}
@@ -92,7 +105,11 @@
str = String::New(#class_name); \
cls = lib.LookupClassAllowPrivate(str); \
ASSERT(!cls.IsNull()); \
- str = String::New(#function_name); \
+ if (#function_name[0] == '.') { \
+ str = String::New(#class_name#function_name); \
+ } else { \
+ str = String::New(#function_name); \
+ } \
func = cls.LookupFunctionAllowPrivate(str); \
} \
ASSERT(!func.IsNull()); \
« no previous file with comments | « vm/intrinsifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698