@ugo-studio/jspp 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +2 -2
  2. package/dist/analysis/scope.js +33 -4
  3. package/dist/analysis/typeAnalyzer.js +260 -21
  4. package/dist/ast/symbols.js +29 -0
  5. package/dist/cli-utils/args.js +57 -0
  6. package/dist/cli-utils/colors.js +9 -0
  7. package/dist/cli-utils/file-utils.js +20 -0
  8. package/dist/cli-utils/spinner.js +55 -0
  9. package/dist/cli.js +105 -31
  10. package/dist/core/codegen/class-handlers.js +131 -0
  11. package/dist/core/codegen/control-flow-handlers.js +474 -0
  12. package/dist/core/codegen/declaration-handlers.js +36 -15
  13. package/dist/core/codegen/expression-handlers.js +579 -125
  14. package/dist/core/codegen/function-handlers.js +222 -37
  15. package/dist/core/codegen/helpers.js +158 -4
  16. package/dist/core/codegen/index.js +20 -8
  17. package/dist/core/codegen/literal-handlers.js +18 -6
  18. package/dist/core/codegen/statement-handlers.js +171 -228
  19. package/dist/core/codegen/visitor.js +31 -3
  20. package/package.json +3 -3
  21. package/src/prelude/any_value.hpp +510 -633
  22. package/src/prelude/any_value_access.hpp +151 -0
  23. package/src/prelude/any_value_defines.hpp +190 -0
  24. package/src/prelude/any_value_helpers.hpp +139 -225
  25. package/src/prelude/exception.hpp +32 -0
  26. package/src/prelude/exception_helpers.hpp +49 -0
  27. package/src/prelude/index.hpp +25 -9
  28. package/src/prelude/library/array.hpp +190 -0
  29. package/src/prelude/library/console.hpp +14 -13
  30. package/src/prelude/library/error.hpp +113 -0
  31. package/src/prelude/library/function.hpp +10 -0
  32. package/src/prelude/library/global.hpp +35 -4
  33. package/src/prelude/library/math.hpp +308 -0
  34. package/src/prelude/library/object.hpp +288 -0
  35. package/src/prelude/library/performance.hpp +2 -2
  36. package/src/prelude/library/process.hpp +39 -0
  37. package/src/prelude/library/promise.hpp +131 -0
  38. package/src/prelude/library/symbol.hpp +46 -59
  39. package/src/prelude/library/timer.hpp +92 -0
  40. package/src/prelude/scheduler.hpp +145 -0
  41. package/src/prelude/types.hpp +58 -1
  42. package/src/prelude/utils/access.hpp +345 -0
  43. package/src/prelude/utils/assignment_operators.hpp +99 -0
  44. package/src/prelude/utils/log_any_value/array.hpp +245 -0
  45. package/src/prelude/utils/log_any_value/config.hpp +32 -0
  46. package/src/prelude/utils/log_any_value/function.hpp +39 -0
  47. package/src/prelude/utils/log_any_value/fwd.hpp +15 -0
  48. package/src/prelude/utils/log_any_value/helpers.hpp +62 -0
  49. package/src/prelude/utils/log_any_value/log_any_value.hpp +94 -0
  50. package/src/prelude/utils/log_any_value/object.hpp +136 -0
  51. package/src/prelude/utils/log_any_value/primitives.hpp +43 -0
  52. package/src/prelude/utils/operators.hpp +751 -0
  53. package/src/prelude/utils/well_known_symbols.hpp +25 -0
  54. package/src/prelude/values/array.hpp +10 -7
  55. package/src/prelude/{descriptors.hpp → values/descriptors.hpp} +2 -2
  56. package/src/prelude/values/function.hpp +85 -51
  57. package/src/prelude/values/helpers/array.hpp +80 -35
  58. package/src/prelude/values/helpers/function.hpp +110 -77
  59. package/src/prelude/values/helpers/iterator.hpp +16 -10
  60. package/src/prelude/values/helpers/object.hpp +85 -10
  61. package/src/prelude/values/helpers/promise.hpp +181 -0
  62. package/src/prelude/values/helpers/string.hpp +3 -3
  63. package/src/prelude/values/helpers/symbol.hpp +2 -2
  64. package/src/prelude/values/iterator.hpp +14 -6
  65. package/src/prelude/values/object.hpp +14 -3
  66. package/src/prelude/values/promise.hpp +73 -0
  67. package/src/prelude/values/prototypes/array.hpp +855 -16
  68. package/src/prelude/values/prototypes/function.hpp +4 -4
  69. package/src/prelude/values/prototypes/iterator.hpp +11 -10
  70. package/src/prelude/values/prototypes/number.hpp +153 -0
  71. package/src/prelude/values/prototypes/object.hpp +26 -0
  72. package/src/prelude/values/prototypes/promise.hpp +134 -0
  73. package/src/prelude/values/prototypes/string.hpp +29 -29
  74. package/src/prelude/values/prototypes/symbol.hpp +22 -3
  75. package/src/prelude/values/shape.hpp +52 -0
  76. package/src/prelude/values/string.hpp +1 -1
  77. package/src/prelude/values/symbol.hpp +1 -1
  78. package/src/prelude/access.hpp +0 -91
  79. package/src/prelude/error.hpp +0 -31
  80. package/src/prelude/error_helpers.hpp +0 -59
  81. package/src/prelude/log_string.hpp +0 -407
  82. package/src/prelude/operators.hpp +0 -256
  83. package/src/prelude/well_known_symbols.hpp +0 -14
@@ -1,225 +1,139 @@
1
- #pragma once
2
-
3
- #include "types.hpp"
4
- #include "any_value.hpp"
5
- #include "values/string.hpp"
6
-
7
- const bool jspp::AnyValue::is_truthy() const noexcept
8
- {
9
- switch (storage.type)
10
- {
11
- case JsType::Boolean:
12
- return storage.boolean;
13
- case JsType::Number:
14
- return storage.number != 0.0;
15
- case JsType::String:
16
- return !storage.str->value.empty();
17
- case JsType::Undefined:
18
- return false;
19
- case JsType::Null:
20
- return false;
21
- case JsType::Uninitialized:
22
- return false;
23
- default:
24
- return true;
25
- }
26
- }
27
-
28
- const bool jspp::AnyValue::is_strictly_equal_to(const AnyValue &other) const noexcept
29
- {
30
- if (storage.type == other.storage.type)
31
- {
32
- switch (storage.type)
33
- {
34
- case JsType::Boolean:
35
- return storage.boolean == other.storage.boolean;
36
- case JsType::Number:
37
- return storage.number == other.storage.number;
38
- case JsType::String:
39
- return (storage.str->value == other.storage.str->value);
40
- case JsType::Array:
41
- return (storage.array == other.storage.array);
42
- case JsType::Object:
43
- return (storage.object == other.storage.object);
44
- case JsType::Function:
45
- return (storage.function == other.storage.function);
46
- case JsType::Symbol:
47
- // Symbols are unique by reference/pointer identity
48
- return (storage.symbol == other.storage.symbol);
49
- case JsType::DataDescriptor:
50
- return (resolve_property_for_read(*this).is_strictly_equal_to(resolve_property_for_read(other)));
51
- case JsType::AccessorDescriptor:
52
- return (resolve_property_for_read(*this).is_strictly_equal_to(resolve_property_for_read(other)));
53
- default:
54
- return true;
55
- }
56
- }
57
- return false;
58
- }
59
- const bool jspp::AnyValue::is_equal_to(const AnyValue &other) const noexcept
60
- {
61
- // Implements JavaScript's Abstract Equality Comparison Algorithm (==)
62
- // Step 1: If types are the same, use strict equality (===)
63
- if (storage.type == other.storage.type)
64
- {
65
- return is_strictly_equal_to(other);
66
- }
67
- // Steps 2 & 3: null == undefined
68
- if ((is_null() && other.is_undefined()) || (is_undefined() && other.is_null()))
69
- {
70
- return true;
71
- }
72
- // Step 4 & 5: number == string
73
- if (is_number() && other.is_string())
74
- {
75
- double num_this = this->as_double();
76
- double num_other;
77
- try
78
- {
79
- const std::string &s = other.as_string()->value;
80
- // JS considers empty string or whitespace-only string to be 0
81
- if (s.empty() || std::all_of(s.begin(), s.end(), [](unsigned char c)
82
- { return std::isspace(c); }))
83
- {
84
- num_other = 0.0;
85
- }
86
- else
87
- {
88
- size_t pos;
89
- num_other = std::stod(s, &pos);
90
- // Check if the entire string was consumed, allowing for trailing whitespace
91
- while (pos < s.length() && std::isspace(static_cast<unsigned char>(s[pos])))
92
- {
93
- pos++;
94
- }
95
- if (pos != s.length())
96
- {
97
- num_other = std::numeric_limits<double>::quiet_NaN();
98
- }
99
- }
100
- }
101
- catch (...)
102
- {
103
- num_other = std::numeric_limits<double>::quiet_NaN();
104
- }
105
- return num_this == num_other;
106
- }
107
- if (is_string() && other.is_number())
108
- {
109
- // Delegate to the other operand to avoid code duplication
110
- return other.is_equal_to(*this);
111
- }
112
- // Step 6 & 7: boolean == any
113
- if (is_boolean())
114
- {
115
- // Convert boolean to number and re-compare
116
- return AnyValue::make_number(as_boolean() ? 1.0 : 0.0).is_equal_to(other);
117
- }
118
- if (other.is_boolean())
119
- {
120
- // Convert boolean to number and re-compare
121
- return is_equal_to(AnyValue::make_number(other.as_boolean() ? 1.0 : 0.0));
122
- }
123
- // Step 8 & 9: object == (string or number or symbol)
124
- // Simplified: Objects convert to primitives.
125
- if ((is_object() || is_array() || is_function()) && (other.is_string() || other.is_number() || other.is_symbol()))
126
- {
127
- // Convert object to primitive (string) and re-compare.
128
- // This is a simplification of JS's ToPrimitive.
129
- return AnyValue::make_string(to_std_string()).is_equal_to(other);
130
- }
131
- if ((other.is_object() || other.is_array() || other.is_function()) && (is_string() || is_number() || is_symbol()))
132
- {
133
- return other.is_equal_to(*this);
134
- }
135
- // Step 10: Parse datacriptor or accessor descriptor to primitive and re-compare
136
- if (is_data_descriptor() || is_accessor_descriptor())
137
- {
138
- AnyValue prim = resolve_property_for_read(*this);
139
- return prim.is_equal_to(other);
140
- }
141
- // Step 11: All other cases (e.g., object == null) are false.
142
- return false;
143
- }
144
-
145
- const jspp::AnyValue jspp::AnyValue::is_strictly_equal_to_primitive(const AnyValue &other) const noexcept
146
- {
147
- return AnyValue::make_boolean(is_strictly_equal_to(other));
148
- }
149
- const jspp::AnyValue jspp::AnyValue::is_equal_to_primitive(const AnyValue &other) const noexcept
150
- {
151
- return AnyValue::make_boolean(is_equal_to(other));
152
- }
153
-
154
- const jspp::AnyValue jspp::AnyValue::not_strictly_equal_to_primitive(const AnyValue &other) const noexcept
155
- {
156
- return AnyValue::make_boolean(!is_strictly_equal_to(other));
157
- }
158
- const jspp::AnyValue jspp::AnyValue::not_equal_to_primitive(const AnyValue &other) const noexcept
159
- {
160
- return AnyValue::make_boolean(!is_equal_to(other));
161
- }
162
-
163
- const std::string jspp::AnyValue::to_std_string() const noexcept
164
- {
165
- switch (storage.type)
166
- {
167
- case JsType::Undefined:
168
- return "undefined";
169
- case JsType::Null:
170
- return "null";
171
- case JsType::Boolean:
172
- return storage.boolean ? "true" : "false";
173
- case JsType::String:
174
- return storage.str->to_std_string();
175
- case JsType::Object:
176
- return storage.object->to_std_string();
177
- case JsType::Array:
178
- return storage.array->to_std_string();
179
- case JsType::Function:
180
- return storage.function->to_std_string();
181
- case JsType::Iterator:
182
- return storage.iterator->to_std_string();
183
- case JsType::Symbol:
184
- return storage.symbol->to_std_string();
185
- case JsType::DataDescriptor:
186
- return storage.data_desc->value->to_std_string();
187
- case JsType::AccessorDescriptor:
188
- {
189
- if (storage.accessor_desc->get.has_value())
190
- return storage.accessor_desc->get.value()({}).to_std_string();
191
- else
192
- return "undefined";
193
- }
194
- case JsType::Number:
195
- {
196
- if (std::isnan(storage.number))
197
- {
198
- return "NaN";
199
- }
200
- if (std::abs(storage.number) >= 1e21 || (std::abs(storage.number) > 0 && std::abs(storage.number) < 1e-6))
201
- {
202
- std::ostringstream oss;
203
- oss << std::scientific << std::setprecision(4) << storage.number;
204
- return oss.str();
205
- }
206
- else
207
- {
208
- std::ostringstream oss;
209
- oss << std::setprecision(6) << std::fixed << storage.number;
210
- std::string s = oss.str();
211
- s.erase(s.find_last_not_of('0') + 1, std::string::npos);
212
- if (!s.empty() && s.back() == '.')
213
- {
214
- s.pop_back();
215
- }
216
- return s;
217
- }
218
- }
219
- // Uninitialized and default should not be reached under normal circumstances
220
- case JsType::Uninitialized:
221
- return "<uninitialized>";
222
- default:
223
- return "";
224
- }
225
- }
1
+ #pragma once
2
+
3
+ #include "types.hpp"
4
+ #include "any_value.hpp"
5
+ #include "values/string.hpp"
6
+ #include "exception.hpp"
7
+
8
+ namespace jspp
9
+ {
10
+ std::string AnyValue::to_std_string() const
11
+ {
12
+ switch (get_type())
13
+ {
14
+ case JsType::Undefined:
15
+ return "undefined";
16
+ case JsType::Null:
17
+ return "null";
18
+ case JsType::Boolean:
19
+ return std::get<bool>(storage) ? "true" : "false";
20
+ case JsType::String:
21
+ return std::get<std::shared_ptr<JsString>>(storage)->to_std_string();
22
+ case JsType::Object:
23
+ return std::get<std::shared_ptr<JsObject>>(storage)->to_std_string();
24
+ case JsType::Array:
25
+ return std::get<std::shared_ptr<JsArray>>(storage)->to_std_string();
26
+ case JsType::Function:
27
+ return std::get<std::shared_ptr<JsFunction>>(storage)->to_std_string();
28
+ case JsType::Iterator:
29
+ return std::get<std::shared_ptr<JsIterator<AnyValue>>>(storage)->to_std_string();
30
+ case JsType::Promise:
31
+ return std::get<std::shared_ptr<JsPromise>>(storage)->to_std_string();
32
+ case JsType::Symbol:
33
+ return std::get<std::shared_ptr<JsSymbol>>(storage)->to_std_string();
34
+ case JsType::DataDescriptor:
35
+ return std::get<std::shared_ptr<DataDescriptor>>(storage)->value->to_std_string();
36
+ case JsType::AccessorDescriptor:
37
+ {
38
+ if (std::get<std::shared_ptr<AccessorDescriptor>>(storage)->get.has_value())
39
+ return std::get<std::shared_ptr<AccessorDescriptor>>(storage)->get.value()(*this, {}).to_std_string();
40
+ else
41
+ return "undefined";
42
+ }
43
+ case JsType::Number:
44
+ {
45
+ double num = std::get<double>(storage);
46
+ if (std::isnan(num))
47
+ {
48
+ return "NaN";
49
+ }
50
+ if (std::abs(num) >= 1e21 || (std::abs(num) > 0 && std::abs(num) < 1e-6))
51
+ {
52
+ std::ostringstream oss;
53
+ oss << std::scientific << std::setprecision(4) << num;
54
+ return oss.str();
55
+ }
56
+ else
57
+ {
58
+ std::ostringstream oss;
59
+ oss << std::setprecision(6) << std::fixed << num;
60
+ std::string s = oss.str();
61
+ s.erase(s.find_last_not_of('0') + 1, std::string::npos);
62
+ if (!s.empty() && s.back() == '.')
63
+ {
64
+ s.pop_back();
65
+ }
66
+ return s;
67
+ }
68
+ }
69
+ case JsType::Uninitialized:
70
+ Exception::throw_uninitialized_reference("#<Object>");
71
+ default:
72
+ return "";
73
+ }
74
+ }
75
+
76
+ void AnyValue::set_prototype(const AnyValue &proto)
77
+ {
78
+ if (is_object())
79
+ {
80
+ std::get<std::shared_ptr<JsObject>>(storage)->proto = std::make_shared<AnyValue>(proto);
81
+ }
82
+ else if (is_array())
83
+ {
84
+ std::get<std::shared_ptr<JsArray>>(storage)->proto = std::make_shared<AnyValue>(proto);
85
+ }
86
+ else if (is_function())
87
+ {
88
+ std::get<std::shared_ptr<JsFunction>>(storage)->proto = std::make_shared<AnyValue>(proto);
89
+ }
90
+ else if (is_uninitialized())
91
+ {
92
+ Exception::throw_uninitialized_reference("#<Object>");
93
+ }
94
+ }
95
+
96
+ // AnyValue::call implementation
97
+ const AnyValue AnyValue::call(const AnyValue &thisVal, std::span<const AnyValue> args, const std::optional<std::string> &expr = std::nullopt) const
98
+ {
99
+ if (!is_function())
100
+ {
101
+ throw Exception::make_exception(expr.value_or(to_std_string()) + " is not a function", "TypeError");
102
+ }
103
+ return as_function()->call(thisVal, args); // Convert to function before calling, to avoid an infinite loop
104
+ }
105
+
106
+ // AnyValue::construct implementation
107
+ const AnyValue AnyValue::construct(std::span<const AnyValue> args, const std::optional<std::string> &name) const
108
+ {
109
+ if (!is_function() || !as_function()->is_constructor)
110
+ {
111
+ // std::cerr << "Construct fail: " << name.value_or(to_std_string()) << " is_function=" << is_function() << " is_constructor=" << (is_function() ? as_function()->is_constructor : false) << std::endl;
112
+ throw Exception::make_exception(name.value_or(to_std_string()) + " is not a constructor", "TypeError");
113
+ }
114
+
115
+ // 1. Get prototype
116
+ AnyValue proto = get_own_property("prototype");
117
+ // If prototype is not an object, default to a plain object (which ideally inherits from Object.prototype)
118
+ // Here we just make a plain object.
119
+ if (!proto.is_object())
120
+ {
121
+ proto = AnyValue::make_object({});
122
+ }
123
+
124
+ // 2. Create instance
125
+ AnyValue instance = AnyValue::make_object_with_proto({}, proto);
126
+
127
+ // 3. Call function
128
+ // We pass 'instance' as 'this'
129
+ AnyValue result = call(instance, args);
130
+
131
+ // 4. Return result if object, else instance
132
+ if (result.is_object() || result.is_function() || result.is_array() || result.is_promise())
133
+ {
134
+ return result;
135
+ }
136
+ return instance;
137
+ }
138
+
139
+ }
@@ -0,0 +1,32 @@
1
+
2
+ #pragma once
3
+
4
+ #include <exception>
5
+ #include "types.hpp"
6
+
7
+ namespace jspp
8
+ {
9
+ class AnyValue;
10
+
11
+ struct Exception : std::exception
12
+ {
13
+ std::shared_ptr<AnyValue> data;
14
+
15
+ explicit Exception(std::shared_ptr<AnyValue> d)
16
+ : data(std::move(d)) {}
17
+ explicit Exception(const AnyValue &value)
18
+ : data(std::make_shared<AnyValue>(value)) {}
19
+ explicit Exception(AnyValue &&value)
20
+ : data(std::make_shared<AnyValue>(std::move(value))) {}
21
+
22
+ const char *what() const noexcept override;
23
+ static Exception make_exception(const std::string &message, const std::string &name);
24
+ static AnyValue exception_to_any_value(const std::exception &ex);
25
+
26
+ // --- THROWERS
27
+ static AnyValue throw_unresolved_reference(const std::string &var_name);
28
+ static AnyValue throw_uninitialized_reference(const std::string &var_name);
29
+ static AnyValue throw_immutable_assignment();
30
+ static AnyValue throw_invalid_return_statement();
31
+ };
32
+ }
@@ -0,0 +1,49 @@
1
+ #pragma once
2
+
3
+ #include "types.hpp"
4
+ #include "exception.hpp"
5
+ #include "any_value.hpp"
6
+
7
+ const char *jspp::Exception::what() const noexcept
8
+ {
9
+ return data->to_std_string().c_str();
10
+ }
11
+
12
+ jspp::Exception jspp::Exception::make_exception(const std::string &message, const std::string &name = "Error")
13
+ {
14
+ // Use the global Error object to construct the exception
15
+ std::vector<AnyValue> args = {AnyValue::make_string(message)};
16
+ AnyValue errorObj = ::Error.construct(args, name);
17
+ errorObj.define_data_property("name", AnyValue::make_string(name), true, false, true);
18
+
19
+ return Exception(errorObj);
20
+ }
21
+ jspp::AnyValue jspp::Exception::exception_to_any_value(const std::exception &ex)
22
+ {
23
+ if (const jspp::Exception *err = dynamic_cast<const jspp::Exception *>(&ex))
24
+ {
25
+ return (*err->data);
26
+ }
27
+ else
28
+ {
29
+ return AnyValue::make_string(ex.what());
30
+ }
31
+ }
32
+
33
+ // --- THROWERS
34
+ jspp::AnyValue jspp::Exception::throw_unresolved_reference(const std::string &var_name)
35
+ {
36
+ throw Exception::make_exception(var_name + " is not defined", "ReferenceError");
37
+ }
38
+ jspp::AnyValue jspp::Exception::throw_uninitialized_reference(const std::string &var_name)
39
+ {
40
+ throw Exception::make_exception("Cannot access '" + var_name + "' before initialization", "ReferenceError");
41
+ }
42
+ jspp::AnyValue jspp::Exception::throw_immutable_assignment()
43
+ {
44
+ throw Exception::make_exception("Assignment to constant variable.", "TypeError");
45
+ }
46
+ jspp::AnyValue jspp::Exception::throw_invalid_return_statement()
47
+ {
48
+ throw Exception::make_exception("Return statements are only valid inside functions.", "SyntaxError");
49
+ }
@@ -1,43 +1,59 @@
1
1
  #pragma once
2
2
 
3
3
  #include "types.hpp"
4
- #include "well_known_symbols.hpp"
4
+ #include "utils/well_known_symbols.hpp"
5
5
 
6
6
  // values
7
+ #include "values/shape.hpp"
7
8
  #include "values/symbol.hpp"
8
9
  #include "values/non_values.hpp"
9
10
  #include "values/object.hpp"
10
11
  #include "values/array.hpp"
11
12
  #include "values/function.hpp"
12
13
  #include "values/iterator.hpp"
14
+ #include "values/promise.hpp"
13
15
  #include "values/string.hpp"
14
16
 
15
- #include "error.hpp"
16
- #include "descriptors.hpp"
17
17
  #include "any_value.hpp"
18
+ #include "values/descriptors.hpp"
18
19
  #include "any_value_helpers.hpp"
19
- #include "error_helpers.hpp"
20
+ #include "any_value_access.hpp"
21
+ #include "any_value_defines.hpp"
22
+ #include "library/error.hpp"
23
+ #include "exception_helpers.hpp"
24
+ #include "scheduler.hpp"
20
25
 
21
26
  #include "values/prototypes/symbol.hpp"
22
- #include "values/prototypes/string.hpp"
23
27
  #include "values/prototypes/object.hpp"
24
28
  #include "values/prototypes/array.hpp"
25
29
  #include "values/prototypes/function.hpp"
26
30
  #include "values/prototypes/iterator.hpp"
31
+ #include "values/prototypes/promise.hpp"
32
+ #include "values/prototypes/string.hpp"
33
+ #include "values/prototypes/number.hpp"
27
34
 
28
35
  #include "values/helpers/symbol.hpp"
29
36
  #include "values/helpers/object.hpp"
30
37
  #include "values/helpers/array.hpp"
31
38
  #include "values/helpers/function.hpp"
32
39
  #include "values/helpers/iterator.hpp"
40
+ #include "values/helpers/promise.hpp"
33
41
  #include "values/helpers/string.hpp"
34
42
 
35
- // helpers
36
- #include "operators.hpp"
37
- #include "access.hpp"
38
- #include "log_string.hpp"
43
+ // utilities
44
+ #include "utils/operators.hpp"
45
+ #include "utils/assignment_operators.hpp"
46
+ #include "utils/access.hpp"
47
+ #include "utils/log_any_value/log_any_value.hpp"
39
48
 
40
49
  // js standard libraries
41
50
  #include "library/symbol.hpp"
51
+ #include "library/process.hpp"
52
+ #include "library/function.hpp"
42
53
  #include "library/console.hpp"
43
54
  #include "library/performance.hpp"
55
+ #include "library/promise.hpp"
56
+ #include "library/math.hpp"
57
+ #include "library/object.hpp"
58
+ #include "library/array.hpp"
59
+ #include "library/global.hpp"