File tree Expand file tree Collapse file tree 3 files changed +265
-205
lines changed Expand file tree Collapse file tree 3 files changed +265
-205
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,22 @@ ecma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on
204
204
return JERRY_CONTEXT (ecma_builtin_objects )[builtin_id ];
205
205
} /* ecma_builtin_get */
206
206
207
+ /**
208
+ * Get reference to the global object
209
+ *
210
+ * Note:
211
+ * Does not increase the reference counter.
212
+ *
213
+ * @return pointer to the global object
214
+ */
215
+ inline ecma_object_t * JERRY_ATTR_ALWAYS_INLINE
216
+ ecma_builtin_get_global (void )
217
+ {
218
+ JERRY_ASSERT (JERRY_CONTEXT (ecma_builtin_objects )[ECMA_BUILTIN_ID_GLOBAL ] != NULL );
219
+
220
+ return JERRY_CONTEXT (ecma_builtin_objects )[ECMA_BUILTIN_ID_GLOBAL ];
221
+ } /* ecma_builtin_get_global */
222
+
207
223
/**
208
224
* Checks whether the given function is a built-in routine
209
225
*
Original file line number Diff line number Diff line change 96
96
ecma_builtin_is (ecma_object_t * obj_p , ecma_builtin_id_t builtin_id );
97
97
ecma_object_t *
98
98
ecma_builtin_get (ecma_builtin_id_t builtin_id );
99
+ ecma_object_t *
100
+ ecma_builtin_get_global (void );
99
101
bool
100
102
ecma_builtin_function_is_routine (ecma_object_t * func_obj_p );
101
103
You can’t perform that action at this time.
0 commit comments