Chromium Code Reviews

Side by Side Diff: src/snapshot/natives-common.cc

Issue 2705293004: Remove infrastructure for experimental JS natives (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 // The common functionality when building with internal or external natives. 5 // The common functionality when building with internal or external natives.
6 6
7 #include "src/heap/heap.h" 7 #include "src/heap/heap.h"
8 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
9 #include "src/snapshot/natives.h" 9 #include "src/snapshot/natives.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 template <> 14 template <>
15 FixedArray* NativesCollection<CORE>::GetSourceCache(Heap* heap) { 15 FixedArray* NativesCollection<CORE>::GetSourceCache(Heap* heap) {
16 return heap->natives_source_cache(); 16 return heap->natives_source_cache();
17 } 17 }
18 18
19 19
20 template <> 20 template <>
21 FixedArray* NativesCollection<EXPERIMENTAL>::GetSourceCache(Heap* heap) {
22 return heap->experimental_natives_source_cache();
23 }
24
25
26 template <>
27 FixedArray* NativesCollection<EXTRAS>::GetSourceCache(Heap* heap) { 21 FixedArray* NativesCollection<EXTRAS>::GetSourceCache(Heap* heap) {
28 return heap->extra_natives_source_cache(); 22 return heap->extra_natives_source_cache();
29 } 23 }
30 24
31 25
32 template <> 26 template <>
33 FixedArray* NativesCollection<EXPERIMENTAL_EXTRAS>::GetSourceCache(Heap* heap) { 27 FixedArray* NativesCollection<EXPERIMENTAL_EXTRAS>::GetSourceCache(Heap* heap) {
34 return heap->experimental_extra_natives_source_cache(); 28 return heap->experimental_extra_natives_source_cache();
35 } 29 }
36 30
37 } // namespace internal 31 } // namespace internal
38 } // namespace v8 32 } // namespace v8
OLDNEW

Powered by Google App Engine