OLD | NEW |
---|---|
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_NATIVES_H_ | 5 #ifndef V8_NATIVES_H_ |
6 #define V8_NATIVES_H_ | 6 #define V8_NATIVES_H_ |
7 | 7 |
8 #include "vector.h" | |
9 | |
10 namespace v8 { class StartupData; } | |
Benedikt Meurer
2014/05/27 04:09:59
Nit: Add comment // Forward declarations.
vogelheim
2014/05/27 15:20:23
Done.
| |
11 | |
8 namespace v8 { | 12 namespace v8 { |
9 namespace internal { | 13 namespace internal { |
10 | 14 |
11 typedef bool (*NativeSourceCallback)(Vector<const char> name, | 15 typedef bool (*NativeSourceCallback)(Vector<const char> name, |
12 Vector<const char> source, | 16 Vector<const char> source, |
13 int index); | 17 int index); |
14 | 18 |
15 enum NativeType { | 19 enum NativeType { |
16 CORE, EXPERIMENTAL, D8, TEST | 20 CORE, EXPERIMENTAL, D8, TEST |
17 }; | 21 }; |
(...skipping 14 matching lines...) Expand all Loading... | |
32 static int GetRawScriptsSize(); | 36 static int GetRawScriptsSize(); |
33 static Vector<const char> GetRawScriptSource(int index); | 37 static Vector<const char> GetRawScriptSource(int index); |
34 static Vector<const char> GetScriptName(int index); | 38 static Vector<const char> GetScriptName(int index); |
35 static Vector<const byte> GetScriptsSource(); | 39 static Vector<const byte> GetScriptsSource(); |
36 static void SetRawScriptsSource(Vector<const char> raw_source); | 40 static void SetRawScriptsSource(Vector<const char> raw_source); |
37 }; | 41 }; |
38 | 42 |
39 typedef NativesCollection<CORE> Natives; | 43 typedef NativesCollection<CORE> Natives; |
40 typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives; | 44 typedef NativesCollection<EXPERIMENTAL> ExperimentalNatives; |
41 | 45 |
46 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
47 // Used for reading the natives at runtime. Implementation in natives-empty.cc | |
48 void SetNativesFromFile(StartupData* natives_blob); | |
49 #endif | |
50 | |
42 } } // namespace v8::internal | 51 } } // namespace v8::internal |
43 | 52 |
44 #endif // V8_NATIVES_H_ | 53 #endif // V8_NATIVES_H_ |
OLD | NEW |