Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/nodejs/src/node_v8.h
1 #ifndef SRC_NODE_V8_H_ 2 #define SRC_NODE_V8_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 #include <sstream> 7 #include "aliased_buffer.h" 8 #include "base_object.h" 9 #include "json_utils.h" 10 #include "node_snapshotable.h" 11 #include "util.h" 12 #include "v8.h" 13 14 namespace node { 15 class Environment; 16 struct InternalFieldInfoBase; 17 18 namespace v8_utils { 19 class BindingData : public SnapshotableObject { 20 public: 21 struct InternalFieldInfo : public node::InternalFieldInfoBase { 22 AliasedBufferIndex heap_statistics_buffer; 23 AliasedBufferIndex heap_space_statistics_buffer; 24 AliasedBufferIndex heap_code_statistics_buffer; 25 }; 26 BindingData(Realm* realm, 27 v8::Local<v8::Object> obj, 28 InternalFieldInfo* info = nullptr); 29 30 SERIALIZABLE_OBJECT_METHODS() 31 SET_BINDING_ID(v8_binding_data) 32 33 AliasedFloat64Array heap_statistics_buffer; 34 AliasedFloat64Array heap_space_statistics_buffer; 35 AliasedFloat64Array heap_code_statistics_buffer; 36 37 void MemoryInfo(MemoryTracker* tracker) const override; 38 SET_SELF_SIZE(BindingData) 39 SET_MEMORY_INFO_NAME(BindingData) 40 41 private: 42 InternalFieldInfo* internal_field_info_ = nullptr; 43 }; 44 45 class GCProfiler : public BaseObject { 46 public: 47 enum class GCProfilerState { kInitialized, kStarted, kStopped }; 48 GCProfiler(Environment* env, v8::Local<v8::Object> object); 49 inline ~GCProfiler() override; 50 static void New(const v8::FunctionCallbackInfo<v8::Value>& args); 51 static void Start(const v8::FunctionCallbackInfo<v8::Value>& args); 52 static void Stop(const v8::FunctionCallbackInfo<v8::Value>& args); 53 54 JSONWriter* writer(); 55 56 std::ostringstream* out_stream(); 57 58 SET_NO_MEMORY_INFO() 59 SET_MEMORY_INFO_NAME(GCProfiler) 60 SET_SELF_SIZE(GCProfiler) 61 62 uint64_t start_time; 63 uint8_t current_gc_type; 64 GCProfilerState state; 65 66 private: 67 std::ostringstream out_stream_; 68 JSONWriter writer_; 69 }; 70 71 } // namespace v8_utils 72 73 } // namespace node 74 75 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 76 77 #endif // SRC_NODE_V8_H_