pmarcinkiew / iotjs

Platform for Internet of Things with JavaScript http://www.iotjs.net
Other
0 stars 1 forks source link

Avoid source string duplication during require (#1255) #103

Closed pmarcinkiew closed 6 years ago

pmarcinkiew commented 6 years ago

When loading an external js file via require the source code was duplicated internally to wrap file contents into a function.

Using the jerry_parse_function method it is possible to directly create the function from the source without wrapping the source into a function.

IoT.js-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com