Skip to content

ES6 Modules#468

Merged
fealebenpae merged 1 commit intomasterfrom
es6-modules
Jan 12, 2016
Merged

ES6 Modules#468
fealebenpae merged 1 commit intomasterfrom
es6-modules

Conversation

@fealebenpae
Copy link
Copy Markdown
Contributor

As the title suggests, this introduces support for the ECMAScript 6 Modules syntax. In fact, ES6 Modules are now first-class citizens, with CommonJS support implemented as a shim on top.

@fealebenpae fealebenpae self-assigned this Jan 7, 2016
@fealebenpae fealebenpae added this to the 1.6.0 (Under review) milestone Jan 7, 2016
@jasssonpet
Copy link
Copy Markdown
Contributor

I think it's also safe to delete the BlankApp target.

@fealebenpae
Copy link
Copy Markdown
Contributor Author

@jasssonpet Er, why?

@jasssonpet
Copy link
Copy Markdown
Contributor

The whole purpose of the BlankApp was that the require routine isn't used. If I understand this correctly, now that everything is done in native, the first call from JavaScript files to native will always be from user code.

@jasssonpet
Copy link
Copy Markdown
Contributor

Also, we will have to update the module.id to be an absolute url, but we can do this after the merge to be more correct.

@fealebenpae
Copy link
Copy Markdown
Contributor Author

Well, yes, that's right, but BlankApp is still the target that just evaluates JavaScript without any module system. If that's not an important distinction then I'll remove it.

@jasssonpet
Copy link
Copy Markdown
Contributor

Ok, let's leave it for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be guarded too with #ifdef?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean #ifdef __OBJC__? It's always going to be defined, since this is an .mm file, so it's not necessary.

Naive modules

[ES6] CommonJS compatibility

[ES6] Expose CommonJS SourceProviders to the DebuggerAgent

[ES6] Fixes so that the TestRunner can run

[ES6] dump module loading state in Debug builds

[ES6] sanitize path resolution

[ES6] Circular dependencies in the CommonJS shim

[ES6][CommonJS] module.id fixes

[ES6] Resolve should support package.json

[ES6] import .json files as modules

[ES6][CommonJS] require should be a function on the global object

Fix linking issues

[ES6][CommonJS] modules should be visible to debugger

[ES6] Some of the unit tests should use ES6 modules

Microtask scheduling should signal AND wake up runloops

[ES6] Shims should not be visible in the inspector

Use same protocol for app files

[ES6] shim modules should use SymbolTable storage

[ES6] final polish

Allow modules to not export anything

[ES6] remove logging

formatting

Update shared tests
fealebenpae added a commit that referenced this pull request Jan 12, 2016
@fealebenpae fealebenpae merged commit d6f4410 into master Jan 12, 2016
@fealebenpae fealebenpae deleted the es6-modules branch January 12, 2016 14:47
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this string should be autoreleased?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createCFString returns a WTF::RetainPtr<CFStringRef> which releases the string as soon as it exits scope.

@jasssonpet jasssonpet mentioned this pull request Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants