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

Unified Diff: src/contexts.cc

Issue 2324803002: [Parser] Avoid on-the-fly internalization for natives_syntax. (Closed)
Patch Set: Created 4 years, 3 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/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index d4910eac03d6bf38a607d7c5f992b5907fc52a0e..2de66c32ec168dd79a829657ea55a9a48596d55e 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -532,6 +532,17 @@ int Context::IntrinsicIndexForName(Handle<String> string) {
#undef COMPARE_NAME
+#define COMPARE_NAME(index, type, name) \
+ if (strncmp(string, #name, length) == 0) return index;
+
+int Context::IntrinsicIndexForName(const unsigned char* unsigned_string,
+ int length) {
+ const char* string = reinterpret_cast<const char*>(unsigned_string);
+ NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(COMPARE_NAME);
+ return kNotFound;
+}
+
+#undef COMPARE_NAME
#ifdef DEBUG
« no previous file with comments | « src/contexts.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698