Skip to content

Instantly share code, notes, and snippets.

View tolmasky's full-sized avatar

Francisco Ryan Tolmasky I tolmasky

View GitHub Profile
var rootNode = new StaticResourceNode("", null, StaticResourceNode.DirectoryType, YES),
cwd = FILE.cwd();
rootNode.resolveSubPathAsDirectories(FILE.dirname(cwd));
rootNode.resolveSubPath(cwd, StaticResourceNode.DirectoryType, function(cwdNode)
{
var includePaths = global.OBJJ_INCLUDE_PATHS || ["Frameworks", "Frameworks/Debug"],
index = 0,
count = includePaths.length;
function method()
{
alert(x);
}
window.setTimeout(function()
{
var x = 7;
method();
function method()
{
alert(x);
}
var x = 7;
method();
function print_something()
{
console.log(something);
}
var something = long_operation();
print_something();
var something = long_operation();
print_something();
function code_block()
{
function print_something()
{
console.log(something);
}
var something = long_operation();
function code_block()
{
function print_something()
{
console.log(something);
}
date = new Date();
function print_something()
{
console.log(something);
}
eval("var something = long_operation()");
print_something();
eval("var something = long_operation()");
print_something();
Francisco-Tolmaskys-MacBook:Resources tolmasky$ NARWHAL_ENGINE=jsc objj
objj> objj_executeFile
i dont understand
load em up
DEPENDENCY: initiated by (Anonymous)
DEPENDENCY: Ended
done with that
objj_executeFile
function objj_eval(/*String*/ aString)
{
Executable.setCommonJSArguments(require, exports, module, system, print, window);
var executable = preprocess(aString, "", 0),
objj_executeFile = fileExecuterForPath(FILE.cwd()),
objj_importFile = fileImporterForPath(FILE.cwd());
print("i dont understand");try{
if (!executable.hasLoadedFileDependencies()){print("load em up");
executable.loadFileDependencies();}}catch(e) { print("error?" + e); }
fileExecuterForPath = function(aPath)
{
var executer = oldFileExecuterForPath(aPath);
return function()
{
record();
executer();
diff();
}