1.2 KiB
Public APIs
The Name of public API header
- Escargot.h
We need to rename former Escargot.h to EscargotDef.h. Current Escargot.h is not the api header. It is collection of macros like LIKELY, COMPILER.
- EscargotAPI.h
JerryScript uses the name api, exactly jerry-api.h
- EscargotPublic.h
Pando uses this convention.
The Name of global utilities
Like v8::V8::Initialize, we sometimes want to initialize or get or set something belongs into global.
Here, by `global', I means it does not belong to a specific VMInstance.
For example, ICU or Heap is initialized and used by all VMInstances. I want to put them in a class.
In v8, it uses V8. Please notify v is capitalized. What would be suitable to us ?
-
Escargot::Escargot2 -
Escargot::Globals
-
Escargot::Public
Isolate or Not Isolate
We don't support isolation. We share many things including heap.We use globally unique JS heap space backing by boehm gc. So Escargot had not needed a pointer to JS heap. Besides, in typical JavaScript Engines, all the function that may allocate memory from JavaScript heap must provides a way to access to JS heap. Should we prepare the situation of isolate support? If so, we need to design almost all APis accepts VMInstace as the first parameter.