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

Unified Diff: src/snapshot/natives-external.cc

Issue 1303463002: Remove inline header includes from natives.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 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/snapshot/natives-common.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/natives-external.cc
diff --git a/src/snapshot/natives-external.cc b/src/snapshot/natives-external.cc
index 94fc2c11ff8c4aa950d9b14f767ed527732405a8..e0df27f3ad5c20c41433b1724f6c8dbe345c8dcf 100644
--- a/src/snapshot/natives-external.cc
+++ b/src/snapshot/natives-external.cc
@@ -229,11 +229,19 @@ Vector<const char> NativesCollection<type>::GetScriptsSource() {
}
-// The compiler can't 'see' all uses of the static methods and hence
-// my choice to elide them. This we'll explicitly instantiate these.
-template class NativesCollection<CORE>;
-template class NativesCollection<CODE_STUB>;
-template class NativesCollection<EXPERIMENTAL>;
-template class NativesCollection<EXTRAS>;
+// Explicit template instantiations.
+#define INSTANTIATE_TEMPLATES(T) \
+ template int NativesCollection<T>::GetBuiltinsCount(); \
+ template int NativesCollection<T>::GetDebuggerCount(); \
+ template int NativesCollection<T>::GetIndex(const char* name); \
+ template Vector<const char> NativesCollection<T>::GetScriptSource(int i); \
+ template Vector<const char> NativesCollection<T>::GetScriptName(int i); \
+ template Vector<const char> NativesCollection<T>::GetScriptsSource();
+INSTANTIATE_TEMPLATES(CORE)
+INSTANTIATE_TEMPLATES(CODE_STUB)
+INSTANTIATE_TEMPLATES(EXPERIMENTAL)
+INSTANTIATE_TEMPLATES(EXTRAS)
+#undef INSTANTIATE_TEMPLATES
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/snapshot/natives-common.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698