Clarify var/const/function declaration
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 01:04:37 +0000 (01:04 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 01:04:37 +0000 (01:04 +0000)
commita2c4d923411db550919e71f4825b6749e7dfd0e7
tree96a4cd9fcb8c87289157ddb12b1f0518531e94f3
parent6e3d62c395bddb0907a7d7528c627328572e95d4
Clarify var/const/function declaration
https://bugs.webkit.org/show_bug.cgi?id=120144

Reviewed by Sam Weinig.

Add methods to JSGlobalObject to declare vars, consts, and functions.

* runtime/Executable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/Executable.h:
    - Moved declaration code to JSGlobalObject
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::addGlobalVar):
    - internal implementation of addVar, addConst, addFunction
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::addVar):
(JSC::JSGlobalObject::addConst):
(JSC::JSGlobalObject::addFunction):
    - Added methods to declare vars, consts, and functions

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h