1. 06 Oct, 2008 2 commits
    • mjs@apple.com's avatar
      JavaScriptCore: · 6c3268ce
      mjs@apple.com authored
      2008-10-06  Maciej Stachowiak  <mjs@apple.com>
      
              Not reviewed. Build fix.
              
              - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these
      
              * API/JSValueRef.cpp:
              (JSValueToBoolean):
              * ChangeLog:
              * JavaScriptCore.exp:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_loop_if_true):
              (JSC::Machine::cti_op_not):
              (JSC::Machine::cti_op_jtrue):
              * kjs/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncFilter):
              (JSC::arrayProtoFuncEvery):
              (JSC::arrayProtoFuncSome):
              * kjs/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::callBooleanConstructor):
              * kjs/GetterSetter.h:
              * kjs/JSCell.h:
              (JSC::JSValue::toBoolean):
              * kjs/JSNumberCell.cpp:
              (JSC::JSNumberCell::toBoolean):
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              (JSC::JSObject::toBoolean):
              * kjs/JSObject.h:
              * kjs/JSString.cpp:
              (JSC::JSString::toBoolean):
              * kjs/JSString.h:
              * kjs/JSValue.h:
              * kjs/RegExpConstructor.cpp:
              (JSC::setRegExpConstructorMultiline):
              * kjs/RegExpObject.cpp:
              (JSC::RegExpObject::match):
              * kjs/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncToString):
      
      JavaScriptGlue:
      
      2008-10-06  Maciej Stachowiak  <mjs@apple.com>
      
              Not reviewed. Build fix.
      
              - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these
      
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c3268ce
    • mjs@apple.com's avatar
      2008-10-06 Maciej Stachowiak <mjs@apple.com> · d2c36fec
      mjs@apple.com authored
              Reviewed by Sam Weinig.
              
              - optimize op_jtrue, op_loop_if_true and op_not in various ways
              https://bugs.webkit.org/show_bug.cgi?id=21404
              
              1) Make JSValue::toBoolean nonvirtual and completely inline by
              making use of the StructureID type field.
              
              2) Make JSValue::toBoolean not take an ExecState; doesn't need it.
              
              3) Make op_not, op_loop_if_true and op_jtrue not read the
              ExecState (toBoolean doesn't need it any more) and not check
              exceptions (toBoolean can't throw).
      
              * API/JSValueRef.cpp:
              (JSValueToBoolean):
              * JavaScriptCore.exp:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump):
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_loop_if_true):
              (JSC::Machine::cti_op_not):
              (JSC::Machine::cti_op_jtrue):
              * kjs/ArrayPrototype.cpp:
              (JSC::arrayProtoFuncFilter):
              (JSC::arrayProtoFuncEvery):
              (JSC::arrayProtoFuncSome):
              * kjs/BooleanConstructor.cpp:
              (JSC::constructBoolean):
              (JSC::callBooleanConstructor):
              * kjs/GetterSetter.h:
              * kjs/JSCell.h:
              (JSC::JSValue::toBoolean):
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              (JSC::JSNumberCell::toBoolean):
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              (JSC::JSObject::toBoolean):
              (JSC::JSCell::toBoolean):
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              (JSC::JSString::toBoolean):
              * kjs/JSValue.h:
              * kjs/RegExpConstructor.cpp:
              (JSC::setRegExpConstructorMultiline):
              * kjs/RegExpObject.cpp:
              (JSC::RegExpObject::match):
              * kjs/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncToString):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2c36fec
  2. 02 Oct, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · b6295d46
      darin@apple.com authored
      2008-10-02  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff Garen.
      
              - https://bugs.webkit.org/show_bug.cgi?id=21321
                Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
      
              1.019x as fast on SunSpider.
      
              * API/JSBase.cpp:
              (JSEvaluateScript): Use heap. instead of heap-> to work with the heap.
              (JSCheckScriptSyntax): Ditto.
              (JSGarbageCollect): Ditto.
              (JSReportExtraMemoryCost): Ditto.
              * API/JSContextRef.cpp:
              (JSGlobalContextRetain): Ditto.
              (JSGlobalContextRelease): Destroy the heap with the destroy function instead
              of the delete operator.
              (JSContextGetGlobalObject): Use heap. instead of heap-> to work with the heap.
              * API/JSObjectRef.cpp:
              (JSObjectMake): Use heap. instead of heap-> to work with the heap.
              (JSObjectMakeFunctionWithCallback): Ditto.
              (JSObjectMakeConstructor): Ditto.
              (JSObjectMakeFunction): Ditto.
              (JSObjectMakeArray): Ditto.
              (JSObjectMakeDate): Ditto.
              (JSObjectMakeError): Ditto.
              (JSObjectMakeRegExp): Ditto.
              (JSObjectHasProperty): Ditto.
              (JSObjectGetProperty): Ditto.
              (JSObjectSetProperty): Ditto.
              (JSObjectGetPropertyAtIndex): Ditto.
              (JSObjectSetPropertyAtIndex): Ditto.
              (JSObjectDeleteProperty): Ditto.
              (JSObjectCallAsFunction): Ditto.
              (JSObjectCallAsConstructor): Ditto.
              (JSObjectCopyPropertyNames): Ditto.
              (JSPropertyNameAccumulatorAddName): Ditto.
              * API/JSValueRef.cpp:
              (JSValueIsEqual): Ditto.
              (JSValueIsInstanceOfConstructor): Ditto.
              (JSValueMakeNumber): Ditto.
              (JSValueMakeString): Ditto.
              (JSValueToNumber): Ditto.
              (JSValueToStringCopy): Ditto.
              (JSValueToObject): Ditto.
              (JSValueProtect): Ditto.
              (JSValueUnprotect): Ditto.
      
              * kjs/ExecState.h:
              (JSC::ExecState::heap): Update to use the & operator.
      
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData): Update to initialize a heap member
              instead of calling new to make a heap.
              (JSC::JSGlobalData::~JSGlobalData): Destroy the heap with the destroy
              function instead of the delete operator.
              * kjs/JSGlobalData.h: Change from Heap* to a Heap.
              * kjs/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::mark): Use the & operator here.
              (JSC::JSGlobalObject::operator new): Use heap. instead of heap-> to work
              with the heap.
      
      WebCore:
      
      2008-10-02  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff Garen.
      
              - https://bugs.webkit.org/show_bug.cgi?id=21321
                Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
      
              * bindings/js/GCController.cpp:
              (WebCore::collect): Use heap. instead of heap-> to work with the heap.
              (WebCore::GCController::gcTimerFired): Ditto.
              (WebCore::GCController::garbageCollectNow): Ditto.
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::operator new): Ditto.
              * storage/Database.cpp:
              (WebCore::Database::Database): Ditto.
      
      WebKit/mac:
      
      2008-10-02  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff Garen.
      
              - https://bugs.webkit.org/show_bug.cgi?id=21321
                Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
      
              * Misc/WebCoreStatistics.mm:
              (+[WebCoreStatistics javaScriptObjectsCount]): Use heap. instead of heap-> to
              work with the heap.
              (+[WebCoreStatistics javaScriptGlobalObjectsCount]): Ditto.
              (+[WebCoreStatistics javaScriptProtectedObjectsCount]): Ditto.
              (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): Ditto.
              (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Ditto.
              (+[WebCoreStatistics javaScriptReferencedObjectsCount]): Ditto.
      
      WebKit/win:
      
      2008-10-02  Darin Adler  <darin@apple.com>
      
              - https://bugs.webkit.org/show_bug.cgi?id=21321
                Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
      
              * WebCoreStatistics.cpp:
              (WebCoreStatistics::javaScriptObjectsCount): Use heap. instead of heap-> to
              work with the heap.
              (WebCoreStatistics::javaScriptGlobalObjectsCount): Ditto.
              (WebCoreStatistics::javaScriptProtectedObjectsCount): Ditto.
              (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount): Ditto.
              (WebCoreStatistics::javaScriptProtectedObjectTypeCounts): Ditto.
              * WebJavaScriptCollector.cpp:
              (WebJavaScriptCollector::objectCount): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6295d46
  3. 22 Sep, 2008 1 commit
    • mjs@apple.com's avatar
      JavaScriptCore: · 221b4757
      mjs@apple.com authored
      2008-09-22  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Cameron Zwarich.
              
              - speed up instanceof operator by replacing implementsHasInstance method with a TypeInfo flag
      
              Partial work towards <https://bugs.webkit.org/show_bug.cgi?id=20818>
              
              2.2% speedup on EarleyBoyer benchmark.
      
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackConstructor.h:
              (JSC::JSCallbackConstructor::createStructureID):
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              (JSC::JSCallbackFunction::createStructureID):
              * API/JSCallbackObject.h:
              (JSC::JSCallbackObject::createStructureID):
              * API/JSCallbackObjectFunctions.h:
              (JSC::::hasInstance):
              * API/JSValueRef.cpp:
              (JSValueIsInstanceOfConstructor):
              * JavaScriptCore.exp:
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute):
              (JSC::Machine::cti_op_instanceof):
              * kjs/InternalFunction.cpp:
              * kjs/InternalFunction.h:
              (JSC::InternalFunction::createStructureID):
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              * kjs/TypeInfo.h:
              (JSC::TypeInfo::implementsHasInstance):
      
      WebCore:
      
      2008-09-22  Maciej Stachowiak  <mjs@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - speed up instanceof operator by replacing implementsHasInstance method with a TypeInfo flag
      
              Partial work towards <https://bugs.webkit.org/show_bug.cgi?id=20818>
              
              2.2% speedup on EarleyBoyer benchmark.
      
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              * bindings/js/JSQuarantinedObjectWrapper.h:
              (WebCore::JSQuarantinedObjectWrapper::createStructureID):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      221b4757
  4. 14 Sep, 2008 1 commit
    • mjs@apple.com's avatar
      2008-09-14 Maciej Stachowiak <mjs@apple.com> · 988df6c1
      mjs@apple.com authored
              Reviewed by Cameron Zwarich.
              
              - split the "prototype" lookup for hasInstance into opcode stream so it can be cached
              
              ~5% speedup on v8 earley-boyer test
      
              * API/JSCallbackObject.h: Add a parameter for the pre-looked-up prototype.
              * API/JSCallbackObjectFunctions.h:
              (JSC::::hasInstance): Ditto.
              * API/JSValueRef.cpp:
              (JSValueIsInstanceOfConstructor): Look up and pass in prototype.
              * JavaScriptCore.exp:
              * VM/CTI.cpp:
              (JSC::CTI::privateCompileMainPass): Pass along prototype.
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::dump): Print third arg.
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitInstanceOf): Implement this, now that there
              is a third argument.
              * VM/CodeGenerator.h:
              * VM/Machine.cpp:
              (JSC::Machine::privateExecute): Pass along the prototype.
              (JSC::Machine::cti_op_instanceof): ditto
              * kjs/JSObject.cpp:
              (JSC::JSObject::hasInstance): Expect to get a pre-looked-up prototype.
              * kjs/JSObject.h:
              * kjs/nodes.cpp:
              (JSC::InstanceOfNode::emitCode): Emit a get_by_id of the prototype
              property and pass that register to instanceof.
              * kjs/nodes.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      988df6c1
  5. 07 Sep, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-09-07 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 3f782f6a
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Bug 20704: Replace the KJS namespace
              <https://bugs.webkit.org/show_bug.cgi?id=20704>
      
              Rename the KJS namespace to JSC. There are still some uses of KJS in
              preprocessor macros and comments, but these will also be changed some
              time in the near future. There are also some uses in the names of JNI
              functions, but I will check if these are safe to change as well.
      
              JavaScriptCore:
      
              * API/APICast.h:
              (toJS):
              (toRef):
              (toGlobalRef):
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSClassRef.cpp:
              (OpaqueJSClass::staticValues):
              (OpaqueJSClass::staticFunctions):
              * API/JSClassRef.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSProfilerPrivate.cpp:
              * API/JSStringRef.cpp:
              * API/JSValueRef.cpp:
              (JSValueGetType):
              * API/OpaqueJSString.cpp:
              * API/OpaqueJSString.h:
              * JavaScriptCore.Debug.exp:
              * JavaScriptCore.base.exp:
              * VM/CTI.cpp:
              (JSC::):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/Instruction.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/LabelID.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Opcode.cpp:
              * VM/Opcode.h:
              * VM/Register.h:
              (WTF::):
              * VM/RegisterFile.cpp:
              * VM/RegisterFile.h:
              * VM/RegisterID.h:
              (WTF::):
              * VM/SamplingTool.cpp:
              * VM/SamplingTool.h:
              * VM/SegmentedVector.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayConstructor.h:
              * kjs/ArrayPrototype.cpp:
              * kjs/ArrayPrototype.h:
              * kjs/BatchedTransitionOptimizer.h:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.cpp:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/BooleanPrototype.h:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ClassInfo.h:
              * kjs/CommonIdentifiers.cpp:
              * kjs/CommonIdentifiers.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateConstructor.h:
              * kjs/DateInstance.cpp:
              (JSC::DateInstance::msToGregorianDateTime):
              * kjs/DateInstance.h:
              * kjs/DateMath.cpp:
              * kjs/DateMath.h:
              * kjs/DatePrototype.cpp:
              * kjs/DatePrototype.h:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/Error.cpp:
              * kjs/Error.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorConstructor.h:
              * kjs/ErrorInstance.cpp:
              * kjs/ErrorInstance.h:
              * kjs/ErrorPrototype.cpp:
              * kjs/ErrorPrototype.h:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionConstructor.h:
              * kjs/FunctionPrototype.cpp:
              * kjs/FunctionPrototype.h:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/GlobalEvalFunction.cpp:
              * kjs/GlobalEvalFunction.h:
              * kjs/IndexToNameMap.cpp:
              * kjs/IndexToNameMap.h:
              * kjs/InitializeThreading.cpp:
              * kjs/InitializeThreading.h:
              * kjs/InternalFunction.cpp:
              * kjs/InternalFunction.h:
              (JSC::InternalFunction::InternalFunction):
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              (JSC::JSFunction::JSFunction):
              * kjs/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.h:
              * kjs/JSLock.cpp:
              * kjs/JSLock.h:
              * kjs/JSNotAnObject.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              * kjs/JSStaticScopeObject.cpp:
              * kjs/JSStaticScopeObject.h:
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              * kjs/JSType.h:
              * kjs/JSValue.cpp:
              * kjs/JSValue.h:
              * kjs/JSVariableObject.cpp:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.cpp:
              * kjs/JSWrapperObject.h:
              * kjs/LabelStack.cpp:
              * kjs/LabelStack.h:
              * kjs/MathObject.cpp:
              * kjs/MathObject.h:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NativeErrorConstructor.h:
              * kjs/NativeErrorPrototype.cpp:
              * kjs/NativeErrorPrototype.h:
              * kjs/NodeInfo.h:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/NumberPrototype.h:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectConstructor.h:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/Parser.cpp:
              * kjs/Parser.h:
              * kjs/PropertyMap.cpp:
              (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
              * kjs/PropertyMap.h:
              * kjs/PropertyNameArray.cpp:
              * kjs/PropertyNameArray.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/PrototypeFunction.cpp:
              * kjs/PrototypeFunction.h:
              * kjs/PutPropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/RegExpPrototype.h:
              * kjs/ScopeChain.cpp:
              * kjs/ScopeChain.h:
              * kjs/ScopeChainMark.h:
              * kjs/Shell.cpp:
              (jscmain):
              * kjs/SmallStrings.cpp:
              * kjs/SmallStrings.h:
              * kjs/SourceProvider.h:
              * kjs/SourceRange.h:
              * kjs/StringConstructor.cpp:
              * kjs/StringConstructor.h:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StringPrototype.h:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/SymbolTable.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/create_hash_table:
              * kjs/debugger.cpp:
              * kjs/debugger.h:
              * kjs/dtoa.cpp:
              * kjs/dtoa.h:
              * kjs/grammar.y:
              * kjs/identifier.cpp:
              * kjs/identifier.h:
              (JSC::Identifier::equal):
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lexer.cpp:
              (JSC::Lexer::Lexer):
              (JSC::Lexer::clear):
              (JSC::Lexer::makeIdentifier):
              * kjs/lexer.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/nodes2string.cpp:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * kjs/regexp.cpp:
              * kjs/regexp.h:
              * kjs/ustring.cpp:
              * kjs/ustring.h:
              (JSC::operator!=):
              (JSC::IdentifierRepHash::hash):
              (WTF::):
              * masm/MacroAssembler.h:
              * masm/MacroAssemblerWin.cpp:
              * masm/X86Assembler.h:
              * pcre/pcre_exec.cpp:
              * profiler/CallIdentifier.h:
              (WTF::):
              * profiler/HeavyProfile.cpp:
              * profiler/HeavyProfile.h:
              * profiler/Profile.cpp:
              * profiler/Profile.h:
              * profiler/ProfileGenerator.cpp:
              * profiler/ProfileGenerator.h:
              * profiler/ProfileNode.cpp:
              * profiler/ProfileNode.h:
              * profiler/Profiler.cpp:
              * profiler/Profiler.h:
              * profiler/TreeProfile.cpp:
              * profiler/TreeProfile.h:
              * wrec/WREC.cpp:
              * wrec/WREC.h:
              * wtf/AVLTree.h:
      
              WebCore:
      
              * WebCore.base.exp:
              * bindings/js/GCController.cpp:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSAudioConstructor.cpp:
              * bindings/js/JSAudioConstructor.h:
              (WebCore::JSAudioConstructor::classInfo):
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.cpp:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              (WebCore::JSCustomSQLStatementCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementCallback.h:
              (WebCore::JSCustomSQLStatementCallback::create):
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              (WebCore::JSCustomSQLStatementErrorCallback::create):
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              (WebCore::JSCustomSQLTransactionCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionCallback.h:
              (WebCore::JSCustomSQLTransactionCallback::create):
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              (WebCore::JSCustomSQLTransactionErrorCallback::create):
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::JSCustomVoidCallback::handleEvent):
              * bindings/js/JSCustomVoidCallback.h:
              (WebCore::JSCustomVoidCallback::create):
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::create):
              * bindings/js/JSCustomXPathNSResolver.h:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              (WebCore::JSDOMApplicationCache::dispatchEvent):
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::jsOwnedStringOrNull):
              * bindings/js/JSDOMBinding.h:
              (WebCore::DOMObject::DOMObject):
              (WebCore::cacheDOMObject):
              (WebCore::cacheSVGDOMObject):
              (WebCore::DOMExceptionTranslator::DOMExceptionTranslator):
              (WebCore::toJS):
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              (WebCore::JSDOMWindowBase::classInfo):
              (WebCore::JSDOMWindowBase::d):
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::getPropertyAttributes):
              * bindings/js/JSDOMWindowCustom.h:
              (WebCore::asJSDOMWindow):
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              (WebCore::JSDOMWindow::customPut):
              (WebCore::JSDOMWindowBase::allowsAccessFrom):
              (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
              * bindings/js/JSDOMWindowShell.cpp:
              (WebCore::JSDOMWindowShell::getPropertyAttributes):
              * bindings/js/JSDOMWindowShell.h:
              (WebCore::JSDOMWindowShell::classInfo):
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSDocumentFragmentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventListener.h:
              (WebCore::JSUnprotectedEventListener::create):
              (WebCore::JSEventListener::create):
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::getValueProperty):
              (WebCore::JSEventTargetBase::putValueProperty):
              (WebCore::JSEventTargetBase::getOwnPropertySlot):
              (WebCore::JSEventTargetBase::put):
              (WebCore::JSEventTargetPrototype::JSEventTargetPrototype):
              (WebCore::JSEventTargetPrototype::self):
              (WebCore::JSEventTargetPrototype::getOwnPropertySlot):
              (WebCore::JSEventTargetPrototype::classInfo):
              * bindings/js/JSEventTargetNode.cpp:
              * bindings/js/JSEventTargetNode.h:
              (WebCore::JSEventTargetNode::getOwnPropertySlot):
              (WebCore::JSEventTargetNode::getValueProperty):
              (WebCore::JSEventTargetNode::put):
              (WebCore::JSEventTargetNode::putValueProperty):
              * bindings/js/JSHTMLAllCollection.h:
              (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
              (WebCore::JSHTMLAllCollection::toBoolean):
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLElementCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              (WebCore::JSHTMLInputElementBase::classInfo):
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::classInfo):
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              (WebCore::selectIndexSetter):
              (WebCore::JSHTMLSelectElement::indexSetter):
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageConstructor.cpp:
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::classInfo):
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
              (WebCore::JSInspectedObjectWrapper::classInfo):
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              (WebCore::JSInspectorCallbackWrapper::classInfo):
              (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNSResolver.cpp:
              * bindings/js/JSNSResolver.h:
              (WebCore::JSNSResolver::create):
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
              * bindings/js/JSNamedNodesCollection.h:
              (WebCore::JSNamedNodesCollection::classInfo):
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              (WebCore::JSNodeFilterCondition::acceptNode):
              * bindings/js/JSNodeFilterCondition.h:
              (WebCore::JSNodeFilterCondition::create):
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              (WebCore::getRuntimeObject):
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              (WebCore::JSQuarantinedObjectWrapper::construct):
              (WebCore::JSQuarantinedObjectWrapper::call):
              * bindings/js/JSQuarantinedObjectWrapper.h:
              (WebCore::JSQuarantinedObjectWrapper::unwrappedObject):
              (WebCore::JSQuarantinedObjectWrapper::unwrappedGlobalObject):
              (WebCore::JSQuarantinedObjectWrapper::className):
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              (WebCore::JSRGBColor::classInfo):
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGLazyEventListener.cpp:
              * bindings/js/JSSVGLazyEventListener.h:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              (WebCore::JSSVGMatrix::inverse):
              (WebCore::JSSVGMatrix::rotateFromVector):
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              (WebCore::JSSVGPathSegList::initialize):
              (WebCore::JSSVGPathSegList::getItem):
              (WebCore::JSSVGPathSegList::insertItemBefore):
              (WebCore::JSSVGPathSegList::replaceItem):
              (WebCore::JSSVGPathSegList::removeItem):
              (WebCore::JSSVGPathSegList::appendItem):
              * bindings/js/JSSVGPointListCustom.cpp:
              * bindings/js/JSSVGTransformListCustom.cpp:
              * bindings/js/JSStorageCustom.cpp:
              * bindings/js/JSStyleSheetCustom.cpp:
              * bindings/js/JSStyleSheetListCustom.cpp:
              * bindings/js/JSTextCustom.cpp:
              * bindings/js/JSTreeWalkerCustom.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.cpp:
              * bindings/js/JSXMLHttpRequestConstructor.h:
              (WebCore::JSXMLHttpRequestConstructor::classInfo):
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorConstructor.cpp:
              * bindings/js/JSXSLTProcessorConstructor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo):
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::attachDebugger):
              (WebCore::ScriptController::windowScriptNPObject):
              * bindings/js/ScriptController.h:
              * bindings/js/ScriptControllerGtk.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerMac.mm:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              (WebCore::ScriptController::windowScriptObject):
              (WebCore::ScriptController::clearPlatformScriptObjects):
              (WebCore::updateRenderingForBindings):
              (WebCore::ScriptController::initJavaJSBindings):
              * bindings/js/ScriptControllerQt.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWin.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/ScriptControllerWx.cpp:
              (WebCore::ScriptController::createScriptInstanceForWidget):
              * bindings/js/StringSourceProvider.h:
              (WebCore::StringSourceProvider::getRange):
              * bindings/objc/DOM.mm:
              (-[DOMNode JSC::Bindings::]):
              * bindings/objc/DOMInternal.h:
              * bindings/objc/DOMInternal.mm:
              (-[WebScriptObject _initializeScriptDOMNodeImp]):
              * bindings/objc/DOMUtility.mm:
              (JSC::createDOMWrapper):
              (WebCore::createDOMWrapper):
              * bindings/objc/WebScriptObject.mm:
              (WebCore::createJSWrapper):
              (-[WebScriptObject _initWithJSObject:JSC::originRootObject:JSC::Bindings::rootObject:JSC::Bindings::]):
              * bindings/objc/WebScriptObjectPrivate.h:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/NP_jsobject.h:
              * bridge/c/c_class.cpp:
              * bridge/c/c_class.h:
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/c/c_runtime.cpp:
              * bridge/c/c_runtime.h:
              * bridge/c/c_utility.cpp:
              * bridge/c/c_utility.h:
              * bridge/jni/jni_class.cpp:
              * bridge/jni/jni_class.h:
              * bridge/jni/jni_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.h:
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::call):
              (JavaJSObject::convertJObjectToValue):
              * bridge/jni/jni_objc.mm:
              (JSC::Bindings::dispatchJNICall):
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * bridge/jni/jni_utility.h:
              * bridge/npruntime.cpp:
              (_NPN_GetStringIdentifier):
              * bridge/objc/WebScriptObject.h:
              * bridge/objc/objc_class.h:
              * bridge/objc/objc_class.mm:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              * bridge/objc/objc_utility.h:
              * bridge/objc/objc_utility.mm:
              * bridge/qt/qt_class.cpp:
              * bridge/qt/qt_class.h:
              * bridge/qt/qt_instance.cpp:
              * bridge/qt/qt_instance.h:
              * bridge/qt/qt_runtime.cpp:
              (JSC::Bindings::convertQVariantToValue):
              (JSC::Bindings::):
              * bridge/qt/qt_runtime.h:
              * bridge/runtime.cpp:
              * bridge/runtime.h:
              * bridge/runtime_array.cpp:
              * bridge/runtime_array.h:
              * bridge/runtime_method.cpp:
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              * bridge/runtime_object.h:
              * bridge/runtime_root.cpp:
              (JSC::Bindings::RootObject::invalidate):
              (JSC::Bindings::RootObject::gcProtect):
              (JSC::Bindings::RootObject::gcUnprotect):
              * bridge/runtime_root.h:
              * bridge/testbindings.cpp:
              * bridge/testbindings.mm:
              * bridge/testqtbindings.cpp:
              * dom/Document.cpp:
              (WebCore::Document::~Document):
              * dom/NSResolver.h:
              * dom/Node.cpp:
              (WebCore::Node::setDocument):
              (WebCore::ResolveNamespaceFunctor::ResolveNamespaceFunctor):
              (WebCore::resolveNamespacesForSelector):
              (WebCore::Node::querySelector):
              (WebCore::Node::querySelectorAll):
              * dom/Node.h:
              * dom/NodeFilter.cpp:
              * dom/NodeFilter.h:
              * dom/NodeFilterCondition.cpp:
              * dom/NodeFilterCondition.h:
              * dom/NodeIterator.cpp:
              * dom/NodeIterator.h:
              * dom/Traversal.cpp:
              * dom/Traversal.h:
              * dom/TreeWalker.cpp:
              * dom/TreeWalker.h:
              * dom/make_names.pl:
              * history/CachedPage.cpp:
              * history/CachedPage.h:
              * html/HTMLPlugInElement.cpp:
              (WebCore::HTMLPlugInElement::getInstance):
              * html/HTMLPlugInElement.h:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/icon/IconDatabase.cpp:
              (WebCore::iconDatabase):
              * page/Console.cpp:
              * page/Console.h:
              * page/InspectorController.cpp:
              (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
              (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource):
              (WebCore::InspectorResource::setXMLHttpRequestProperties):
              (WebCore::InspectorResource::sourceString):
              (WebCore::getResourceDocumentNode):
              (WebCore::search):
              (WebCore::InspectorController::focusNode):
              (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
              (WebCore::InspectorController::addDatabaseScriptResource):
              (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
              * page/InspectorController.h:
              (WebCore::InspectorController::profiles):
              * page/JavaScriptCallFrame.cpp:
              (WebCore::JavaScriptCallFrame::scopeChain):
              * page/JavaScriptCallFrame.h:
              (WebCore::JavaScriptCallFrame::create):
              (WebCore::JavaScriptCallFrame::update):
              * page/JavaScriptDebugListener.h:
              * page/JavaScriptDebugServer.cpp:
              (WebCore::dispatchDidParseSource):
              * page/JavaScriptDebugServer.h:
              * page/JavaScriptProfile.cpp:
              * page/JavaScriptProfile.h:
              * page/JavaScriptProfileNode.cpp:
              (WebCore::getTotalTime):
              (WebCore::getSelfTime):
              (WebCore::getTotalPercent):
              (WebCore::getSelfPercent):
              (WebCore::getNumberOfCalls):
              (WebCore::getChildren):
              (WebCore::getVisible):
              * page/JavaScriptProfileNode.h:
              * page/Page.cpp:
              (WebCore::Page::setDebuggerForAllPages):
              (WebCore::Page::setDebugger):
              * page/Page.h:
              (WebCore::Page::debugger):
              * page/mac/FrameMac.mm:
              * platform/KURL.h:
              (WebCore::KURL::operator JSC::UString):
              * platform/text/AtomicString.cpp:
              (WebCore::AtomicString::add):
              (WebCore::AtomicString::find):
              * platform/text/AtomicString.h:
              (WebCore::AtomicString::AtomicString):
              * platform/text/PlatformString.h:
              * platform/text/String.cpp:
              (WebCore::charactersToDouble):
              * platform/win/BString.cpp:
              * platform/win/BString.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::start):
              (WebCore::PluginView::performRequest):
              (WebCore::PluginView::bindingInstance):
              * plugins/PluginView.h:
              * plugins/gtk/PluginViewGtk.cpp:
              (WebCore::PluginView::paint):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/qt/PluginViewQt.cpp:
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              (WebCore::PluginView::init):
              * plugins/win/PluginViewWin.cpp:
              (WebCore::PluginView::dispatchNPEvent):
              (WebCore::PluginView::handleKeyboardEvent):
              (WebCore::PluginView::handleMouseEvent):
              (WebCore::PluginView::setNPWindowRect):
              (WebCore::PluginView::stop):
              * storage/Database.cpp:
              (WebCore::Database::Database):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::responseText):
              (WebCore::XMLHttpRequest::loadRequestAsynchronously):
              (WebCore::XMLHttpRequest::clearResponse):
              (WebCore::XMLHttpRequest::dropProtection):
              (WebCore::XMLHttpRequest::didFinishLoading):
              (WebCore::XMLHttpRequest::didReceiveData):
              * xml/XMLHttpRequest.h:
      
              WebKit/gtk:
      
              * webkit/webkitprivate.cpp:
              (webkit_init):
      
              WebKit/mac:
      
              * Misc/WebCoreStatistics.mm:
              * Plugins/WebBaseNetscapePluginStream.mm:
              (-[WebBaseNetscapePluginStream wantsAllStreams]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
              (-[WebBaseNetscapePluginView setWindowIfNecessary]):
              (-[WebBaseNetscapePluginView start]):
              (-[WebBaseNetscapePluginView createPluginScriptableObject]):
              (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
              (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
              (-[WebBaseNetscapePluginView loadPluginRequest:]):
              (-[WebBaseNetscapePluginView _printedPluginBitmap]):
              * Plugins/WebPluginController.mm:
              (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
              (-[WebPluginController startAllPlugins]):
              (-[WebPluginController stopAllPlugins]):
              (-[WebPluginController addPlugin:]):
              (-[WebPluginController destroyPlugin:]):
              (-[WebPluginController destroyAllPlugins]):
              * WebView/WebFrame.mm:
              * WebView/WebScriptDebugDelegate.mm:
              * WebView/WebScriptDebugger.h:
              * WebView/WebScriptDebugger.mm:
              * WebView/WebView.mm:
              (-[WebViewPrivate init]):
      
              WebKit/qt:
              
              * Api/qwebframe.cpp:
              (QWebFrame::addToJavaScriptWindowObject):
              (QWebFrame::evaluateJavaScript):
      
              WebKit/win:
      
              * WebCoreStatistics.cpp:
              * WebJavaScriptCollector.cpp:
              * WebScriptCallFrame.cpp:
              (WebScriptCallFrame::jsValueToString):
              * WebScriptCallFrame.h:
              (WebScriptCallFrame::state):
              * WebView.cpp:
              (WebView::WebView):
              (WebView::stringByEvaluatingJavaScriptFromString):
      
              WebKit/wx:
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f782f6a
  6. 23 Aug, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-08-23 Cameron Zwarich <cwzwarich@uwaterloo.ca> · 53ddf179
      cwzwarich@webkit.org authored
              Rubber-stamped by Mark Rowe.
      
              Remove modelines.
      
              JavaScriptCore:
      
              * API/APICast.h:
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.cpp:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSClassRef.cpp:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSProfilerPrivate.cpp:
              * API/JSStringRef.cpp:
              * API/JSStringRefBSTR.cpp:
              * API/JSStringRefCF.cpp:
              * API/JSValueRef.cpp:
              * API/tests/JSNode.c:
              * API/tests/JSNode.h:
              * API/tests/JSNodeList.c:
              * API/tests/JSNodeList.h:
              * API/tests/Node.c:
              * API/tests/Node.h:
              * API/tests/NodeList.c:
              * API/tests/NodeList.h:
              * API/tests/minidom.c:
              * API/tests/minidom.js:
              * API/tests/testapi.c:
              * API/tests/testapi.js:
              * JavaScriptCore.pro:
              * kjs/FunctionConstructor.h:
              * kjs/FunctionPrototype.h:
              * kjs/JSArray.h:
              * kjs/JSString.h:
              * kjs/JSWrapperObject.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.h:
              * kjs/lexer.h:
              * kjs/lookup.h:
              * wtf/Assertions.cpp:
              * wtf/Assertions.h:
              * wtf/HashCountedSet.h:
              * wtf/HashFunctions.h:
              * wtf/HashIterators.h:
              * wtf/HashMap.h:
              * wtf/HashSet.h:
              * wtf/HashTable.h:
              * wtf/HashTraits.h:
              * wtf/ListHashSet.h:
              * wtf/ListRefPtr.h:
              * wtf/Noncopyable.h:
              * wtf/OwnArrayPtr.h:
              * wtf/OwnPtr.h:
              * wtf/PassRefPtr.h:
              * wtf/Platform.h:
              * wtf/RefPtr.h:
              * wtf/RefPtrHashMap.h:
              * wtf/RetainPtr.h:
              * wtf/UnusedParam.h:
              * wtf/Vector.h:
              * wtf/VectorTraits.h:
              * wtf/unicode/Unicode.h:
              * wtf/unicode/icu/UnicodeIcu.h:
      
              WebCore:
      
              * WebCore.pro:
              * bridge/testbindings.cpp:
              * dom/DocPtr.h:
              * loader/SubstituteData.h:
              * page/Chrome.cpp:
              * page/Chrome.h:
              * page/ChromeClient.h:
              * page/Frame.h:
              * page/FrameLoadRequest.h:
              * page/FrameTree.cpp:
              * page/FrameTree.h:
              * page/Page.h:
              * page/mac/ChromeMac.mm:
              * platform/network/HTTPHeaderMap.h:
              * platform/network/ResourceErrorBase.cpp:
              * platform/network/ResourceErrorBase.h:
              * platform/network/ResourceHandleInternal.h:
              * platform/network/ResourceRequestBase.cpp:
              * platform/network/ResourceRequestBase.h:
              * platform/network/ResourceResponseBase.cpp:
              * platform/network/ResourceResponseBase.h:
              * platform/network/cf/ResourceError.h:
              * platform/network/cf/ResourceRequest.h:
              * platform/network/cf/ResourceRequestCFNet.h:
              * platform/network/cf/ResourceResponse.h:
              * platform/network/cf/ResourceResponseCFNet.h:
              * platform/network/curl/ResourceError.h:
              * platform/network/curl/ResourceRequest.h:
              * platform/network/curl/ResourceResponse.h:
              * platform/network/mac/ResourceError.h:
              * platform/network/mac/ResourceErrorMac.mm:
              * platform/network/mac/ResourceRequest.h:
              * platform/network/mac/ResourceRequestMac.mm:
              * platform/network/mac/ResourceResponse.h:
              * platform/network/mac/ResourceResponseMac.mm:
              * platform/network/qt/ResourceError.h:
              * platform/network/qt/ResourceRequest.h:
              * platform/network/qt/ResourceResponse.h:
              * platform/network/soup/CookieJarSoup.cpp:
              * platform/network/soup/ResourceError.h:
              * platform/network/soup/ResourceRequest.h:
              * platform/network/soup/ResourceResponse.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53ddf179
  7. 20 Aug, 2008 1 commit
  8. 18 Aug, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 349e1eb0
      darin@apple.com authored
      2008-08-12  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              - eliminate JSValue::type()
      
              This will make it slightly easier to change the JSImmediate design without
              having to touch so many call sites.
      
              SunSpider says this change is a wash (looked like a slight speedup, but not
              statistically significant).
      
              * API/JSStringRef.cpp: Removed include of JSType.h.
              * API/JSValueRef.cpp: Removed include of JSType.h.
              (JSValueGetType): Replaced use of JSValue::type() with
              JSValue::is functions.
      
              * JavaScriptCore.exp: Updated.
      
              * VM/JSPropertyNameIterator.cpp: Removed type() implementation.
              (KJS::JSPropertyNameIterator::toPrimitive): Changed to take
              PreferredPrimitiveType argument instead of JSType.
              * VM/JSPropertyNameIterator.h: Ditto.
      
              * VM/Machine.cpp:
              (KJS::fastIsNumber): Updated for name change.
              (KJS::fastToInt32): Ditto.
              (KJS::fastToUInt32): Ditto.
              (KJS::jsAddSlowCase): Updated toPrimitive caller for change from
              JSType to PreferredPrimitiveType.
              (KJS::jsAdd): Replaced calls to JSValue::type() with calls to
              JSValue::isString().
              (KJS::jsTypeStringForValue): Replaced calls to JSValue::type()
              with multiple calls to JSValue::is -- we could make this a
              virtual function instead if we want to have faster performance.
              (KJS::Machine::privateExecute): Renamed JSImmediate::toTruncatedUInt32
              to JSImmediate::getTruncatedUInt32 for consistency with other functions.
              Changed two calls of JSValue::type() to JSValue::isString().
      
              * kjs/GetterSetter.cpp:
              (KJS::GetterSetter::toPrimitive): Changed to take
              PreferredPrimitiveType argument instead of JSType.
              (KJS::GetterSetter::isGetterSetter): Added.
              * kjs/GetterSetter.h:
      
              * kjs/JSCell.cpp:
              (KJS::JSCell::isString): Added.
              (KJS::JSCell::isGetterSetter): Added.
              (KJS::JSCell::isObject): Added.
      
              * kjs/JSCell.h: Eliminated type function. Added isGetterSetter.
              Made isString and isObject virtual. Changed toPrimitive to take
              PreferredPrimitiveType argument instead of JSType.
              (KJS::JSCell::isNumber): Use Heap::isNumber for faster performance.
              (KJS::JSValue::isGetterSetter): Added.
              (KJS::JSValue::toPrimitive): Changed to take
              PreferredPrimitiveType argument instead of JSType.
      
              * kjs/JSImmediate.h: Removed JSValue::type() and replaced
              JSValue::toTruncatedUInt32 with JSValue::getTruncatedUInt32.
              (KJS::JSImmediate::isEitherImmediate): Added.
      
              * kjs/JSNotAnObject.cpp:
              (KJS::JSNotAnObject::toPrimitive): Changed to take
              PreferredPrimitiveType argument instead of JSType.
              * kjs/JSNotAnObject.h: Ditto.
              * kjs/JSNumberCell.cpp:
              (KJS::JSNumberCell::toPrimitive): Ditto.
              * kjs/JSNumberCell.h:
              (KJS::JSNumberCell::toInt32): Renamed from fastToInt32. There's no
              other "slow" version of this once you have a JSNumberCell, so there's
              no need for "fast" in the name. It's a feature that this hides the
              base class toInt32, which does the same job less efficiently (and has
              an additional ExecState argument).
              (KJS::JSNumberCell::toUInt32): Ditto.
      
              * kjs/JSObject.cpp:
              (KJS::callDefaultValueFunction): Use isGetterSetter instead of type.
              (KJS::JSObject::getPrimitiveNumber): Use PreferredPrimitiveType.
              (KJS::JSObject::defaultValue): Ditto.
              (KJS::JSObject::defineGetter): Use isGetterSetter.
              (KJS::JSObject::defineSetter): Ditto.
              (KJS::JSObject::lookupGetter): Ditto.
              (KJS::JSObject::lookupSetter): Ditto.
              (KJS::JSObject::toNumber): Use PreferredPrimitiveType.
              (KJS::JSObject::toString): Ditto.
              (KJS::JSObject::isObject): Added.
      
              * kjs/JSObject.h:
              (KJS::JSObject::inherits): Call the isObject from JSCell; it's now
              hidden by our override of isObject.
              (KJS::JSObject::getOwnPropertySlotForWrite): Use isGetterSetter
              instead of type.
              (KJS::JSObject::getOwnPropertySlot): Ditto.
              (KJS::JSObject::toPrimitive): Use PreferredPrimitiveType.
      
              * kjs/JSString.cpp:
              (KJS::JSString::toPrimitive): Use PreferredPrimitiveType.
              (KJS::JSString::isString): Added.
              * kjs/JSString.h: Ditto.
      
              * kjs/JSValue.h: Removed type(), added isGetterSetter(). Added
              PreferredPrimitiveType enum and used it as the argument for the
              toPrimitive function.
              (KJS::JSValue::getBoolean): Simplified a bit an removed a branch.
      
              * kjs/collector.cpp:
              (KJS::typeName): Changed to use JSCell::is functions instead of
              calling JSCell::type.
      
              * kjs/collector.h:
              (KJS::Heap::isNumber): Renamed from fastIsNumber.
      
              * kjs/nodes.h: Added now-needed include of JSType, since the type
              is used here to record types of values in the tree.
      
              * kjs/operations.cpp:
              (KJS::equal): Rewrote to no longer depend on type().
              (KJS::strictEqual): Ditto.
      
      JavaScriptGlue:
      
      2008-08-12  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              - eliminate JSValue::type()
      
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal): Replaced uses of JSValue::type() with
              JSValue::is functions.
              * UserObjectImp.cpp:
              (UserObjectImp::getOwnPropertySlot): Ditto.
              (UserObjectImp::toPrimitive): Take PreferredPrimitiveType argument
              instead of JSType argument.
              * UserObjectImp.h: Ditto.
      
      WebCore:
      
      2008-08-12  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              - eliminate JSValue::type()
      
              * bridge/c/c_instance.cpp:
              (KJS::Bindings::CInstance::defaultValue): Take PreferredPrimitiveType
              argument instead of JSType argument. Removed unneeded code to handle
              boolean, since that's never passed.
              * bridge/c/c_instance.h: Ditto.
      
              * bridge/c/c_utility.cpp:
              (KJS::Bindings::convertValueToNPVariant): Use JSValue::is functions
              instead of JSValue::type(). Removed unneeded code to handle
              "unspecified".
      
              * bridge/jni/jni_instance.cpp:
              (JavaInstance::defaultValue): Take PreferredPrimitiveType argument
              instead of JSType argument. Removed unneeded code to handle boolean.
              * bridge/jni/jni_instance.h: Ditto.
      
              * bridge/jni/jni_jsobject.mm:
              (JavaJSObject::convertValueToJObject): Use JSValue::is functions
              instead of JSValue::type().
      
              * bridge/objc/objc_instance.h: Take PreferredPrimitiveType argument
              instead of JSType argument. Removed unused argument.
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::getValueOfUndefinedField): Removed unused argument.
              (ObjcInstance::defaultValue): Take PreferredPrimitiveType argument
              instead of JSType argument. Removed unneeded code to handle boolean
              and another dead code path for unknown types.
      
              * bridge/objc/objc_runtime.h: Take PreferredPrimitiveType argument
              instead of JSType argument. Removed override of type() that caused
              the fallback object to return "UndefinedType" when there is no
              invokeUndefinedMethodFromWebScript:withArguments: method defined.
              That didn't accomplish much, since most checks for undefined don't
              ever call type().
              * bridge/objc/objc_runtime.mm:
              (ObjcFallbackObjectImp::defaultValue): Ditto.
      
              * bridge/qt/qt_instance.cpp:
              (KJS::Bindings::QtInstance::defaultValue): Take PreferredPrimitiveType
              argument instead of JSType argument. Removed unneeded code to handle
              boolean.
              * bridge/qt/qt_instance.h: Ditto.
      
              * bridge/runtime.h:
              (KJS::Bindings::Instance::getValueOfUndefinedField): Removed
              unsed argument.
              * bridge/runtime_object.cpp:
              (RuntimeObjectImp::defaultValue): Take PreferredPrimitiveType
              argument instead of JSType argument.
              * bridge/runtime_object.h: Ditto.
      
      WebKit/mac:
      
      2008-08-12  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              - eliminate JSValue::type()
      
              * WebView/WebView.mm:
              (aeDescFromJSValue): Rewrite to use the JSValue::is functions instead
              of a switch on JSValue::type().
      
      LayoutTests:
      
      2008-08-12  Darin Adler  <darin@apple.com>
      
              Reviewed by Geoff.
      
              - added a test since I had to rewrite the == and === operators
      
              * fast/js/equality-expected.txt: Added.
              * fast/js/equality.html: Added.
              * fast/js/resources/equality.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      349e1eb0
  9. 15 Aug, 2008 1 commit
  10. 31 Jul, 2008 1 commit
  11. 14 Jul, 2008 1 commit
  12. 02 Jul, 2008 1 commit
    • ap@webkit.org's avatar
      Reviewed by Darin. · 32dab944
      ap@webkit.org authored
              Disable JSLock for per-thread contexts.
      
              No change on SunSpider.
      
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalData.cpp:
              (KJS::JSGlobalData::JSGlobalData):
              (KJS::JSGlobalData::sharedInstance):
              Added isSharedInstance as a better way to tell whether the instance is shared (legacy).
      
              * kjs/JSLock.cpp:
              (KJS::createJSLockCount):
              (KJS::JSLock::lockCount):
              (KJS::setLockCount):
              (KJS::JSLock::JSLock):
              (KJS::JSLock::lock):
              (KJS::JSLock::unlock):
              (KJS::JSLock::currentThreadIsHoldingLock):
              (KJS::JSLock::DropAllLocks::DropAllLocks):
              (KJS::JSLock::DropAllLocks::~DropAllLocks):
              * kjs/JSLock.h:
              (KJS::JSLock::JSLock):
              (KJS::JSLock::~JSLock):
              Made JSLock and JSLock::DropAllLocks constructors take a parameter to decide whether to
              actually lock a mutex, or only to increment recursion count. We cannot turn it into no-op
              if we want to keep existing assertions working.
              Made recursion count per-thread, now that locks may not lock.
      
              * API/JSBase.cpp:
              (JSEvaluateScript): Take JSLock after casting JSContextRef to ExecState* (which doesn't need
              locking in any case), so that a decision whether to actually lock can be made.
              (JSCheckScriptSyntax): Ditto.
              (JSGarbageCollect): Only lock while collecting the shared heap, not the per-thread one.
      
              * API/JSObjectRef.cpp:
              (JSClassCreate): Don't lock, as there is no reason to.
              (JSClassRetain): Ditto.
              (JSClassRelease): Ditto.
              (JSPropertyNameArrayRetain): Ditto.
              (JSPropertyNameArrayRelease): Only lock while deleting the array, as that may touch
              identifier table.
              (JSPropertyNameAccumulatorAddName): Adding a string also involves an identifier table
              lookup, and possibly modification.
      
              * API/JSStringRef.cpp:
              (JSStringCreateWithCharacters):
              (JSStringCreateWithUTF8CString):
              (JSStringRetain):
              (JSStringRelease):
              (JSStringGetUTF8CString):
              (JSStringIsEqual):
              * API/JSStringRefCF.cpp:
              (JSStringCreateWithCFString):
              JSStringRef operations other than releasing do not need locking.
      
              * VM/Machine.cpp: Don't include unused JSLock.h.
      
              * kjs/CollectorHeapIntrospector.cpp: (KJS::CollectorHeapIntrospector::statistics):
              Don't take the lock for real, as heap introspection pauses the process anyway. It seems that
              the existing code could cause deadlocks.
      
              * kjs/Shell.cpp:
              (functionGC):
              (main):
              (jscmain):
              The test tool uses a per-thread context, so no real locking is required.
      
              * kjs/collector.h:
              (KJS::Heap::setGCProtectNeedsLocking): Optionally protect m_protectedValues access with a
              per-heap mutex. This is only needed for WebCore Database code, which violates the "no data
              migration between threads" by using ProtectedPtr on a background thread.
              (KJS::Heap::isShared): Keep a shared flag here, as well.
      
              * kjs/protect.h:
              (KJS::::ProtectedPtr):
              (KJS::::~ProtectedPtr):
              (KJS::::operator):
              (KJS::operator==):
              (KJS::operator!=):
              ProtectedPtr is ony used from WebCore, so it doesn't need to take JSLock. An assertion in
              Heap::protect/unprotect guards agains possible future unlocked uses of ProtectedPtr in JSC.
      
              * kjs/collector.cpp:
              (KJS::Heap::Heap): Initialize m_isShared.
              (KJS::Heap::~Heap): No need to lock for real during destruction, but must keep assertions
              in sweep() working.
              (KJS::destroyRegisteredThread): Registered thread list is only accessed for shared heap,
              so locking is always needed here.
              (KJS::Heap::registerThread): Ditto.
              (KJS::Heap::markStackObjectsConservatively): Use m_isShared instead of comparing to a shared
              instance for a small speedup.
              (KJS::Heap::setGCProtectNeedsLocking): Create m_protectedValuesMutex. There is currently no
              way to undo this - and ideally, Database code will be fixed to lo longer require this quirk.
              (KJS::Heap::protect): Take m_protectedValuesMutex (if it exists) while accessing
              m_protectedValues.
              (KJS::Heap::unprotect): Ditto.
              (KJS::Heap::markProtectedObjects): Ditto.
              (KJS::Heap::protectedGlobalObjectCount): Ditto.
              (KJS::Heap::protectedObjectCount): Ditto.
              (KJS::Heap::protectedObjectTypeCounts): Ditto.
      
              * kjs/ustring.cpp:
              * kjs/ustring.h:
              Don't include JSLock.h, which is no longer used here. As a result, an explicit include had
              to be added to many files in JavaScriptGlue, WebCore and WebKit.
      
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::init):
              * API/JSCallbackConstructor.cpp:
              (KJS::constructJSCallback):
              * API/JSCallbackFunction.cpp:
              (KJS::JSCallbackFunction::call):
              * API/JSCallbackObjectFunctions.h:
              (KJS::::init):
              (KJS::::getOwnPropertySlot):
              (KJS::::put):
              (KJS::::deleteProperty):
              (KJS::::construct):
              (KJS::::hasInstance):
              (KJS::::call):
              (KJS::::getPropertyNames):
              (KJS::::toNumber):
              (KJS::::toString):
              (KJS::::staticValueGetter):
              (KJS::::callbackGetter):
              * API/JSContextRef.cpp:
              (JSGlobalContextCreate):
              (JSGlobalContextRetain):
              (JSGlobalContextRelease):
              * API/JSValueRef.cpp:
              (JSValueIsEqual):
              (JSValueIsStrictEqual):
              (JSValueIsInstanceOfConstructor):
              (JSValueMakeNumber):
              (JSValueMakeString):
              (JSValueToNumber):
              (JSValueToStringCopy):
              (JSValueToObject):
              (JSValueProtect):
              (JSValueUnprotect):
              * JavaScriptCore.exp:
              * kjs/PropertyNameArray.h:
              (KJS::PropertyNameArray::globalData):
              * kjs/interpreter.cpp:
              (KJS::Interpreter::checkSyntax):
              (KJS::Interpreter::evaluate):
              Pass a parameter to JSLock/JSLock::DropAllLocks to decide whether the lock needs to be taken.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32dab944
  13. 19 Jun, 2008 1 commit
  14. 15 Jun, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 3dcb636f
      darin@apple.com authored
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSClassRef.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSStringRef.cpp:
              * API/JSStringRefCF.cpp:
              * API/JSValueRef.cpp:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/CodeBlock.cpp:
              * VM/CodeGenerator.cpp:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/Machine.cpp:
              * kjs/AllInOneFile.cpp:
              * kjs/DateMath.cpp:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/ExecState.cpp:
              * kjs/JSActivation.cpp:
              * kjs/JSFunction.cpp: Copied from JavaScriptCore/kjs/function.cpp.
              * kjs/JSFunction.h: Copied from JavaScriptCore/kjs/function.h.
              * kjs/JSImmediate.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSObject.cpp: Copied from JavaScriptCore/kjs/object.cpp.
              * kjs/JSObject.h: Copied from JavaScriptCore/kjs/object.h.
              * kjs/JSString.h: Copied from JavaScriptCore/kjs/internal.h.
              * kjs/JSValue.cpp: Copied from JavaScriptCore/kjs/value.cpp.
              * kjs/JSValue.h: Copied from JavaScriptCore/kjs/value.h.
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.h:
              * kjs/Shell.cpp:
              * kjs/SymbolTable.h:
              * kjs/array_instance.h:
              * kjs/collector.cpp:
              * kjs/date_object.cpp:
              * kjs/date_object.h:
              * kjs/error_object.cpp:
              * kjs/function.cpp: Removed.
              * kjs/function.h: Removed.
              * kjs/function_object.cpp:
              * kjs/function_object.h:
              * kjs/grammar.y:
              * kjs/internal.cpp:
              * kjs/internal.h: Removed.
              * kjs/lexer.cpp:
              * kjs/list.h:
              * kjs/lookup.h:
              * kjs/nodes.h:
              * kjs/object.cpp: Removed.
              * kjs/object.h: Removed.
              * kjs/object_object.h:
              * kjs/operations.cpp:
              * kjs/property_map.cpp:
              * kjs/property_slot.cpp:
              * kjs/property_slot.h:
              * kjs/protect.h:
              * kjs/regexp_object.cpp:
              * kjs/scope_chain.cpp:
              * kjs/string_object.h:
              * kjs/ustring.cpp:
              * kjs/value.cpp: Removed.
              * kjs/value.h: Removed.
              * profiler/Profile.cpp:
              * profiler/Profiler.cpp:
      
      JavaScriptGlue:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * ForwardingHeaders/kjs/JSValue.h: Copied from JavaScriptGlue/ForwardingHeaders/kjs/value.h.
              * ForwardingHeaders/kjs/value.h: Removed.
              * JSUtils.h:
      
      WebCore:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * ForwardingHeaders/kjs/JSFunction.h: Copied from WebCore/ForwardingHeaders/kjs/function.h.
              * ForwardingHeaders/kjs/JSObject.h: Copied from WebCore/ForwardingHeaders/kjs/object.h.
              * ForwardingHeaders/kjs/JSString.h: Copied from WebCore/ForwardingHeaders/kjs/internal.h.
              * ForwardingHeaders/kjs/JSValue.h: Copied from WebCore/ForwardingHeaders/kjs/value.h.
              * ForwardingHeaders/kjs/function.h: Removed.
              * ForwardingHeaders/kjs/internal.h: Removed.
              * ForwardingHeaders/kjs/object.h: Removed.
              * ForwardingHeaders/kjs/value.h: Removed.
              * WebCore.vcproj/WebCore.vcproj:
              * bindings/js/JSCustomSQLStatementCallback.h:
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDOMWindowShell.cpp:
              * bindings/js/JSQuarantinedObjectWrapper.h:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_utility.h:
              * bridge/qt/qt_runtime.cpp:
              * bridge/runtime.h:
              * bridge/runtime_array.h:
              * bridge/runtime_method.h:
              * bridge/runtime_object.h:
              * bridge/testbindings.cpp:
              * bridge/testbindings.mm:
              * bridge/testqtbindings.cpp:
              * loader/FrameLoader.cpp:
              * page/JavaScriptCallFrame.cpp:
              * page/JavaScriptProfile.cpp:
              * page/JavaScriptProfileNode.cpp:
              * platform/graphics/gtk/VideoSinkGStreamer.h:
              * plugins/PluginView.cpp:
              * plugins/gtk/PluginViewGtk.cpp:
              * plugins/qt/PluginViewQt.cpp:
              * plugins/win/PluginViewWin.cpp:
      
      WebKit/gtk:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * WebCoreSupport/ContextMenuClientGtk.cpp:
              * webkit/webkitnetworkrequest.h:
              * webkit/webkitwebbackforwardlist.h:
              * webkit/webkitwebframe.h:
              * webkit/webkitwebhistoryitem.h:
              * webkit/webkitwebsettings.h:
      
      WebKit/mac:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h.
              * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h.
              * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h.
              * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h.
              * ForwardingHeaders/kjs/function.h: Removed.
              * ForwardingHeaders/kjs/internal.h: Removed.
              * ForwardingHeaders/kjs/object.h: Removed.
              * ForwardingHeaders/kjs/value.h: Removed.
              * WebView/WebScriptDebugDelegate.mm:
      
      WebKit/qt:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * Api/qwebframe.cpp:
      
      WebKit/win:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * WebView.cpp:
      
      WebKit/wx:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              - new names for a few key JavaScriptCore files
      
              * WebView.cpp:
      
      WebKitTools:
      
      2008-06-15  Darin Adler  <darin@apple.com>
      
              * Scripts/do-file-rename: Updated for the latest round of renaming.
              * Scripts/do-webcore-rename: Tweaked and reorganized a bit.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3dcb636f
  15. 21 May, 2008 1 commit
  16. 12 May, 2008 1 commit
  17. 02 May, 2008 1 commit
  18. 12 Nov, 2007 1 commit
    • darin@apple.com's avatar
      Reviewed by Geoff. · 7f984871
      darin@apple.com authored
              - fix use of prefix and config.h, got rid of a few unneeded things in
                the PCRE code; no behavior changes
      
              * API/JSBase.cpp: Added include of config.h.
              * API/JSCallbackConstructor.cpp: Ditto.
              * API/JSCallbackFunction.cpp: Ditto.
              * API/JSCallbackObject.cpp: Ditto.
              * API/JSClassRef.cpp: Ditto.
              * API/JSContextRef.cpp: Ditto.
              * API/JSObjectRef.cpp: Ditto.
              * API/JSStringRef.cpp: Ditto.
              * API/JSValueRef.cpp: Ditto.
      
              * JavaScriptCorePrefix.h: Removed obsolete <ctype.h> workaround.
              Moved new/delete macros after includes, as they are in WebCore's prefix.
              Removed "config.h".
      
              * pcre/dftables.cpp: (main): Changed back to not use a separate maketables
              function. This is needed for PCRE, but not helpful for our use. Also changed
              the tables to all be 128 entries long instead of 256, since only the first
              128 are ever used.
      
              * pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab,
              which was only being used to check hex digits. Changed all uses of TRUE and
              FALSE to use the C++ true and false instead.
              (check_escape): Just the TRUE/FALSE thing.
              (is_counted_repeat): Ditto.
              (could_be_empty_branch): Ditto.
              (get_othercase_range): Ditto.
              (compile_branch): Ditto.
              (compile_regex): Ditto.
              (is_anchored): Ditto.
              (is_startline): Ditto.
              (find_firstassertedchar): Ditto.
              (jsRegExpCompile): Ditto.
      
              * pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and
              FALSE to use the C++ true and false instead.
              (match_ref): Just the TRUE/FALSE thing.
              (match): Ditto. Removed some unneeded braces.
              (jsRegExpExecute): Just the TRUE/FALSE thing.
      
              * pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top
              of the file instead of the bottom, so they can be used. Also changed the table
              sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE.
              Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to
              be a macro instead of a extern int.
      
              * pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now.
      
              * pcre/pcre_tables.cpp: Made table sizes explicit.
      
              * pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f984871
  19. 25 Oct, 2007 1 commit
    • eseidel's avatar
      2007-10-24 Eric Seidel <eric@webkit.org> · 5417cd59
      eseidel authored
              Reviewed by Maciej.
              
              Add a JSGlobalObject class and remove the InterpreterMap
              http://bugs.webkit.org/show_bug.cgi?id=15681
              
              This required making JSCallbackObject a template class to allow for
              JSGlobalObjects with JSCallbackObject functionality.
              
              SunSpider claims this was a 0.5% speedup.
      
              * API/JSCallbackObject.cpp:
              (KJS::):
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h: Copied from API/JSCallbackObject.cpp.
              (KJS::::JSCallbackObject):
              (KJS::::init):
              (KJS::::~JSCallbackObject):
              (KJS::::initializeIfNeeded):
              (KJS::::className):
              (KJS::::getOwnPropertySlot):
              (KJS::::put):
              (KJS::::deleteProperty):
              (KJS::::implementsConstruct):
              (KJS::::construct):
              (KJS::::implementsHasInstance):
              (KJS::::hasInstance):
              (KJS::::implementsCall):
              (KJS::::callAsFunction):
              (KJS::::getPropertyNames):
              (KJS::::toNumber):
              (KJS::::toString):
              (KJS::::setPrivate):
              (KJS::::getPrivate):
              (KJS::::inherits):
              (KJS::::cachedValueGetter):
              (KJS::::staticValueGetter):
              (KJS::::staticFunctionGetter):
              (KJS::::callbackGetter):
              * API/JSClassRef.cpp:
              (OpaqueJSClass::prototype):
              * API/JSContextRef.cpp:
              (JSGlobalContextCreate):
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSObjectGetPrivate):
              (JSObjectSetPrivate):
              * API/JSValueRef.cpp:
              (JSValueIsObjectOfClass):
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bindings/c/c_utility.cpp:
              (KJS::Bindings::convertValueToNPVariant):
              * bindings/jni/jni_jsobject.cpp:
              * bindings/objc/objc_utility.mm:
              (KJS::Bindings::convertValueToObjcValue):
              * kjs/Context.cpp:
              (KJS::Context::Context):
              * kjs/ExecState.cpp:
              (KJS::ExecState::lexicalInterpreter):
              * kjs/JSGlobalObject.h: Added.
              (KJS::JSGlobalObject::JSGlobalObject):
              (KJS::JSGlobalObject::isGlobalObject):
              (KJS::JSGlobalObject::interpreter):
              (KJS::JSGlobalObject::setInterpreter):
              * kjs/array_instance.cpp:
              * kjs/context.h:
              * kjs/function.cpp:
              (KJS::FunctionImp::callAsFunction):
              (KJS::GlobalFuncImp::callAsFunction):
              * kjs/interpreter.cpp:
              (KJS::Interpreter::Interpreter):
              (KJS::Interpreter::init):
              (KJS::Interpreter::~Interpreter):
              (KJS::Interpreter::globalObject):
              (KJS::Interpreter::initGlobalObject):
              (KJS::Interpreter::evaluate):
              * kjs/interpreter.h:
              * kjs/lookup.h:
              (KJS::cacheGlobalObject):
              * kjs/object.h:
              (KJS::JSObject::isGlobalObject):
              * kjs/testkjs.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5417cd59
  20. 27 Jan, 2007 1 commit
    • ggaren's avatar
      Reviewed by Beth Dakin. · 76727c5a
      ggaren authored
              
              Added some missing JSLocks, which might fix <rdar://problem/4889707>.
      
              We need to lock whenever we might allocate memory because our FastMalloc
              implementation requires clients to register their threads, which we do
              through JSLock. 
              
              We also need to lock whenever modifying ref-counts because they're not 
              thread-safe.
      
              * API/JSObjectRef.cpp:
              (JSClassCreate): Allocates memory
              (JSClassRetain): Modifies a ref-count
              (JSClassRelease): Modifies a ref-count
              (JSPropertyNameArrayRetain): Modifies a ref-count
              (JSPropertyNameArrayRelease): Modifies a ref-count
              * API/JSStringRef.cpp:
              (JSStringRetain): Modifies a ref-count
              * API/JSValueRef.cpp:
              (JSValueIsInstanceOfConstructor): Might allocate memory if an exception
              is thrown.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76727c5a
  21. 15 Sep, 2006 1 commit
    • andersca's avatar
      2006-09-15 Anders Carlsson <acarlsson@apple.com> · 53794dc8
      andersca authored
              Reviewed by Steve.
      
              Add JavaScriptCore API to the build.
              * API/JSBase.cpp:
              * API/JSCallbackConstructor.cpp:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackObject.cpp:
              * API/JSClassRef.cpp:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSStringRef.cpp:
              * API/JSValueRef.cpp:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * os-win32/stdbool.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53794dc8
  22. 17 Jul, 2006 1 commit
    • mjs's avatar
      Reviewed by Geoff. · 127f8592
      mjs authored
              
              - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
              except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
              
              Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
              but usually uninteresting parameter.
      
              * API/JSBase.cpp:
              (JSEvaluateScript):
              (JSCheckScriptSyntax):
              (JSGarbageCollect):
              * API/JSBase.h:
              * API/JSCallbackObject.cpp:
              (KJS::JSCallbackObject::JSCallbackObject):
              (KJS::JSCallbackObject::init):
              (KJS::JSCallbackObject::getOwnPropertySlot):
              (KJS::JSCallbackObject::put):
              (KJS::JSCallbackObject::deleteProperty):
              (KJS::JSCallbackObject::toNumber):
              (KJS::JSCallbackObject::toString):
              * API/JSContextRef.cpp:
              (JSGlobalContextCreate):
              (JSGlobalContextRetain):
              (JSGlobalContextRelease):
              (JSContextGetGlobalObject):
              * API/JSContextRef.h:
              * API/JSNode.c:
              (JSNodePrototype_appendChild):
              (JSNodePrototype_removeChild):
              (JSNodePrototype_replaceChild):
              (JSNode_getNodeType):
              (JSNode_getFirstChild):
              (JSNode_prototype):
              * API/JSNodeList.c:
              (JSNodeListPrototype_item):
              (JSNodeList_length):
              (JSNodeList_getProperty):
              (JSNodeList_prototype):
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSObjectMakeFunctionWithCallback):
              (JSObjectMakeConstructor):
              (JSObjectMakeFunction):
              (JSObjectGetPrototype):
              (JSObjectSetPrototype):
              (JSObjectHasProperty):
              (JSObjectGetProperty):
              (JSObjectSetProperty):
              (JSObjectGetPropertyAtIndex):
              (JSObjectSetPropertyAtIndex):
              (JSObjectDeleteProperty):
              (JSObjectIsFunction):
              (JSObjectCallAsFunction):
              (JSObjectIsConstructor):
              (JSObjectCallAsConstructor):
              (JSObjectCopyPropertyNames):
              * API/JSObjectRef.h:
              * API/JSStringRef.cpp:
              * API/JSValueRef.cpp:
              (JSValueGetType):
              (JSValueIsUndefined):
              (JSValueIsNull):
              (JSValueIsBoolean):
              (JSValueIsNumber):
              (JSValueIsString):
              (JSValueIsObject):
              (JSValueIsObjectOfClass):
              (JSValueIsEqual):
              (JSValueIsStrictEqual):
              (JSValueIsInstanceOfConstructor):
              (JSValueMakeUndefined):
              (JSValueMakeNull):
              (JSValueMakeBoolean):
              (JSValueMakeNumber):
              (JSValueMakeString):
              (JSValueToBoolean):
              (JSValueToNumber):
              (JSValueToStringCopy):
              (JSValueToObject):
              (JSValueProtect):
              (JSValueUnprotect):
              * API/JSValueRef.h:
              * API/minidom.c:
              (print):
              * API/testapi.c:
              (MyObject_getProperty):
              (MyObject_deleteProperty):
              (MyObject_callAsFunction):
              (MyObject_callAsConstructor):
              (MyObject_convertToType):
              (print_callAsFunction):
              (main):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      127f8592
  23. 14 Jul, 2006 2 commits
    • ggaren's avatar
      Reviewed by Maciej. · 292e70e1
      ggaren authored
              
              - Finalized exception handling in the API.
              
              setProperty can throw because it throws for built-in arrays. getProperty
              and deleteProperty can throw because setProperty can throw and we want
              to be consistent, and also because they seem like "actions." callAsFunction,
              callAsConstructor, and hasInstance can throw, because they caan throw for
              all built-ins.
              
              toBoolean can't throw because it's defined that way in the spec.
              
              - Documented that toBoolean and toObject can't be overridden by custom 
              objects because they're defined that way in the spec.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      292e70e1
    • ggaren's avatar
      Reviewed by Beth. · 6105a724
      ggaren authored
              
              Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
              JSBase.h/.cpp. They don't belong in the value-specific or context-specific 
              files because they're not part of the value or context implementations.
      
              * API/JSBase.h:
              * API/JSContextRef.cpp:
              (JSContextGetGlobalObject):
              * API/JSContextRef.h:
              * API/JSValueRef.cpp:
              (JSValueUnprotect):
              * API/JSValueRef.h:
              * JavaScriptCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6105a724
  24. 13 Jul, 2006 1 commit
    • ggaren's avatar
      Pleasing to Maciej. · 81d8be04
      ggaren authored
              
              - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
              - Added exception out parameters to JSValueTo* and JSValueIsEqual because
              they can throw
              - Removed JSObjectGetDescription because it's useless and vague, and 
              JSValueToString/JSValueIsObjectOfClass do a better job, anyway
              - Clarified comments about "IsFunction/Constructor" to indicate that they
              are true of all functions/constructors, not just those created by JSObjectMake*
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      81d8be04
  25. 12 Jul, 2006 1 commit
    • ggaren's avatar
      Reviewed by Maciej. · e66ccee6
      ggaren authored
              
              - Implemented a vast number of renames and comment clarifications 
              suggested during API review.
              
              JSInternalString -> JSString
              JS*Make -> JSValueMake*, JSObjectMake*
              JSTypeCode -> JSType
              JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
              JSGC*Protect -> JSValue*Protect
              JS*Callback -> JSObject*Callback
              JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
              JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
              JSString* -> 
                  JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
                  JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString, 
                  JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.
              
              - Changed functions taking a JSValue out arg and returning a bool indicating
              whether it was set to simply return a JSValue or NULL.
              
              - Removed JSStringGetCharacters because it's more documentation than code,
              and it's just a glorified memcpy built on existing API functionality.
              
              - Moved standard library includes into the headers that actually require them.
              
              - Standardized use of the phrase "Create Rule."
              
              - Removed JSLock from make functions that don't allocate.
              
              - Added exception handling to JSValueToBoolean, since we now allow
              callback objects to throw exceptions upon converting to boolean.
              
              - Renamed JSGCCollect to JSGarbageCollect.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e66ccee6
  26. 08 Jul, 2006 1 commit
  27. 07 Jul, 2006 1 commit
    • ggaren's avatar
      Reviewed by Maciej. · 554ad6fb
      ggaren authored
              
              More API action.
              
              - Headerdoc finished
      
              Semantic Changes:
              - Added a JSContextRef argument to many functions, because you need a 
              JSContextRef for doing virtually anything. I expect to add this argument
              to even more functions in a future patch.
              
              - Removed the globalObjectPrototype argument to JSContextCreate because
              you can't create an object until you have a context, so it's impossible
              to pass a prototype object to JSContextCreate. That's OK because (1) there's
              no reason to give the global object a prototype and (2) if you really want
              to, you can just use a separate call to JSObjectSetPrototype.
              
              - Removed the JSClassRef argument to JSClassCreate because it was unnecessary,
              and you need to be able to make the global object's class before you've
              created a JSContext.
              
              - Added an optional exception parameter to JSFunctionMakeWithBody because anything
              less would be uncivilized.
              
              - Made the return value parameter to JSObjectGetProperty optional to match
              all other return value parameters in the API.
              
              - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions
              and JSCallbackConstructors. You could use an abstract base class or strategic
              placement of m_privateData in the class structure to implement this, but 
              the former seemed like overkill, and the latter seemed too dangerous.
              
              - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property.
      
              Cosmetic Changes:
              - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc
              
              - Removed function names from @function declarations because headeroc
              can parse them automatically, and I wanted to rule out manual mismatch.
      
              - Changed Error::create to take a const UString& instead of a UString*
              because it was looking at me funny.
              
              - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF
              because the latter is more concise and it matches JSStringBufferCreateUTF8.
              
              * API/JSCallbackObject.cpp:
              (KJS::JSCallbackObject::getOwnPropertySlot):
              (KJS::JSCallbackObject::put):
              (KJS::JSCallbackObject::deleteProperty):
              (KJS::JSCallbackObject::getPropertyList):
              (KJS::JSCallbackObject::toBoolean):
              (KJS::JSCallbackObject::toNumber):
              (KJS::JSCallbackObject::toString):
              * API/JSClassRef.cpp:
              (JSClassCreate):
              * API/JSContextRef.cpp:
              (JSContextCreate):
              (JSContextSetException):
              * API/JSContextRef.h:
              * API/JSNode.c:
              (JSNodePrototype_class):
              (JSNode_class):
              * API/JSNodeList.c:
              (JSNodeListPrototype_class):
              (JSNodeList_class):
              * API/JSObjectRef.cpp:
              (JSObjectGetProperty):
              (JSObjectGetPrivate):
              (JSObjectSetPrivate):
              (JSObjectCallAsFunction):
              (JSObjectCallAsConstructor):
              (JSPropertyEnumeratorGetNext):
              * API/JSObjectRef.h:
              * API/JSStringBufferRef.cpp:
              (JSStringBufferCreateCF):
              * API/JSStringBufferRef.h:
              * API/JSValueRef.cpp:
              (JSValueIsInstanceOf):
              * API/JSValueRef.h:
              * API/minidom.c:
              (main):
              * API/minidom.js:
              * API/testapi.c:
              (MyObject_hasProperty):
              (MyObject_setProperty):
              (MyObject_deleteProperty):
              (MyObject_getPropertyList):
              (MyObject_convertToType):
              (MyObject_class):
              (main):
              * JavaScriptCore.exp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      554ad6fb
  28. 05 Jul, 2006 1 commit
  29. 03 Jul, 2006 1 commit
    • ggaren's avatar
      Reviewed by Darin. · 84f78e55
      ggaren authored
              
              - Refined value conversions in the API:
                  - failed toNumber returns NaN
                  - failed toObject returns NULL
                  - failed toString returns empty string
              
              - Refined excpetion handling in the API:
                  - failed value conversions do not throw exceptions
                  - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and 
                    JSObjectCallAsConstructor are returned through a JSValueRef* exception
                    argument
                  - removed JSContextHasException, because JSContextGetException does
                    the same job
                  
              * API/JSBase.h:
              * API/JSCharBufferRef.cpp:
              (JSValueCopyStringValue):
              * API/JSContextRef.cpp:
              (JSEvaluate):
              * API/JSContextRef.h:
              * API/JSNodeList.c: Added test code demonstrating how you would use
              toNumber, and why you probably don't need toUInt32, etc.
              (JSNodeListPrototype_item):
              (JSNodeList_getProperty):
              * API/JSObjectRef.cpp:
              (JSValueToObject):
              (JSObjectCallAsFunction):
              (JSObjectCallAsConstructor):
              * API/JSObjectRef.h:
              * API/JSValueRef.cpp:
              (JSValueToNumber):
              * API/JSValueRef.h:
              * API/minidom.c:
              (main):
              * API/testapi.c:
              (main): Added tests for new rules, and call to JSGCProtect to fix Intel 
              crash
              * JavaScriptCore.exp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84f78e55
  30. 01 Jul, 2006 1 commit
    • ggaren's avatar
      Reviewed by Maciej. · 08d9eec6
      ggaren authored
              
              - Phase 2 in the JS API.
              
              - Added support for specifying static tables of values -- this should
              obviate the need for using complicated callbacks for most lookups.
              
              -  API objects are now created with classes (JSClassRef) -- in order to support
              static values, and in order to prevent API objects from storing their
              data inline, and thus falling into the oversized (read: slow and prone to
              giving Maciej the frowny face) heap.
              
              - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor -- 
              to allow JSFunctionMake and JSConstructorMake to continue to work with
              the new class model. Another solution to this problem would be to create
              a custom class object for each function and constructor you make. This
              solution is more code but also more efficient.
              
              - Substantially beefed up the minidom example to demonstrate and test a
              lot of these techniques. Its output is still pretty haphazard, though.
              
              - Gave the <kjs/ preface to some includes -- I'm told this matters to
              building on some versions of Linux.
              
              - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass
              
              - Removed GetDescription callback. Something in the class datastructure
              should take care of this.
      
              * API/JSBase.h:
              * API/JSCallbackConstructor.cpp: Added.
              (KJS::):
              (KJS::JSCallbackConstructor::JSCallbackConstructor):
              (KJS::JSCallbackConstructor::implementsConstruct):
              (KJS::JSCallbackConstructor::construct):
              (KJS::JSCallbackConstructor::setPrivate):
              (KJS::JSCallbackConstructor::getPrivate):
              * API/JSCallbackConstructor.h: Added.
              (KJS::JSCallbackConstructor::classInfo):
              * API/JSCallbackFunction.cpp: Added.
              (KJS::):
              (KJS::JSCallbackFunction::JSCallbackFunction):
              (KJS::JSCallbackFunction::implementsCall):
              (KJS::JSCallbackFunction::callAsFunction):
              (KJS::JSCallbackFunction::setPrivate):
              (KJS::JSCallbackFunction::getPrivate):
              * API/JSCallbackFunction.h: Added.
              (KJS::JSCallbackFunction::classInfo):
              * API/JSCallbackObject.cpp:
              (KJS::):
              (KJS::JSCallbackObject::JSCallbackObject):
              (KJS::JSCallbackObject::init):
              (KJS::JSCallbackObject::~JSCallbackObject):
              (KJS::JSCallbackObject::className):
              (KJS::JSCallbackObject::getOwnPropertySlot):
              (KJS::JSCallbackObject::put):
              (KJS::JSCallbackObject::deleteProperty):
              (KJS::JSCallbackObject::implementsConstruct):
              (KJS::JSCallbackObject::construct):
              (KJS::JSCallbackObject::implementsCall):
              (KJS::JSCallbackObject::callAsFunction):
              (KJS::JSCallbackObject::getPropertyList):
              (KJS::JSCallbackObject::toBoolean):
              (KJS::JSCallbackObject::toNumber):
              (KJS::JSCallbackObject::toString):
              (KJS::JSCallbackObject::inherits):
              (KJS::JSCallbackObject::staticValueGetter):
              (KJS::JSCallbackObject::staticFunctionGetter):
              (KJS::JSCallbackObject::callbackGetter):
              * API/JSCallbackObject.h:
              * API/JSCharBufferRef.cpp:
              * API/JSClassRef.cpp: Added.
              (JSClassCreate):
              (JSClassRetain):
              (JSClassRelease):
              * API/JSClassRef.h: Added.
              (StaticValueEntry::StaticValueEntry):
              (StaticFunctionEntry::StaticFunctionEntry):
              (__JSClass::__JSClass):
              * API/JSContextRef.cpp:
              (JSContextCreate):
              (JSEvaluate):
              * API/JSContextRef.h:
              * API/JSNode.c: Added.
              (JSNodePrototype_appendChild):
              (JSNodePrototype_removeChild):
              (JSNodePrototype_replaceChild):
              (JSNodePrototype_class):
              (JSNode_getNodeType):
              (JSNode_getChildNodes):
              (JSNode_getFirstChild):
              (JSNode_finalize):
              (JSNode_class):
              (JSNode_prototype):
              (JSNode_new):
              (JSNode_construct):
              * API/JSNode.h: Added.
              * API/JSNodeList.c: Added.
              (JSNodeListPrototype_item):
              (JSNodeListPrototype_class):
              (JSNodeList_length):
              (JSNodeList_getProperty):
              (JSNodeList_finalize):
              (JSNodeList_class):
              (JSNodeList_prototype):
              (JSNodeList_new):
              * API/JSNodeList.h: Added.
              * API/JSObjectRef.cpp:
              (JSObjectMake):
              (JSFunctionMake):
              (JSConstructorMake):
              (__JSPropertyEnumerator::__JSPropertyEnumerator):
              (JSObjectCreatePropertyEnumerator):
              (JSPropertyEnumeratorGetNext):
              (JSPropertyEnumeratorRetain):
              (JSPropertyEnumeratorRelease):
              * API/JSObjectRef.h:
              (__JSObjectCallbacks::):
              * API/JSValueRef.cpp:
              (JSValueIsObjectOfClass):
              (JSValueIsInstanceOf):
              * API/JSValueRef.h:
              * API/Node.c: Added.
              (Node_new):
              (Node_appendChild):
              (Node_removeChild):
              (Node_replaceChild):
              (Node_ref):
              (Node_deref):
              * API/Node.h: Added.
              * API/NodeList.c: Added.
              (NodeList_new):
              (NodeList_length):
              (NodeList_item):
              (NodeList_ref):
              (NodeList_deref):
              * API/NodeList.h: Added.
              * API/minidom.c:
              (main):
              (print):
              (createStringWithContentsOfFile):
              * API/minidom.js:
              * API/testapi.c:
              (assertEqualsAsCharacters):
              (MyObject_getProperty):
              (MyObject_class):
              (myConstructor_callAsConstructor):
              (main):
              * API/testapi.js:
              * JavaScriptCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08d9eec6
  31. 21 Jun, 2006 1 commit
    • ggaren's avatar
      JavaScriptCore: · 2593cdc4
      ggaren authored
              Reviewed by Anders.
              
              - First cut at C API to JavaScript. Includes a unit test, 'testapi.c', 
              and the outline of a test app, 'minidom.c'.
              
              Includes one change to JSC internals: Rename propList to getPropertyList and have it
              take its target property list by reference so that subclasses can
              add properties to the list before calling through to their superclasses.
              
              Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like
              to give a shout-out to that.
              
              * API/APICast.h: Added.
              (toJS):
              (toRef):
              * API/JSBase.h: Added.
              * API/JSCallbackObject.cpp: Added.
              (KJS::):
              (KJS::JSCallbackObject::JSCallbackObject):
              (KJS::JSCallbackObject::~JSCallbackObject):
              (KJS::JSCallbackObject::className):
              (KJS::JSCallbackObject::getOwnPropertySlot):
              (KJS::JSCallbackObject::put):
              (KJS::JSCallbackObject::deleteProperty):
              (KJS::JSCallbackObject::implementsConstruct):
              (KJS::JSCallbackObject::construct):
              (KJS::JSCallbackObject::implementsCall):
              (KJS::JSCallbackObject::callAsFunction):
              (KJS::JSCallbackObject::getPropertyList):
              (KJS::JSCallbackObject::toBoolean):
              (KJS::JSCallbackObject::toNumber):
              (KJS::JSCallbackObject::toString):
              (KJS::JSCallbackObject::setPrivate):
              (KJS::JSCallbackObject::getPrivate):
              (KJS::JSCallbackObject::cachedValueGetter):
              (KJS::JSCallbackObject::callbackGetter):
              * API/JSCallbackObject.h: Added.
              (KJS::JSCallbackObject::classInfo):
              * API/JSCharBufferRef.cpp: Added.
              (JSStringMake):
              (JSCharBufferCreate):
              (JSCharBufferCreateUTF8):
              (JSCharBufferRetain):
              (JSCharBufferRelease):
              (JSValueCopyStringValue):
              (JSCharBufferGetLength):
              (JSCharBufferGetCharactersPtr):
              (JSCharBufferGetCharacters):
              (JSCharBufferGetMaxLengthUTF8):
              (JSCharBufferGetCharactersUTF8):
              (JSCharBufferIsEqual):
              (JSCharBufferIsEqualUTF8):
              (JSCharBufferCreateWithCFString):
              (CFStringCreateWithJSCharBuffer):
              * API/JSCharBufferRef.h: Added.
              * API/JSContextRef.cpp: Added.
              (JSContextCreate):
              (JSContextDestroy):
              (JSContextGetGlobalObject):
              (JSEvaluate):
              (JSCheckSyntax):
              (JSContextHasException):
              (JSContextGetException):
              (JSContextClearException):
              (JSContextSetException):
              * API/JSContextRef.h: Added.
              * API/JSObjectRef.cpp: Added.
              (JSValueToObject):
              (JSObjectMake):
              (JSFunctionMake):
              (JSObjectGetDescription):
              (JSObjectGetPrototype):
              (JSObjectSetPrototype):
              (JSObjectHasProperty):
              (JSObjectGetProperty):
              (JSObjectSetProperty):
              (JSObjectDeleteProperty):
              (JSObjectGetPrivate):
              (JSObjectSetPrivate):
              (JSObjectIsFunction):
              (JSObjectCallAsFunction):
              (JSObjectIsConstructor):
              (JSObjectCallAsConstructor):
              (__JSPropertyListEnumerator::__JSPropertyListEnumerator):
              (JSObjectCreatePropertyEnumerator):
              (JSPropertyEnumeratorGetNext):
              (JSPropertyEnumeratorRetain):
              (JSPropertyEnumeratorRelease):
              (JSPropertyListAdd):
              * API/JSObjectRef.h: Added.
              * API/JSValueRef.cpp: Added.
              (JSValueGetType):
              (JSValueIsUndefined):
              (JSValueIsNull):
              (JSValueIsBoolean):
              (JSValueIsNumber):
              (JSValueIsString):
              (JSValueIsObject):
              (JSValueIsEqual):
              (JSValueIsStrictEqual):
              (JSUndefinedMake):
              (JSNullMake):
              (JSBooleanMake):
              (JSNumberMake):
              (JSValueToBoolean):
              (JSValueToNumber):
              (JSGCProtect):
              (JSGCUnprotect):
              (JSGCCollect):
              * API/JSValueRef.h: Added.
              * API/JavaScriptCore.h: Added.
              * API/minidom.c: Added.
              (main):
              * API/minidom.html: Added.
              * API/minidom.js: Added.
              * API/testapi.c: Added.
              (assertEqualsAsBoolean):
              (assertEqualsAsNumber):
              (assertEqualsAsUTF8String):
              (assertEqualsAsCharactersPtr):
              (assertEqualsAsCharacters):
              (MyObject_initialize):
              (MyObject_copyDescription):
              (MyObject_hasProperty):
              (MyObject_getProperty):
              (MyObject_setProperty):
              (MyObject_deleteProperty):
              (MyObject_getPropertyList):
              (MyObject_callAsFunction):
              (MyObject_callAsConstructor):
              (MyObject_convertToType):
              (MyObject_finalize):
              (print_callAsFunction):
              (main):
              (createStringWithContentsOfFile):
              * API/testapi.js: Added.
              * ChangeLog:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * bindings/npruntime_impl.h:
              * kjs/array_instance.h:
              * kjs/array_object.cpp:
              (ArrayInstance::getPropertyList):
              * kjs/interpreter.cpp:
              (KJS::Interpreter::evaluate):
              * kjs/nodes.cpp:
              (ForInNode::execute):
              * kjs/object.cpp:
              (KJS::JSObject::put):
              (KJS::JSObject::canPut):
              (KJS::JSObject::deleteProperty):
              (KJS::JSObject::propertyIsEnumerable):
              (KJS::JSObject::getPropertyAttributes):
              (KJS::JSObject::getPropertyList):
              * kjs/object.h:
              * kjs/property_map.cpp:
              (KJS::PropertyMap::get):
              * kjs/property_map.h:
              * kjs/scope_chain.cpp:
              (KJS::ScopeChain::print):
              * kjs/string_object.cpp:
              (StringInstance::getPropertyList):
              * kjs/string_object.h:
              * kjs/ustring.h:
              (KJS::UString::Rep::ref):
      
      JavaScriptGlue:
      
              Reviewed by Anders.
              
              - Required for JS API: Rename propList to getPropertyList and have it
              take its target property list by reference so that subclasses can
              add properties to the list before calling through to their superclasses.
      
              * JSUtils.cpp:
              (KJSValueToCFTypeInternal):
              * JSValueWrapper.cpp:
              (JSValueWrapper::JSObjectCopyPropertyNames):
              * UserObjectImp.cpp:
              (UserObjectImp::getPropertyList):
              * UserObjectImp.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2593cdc4