Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmony modules #18

Closed
wants to merge 10 commits into from
Closed

Harmony modules #18

wants to merge 10 commits into from

Conversation

@dherman
Copy link
Contributor

@dherman dherman commented Dec 29, 2010

Adds a prototype of Harmony modules to the interpreter, when in Harmony mode (./njs -H).

Dave

@taustin

This comment has been minimized.

Copy link

@taustin taustin commented on lib/jsexec.js in 31b7ca8 Feb 5, 2011

I have one concern here. In Zaphod, I'm relying on the noPropFound hook to give me a way to look up elements from the HTML. Here is the Zaphod snippet just for reference:
Narcissus.definitions.noPropFound = function(name) {
var value = content.document.getElementById(name);
if (value) {
return Proxy.create(Zaphod.createElementHandler(value));
}
else return undefined;
}

I might be able to do the same thing without it, but if possible I'd like to keep that hook. (On the other hand, if we decide to remove it, we should also get rid of it from jsdefs.js.)

@taustin

This comment has been minimized.

Copy link

@taustin taustin commented on lib/jsexec.js in 31b7ca8 Feb 5, 2011

Same note here about noPropFound.

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsdefs.js in 5b813de Feb 7, 2011

no {}

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsparse.js in 5b813de Feb 7, 2011

no {}

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsparse.js in 5b813de Feb 8, 2011

Maybe say why, if the token is blacklisted? Could be a followup. It'd be nice to say "modules aren't allowed because you aren't in Harmony mode".

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsparse.js in 5b813de Feb 8, 2011

Here too.

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsresolve.js in f9432a3 Feb 8, 2011

Just use an object or an array lookup, perhaps?

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsresolve.js in f9432a3 Feb 8, 2011

Might want a comment here saying // global, module, or function frame

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsresolve.js in f9432a3 Feb 8, 2011

no {}

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsresolve.js in f9432a3 Feb 8, 2011

(def.type === IMPORT_DEF)

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsexec.js in 17d5a2f Feb 9, 2011

Not sure what this is for…

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsexec.js in 17d5a2f Feb 9, 2011

Could you add a comment explaining what x.type !== EVAL_CODE is for? My brain hurts :)

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsexec.js in 17d5a2f Feb 9, 2011

};

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on a7ba7e1 Feb 9, 2011

This rocks.

This comment has been minimized.

Copy link

@pcwalton pcwalton replied Feb 10, 2011

r=me

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on lib/jsdefs.js in 9d6d189 Feb 9, 2011

Maybe "mixin"?

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on 97edae4 Feb 10, 2011

r=me

@pcwalton

This comment has been minimized.

Copy link

@pcwalton pcwalton commented on 6401781 Feb 10, 2011

r=me

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants