[ES6] Implement ModuleNamespaceObject
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Sep 2015 07:22:54 +0000 (07:22 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Sep 2015 07:22:54 +0000 (07:22 +0000)
commit5d34b4714466655c4a5f4bd100dee6b203b5346b
tree1d4b04a888670f1cd256ccbecb4f4b2dda354c29
parent4fec00aed549c800ef9f9c7b1cf4257ac1f2e39f
[ES6] Implement ModuleNamespaceObject
https://bugs.webkit.org/show_bug.cgi?id=148705

Reviewed by Geoffrey Garen.

Implement Module namespace object.
That is used when importing the module with the form `import * as namespace from "mod"`.
The module namespace object is non-extensible object that has the bindings to the original module
as the property.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::moduleNamespaceObjectStructure):
* runtime/JSModuleNamespaceObject.cpp: Added.
(JSC::JSModuleNamespaceObject::JSModuleNamespaceObject):
(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::JSModuleNamespaceObject::destroy):
(JSC::JSModuleNamespaceObject::visitChildren):
(JSC::callbackGetter):
(JSC::JSModuleNamespaceObject::getOwnPropertySlot):
(JSC::JSModuleNamespaceObject::put):
(JSC::JSModuleNamespaceObject::putByIndex):
(JSC::JSModuleNamespaceObject::deleteProperty):
(JSC::JSModuleNamespaceObject::getOwnPropertyNames):
(JSC::JSModuleNamespaceObject::defineOwnProperty):
(JSC::moduleNamespaceObjectSymbolIterator):
* runtime/JSModuleNamespaceObject.h: Added.
(JSC::JSModuleNamespaceObject::create):
(JSC::JSModuleNamespaceObject::createStructure):
(JSC::JSModuleNamespaceObject::moduleRecord):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::visitChildren):
(JSC::getExportedNames):
(JSC::JSModuleRecord::getModuleNamespace):
(JSC::JSModuleRecord::instantiateDeclarations):
* runtime/JSModuleRecord.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/JSModuleRecord.cpp
Source/JavaScriptCore/runtime/JSModuleRecord.h