Hi all,
I'm trying to port a nodejs module called "sweet.js" into v8. I'm doing this by resolving the dependencies. Specifically, I'm replacing the calls to "require()" method of a module by replacing it with the actual code of the dependency.
e.g. Contents of "a.js"
var b=require('./b');
Contents of "b.js"
function(){
console.log('inside b');
}
Now I replace the contents of "a.js" as -
var b=(function(){
console.log('inside b');
});
However, I got stuck when I tried to resolve circular dependencies. "require()" somehow takes care of resolving circular dependencies "silently" as it says in the docs.
Could anyone please shed some light regarding this?