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

Unified Diff: src/runtime.cc

Issue 3181036: Created collector class and used it to collect identifiers during scanning. (Closed)
Patch Set: Created 10 years, 4 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 | « src/runtime.h ('k') | src/scanner.h » ('j') | src/utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index d46b390ed3566b8febcf3267fe3aab3e92a6f0a1..1122d331a4fd0519799fc6bf2b97ace49889109c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -10688,9 +10688,10 @@ Runtime::Function* Runtime::FunctionForId(FunctionId fid) {
}
-Runtime::Function* Runtime::FunctionForName(const char* name) {
+Runtime::Function* Runtime::FunctionForName(Vector<const char> name) {
for (Function* f = Runtime_functions; f->name != NULL; f++) {
- if (strcmp(f->name, name) == 0) {
+ if (strncmp(f->name, name.start(), name.length()) == 0
+ && f->name[name.length()] == 0) {
return f;
}
}
« no previous file with comments | « src/runtime.h ('k') | src/scanner.h » ('j') | src/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698