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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/snapshot/natives-common.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/snapshot/natives.h" 5 #include "src/snapshot/natives.h"
6 6
7 #include "src/base/logging.h" 7 #include "src/base/logging.h"
8 #include "src/list.h" 8 #include "src/list.h"
9 #include "src/list-inl.h" 9 #include "src/list-inl.h"
10 #include "src/snapshot/snapshot-source-sink.h" 10 #include "src/snapshot/snapshot-source-sink.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 Vector<const char> NativesCollection<type>::GetScriptName(int index) { 222 Vector<const char> NativesCollection<type>::GetScriptName(int index) {
223 return NativesHolder<type>::get()->GetScriptName(index); 223 return NativesHolder<type>::get()->GetScriptName(index);
224 } 224 }
225 225
226 template <NativeType type> 226 template <NativeType type>
227 Vector<const char> NativesCollection<type>::GetScriptsSource() { 227 Vector<const char> NativesCollection<type>::GetScriptsSource() {
228 return NativesHolder<type>::get()->GetScriptsSource(); 228 return NativesHolder<type>::get()->GetScriptsSource();
229 } 229 }
230 230
231 231
232 // The compiler can't 'see' all uses of the static methods and hence 232 // Explicit template instantiations.
233 // my choice to elide them. This we'll explicitly instantiate these. 233 #define INSTANTIATE_TEMPLATES(T) \
234 template class NativesCollection<CORE>; 234 template int NativesCollection<T>::GetBuiltinsCount(); \
235 template class NativesCollection<CODE_STUB>; 235 template int NativesCollection<T>::GetDebuggerCount(); \
236 template class NativesCollection<EXPERIMENTAL>; 236 template int NativesCollection<T>::GetIndex(const char* name); \
237 template class NativesCollection<EXTRAS>; 237 template Vector<const char> NativesCollection<T>::GetScriptSource(int i); \
238 template Vector<const char> NativesCollection<T>::GetScriptName(int i); \
239 template Vector<const char> NativesCollection<T>::GetScriptsSource();
240 INSTANTIATE_TEMPLATES(CORE)
241 INSTANTIATE_TEMPLATES(CODE_STUB)
242 INSTANTIATE_TEMPLATES(EXPERIMENTAL)
243 INSTANTIATE_TEMPLATES(EXTRAS)
244 #undef INSTANTIATE_TEMPLATES
245
238 } // namespace internal 246 } // namespace internal
239 } // namespace v8 247 } // namespace v8
OLDNEW
« 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