1. 17 Sep, 2013 1 commit
  2. 24 Jul, 2013 1 commit
    • oliver@apple.com's avatar
      fourthTier: The Math object should not be polymorphic · 524161ed
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117576
      
      Reviewed by Oliver Hunt.
      
      Fill in the Math object eagerly, to avoid its structure changing during
      execution. There are lots of ways to skin this cat; this one seemed
      easiest, and justified given the relative hotness of math operations.
      
      20% speedup on DSP-filtrr tests, small speedups on a few Kraken tests.
      
      * DerivedSources.make:
      * JavaScriptCore.order:
      * create_hash_table:
      * interpreter/CallFrame.h:
      (JSC::ExecState::jsonTable): Removed the Math object's static table.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::putDirectNativeFunctionWithoutTransition):
      * runtime/JSObject.h:
      * runtime/MathObject.cpp:
      (JSC::MathObject::finishCreation):
      * runtime/MathObject.h:
      (JSC::MathObject::create): Set up the Math object at construction time.
      
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::~VM):
      * runtime/VM.h: Removed the Math object's static table.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      524161ed
  3. 25 Apr, 2013 1 commit
    • oliver@apple.com's avatar
      Add support for Math.imul · 6436732a
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=115143
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Add support for Math.imul, a thunk generator for Math.imul,
      and an intrinsic.
      
      Fairly self explanatory set of changes, DFG intrinsics simply
      leverages the existing ValueToInt32 nodes.
      
      * create_hash_table:
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::executeEffects):
      * dfg/DFGBackwardsPropagationPhase.cpp:
      (JSC::DFG::BackwardsPropagationPhase::propagate):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::performNodeCSE):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGNodeType.h:
      (DFG):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileArithIMul):
      * dfg/DFGSpeculativeJIT.h:
      (SpeculativeJIT):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/ThunkGenerators.cpp:
      (JSC::imulThunkGenerator):
      (JSC):
      * jit/ThunkGenerators.h:
      (JSC):
      * runtime/Intrinsic.h:
      * runtime/MathObject.cpp:
      (JSC):
      (JSC::mathProtoFuncIMul):
      * runtime/VM.cpp:
      (JSC::thunkGeneratorForIntrinsic):
      
      LayoutTests:
      
      Add a bunch of tests for Math.imul
      
      * fast/js/Object-getOwnPropertyNames-expected.txt:
      * fast/js/imul-expected.txt: Added.
      * fast/js/imul.html: Added.
      * fast/js/regress/imul-double-only-expected.txt: Added.
      * fast/js/regress/imul-double-only.html: Added.
      * fast/js/regress/imul-int-only-expected.txt: Added.
      * fast/js/regress/imul-int-only.html: Added.
      * fast/js/regress/imul-mixed-expected.txt: Added.
      * fast/js/regress/imul-mixed.html: Added.
      * fast/js/regress/script-tests/imul-double-only.js: Added.
      (f):
      * fast/js/regress/script-tests/imul-int-only.js: Added.
      (f):
      * fast/js/regress/script-tests/imul-mixed.js: Added.
      (f):
      * fast/js/script-tests/Object-getOwnPropertyNames.js:
      * fast/js/script-tests/imul.js: Added.
      (testIMul):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6436732a
  4. 18 Mar, 2013 1 commit
    • fpizlo@apple.com's avatar
      DFG string conversions and allocations should be inlined · 0e6e1542
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112376
      
      Source/JavaScriptCore: 
      
      Reviewed by Geoffrey Garen.
              
      This turns new String(), String(), String.prototype.valueOf(), and
      String.prototype.toString() into intrinsics. It gives the DFG the ability to handle
      conversions from StringObject to JSString and vice-versa, and also gives it the
      ability to handle cases where a variable may be either a StringObject or a JSString.
      To do this, I added StringObject to value profiling (and removed the stale
      distinction between Myarguments and Foreignarguments). I also cleaned up ToPrimitive
      handling, using some of the new functionality but also taking advantage of the
      existence of Identity(String:@a).
              
      This is a 2% SunSpider speed-up. Also there are some speed-ups on V8v7 and Kraken.
      On microbenchmarks that stress new String() this is a 14x speed-up.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * bytecode/CodeBlock.h:
      (CodeBlock):
      (JSC::CodeBlock::hasExitSite):
      (JSC):
      * bytecode/DFGExitProfile.cpp:
      (JSC::DFG::ExitProfile::hasExitSite):
      (DFG):
      * bytecode/DFGExitProfile.h:
      (ExitProfile):
      (JSC::DFG::ExitProfile::hasExitSite):
      * bytecode/ExitKind.cpp:
      (JSC::exitKindToString):
      * bytecode/ExitKind.h:
      * bytecode/SpeculatedType.cpp:
      (JSC::dumpSpeculation):
      (JSC::speculationToAbbreviatedString):
      (JSC::speculationFromClassInfo):
      * bytecode/SpeculatedType.h:
      (JSC):
      (JSC::isStringObjectSpeculation):
      (JSC::isStringOrStringObjectSpeculation):
      * create_hash_table:
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::executeEffects):
      * dfg/DFGAbstractState.h:
      (JSC::DFG::AbstractState::filterEdgeByUse):
      * dfg/DFGByteCodeParser.cpp:
      (ByteCodeParser):
      (JSC::DFG::ByteCodeParser::handleCall):
      (JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
      (DFG):
      (JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
      * dfg/DFGCSEPhase.cpp:
      (JSC::DFG::CSEPhase::putStructureStoreElimination):
      * dfg/DFGEdge.h:
      (JSC::DFG::Edge::shift):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
      (FixupPhase):
      (JSC::DFG::FixupPhase::canOptimizeStringObjectAccess):
      (JSC::DFG::FixupPhase::observeUseKindOnNode):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::hasGlobalExitSite):
      (Graph):
      (JSC::DFG::Graph::hasExitSite):
      (JSC::DFG::Graph::clobbersWorld):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::convertToToString):
      (Node):
      (JSC::DFG::Node::hasStructure):
      (JSC::DFG::Node::shouldSpeculateStringObject):
      (JSC::DFG::Node::shouldSpeculateStringOrStringObject):
      * dfg/DFGNodeType.h:
      (DFG):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileToStringOnCell):
      (DFG):
      (JSC::DFG::SpeculativeJIT::compileNewStringObject):
      (JSC::DFG::SpeculativeJIT::speculateObject):
      (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
      (JSC::DFG::SpeculativeJIT::speculateString):
      (JSC::DFG::SpeculativeJIT::speculateStringObject):
      (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
      (JSC::DFG::SpeculativeJIT::speculate):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      (SpeculativeJIT):
      (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
      (DFG):
      (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGUseKind.cpp:
      (WTF::printInternal):
      * dfg/DFGUseKind.h:
      (JSC::DFG::typeFilterFor):
      * interpreter/CallFrame.h:
      (JSC::ExecState::regExpPrototypeTable):
      * runtime/CommonIdentifiers.h:
      * runtime/Intrinsic.h:
      * runtime/JSDestructibleObject.h:
      (JSDestructibleObject):
      (JSC::JSDestructibleObject::classInfoOffset):
      * runtime/JSGlobalData.cpp:
      (JSC):
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
      * runtime/JSGlobalData.h:
      (JSGlobalData):
      * runtime/JSObject.cpp:
      * runtime/JSObject.h:
      (JSC):
      * runtime/JSWrapperObject.h:
      (JSC::JSWrapperObject::allocationSize):
      (JSWrapperObject):
      (JSC::JSWrapperObject::internalValueOffset):
      (JSC::JSWrapperObject::internalValueCellOffset):
      * runtime/StringPrototype.cpp:
      (JSC):
      (JSC::StringPrototype::finishCreation):
      (JSC::StringPrototype::create):
      * runtime/StringPrototype.h:
      (StringPrototype):
      
      LayoutTests: 
      
      Reviewed by Geoffrey Garen.
      
      * fast/js/dfg-to-string-bad-toString-expected.txt: Added.
      * fast/js/dfg-to-string-bad-toString.html: Added.
      * fast/js/dfg-to-string-bad-valueOf-expected.txt: Added.
      * fast/js/dfg-to-string-bad-valueOf.html: Added.
      * fast/js/dfg-to-string-int-expected.txt: Added.
      * fast/js/dfg-to-string-int-or-string-expected.txt: Added.
      * fast/js/dfg-to-string-int-or-string.html: Added.
      * fast/js/dfg-to-string-int.html: Added.
      * fast/js/dfg-to-string-side-effect-clobbers-toString-expected.txt: Added.
      * fast/js/dfg-to-string-side-effect-clobbers-toString.html: Added.
      * fast/js/dfg-to-string-side-effect-expected.txt: Added.
      * fast/js/dfg-to-string-side-effect.html: Added.
      * fast/js/dfg-to-string-toString-becomes-bad-expected.txt: Added.
      * fast/js/dfg-to-string-toString-becomes-bad-with-dictionary-string-prototype-expected.txt: Added.
      * fast/js/dfg-to-string-toString-becomes-bad-with-dictionary-string-prototype.html: Added.
      * fast/js/dfg-to-string-toString-becomes-bad.html: Added.
      * fast/js/dfg-to-string-toString-in-string-expected.txt: Added.
      * fast/js/dfg-to-string-toString-in-string.html: Added.
      * fast/js/dfg-to-string-valueOf-becomes-bad-expected.txt: Added.
      * fast/js/dfg-to-string-valueOf-becomes-bad.html: Added.
      * fast/js/dfg-to-string-valueOf-in-string-expected.txt: Added.
      * fast/js/dfg-to-string-valueOf-in-string.html: Added.
      * fast/js/jsc-test-list:
      * fast/js/regress/script-tests/string-concat-object.js: Added.
      (foo):
      * fast/js/regress/script-tests/string-concat-pair-object.js: Added.
      (foo):
      * fast/js/regress/script-tests/string-concat-pair-simple.js: Added.
      (foo):
      * fast/js/regress/script-tests/string-concat-simple.js: Added.
      (foo):
      * fast/js/regress/script-tests/string-cons-repeat.js: Added.
      (foo):
      * fast/js/regress/script-tests/string-cons-tower.js: Added.
      (foo):
      * fast/js/regress/string-concat-object-expected.txt: Added.
      * fast/js/regress/string-concat-object.html: Added.
      * fast/js/regress/string-concat-pair-object-expected.txt: Added.
      * fast/js/regress/string-concat-pair-object.html: Added.
      * fast/js/regress/string-concat-pair-simple-expected.txt: Added.
      * fast/js/regress/string-concat-pair-simple.html: Added.
      * fast/js/regress/string-concat-simple-expected.txt: Added.
      * fast/js/regress/string-concat-simple.html: Added.
      * fast/js/regress/string-cons-repeat-expected.txt: Added.
      * fast/js/regress/string-cons-repeat.html: Added.
      * fast/js/regress/string-cons-tower-expected.txt: Added.
      * fast/js/regress/string-cons-tower.html: Added.
      * fast/js/script-tests/dfg-to-string-bad-toString.js: Added.
      (String.prototype.toString):
      (foo):
      * fast/js/script-tests/dfg-to-string-bad-valueOf.js: Added.
      (String.prototype.valueOf):
      (foo):
      * fast/js/script-tests/dfg-to-string-int-or-string.js: Added.
      (foo):
      * fast/js/script-tests/dfg-to-string-int.js: Added.
      (foo):
      * fast/js/script-tests/dfg-to-string-side-effect-clobbers-toString.js: Added.
      (foo):
      * fast/js/script-tests/dfg-to-string-side-effect.js: Added.
      (foo):
      * fast/js/script-tests/dfg-to-string-toString-becomes-bad-with-dictionary-string-prototype.js: Added.
      (foo):
      (.String.prototype.toString):
      * fast/js/script-tests/dfg-to-string-toString-becomes-bad.js: Added.
      (foo):
      (.String.prototype.toString):
      * fast/js/script-tests/dfg-to-string-toString-in-string.js: Added.
      (foo):
      (.argument.toString):
      * fast/js/script-tests/dfg-to-string-valueOf-becomes-bad.js: Added.
      (foo):
      (.String.prototype.valueOf):
      * fast/js/script-tests/dfg-to-string-valueOf-in-string.js: Added.
      (foo):
      (.argument.valueOf):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e6e1542
  5. 17 Mar, 2012 1 commit
    • barraclough@apple.com's avatar
      Strength reduction, RegExp.exec -> RegExp.test · 077fdd40
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=81459
      
      Reviewed by Sam Weinig.
      
      RegExp.prototype.exec & RegExp.prototype.test can both be used to test a regular
      expression for a match against a string - however exec is more expensive, since
      it allocates a matches array object. In cases where the result is consumed in a
      boolean context the allocation of the matches array can be trivially elided.
      
      For example:
          function f()
          {
              for (i =0; i < 10000000; ++i)
                  if(!/a/.exec("a"))
                      err = true;
          }
      
      This is a 2.5x speedup on this example microbenchmark loop.
      
      In a more advanced form of this optimization, we may be able to avoid allocating
      the array where access to the array can be observed.
      
      * create_hash_table:
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::execute):
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasHeapPrediction):
      * dfg/DFGNodeType.h:
      (DFG):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileRegExpExec):
      (DFG):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::callOperation):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jsc.cpp:
      (GlobalObject::addConstructableFunction):
      * runtime/Intrinsic.h:
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::create):
      (JSC):
      * runtime/JSFunction.h:
      (JSFunction):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::exec):
      (JSC::RegExpObject::match):
      * runtime/RegExpObject.h:
      (RegExpObject):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncTest):
      (JSC::regExpProtoFuncExec):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      077fdd40
  6. 06 Dec, 2011 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=68328 · 6d2ad995
      barraclough@apple.com authored
      The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
      
      Reviewed by Geoff Garen.
      
      ../JavaScriptCore: 
      
      Move the instrinsic enum out of the DFG, into runtime. Add entires for all host functions
      that have an intrinsic in the form of a generated thunk. Remove the thunk pointer from the
      hashtable, and make Intrinsic field no longer ifdef on JIT/DFG. In getHostFunction select
      a thunk genertaor to use based on the Intrinsic.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * create_hash_table:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleCall):
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGCapabilities.h:
      * dfg/DFGIntrinsic.h: Removed.
      * jit/JITStubs.cpp:
      (JSC::JITThunks::hostFunctionStub):
      * jit/JITStubs.h:
      * runtime/Executable.cpp:
      (JSC::ExecutableBase::intrinsic):
      (JSC::NativeExecutable::intrinsic):
      * runtime/Executable.h:
      (JSC::ExecutableBase::intrinsicFor):
      (JSC::NativeExecutable::create):
      (JSC::NativeExecutable::finishCreation):
      * runtime/Intrinsic.h: Copied from Source/JavaScriptCore/dfg/DFGIntrinsic.h.
      * runtime/JSGlobalData.cpp:
      (JSC::thunkGeneratorForIntrinsic):
      (JSC::JSGlobalData::getHostFunction):
      * runtime/JSGlobalData.h:
      * runtime/Lookup.cpp:
      (JSC::HashTable::createTable):
      (JSC::setUpStaticFunctionSlot):
      * runtime/Lookup.h:
      (JSC::HashEntry::initialize):
      (JSC::HashEntry::intrinsic):
      
      ../WebCore: 
      
      Intrinsic is no longer in the DFG namespace, is always in the
      hash table. Removed ThunkGenerator.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHashTable):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d2ad995
  7. 12 Nov, 2011 1 commit
    • laszlo.1.gombos@nokia.com's avatar
      [Qt][Symbian] Remove support for WINSCW compiler · ae65922f
      laszlo.1.gombos@nokia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70178
      
      Reviewed by Chang Shu.
      
      Source/JavaScriptCore:
      
      * API/JSStringRef.h:
      * create_hash_table: Revert r45553.
      * runtime/JSGlobalData.cpp: Revert r45553.
      * runtime/LiteralParser.cpp: Remove WINSCW comment.
      (JSC::LiteralParser::Lexer::lexString):
      * runtime/Lookup.h: Revert r45553.
      * runtime/Structure.h: Revert r48461.
      * wtf/Alignment.h:
      * wtf/Assertions.h: Revert r52337.
      * wtf/Compiler.h:
      * wtf/ListRefPtr.h: Revert r48988.
      (WTF::ListRefPtr::~ListRefPtr):
      * wtf/OwnArrayPtr.h: Revert r45911.
      (WTF::OwnArrayPtr::operator UnspecifiedBoolType):
      * wtf/PassOwnArrayPtr.h:
      (WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
      * wtf/PassRefPtr.h:
      * wtf/StaticConstructors.h:
      * wtf/unicode/qt4/UnicodeQt4.h:
      
      Source/WebCore:
      
      No new tests as there is no new functionality.
      
      * config.h: Revert r57076.
      * loader/cache/CachedResourceHandle.h: Revert r49017 and r49556.
      (WebCore::CachedResourceHandle::CachedResourceHandle):
      * rendering/style/RenderStyle.h: Revert r52733.
      (compareEqual):
      * bindings/scripts/CodeGeneratorJS.pm: Revert r45553.
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
      
      Source/WebKit2:
      
      * Shared/API/c/WKString.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae65922f
  8. 26 Oct, 2011 3 commits
  9. 23 Oct, 2011 1 commit
    • ggaren@apple.com's avatar
      Separated string lifetime bits from character buffer state bits · 94ba3306
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=70673
      
      Source/JavaScriptCore: 
      
      Reviewed by Anders Carlsson.
              
      Moved the static/immortal bit into the bottom bit of the refcount, and
      moved all other bits into the high bits of the hash code.
              
      This is the first step toward a new Characters/PassString class, and it
      makes ref/deref slightly more efficient.
      
      * create_hash_table:
      * wtf/StringHasher.h:
      (WTF::StringHasher::hash): Tweaked the string hashing function to leave
      the top bits clear, so they can be used as flags.
              
      Fixed some small differences between the PERL copy of this function and
      the C++ copy of this function, which could have in theory caused subtle
      crashes.
      
      * wtf/text/StringImpl.cpp:
      (WTF::StringImpl::sharedBuffer):
      (WTF::StringImpl::createWithTerminatingNullCharacter):
      * wtf/text/StringImpl.h:
      (WTF::StringImpl::StringImpl):
      (WTF::StringImpl::cost): Renamed s_refCountFlagShouldReportedCost to
      s_didReportExtraCost, since the original name was both self-contradictory
      and used as a double-negative.
      
      (WTF::StringImpl::isIdentifier):
      (WTF::StringImpl::setIsIdentifier):
      (WTF::StringImpl::hasTerminatingNullCharacter):
      (WTF::StringImpl::isAtomic):
      (WTF::StringImpl::setIsAtomic):
      (WTF::StringImpl::setHash):
      (WTF::StringImpl::rawHash):
      (WTF::StringImpl::hasHash):
      (WTF::StringImpl::existingHash):
      (WTF::StringImpl::hash):
      (WTF::StringImpl::hasOneRef):
      (WTF::StringImpl::ref):
      (WTF::StringImpl::deref):
      (WTF::StringImpl::bufferOwnership):
      (WTF::StringImpl::isStatic): Moved the static/immortal bit into the bottom
      bit of the refcount. Now, all lifetime information lives in the refcount
      field. Moved the other bits into the hash code field.
      
      Source/WebCore: 
      
      Reviewed by Anders Carlsson.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHashValue): Updated for string hashing changes in JavaScriptCore.
      
      LayoutTests: 
      
      Reviewed by Anders Carlsson.
              
      These tests depended on non-deterministic effects of hash order, so I
      had to update them:
      
      * fast/dom/prototype-inheritance-2-expected.txt: Updated for slightly
      different order of discovering properties.
      
      * fast/js/delete-syntax-expected.txt:
      * fast/js/script-tests/delete-syntax.js: Updated not to depend on iteration
      order, since that's not what this test is about.
      
      * http/tests/inspector/inspector-test.js: Updated not to depend on
      global function iteration order. This test setup is pretty spaghetti.
      I think I avoided making it even more spaghetti.
      
      * inspector/storage-panel-dom-storage-expected.txt: Updated for changed
      iteration order.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94ba3306
  10. 07 Oct, 2011 1 commit
    • oliver@apple.com's avatar
      Support some string intrinsics in the DFG JIT · 4b8cca37
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69678
      
      Reviewed by Gavin Barraclough.
      
      Add support for charAt and charCodeAt intrinsics in the DFG.
      
      * create_hash_table:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGIntrinsic.h:
      * dfg/DFGNode.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::performNodeCSE):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b8cca37
  11. 03 Oct, 2011 1 commit
    • fpizlo@apple.com's avatar
      DFG should inline Array.push and Array.pop · 24d24e5b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=69314
      
      Reviewed by Oliver Hunt.
              
      1% speed-up in V8 due to 6% speed-up in V8-deltablue.
      
      * assembler/MacroAssemblerX86_64.h:
      (JSC::MacroAssemblerX86_64::storePtr):
      * create_hash_table:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::dump):
      * dfg/DFGIntrinsic.h:
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasHeapPrediction):
      * dfg/DFGOperations.cpp:
      * dfg/DFGOperations.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNodePredictions):
      (JSC::DFG::Propagator::getByValLoadElimination):
      (JSC::DFG::Propagator::getMethodLoadElimination):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24d24e5b
  12. 18 Sep, 2011 1 commit
    • fpizlo@apple.com's avatar
      DFG JIT should inline Math.min, Math.max, and Math.sqrt · 4e87ceeb
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68318
      
      Reviewed by Gavin Barraclough.
              
      Adds Math.min, Math.max, and Math.sqrt intrinsics. Adds support for
      a function to have an intrinsic but not a thunk generator. This is
      a 7% speed-up on access-nbody, and neutral elsewhere, mainly because
      we're still not DFG compiling the bulk of the hot code in Kraken audio
      benchmarks.
      
      * create_hash_table:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleMinMax):
      (JSC::DFG::ByteCodeParser::handleIntrinsic):
      * dfg/DFGIntrinsic.h:
      * dfg/DFGNode.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNode):
      (JSC::DFG::Propagator::fixupNode):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::hostFunctionStub):
      * runtime/Lookup.cpp:
      (JSC::setUpStaticFunctionSlot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e87ceeb
  13. 16 Sep, 2011 1 commit
    • fpizlo@apple.com's avatar
      DFG JIT should inline Math.abs · 3c3e9651
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68227
      
      Source/JavaScriptCore: 
      
      Reviewed by Oliver Hunt.
              
      This adds the ability to track intrinsic functions throughout the
      host function infrastructure, so that the DFG can easily query
      whether or not a call's target is intrinsic, and if so, which
      intrinsic it is.
              
      On top of this, it adds Math.abs intrinsics to DFG. Call(Math.abs)
      is transformed into ValueToNumber<-ArithAbs nodes. These nodes
      then get optimized using the usual tricks.
              
      Also had to make a completely unrelated change to
      DateInstanceCache.h in order to fix a preexisting alphabetical
      sorting problem in JSGlobalData.h
              
      This results in a big win in imaging-gaussian-blur: 61% faster
      than before. The net win on Kraken is around 13%.
      
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * create_hash_table:
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::parseBlock):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::isFunctionConstant):
      (JSC::DFG::Graph::valueOfFunctionConstant):
      * dfg/DFGIntrinsic.h: Added.
      * dfg/DFGJITCodeGenerator.h:
      (JSC::DFG::JITCodeGenerator::isFunctionConstant):
      (JSC::DFG::JITCodeGenerator::valueOfFunctionConstant):
      * dfg/DFGJITCompiler.h:
      (JSC::DFG::JITCompiler::isFunctionConstant):
      (JSC::DFG::JITCompiler::valueOfFunctionConstant):
      * dfg/DFGNode.h:
      * dfg/DFGPropagator.cpp:
      (JSC::DFG::Propagator::propagateNode):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITStubs.cpp:
      (JSC::JITThunks::hostFunctionStub):
      * jit/JITStubs.h:
      * runtime/DateInstanceCache.h:
      * runtime/Executable.cpp:
      (JSC::ExecutableBase::intrinsic):
      (JSC::NativeExecutable::intrinsic):
      * runtime/Executable.h:
      (JSC::NativeExecutable::create):
      (JSC::NativeExecutable::finishCreation):
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::getHostFunction):
      * runtime/JSGlobalData.h:
      * runtime/Lookup.cpp:
      (JSC::HashTable::createTable):
      (JSC::setUpStaticFunctionSlot):
      * runtime/Lookup.h:
      (JSC::HashEntry::initialize):
      (JSC::HashEntry::intrinsic):
      
      Source/WebCore: 
      
      Reviewed by Oliver Hunt.
      
      Added JavaScriptCore/dfg to include path path. Changed the bindings
      scripts to handle the presence of intrinsics.
      
      * CMakeLists.txt:
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHashTable):
      
      Source/WebKit: 
      
      Reviewed by Oliver Hunt.
      
      Added JavaScriptCore/dfg to include path path.
      
      * CMakeLists.txt:
      
      Source/WebKit2: 
      
      Reviewed by Oliver Hunt.
      
      Added JavaScriptCore/dfg to include path path.
      
      * CMakeLists.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c3e9651
  14. 01 Jul, 2011 2 commits
    • oliver@apple.com's avatar
      2011-06-30 Oliver Hunt <oliver@apple.com> · 5b6a0d3c
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Add optimised paths for a few maths functions
              https://bugs.webkit.org/show_bug.cgi?id=63757
      
              Relanding as a Mac only patch.
      
              This adds specialised thunks for Math.abs, Math.round, Math.ceil,
              Math.floor, Math.log, and Math.exp as they are apparently more
              important in real web content than we thought, which is somewhat
              mind-boggling.  On average doubles the performance of the common
              cases (eg. actually passing numbers in).  They're not as efficient
              as they could be, but this way gives them the most portability.
      
              * assembler/MacroAssemblerARM.h:
              (JSC::MacroAssemblerARM::supportsDoubleBitops):
              (JSC::MacroAssemblerARM::andnotDouble):
              * assembler/MacroAssemblerARMv7.h:
              (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
              (JSC::MacroAssemblerARMv7::andnotDouble):
              * assembler/MacroAssemblerMIPS.h:
              (JSC::MacroAssemblerMIPS::andnotDouble):
              (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
              * assembler/MacroAssemblerSH4.h:
              (JSC::MacroAssemblerSH4::supportsDoubleBitops):
              (JSC::MacroAssemblerSH4::andnotDouble):
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::supportsDoubleBitops):
              * assembler/MacroAssemblerX86Common.h:
              (JSC::MacroAssemblerX86Common::andnotDouble):
              * assembler/MacroAssemblerX86_64.h:
              (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::andnpd_rr):
              * create_hash_table:
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::finalize):
              (JSC::SpecializedThunkJIT::callDoubleToDouble):
              * jit/ThunkGenerators.cpp:
              (JSC::floorThunkGenerator):
              (JSC::ceilThunkGenerator):
              (JSC::roundThunkGenerator):
              (JSC::expThunkGenerator):
              (JSC::logThunkGenerator):
              (JSC::absThunkGenerator):
              * jit/ThunkGenerators.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b6a0d3c
    • commit-queue@webkit.org's avatar
      2011-07-01 Sheriff Bot <webkit.review.bot@gmail.com> · 9c9b5953
      commit-queue@webkit.org authored
              Unreviewed, rolling out r90177 and r90179.
              http://trac.webkit.org/changeset/90177
              http://trac.webkit.org/changeset/90179
              https://bugs.webkit.org/show_bug.cgi?id=63790
      
              It caused crashes on Qt in debug mode (Requested by Ossy on
              #webkit).
      
              * assembler/MacroAssemblerARM.h:
              (JSC::MacroAssemblerARM::rshift32):
              (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
              (JSC::MacroAssemblerARM::sqrtDouble):
              * assembler/MacroAssemblerARMv7.h:
              (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
              (JSC::MacroAssemblerARMv7::sqrtDouble):
              * assembler/MacroAssemblerMIPS.h:
              (JSC::MacroAssemblerMIPS::sqrtDouble):
              (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
              * assembler/MacroAssemblerSH4.h:
              (JSC::MacroAssemblerSH4::sqrtDouble):
              * assembler/MacroAssemblerX86.h:
              * assembler/MacroAssemblerX86Common.h:
              * assembler/MacroAssemblerX86_64.h:
              * assembler/X86Assembler.h:
              * create_hash_table:
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::emitLoadDouble):
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::finalize):
              * jit/ThunkGenerators.cpp:
              * jit/ThunkGenerators.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c9b5953
  15. 30 Jun, 2011 1 commit
    • oliver@apple.com's avatar
      2011-06-30 Oliver Hunt <oliver@apple.com> · 9e85016c
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Add optimised paths for a few maths functions
              https://bugs.webkit.org/show_bug.cgi?id=63757
      
              This adds specialised thunks for Math.abs, Math.round, Math.ceil,
              Math.floor, Math.log, and Math.exp as they are apparently more
              important in real web content than we thought, which is somewhat
              mind-boggling.  On average doubles the performance of the common
              cases (eg. actually passing numbers in).  They're not as efficient
              as they could be, but this way gives them the most portability.
      
              * assembler/MacroAssemblerARM.h:
              (JSC::MacroAssemblerARM::supportsDoubleBitops):
              (JSC::MacroAssemblerARM::andnotDouble):
              * assembler/MacroAssemblerARMv7.h:
              (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
              (JSC::MacroAssemblerARMv7::andnotDouble):
              * assembler/MacroAssemblerMIPS.h:
              (JSC::MacroAssemblerMIPS::andnotDouble):
              (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
              * assembler/MacroAssemblerSH4.h:
              (JSC::MacroAssemblerSH4::supportsDoubleBitops):
              (JSC::MacroAssemblerSH4::andnotDouble):
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::supportsDoubleBitops):
              * assembler/MacroAssemblerX86Common.h:
              (JSC::MacroAssemblerX86Common::andnotDouble):
              * assembler/MacroAssemblerX86_64.h:
              (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::andnpd_rr):
              * create_hash_table:
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::finalize):
              (JSC::SpecializedThunkJIT::callDoubleToDouble):
              * jit/ThunkGenerators.cpp:
              (JSC::floorThunkGenerator):
              (JSC::ceilThunkGenerator):
              (JSC::roundThunkGenerator):
              (JSC::expThunkGenerator):
              (JSC::logThunkGenerator):
              (JSC::absThunkGenerator):
              * jit/ThunkGenerators.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e85016c
  16. 17 May, 2011 2 commits
    • ggaren@apple.com's avatar
      Source/JavaScriptCore: Rolling back in r86653 with build fixed. · 19fe5092
      ggaren@apple.com authored
      Reviewed by Gavin Barraclough and Oliver Hunt.
      
      Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Changed a bunch of globals to allocate their properties lazily, and changed
      the global object to allocate a bunch of its globals lazily.
              
      This reduces the footprint of a global object from 287 objects with 58
      functions for 24K to 173 objects with 20 functions for 15K.
      
      Large patch, but it's all mechanical.
      
      * DerivedSources.make:
      * JavaScriptCore.exp: Build!
      
      * create_hash_table: Added a special case for fromCharCode, since it uses
      a custom "thunk generator".
      
      * heap/Heap.cpp:
      (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
      overcount objects that were owned through more than one mechanism because
      it was getting in the way of counting the results for this patch.
      
      * interpreter/CallFrame.h:
      (JSC::ExecState::arrayConstructorTable):
      (JSC::ExecState::arrayPrototypeTable):
      (JSC::ExecState::booleanPrototypeTable):
      (JSC::ExecState::dateConstructorTable):
      (JSC::ExecState::errorPrototypeTable):
      (JSC::ExecState::globalObjectTable):
      (JSC::ExecState::numberConstructorTable):
      (JSC::ExecState::numberPrototypeTable):
      (JSC::ExecState::objectPrototypeTable):
      (JSC::ExecState::regExpPrototypeTable):
      (JSC::ExecState::stringConstructorTable): Added new tables.
      
      * runtime/ArrayConstructor.cpp:
      (JSC::ArrayConstructor::ArrayConstructor):
      (JSC::ArrayConstructor::getOwnPropertySlot):
      (JSC::ArrayConstructor::getOwnPropertyDescriptor):
      * runtime/ArrayConstructor.h:
      (JSC::ArrayConstructor::createStructure):
      * runtime/ArrayPrototype.cpp:
      (JSC::ArrayPrototype::getOwnPropertySlot):
      (JSC::ArrayPrototype::getOwnPropertyDescriptor):
      * runtime/ArrayPrototype.h:
      * runtime/BooleanPrototype.cpp:
      (JSC::BooleanPrototype::BooleanPrototype):
      (JSC::BooleanPrototype::getOwnPropertySlot):
      (JSC::BooleanPrototype::getOwnPropertyDescriptor):
      * runtime/BooleanPrototype.h:
      (JSC::BooleanPrototype::createStructure):
      * runtime/DateConstructor.cpp:
      (JSC::DateConstructor::DateConstructor):
      (JSC::DateConstructor::getOwnPropertySlot):
      (JSC::DateConstructor::getOwnPropertyDescriptor):
      * runtime/DateConstructor.h:
      (JSC::DateConstructor::createStructure):
      * runtime/ErrorPrototype.cpp:
      (JSC::ErrorPrototype::ErrorPrototype):
      (JSC::ErrorPrototype::getOwnPropertySlot):
      (JSC::ErrorPrototype::getOwnPropertyDescriptor):
      * runtime/ErrorPrototype.h:
      (JSC::ErrorPrototype::createStructure): Standardized these objects
      to use static tables for function properties.
      
      * runtime/JSGlobalData.cpp:
      (JSC::JSGlobalData::JSGlobalData):
      (JSC::JSGlobalData::~JSGlobalData):
      * runtime/JSGlobalData.h: Added new tables.
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::addStaticGlobals):
      (JSC::JSGlobalObject::getOwnPropertySlot):
      (JSC::JSGlobalObject::getOwnPropertyDescriptor):
      * runtime/JSGlobalObject.h:
      * runtime/JSGlobalObjectFunctions.cpp:
      * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
      static table for its global functions. This required uninlining some
      things to avoid a circular header dependency. However, those things
      probably shouldn't have been inlined in the first place.
              
      Even more global object properties can be made lazy, but that requires
      more in-depth changes.
      
      * runtime/MathObject.cpp:
      * runtime/NumberConstructor.cpp:
      (JSC::NumberConstructor::getOwnPropertySlot):
      (JSC::NumberConstructor::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.cpp:
      (JSC::NumberPrototype::NumberPrototype):
      (JSC::NumberPrototype::getOwnPropertySlot):
      (JSC::NumberPrototype::getOwnPropertyDescriptor):
      * runtime/NumberPrototype.h:
      (JSC::NumberPrototype::createStructure):
      * runtime/ObjectPrototype.cpp:
      (JSC::ObjectPrototype::ObjectPrototype):
      (JSC::ObjectPrototype::put):
      (JSC::ObjectPrototype::getOwnPropertySlot):
      (JSC::ObjectPrototype::getOwnPropertyDescriptor):
      * runtime/ObjectPrototype.h:
      (JSC::ObjectPrototype::createStructure):
      * runtime/RegExpPrototype.cpp:
      (JSC::RegExpPrototype::RegExpPrototype):
      (JSC::RegExpPrototype::getOwnPropertySlot):
      (JSC::RegExpPrototype::getOwnPropertyDescriptor):
      * runtime/RegExpPrototype.h:
      (JSC::RegExpPrototype::createStructure):
      * runtime/StringConstructor.cpp:
      (JSC::StringConstructor::StringConstructor):
      (JSC::StringConstructor::getOwnPropertySlot):
      (JSC::StringConstructor::getOwnPropertyDescriptor):
      * runtime/StringConstructor.h:
      (JSC::StringConstructor::createStructure): Standardized these objects
      to use static tables for function properties.
      
      LayoutTests: Global object initialization is expensive
      https://bugs.webkit.org/show_bug.cgi?id=60933
              
      Reviewed by Gavin Barraclough.
      
      Added a few more expected failures, now that more code uses static hash
      tables.
              
      The fact that built-ins are not deletable, but should be, is covered by
      https://bugs.webkit.org/show_bug.cgi?id=61014
      
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.2/S15.6.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.3/15.6.3.1_Boolean.prototype/S15.6.3.1_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.6_Boolean/15.6.4/S15.6.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.2/S15.7.2.1_A4-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.3/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.7_Number/15.7.4/S15.7.4_A1-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.2_Date.parse/S15.9.4.2_A1_T2-expected.txt:
      * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.4/15.9.4.3_Date.UTC/S15.9.4.3_A1_T2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19fe5092
    • commit-queue@webkit.org's avatar
      2011-05-16 Sheriff Bot <webkit.review.bot@gmail.com> · 5a39502a
      commit-queue@webkit.org authored
              Unreviewed, rolling out r86653.
              http://trac.webkit.org/changeset/86653
              https://bugs.webkit.org/show_bug.cgi?id=60944
      
              "Caused regressions on Windows, OSX and EFL" (Requested by
              yutak on #webkit).
      
              * DerivedSources.make:
              * DerivedSources.pro:
              * GNUmakefile.am:
              * GNUmakefile.list.am:
              * JavaScriptCore.exp:
              * JavaScriptCore.gypi:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
              * create_hash_table:
              * heap/Heap.cpp:
              (JSC::TypeCounter::operator()):
              * interpreter/CallFrame.h:
              (JSC::ExecState::arrayTable):
              (JSC::ExecState::numberTable):
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              * runtime/ArrayConstructor.h:
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::getOwnPropertySlot):
              (JSC::ArrayPrototype::getOwnPropertyDescriptor):
              * runtime/ArrayPrototype.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              * runtime/BooleanPrototype.h:
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              * runtime/DateConstructor.h:
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              * runtime/ErrorPrototype.h:
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::~JSGlobalData):
              * runtime/JSGlobalData.h:
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * runtime/JSGlobalObject.h:
              (JSC::JSGlobalObject::addStaticGlobals):
              (JSC::JSGlobalObject::getOwnPropertySlot):
              (JSC::JSGlobalObject::getOwnPropertyDescriptor):
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncJSCPrint):
              * runtime/JSGlobalObjectFunctions.h:
              * runtime/MathObject.cpp:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::getOwnPropertySlot):
              (JSC::NumberConstructor::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              * runtime/NumberPrototype.h:
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              (JSC::ObjectPrototype::put):
              (JSC::ObjectPrototype::getOwnPropertySlot):
              * runtime/ObjectPrototype.h:
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              * runtime/RegExpPrototype.h:
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              * runtime/StringConstructor.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a39502a
  17. 16 May, 2011 1 commit
    • ggaren@apple.com's avatar
      2011-05-16 Geoffrey Garen <ggaren@apple.com> · 836c5d91
      ggaren@apple.com authored
              Reviewed by Geoffrey Garen.
      
              Global object initialization is expensive
              https://bugs.webkit.org/show_bug.cgi?id=60933
              
              Changed a bunch of globals to allocate their properties lazily, and changed
              the global object to allocate a bunch of its globals lazily.
              
              This reduces the footprint of a global object from 287 objects with 58
              functions for 24K to 173 objects with 20 functions for 15K.
      
              Large patch, but it's all mechanical.
      
              * DerivedSources.make:
              * JavaScriptCore.exp: Build!
      
              * create_hash_table: Added a special case for fromCharCode, since it uses
              a custom "thunk generator".
      
              * heap/Heap.cpp:
              (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
              overcount objects that were owned through more than one mechanism because
              it was getting in the way of counting the results for this patch.
      
              * interpreter/CallFrame.h:
              (JSC::ExecState::arrayConstructorTable):
              (JSC::ExecState::arrayPrototypeTable):
              (JSC::ExecState::booleanPrototypeTable):
              (JSC::ExecState::dateConstructorTable):
              (JSC::ExecState::errorPrototypeTable):
              (JSC::ExecState::globalObjectTable):
              (JSC::ExecState::numberConstructorTable):
              (JSC::ExecState::numberPrototypeTable):
              (JSC::ExecState::objectPrototypeTable):
              (JSC::ExecState::regExpPrototypeTable):
              (JSC::ExecState::stringConstructorTable): Added new tables.
      
              * runtime/ArrayConstructor.cpp:
              (JSC::ArrayConstructor::ArrayConstructor):
              (JSC::ArrayConstructor::getOwnPropertySlot):
              (JSC::ArrayConstructor::getOwnPropertyDescriptor):
              * runtime/ArrayConstructor.h:
              (JSC::ArrayConstructor::createStructure):
              * runtime/ArrayPrototype.cpp:
              (JSC::ArrayPrototype::getOwnPropertySlot):
              (JSC::ArrayPrototype::getOwnPropertyDescriptor):
              * runtime/ArrayPrototype.h:
              * runtime/BooleanPrototype.cpp:
              (JSC::BooleanPrototype::BooleanPrototype):
              (JSC::BooleanPrototype::getOwnPropertySlot):
              (JSC::BooleanPrototype::getOwnPropertyDescriptor):
              * runtime/BooleanPrototype.h:
              (JSC::BooleanPrototype::createStructure):
              * runtime/DateConstructor.cpp:
              (JSC::DateConstructor::DateConstructor):
              (JSC::DateConstructor::getOwnPropertySlot):
              (JSC::DateConstructor::getOwnPropertyDescriptor):
              * runtime/DateConstructor.h:
              (JSC::DateConstructor::createStructure):
              * runtime/ErrorPrototype.cpp:
              (JSC::ErrorPrototype::ErrorPrototype):
              (JSC::ErrorPrototype::getOwnPropertySlot):
              (JSC::ErrorPrototype::getOwnPropertyDescriptor):
              * runtime/ErrorPrototype.h:
              (JSC::ErrorPrototype::createStructure): Standardized these objects
              to use static tables for function properties.
      
              * runtime/JSGlobalData.cpp:
              (JSC::JSGlobalData::JSGlobalData):
              (JSC::JSGlobalData::~JSGlobalData):
              * runtime/JSGlobalData.h: Added new tables.
      
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              (JSC::JSGlobalObject::addStaticGlobals):
              (JSC::JSGlobalObject::getOwnPropertySlot):
              (JSC::JSGlobalObject::getOwnPropertyDescriptor):
              * runtime/JSGlobalObject.h:
              * runtime/JSGlobalObjectFunctions.cpp:
              * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
              static table for its global functions. This required uninlining some
              things to avoid a circular header dependency. However, those things
              probably shouldn't have been inlined in the first place.
              
              Even more global object properties can be made lazy, but that requires
              more in-depth changes.
      
              * runtime/MathObject.cpp:
              * runtime/NumberConstructor.cpp:
              (JSC::NumberConstructor::getOwnPropertySlot):
              (JSC::NumberConstructor::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.cpp:
              (JSC::NumberPrototype::NumberPrototype):
              (JSC::NumberPrototype::getOwnPropertySlot):
              (JSC::NumberPrototype::getOwnPropertyDescriptor):
              * runtime/NumberPrototype.h:
              (JSC::NumberPrototype::createStructure):
              * runtime/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              (JSC::ObjectPrototype::put):
              (JSC::ObjectPrototype::getOwnPropertySlot):
              (JSC::ObjectPrototype::getOwnPropertyDescriptor):
              * runtime/ObjectPrototype.h:
              (JSC::ObjectPrototype::createStructure):
              * runtime/RegExpPrototype.cpp:
              (JSC::RegExpPrototype::RegExpPrototype):
              (JSC::RegExpPrototype::getOwnPropertySlot):
              (JSC::RegExpPrototype::getOwnPropertyDescriptor):
              * runtime/RegExpPrototype.h:
              (JSC::RegExpPrototype::createStructure):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
              (JSC::StringConstructor::getOwnPropertySlot):
              (JSC::StringConstructor::getOwnPropertyDescriptor):
              * runtime/StringConstructor.h:
              (JSC::StringConstructor::createStructure): Standardized these objects
              to use static tables for function properties.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      836c5d91
  18. 01 Jan, 2011 1 commit
    • abarth@webkit.org's avatar
      Move JavaScriptCore to Source · 76da8fc1
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=51604
      
      Reviewed by Eric Seidel.
      
      Update references to JavaScriptCore to point to the new location.
      
      * Android.mk:
      * CMakeLists.txt:
      * DerivedSources.pro:
      * GNUmakefile.am:
      * Makefile:
      * WebKit.pri:
      * WebKit.pro:
      * wscript:
      
      Tools: 
      
      Update references to JavaScriptCore to point to the new location.
      
      * BuildSlaveSupport/build.webkit.org-config/master.cfg:
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * DumpRenderTree/qt/ImageDiff.pro:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * DumpRenderTree/wscript:
      * Scripts/build-jsc:
      * Scripts/build-webkit:
      * Scripts/do-file-rename:
      * Scripts/do-webcore-rename:
      * Scripts/run-javascriptcore-tests:
      * Scripts/update-javascriptcore-test-results:
      * Scripts/webkitdirs.pm:
      * Scripts/webkitpy/common/config/build_unittest.py:
      * Scripts/webkitpy/style/checker.py:
      * Scripts/webkitpy/style/checker_unittest.py:
      * Scripts/webkitpy/style/checkers/cpp_unittest.py:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * wx/build/settings.py:
      
      WebCore: 
      
      Update references to JavaScriptCore.
      
      * Android.derived.jscbindings.mk:
      * Android.v8bindings.mk:
      * CMakeLists.txt:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.pro:
        - These changes are subtle and might not be 100% correct.
      * move-js-headers.sh:
      
      WebKit/chromium: 
      
      * WebKit.gyp:
        - Point to JavaScriptCore in its new location.
      
      WebKit/gtk: 
      
      * GNUmakefile.am:
      * docs/GNUmakefile.am:
        - Point to JavaScriptCore in its new location.
      
      WebKit/qt: 
      
      * WebKit_pch.h:
      * docs/qtwebkit.qdocconf:
        - Point to JavaScriptCore in its new location.
      
      WebKit/win: 
      
      * WebKit.vcproj/WebKit.sln:
        - Point to JavaScriptCore in its new location.
      
      WebKit/wx: 
      
      * bindings/python/wscript:
      * wscript:
        - Point to JavaScriptCore in its new location.
      
      WebKit2: 
      
      * WebKit2.pro:
        - Point to JavaScriptCore in its new location.
      
      Websites/bugs.webkit.org: 
      
      * PrettyPatch/PrettyPatch.rb:
        - Remove reference to JavaScriptCore as a source directory.
      
      Websites/webkit.org: 
      
      * coding/assertion-guidelines.html:
        - Update documentation to point to the new location of
          JavaScriptCore.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76da8fc1
  19. 28 Apr, 2010 1 commit
    • oliver@apple.com's avatar
      2010-04-28 Oliver Hunt <oliver@apple.com> · 2bd947ea
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Add fast paths for Math.pow and Math.sqrt
              https://bugs.webkit.org/show_bug.cgi?id=38294
      
              Add specialized thunks for Math.pow and Math.sqrt.
              This requires adding a sqrtDouble function to the MacroAssembler
              and sqrtsd to the x86 assembler.
      
              Math.pow is slightly more complicated, in that we have
              to implement exponentiation ourselves rather than relying
              on hardware support.  The inline exponentiation is restricted
              to positive integer exponents on a numeric base.  Exponentiation
              is finally performed through the "Exponentiation by Squaring"
              algorithm.
      
              * assembler/AbstractMacroAssembler.h:
              (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
              * assembler/MacroAssemblerARM.h:
              (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
              (JSC::MacroAssemblerARM::loadDouble):
              (JSC::MacroAssemblerARM::sqrtDouble):
              * assembler/MacroAssemblerARMv7.h:
              (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
              (JSC::MacroAssemblerARMv7::sqrtDouble):
              * assembler/MacroAssemblerX86.h:
              (JSC::MacroAssemblerX86::loadDouble):
              (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
              * assembler/MacroAssemblerX86Common.h:
              (JSC::MacroAssemblerX86Common::sqrtDouble):
              * assembler/MacroAssemblerX86_64.h:
              (JSC::MacroAssemblerX86_64::loadDouble):
              (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
              * assembler/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::movsd_mr):
              (JSC::X86Assembler::sqrtsd_rr):
              (JSC::X86Assembler::X86InstructionFormatter::twoByteOp):
              (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
              * create_hash_table:
              * jit/JIT.h:
              * jit/JITInlineMethods.h:
              * jit/JITOpcodes.cpp:
              * jit/JITStubs.h:
              (JSC::JITThunks::ctiNativeCallThunk):
              * jit/JSInterfaceJIT.h:
              (JSC::JSInterfaceJIT::emitLoadDouble):
              (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
              (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
              (JSC::JSInterfaceJIT::emitLoadInt32):
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::loadDoubleArgument):
              (JSC::SpecializedThunkJIT::loadInt32Argument):
              (JSC::SpecializedThunkJIT::returnJSValue):
              (JSC::SpecializedThunkJIT::returnDouble):
              (JSC::SpecializedThunkJIT::finalize):
              * jit/ThunkGenerators.cpp:
              (JSC::sqrtThunkGenerator):
              (JSC::powThunkGenerator):
              * jit/ThunkGenerators.h:
              * runtime/Executable.h:
              (JSC::NativeExecutable::NativeExecutable):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2bd947ea
  20. 27 Apr, 2010 1 commit
    • oliver@apple.com's avatar
      2010-04-26 Oliver Hunt <oliver@apple.com> · 5cdd4f8f
      oliver@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Add specialized thunks for a char code related string functions
              https://bugs.webkit.org/show_bug.cgi?id=38177
      
              This is a simple extension to my prior patch.  Basically hoist the
              existing character loading logic from the charCodeAt thunk and into
              a helper function, then add a helper to load strings from the small
              string cache.  This allows trivial implementations of fromCharCode
              and charAt.
      
              * create_hash_table:
              * jit/SpecializedThunkJIT.h:
              (JSC::SpecializedThunkJIT::returnJSCell):
              (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
              * jit/ThunkGenerators.cpp:
              (JSC::stringCharLoad):
              (JSC::charToString):
              (JSC::charCodeAtThunkGenerator):
              (JSC::charAtThunkGenerator):
              (JSC::fromCharCodeThunkGenerator):
              * jit/ThunkGenerators.h:
              * runtime/SmallStrings.h:
              (JSC::SmallStrings::singleCharacterStrings):
              * runtime/StringConstructor.cpp:
              (JSC::StringConstructor::StringConstructor):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5cdd4f8f
  21. 26 Apr, 2010 1 commit
    • oliver@apple.com's avatar
      2010-04-26 Oliver Hunt <oliver@apple.com> · 8e293b78
      oliver@apple.com authored
              Reviewed by Gavin Barraclough.
      
              Need to support more efficient dispatch of lightweight builtins
              https://bugs.webkit.org/show_bug.cgi?id=38155
      
              The problem with calling lightweight builtins is that marshalling
              the call from the nitro calling convention to the system calling
              convention is very expensive relative to the cost of the actually
              evaluating the function.  To work around this problem this patch
              adds the ability to define a custom thunk for a builtin.
      
              This allows us to use high performance custom implementations of
              the common and sensible versions of simple builtins.  This patch
              includes a simple (use of which is currently hardcoded) thunk for
              charCodeAt.
      
              This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
              that has helper functions to remove (or at least reduce) the need
              to have separate thunk implementations for each JSValue encoding.
      
              * GNUmakefile.am:
              * JavaScriptCore.pro:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
                Many project file updates
      
              * create_hash_table:
                Add thunk generation callbacks to the hash tables, currently
                we hardcode the script to only support charCodeAt
      
              * jit/JITStubCall.h:
              * jit/JITStubs.cpp:
              (JSC::JITThunks::~JITThunks):
              (JSC::JITThunks::specializedThunk):
              * jit/JITStubs.h:
              * jit/SpecializedThunkJIT.h: Added.
              (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
              (JSC::SpecializedThunkJIT::loadCellArgument):
              (JSC::SpecializedThunkJIT::loadJSStringArgument):
              (JSC::SpecializedThunkJIT::loadInt32Argument):
              (JSC::SpecializedThunkJIT::appendFailure):
              (JSC::SpecializedThunkJIT::returnInt32):
              (JSC::SpecializedThunkJIT::finalize):
              (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
              (JSC::SpecializedThunkJIT::tagReturnAsInt32):
              * jit/ThunkGenerators.cpp: Added.
              (JSC::ThunkHelpers::stringImplDataOffset):
              (JSC::ThunkHelpers::jsStringLengthOffset):
              (JSC::ThunkHelpers::jsStringValueOffset):
              (JSC::charCodeAtThunkGenerator):
              * jit/ThunkGenerators.h: Added.
              * runtime/Executable.h:
              (JSC::NativeExecutable::NativeExecutable):
              * runtime/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
              * runtime/JSFunction.h:
              * runtime/JSGlobalData.h:
              (JSC::JSGlobalData::getThunk):
              * runtime/JSString.h:
              (JSC::):
              * runtime/JSValue.h:
                Protect some of the JSVALUE32 and JSVALUE32_64 only constants
                and function behind appropriate USE() guards to make it harder
                to use the wrong flags for the target build.
              * runtime/Lookup.cpp:
              (JSC::HashTable::createTable):
              (JSC::setUpStaticFunctionSlot):
              * runtime/Lookup.h:
              (JSC::HashEntry::initialize):
              (JSC::HashEntry::generator):
              (JSC::HashEntry::):
                Make the lookup tables use a specialized thunkGenerator
                if present
              * wtf/text/StringImpl.h:
      2010-04-26  Oliver Hunt  <oliver@apple.com>
      
              Reviewed by Gavin Barraclough.
      
              Need to support more efficient dispatch of lightweight builtins
              https://bugs.webkit.org/show_bug.cgi?id=38155
      
              Update bindings generation to include new thunk generator field
              in the property map hash tables.
      
              * bindings/scripts/CodeGeneratorJS.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e293b78
  22. 26 Feb, 2010 1 commit
    • oliver@apple.com's avatar
      2010-02-26 Oliver Hunt <oliver@apple.com> · b168bb57
      oliver@apple.com authored
              Reviewed by Geoff Garen.
      
              Make the lookup table generator include an explicit cast to expected
              type of the function.  We do this because otherwise the blind intptr_t
              cast that is subsequently applied allows incorrectly typed functions
              to be inserted into the table, where they will only fail at runtime.
              This change makes such errors produce a compile time failure.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b168bb57
  23. 05 Jul, 2009 1 commit
    • hausmann@webkit.org's avatar
      JavaScriptCore: · 20d50aec
      hausmann@webkit.org authored
      2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
      
              Reviewed by Maciej Stachowiak.
      
              https://bugs.webkit.org/show_bug.cgi?id=26843
      
              Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
      
              The Metrowerks compiler on the Symbian platform moves the globally
              defined Hashtables into read-only memory, despite one of the members
              being mutable. This causes crashes at run-time due to write access to
              read-only memory.
      
              Avoid the use of const with this compiler by introducing the
              JSC_CONST_HASHTABLE macro.
      
              Based on idea by Norbert Leser.
      
              * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
              * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
              * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
      
      WebCore:
      
      2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
      
              Reviewed by Maciej Stachowiak.
      
              https://bugs.webkit.org/show_bug.cgi?id=26843
      
              Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
      
              The Metrowerks compiler on the Symbian platform moves the globally
              defined Hashtables into read-only memory, despite one of the members
              being mutable. This causes crashes at run-time due to write access to
              read-only memory.
      
              Avoid the use of const with this compiler by introducing the
              JSC_CONST_HASHTABLE macro.
      
              Based on idea by Norbert Leser.
      
              * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables
              define in the bindings.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      20d50aec
  24. 17 Apr, 2009 1 commit
    • slewis@apple.com's avatar
      2009-04-16 Stephanie Lewis <slewis@apple.com> · 2684bb44
      slewis@apple.com authored
              Reviewed by Oliver Hunt.
      
              <rdar://problem/6744652> 32-bit to 64-bit: Javascript hash tables double in size
      
              Remove perfect hash optimization which removes 1 MB of overhead on 32-bit and almost 2 MB on 64-bit.  Removing the optimization was not a regression on SunSpider and the acid 3 test still passes.
      
              * create_hash_table:
              * runtime/Lookup.cpp:
              (JSC::HashTable::createTable):
              (JSC::HashTable::deleteTable):
              * runtime/Lookup.h:
              (JSC::HashEntry::initialize):
              (JSC::HashEntry::next):
              (JSC::HashTable::entry):
              * runtime/Structure.cpp:
              (JSC::Structure::getEnumerableNamesFromClassInfoTable):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2684bb44
  25. 02 Jan, 2009 1 commit
    • ddkilzer@apple.com's avatar
      Bug 23080: Remove last vestiges of KJS references · f9f6bbd9
      ddkilzer@apple.com authored
              <https://bugs.webkit.org/show_bug.cgi?id=23080>
      
              Reviewed by Darin Adler.
      
              Also updated Apple copyright statements.
      
              * DerivedSources.make: Changed bison "kjsyy" prefix to "jscyy".
              * GNUmakefile.am: Ditto.
              * JavaScriptCore.pri: Ditto.  Also changed KJSBISON to JSCBISON
              and kjsbison to jscbison.
      
              * JavaScriptCoreSources.bkl: Changed JSCORE_KJS_SOURCES to
              JSCORE_JSC_SOURCES.
              * jscore.bkl: Ditto.
      
              * create_hash_table: Updated copyright and removed old comment.
      
              * parser/Grammar.y: Changed "kjsyy" prefix to "jscyy" prefix.
              * parser/Lexer.cpp: Ditto.  Also changed KJS_DEBUG_LEX to
              JSC_DEBUG_LEX.
              (jscyylex):
              (JSC::Lexer::lex):
              * parser/Parser.cpp: Ditto.
              (JSC::Parser::parse):
      
              * pcre/dftables: Changed "kjs_pcre_" prefix to "jsc_pcre_".
              * pcre/pcre_compile.cpp: Ditto.
              (getOthercaseRange):
              (encodeUTF8):
              (compileBranch):
              (calculateCompiledPatternLength):
              * pcre/pcre_exec.cpp: Ditto.
              (matchRef):
              (getUTF8CharAndIncrementLength):
              (match):
              * pcre/pcre_internal.h: Ditto.
              (toLowerCase):
              (flipCase):
              (classBitmapForChar):
              (charTypeForChar):
              * pcre/pcre_tables.cpp: Ditto.
              * pcre/pcre_ucp_searchfuncs.cpp: Ditto.
              (jsc_pcre_ucp_othercase):
              * pcre/pcre_xclass.cpp: Ditto.
              (getUTF8CharAndAdvancePointer):
              (jsc_pcre_xclass):
      
              * runtime/Collector.h: Updated header guards using the
              clean-header-guards script.
              * runtime/CollectorHeapIterator.h: Added missing header guard.
              * runtime/Identifier.h: Updated header guards.
              * runtime/JSFunction.h: Fixed end-of-namespace comment.
      
              * runtime/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset): Renamed "kjsprint" debug function
              to "jscprint".  Changed implementation method from
              globalFuncKJSPrint() to globalFuncJSCPrint().
              * runtime/JSGlobalObjectFunctions.cpp:
              (JSC::globalFuncJSCPrint): Renamed from globalFuncKJSPrint().
              * runtime/JSGlobalObjectFunctions.h: Ditto.
      
              * runtime/JSImmediate.h: Updated header guards.
              * runtime/JSLock.h: Ditto.
              * runtime/JSType.h: Ditto.
              * runtime/JSWrapperObject.h: Ditto.
              * runtime/Lookup.h: Ditto.
              * runtime/Operations.h: Ditto.
              * runtime/Protect.h: Ditto.
              * runtime/RegExp.h: Ditto.
              * runtime/UString.h: Ditto.
      
              * tests/mozilla/js1_5/Array/regress-157652.js: Changed "KJS"
              reference in comment to "JSC".
      
              * wrec/CharacterClassConstructor.cpp: Change "kjs_pcre_" function
              prefixes to "jsc_pcre_".
              (JSC::WREC::CharacterClassConstructor::put):
              (JSC::WREC::CharacterClassConstructor::flush):
      
              * wtf/unicode/Unicode.h: Change "KJS_" header guard to "WTF_".
              * wtf/unicode/icu/UnicodeIcu.h: Ditto.
              * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f9f6bbd9
  26. 05 Dec, 2008 1 commit
    • ddkilzer@apple.com's avatar
      <rdar://problem/6331749> Provide a mechanism to disable perfect... · aff2b20c
      ddkilzer@apple.com authored
              <rdar://problem/6331749> Provide a mechanism to disable perfect hashing in the DOM at build time
      
              Reviewed by Darin Adler.
      
              Initial patch by Yosen Lin.  Adapted for ToT WebKit by David Kilzer.
      
              Added back the code that generates a "compact" hash (instead of a
              perfect hash) as a build-time option using the
              ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h.
      
      JavaScriptCore:
      
              * create_hash_table: Rename variables to differentiate perfect hash
              values from compact hash values.  Added back code to compute compact
              hash tables.  Generate both hash table sizes and emit
              conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
              * runtime/Lookup.cpp:
              (JSC::HashTable::createTable): Added version of createTable() for
              use with compact hash tables.
              (JSC::HashTable::deleteTable): Updated to work with compact hash
              tables.
              * runtime/Lookup.h: Defined ENABLE(PERFECT_HASH_SIZE) macro here.
              (JSC::HashEntry::initialize): Set m_next to zero when using compact
              hash tables.
              (JSC::HashEntry::setNext): Added for compact hash tables.
              (JSC::HashEntry::next): Added for compact hash tables.
              (JSC::HashTable::entry): Added version of entry() for use with
              compact hash tables.
              * runtime/Structure.cpp:
              (JSC::Structure::getEnumerablePropertyNames): Updated to work with
              compact hash tables.
      
      WebCore:
      
              * bindings/scripts/CodeGeneratorJS.pm:
              (GenerateImplementation): Compute the number of elements that will
              be stored in each hash table and pass it to GenerateHashTable().
              (GenerateHashTable): Added new second parameter representing the
              number of elements to store in the compact hash table.  Added back
              code to compute compact hash tables.  Generate both hash table sizes
              and emit conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aff2b20c
  27. 06 Nov, 2008 1 commit
    • cwzwarich@webkit.org's avatar
      2008-11-05 Cameron Zwarich <zwarich@apple.com> · f368350f
      cwzwarich@webkit.org authored
              Rubber-stamped by Sam Weinig.
      
              Move create_hash_table and jsc.pro out of the kjs directory and into the
              root directory of JavaScriptCore.
      
              JavaScriptCore:
      
              * DerivedSources.make:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * create_hash_table: Copied from kjs/create_hash_table.
              * jsc.pro: Copied from kjs/jsc.pro.
              * kjs/create_hash_table: Removed.
              * kjs/jsc.pro: Removed.
              * make-generated-sources.sh:
      
              * WebKit.pro:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f368350f
  28. 05 Nov, 2008 2 commits
    • cwzwarich@webkit.org's avatar
      2008-11-05 Cameron Zwarich <zwarich@apple.com> · 3e348675
      cwzwarich@webkit.org authored
              Not reviewed.
      
              Fix the build for case-sensitive build systems and wxWindows.
      
              * JavaScriptCoreSources.bkl:
              * kjs/create_hash_table:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e348675
    • cwzwarich@webkit.org's avatar
      2008-11-05 Cameron Zwarich <zwarich@apple.com> · 0b51a73b
      cwzwarich@webkit.org authored
              Rubber-stamped by Sam Weinig.
      
              Move more files to the runtime subdirectory of JavaScriptCore.
      
              JavaScriptCore:
      
              * API/APICast.h:
              * API/JSBase.cpp:
              * API/JSCallbackObject.cpp:
              * API/JSClassRef.cpp:
              * API/JSClassRef.h:
              * API/JSStringRefCF.cpp:
              * API/JSValueRef.cpp:
              * API/OpaqueJSString.cpp:
              * API/OpaqueJSString.h:
              * AllInOneFile.cpp:
              * GNUmakefile.am:
              * JavaScriptCore.pri:
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * JavaScriptCoreSources.bkl:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/Machine.cpp:
              * VM/RegisterFile.h:
              * debugger/Debugger.h:
              * kjs/SourceProvider.h:
              * kjs/TypeInfo.h: Removed.
              * kjs/collector.cpp: Removed.
              * kjs/collector.h: Removed.
              * kjs/completion.h: Removed.
              * kjs/create_hash_table:
              * kjs/identifier.cpp: Removed.
              * kjs/identifier.h: Removed.
              * kjs/interpreter.cpp: Removed.
              * kjs/interpreter.h: Removed.
              * kjs/lexer.cpp:
              * kjs/lexer.h:
              * kjs/lookup.cpp: Removed.
              * kjs/lookup.h: Removed.
              * kjs/nodes.cpp:
              * kjs/nodes.h:
              * kjs/operations.cpp: Removed.
              * kjs/operations.h: Removed.
              * kjs/protect.h: Removed.
              * kjs/regexp.cpp: Removed.
              * kjs/regexp.h: Removed.
              * kjs/ustring.cpp: Removed.
              * kjs/ustring.h: Removed.
              * pcre/pcre_exec.cpp:
              * profiler/CallIdentifier.h:
              * profiler/Profile.h:
              * runtime/ArrayConstructor.cpp:
              * runtime/ArrayPrototype.cpp:
              * runtime/ArrayPrototype.h:
              * runtime/Collector.cpp: Copied from kjs/collector.cpp.
              * runtime/Collector.h: Copied from kjs/collector.h.
              * runtime/CollectorHeapIterator.h:
              * runtime/Completion.h: Copied from kjs/completion.h.
              * runtime/ErrorPrototype.cpp:
              * runtime/Identifier.cpp: Copied from kjs/identifier.cpp.
              * runtime/Identifier.h: Copied from kjs/identifier.h.
              * runtime/InitializeThreading.cpp:
              * runtime/Interpreter.cpp: Copied from kjs/interpreter.cpp.
              * runtime/Interpreter.h: Copied from kjs/interpreter.h.
              * runtime/JSCell.h:
              * runtime/JSGlobalData.cpp:
              * runtime/JSGlobalData.h:
              * runtime/JSLock.cpp:
              * runtime/JSNumberCell.cpp:
              * runtime/JSNumberCell.h:
              * runtime/JSObject.cpp:
              * runtime/JSValue.h:
              * runtime/Lookup.cpp: Copied from kjs/lookup.cpp.
              * runtime/Lookup.h: Copied from kjs/lookup.h.
              * runtime/MathObject.cpp:
              * runtime/NativeErrorPrototype.cpp:
              * runtime/NumberPrototype.cpp:
              * runtime/Operations.cpp: Copied from kjs/operations.cpp.
              * runtime/Operations.h: Copied from kjs/operations.h.
              * runtime/PropertyMapHashTable.h:
              * runtime/Protect.h: Copied from kjs/protect.h.
              * runtime/RegExp.cpp: Copied from kjs/regexp.cpp.
              * runtime/RegExp.h: Copied from kjs/regexp.h.
              * runtime/RegExpConstructor.cpp:
              * runtime/RegExpObject.h:
              * runtime/RegExpPrototype.cpp:
              * runtime/SmallStrings.h:
              * runtime/StringObjectThatMasqueradesAsUndefined.h:
              * runtime/StructureID.cpp:
              * runtime/StructureID.h:
              * runtime/StructureIDTransitionTable.h:
              * runtime/SymbolTable.h:
              * runtime/TypeInfo.h: Copied from kjs/TypeInfo.h.
              * runtime/UString.cpp: Copied from kjs/ustring.cpp.
              * runtime/UString.h: Copied from kjs/ustring.h.
              * wrec/CharacterClassConstructor.h:
              * wrec/WREC.h:
      
              WebCore:
      
              * ForwardingHeaders/kjs/collector.h: Removed.
              * ForwardingHeaders/kjs/completion.h: Removed.
              * ForwardingHeaders/kjs/identifier.h: Removed.
              * ForwardingHeaders/kjs/interpreter.h: Removed.
              * ForwardingHeaders/kjs/lookup.h: Removed.
              * ForwardingHeaders/kjs/operations.h: Removed.
              * ForwardingHeaders/kjs/protect.h: Removed.
              * ForwardingHeaders/kjs/ustring.h: Removed.
              * ForwardingHeaders/runtime/Collector.h: Copied from ForwardingHeaders/kjs/collector.h.
              * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/kjs/completion.h.
              * ForwardingHeaders/runtime/Identifier.h: Copied from ForwardingHeaders/kjs/identifier.h.
              * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
              * ForwardingHeaders/runtime/Lookup.h: Copied from ForwardingHeaders/kjs/lookup.h.
              * ForwardingHeaders/runtime/Operations.h: Copied from ForwardingHeaders/kjs/operations.h.
              * ForwardingHeaders/runtime/Protect.h: Copied from ForwardingHeaders/kjs/protect.h.
              * ForwardingHeaders/runtime/UString.h: Copied from ForwardingHeaders/kjs/ustring.h.
              * bindings/js/GCController.cpp:
              * bindings/js/JSCustomPositionCallback.h:
              * bindings/js/JSCustomPositionErrorCallback.h:
              * bindings/js/JSCustomSQLStatementCallback.h:
              * bindings/js/JSCustomSQLStatementErrorCallback.h:
              * bindings/js/JSCustomSQLTransactionErrorCallback.h:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSEventListener.h:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
              * bindings/objc/WebScriptObject.mm:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/c/c_class.cpp:
              * bridge/jni/jni_class.cpp:
              * bridge/jni/jni_jsobject.mm:
              * bridge/npruntime.cpp:
              * bridge/runtime_root.h:
              * history/CachedPage.h:
              * html/CanvasRenderingContext2D.cpp:
              * html/HTMLCanvasElement.cpp:
              * inspector/InspectorController.cpp:
              * inspector/JavaScriptCallFrame.cpp:
              * page/Console.cpp:
              * page/Page.cpp:
              * platform/text/AtomicString.cpp:
              * platform/text/PlatformString.h:
      
              WebKit/mac:
      
              * ForwardingHeaders/kjs/collector.h: Removed.
              * ForwardingHeaders/kjs/identifier.h: Removed.
              * ForwardingHeaders/kjs/interpreter.h: Removed.
              * ForwardingHeaders/kjs/lookup.h: Removed.
              * ForwardingHeaders/kjs/operations.h: Removed.
              * ForwardingHeaders/kjs/protect.h: Removed.
              * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
              * WebView/WebScriptDebugDelegate.mm:
      
              WebKit/wx:
      
              * WebFrame.cpp:
              * WebView.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b51a73b
  29. 23 Oct, 2008 1 commit
  30. 26 Sep, 2008 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · caf5e3ba
      weinig@apple.com authored
      2008-09-26  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              Patch for https://bugs.webkit.org/show_bug.cgi?id=21152
              Speedup static property get/put
      
              Convert getting/setting static property values to use static functions
              instead of storing an integer and switching in getValueProperty/putValueProperty.
      
              * kjs/JSObject.cpp:
              (JSC::JSObject::deleteProperty):
              (JSC::JSObject::getPropertyAttributes):
              * kjs/MathObject.cpp:
              (JSC::MathObject::getOwnPropertySlot):
              * kjs/NumberConstructor.cpp:
              (JSC::numberConstructorNaNValue):
              (JSC::numberConstructorNegInfinity):
              (JSC::numberConstructorPosInfinity):
              (JSC::numberConstructorMaxValue):
              (JSC::numberConstructorMinValue):
              * kjs/PropertySlot.h:
              (JSC::PropertySlot::):
              * kjs/RegExpConstructor.cpp:
              (JSC::regExpConstructorDollar1):
              (JSC::regExpConstructorDollar2):
              (JSC::regExpConstructorDollar3):
              (JSC::regExpConstructorDollar4):
              (JSC::regExpConstructorDollar5):
              (JSC::regExpConstructorDollar6):
              (JSC::regExpConstructorDollar7):
              (JSC::regExpConstructorDollar8):
              (JSC::regExpConstructorDollar9):
              (JSC::regExpConstructorInput):
              (JSC::regExpConstructorMultiline):
              (JSC::regExpConstructorLastMatch):
              (JSC::regExpConstructorLastParen):
              (JSC::regExpConstructorLeftContext):
              (JSC::regExpConstructorRightContext):
              (JSC::setRegExpConstructorInput):
              (JSC::setRegExpConstructorMultiline):
              (JSC::RegExpConstructor::setInput):
              (JSC::RegExpConstructor::setMultiline):
              (JSC::RegExpConstructor::multiline):
              * kjs/RegExpConstructor.h:
              * kjs/RegExpObject.cpp:
              (JSC::regExpObjectGlobal):
              (JSC::regExpObjectIgnoreCase):
              (JSC::regExpObjectMultiline):
              (JSC::regExpObjectSource):
              (JSC::regExpObjectLastIndex):
              (JSC::setRegExpObjectLastIndex):
              * kjs/RegExpObject.h:
              (JSC::RegExpObject::setLastIndex):
              (JSC::RegExpObject::lastIndex):
              (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
              * kjs/StructureID.cpp:
              (JSC::StructureID::getEnumerablePropertyNames):
              * kjs/create_hash_table:
              * kjs/lexer.cpp:
              (JSC::Lexer::lex):
              * kjs/lookup.cpp:
              (JSC::HashTable::createTable):
              (JSC::HashTable::deleteTable):
              (JSC::setUpStaticFunctionSlot):
              * kjs/lookup.h:
              (JSC::HashEntry::initialize):
              (JSC::HashEntry::setKey):
              (JSC::HashEntry::key):
              (JSC::HashEntry::attributes):
              (JSC::HashEntry::function):
              (JSC::HashEntry::functionLength):
              (JSC::HashEntry::propertyGetter):
              (JSC::HashEntry::propertyPutter):
              (JSC::HashEntry::lexerValue):
              (JSC::HashEntry::):
              (JSC::HashTable::entry):
              (JSC::getStaticPropertySlot):
              (JSC::getStaticValueSlot):
              (JSC::lookupPut):
      
      WebCore:
      
      2008-09-26  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Darin Adler.
      
              Patch for https://bugs.webkit.org/show_bug.cgi?id=21152
              Speedup static property get/put
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMBinding.cpp:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::getDOMConstructor):
              (WebCore::jsDOMWindowBaseCrypto):
              (WebCore::jsDOMWindowBaseEvent):
              (WebCore::jsDOMWindowBaseImage):
              (WebCore::jsDOMWindowBaseMessageChannel):
              (WebCore::jsDOMWindowBaseOption):
              (WebCore::jsDOMWindowBaseXMLHttpRequest):
              (WebCore::jsDOMWindowBaseAudio):
              (WebCore::jsDOMWindowBaseXSLTProcessor):
              (WebCore::jsDOMWindowBaseOnabort):
              (WebCore::jsDOMWindowBaseOnblur):
              (WebCore::jsDOMWindowBaseOnchange):
              (WebCore::jsDOMWindowBaseOnclick):
              (WebCore::jsDOMWindowBaseOndblclick):
              (WebCore::jsDOMWindowBaseOnerror):
              (WebCore::jsDOMWindowBaseOnfocus):
              (WebCore::jsDOMWindowBaseOnkeydown):
              (WebCore::jsDOMWindowBaseOnkeypress):
              (WebCore::jsDOMWindowBaseOnkeyup):
              (WebCore::jsDOMWindowBaseOnload):
              (WebCore::jsDOMWindowBaseOnmousedown):
              (WebCore::jsDOMWindowBaseOnmousemove):
              (WebCore::jsDOMWindowBaseOnmouseout):
              (WebCore::jsDOMWindowBaseOnmouseover):
              (WebCore::jsDOMWindowBaseOnmouseup):
              (WebCore::jsDOMWindowBaseOnMouseWheel):
              (WebCore::jsDOMWindowBaseOnreset):
              (WebCore::jsDOMWindowBaseOnresize):
              (WebCore::jsDOMWindowBaseOnscroll):
              (WebCore::jsDOMWindowBaseOnsearch):
              (WebCore::jsDOMWindowBaseOnselect):
              (WebCore::jsDOMWindowBaseOnsubmit):
              (WebCore::jsDOMWindowBaseOnbeforeunload):
              (WebCore::jsDOMWindowBaseOnunload):
              (WebCore::jsDOMWindowBaseOnWebKitAnimationStart):
              (WebCore::jsDOMWindowBaseOnWebKitAnimationIteration):
              (WebCore::jsDOMWindowBaseOnWebKitAnimationEnd):
              (WebCore::jsDOMWindowBaseOnWebKitTransitionEnd):
              (WebCore::JSDOMWindowBase::getOwnPropertySlot):
              (WebCore::JSDOMWindowBase::put):
              (WebCore::setJSDOMWindowBaseOnabort):
              (WebCore::setJSDOMWindowBaseOnblur):
              (WebCore::setJSDOMWindowBaseOnchange):
              (WebCore::setJSDOMWindowBaseOnclick):
              (WebCore::setJSDOMWindowBaseOndblclick):
              (WebCore::setJSDOMWindowBaseOnerror):
              (WebCore::setJSDOMWindowBaseOnfocus):
              (WebCore::setJSDOMWindowBaseOnkeydown):
              (WebCore::setJSDOMWindowBaseOnkeypress):
              (WebCore::setJSDOMWindowBaseOnkeyup):
              (WebCore::setJSDOMWindowBaseOnload):
              (WebCore::setJSDOMWindowBaseOnmousedown):
              (WebCore::setJSDOMWindowBaseOnmousemove):
              (WebCore::setJSDOMWindowBaseOnmouseout):
              (WebCore::setJSDOMWindowBaseOnmouseover):
              (WebCore::setJSDOMWindowBaseOnmouseup):
              (WebCore::setJSDOMWindowBaseOnMouseWheel):
              (WebCore::setJSDOMWindowBaseOnreset):
              (WebCore::setJSDOMWindowBaseOnresize):
              (WebCore::setJSDOMWindowBaseOnscroll):
              (WebCore::setJSDOMWindowBaseOnsearch):
              (WebCore::setJSDOMWindowBaseOnselect):
              (WebCore::setJSDOMWindowBaseOnsubmit):
              (WebCore::setJSDOMWindowBaseOnbeforeunload):
              (WebCore::setJSDOMWindowBaseOnunload):
              (WebCore::setJSDOMWindowBaseOnWebKitAnimationStart):
              (WebCore::setJSDOMWindowBaseOnWebKitAnimationIteration):
              (WebCore::setJSDOMWindowBaseOnWebKitAnimationEnd):
              (WebCore::setJSDOMWindowBaseOnWebKitTransitionEnd):
              (WebCore::setJSDOMWindowBaseEvent):
              (WebCore::setJSDOMWindowBaseAudio):
              (WebCore::setJSDOMWindowBaseImage):
              (WebCore::setJSDOMWindowBaseMessageChannel):
              (WebCore::setJSDOMWindowBaseOption):
              (WebCore::setJSDOMWindowBaseXMLHttpRequest):
              (WebCore::setJSDOMWindowBaseXSLTProcessor):
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::nonCachingStaticCloseFunctionGetter):
              (WebCore::nonCachingStaticBlurFunctionGetter):
              (WebCore::nonCachingStaticFocusFunctionGetter):
              (WebCore::nonCachingStaticPostMessageFunctionGetter):
              * bindings/js/JSDOMWindowCustom.h:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBasePrototype::getOwnPropertySlot):
              (WebCore::JSEventTargetBasePrototype::classInfo):
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::):
              (WebCore::JSEventTargetNode::getOwnPropertySlot):
              (WebCore::JSEventTargetNode::put):
              * bindings/js/JSEventTargetNode.h:
              (WebCore::JSEventTargetNode::classInfo):
              (WebCore::JSEventTargetNode::prototypeClassName):
              * bindings/js/JSEventTargetSVGElementInstance.cpp:
              (WebCore::):
              (WebCore::JSEventTargetSVGElementInstance::getOwnPropertySlot):
              (WebCore::JSEventTargetSVGElementInstance::put):
              * bindings/js/JSEventTargetSVGElementInstance.h:
              (WebCore::JSEventTargetSVGElementInstance::classInfo):
              (WebCore::JSEventTargetSVGElementInstance::prototypeClassName):
              * bindings/js/JSHTMLInputElementCustom.cpp:
              (WebCore::JSHTMLInputElement::customGetOwnPropertySlot):
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::nonCachingStaticBackFunctionGetter):
              (WebCore::nonCachingStaticForwardFunctionGetter):
              (WebCore::nonCachingStaticGoFunctionGetter):
              (WebCore::JSHistory::customGetOwnPropertySlot):
              * bindings/js/JSLocationCustom.cpp:
              (WebCore::nonCachingStaticReplaceFunctionGetter):
              (WebCore::nonCachingStaticReloadFunctionGetter):
              (WebCore::nonCachingStaticAssignFunctionGetter):
              (WebCore::JSLocation::customGetOwnPropertySlot):
              (WebCore::JSLocation::customPut):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      caf5e3ba
  31. 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
  32. 28 Apr, 2008 1 commit
  33. 18 Mar, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · 8a1c16ec
      darin@apple.com authored
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * JavaScriptCore.exp: Updated.
              * kjs/create_hash_table: Compute size of hash table large enough so that there
              are no collisions, but don't generate the hash table.
              * kjs/identifier.h: Made the add function that returns a PassRefPtr public.
              * kjs/lexer.cpp:
              (KJS::Lexer::lex): Updated for change to HashTable interface.
              * kjs/lookup.cpp:
              (KJS::HashTable::changeKeysToIdentifiers): Added. Finds the identifier for
              each property so the equality comparision can be done with pointer comparision.
              * kjs/lookup.h: Made the key be a union of char* with UString::Rep* so it can
              hold identifiers. Added a keysAreIdentifiers flag to the HashTable. Changed
              the Lookup functions to be member functions of HashTable instead.
              * kjs/object.cpp:
              (KJS::JSObject::deleteProperty): Update for change to HashTable.
              (KJS::JSObject::findPropertyHashEntry): Ditto.
              (KJS::JSObject::getPropertyAttributes): Ditto.
              (KJS::JSObject::getPropertyNames): Ditto.
      
      WebCore:
      
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
              (WebCore::JSDOMWindowBase::put): Ditto.
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
              (WebCore::JSLocation::put): Ditto.
              * bindings/js/kjs_binding.cpp:
              (WebCore::nonCachingStaticFunctionGetter): Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
              create_hash_table script.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a1c16ec
  34. 08 Nov, 2007 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · a73c15f5
      weinig@apple.com authored
              Reviewed by Darin.
      
              Convert JavaScript internal function objects to use one class per
              function.  This avoids a switch statement inside what used to be
              the shared function classes and will allow Shark to better analyze
              the code.
      
              To make this switch, the value property of the HashEntry was changed
              to a union of an intptr_t (which is used to continue handle valueGetters)
              and function pointer which points to a static constructor for the
              individual new function objects.
      
              SunSpider claims this is a 0.5% speedup. 
      
              * kjs/array_object.cpp:
              (KJS::ArrayPrototype::getOwnPropertySlot):
              (KJS::getProperty):
              (KJS::ArrayProtoFuncToString::callAsFunction):
              (KJS::ArrayProtoFuncToLocaleString::callAsFunction):
              (KJS::ArrayProtoFuncJoin::callAsFunction):
              (KJS::ArrayProtoFuncConcat::callAsFunction):
              (KJS::ArrayProtoFuncPop::callAsFunction):
              (KJS::ArrayProtoFuncPush::callAsFunction):
              (KJS::ArrayProtoFuncReverse::callAsFunction):
              (KJS::ArrayProtoFuncShift::callAsFunction):
              (KJS::ArrayProtoFuncSlice::callAsFunction):
              (KJS::ArrayProtoFuncSort::callAsFunction):
              (KJS::ArrayProtoFuncSplice::callAsFunction):
              (KJS::ArrayProtoFuncUnShift::callAsFunction):
              (KJS::ArrayProtoFuncFilter::callAsFunction):
              (KJS::ArrayProtoFuncMap::callAsFunction):
              (KJS::ArrayProtoFuncEvery::callAsFunction):
              (KJS::ArrayProtoFuncForEach::callAsFunction):
              (KJS::ArrayProtoFuncSome::callAsFunction):
              (KJS::ArrayProtoFuncIndexOf::callAsFunction):
              (KJS::ArrayProtoFuncLastIndexOf::callAsFunction):
              * kjs/array_object.h:
              (KJS::ArrayPrototype::classInfo):
              * kjs/create_hash_table:
              * kjs/date_object.cpp:
              (KJS::DatePrototype::getOwnPropertySlot):
              (KJS::DateProtoFuncToString::callAsFunction):
              (KJS::DateProtoFuncToUTCString::callAsFunction):
              (KJS::DateProtoFuncToDateString::callAsFunction):
              (KJS::DateProtoFuncToTimeString::callAsFunction):
              (KJS::DateProtoFuncToLocaleString::callAsFunction):
              (KJS::DateProtoFuncToLocaleDateString::callAsFunction):
              (KJS::DateProtoFuncToLocaleTimeString::callAsFunction):
              (KJS::DateProtoFuncValueOf::callAsFunction):
              (KJS::DateProtoFuncGetTime::callAsFunction):
              (KJS::DateProtoFuncGetFullYear::callAsFunction):
              (KJS::DateProtoFuncGetUTCFullYear::callAsFunction):
              (KJS::DateProtoFuncToGMTString::callAsFunction):
              (KJS::DateProtoFuncGetMonth::callAsFunction):
              (KJS::DateProtoFuncGetUTCMonth::callAsFunction):
              (KJS::DateProtoFuncGetDate::callAsFunction):
              (KJS::DateProtoFuncGetUTCDate::callAsFunction):
              (KJS::DateProtoFuncGetDay::callAsFunction):
              (KJS::DateProtoFuncGetUTCDay::callAsFunction):
              (KJS::DateProtoFuncGetHours::callAsFunction):
              (KJS::DateProtoFuncGetUTCHours::callAsFunction):
              (KJS::DateProtoFuncGetMinutes::callAsFunction):
              (KJS::DateProtoFuncGetUTCMinutes::callAsFunction):
              (KJS::DateProtoFuncGetSeconds::callAsFunction):
              (KJS::DateProtoFuncGetUTCSeconds::callAsFunction):
              (KJS::DateProtoFuncGetMilliSeconds::callAsFunction):
              (KJS::DateProtoFuncGetUTCMilliseconds::callAsFunction):
              (KJS::DateProtoFuncGetTimezoneOffset::callAsFunction):
              (KJS::DateProtoFuncSetTime::callAsFunction):
              (KJS::DateProtoFuncSetMilliSeconds::callAsFunction):
              (KJS::DateProtoFuncSetUTCMilliseconds::callAsFunction):
              (KJS::DateProtoFuncSetSeconds::callAsFunction):
              (KJS::DateProtoFuncSetUTCSeconds::callAsFunction):
              (KJS::DateProtoFuncSetMinutes::callAsFunction):
              (KJS::DateProtoFuncSetUTCMinutes::callAsFunction):
              (KJS::DateProtoFuncSetHours::callAsFunction):
              (KJS::DateProtoFuncSetUTCHours::callAsFunction):
              (KJS::DateProtoFuncSetDate::callAsFunction):
              (KJS::DateProtoFuncSetUTCDate::callAsFunction):
              (KJS::DateProtoFuncSetMonth::callAsFunction):
              (KJS::DateProtoFuncSetUTCMonth::callAsFunction):
              (KJS::DateProtoFuncSetFullYear::callAsFunction):
              (KJS::DateProtoFuncSetUTCFullYear::callAsFunction):
              (KJS::DateProtoFuncSetYear::callAsFunction):
              (KJS::DateProtoFuncGetYear::callAsFunction):
              * kjs/date_object.h:
              * kjs/lookup.cpp:
              (KJS::Lookup::find):
              * kjs/lookup.h:
              (KJS::HashEntry::):
              (KJS::staticFunctionGetter):
              (KJS::staticValueGetter):
              (KJS::getStaticPropertySlot):
              (KJS::getStaticFunctionSlot):
              (KJS::lookupPut):
              * kjs/math_object.cpp:
              (KJS::MathObjectImp::getOwnPropertySlot):
              (KJS::MathProtoFuncAbs::callAsFunction):
              (KJS::MathProtoFuncACos::callAsFunction):
              (KJS::MathProtoFuncASin::callAsFunction):
              (KJS::MathProtoFuncATan::callAsFunction):
              (KJS::MathProtoFuncATan2::callAsFunction):
              (KJS::MathProtoFuncCeil::callAsFunction):
              (KJS::MathProtoFuncCos::callAsFunction):
              (KJS::MathProtoFuncExp::callAsFunction):
              (KJS::MathProtoFuncFloor::callAsFunction):
              (KJS::MathProtoFuncLog::callAsFunction):
              (KJS::MathProtoFuncMax::callAsFunction):
              (KJS::MathProtoFuncMin::callAsFunction):
              (KJS::MathProtoFuncPow::callAsFunction):
              (KJS::MathProtoFuncRandom::callAsFunction):
              (KJS::MathProtoFuncRound::callAsFunction):
              (KJS::MathProtoFuncSin::callAsFunction):
              (KJS::MathProtoFuncSqrt::callAsFunction):
              (KJS::MathProtoFuncTan::callAsFunction):
              * kjs/math_object.h:
              (KJS::MathObjectImp::classInfo):
              (KJS::MathObjectImp::):
              * kjs/string_object.cpp:
              (KJS::StringPrototype::getOwnPropertySlot):
              (KJS::StringProtoFuncToString::callAsFunction):
              (KJS::StringProtoFuncValueOf::callAsFunction):
              (KJS::StringProtoFuncCharAt::callAsFunction):
              (KJS::StringProtoFuncCharCodeAt::callAsFunction):
              (KJS::StringProtoFuncConcat::callAsFunction):
              (KJS::StringProtoFuncIndexOf::callAsFunction):
              (KJS::StringProtoFuncLastIndexOf::callAsFunction):
              (KJS::StringProtoFuncMatch::callAsFunction):
              (KJS::StringProtoFuncSearch::callAsFunction):
              (KJS::StringProtoFuncReplace::callAsFunction):
              (KJS::StringProtoFuncSlice::callAsFunction):
              (KJS::StringProtoFuncSplit::callAsFunction):
              (KJS::StringProtoFuncSubstr::callAsFunction):
              (KJS::StringProtoFuncSubstring::callAsFunction):
              (KJS::StringProtoFuncToLowerCase::callAsFunction):
              (KJS::StringProtoFuncToUpperCase::callAsFunction):
              (KJS::StringProtoFuncToLocaleLowerCase::callAsFunction):
              (KJS::StringProtoFuncToLocaleUpperCase::callAsFunction):
              (KJS::StringProtoFuncLocaleCompare::callAsFunction):
              (KJS::StringProtoFuncBig::callAsFunction):
              (KJS::StringProtoFuncSmall::callAsFunction):
              (KJS::StringProtoFuncBlink::callAsFunction):
              (KJS::StringProtoFuncBold::callAsFunction):
              (KJS::StringProtoFuncFixed::callAsFunction):
              (KJS::StringProtoFuncItalics::callAsFunction):
              (KJS::StringProtoFuncStrike::callAsFunction):
              (KJS::StringProtoFuncSub::callAsFunction):
              (KJS::StringProtoFuncSup::callAsFunction):
              (KJS::StringProtoFuncFontcolor::callAsFunction):
              (KJS::StringProtoFuncFontsize::callAsFunction):
              (KJS::StringProtoFuncAnchor::callAsFunction):
              (KJS::StringProtoFuncLink::callAsFunction):
              * kjs/string_object.h:
      
      WebCore:
      
              Reviewed by Darin.
      
              Convert JavaScript internal function objects to use one class per
              function.  This avoids a switch statement inside what used to be
              the shared function classes and will allow Shark to better analyze
              the code.
      
              To make this switch, the value property of the HashEntry was changed
              to a union of an intptr_t (which is used to continue handle valueGetters)
              and function pointer which points to a static constructor for the
              individual new function objects.
      
              SunSpider claims this is a 0.5% speedup.
      
              - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
                new classes and hand updated the remain non-generated (groan) classes.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
              (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
              (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
              * bindings/js/JSEventTargetNode.h:
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
              * bindings/js/JSHTMLInputElementBase.h:
              (WebCore::JSHTMLInputElementBase::):
              * bindings/js/JSXMLHttpRequest.cpp:
              (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
              (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
              * bindings/js/JSXMLHttpRequest.h:
              (KJS::JSXMLHttpRequest::impl):
              * bindings/js/JSXSLTProcessor.cpp:
              (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
              (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
              * bindings/js/JSXSLTProcessor.h:
              * bindings/js/kjs_events.cpp:
              (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
              (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_navigator.cpp:
              (KJS::Plugins::):
              (KJS::Navigator::getOwnPropertySlot):
              (KJS::Plugins::getOwnPropertySlot):
              (KJS::PluginsFunctionRefresh::callAsFunction):
              (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
              * bindings/js/kjs_navigator.h:
              (KJS::Navigator::):
              * bindings/js/kjs_window.cpp:
              (KJS::Window::getOwnPropertySlot):
              (KJS::Window::put):
              (KJS::WindowProtoFuncAToB::callAsFunction):
              (KJS::WindowProtoFuncBToA::callAsFunction):
              (KJS::WindowProtoFuncOpen::callAsFunction):
              (KJS::WindowProtoFuncScrollBy::callAsFunction):
              (KJS::WindowProtoFuncScrollTo::callAsFunction):
              (KJS::WindowProtoFuncMoveBy::callAsFunction):
              (KJS::WindowProtoFuncMoveTo::callAsFunction):
              (KJS::WindowProtoFuncResizeBy::callAsFunction):
              (KJS::WindowProtoFuncResizeTo::callAsFunction):
              (KJS::WindowProtoFuncSetTimeout::callAsFunction):
              (KJS::WindowProtoFuncClearTimeout::callAsFunction):
              (KJS::WindowProtoFuncSetInterval::callAsFunction):
              (KJS::WindowProtoFuncAddEventListener::callAsFunction):
              (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
              (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
              (KJS::WindowProtoFuncNotImplemented::callAsFunction):
              (KJS::Location::getOwnPropertySlot):
              (KJS::Location::put):
              (KJS::LocationProtoFuncReplace::callAsFunction):
              (KJS::LocationProtoFuncReload::callAsFunction):
              (KJS::LocationProtoFuncAssign::callAsFunction):
              (KJS::LocationProtoFuncToString::callAsFunction):
              * bindings/js/kjs_window.h:
              (KJS::Window::):
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a73c15f5
  35. 24 Oct, 2007 1 commit
    • darin's avatar
      JavaScriptCore: · 41d3d9c1
      darin authored
              Reviewed by Maciej.
      
              - http://bugs.webkit.org/show_bug.cgi?id=15657
                change static hash tables to use powers of two for speed
      
              Seems to give 0.7% SunSpider speedup.
      
              * kjs/create_hash_table: Updated to generate new format.
              * kjs/lookup.cpp:
              (KJS::keysMatch): Took out unneeded typecast.
              (KJS::findEntry): Updated to expect table type 3 -- changed the printf to a plain old assert.
              Replaced the modulus with a bit mask.
              (KJS::Lookup::findEntry): Get the hash directly, since we know identifiers already have computed
              their hash -- saves a branch.
              (KJS::Lookup::find): Ditto.
              * kjs/lookup.h: Changed attr from 2-byte value to one-byte value. Replaced hashSize with hashSizeMask.
      
      WebCore:
      
              Reviewed by Maciej.
      
              - http://bugs.webkit.org/show_bug.cgi?id=15657
                change static hash tables to use powers of two for speed
      
              * bindings/scripts/CodeGeneratorJS.pm: Updated to generate new format.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41d3d9c1