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

Side by Side Diff: src/snapshot/natives.h

Issue 1284413002: Add experimental, non-snapshotted V8 extras (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@non-experimental-extras
Patch Set: Missing gn entries 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/heap/heap.cc ('k') | src/snapshot/natives-common.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 #ifndef V8_SNAPSHOT_NATIVES_H_ 5 #ifndef V8_SNAPSHOT_NATIVES_H_
6 #define V8_SNAPSHOT_NATIVES_H_ 6 #define V8_SNAPSHOT_NATIVES_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 #include "src/vector.h" 9 #include "src/vector.h"
10 10
11 namespace v8 { class StartupData; } // Forward declaration. 11 namespace v8 { class StartupData; } // Forward declaration.
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 enum NativeType { CORE, CODE_STUB, EXPERIMENTAL, EXTRAS, D8, TEST }; 16 enum NativeType {
17 CORE,
18 CODE_STUB,
19 EXPERIMENTAL,
20 EXTRAS,
21 EXPERIMENTAL_EXTRAS,
22 D8,
23 TEST
24 };
17 25
18 template <NativeType type> 26 template <NativeType type>
19 class NativesCollection { 27 class NativesCollection {
20 public: 28 public:
21 // The following methods are implemented in js2c-generated code: 29 // The following methods are implemented in js2c-generated code:
22 30
23 // Number of built-in scripts. 31 // Number of built-in scripts.
24 static int GetBuiltinsCount(); 32 static int GetBuiltinsCount();
25 // Number of debugger implementation scripts. 33 // Number of debugger implementation scripts.
26 static int GetDebuggerCount(); 34 static int GetDebuggerCount();
(...skipping 10 matching lines...) Expand all
37 // The following methods are implemented in natives-common.cc: 45 // The following methods are implemented in natives-common.cc:
38 46
39 static FixedArray* GetSourceCache(Heap* heap); 47 static FixedArray* GetSourceCache(Heap* heap);
40 static void UpdateSourceCache(Heap* heap); 48 static void UpdateSourceCache(Heap* heap);
41 }; 49 };
42 50
43 typedef NativesCollection<CORE> Natives; 51 typedef NativesCollection<CORE> Natives;
44 typedef NativesCollection<CODE_STUB> CodeStubNatives; 52 typedef NativesCollection<CODE_STUB> CodeStubNatives;
45 typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives; 53 typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives;
46 typedef NativesCollection<EXTRAS> ExtraNatives; 54 typedef NativesCollection<EXTRAS> ExtraNatives;
55 typedef NativesCollection<EXPERIMENTAL_EXTRAS> ExperimentalExtraNatives;
47 56
48 57
49 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 58 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
50 // Used for reading the natives at runtime. Implementation in natives-empty.cc 59 // Used for reading the natives at runtime. Implementation in natives-empty.cc
51 void SetNativesFromFile(StartupData* natives_blob); 60 void SetNativesFromFile(StartupData* natives_blob);
52 void ReadNatives(); 61 void ReadNatives();
53 void DisposeNatives(); 62 void DisposeNatives();
54 #endif 63 #endif
55 64
56 } } // namespace v8::internal 65 } } // namespace v8::internal
57 66
58 #endif // V8_SNAPSHOT_NATIVES_H_ 67 #endif // V8_SNAPSHOT_NATIVES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/snapshot/natives-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698