1 2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
3 Reviewed by Gavin Barraclough.
5 The parenthetical assertion checking isn't working in some cases with YARR
7 https://bugs.webkit.org/show_bug.cgi?id=46893
9 Calculate the countToCheck value of a TypeParentheticalAssertion by
10 subtracting the number of characters which follows
11 a TypeParentheticalAssertion term with the number of characters which should
12 be matched by terms which are contained
13 in the TypeParentheticalAssertion term (minimumSize).
15 * yarr/RegexInterpreter.cpp:
16 (JSC::Yarr::ByteCompiler::emitDisjunction):
18 2010-10-14 Nathan Vander Wilt <nate@andyet.net>
20 Reviewed by Darin Adler.
22 Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
24 * runtime/DateConversion.cpp:
27 (WTF::ymdhmsToSeconds):
28 (WTF::parseES5DateFromNullTerminatedCharacters):
31 2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
33 Reviewed by Gavin Barraclough.
35 Replace lots of String::format() usages by StringConcatenate
36 https://bugs.webkit.org/show_bug.cgi?id=47664
38 Add StringTypeAdapter<char> to accept single characters for makeString().
40 * wtf/text/StringConcatenate.h:
43 2010-10-14 David Goodwin <david_goodwin@apple.com>
45 Reviewed by Darin Adler.
47 need way to measure size of JITed ARM code
48 https://bugs.webkit.org/show_bug.cgi?id=47121
50 * assembler/LinkBuffer.h:
51 (JSC::LinkBuffer::linkCode):
52 (JSC::LinkBuffer::dumpLinkStats):
53 (JSC::LinkBuffer::dumpCode):
55 2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu>
57 Reviewed by Gavin Barraclough.
59 The backreference checking isn't working in some cases with YARR Interpreter
60 https://bugs.webkit.org/show_bug.cgi?id=46904
62 The Interpreter::matchBackReference() function returns true without matching
63 when a backreference points to the same parentheses where it is.
65 * yarr/RegexInterpreter.cpp:
66 (JSC::Yarr::Interpreter::matchBackReference):
68 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
70 Reviewed by Andreas Kling.
72 [Qt] Text breaking is slow: enable ICU as an opt-in
73 https://bugs.webkit.org/show_bug.cgi?id=40332
75 Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
76 Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
79 * wtf/unicode/qt4/UnicodeQt4.h:
80 (WTF::Unicode::toLower):
81 (WTF::Unicode::toUpper):
82 (WTF::Unicode::toTitleCase):
83 (WTF::Unicode::foldCase):
84 (WTF::Unicode::isPrintableChar):
85 (WTF::Unicode::isSeparatorSpace):
86 (WTF::Unicode::isPunct):
87 (WTF::Unicode::isLower):
88 (WTF::Unicode::mirroredChar):
89 (WTF::Unicode::combiningClass):
90 (WTF::Unicode::direction):
91 (WTF::Unicode::category):
93 2010-10-14 Anton Faern <anton@bladehawke.com>
95 Reviewed by Csaba Osztrogonác.
97 https://bugs.webkit.org/show_bug.cgi?id=47658
98 NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
99 change. This means that OS(NETBSD) is also undefined.
101 * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
103 2010-10-13 David Goodwin <david_goodwin@apple.com>
105 Reviewed by Oliver Hunt.
107 ARMv7 JIT should generated conditional branches when possible
108 https://bugs.webkit.org/show_bug.cgi?id=47384
110 Use different jump padding sizes for conditional and unconditional
111 jumps (12 bytes and 10 bytes respectively). This allows the JIT to
112 include the IT instruction as part of the conditional jump sequence
113 which in turn allows it to optimize away the IT using an ARMv7
114 conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
115 conditional branches when displacement is in range. Also use IT/B(T4)
116 for conditional branch when displacement does not fit in B(T3).
118 For unconditional jump, instruction selection options are:
119 B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
120 options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
122 * assembler/ARMv7Assembler.cpp:
123 * assembler/ARMv7Assembler.h:
124 (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
125 (JSC::ARMv7Assembler::ifThenElse):
126 (JSC::ARMv7Assembler::jumpSizeDelta):
127 (JSC::ARMv7Assembler::canCompact):
128 (JSC::ARMv7Assembler::computeJumpType):
129 (JSC::ARMv7Assembler::link):
130 (JSC::ARMv7Assembler::canBeJumpT1):
131 (JSC::ARMv7Assembler::canBeJumpT3):
132 (JSC::ARMv7Assembler::canBeJumpT4):
133 (JSC::ARMv7Assembler::linkJumpT1):
134 (JSC::ARMv7Assembler::linkJumpT3):
135 (JSC::ARMv7Assembler::linkJumpT4):
136 (JSC::ARMv7Assembler::linkConditionalJumpT4):
137 (JSC::ARMv7Assembler::linkBX):
138 (JSC::ARMv7Assembler::linkConditionalBX):
139 (JSC::ARMv7Assembler::linkJumpAbsolute):
140 * assembler/LinkBuffer.h:
141 (JSC::LinkBuffer::linkCode):
142 * assembler/MacroAssemblerARMv7.h:
143 (JSC::MacroAssemblerARMv7::canCompact):
144 (JSC::MacroAssemblerARMv7::computeJumpType):
145 (JSC::MacroAssemblerARMv7::jumpSizeDelta):
146 (JSC::MacroAssemblerARMv7::jump):
147 (JSC::MacroAssemblerARMv7::nearCall):
148 (JSC::MacroAssemblerARMv7::call):
149 (JSC::MacroAssemblerARMv7::ret):
150 (JSC::MacroAssemblerARMv7::tailRecursiveCall):
151 (JSC::MacroAssemblerARMv7::makeJump):
152 (JSC::MacroAssemblerARMv7::makeBranch):
154 2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch>
156 Reviewed by Darin Adler.
158 Don't depend on Windows on sched_yield and sched.h
159 https://bugs.webkit.org/show_bug.cgi?id=45543
161 sched.h is part of pthreads and sched_yield is implemented
162 in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
163 dependency on pthreads-win32 in this file.
168 2010-10-13 Kwang Yul Seo <skyul@company100.net>
170 Reviewed by Kent Tamura.
172 [BREWMP] Port unicode
173 https://bugs.webkit.org/show_bug.cgi?id=45716
175 Brew MP port uses only the subset of ICU library to reduce the binary size.
176 Follow the WinCE's implementation.
179 * wtf/unicode/Unicode.h:
180 * wtf/unicode/brew/UnicodeBrew.cpp: Added.
181 (WTF::Unicode::toLower):
182 (WTF::Unicode::toUpper):
183 (WTF::Unicode::foldCase):
184 (WTF::Unicode::isPrintableChar):
185 (WTF::Unicode::isUpper):
186 (WTF::Unicode::isLower):
187 (WTF::Unicode::isDigit):
188 (WTF::Unicode::isPunct):
189 (WTF::Unicode::isAlphanumeric):
190 (WTF::Unicode::toTitleCase):
191 (WTF::Unicode::direction):
192 (WTF::Unicode::category):
193 (WTF::Unicode::decompositionType):
194 (WTF::Unicode::combiningClass):
195 (WTF::Unicode::mirroredChar):
196 (WTF::Unicode::digitValue):
197 (WTF::Unicode::isSpace):
198 (WTF::Unicode::isLetter):
199 * wtf/unicode/brew/UnicodeBrew.h: Added.
200 (WTF::Unicode::isArabicChar):
201 (WTF::Unicode::isSeparatorSpace):
202 (WTF::Unicode::hasLineBreakingPropertyComplexContext):
203 (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
204 (WTF::Unicode::umemcasecmp):
206 2010-10-13 Gavin Barraclough <barraclough@apple.com>
210 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
212 2010-10-13 Adam Barth <abarth@webkit.org>
214 Reviewed by Maciej Stachowiak.
216 [WTFURL] Add URLQueryCanonicalizer
217 https://bugs.webkit.org/show_bug.cgi?id=45088
219 This class canonicalizes the query component of URLs. The main tricky
220 bit there is the convertCharset function, which I've moved to a
221 templated dependency. There'll likely be more about that in future
224 * JavaScriptCore.xcodeproj/project.pbxproj:
225 * wtf/url/src/URLEscape.cpp: Added.
226 * wtf/url/src/URLEscape.h: Added.
227 (WTF::appendEscapedCharacter):
228 * wtf/url/src/URLQueryCanonicalizer.h: Added.
229 (WTF::URLQueryCanonicalizer::canonicalize):
230 (WTF::URLQueryCanonicalizer::isAllASCII):
231 (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
232 (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
234 2010-10-13 Gavin Barraclough <barraclough@apple.com>
236 Reviewed by Oliver Hunt.
238 Bug 43987 - Downloading using XHR is much slower than before
239 Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
240 Fundamentally this should be the same (copies current contents to expand capacity,
241 rather than using a rope), but this approach allows the intermadiate state of the
242 String to be inspected in the buffer without copying to resolve.
244 * runtime/JSONObject.cpp:
245 (JSC::Stringifier::appendQuotedString):
246 (JSC::Stringifier::Holder::appendNextProperty):
247 Renamed StringBuilder::size() -> length() (to match other String types).
249 * runtime/UStringBuilder.h:
250 (JSC::UStringBuilder::append):
251 (JSC::UStringBuilder::toUString):
252 Update for changes in parent class, can just 'using' the append methods.
254 * wtf/text/StringBuilder.cpp: Added.
255 (WTF::StringBuilder::reifyString):
256 (WTF::StringBuilder::resize):
257 (WTF::StringBuilder::reserveCapacity):
258 (WTF::StringBuilder::allocateBuffer):
259 (WTF::StringBuilder::appendUninitialized):
260 (WTF::StringBuilder::append):
261 (WTF::StringBuilder::shrinkToFit):
262 * wtf/text/StringBuilder.h:
263 (WTF::StringBuilder::StringBuilder):
264 (WTF::StringBuilder::append):
265 (WTF::StringBuilder::toString):
266 (WTF::StringBuilder::toStringPreserveCapacity):
267 (WTF::StringBuilder::length):
268 (WTF::StringBuilder::isEmpty):
269 (WTF::StringBuilder::operator[]):
270 (WTF::StringBuilder::clear):
271 Class updated to use overcapacity in a StringImpl, rather than a Vector.
276 * JavaScriptCore.exp:
277 * JavaScriptCore.gypi:
278 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
279 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
280 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
281 * JavaScriptCore.xcodeproj/project.pbxproj:
282 * wtf/CMakeLists.txt:
285 2010-10-13 Adam Roben <aroben@apple.com>
287 Export tryFastRealloc for WebKit2's benefit
289 Rubber-stamped by Anders Carlsson.
291 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
292 tryFastRealloc. Removed RegExpObject::info, which is now exported via
295 2010-10-13 Adam Barth <abarth@webkit.org>
297 Reviewed by Maciej Stachowiak.
299 [WTFURL] Add a mechanism for classifying types of characters
300 https://bugs.webkit.org/show_bug.cgi?id=45085
302 Various characters have different escaping rules depending on where
303 they are in URLs. This patch adds a table containing that information.
305 * JavaScriptCore.xcodeproj/project.pbxproj:
306 * wtf/url/src/URLCharacterTypes.cpp: Added.
307 * wtf/url/src/URLCharacterTypes.h: Added.
308 (WTF::URLCharacterTypes::isQueryChar):
309 (WTF::URLCharacterTypes::isIPv4Char):
310 (WTF::URLCharacterTypes::isHexChar):
311 (WTF::URLCharacterTypes::isCharOfType):
313 2010-10-13 Xan Lopez <xlopez@igalia.com>
315 Reviewed by Csaba Osztrogonác.
317 Missing parameters for bytecode dump of next_pname
318 https://bugs.webkit.org/show_bug.cgi?id=47590
320 * bytecode/CodeBlock.cpp:
321 (JSC::CodeBlock::dump): add missing parameters to the dump.
323 2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com>
325 Reviewed by Dirk Schulze.
327 Add wtf/text/StringConcatenate
328 https://bugs.webkit.org/show_bug.cgi?id=47584
330 Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
331 Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
332 Exactly the same design that has been followed while refactoring StringBuilder.
334 The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
336 * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
337 * JavaScriptCore.gypi: Ditto.
338 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
339 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
340 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
341 * bytecode/CodeBlock.cpp: s/makeString/makeUString/
343 (JSC::valueToSourceString):
346 (JSC::CodeBlock::registerName):
347 (JSC::regexpToSourceString):
349 * bytecompiler/NodesCodegen.cpp: Ditto.
351 * profiler/Profiler.cpp: Ditto.
352 (JSC::Profiler::createCallIdentifier):
353 * runtime/ExceptionHelpers.cpp: Ditto.
354 (JSC::createUndefinedVariableError):
355 (JSC::createErrorMessage):
356 (JSC::createInvalidParamError):
357 * runtime/FunctionConstructor.cpp: Ditto.
358 (JSC::constructFunction):
359 * runtime/FunctionPrototype.cpp: Ditto.
360 (JSC::insertSemicolonIfNeeded):
361 * runtime/JSONObject.cpp: Ditto.
362 (JSC::Stringifier::indent):
363 * runtime/JSStringBuilder.h:
364 (JSC::jsMakeNontrivialString):
365 * runtime/RegExpConstructor.cpp: Ditto.
366 (JSC::constructRegExp):
367 * runtime/RegExpObject.cpp: Ditto.
368 (JSC::RegExpObject::match):
369 * runtime/RegExpPrototype.cpp: Ditto.
370 (JSC::regExpProtoFuncCompile):
371 * runtime/StringConcatenate.h: Removed.
372 * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
374 * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
377 2010-10-12 Gavin Barraclough <barraclough@apple.com>
381 * wtf/text/StringBuilder.h:
382 (WTF::StringBuilder::length):
384 2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
386 Reviewed by Gavin Barraclough.
388 Unify JSC::StringBuilder & WebCore::StringBuilder
389 https://bugs.webkit.org/show_bug.cgi?id=47538
391 Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
392 Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
393 UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
395 No new code, just move code around.
397 * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
398 * JavaScriptCore.gypi: Ditto.
399 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
400 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
401 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
402 * runtime/Executable.cpp:
403 (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
404 * runtime/FunctionConstructor.cpp:
405 (JSC::constructFunction): Ditto.
406 * runtime/JSGlobalObjectFunctions.cpp:
407 (JSC::globalFuncUnescape): Ditto.
408 * runtime/JSONObject.cpp:
409 (JSC::Stringifier::stringify): Ditto.
410 (JSC::Stringifier::appendQuotedString): Ditto.
411 (JSC::Stringifier::appendStringifiedValue): Ditto.
412 (JSC::Stringifier::startNewLine): Ditto.
413 (JSC::Stringifier::Holder::appendNextProperty): Ditto.
414 * runtime/LiteralParser.cpp:
415 (JSC::LiteralParser::Lexer::lexString): Ditto.
416 * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
417 * runtime/StringBuilder.h: Removed.
418 * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
419 (JSC::UStringBuilder::append): append(const JSC::UString&)
420 (JSC::UStringBuilder::toUString):
421 * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
422 (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
423 (WTF::StringBuilder::isEmpty): Ditto (+ constify method).
424 (WTF::StringBuilder::reserveCapacity): Ditto.
425 (WTF::StringBuilder::resize): Ditto.
426 (WTF::StringBuilder::size): Ditto.
427 (WTF::StringBuilder::operator[]): Ditto.
428 (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
430 2010-10-12 Michael Saboff <msaboff@apple.com>
432 Reviewed by Oliver Hunt.
434 Cleaned up the processing of replacements after regular expression
435 processing, especially the case where there wasn't a match.
436 Changed to use empty strings instead of computing a zero length sub
438 https://bugs.webkit.org/show_bug.cgi?id=47506
440 * runtime/StringPrototype.cpp:
441 (JSC::jsSpliceSubstringsWithSeparators):
442 (JSC::stringProtoFuncReplace):
444 2010-10-11 Patrick Gansterer <paroga@webkit.org>
448 Clang build fix after r69472.
449 https://bugs.webkit.org/show_bug.cgi?id=46523
451 * wtf/text/StringHash.h:
453 2010-10-11 Oliver Hunt <oliver@apple.com>
455 Undo last minute change to 32bit build.
457 * jit/JITOpcodes32_64.cpp:
458 (JSC::JIT::emit_op_convert_this_strict):
460 2010-10-11 Brian Weinstein <bweinstein@apple.com>
462 Build fix for Windows. Add a necessary export from r69516.
464 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
466 2010-10-11 Oliver Hunt <oliver@apple.com>
468 Fix interpreter build -- was broken by incorrect merge.
470 * interpreter/Interpreter.cpp:
471 (JSC::Interpreter::privateExecute):
473 2010-10-01 Oliver Hunt <oliver@apple.com>
475 Reviewed by Gavin Barraclough.
477 [ES5] Implement strict mode
478 https://bugs.webkit.org/show_bug.cgi?id=10701
480 Initial strict mode implementation. This is the simplest
481 implementation that could possibly work and adds (hopefully)
482 all of the restrictions required by strict mode. There are
483 a number of inefficiencies, especially in the handling of
484 arguments and eval as smart implementations would make this
485 patch more complicated.
487 The SyntaxChecker AST builder has become somewhat more complex
488 as strict mode does require more parse tree information to
491 Summary of major changes to the parser:
492 * We track when we enter strict mode (this may come as a surprise)
493 * Strict mode actually requires a degree of AST knowledge to validate
494 so the SyntaxChecker now produces values that can be used to distinguish
496 * We now track variables that are written to. We do this to
497 statically identify writes to global properties that don't exist
498 and abort at that point. This should actually make it possible
499 to optimise some other cases in the future but for now it's
500 purely for validity checking. Currently writes are only tracked
502 * Labels are now tracked as it is now a syntax error to jump to a label
503 that does not exist (or to use break, continue, or return in a context
504 where they would be invalid).
507 * In order to get correct hanlding of the Arguments object all
508 strict mode functions that reference arguments create and tearoff
509 the arguments object on entry. This is not strictly necessary
510 but was the least work necessary to get the correct behaviour.
511 * PutPropertySlot now tracks whether it is being used for a strict
512 mode write, and if so Object::put will throw when a write can't be
514 * StrictEvalActivation was added as an "activation" object for strict
515 mode eval (so that strict eval does not introduce new variables into
516 the containing scope).
520 * JavaScriptCore.exp:
521 * JavaScriptCore.pro:
522 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
523 * JavaScriptCore.xcodeproj/project.pbxproj:
524 * bytecode/CodeBlock.cpp:
525 (JSC::CodeBlock::dump):
526 (JSC::CodeBlock::CodeBlock):
527 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
528 * bytecode/CodeBlock.h:
529 (JSC::CodeBlock::isStrictMode):
530 * bytecode/EvalCodeCache.h:
531 (JSC::EvalCodeCache::get):
533 * bytecompiler/BytecodeGenerator.cpp:
534 (JSC::BytecodeGenerator::BytecodeGenerator):
535 (JSC::BytecodeGenerator::createArgumentsIfNecessary):
536 (JSC::BytecodeGenerator::emitReturn):
537 * bytecompiler/BytecodeGenerator.h:
538 (JSC::BytecodeGenerator::isStrictMode):
539 (JSC::BytecodeGenerator::makeFunction):
540 * debugger/Debugger.cpp:
541 (JSC::evaluateInGlobalCallFrame):
542 * debugger/DebuggerCallFrame.cpp:
543 (JSC::DebuggerCallFrame::evaluate):
544 * interpreter/Interpreter.cpp:
545 (JSC::Interpreter::callEval):
546 (JSC::Interpreter::unwindCallFrame):
547 (JSC::Interpreter::execute):
548 (JSC::Interpreter::privateExecute):
550 (JSC::JIT::privateCompileMainPass):
551 (JSC::JIT::privateCompileSlowCases):
553 * jit/JITOpcodes.cpp:
554 (JSC::JIT::emit_op_get_pnames):
555 (JSC::JIT::emit_op_convert_this_strict):
556 (JSC::JIT::emitSlow_op_convert_this_strict):
557 * jit/JITOpcodes32_64.cpp:
558 (JSC::JIT::emit_op_get_pnames):
560 (JSC::DEFINE_STUB_FUNCTION):
562 * parser/ASTBuilder.h:
563 (JSC::ASTBuilder::createFunctionBody):
564 (JSC::ASTBuilder::isResolve):
565 * parser/JSParser.cpp:
566 (JSC::JSParser::next):
567 (JSC::JSParser::startLoop):
568 (JSC::JSParser::endLoop):
569 (JSC::JSParser::startSwitch):
570 (JSC::JSParser::endSwitch):
571 (JSC::JSParser::setStrictMode):
572 (JSC::JSParser::strictMode):
573 (JSC::JSParser::isValidStrictMode):
574 (JSC::JSParser::declareParameter):
575 (JSC::JSParser::breakIsValid):
576 (JSC::JSParser::pushLabel):
577 (JSC::JSParser::popLabel):
578 (JSC::JSParser::hasLabel):
579 (JSC::JSParser::DepthManager::DepthManager):
580 (JSC::JSParser::DepthManager::~DepthManager):
581 (JSC::JSParser::Scope::Scope):
582 (JSC::JSParser::Scope::startSwitch):
583 (JSC::JSParser::Scope::endSwitch):
584 (JSC::JSParser::Scope::startLoop):
585 (JSC::JSParser::Scope::endLoop):
586 (JSC::JSParser::Scope::inLoop):
587 (JSC::JSParser::Scope::breakIsValid):
588 (JSC::JSParser::Scope::pushLabel):
589 (JSC::JSParser::Scope::popLabel):
590 (JSC::JSParser::Scope::hasLabel):
591 (JSC::JSParser::Scope::isFunction):
592 (JSC::JSParser::Scope::declareVariable):
593 (JSC::JSParser::Scope::declareWrite):
594 (JSC::JSParser::Scope::deleteProperty):
595 (JSC::JSParser::Scope::declareParameter):
596 (JSC::JSParser::Scope::setNeedsFullActivation):
597 (JSC::JSParser::Scope::collectFreeVariables):
598 (JSC::JSParser::Scope::getUncapturedWrittenVariables):
599 (JSC::JSParser::Scope::getDeletedVariables):
600 (JSC::JSParser::Scope::setStrictMode):
601 (JSC::JSParser::Scope::strictMode):
602 (JSC::JSParser::Scope::isValidStrictMode):
603 (JSC::JSParser::pushScope):
604 (JSC::JSParser::popScope):
605 (JSC::JSParser::declareVariable):
606 (JSC::JSParser::declareWrite):
607 (JSC::JSParser::deleteProperty):
609 (JSC::JSParser::JSParser):
610 (JSC::JSParser::parseProgram):
611 (JSC::JSParser::parseSourceElements):
612 (JSC::JSParser::parseDoWhileStatement):
613 (JSC::JSParser::parseWhileStatement):
614 (JSC::JSParser::parseVarDeclarationList):
615 (JSC::JSParser::parseConstDeclarationList):
616 (JSC::JSParser::parseForStatement):
617 (JSC::JSParser::parseBreakStatement):
618 (JSC::JSParser::parseContinueStatement):
619 (JSC::JSParser::parseReturnStatement):
620 (JSC::JSParser::parseWithStatement):
621 (JSC::JSParser::parseSwitchStatement):
622 (JSC::JSParser::parseSwitchClauses):
623 (JSC::JSParser::parseSwitchDefaultClause):
624 (JSC::JSParser::parseTryStatement):
625 (JSC::JSParser::parseBlockStatement):
626 (JSC::JSParser::parseStatement):
627 (JSC::JSParser::parseFormalParameters):
628 (JSC::JSParser::parseFunctionBody):
629 (JSC::JSParser::parseFunctionInfo):
630 (JSC::JSParser::parseFunctionDeclaration):
631 (JSC::JSParser::parseExpressionOrLabelStatement):
632 (JSC::JSParser::parseIfStatement):
633 (JSC::JSParser::parseExpression):
634 (JSC::JSParser::parseAssignmentExpression):
635 (JSC::JSParser::parseConditionalExpression):
636 (JSC::JSParser::parseBinaryExpression):
637 (JSC::JSParser::parseStrictObjectLiteral):
638 (JSC::JSParser::parsePrimaryExpression):
639 (JSC::JSParser::parseMemberExpression):
640 (JSC::JSParser::parseUnaryExpression):
643 (JSC::Lexer::parseString):
646 (JSC::Lexer::isReparsing):
648 (JSC::ScopeNode::ScopeNode):
649 (JSC::FunctionBodyNode::FunctionBodyNode):
650 (JSC::FunctionBodyNode::create):
652 (JSC::ScopeNode::isStrictMode):
654 (JSC::Parser::parse):
656 (JSC::Parser::parse):
657 * parser/SyntaxChecker.h:
658 (JSC::SyntaxChecker::SyntaxChecker):
659 (JSC::SyntaxChecker::makeFunctionCallNode):
660 (JSC::SyntaxChecker::appendToComma):
661 (JSC::SyntaxChecker::createCommaExpr):
662 (JSC::SyntaxChecker::makeAssignNode):
663 (JSC::SyntaxChecker::makePrefixNode):
664 (JSC::SyntaxChecker::makePostfixNode):
665 (JSC::SyntaxChecker::makeTypeOfNode):
666 (JSC::SyntaxChecker::makeDeleteNode):
667 (JSC::SyntaxChecker::makeNegateNode):
668 (JSC::SyntaxChecker::makeBitwiseNotNode):
669 (JSC::SyntaxChecker::createLogicalNot):
670 (JSC::SyntaxChecker::createUnaryPlus):
671 (JSC::SyntaxChecker::createVoid):
672 (JSC::SyntaxChecker::thisExpr):
673 (JSC::SyntaxChecker::createResolve):
674 (JSC::SyntaxChecker::createObjectLiteral):
675 (JSC::SyntaxChecker::createArray):
676 (JSC::SyntaxChecker::createNumberExpr):
677 (JSC::SyntaxChecker::createString):
678 (JSC::SyntaxChecker::createBoolean):
679 (JSC::SyntaxChecker::createNull):
680 (JSC::SyntaxChecker::createBracketAccess):
681 (JSC::SyntaxChecker::createDotAccess):
682 (JSC::SyntaxChecker::createRegex):
683 (JSC::SyntaxChecker::createNewExpr):
684 (JSC::SyntaxChecker::createConditionalExpr):
685 (JSC::SyntaxChecker::createAssignResolve):
686 (JSC::SyntaxChecker::createFunctionExpr):
687 (JSC::SyntaxChecker::createFunctionBody):
688 (JSC::SyntaxChecker::appendBinaryExpressionInfo):
689 (JSC::SyntaxChecker::operatorStackPop):
690 * runtime/Arguments.cpp:
691 (JSC::Arguments::createStrictModeCallerIfNecessary):
692 (JSC::Arguments::createStrictModeCalleeIfNecessary):
693 (JSC::Arguments::getOwnPropertySlot):
694 (JSC::Arguments::getOwnPropertyDescriptor):
695 (JSC::Arguments::put):
696 (JSC::Arguments::deleteProperty):
697 * runtime/Arguments.h:
698 (JSC::Arguments::Arguments):
699 * runtime/CommonIdentifiers.cpp:
700 (JSC::CommonIdentifiers::CommonIdentifiers):
701 * runtime/CommonIdentifiers.h:
703 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
704 (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
705 (JSC::StrictModeTypeErrorFunction::getConstructData):
706 (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
707 (JSC::StrictModeTypeErrorFunction::getCallData):
708 (JSC::createTypeErrorFunction):
710 * runtime/Executable.cpp:
711 (JSC::EvalExecutable::EvalExecutable):
712 (JSC::ProgramExecutable::ProgramExecutable):
713 (JSC::FunctionExecutable::FunctionExecutable):
714 (JSC::EvalExecutable::compileInternal):
715 (JSC::ProgramExecutable::checkSyntax):
716 (JSC::ProgramExecutable::compileInternal):
717 (JSC::FunctionExecutable::compileForCallInternal):
718 (JSC::FunctionExecutable::compileForConstructInternal):
719 (JSC::FunctionExecutable::reparseExceptionInfo):
720 (JSC::EvalExecutable::reparseExceptionInfo):
721 (JSC::FunctionExecutable::fromGlobalCode):
722 (JSC::ProgramExecutable::reparseExceptionInfo):
723 * runtime/Executable.h:
724 (JSC::ScriptExecutable::ScriptExecutable):
725 (JSC::ScriptExecutable::isStrictMode):
726 (JSC::EvalExecutable::create):
727 (JSC::FunctionExecutable::create):
728 * runtime/JSActivation.cpp:
729 (JSC::JSActivation::toStrictThisObject):
730 * runtime/JSActivation.h:
731 * runtime/JSFunction.cpp:
732 (JSC::createDescriptorForThrowingProperty):
733 (JSC::JSFunction::getOwnPropertySlot):
734 (JSC::JSFunction::getOwnPropertyDescriptor):
735 (JSC::JSFunction::put):
736 * runtime/JSGlobalData.cpp:
737 (JSC::JSGlobalData::JSGlobalData):
738 * runtime/JSGlobalData.h:
739 * runtime/JSGlobalObject.cpp:
740 (JSC::JSGlobalObject::reset):
741 * runtime/JSGlobalObject.h:
742 (JSC::JSGlobalObject::internalFunctionStructure):
743 * runtime/JSGlobalObjectFunctions.cpp:
744 (JSC::globalFuncEval):
745 * runtime/JSObject.cpp:
746 (JSC::JSObject::put):
747 (JSC::JSObject::toStrictThisObject):
748 (JSC::throwTypeError):
749 * runtime/JSObject.h:
750 (JSC::JSObject::isStrictModeFunction):
751 (JSC::JSObject::putDirectInternal):
752 (JSC::JSObject::putDirect):
753 (JSC::JSValue::putDirect):
754 (JSC::JSValue::toStrictThisObject):
755 * runtime/JSStaticScopeObject.cpp:
756 (JSC::JSStaticScopeObject::toStrictThisObject):
757 * runtime/JSStaticScopeObject.h:
759 * runtime/JSZombie.h:
760 (JSC::JSZombie::toStrictThisObject):
761 * runtime/PutPropertySlot.h:
762 (JSC::PutPropertySlot::PutPropertySlot):
763 (JSC::PutPropertySlot::isStrictMode):
764 * runtime/StrictEvalActivation.cpp: Added.
765 (JSC::StrictEvalActivation::StrictEvalActivation):
766 (JSC::StrictEvalActivation::deleteProperty):
767 (JSC::StrictEvalActivation::toThisObject):
768 (JSC::StrictEvalActivation::toStrictThisObject):
769 * runtime/StrictEvalActivation.h: Added.
771 2010-10-10 Patrick Gansterer <paroga@webkit.org>
775 Windows build fix after r69472.
777 * wtf/text/StringHash.h:
778 (WTF::CaseFoldingHash::hash):
780 2010-10-10 Patrick Gansterer <paroga@webkit.org>
782 Reviewed by Adam Barth.
784 Use WTF::StringHasher in WTF::CaseFoldingHash
785 https://bugs.webkit.org/show_bug.cgi?id=46523
787 * wtf/text/StringHash.h:
788 (WTF::CaseFoldingHash::foldCase):
789 (WTF::CaseFoldingHash::hash):
791 2010-10-09 Pratik Solanki <psolanki@apple.com>
793 Reviewed by Xan Lopez.
795 https://bugs.webkit.org/show_bug.cgi?id=47445
796 Remove unused function WTFThreadData::initializeIdentifierTable()
798 * wtf/WTFThreadData.h:
800 2010-10-08 Michael Saboff <msaboff@apple.com>
802 Reviewed by Darin Adler.
804 Added check to start of subexpression being positive before using
805 subexpression in replacement.
806 https://bugs.webkit.org/show_bug.cgi?id=47324
808 * runtime/StringPrototype.cpp:
809 (JSC::substituteBackreferencesSlow):
811 2010-10-08 Chris Evans <cevans@google.com>
813 Reviewed by David Levin.
815 https://bugs.webkit.org/show_bug.cgi?id=47393
817 Use unsigned consistently to check for max StringImpl length.
818 Add a few integer overflow checks.
819 Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
821 * wtf/text/WTFString.cpp:
822 * wtf/text/StringImpl.h:
823 * wtf/text/StringImpl.cpp:
824 Better use of size_t vs. unsigned; check for integer overflows.
826 2010-10-07 David Goodwin <david_goodwin@apple.com>
828 Reviewed by Oliver Hunt.
830 ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
831 https://bugs.webkit.org/show_bug.cgi?id=47356
833 * assembler/ARMv7Assembler.h:
835 2010-10-06 Chris Evans <cevans@google.com>
837 Reviewed by David Levin.
839 https://bugs.webkit.org/show_bug.cgi?id=47248
841 Use size_t consistently in CString, to prevent theoretical trouble
842 with > 4GB strings on 64-bit platforms.
844 * wtf/text/CString.h:
845 * wtf/text/CString.cpp:
846 Use size_t for string lengths.
848 (WTF::expectMD5): use suitable format string + cast for size_t.
849 * JavaScriptCore.exp:
852 2010-10-06 Anders Carlsson <andersca@apple.com>
854 Reviewed by Sam Weinig.
856 Start cleaning up Arguments.h
857 https://bugs.webkit.org/show_bug.cgi?id=47304
860 * wtf/TypeTraits.cpp:
861 Add RemoveReference type trait.
863 2010-10-06 Rafael Antognolli <antognolli@profusion.mobi>
865 Unreviewed build fix.
867 [EFL] Build fix for glib support.
868 https://bugs.webkit.org/show_bug.cgi?id=47221
870 If compiling with GLib support enabled, we also need to link wtf against
873 * wtf/CMakeListsEfl.txt:
875 2010-10-05 Kwang Yul Seo <skyul@company100.net>
877 Reviewed by Gavin Barraclough.
879 [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
880 https://bugs.webkit.org/show_bug.cgi?id=47117
882 Use IMemCache1 to flush data cache and invalidate instruction cache.
884 * jit/ExecutableAllocator.h:
885 (JSC::ExecutableAllocator::cacheFlush):
887 2010-10-05 Leandro Pereira <leandro@profusion.mobi>
889 Unreviewed. Build fix.
891 Moved "jsc" directory to "shell", so that the name does not clash with the
892 JavaScriptCore shell in some build systems.
893 http://webkit.org/b/47049
895 * CMakeLists.txt: Changed reference from "jsc" to "shell".
897 * jsc/CMakeLists.txt: Removed.
898 * jsc/CMakeListsEfl.txt: Removed.
899 * shell: Copied from JavaScriptCore/jsc.
901 2010-10-05 Kwang Yul Seo <skyul@company100.net>
903 Reviewed by Kent Tamura.
905 [BREWMP] Use PlatformRefPtr in randomNumber
906 https://bugs.webkit.org/show_bug.cgi?id=46989
908 Use PlatformRefPtr to free memory automatically.
910 * wtf/RandomNumber.cpp:
913 2010-10-05 Oliver Hunt <oliver@apple.com>
915 Reviewed by Darin Adler.
917 REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
918 https://bugs.webkit.org/show_bug.cgi?id=46690
920 Use the correct register value when initialising the arguments
921 object in the interpreter. This is covered by existing tests.
923 * interpreter/Interpreter.cpp:
924 (JSC::Interpreter::privateExecute):
926 2010-10-04 David Goodwin <david_goodwin@apple.com>
928 Reviewed by Oliver Hunt.
930 ARMv7 JIT should take advantage of 2-byte branches to reduce code size
931 https://bugs.webkit.org/show_bug.cgi?id=47007
933 * assembler/ARMv7Assembler.cpp:
934 * assembler/ARMv7Assembler.h:
935 (JSC::ARMv7Assembler::computeJumpType):
936 (JSC::ARMv7Assembler::link):
937 (JSC::ARMv7Assembler::canBeJumpT2):
938 (JSC::ARMv7Assembler::canBeJumpT4):
939 (JSC::ARMv7Assembler::linkBX):
940 (JSC::ARMv7Assembler::linkJumpT4):
941 (JSC::ARMv7Assembler::linkJumpT2):
942 (JSC::ARMv7Assembler::linkJumpAbsolute):
944 2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
946 Reviewed by Antonio Gomes.
948 [EFL] Use fast malloc for WebKit EFL
949 https://bugs.webkit.org/show_bug.cgi?id=46691
951 Use fast malloc for WebKit EFL because the fast malloc is to allocate
954 * wtf/CMakeListsEfl.txt:
956 2010-10-04 Oliver Hunt <oliver@apple.com>
958 Reviewed by Geoff Garen.
960 Lazily create activation objects
961 https://bugs.webkit.org/show_bug.cgi?id=47107
963 Make it possible to lazily create the activation object
964 for a function that needs one. This allows us to reduce
965 the overhead of entering a function that may require
966 an activation in some cases, but not always.
968 This does make exception handling a little more complex as
969 it's now necessary to verify that a callframes activation
970 has been created, and create it if not, in all of the
971 paths used in exception handling.
973 We also need to add logic to check for the existence of
974 the activation in the scoped_var opcodes, as well as
975 op_ret, op_ret_object_or_this and op_tearoff_activation
976 so that we can avoid creating an activation unnecesarily
979 * bytecode/CodeBlock.cpp:
980 (JSC::CodeBlock::dump):
981 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
982 (JSC::CodeBlock::createActivation):
983 * bytecode/CodeBlock.h:
984 (JSC::CodeBlock::setActivationRegister):
985 (JSC::CodeBlock::activationRegister):
987 * bytecompiler/BytecodeGenerator.cpp:
988 (JSC::BytecodeGenerator::BytecodeGenerator):
989 (JSC::BytecodeGenerator::emitNewFunctionInternal):
990 (JSC::BytecodeGenerator::emitNewFunctionExpression):
991 (JSC::BytecodeGenerator::createActivationIfNecessary):
992 * bytecompiler/BytecodeGenerator.h:
993 * interpreter/Interpreter.cpp:
994 (JSC::Interpreter::resolveSkip):
995 (JSC::Interpreter::resolveGlobalDynamic):
996 (JSC::Interpreter::resolveBase):
997 (JSC::Interpreter::unwindCallFrame):
998 (JSC::Interpreter::throwException):
999 (JSC::Interpreter::privateExecute):
1001 (JSC::JIT::privateCompileMainPass):
1003 * jit/JITCall32_64.cpp:
1004 (JSC::JIT::emit_op_ret):
1005 (JSC::JIT::emit_op_ret_object_or_this):
1006 * jit/JITOpcodes.cpp:
1007 (JSC::JIT::emit_op_end):
1008 (JSC::JIT::emit_op_get_scoped_var):
1009 (JSC::JIT::emit_op_put_scoped_var):
1010 (JSC::JIT::emit_op_tear_off_activation):
1011 (JSC::JIT::emit_op_ret):
1012 (JSC::JIT::emit_op_ret_object_or_this):
1013 (JSC::JIT::emit_op_create_activation):
1014 (JSC::JIT::emit_op_resolve_global_dynamic):
1015 * jit/JITOpcodes32_64.cpp:
1016 (JSC::JIT::emit_op_get_scoped_var):
1017 (JSC::JIT::emit_op_put_scoped_var):
1018 (JSC::JIT::emit_op_tear_off_activation):
1019 (JSC::JIT::emit_op_create_activation):
1021 (JSC::DEFINE_STUB_FUNCTION):
1023 2010-10-04 Adam Barth <abarth@webkit.org>
1025 Reviewed by Sam Weinig.
1027 Remove ENABLE_SANDBOX
1028 https://bugs.webkit.org/show_bug.cgi?id=47032
1030 * Configurations/FeatureDefines.xcconfig:
1032 2010-10-01 Pratik Solanki <psolanki@apple.com>
1034 Reviewed by Geoffrey Garen.
1035 Specify ALWAYS_INLINE at function declaration not function definition
1036 https://bugs.webkit.org/show_bug.cgi?id=46960
1038 For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
1040 * bytecompiler/BytecodeGenerator.h:
1041 * wtf/FastMalloc.cpp:
1043 2010-10-01 Kwang Yul Seo <skyul@company100.net>
1047 [BREWMP] Change Collector BLOCK_SIZE to 64KB
1048 https://bugs.webkit.org/show_bug.cgi?id=46436
1050 Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
1052 * runtime/Collector.h:
1054 2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
1056 Reviewed by Andreas Kling.
1058 [Qt] Stack overflow on symbian platform.
1059 https://bugs.webkit.org/show_bug.cgi?id=40598
1061 Move big allocation in arrayProtoFuncToString from stack to heap.
1062 JSC::arrayProtoFuncToString function can be called recursivly and
1063 1K allocation on stack cahse stack overflow.
1064 Can be useful for other platforms with limited stack size.
1066 * runtime/ArrayPrototype.cpp:
1067 (JSC::arrayProtoFuncToString):
1069 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1071 Reviewed by Kent Tamura.
1073 [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
1074 https://bugs.webkit.org/show_bug.cgi?id=46373
1076 A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
1077 to wrap the instance in PlatformRefPtr.
1079 * wtf/brew/ShellBrew.h:
1080 (WTF::createRefPtrInstance):
1082 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1084 Reviewed by Kent Tamura.
1086 [BREWMP] Port PlatformRefPtr
1087 https://bugs.webkit.org/show_bug.cgi?id=46370
1089 Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
1091 * wtf/brew/RefPtrBrew.h: Added.
1092 (WTF::refPlatformPtr):
1093 (WTF::derefPlatformPtr):
1095 2010-09-29 Sam Weinig <sam@webkit.org>
1097 Reviewed by Darin Adler.
1099 Add additional checks to StringBuffer.
1100 <rdar://problem/7756381>
1102 * wtf/text/StringBuffer.h:
1103 (WTF::StringBuffer::StringBuffer):
1104 (WTF::StringBuffer::resize):
1106 2010-09-30 Chris Marrin <cmarrin@apple.com>
1108 Reviewed by Simon Fraser.
1110 Make 2D accelerated canvas rendering build on Mac
1111 https://bugs.webkit.org/show_bug.cgi?id=46007
1113 Added ACCELERATED_2D_CANVAS to FeatureDefines
1115 * Configurations/FeatureDefines.xcconfig:
1117 2010-09-30 Kevin Ollivier <kevino@theolliviers.com>
1119 [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
1120 the copy so as not to alter global settings.
1124 2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu>
1126 Reviewed by Gavin Barraclough.
1128 The case-insensitivity backreference checking isn't working with YARR
1130 https://bugs.webkit.org/show_bug.cgi?id=46882
1132 Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
1134 * yarr/RegexInterpreter.cpp:
1135 (JSC::Yarr::Interpreter::tryConsumeBackReference):
1137 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1139 Reviewed by Andreas Kling.
1141 [BREWMP] Leave initializeRandomNumberGenerator empty.
1142 https://bugs.webkit.org/show_bug.cgi?id=46851
1144 On Brew MP, AEECLSID_RANDOM initializes itself.
1146 * wtf/RandomNumberSeed.h:
1147 (WTF::initializeRandomNumberGenerator):
1149 2010-09-30 Gabor Loki <loki@webkit.org>
1151 Reviewed by Csaba Osztrogonác.
1153 Remove unnecessary cacheFlush calls from Thumb-2
1154 https://bugs.webkit.org/show_bug.cgi?id=46702
1156 * assembler/ARMv7Assembler.h:
1157 (JSC::ARMv7Assembler::relinkCall):
1158 (JSC::ARMv7Assembler::repatchInt32):
1159 (JSC::ARMv7Assembler::repatchPointer):
1161 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1165 Next try to fix cygwin build.
1167 * wtf/Assertions.cpp:
1169 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1173 Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
1175 * wtf/Assertions.cpp:
1177 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1181 Build fix for cygwin.
1183 * wtf/Assertions.cpp:
1185 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1187 Reviewed by Andreas Kling.
1189 [WINCE] Buildfix for Assertions.cpp after r68511.
1190 https://bugs.webkit.org/show_bug.cgi?id=46807
1192 Some, but not all WinCE environments have support for IsDebuggerPresent().
1193 Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
1194 HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
1196 * wtf/Assertions.cpp:
1199 2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu>
1201 Reviewed by Csaba Osztrogonác.
1203 JSC compile fails on 32bit platform when Regexp Tracing is enabled
1204 https://bugs.webkit.org/show_bug.cgi?id=46713
1206 Fix the cast of pointer in regexp tracing to avoid the warning.
1208 * runtime/RegExp.cpp:
1209 (JSC::RegExp::match):
1211 2010-09-28 Anders Carlsson <andersca@apple.com>
1213 Reviewed by Sam Weinig.
1215 Begin hooking up painting in the plug-in process
1216 https://bugs.webkit.org/show_bug.cgi?id=46766
1218 * JavaScriptCore.exp:
1219 Add tryFastRealloc, used by WebKit2.
1221 2010-09-28 Philippe Normand <pnormand@igalia.com>
1223 Reviewed by Martin Robinson.
1225 Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
1226 https://bugs.webkit.org/show_bug.cgi?id=46721
1228 Enable GOwnPtr/GRefPtr build only if glib support has been
1229 explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
1231 * wtf/gobject/GOwnPtr.cpp:
1232 * wtf/gobject/GOwnPtr.h:
1233 * wtf/gobject/GRefPtr.cpp:
1234 * wtf/gobject/GRefPtr.h:
1236 2010-09-28 İsmail Dönmez <ismail@namtrac.org>
1238 Reviewed by Andreas Kling.
1240 Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
1241 Remove reference to unexisting path JavaScriptCore/os-wince.
1243 * JavaScriptCore.pri:
1244 * wtf/Assertions.cpp:
1246 2010-09-27 Michael Saboff <msaboff@apple.com>
1248 Reviewed by Geoffrey Garen.
1250 Changed the initialization of JSArray objects to have space for
1251 3 elements for the constructor that takes a ArgList argument.
1252 This improves v8-deltablue performance by about 2.8% by reducing
1253 the number of realloc() calls.
1254 https://bugs.webkit.org/show_bug.cgi?id=46664
1256 * runtime/JSArray.cpp:
1257 (JSC::JSArray::JSArray):
1259 2010-09-27 Gavin Barraclough <barraclough@apple.com>
1261 Reviewed by Darin Adler.
1263 Bug 46680 - Inlining string concatenation can regress interpreter performance
1264 <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
1265 Do not inline calls to string concatenation in the interpret loop.
1267 * interpreter/Interpreter.cpp:
1268 (JSC::concatenateStrings):
1269 (JSC::Interpreter::privateExecute):
1271 2010-09-27 Anders Carlsson <andersca@apple.com>
1277 2010-09-27 Anders Carlsson <andersca@apple.com>
1279 Reviewed by Adam Roben.
1281 Try to fix Windows build.
1284 (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
1285 (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
1287 2010-09-27 Erik Arvidsson <arv@chromium.org>
1289 Reviewed by Darin Adler.
1291 Add operator == for AtomicString and Vector<Uchar>
1292 https://bugs.webkit.org/show_bug.cgi?id=46509
1294 * JavaScriptCore.exp:
1295 * wtf/text/AtomicString.cpp:
1297 * wtf/text/AtomicString.h:
1301 2010-09-27 Anders Carlsson <andersca@apple.com>
1303 Try to fix the Windows build.
1305 * wtf/Noncopyable.h:
1307 2010-09-26 Anders Carlsson <andersca@apple.com>
1309 Reviewed by Alexey Proskuryakov and Adam Barth.
1311 Add WTF_MAKE_NONCOPYABLE macro
1312 https://bugs.webkit.org/show_bug.cgi?id=46589
1314 Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
1315 reason for this is that the Itanium C++ ABI states that no empty classes of the same type
1316 can be laid out at the same offset in the class. This can result in objects getting larger
1317 which leads to memory regressions. (One example of this is the String class which grew by
1318 sizeof(void*) when both its base class and its first member variable inherited indirectly
1319 from FastAllocBase).
1321 * wtf/Noncopyable.h:
1322 Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
1326 Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
1328 2010-09-27 Philippe Normand <pnormand@igalia.com>
1330 Reviewed by Martin Robinson.
1332 [GTK] use ENABLE(GLIB_SUPPORT)
1333 https://bugs.webkit.org/show_bug.cgi?id=46630
1335 * wtf/Platform.h: Include GTypedefs.h only if glib support
1336 is explicitly enabled.
1338 2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com>
1340 Reviewed by Adam Barth.
1342 jsc: Document the strcat opcode.
1343 https://bugs.webkit.org/show_bug.cgi?id=46571
1345 * interpreter/Interpreter.cpp:
1346 (JSC::Interpreter::privateExecute):
1348 2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com>
1350 Reviewed by Adam Barth.
1352 make-bytecode-docs.pl: Add a comment to the generated HTML
1353 https://bugs.webkit.org/show_bug.cgi?id=46570
1355 Generate an HTML Comment that this file was generated from
1356 Interpreter.cpp with the make-bytecode-docs.pl script.
1358 * docs/make-bytecode-docs.pl:
1360 2010-09-27 Patrick Gansterer <paroga@webkit.org>
1362 Reviewed by Adam Barth.
1364 Remove WTF::stringHash functions
1365 https://bugs.webkit.org/show_bug.cgi?id=46520
1367 Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
1368 So use StringHasher::createHash directly and remove stringHash.
1370 * wtf/StringHashFunctions.h:
1371 * wtf/text/StringImpl.h:
1372 (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
1374 2010-09-26 Patrick Gansterer <paroga@webkit.org>
1376 Reviewed by Adam Barth.
1378 Add WTF::StringHasher::createBlobHash
1379 https://bugs.webkit.org/show_bug.cgi?id=46514
1381 Add this function for hashing FormElementKey and QualifiedNameComponents.
1383 * wtf/StringHashFunctions.h:
1384 (WTF::StringHasher::createBlobHash):
1386 2010-09-26 Patrick Gansterer <paroga@webkit.org>
1388 Reviewed by Adam Barth.
1390 REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
1391 running websocket/tests/bad-sub-protocol-non-ascii.html
1392 https://bugs.webkit.org/show_bug.cgi?id=46553
1394 Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
1395 Add an additional member variable to indicate if we have an pending character
1396 instead of only using an invalid character for this purpose.
1398 * wtf/StringHashFunctions.h:
1399 (WTF::StringHasher::StringHasher):
1400 (WTF::StringHasher::addCharacters):
1401 (WTF::StringHasher::addCharacter):
1402 (WTF::StringHasher::hash):
1404 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
1406 Reviewed by Oliver Hunt.
1408 valueOf called in wrong order in atan2 and date constructors.
1409 https://bugs.webkit.org/show_bug.cgi?id=26978
1411 Fixed the bug where the arguments to atan2 were being evaluated
1414 * runtime/MathObject.cpp:
1415 (JSC::mathProtoFuncATan2):
1417 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
1419 Reviewed by Oliver Hunt.
1421 valueOf called in wrong order in atan2 and date constructors.
1422 https://bugs.webkit.org/show_bug.cgi?id=26978
1424 Fixed the issue where the parameters to the Date constructor
1425 were being evaluated to numbers more than once.
1427 * runtime/DateConstructor.cpp:
1428 (JSC::constructDate):
1431 2010-09-25 Oliver Hunt <oliver@apple.com>
1435 Relearning the lesson that last minute changes are bad.
1437 * bytecode/CodeBlock.cpp:
1438 (JSC::CodeBlock::dump):
1439 * bytecompiler/BytecodeGenerator.cpp:
1440 (JSC::BytecodeGenerator::emitGetArgumentsLength):
1441 * jit/JITOpcodes.cpp:
1442 (JSC::JIT::emitSlow_op_get_argument_by_val):
1444 2010-09-25 Oliver Hunt <oliver@apple.com>
1446 Reviewed by Cameron Zwarich.
1448 Avoid constructing arguments object when accessing length and index properties
1449 https://bugs.webkit.org/show_bug.cgi?id=46572
1451 Add opcodes to read argument length and properties, and then implement them.
1452 Much like other lazy opcodes these opcodes take a fast path when the arguments
1453 object has not been instantiated, and fall back on generic access mechanisms
1454 if they are acting on an instantiated object.
1456 3% win on v8-earleyboyer, no change elsewhere.
1458 * bytecode/CodeBlock.cpp:
1459 (JSC::CodeBlock::dump):
1460 * bytecode/Opcode.h:
1461 * bytecompiler/BytecodeGenerator.cpp:
1462 (JSC::BytecodeGenerator::emitGetArgumentsLength):
1463 (JSC::BytecodeGenerator::emitGetArgumentByVal):
1464 * bytecompiler/BytecodeGenerator.h:
1465 * bytecompiler/NodesCodegen.cpp:
1466 (JSC::BracketAccessorNode::emitBytecode):
1467 (JSC::DotAccessorNode::emitBytecode):
1468 * interpreter/Interpreter.cpp:
1469 (JSC::Interpreter::privateExecute):
1471 (JSC::JIT::privateCompileMainPass):
1472 (JSC::JIT::privateCompileSlowCases):
1474 * jit/JITOpcodes.cpp:
1475 (JSC::JIT::emit_op_get_arguments_length):
1476 (JSC::JIT::emitSlow_op_get_arguments_length):
1477 (JSC::JIT::emit_op_get_argument_by_val):
1478 (JSC::JIT::emitSlow_op_get_argument_by_val):
1479 * jit/JITOpcodes32_64.cpp:
1480 (JSC::JIT::emit_op_get_arguments_length):
1481 (JSC::JIT::emitSlow_op_get_arguments_length):
1482 (JSC::JIT::emit_op_get_argument_by_val):
1483 (JSC::JIT::emitSlow_op_get_argument_by_val):
1485 2010-09-25 Patrick Gansterer <paroga@webkit.org>
1489 Fix typo in StringHasher class
1490 https://bugs.webkit.org/show_bug.cgi?id=45970
1492 * wtf/StringHashFunctions.h:
1493 (WTF::StringHasher::createHash):
1495 2010-09-24 Patrick Gansterer <paroga@paroga.com>
1497 Reviewed by Gavin Barraclough.
1499 Add WTF::StringHasher
1500 https://bugs.webkit.org/show_bug.cgi?id=45970
1502 StringHasher is a class for calculation stringHash out of character string.
1503 This class will unify the different usages of the same algorithm.
1505 * wtf/StringHashFunctions.h:
1506 (WTF::StringHasher::StringHasher):
1507 (WTF::StringHasher::addCharacters):
1508 (WTF::StringHasher::addCharacter):
1509 (WTF::StringHasher::hash):
1510 (WTF::StringHasher::createHash):
1511 (WTF::StringHasher::defaultCoverter):
1512 (WTF::StringHasher::addCharactersToHash):
1515 2010-09-24 Oliver Hunt <oliver@apple.com>
1517 Reviewed by Geoffrey Garen.
1519 Variable declarations inside a catch scope don't get propogated to the parent scope
1520 https://bugs.webkit.org/show_bug.cgi?id=46501
1522 Add logic to make variable declaration look for a scope for the
1523 new variable. This allows us to create a scope (eg. for catch)
1524 and then seal it, so that additional variable declarations
1525 contained are propogated to the correct target. Strangely this
1526 comes out as a performance win, but I think it's mostly cache
1529 * parser/JSParser.cpp:
1530 (JSC::JSParser::Scope::Scope):
1531 (JSC::JSParser::Scope::preventNewDecls):
1532 (JSC::JSParser::Scope::allowsNewDecls):
1533 (JSC::JSParser::declareVariable):
1534 (JSC::JSParser::parseVarDeclarationList):
1535 (JSC::JSParser::parseConstDeclarationList):
1536 (JSC::JSParser::parseTryStatement):
1537 (JSC::JSParser::parseFormalParameters):
1538 (JSC::JSParser::parseFunctionDeclaration):
1540 2010-09-24 İsmail Dönmez <ismail@namtrac.org>
1542 Reviewed by Csaba Osztrogonác.
1544 Add a Windows compatible inttypes.h header to fix WinCE build.
1545 https://bugs.webkit.org/show_bug.cgi?id=46463
1547 * os-win32/inttypes.h: Added.
1549 2010-09-24 Oliver Hunt <oliver@apple.com>
1551 Reviewed by Gavin Barraclough.
1553 REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
1554 https://bugs.webkit.org/show_bug.cgi?id=46448
1556 Roll this back in, with additional logic to prevent us from delaying construction
1557 of functions named "arguments"
1559 * bytecode/CodeBlock.cpp:
1560 (JSC::CodeBlock::dump):
1561 * bytecode/Opcode.h:
1562 * bytecompiler/BytecodeGenerator.cpp:
1563 (JSC::BytecodeGenerator::BytecodeGenerator):
1564 (JSC::BytecodeGenerator::emitInitLazyRegister):
1565 (JSC::BytecodeGenerator::registerFor):
1566 (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
1567 (JSC::BytecodeGenerator::constRegisterFor):
1568 (JSC::BytecodeGenerator::emitNewFunction):
1569 (JSC::BytecodeGenerator::emitLazyNewFunction):
1570 (JSC::BytecodeGenerator::emitNewFunctionInternal):
1571 * bytecompiler/BytecodeGenerator.h:
1572 * interpreter/Interpreter.cpp:
1573 (JSC::Interpreter::privateExecute):
1575 (JSC::JIT::privateCompileMainPass):
1577 * jit/JITOpcodes.cpp:
1578 (JSC::JIT::emit_op_init_lazy_reg):
1579 (JSC::JIT::emit_op_new_func):
1580 * jit/JITOpcodes32_64.cpp:
1581 (JSC::JIT::emit_op_init_lazy_reg):
1583 (JSC::ScopeNode::needsActivationForMoreThanVariables):
1585 2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com>
1587 Unreviewed, rolling out r68223.
1588 http://trac.webkit.org/changeset/68223
1589 https://bugs.webkit.org/show_bug.cgi?id=46448
1591 It broke 2-3 tests on bots (Requested by Ossy on #webkit).
1593 * bytecode/CodeBlock.cpp:
1594 (JSC::CodeBlock::dump):
1595 * bytecode/Opcode.h:
1596 * bytecompiler/BytecodeGenerator.cpp:
1597 (JSC::BytecodeGenerator::BytecodeGenerator):
1598 (JSC::BytecodeGenerator::registerFor):
1599 (JSC::BytecodeGenerator::constRegisterFor):
1600 (JSC::BytecodeGenerator::emitNewFunction):
1601 * bytecompiler/BytecodeGenerator.h:
1602 * interpreter/Interpreter.cpp:
1603 (JSC::Interpreter::privateExecute):
1605 (JSC::JIT::privateCompileMainPass):
1607 * jit/JITOpcodes.cpp:
1608 (JSC::JIT::emit_op_new_func):
1609 (JSC::JIT::emit_op_init_arguments):
1610 * jit/JITOpcodes32_64.cpp:
1611 (JSC::JIT::emit_op_new_func):
1612 (JSC::JIT::emit_op_init_arguments):
1615 2010-09-23 Oliver Hunt <oliver@apple.com>
1617 Reviewed by Geoffrey Garen.
1619 Delay construction of functions that aren't captured
1620 https://bugs.webkit.org/show_bug.cgi?id=46433
1622 If a function isn't captured by an activation there's no
1623 way it can be accessed indirectly, so we can delay the
1624 construction until it's used (similar to what we do with
1625 arguments). We rename the existing op_init_arguments to
1626 op_init_lazy_reg and removed its implicit handling of
1627 the anonymous argument register, and make op_new_function
1628 take a parameter to indicate whether it should null check
1629 the target slot before creating the function object.
1631 * bytecode/CodeBlock.cpp:
1632 (JSC::CodeBlock::dump):
1633 * bytecode/Opcode.h:
1634 * bytecompiler/BytecodeGenerator.cpp:
1635 (JSC::BytecodeGenerator::BytecodeGenerator):
1636 (JSC::BytecodeGenerator::emitInitLazyRegister):
1637 (JSC::BytecodeGenerator::registerFor):
1638 (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
1639 (JSC::BytecodeGenerator::constRegisterFor):
1640 (JSC::BytecodeGenerator::emitNewFunction):
1641 (JSC::BytecodeGenerator::emitLazyNewFunction):
1642 (JSC::BytecodeGenerator::emitNewFunctionInternal):
1643 * bytecompiler/BytecodeGenerator.h:
1644 * interpreter/Interpreter.cpp:
1645 (JSC::Interpreter::privateExecute):
1647 (JSC::JIT::privateCompileMainPass):
1649 * jit/JITOpcodes.cpp:
1650 (JSC::JIT::emit_op_init_lazy_reg):
1651 (JSC::JIT::emit_op_new_func):
1652 * jit/JITOpcodes32_64.cpp:
1653 (JSC::JIT::emit_op_init_lazy_reg):
1655 (JSC::ScopeNode::needsActivationForMoreThanVariables):
1657 2010-09-23 David Kilzer <ddkilzer@apple.com>
1659 <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
1660 https://bugs.webkit.org/show_bug.cgi?id=46423
1662 Reviewed by Oliver Hunt.
1664 * interpreter/Interpreter.cpp:
1665 (JSC::Interpreter::privateExecute): Disable the gcc computed
1666 goto hacks added in r55564 when compiling with llvm-gcc-4.2.
1668 2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
1670 Reviewed by Darin Adler.
1672 Fix usage of enum as if it was a define
1673 https://bugs.webkit.org/show_bug.cgi?id=46355
1675 pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
1676 enum. Hence, it cannot be used by the preprocessor which always
1677 evaluates that condition as true. This was giving a warning when
1678 compiling with gcc and "-Wundef" flag.
1680 The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
1681 PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
1682 and get rid of that #if.
1684 * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
1685 set mutex type to PTHREAD_MUTEX_NORMAL.
1686 (WTF::Mutex::Mutex):
1688 2010-09-23 Michael Saboff <msaboff@apple.com>
1690 Reviewed by Geoffrey Garen.
1692 Removed extraneous truncation of ovector on entry and error exit.
1693 Changed the initialization to -1 of vector to only initialize
1694 the start indecies, which is sufficient for the pattern/subpatterns.
1695 Changed the JIT code to not clear the end index for subpatterns
1696 as it isn't needed. These changes are worth ~2.7% on v8-regexp.
1697 https://bugs.webkit.org/show_bug.cgi?id=46404
1699 * runtime/RegExp.cpp:
1700 (JSC::RegExp::match):
1701 * yarr/RegexJIT.cpp:
1702 (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1704 2010-09-22 Oliver Hunt <oliver@apple.com>
1706 Reviewed by Geoff Garen.
1708 Only copy captured variables into activation
1709 https://bugs.webkit.org/show_bug.cgi?id=46330
1711 We now track free variable information which means that
1712 we no longer need to copy every variable defined in a
1713 function. With this patch activations only retain those
1714 variables needed for correctness. In order to interact
1715 safely with the inspector this means that JSActivation
1716 now provides its own lookup functions so it can avoid
1717 trying to read or write to variables that have been
1720 * bytecode/CodeBlock.h:
1721 * bytecompiler/BytecodeGenerator.cpp:
1722 (JSC::BytecodeGenerator::BytecodeGenerator):
1724 (JSC::ScopeNode::capturedVariableCount):
1725 (JSC::ScopeNode::captures):
1726 * runtime/Arguments.h:
1727 (JSC::JSActivation::copyRegisters):
1728 * runtime/Executable.cpp:
1729 (JSC::FunctionExecutable::FunctionExecutable):
1730 (JSC::FunctionExecutable::compileForCallInternal):
1731 (JSC::FunctionExecutable::compileForConstructInternal):
1732 * runtime/Executable.h:
1733 (JSC::FunctionExecutable::capturedVariableCount):
1734 * runtime/JSActivation.cpp:
1735 (JSC::JSActivation::markChildren):
1736 (JSC::JSActivation::symbolTableGet):
1737 (JSC::JSActivation::symbolTablePut):
1738 (JSC::JSActivation::getOwnPropertyNames):
1739 (JSC::JSActivation::symbolTablePutWithAttributes):
1740 * runtime/JSActivation.h:
1742 2010-09-23 Ismail Donmez <ismail@namtrac.org>
1744 Reviewed by Andreas Kling.
1746 Fix jsc.exe build for Windows CE
1748 * jsc.pro: Add mmtimer.lib for Windows CE.
1750 2010-09-23 Ismail Donmez <ismail@namtrac.org>
1754 JIT should be disabled on Windows CE. Broken in r64176.
1758 2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu>
1760 Reviewed by Gavin Barraclough.
1762 Reduce the number of BOL checks in YARR Interpreter
1763 https://bugs.webkit.org/show_bug.cgi?id=46260
1765 Extend the YARR Interpreter with an optimization which reduces the number of
1766 BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
1767 "TypeAssertionBOL" byteTerm it will be checked just one time.
1769 * yarr/RegexInterpreter.cpp:
1770 (JSC::Yarr::Interpreter::matchDisjunction):
1771 (JSC::Yarr::ByteCompiler::compile):
1772 (JSC::Yarr::ByteCompiler::regexBegin):
1773 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1774 (JSC::Yarr::ByteCompiler::emitDisjunction):
1775 * yarr/RegexInterpreter.h:
1776 (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
1777 (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
1778 (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
1779 (JSC::Yarr::ByteTerm::AlternativeBegin):
1780 (JSC::Yarr::ByteTerm::AlternativeDisjunction):
1781 (JSC::Yarr::ByteTerm::AlternativeEnd):
1783 2010-09-22 Michael Saboff <msaboff@apple.com>
1785 Reviewed by Gavin Barraclough.
1787 Fixed the cross over from alternatives executed once and
1788 those that loop. This fixed the problem where the index
1789 was getting messed up for looping alternatives causing an
1791 https://bugs.webkit.org/show_bug.cgi?id=46189
1793 * yarr/RegexJIT.cpp:
1794 (JSC::Yarr::RegexGenerator::generateDisjunction):
1796 2010-09-22 Steve Falkenburg <sfalken@apple.com>
1798 Rubber stamped by Jon Honeycutt.
1800 Allow jsc.exe to be run against unversioned ICU.
1802 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1804 2010-09-22 Kwang Yul Seo <skyul@company100.net>
1806 Reviewed by Laszlo Gombos.
1808 Use "typedef wchar_t JSChar" when compiled with RVCT
1809 https://bugs.webkit.org/show_bug.cgi?id=40651
1811 Use wchar_t for JSChar and UChar when compiled with RVCT.
1812 Linux is the exception for this rule.
1814 * API/JSStringRef.h:
1815 * wtf/unicode/qt4/UnicodeQt4.h:
1817 2010-09-22 Oliver Hunt <oliver@apple.com>
1819 Reviewed by Gavin Barraclough.
1821 [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
1822 https://bugs.webkit.org/show_bug.cgi?id=44245
1824 Remove incorrect code from op_load_varargs in the interpreter.
1826 * interpreter/Interpreter.cpp:
1827 (JSC::Interpreter::privateExecute):
1829 2010-09-22 Oliver Hunt <oliver@apple.com>
1831 Reviewed by Gavin Barraclough.
1833 [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
1834 https://bugs.webkit.org/show_bug.cgi?id=44246
1836 JIT code generated for instanceof was not checking to ensure that the prototype property was
1837 an object, this patch ensures that it does.
1839 * jit/JITOpcodes.cpp:
1840 (JSC::JIT::emit_op_instanceof):
1841 (JSC::JIT::emitSlow_op_instanceof):
1842 * jit/JITOpcodes32_64.cpp:
1843 (JSC::JIT::emit_op_instanceof):
1844 (JSC::JIT::emitSlow_op_instanceof):
1846 2010-09-22 Patrick Gansterer <paroga@webkit.org>
1848 Reviewed by Darin Adler.
1850 Inline UTF8SequenceLength
1851 https://bugs.webkit.org/show_bug.cgi?id=45589
1853 * wtf/unicode/UTF8.cpp:
1854 (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
1856 2010-09-21 Oliver Hunt <oliver@apple.com>
1858 RS=Gavin Barraclough.
1860 Fix codeblock dumping
1862 * bytecode/CodeBlock.cpp:
1863 (JSC::CodeBlock::dump):
1864 * runtime/Executable.h:
1865 (JSC::ScriptExecutable::ScriptExecutable):
1867 2010-09-21 Oliver Hunt <oliver@apple.com>
1869 Reviewed by Geoffrey Garen.
1871 Speed up function.apply(..., arguments)
1872 https://bugs.webkit.org/show_bug.cgi?id=46207
1874 Add code to do argument copying inline in the case
1875 where we're using Function.apply to forward our arguments
1879 (JSC::JIT::privateCompileSlowCases):
1880 Splitted op_load_varargs into fast and slow paths, so add the call
1881 to the slow path generator.
1883 * jit/JITCall32_64.cpp:
1884 Remove 32bit specific emit_op_load_varargs as the logic is the
1885 same for all value representations
1886 * jit/JITOpcodes.cpp:
1887 (JSC::JIT::emit_op_load_varargs):
1888 Copy arguments inline
1889 (JSC::JIT::emitSlow_op_load_varargs):
1891 2010-09-21 Geoffrey Garen <ggaren@apple.com>
1893 Reviewed by Oliver Hunt.
1895 <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
1896 interpreter due to 54724 and 54596
1898 Fixed a typo (using "UNLIKELY" instead of "LIKELY").
1901 (WTF::refIfNotNull):
1902 (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
1903 hold real data. Also, in cases where they do not hold real data, the
1904 compiler usually sees a call to release() right before the call to the
1905 destructor, so it can probably optimize out the test completely.
1907 2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch>
1909 Reviewed by Martin Robinson.
1911 Build issues with Windows versions of the GTK+ port
1912 https://bugs.webkit.org/show_bug.cgi?id=45844
1914 Link with winmm.dll when necessary and specify the executable extension
1915 explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
1916 rule actually works.
1918 Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
1919 a section in ThreadSpecific.cpp
1923 2010-09-21 Martin Robinson <mrobinson@igalia.com>
1925 Reviewed by Xan Lopez.
1927 [GTK] 'make dist' should be fixed in preparation for the next release
1928 https://bugs.webkit.org/show_bug.cgi?id=46129
1930 * GNUmakefile.am: Update the sources list to include missing headers.
1932 2010-09-21 Dave Tapuska <dtapuska@rim.com>
1934 Reviewed by Csaba Osztrogonác.
1936 https://bugs.webkit.org/show_bug.cgi?id=45673
1938 r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
1939 8 byte aligned. A non 8 byte divisible value for this will
1940 cause the sp to become non 8 byte aligned.
1942 Verify and correct offset values that r65596 effected that
1948 2010-09-21 Xan Lopez <xlopez@igalia.com>
1950 Reviewed by Martin Robinson.
1952 Fix Opcode stats compilation
1953 https://bugs.webkit.org/show_bug.cgi?id=46079
1955 The FixedArray API had changed, and <stdio.h> was not included for
1958 * bytecode/Opcode.cpp:
1959 (JSC::OpcodeStats::~OpcodeStats):
1961 2010-09-20 Michael Saboff <msaboff@apple.com>
1963 Reviewed by Gavin Barraclough.
1965 Fixed detection of alternative smaller than the first alternative
1966 to only check looping alternatives.
1967 https://bugs.webkit.org/show_bug.cgi?id=46049
1969 * yarr/RegexJIT.cpp:
1970 (JSC::Yarr::RegexGenerator::generateDisjunction):
1972 2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu>
1974 Reviewed by Geoffrey Garen.
1976 REGRESSION(67790): jsc tests are failed with YARR interpreter
1977 https://bugs.webkit.org/show_bug.cgi?id=46083
1979 Fix the initializing of the lastSubpatternId member of
1982 * yarr/RegexCompiler.cpp:
1983 (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
1985 2010-09-20 Gavin Barraclough <barraclough@apple.com>
1987 Reviewed by Oliver Hunt.
1989 Bug 46077 - ASSERT failure in YARR JIT
1991 We will currently attempt to loop if there are multiple alternatives, they are all
1992 BOL predicated, and the last alternative is longer then the first - however if all
1993 alternatives are BOL predicated the head of loop label will not have been set, and
1994 we'll try to link a jump to an undefined label. Stop doing so.
1996 * yarr/RegexJIT.cpp:
1997 (JSC::Yarr::RegexGenerator::generateDisjunction):
1999 2010-09-20 Adam Roben <aroben@apple.com>
2001 Export RegExpObject::info from JavaScriptCore
2003 This allows obj->inherits(&RegExpObject::info) to work correctly from
2004 outside JavaScriptCore.dll on Windows.
2006 Fixes <http://webkit.org/b/46098>
2007 fast/loader/stateobjects/pushstate-object-types.html fails on Windows
2009 Reviewed by John Sullivan.
2011 * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
2012 we already have for some other classes whose info members have to be
2013 used from outside the DLL.
2015 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2017 Windows build fix pt 2.
2019 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2021 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2023 Windows build fix pt 1.
2025 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2027 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2029 Build fix - implicit double-to-int conversion invalid on 32-bit.
2031 * runtime/DatePrototype.cpp:
2032 (JSC::fillStructuresUsingDateArgs):
2033 (JSC::dateProtoFuncSetYear):
2035 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2037 Reviewed by Oliver Hunt.
2039 Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
2041 These methods implement the same conversion (see discussion in the notes
2042 of sections of 9.5 and 9.6 of the spec), only differing in how the result
2045 Date prototype is incorrectly using toInt32, and this is causing us to
2046 provide an output value indicating whether the input to ToInt32 was finite
2047 (the corresponding methods on Date are actually spec'ed to use ToInteger,
2048 not ToInt32). This patch partially fixes this in order to remove this
2049 bogus output value, hoewever more work will be require to bring Date
2050 fully up to spec compliance (the constructor is still performing ToInt32
2053 * JavaScriptCore.exp:
2054 * runtime/DatePrototype.cpp:
2055 (JSC::fillStructuresUsingTimeArgs):
2056 (JSC::fillStructuresUsingDateArgs):
2057 (JSC::dateProtoFuncSetYear):
2058 * runtime/JSValue.cpp:
2060 * runtime/JSValue.h:
2062 (JSC::JSValue::toInt32):
2063 (JSC::JSValue::toUInt32):
2065 2010-09-18 Darin Adler <darin@apple.com>
2067 First step in fixing Windows build.
2069 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2070 Removed incorrect symbol. The build will probably still fail,
2071 but the failure will tell us what symbol to add.
2073 2010-09-18 Michael Saboff <msaboff@apple.com>
2075 Reviewed by Gavin Barraclough.
2077 Added code to unroll regular expressions containing ^.
2078 Alternatives that begin with ^ are tagged during parsing
2079 and rolled up in containing sub expression structs.
2080 After parsing, a regular expression flagged as containing
2081 a ^ (a.k.a. BOL) is processed further in optimizeBOL().
2082 A copy of the disjunction is made excluding alternatives that
2083 are rooted with BOL. The original alternatives are flagged
2084 to only be executed once. The copy of the other alternatives are
2085 added to the original expression.
2086 In the case that all original alternatives are flagged, there
2087 won't be any looping alternatives.
2088 The JIT generator will emit code accordingly, executing the
2089 original alternatives once and then looping over the
2090 alternatives that aren't anchored with a BOL (if any).
2091 https://bugs.webkit.org/show_bug.cgi?id=45787
2093 * yarr/RegexCompiler.cpp:
2094 (JSC::Yarr::RegexPatternConstructor::assertionBOL):
2095 (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2096 (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
2097 (JSC::Yarr::RegexPatternConstructor::copyTerm):
2098 (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
2099 (JSC::Yarr::compileRegex):
2100 * yarr/RegexJIT.cpp:
2101 (JSC::Yarr::RegexGenerator::generateDisjunction):
2102 * yarr/RegexPattern.h:
2103 (JSC::Yarr::PatternAlternative::PatternAlternative):
2104 (JSC::Yarr::PatternAlternative::setOnceThrough):
2105 (JSC::Yarr::PatternAlternative::onceThrough):
2106 (JSC::Yarr::PatternDisjunction::PatternDisjunction):
2107 (JSC::Yarr::RegexPattern::RegexPattern):
2108 (JSC::Yarr::RegexPattern::reset):
2110 2010-09-18 Patrick Gansterer <paroga@paroga.com>
2112 Reviewed by Darin Adler.
2114 Rename Wince files to WinCE
2115 https://bugs.webkit.org/show_bug.cgi?id=37287
2117 * wtf/unicode/Unicode.h:
2118 * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
2119 * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
2120 * wtf/unicode/wince/UnicodeWince.cpp: Removed.
2121 * wtf/unicode/wince/UnicodeWince.h: Removed.
2122 * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
2123 * wtf/wince/FastMallocWince.h: Removed.
2125 2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
2127 Reviewed by Kenneth Rohde Christiansen.
2129 Enable Platform Strategies on Qt
2131 [Qt] Turn on PLATFORM_STRATEGIES
2132 https://bugs.webkit.org/show_bug.cgi?id=45831
2134 * wtf/Platform.h: Enable Platform Strategies when building QtWebkit
2136 2010-09-17 Oliver Hunt <oliver@apple.com>
2138 Reviewed by Gavin Barraclough.
2140 Imprecise tracking of variable capture leads to overly pessimistic creation of activations
2141 https://bugs.webkit.org/show_bug.cgi?id=46020
2143 The old logic for track free and captured variables would cause us
2144 to decide we needed an activation in every function along the scope
2145 chain between a variable capture and its declaration. We now track
2146 captured variables precisely which requires a bit of additional work
2148 The most substantial change is that the parsing routine needs to
2149 be passed the list of function parameters when reparsing a function
2150 as when reparsing we don't parse the function declaration itself only
2153 * JavaScriptCore.exp:
2154 * parser/JSParser.cpp:
2155 (JSC::JSParser::Scope::Scope):
2156 (JSC::JSParser::Scope::needsFullActivation):
2157 We need to distinguish between use of a feature that requires
2158 an activation and eval so we now get this additional flag.
2159 (JSC::JSParser::Scope::collectFreeVariables):
2160 (JSC::JSParser::Scope::getCapturedVariables):
2161 We can't simply return the list of "capturedVariables" now as
2162 is insufficiently precise, so we compute them instead.
2163 (JSC::JSParser::popScope):
2165 (JSC::JSParser::JSParser):
2166 (JSC::JSParser::parseProgram):
2167 (JSC::JSParser::parseWithStatement):
2168 (JSC::JSParser::parseTryStatement):
2169 (JSC::JSParser::parseFunctionInfo):
2170 (JSC::JSParser::parseFunctionDeclaration):
2171 (JSC::JSParser::parseProperty):
2172 (JSC::JSParser::parseMemberExpression):
2173 * parser/JSParser.h:
2174 * parser/Parser.cpp:
2175 (JSC::Parser::parse):
2177 (JSC::Parser::parse):
2178 * runtime/Executable.cpp:
2179 (JSC::EvalExecutable::compileInternal):
2180 (JSC::ProgramExecutable::checkSyntax):
2181 (JSC::ProgramExecutable::compileInternal):
2182 (JSC::FunctionExecutable::compileForCallInternal):
2183 (JSC::FunctionExecutable::compileForConstructInternal):
2184 (JSC::FunctionExecutable::reparseExceptionInfo):
2185 (JSC::EvalExecutable::reparseExceptionInfo):
2186 (JSC::FunctionExecutable::fromGlobalCode):
2187 Pass function parameters (if available) to the parser.
2189 2010-09-17 Anders Carlsson <andersca@apple.com>
2191 Reviewed by Sam Weinig.
2193 Add IsFloatingPoint and IsArithmetic type traits
2194 https://bugs.webkit.org/show_bug.cgi?id=46018
2197 * wtf/TypeTraits.cpp:
2199 2010-09-17 Martin Robinson <mrobinson@igalia.com>
2201 Reviewed by Oliver Hunt.
2203 [GTK] FontPlatformDataFreeType should use smart pointers to hold its members
2204 https://bugs.webkit.org/show_bug.cgi?id=45917
2206 Added support to PlatformRefPtr for handling HashTableDeletedValue.
2208 * wtf/PlatformRefPtr.h:
2209 (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
2210 (WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
2212 2010-09-16 Oliver Hunt <oliver@apple.com>
2214 Reviewed by Geoffrey Garen.
2216 Crash due to timer triggered GC on one heap while another heap is active
2217 https://bugs.webkit.org/show_bug.cgi?id=45932
2218 <rdar://problem/8318446>
2220 The GC timer may trigger for one heap while another heap is active. This
2221 is safe, but requires us to ensure that we have temporarily associated the
2222 thread's identifierTable with the heap we're collecting on. Otherwise we
2223 may end up with the identifier tables in an inconsistent state leading to
2226 * runtime/Collector.cpp:
2227 (JSC::Heap::allocate):
2229 (JSC::Heap::collectAllGarbage):
2230 Add assertions to ensure we have the correct identifierTable active
2232 * runtime/GCActivityCallbackCF.cpp:
2233 (JSC::DefaultGCActivityCallbackPlatformData::trigger):
2234 Temporarily make the expected IdentifierTable active
2235 * wtf/WTFThreadData.h:
2236 (JSC::IdentifierTable::remove):
2237 Make it possible to see when IdentifierTable::remove has succeeded
2238 * wtf/text/StringImpl.cpp:
2239 (WTF::StringImpl::~StringImpl):
2240 CRASH if an StringImpl is an Identifier but isn't present in the
2241 active IdentifierTable. If we get to this state something has
2242 gone wrong and we should just crash immediately.
2244 2010-09-16 Martin Robinson <mrobinson@igalia.com>
2246 Reviewed by Xan Lopez.
2248 [GTK] Implement dissolveDragImageToFraction
2249 https://bugs.webkit.org/show_bug.cgi?id=45826
2251 * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
2253 2010-09-16 Eric Uhrhane <ericu@chromium.org>
2255 Reviewed by Jian Li.
2257 Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
2258 https://bugs.webkit.org/show_bug.cgi?id=45798
2260 * Configurations/FeatureDefines.xcconfig:
2262 2010-09-15 Oliver Hunt <oliver@apple.com>
2264 Reviewed by Geoffrey Garen.
2266 Use free variable analysis to improve activation performance
2267 https://bugs.webkit.org/show_bug.cgi?id=45837
2269 Adds free and captured variable tracking to the JS parser. This
2270 allows us to avoid construction of an activation object in some
2271 cases. Future patches will make more use of this information to
2272 improve those cases where activations are still needed.
2274 * parser/ASTBuilder.h:
2275 * parser/JSParser.cpp:
2276 (JSC::JSParser::Scope::Scope):
2277 (JSC::JSParser::Scope::declareVariable):
2278 (JSC::JSParser::Scope::useVariable):
2279 (JSC::JSParser::Scope::collectFreeVariables):
2280 (JSC::JSParser::Scope::capturedVariables):
2281 (JSC::JSParser::ScopeRef::ScopeRef):
2282 (JSC::JSParser::ScopeRef::operator->):
2283 (JSC::JSParser::ScopeRef::index):
2284 (JSC::JSParser::currentScope):
2285 (JSC::JSParser::pushScope):
2286 (JSC::JSParser::popScope):
2287 (JSC::JSParser::parseProgram):
2288 (JSC::JSParser::parseVarDeclarationList):
2289 (JSC::JSParser::parseConstDeclarationList):
2290 (JSC::JSParser::parseTryStatement):
2291 (JSC::JSParser::parseFormalParameters):
2292 (JSC::JSParser::parseFunctionInfo):
2293 (JSC::JSParser::parseFunctionDeclaration):
2294 (JSC::JSParser::parsePrimaryExpression):
2296 (JSC::ScopeNodeData::ScopeNodeData):
2297 (JSC::ScopeNode::ScopeNode):
2298 (JSC::ProgramNode::ProgramNode):
2299 (JSC::ProgramNode::create):
2300 (JSC::EvalNode::EvalNode):
2301 (JSC::EvalNode::create):
2302 (JSC::FunctionBodyNode::FunctionBodyNode):
2303 (JSC::FunctionBodyNode::create):
2305 (JSC::ScopeNode::needsActivation):
2306 (JSC::ScopeNode::hasCapturedVariables):
2307 * parser/Parser.cpp:
2308 (JSC::Parser::didFinishParsing):
2310 (JSC::Parser::parse):
2311 * parser/SyntaxChecker.h:
2312 * runtime/Executable.cpp:
2313 (JSC::EvalExecutable::compileInternal):
2314 (JSC::ProgramExecutable::compileInternal):
2315 (JSC::FunctionExecutable::compileForCallInternal):
2316 (JSC::FunctionExecutable::compileForConstructInternal):
2317 * runtime/Executable.h:
2318 (JSC::ScriptExecutable::needsActivation):
2319 (JSC::ScriptExecutable::recordParse):
2321 2010-09-14 Hyung Song <beergun@company100.net>
2323 Reviewed by Kent Tamura.
2325 [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
2326 https://bugs.webkit.org/show_bug.cgi?id=44764
2328 * wtf/OwnPtrCommon.h:
2329 * wtf/brew/OwnPtrBrew.cpp:
2330 (WTF::deleteOwnedPtr):
2332 2010-09-14 Darin Adler <darin@apple.com>
2334 Reviewed by Geoffrey Garen.
2336 Sort with non-numeric custom sort function fails on array with length but no values
2337 https://bugs.webkit.org/show_bug.cgi?id=45781
2339 * runtime/JSArray.cpp:
2340 (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
2341 exit for any array without values, even if it has a non-0 length.
2343 2010-09-14 Steve Falkenburg <sfalken@apple.com>
2345 Windows production build fix.
2348 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2350 2010-09-14 Kwang Yul Seo <skyul@company100.net>
2352 Reviewed by Darin Adler.
2354 Share UnicodeMacrosFromICU.h
2355 https://bugs.webkit.org/show_bug.cgi?id=45710
2357 glib, qt4 and wince use the same macros from ICU.
2358 Remove the code duplication and use the same header file.
2360 * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
2361 * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
2362 * wtf/unicode/qt4/UnicodeQt4.h:
2363 * wtf/unicode/wince/UnicodeWince.h:
2365 2010-09-13 Darin Adler <darin@apple.com>
2367 Reviewed by Adam Barth.
2369 Preparation for eliminating deprecatedParseURL
2370 https://bugs.webkit.org/show_bug.cgi?id=45695
2372 * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
2373 the HTML tree builder.
2375 2010-09-13 Darin Fisher <darin@chromium.org>
2377 Reviewed by David Levin.
2379 Add option to conditionally compile smooth scrolling support.
2380 https://bugs.webkit.org/show_bug.cgi?id=45689
2382 ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
2386 2010-09-13 Adam Roben <aroben@apple.com>
2388 Copy JavaScriptCore's generated sources to the right directory
2390 * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
2392 2010-09-13 Kwang Yul Seo <skyul@company100.net>
2394 Reviewed by Kent Tamura.
2396 [BREWMP] Don't call _msize
2397 https://bugs.webkit.org/show_bug.cgi?id=45556
2399 Because Brew MP uses its own memory allocator, it is not correct to use
2400 _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
2402 * wtf/FastMalloc.cpp:
2403 (WTF::fastMallocSize):
2405 2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
2407 Reviewed by Andreas Kling.
2409 [Qt] V8 port: webcore project files changes
2410 https://bugs.webkit.org/show_bug.cgi?id=45141
2412 * JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
2413 so that they can also be used from WebCore.pro for v8 builds.
2414 * wtf/wtf.pri: Added.
2416 2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch>
2418 Reviewed by Andreas Kling.
2420 Add a define missing when building with glib unicode backend
2421 https://bugs.webkit.org/show_bug.cgi?id=45544
2423 * wtf/unicode/glib/UnicodeMacrosFromICU.h:
2425 2010-09-10 Stephanie Lewis <slewis@apple.com>
2427 Reviewed by Alexey Proskuryakov.
2429 Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
2430 about the JIT and other implementation details of JavaScriptCore. Necessary
2433 https://bugs.webkit.org/show_bug.cgi?id=45528
2435 * JavaScriptCore.exp:
2436 * JavaScriptCore.xcodeproj/project.pbxproj:
2437 * runtime/MemoryStatistics.cpp: Added.
2438 (JSC::memoryStatistics):
2439 * runtime/MemoryStatistics.h: Added.
2441 2010-09-09 Michael Saboff <msaboff@apple.com>
2443 Reviewed by Gavin Barraclough.
2445 Added a regular expression tracing facility. This tracing is connected
2446 to jsc. Every compiled regular expression object is added to a list.
2447 When the process exits, each regular expression dumps its pattern,
2448 JIT address, number of times it was executed and the number of matches.
2449 This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
2451 https://bugs.webkit.org/show_bug.cgi?id=45401
2453 * JavaScriptCore.exp:
2456 * runtime/JSGlobalData.cpp:
2457 (JSC::JSGlobalData::JSGlobalData):
2458 (JSC::JSGlobalData::~JSGlobalData):
2459 (JSC::JSGlobalData::addRegExpToTrace):
2460 (JSC::JSGlobalData::dumpRegExpTrace):
2461 * runtime/JSGlobalData.h:
2462 * runtime/RegExp.cpp:
2463 (JSC::RegExp::RegExp):
2464 (JSC::RegExp::create):
2465 (JSC::RegExp::match):
2469 (JSC::Yarr::RegexCodeBlock::getAddr):
2471 2010-09-09 John Therrell <jtherrell@apple.com>
2475 * jit/ExecutableAllocator.cpp:
2476 (JSC::ExecutableAllocator::committedByteCount):
2478 2010-09-09 John Therrell <jtherrell@apple.com>
2480 Reviewed by Alexey Proskuryakov.
2482 Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
2483 https://bugs.webkit.org/show_bug.cgi?id=45134
2485 Added thread-safe committed byte counting and reporting functionality to RegisterFile and
2486 ExecutableAllocator.
2488 * JavaScriptCore.exp:
2489 Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
2491 * interpreter/RegisterFile.cpp:
2492 (JSC::registerFileStatisticsMutex):
2493 Added function which returns a static Mutex used for locking during read/write access to
2494 static committed byte count variable.
2495 (JSC::RegisterFile::~RegisterFile):
2496 Added call to addToStatistics since memory is decommitted here.
2497 (JSC::RegisterFile::releaseExcessCapacity):
2498 Added call to addToStatistics since memory is decommitted here.
2499 (JSC::RegisterFile::initializeThreading):
2500 Added function which calls registerFileStatisticsMutex().
2501 (JSC::RegisterFile::committedByteCount):
2502 Added function which returns the current committed byte count for RegisterFile.
2503 (JSC::RegisterFile::addToCommittedByteCount):
2504 Added function which updates committed byte count.
2506 * interpreter/RegisterFile.h:
2507 (JSC::RegisterFile::RegisterFile):
2508 Added call to addToStatistics since memory is committed here.
2509 (JSC::RegisterFile::grow):
2510 Added call to addToStatistics since memory is committed here.
2512 * jit/ExecutableAllocator.h:
2513 Added function prototype for public static function committedByteCount().
2515 * jit/ExecutableAllocatorFixedVMPool.cpp:
2516 (JSC::FixedVMPoolAllocator::release):
2517 Added call to addToStatistics since memory is decommitted here.
2518 (JSC::FixedVMPoolAllocator::reuse):
2519 Added call to addToStatistics since memory is committed here.
2520 (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
2521 Added function which updates committed byte count.
2522 (JSC::ExecutableAllocator::committedByteCount):
2523 Added function which returns the current committed byte count for ExecutableAllocator.
2525 * runtime/InitializeThreading.cpp:
2526 (JSC::initializeThreadingOnce):
2527 Added call to RegisterFile::initializeThreading.
2529 2010-09-09 Mark Rowe <mrowe@apple.com>
2531 Reviewed by Oliver Hunt.
2533 <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
2535 * API/JSObjectRef.cpp:
2536 (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
2537 failure. Instead map NULL directly to the null JSValue.
2538 * API/tests/testapi.c:
2539 (main): Add test coverage for the NULL value case.
2541 2010-09-09 Csaba Osztrogonác <ossy@webkit.org>
2543 Reviewed by Gavin Barraclough.
2545 [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
2546 https://bugs.webkit.org/show_bug.cgi?id=29268
2548 * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
2550 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
2552 Reviewed by Darin Adler.
2554 Removing doneSemicolon label in the lexer
2555 https://bugs.webkit.org/show_bug.cgi?id=45289
2557 As a side effect of moving the multiline comment parsing
2558 to a separate function, an opportunity raised to simplify
2559 the single line comment parsing, and removing doneSemicolon
2560 label. Slight performance increase on --parse-only
2561 tests (from 32.8ms to 31.5ms)
2566 2010-09-08 Xan Lopez <xlopez@igalia.com>
2568 Reviewed by Alexey Proskuryakov.
2570 Remove accessor for private member variable in JSParser
2571 https://bugs.webkit.org/show_bug.cgi?id=45378
2573 m_token is private to JSParser, so it does not seem to be useful
2574 to have an accessor for it. On top of that, the file was both
2575 using the accessor and directly accessing the member variable,
2576 only one style should be used.
2578 2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
2580 Reviewed by Oliver Hunt.
2582 [Qt] REGRESSION(63348): jsc is broken
2583 https://bugs.webkit.org/show_bug.cgi?id=42818
2585 Need fastcall conventions on Qt/Win/MinGW.
2586 Based on patches of Gavin Barraclough: r63947 and r63948.
2591 2010-09-08 Robert Hogan <robert@webkit.org>
2593 Reviewed by Antonio Gomes.
2595 Remove some unnecessary duplicate calls to string functions
2597 https://bugs.webkit.org/show_bug.cgi?id=45314
2599 * wtf/text/WTFString.cpp:
2600 (WTF::String::format):
2602 2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2604 Reviewed by Andreas Kling.
2606 Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
2607 https://bugs.webkit.org/show_bug.cgi?id=45382
2609 It was enabled in the cleanup made in r64176, though it is still
2614 2010-09-08 Martin Robinson <mrobinson@igalia.com>
2616 Reviewed by Xan Lopez.
2618 [GTK] Need a WebSocket implementation
2619 https://bugs.webkit.org/show_bug.cgi?id=45197
2621 Add a GIO-based WebSocket implementation.
2623 * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
2624 (WTF::refPlatformPtr):
2625 (WTF::derefPlatformPtr):
2626 * wtf/gobject/GRefPtr.h: Added new template specialization declarations.
2627 * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
2629 2010-08-30 Maciej Stachowiak <mjs@apple.com>
2631 Reviewed by Darin Adler.
2633 Handle MediaQueryExp memory management exclusively with smart pointers
2634 https://bugs.webkit.org/show_bug.cgi?id=44874
2636 Implemented a non-copying sort function to make it possible to sort a Vector
2637 of OwnPtrs (which cannot be copied). This is required for the above.
2639 * wtf/NonCopyingSort.h: Added.
2640 (WTF::nonCopyingSort): It's secretly heapsort.
2641 (WTF::heapSort): heapsort implementation.
2642 (WTF::siftDown): Helper function for heapsort.
2643 (WTF::heapify): ditto
2645 Adjust build systems.
2648 * JavaScriptCore.gypi:
2649 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2650 * JavaScriptCore.xcodeproj/project.pbxproj:
2652 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
2654 Reviewed by Darin Adler.
2656 Refactoring multiline comments in the lexer
2657 https://bugs.webkit.org/show_bug.cgi?id=45289
2659 MultiLine comment parsing is moved to a separate function.
2661 Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
2662 SunSpider reports no change (from 523.1ms to 521.2ms).
2665 (JSC::Lexer::parseMultilineComment):
2669 2010-09-07 James Robinson <jamesr@chromium.org>
2671 Compile fix attempt for windows.
2673 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2675 2010-09-07 Mihai Parparita <mihaip@chromium.org>
2677 Reviewed by James Robinson.
2679 Fix Windows build after r66936
2680 https://bugs.webkit.org/show_bug.cgi?id=45348
2682 Add symbol names that were missing from r66936.
2684 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2686 2010-09-07 Mihai Parparita <mihaip@chromium.org>
2688 Reviewed by Oliver Hunt.
2690 pushState and replaceState do not clone RegExp objects correctly
2691 https://bugs.webkit.org/show_bug.cgi?id=44718
2693 Move internal representation of JSC::RegExp (which depends on wether
2694 YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
2695 in the implementation only. This makes it feasible to use RegExp in
2696 WebCore without bringing in all of YARR.
2698 * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
2699 needed inside WebCore's JSC bindings.
2700 * runtime/RegExp.cpp:
2701 (JSC::RegExpRepresentation::~RegExpRepresentation):
2702 (JSC::RegExp::RegExp):
2703 (JSC::RegExp::~RegExp):
2704 (JSC::RegExp::compile):
2705 (JSC::RegExp::match):
2708 2010-09-07 Anders Carlsson <andersca@apple.com>
2710 Reviewed by Darin Adler.
2712 <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
2714 Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
2716 * Configurations/Base.xcconfig:
2718 2010-09-07 Zoltan Horvath <zoltan@webkit.org>
2720 Reviewed by Darin Adler.
2722 REGRESSION(66741): Undefined pthread macros
2723 https://bugs.webkit.org/show_bug.cgi?id=45246
2725 PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux,
2726 but used in a statement. Add an additional check to test this.
2728 * wtf/FastMalloc.cpp:
2729 (WTF::TCMalloc_PageHeap::initializeScavenger):
2731 2010-09-06 Oliver Hunt <oliver@apple.com>
2735 2010-09-05 Oliver Hunt <oliver@apple.com>
2737 Reviewed by Sam Weinig.
2739 SerializedScriptValue needs to use a flat storage mechanism
2740 https://bugs.webkit.org/show_bug.cgi?id=45244
2744 * JavaScriptCore.exp:
2746 2010-09-06 Chao-ying Fu <fu@mips.com>
2748 Reviewed by Oliver Hunt.
2750 Support JSVALUE32_64 on MIPS
2751 https://bugs.webkit.org/show_bug.cgi?id=43999
2753 Add missing functions to support JSVALUE32_64 on MIPS.
2754 Remove JSVALUE32 as the default for MIPS.
2756 * assembler/MIPSAssembler.h:
2757 (JSC::MIPSAssembler::divd):
2758 (JSC::MIPSAssembler::mthc1):
2759 (JSC::MIPSAssembler::cvtwd):
2760 * assembler/MacroAssemblerMIPS.h:
2761 (JSC::MacroAssemblerMIPS::neg32):
2762 (JSC::MacroAssemblerMIPS::branchOr32):
2763 (JSC::MacroAssemblerMIPS::set8):
2764 (JSC::MacroAssemblerMIPS::loadDouble):
2765 (JSC::MacroAssemblerMIPS::divDouble):
2766 (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
2767 (JSC::MacroAssemblerMIPS::branchDouble):
2768 (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
2769 (JSC::MacroAssemblerMIPS::zeroDouble):
2771 * jit/JITOpcodes32_64.cpp:
2772 (JSC::JIT::privateCompileCTINativeCall):
2773 * jit/JITPropertyAccess32_64.cpp:
2774 (JSC::JIT::privateCompilePutByIdTransition):
2776 (JSC::JITThunks::JITThunks):
2780 2010-09-06 Robert Hogan <robert@webkit.org>
2782 Unreviewed, compile fix.
2784 Fix compile failure in r66843
2786 Revert to original patch in bugzilla. Leave bug open for
2787 discussion on potential removal of double utf8 conversion.
2789 https://bugs.webkit.org/show_bug.cgi?id=45240
2791 * wtf/text/WTFString.cpp:
2792 (WTF::String::format):
2794 2010-09-06 Robert Hogan <robert@webkit.org>
2796 Reviewed by Andreas Kling.
2798 [Qt] utf8 encoding of console() messages
2801 http/tests/security/xssAuditor/embed-tag-null-char.html
2802 http/tests/security/xssAuditor/object-embed-tag-null-char.html
2804 Both tests failed because Qt's implementation of String::format()
2805 is casting a utf8 result to String, which assumes latin1 in
2806 its constructor. So instead of casting a QString to a String, use
2807 StringImpl::create() instead. Unfortunately, this involves a lot
2808 of extra casts but the end result is correct.
2810 https://bugs.webkit.org/show_bug.cgi?id=45240
2812 * wtf/text/WTFString.cpp:
2813 (WTF::String::format):
2815 2010-09-03 Alexey Proskuryakov <ap@apple.com>
2817 Reviewed by Darin Adler.
2819 https://bugs.webkit.org/show_bug.cgi?id=45135
2820 <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
2822 * wtf/FastMalloc.cpp:
2823 (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
2824 regardless of platform default, so that we can assert that it's held (this is for platforms
2825 that don't have libdispatch).
2826 (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
2827 at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
2829 (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
2830 manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
2831 can make unbalanced calls to dispatch_resume().
2833 2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi>
2835 Reviewed by Martin Robinson.
2837 [EFL] Regression (66531) Build break with Glib Support
2838 https://bugs.webkit.org/show_bug.cgi?id=45011
2840 Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
2841 since when glib is enabled, EFL port needs it, too.
2843 * CMakeListsEfl.txt: Include gobject directory to find new header
2845 * GNUmakefile.am: Ditto.
2846 * wtf/CMakeListsEfl.txt: Ditto.
2847 * wtf/Platform.h: Include header if port is EFL and glib support is
2849 * wtf/gtk/GtkTypedefs.h: Removed.
2850 * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
2851 guarded by PLATFORM(GTK).
2853 2010-09-03 Csaba Osztrogonác <ossy@webkit.org>
2855 Reviewed by Simon Hausmann.
2857 Fix warning in wtf/ByteArray.h
2858 https://bugs.webkit.org/show_bug.cgi?id=44672
2860 * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
2862 2010-09-02 Adam Barth <abarth@webkit.org>
2864 Reviewed by Eric Seidel.
2866 Actually parse a URL from ParsedURL
2867 https://bugs.webkit.org/show_bug.cgi?id=45080
2869 This patch only handles standard URLs. At some point we'll need to
2870 distinguish between standard URLs and other kinds of URLs.
2872 * wtf/url/api/ParsedURL.cpp:
2873 (WTF::ParsedURL::ParsedURL):
2875 2010-09-02 Adam Barth <abarth@webkit.org>
2877 Reviewed by Eric Seidel.
2879 Add ParsedURL and URLString to WTFURL API
2880 https://bugs.webkit.org/show_bug.cgi?id=45078
2882 Currently there's no actual URL parsing going on, but this patch is a
2883 start to sketching out the API.
2885 * JavaScriptCore.xcodeproj/project.pbxproj:
2886 * wtf/url/api/ParsedURL.cpp: Added.
2887 (WTF::ParsedURL::ParsedURL):
2888 (WTF::ParsedURL::scheme):
2889 (WTF::ParsedURL::username):
2890 (WTF::ParsedURL::password):
2891 (WTF::ParsedURL::host):
2892 (WTF::ParsedURL::port):
2893 (WTF::ParsedURL::path):
2894 (WTF::ParsedURL::query):
2895 (WTF::ParsedURL::fragment):
2896 (WTF::ParsedURL::segment):
2897 * wtf/url/api/ParsedURL.h: Added.
2898 (WTF::ParsedURL::spec):
2899 * wtf/url/api/URLString.h: Added.
2900 (WTF::URLString::URLString):
2901 (WTF::URLString::string):
2903 2010-09-02 Adam Barth <abarth@webkit.org>
2905 Reviewed by Eric Seidel.
2907 Add WTFURL to the JavaScriptCore build on Mac
2908 https://bugs.webkit.org/show_bug.cgi?id=45075
2910 Building code is good.
2912 * JavaScriptCore.xcodeproj/project.pbxproj:
2914 2010-09-02 Alexey Proskuryakov <ap@apple.com>
2916 Reviewed by Oliver Hunt.
2918 https://bugs.webkit.org/show_bug.cgi?id=43230
2919 <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
2921 One can't delete a ThreadSpecific object that has data in it. It's not even possible to
2922 enumerate data objects in all threads, much less destroy them from a thread that's destroying
2925 * parser/JSParser.cpp:
2926 (JSC::JSParser::JSParser):
2927 * runtime/JSGlobalData.h:
2928 * wtf/WTFThreadData.cpp:
2929 (WTF::WTFThreadData::WTFThreadData):
2930 * wtf/WTFThreadData.h:
2931 (WTF::WTFThreadData::approximatedStackStart):
2932 Moved stack guard tracking from JSGlobalData to WTFThreadData.
2934 * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
2935 ever face a situation where we'd want to delete a ThreadSpecific object.
2937 2010-09-01 Gavin Barraclough <barraclough@apple.com>
2939 Rubber stamped by Oliver Hunt.
2941 Ecma-262 15.11.1.1 states that if the argument is undefined then an
2942 Error object's message property should be set to the empty string.
2944 * runtime/ErrorInstance.cpp:
2945 (JSC::ErrorInstance::ErrorInstance):
2946 (JSC::ErrorInstance::create):
2947 * runtime/ErrorInstance.h:
2948 * runtime/ErrorPrototype.cpp:
2949 (JSC::ErrorPrototype::ErrorPrototype):
2951 2010-08-31 Darin Adler <darin@apple.com>
2953 Reviewed by Anders Carlsson.
2955 * wtf/FastMalloc.cpp:
2956 (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
2957 mixed types with code that uses size_t.
2959 * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
2961 2010-08-31 Martin Robinson <mrobinson@igalia.com>
2963 Reviewed by Gustavo Noronha Silva.
2965 [GTK] Isolate all GTK+ typedefs into one file
2966 https://bugs.webkit.org/show_bug.cgi?id=44900
2968 * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
2969 * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
2970 * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
2971 * wtf/gobject/GOwnPtr.h: Ditto.
2972 * wtf/gobject/GRefPtr.h: Ditto.
2973 * wtf/gtk/GtkTypedefs.h: Added.
2975 2010-08-31 Martin Robinson <mrobinson@igalia.com>
2977 Reviewed by Gustavo Noronha Silva.
2979 [GTK] Fix 'make dist' in preparation of the 1.3.3 release
2980 https://bugs.webkit.org/show_bug.cgi?id=44978
2982 * GNUmakefile.am: Adding missing headers to the sources list.
2984 2010-08-31 Chao-ying Fu <fu@mips.com>
2986 Reviewed by Oliver Hunt.
2988 Support emit_op_mod() for MIPS
2989 https://bugs.webkit.org/show_bug.cgi?id=42855
2991 This patch uses MIPS div instructions for op_mod to improve performance.
2993 * assembler/MIPSAssembler.h:
2994 (JSC::MIPSAssembler::div):
2995 * jit/JITArithmetic.cpp:
2996 (JSC::JIT::emit_op_mod):
2997 (JSC::JIT::emitSlow_op_mod):
2999 2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
3001 Reviewed by Darin Adler.
3003 Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
3004 https://bugs.webkit.org/show_bug.cgi?id=44870
3007 * wtf/UnusedParam.h:
3009 2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
3011 Reviewed by Kenneth Rohde Christiansen.
3013 JSC TimeoutChecker::didTimeOut overflows on ARM
3014 https://bugs.webkit.org/show_bug.cgi?id=38538
3016 Make getCPUTime() return values relative to the first call.
3017 The previous implementation relied on simply on currentTime(), which
3018 return a time since epoch and not a time since the thread started. This
3019 made the return value of getCPUTime() overflow on 32 bits.
3021 * runtime/TimeoutChecker.cpp:
3024 2010-08-30 Mihai Parparita <mihaip@chromium.org>
3026 Reviewed by Adam Barth.
3028 HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
3029 https://bugs.webkit.org/show_bug.cgi?id=44315
3031 Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
3035 2010-08-30 Chris Rogers <crogers@google.com>
3037 Reviewed by Kenneth Russell.
3039 Fix namespace for wtf/Complex.h and wtf/Vector3.h
3040 https://bugs.webkit.org/show_bug.cgi?id=44892
3045 2010-08-30 Andy Estes <aestes@apple.com>
3047 Reviewed by Eric Carlson.
3049 Strings returned by asciiDebug() should be NULL-terminated.
3050 https://bugs.webkit.org/show_bug.cgi?id=44866
3052 * wtf/text/WTFString.cpp:
3055 2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
3057 Reviewed by Darin Adler.
3059 Refactor number parsing in the lexer
3060 https://bugs.webkit.org/show_bug.cgi?id=44104
3062 Number parsing was full of gotos, and needed a complete
3063 redesign to remove them (Only one remained). Furthermore
3064 integer arithmetic is empolyed for fast cases (= small
3068 (JSC::Lexer::parseHex):
3069 (JSC::Lexer::parseOctal):
3070 (JSC::Lexer::parseDecimal):
3071 (JSC::Lexer::parseNumberAfterDecimalPoint):
3072 (JSC::Lexer::parseNumberAfterExponentIndicator):
3076 2010-08-29 Darin Adler <darin@apple.com>
3080 * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
3081 * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
3082 * wtf/unicode/wince/UnicodeWince.h: Ditto.
3084 2010-08-29 Kwang Yul Seo <skyul@company100.net>
3086 Reviewed by Kent Tamura.
3088 [BREWMP] Port vprintf_stderr_common
3089 https://bugs.webkit.org/show_bug.cgi?id=33568
3091 Use BREW's DBGPRINTF to output debug messages.
3093 * wtf/Assertions.cpp:
3095 2010-08-28 Gavin Barraclough <barraclough@apple.com>
3097 Reviewed by Oliver Hunt.
3099 Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
3101 We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
3102 that the result is within bounds. This is problematic in the case of double-to-unsigned
3103 conversion because we should be saturating to array length.
3105 Also, the error return value from Array.splice should be [], not undefined.
3107 I don't see any security concerns here. These methods are spec'ed in such a way that they
3108 can be applied to non Array objects, so in all cases the (potentially bogus) indices are
3109 being passed to functions that will safely check accesses are within bounds.
3111 * runtime/ArrayPrototype.cpp:
3112 (JSC::argumentClampedIndexFromStartOrEnd):
3113 (JSC::arrayProtoFuncJoin):
3114 (JSC::arrayProtoFuncConcat):
3115 (JSC::arrayProtoFuncReverse):
3116 (JSC::arrayProtoFuncShift):
3117 (JSC::arrayProtoFuncSlice):
3118 (JSC::arrayProtoFuncSort):
3119 (JSC::arrayProtoFuncSplice):
3120 (JSC::arrayProtoFuncUnShift):
3121 (JSC::arrayProtoFuncFilter):
3122 (JSC::arrayProtoFuncMap):
3123 (JSC::arrayProtoFuncEvery):
3124 (JSC::arrayProtoFuncForEach):
3125 (JSC::arrayProtoFuncSome):
3126 (JSC::arrayProtoFuncReduce):
3127 (JSC::arrayProtoFuncReduceRight):
3128 (JSC::arrayProtoFuncIndexOf):
3129 (JSC::arrayProtoFuncLastIndexOf):
3130 * runtime/JSValue.h:
3131 (JSC::JSValue::toUInt32):
3133 2010-08-28 Pratik Solanki <psolanki@apple.com>
3135 Reviewed by Dan Bernstein.
3137 Add an ENABLE define for purgeable memory support
3138 https://bugs.webkit.org/show_bug.cgi?id=44777
3142 2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
3144 Reviewed by Kenneth Rohde Christiansen.
3146 [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
3147 https://bugs.webkit.org/show_bug.cgi?id=43179
3149 Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
3150 NPAPI Plugin Cache. The flag is enabled by default.
3152 * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
3154 2010-07-27 Jer Noble <jer.noble@apple.com>
3156 Reviewed by Eric Carlson.
3158 Add JavaScript API to allow a page to go fullscreen.
3159 rdar://problem/6867795
3160 https://bugs.webkit.org/show_bug.cgi?id=43099
3162 * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
3164 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3166 Windows build fix pt 2.
3168 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3170 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3172 Windows build fix pt 1.
3174 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3176 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3178 Reviewed by Oliver Hunt.
3180 Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
3182 These methods should be using a version of dtoa that can generate results accurate
3183 to the requested precision, whereas our version of dtoa is only currently able to
3184 support producing results sufficiently accurate to distinguish the value from any
3185 other IEEE-754 double precision number.
3187 This change has no impact on benchmarks we track.
3189 On microbenchmarks for these functions, this is a slight regression where a high
3190 precision is requested (dtoa now need to iterate further to generate a a greater
3191 number of digits), but with smaller precision values (hopefully more common) this
3192 improves performance, since it reduced the accurate of result dtoa is required,
3193 to produce, and removes the need to pre-round values before calling dtoa.
3195 * JavaScriptCore.exp:
3196 doubleToStringInJavaScriptFormat renamed to numberToString
3198 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3199 doubleToStringInJavaScriptFormat renamed to numberToString
3201 * runtime/UString.cpp:
3202 (JSC::UString::number):
3203 doubleToStringInJavaScriptFormat renamed to numberToString
3205 * wtf/DecimalNumber.h:
3206 (WTF::DecimalNumber::DecimalNumber):
3207 (WTF::DecimalNumber::toStringDecimal):
3208 (WTF::DecimalNumber::toStringExponential):
3209 Remove all pre-rounding of values, instead call dtoa correctly.
3214 Reenable support for rounding to specific-figures/decimal-places in dtoa.
3215 Modify to remove unbiased rounding, provide ECMA required away-from-zero.
3216 Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
3219 2010-08-27 Chao-ying Fu <fu@mips.com>
3221 Reviewed by Oliver Hunt.
3223 Byte alignment issue on MIPS
3224 https://bugs.webkit.org/show_bug.cgi?id=29415
3226 MIPS accesses one byte at a time for now to avoid the help from the
3227 kernel to fix unaligned accesses.
3229 * wtf/text/AtomicString.cpp:
3231 * wtf/text/StringHash.h:
3232 (WebCore::StringHash::equal):
3234 2010-08-27 Xan Lopez <xlopez@igalia.com>
3236 Reviewed by Tor Arne Vestbø.
3238 Fix a couple of typos in comment.
3240 * bytecode/CodeBlock.h:
3242 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3248 2010-08-26 Gavin Barraclough <baraclough@apple.com>
3250 Reviewed by Sam Weinig.
3252 Bug 44735 - Clean up dtoa.cpp
3253 Remove unused & unmaintained code paths, reformat code to match
3254 coding standard & use platform #defines from Platform.h directly.
3274 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3276 Rubber Stamped by Oliver Hunt.
3278 Partially revert r65959. The toString changes regressed the v8 tests,
3279 but keep the toFixed/toExponential/toPrecision changes.
3281 * JavaScriptCore.exp:
3282 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3283 * runtime/NumberPrototype.cpp:
3284 * runtime/UString.cpp:
3285 (JSC::UString::number):
3286 * wtf/DecimalNumber.h:
3289 (WTF::doubleToStringInJavaScriptFormat):
3291 * wtf/text/WTFString.cpp:
3292 * wtf/text/WTFString.h:
3294 2010-08-26 James Robinson <jamesr@chromium.org>
3296 Reviewed by Darin Fisher.
3298 [chromium] Remove the USE(GLES2_RENDERING) define and associated code
3299 https://bugs.webkit.org/show_bug.cgi?id=43761
3301 Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
3305 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3307 Rolling out r64608, this regressed performance.
3309 * JavaScriptCore.xcodeproj/project.pbxproj:
3310 * assembler/ARMAssembler.cpp:
3311 (JSC::ARMAssembler::executableCopy):
3312 * assembler/LinkBuffer.h:
3313 (JSC::LinkBuffer::LinkBuffer):
3314 (JSC::LinkBuffer::~LinkBuffer):
3315 (JSC::LinkBuffer::performFinalization):
3316 * assembler/MIPSAssembler.h:
3317 (JSC::MIPSAssembler::executableCopy):
3318 * assembler/X86Assembler.h:
3319 (JSC::X86Assembler::executableCopy):
3320 * bytecode/StructureStubInfo.h:
3321 (JSC::StructureStubInfo::initGetByIdProto):
3322 (JSC::StructureStubInfo::initGetByIdChain):
3323 (JSC::StructureStubInfo::initGetByIdSelfList):
3324 (JSC::StructureStubInfo::initGetByIdProtoList):
3325 (JSC::StructureStubInfo::initPutByIdTransition):
3326 * jit/ExecutableAllocator.cpp:
3327 (JSC::ExecutablePool::systemAlloc):
3328 * jit/ExecutableAllocator.h:
3329 (JSC::ExecutablePool::create):
3330 (JSC::ExecutableAllocator::ExecutableAllocator):
3331 (JSC::ExecutableAllocator::poolForSize):
3332 (JSC::ExecutablePool::ExecutablePool):
3333 (JSC::ExecutablePool::poolAllocate):
3334 * jit/ExecutableAllocatorFixedVMPool.cpp:
3335 (JSC::FixedVMPoolAllocator::allocInternal):
3337 (JSC::JIT::privateCompile):
3339 (JSC::JIT::compileGetByIdProto):
3340 (JSC::JIT::compileGetByIdSelfList):
3341 (JSC::JIT::compileGetByIdProtoList):
3342 (JSC::JIT::compileGetByIdChainList):
3343 (JSC::JIT::compileGetByIdChain):
3344 (JSC::JIT::compilePutByIdTransition):
3345 (JSC::JIT::compilePatchGetArrayLength):
3346 * jit/JITOpcodes.cpp:
3347 (JSC::JIT::privateCompileCTIMachineTrampolines):
3348 * jit/JITOpcodes32_64.cpp:
3349 (JSC::JIT::privateCompileCTIMachineTrampolines):
3350 (JSC::JIT::privateCompileCTINativeCall):
3351 * jit/JITPropertyAccess.cpp:
3352 (JSC::JIT::stringGetByValStubGenerator):
3353 (JSC::JIT::privateCompilePutByIdTransition):
3354 (JSC::JIT::privateCompilePatchGetArrayLength):
3355 (JSC::JIT::privateCompileGetByIdProto):
3356 (JSC::JIT::privateCompileGetByIdSelfList):
3357 (JSC::JIT::privateCompileGetByIdProtoList):
3358 (JSC::JIT::privateCompileGetByIdChainList):
3359 (JSC::JIT::privateCompileGetByIdChain):
3360 * jit/JITPropertyAccess32_64.cpp:
3361 (JSC::JIT::stringGetByValStubGenerator):
3362 (JSC::JIT::privateCompilePutByIdTransition):
3363 (JSC::JIT::privateCompilePatchGetArrayLength):
3364 (JSC::JIT::privateCompileGetByIdProto):
3365 (JSC::JIT::privateCompileGetByIdSelfList):
3366 (JSC::JIT::privateCompileGetByIdProtoList):
3367 (JSC::JIT::privateCompileGetByIdChainList):
3368 (JSC::JIT::privateCompileGetByIdChain):
3370 (JSC::JITThunks::tryCachePutByID):
3371 (JSC::JITThunks::tryCacheGetByID):
3372 (JSC::DEFINE_STUB_FUNCTION):
3373 (JSC::getPolymorphicAccessStructureListSlot):
3375 * jit/SpecializedThunkJIT.h:
3376 (JSC::SpecializedThunkJIT::finalize):
3377 * runtime/ExceptionHelpers.cpp:
3378 * runtime/ExceptionHelpers.h:
3379 * runtime/Executable.cpp:
3380 (JSC::EvalExecutable::compileInternal):
3381 (JSC::ProgramExecutable::compileInternal):
3382 (JSC::FunctionExecutable::compileForCallInternal):
3383 (JSC::FunctionExecutable::compileForConstructInternal):
3384 (JSC::FunctionExecutable::reparseExceptionInfo):
3385 (JSC::EvalExecutable::reparseExceptionInfo):
3386 * yarr/RegexJIT.cpp:
3387 (JSC::Yarr::RegexGenerator::compile):
3389 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3391 Reviewed by Brady Eidson.
3393 Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
3395 * wtf/text/WTFString.cpp:
3397 Return a Vector<char> containing the contents of a string as ASCII.
3399 2010-08-26 Sam Weinig <sam@webkit.org>
3401 Reviewed by Darin Adler.
3404 https://bugs.webkit.org/show_bug.cgi?id=44627
3407 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3408 * JavaScriptCore.xcodeproj/project.pbxproj:
3412 Forward declare PassOwnArrayPtr.
3414 * wtf/OwnArrayPtr.h:
3415 Mimic the OwnPtr interface.
3417 * wtf/OwnArrayPtrCommon.h: Added.
3418 (WTF::deleteOwnedArrayPtr):
3419 Move delete function here so it can be shared by OwnArrayPtr and
3422 * wtf/PassOwnArrayPtr.h: Added.
3423 Mimic the PassOwnPtr interface.
3425 2010-08-26 Oliver Hunt <oliver@apple.com>
3427 Reviewed by Gavin Barraclough.
3429 [JSC] JavaScript parsing error when loading Equifax web page
3430 https://bugs.webkit.org/show_bug.cgi?id=42900
3432 '-->' is ostensibly only meant to occur when there is only
3433 whitespace preceeding it on the line. However firefox treats
3434 multiline comments as a space character, so they are allowed.
3435 One side effect of the firefox model is that any line terminators
3436 inside the multiline comment are ignored, so
3445 and so '-->' will not be a comment in this case. Happily this simply
3446 means that to fix this issue all we need to do is stop updating
3447 m_atLineStart when handling multiline comments.
3452 2010-08-25 Oliver Hunt <oliver@apple.com>
3454 Reviewed by Geoffrey Garen.
3456 Improve overflow handling in StringImpl::Replace
3457 https://bugs.webkit.org/show_bug.cgi?id=42502
3458 <rdar://problem/8203794>
3460 Harden StringImpl::replace against overflow -- I can't see how this
3461 could be abused, but it's better to be safe than sorry.
3463 * wtf/text/StringImpl.cpp:
3464 (WTF::StringImpl::replace):
3466 2010-08-26 Martin Robinson <mrobinson@igalia.com>
3468 Reviewed by Xan Lopez.
3470 [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
3471 https://bugs.webkit.org/show_bug.cgi?id=44624
3473 Clean up GNUmakefile.am.
3475 * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
3476 a couple include lines from the top-level GNUmakefile.am.
3478 2010-08-25 Xan Lopez <xlopez@igalia.com>
3480 Reviewed by Kent Tamura.
3482 Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
3483 https://bugs.webkit.org/show_bug.cgi?id=29259
3485 Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
3490 2010-08-25 Kwang Yul Seo <skyul@company100.net>
3492 Reviewed by Kevin Ollivier.
3494 [BREWMP] Add build system
3495 https://bugs.webkit.org/show_bug.cgi?id=44645
3497 Make waf script portable so that we can add more ports.
3501 2010-08-25 Michael Saboff <msaboff@apple.com>
3503 Reviewed by Sam Weinig.
3505 Remove the single entry regular expression cache introduced as part of
3506 the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
3507 The performance problem in Dromaeo that initiated that bug is no
3508 longer present. Dromaeo has been modified so that the regular
3509 expression tests are somewhat random and don't benefit from a
3512 * runtime/RegExp.cpp:
3513 (JSC::RegExp::RegExp):
3514 (JSC::RegExp::match):
3517 2010-08-25 Martin Robinson <mrobinson@igalia.com>
3519 Reviewed by Gustavo Noronha Silva.
3521 Cairo and EFL port shouldn't depend on glib.
3522 https://bugs.webkit.org/show_bug.cgi?id=44354
3524 Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
3527 * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
3528 * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
3529 (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
3530 (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
3531 (WTF::PlatformRefPtr::clear): Ditto.
3532 (WTF::PlatformRefPtr::get): Ditto.
3533 (WTF::PlatformRefPtr::operator*): Ditto.
3534 (WTF::PlatformRefPtr::operator->): Ditto.
3535 (WTF::PlatformRefPtr::operator!): Ditto.
3536 (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
3537 (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
3538 (WTF::::operator): Ditto.
3539 (WTF::::swap): Ditto.
3541 (WTF::operator==): Ditto.
3542 (WTF::operator!=): Ditto.
3543 (WTF::static_pointer_cast): Ditto.
3544 (WTF::const_pointer_cast): Ditto.
3545 (WTF::getPtr): Ditto.
3546 (WTF::adoptPlatformRef): Ditto.
3547 * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
3548 (WTF::refPlatformPtr):
3549 (WTF::derefPlatformPtr):
3550 * wtf/gobject/GRefPtr.h: Ditto.
3551 (WTF::refPlatformPtr):
3552 (WTF::derefPlatformPtr):
3554 2010-08-25 Xan Lopez <xlopez@igalia.com>
3556 Reviewed by Alexey Proskuryakov.
3558 Remove dead code in JSGlobalObject
3559 https://bugs.webkit.org/show_bug.cgi?id=44615
3561 The recursion data member in the JSGlobalObject and its getter
3562 plus inc/dec methods seems to be unused, remove them.
3564 * runtime/JSGlobalObject.cpp:
3565 (JSC::JSGlobalObject::init):
3566 * runtime/JSGlobalObject.h:
3568 2010-08-25 Michael Saboff <msaboff@apple.com>
3570 Reviewed by Geoffrey Garen.
3572 Changed the initial and subsequent allocation of vector storage to
3573 Array()s. The changes are to limit sparse arrays to 100000 entries
3574 and fixed the sparse map to vector storage conversion to use the
3575 minimum amount of memory needed to store the current number of entries.
3576 These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
3578 * runtime/JSArray.cpp:
3579 (JSC::JSArray::putSlowCase):
3580 (JSC::JSArray::getNewVectorLength):
3582 2010-08-16 Gabor Loki <loki@webkit.org>
3584 Reviewed by Gavin Barraclough.
3586 Avoid increasing required alignment of target type warning
3587 https://bugs.webkit.org/show_bug.cgi?id=43963
3589 Fix platform independent alignment warnings.
3591 * wtf/ListHashSet.h:
3592 (WTF::ListHashSetNodeAllocator::pool):
3594 2010-08-19 Gabor Loki <loki@webkit.org>
3596 Reviewed by Gavin Barraclough.
3598 Enable truncated floating point feature on ARM
3599 https://bugs.webkit.org/show_bug.cgi?id=44233
3601 Enable truncated floating point feature with the help of VCVTR.S32.F64
3602 instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
3603 integer/register, it saturates at INT_MAX or INT_MIN. Testing this
3604 looks quicker than testing FPSCR for exception.
3606 Inspired by Jacob Bramley's patch from JaegerMonkey
3608 * assembler/ARMAssembler.h:
3609 (JSC::ARMAssembler::):
3610 (JSC::ARMAssembler::cmn_r):
3611 (JSC::ARMAssembler::vcvtr_s32_f64_r):
3612 * assembler/MacroAssemblerARM.h:
3613 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3614 (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
3616 2010-08-24 Gavin Barraclough <barraclough@apple.com>
3620 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3622 2010-08-24 Gavin Barraclough <barraclough@apple.com>
3626 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3627 * wtf/DecimalNumber.h:
3628 (WTF::DecimalNumber::intPow10):
3632 2010-08-23 Gavin Barraclough <barraclough@apple.com>
3634 Reviewed by Oliver Hunt.
3636 https://bugs.webkit.org/show_bug.cgi?id=44487
3638 Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
3639 code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
3640 double to string conversion, share the implementations of rounding &
3641 decimal-fraction/exponential formatting.
3643 * JavaScriptCore.exp:
3646 * runtime/NumberPrototype.cpp:
3647 (JSC::toThisNumber):
3648 (JSC::getIntegerArgumentInRange):
3649 Helper methods used in implementing toExponential/toFixed/toString.
3650 (JSC::numberProtoFuncToExponential):
3651 (JSC::numberProtoFuncToFixed):
3652 (JSC::numberProtoFuncToPrecision):
3653 Reimplemented using new DecimalNumber class.
3655 * runtime/UString.cpp:
3656 (JSC::UString::number):
3657 Updated to call numberToString.
3659 * wtf/DecimalNumber.h: Added.
3661 (WTF::DecimalNumber::DecimalNumber):
3662 (WTF::DecimalNumber::toStringDecimal):
3663 (WTF::DecimalNumber::toStringExponential):
3664 (WTF::DecimalNumber::sign):
3665 (WTF::DecimalNumber::exponent):
3666 (WTF::DecimalNumber::significand):
3667 (WTF::DecimalNumber::precision):
3668 (WTF::DecimalNumber::init):
3669 (WTF::DecimalNumber::isZero):
3670 (WTF::DecimalNumber::roundToPrecision):
3671 New class to perform double to string conversion.
3672 Has three constructors, which allow conversion with no rounding,
3673 rounding to significant-figures, or rounding to decimal-places,
3674 and two methods for formatting strings, either using decimal
3675 fraction or exponential encoding. Internal implementation uses
3676 pre-rounding of the values before calling dtoa rather than
3677 relying on dtoa to correctly round, which does not produce
3678 fully accurate results. Hopefully we can address this in the
3684 intPow10 is used internally by DecimalNumber.
3686 * wtf/text/WTFString.cpp:
3687 (WTF::copyToString):
3688 (WTF::nanOrInfToString):
3689 Used internally in numberToString for NaN/Infinity handling.
3690 (WTF::numberToString):
3691 Added new method to convert doubles to strings.
3693 * wtf/text/WTFString.h:
3694 Added declaration for numberToString. This is here because
3695 we should switch over to using this for all double to string
3696 conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
3698 2010-08-24 Oliver Hunt <oliver@apple.com>
3700 Reviewed by Geoff Garen.
3702 Don't seed the JS random number generator from time()
3703 https://bugs.webkit.org/show_bug.cgi?id=41868
3704 <rdar://problem/8171025>
3706 Switch to using the secure random number generator to
3707 seed the fast random generator, and make the generator
3708 be per global object.
3710 * runtime/JSGlobalData.cpp:
3711 (JSC::JSGlobalData::JSGlobalData):
3712 * runtime/JSGlobalData.h:
3713 * runtime/JSGlobalObject.h:
3714 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3715 (JSC::JSGlobalObject::weakRandomNumber):
3716 * runtime/MathObject.cpp:
3717 (JSC::mathProtoFuncRandom):
3719 2010-08-24 Oliver Hunt <oliver@apple.com>
3721 Reviewed by Beth Dakin.
3723 Make overflow guards in UString::utf8 explicit
3724 https://bugs.webkit.org/show_bug.cgi?id=44540
3726 Add an explicit overflow check prior to allocating our buffer,
3727 rather than implicitly relying on the guard in convertUTF16ToUTF8.
3729 * runtime/UString.cpp:
3730 (JSC::UString::utf8):
3732 2010-08-24 Yael Aharon <yael.aharon@nokia.com>
3734 Reviewed by Simon Hausmann.
3736 [Symbian] Fix commit/decommit of system memory using RChunk
3738 Swap accidentially reversed start and m_base values for determining the
3739 offset within the RChunk.
3741 * wtf/PageReservation.h:
3742 (WTF::PageReservation::systemCommit):
3743 (WTF::PageReservation::systemDecommit):
3745 2010-08-23 Patrick Gansterer <paroga@paroga.com>
3747 Rubber-stamped by Gabor Loki.
3749 [WINCE] Buildfix for GeneratedJITStubs after r64818
3750 https://bugs.webkit.org/show_bug.cgi?id=44469
3752 Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
3756 2010-08-23 Oliver Hunt <oliver@apple.com>
3758 Reviewed by Darin Adler.
3760 [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
3761 https://bugs.webkit.org/show_bug.cgi?id=44240
3762 <rdar://problem/8328995>
3764 Fix an error I introduced when cleaning up the interpreter side of the logic
3765 to prevent setters being called in object initialisers.
3767 * interpreter/Interpreter.cpp:
3768 (JSC::Interpreter::privateExecute):
3770 2010-08-23 Michael Saboff <msaboff@apple.com>
3772 Reviewed by Oliver Hunt.
3774 Fixed case where a single character search string in a string.replace()
3775 did not properly handle back reference replacement. The fix is to
3776 check for a '$' as part of the check to see if we can execute the
3777 single character replace optimization.
3778 https://bugs.webkit.org/show_bug.cgi?id=44067
3780 * runtime/StringPrototype.cpp:
3781 (JSC::stringProtoFuncReplace):
3783 2010-08-23 Oliver Hunt <oliver@apple.com>
3785 Reviewed by Gavin Barraclough.
3787 JSON.stringify is much slower than Firefox on particular pathological input
3788 https://bugs.webkit.org/show_bug.cgi?id=44456
3790 Make StringBuilder::reserveCapacity reserve additional space so we don't end up
3791 repeatedly copying the entire result string.
3793 * runtime/StringBuilder.h:
3794 (JSC::StringBuilder::append):
3795 (JSC::StringBuilder::reserveCapacity):
3797 2010-08-23 Jian Li <jianli@chromium.org>
3799 Reviewed by Darin Fisher.
3801 Handle blob resource.
3802 https://bugs.webkit.org/show_bug.cgi?id=43941
3804 * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
3806 2010-08-19 Andreas Kling <andreas.kling@nokia.com>
3808 Reviewed by Geoffrey Garen.
3810 JSC: Move the static_cast into to(U)Int32 fast case
3811 https://bugs.webkit.org/show_bug.cgi?id=44037
3813 Do the static_cast<(u)int32_t> inline to avoid the function call overhead
3814 for easily converted values (within (u)int32_t range.)
3816 * runtime/JSValue.cpp:
3817 (JSC::toInt32SlowCase):
3818 (JSC::toUInt32SlowCase):
3819 * runtime/JSValue.h:
3820 (JSC::JSValue::toInt32):
3821 (JSC::JSValue::toUInt32):
3823 2010-08-18 Andreas Kling <andreas.kling@nokia.com>
3825 Reviewed by Geoffrey Garen.
3827 REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
3828 https://bugs.webkit.org/show_bug.cgi?id=43742
3830 Add codegen for pow() to return Int32 values when possible.
3832 * jit/ThunkGenerators.cpp:
3833 (JSC::powThunkGenerator):
3835 2010-08-18 Gabor Loki <loki@webkit.org>
3837 Reviewed by Gavin Barraclough.
3839 The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
3840 https://bugs.webkit.org/show_bug.cgi?id=43897
3842 A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
3843 default, but this is not taken into account in the offset defines of
3849 2010-08-18 Gavin Barraclough <barraclough@apple.com>
3851 Rubber stamped by Sam Weinig.
3853 Rename UString::substr to substringSharingImpl, add to WTF::String.
3854 Now WTF::String can do everything that JSC::UString can do!
3856 * JavaScriptCore.exp:
3857 * bytecode/CodeBlock.cpp:
3858 (JSC::escapeQuotes):
3859 * bytecompiler/NodesCodegen.cpp:
3861 * parser/SourceProvider.h:
3862 (JSC::UStringSourceProvider::getRange):
3863 * runtime/FunctionPrototype.cpp:
3864 (JSC::insertSemicolonIfNeeded):
3865 * runtime/JSGlobalObjectFunctions.cpp:
3867 * runtime/JSONObject.cpp:
3869 (JSC::Stringifier::indent):
3870 (JSC::Stringifier::unindent):
3871 * runtime/JSString.cpp:
3872 (JSC::JSString::replaceCharacter):
3873 * runtime/NumberPrototype.cpp:
3874 (JSC::numberProtoFuncToFixed):
3875 (JSC::numberProtoFuncToPrecision):
3876 * runtime/StringPrototype.cpp:
3877 (JSC::stringProtoFuncReplace):
3879 * runtime/UString.cpp:
3880 (JSC::UString::substringSharingImpl):
3881 * runtime/UString.h:
3882 * wtf/text/WTFString.cpp:
3883 (WTF::String::substringSharingImpl):
3884 * wtf/text/WTFString.h:
3886 2010-08-18 Gavin Barraclough <barraclough@apple.com>
3890 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3891 * JavaScriptCore.xcodeproj/project.pbxproj:
3893 2010-08-18 Gavin Barraclough <barraclough@apple.com>
3897 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3898 * JavaScriptCore.xcodeproj/project.pbxproj:
3900 2010-08-17 Gavin Barraclough <barraclough@apple.com>
3902 Reviewed by Sam Weinig.
3904 Bug 44146 - Remove toDouble/toUInt32 methods from UString.
3906 These methods all implement JavaScript language specific behaviour, and as such
3907 are not suited to being on a generic string object. They are also inefficient
3908 and incorrectly used, refactor & cleanup. Uses of these methods really divide
3912 Uses of toDouble from JSString and from parseFloat are implementing ecma's
3913 ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
3914 should largely just be moved out to a global jsToNumber function. ToNumber is
3915 capable of recognizing either decimal or hexadecimal numbers, but parseFloat
3916 should only recognize decimal values. This is currently handled by testing for
3917 hexadecimal before calling toDouble, which should unnecessary - instead we can
3918 just split out the two parts to the grammar into separate functions. Also,
3919 strtod recognizes a set of literals (nan, inf, and infinity - all with any
3920 capitalization) - which are not defined by any of the specs we are implementing.
3921 To handle this we need to perform additional work in toDouble to convert the
3922 unsupported cases of infinities back to NaNs. Instead we should simply remove
3923 support for this literals from strtod. This should provide a more desirable
3924 behaviour for all clients of strtod.
3927 Uses of the toStrictUInt32 methods are were all converting property names to
3928 indices, and all uses of toUInt32 were incorrect; in all cases we should have
3929 been calling toUInt32. This error results in some incorrect behaviour in the
3930 DOM (accessing property "0 " of a NodeList should fail; it currently does not).
3931 Move this method onto Identifier (our canonical property name), and make it
3932 always perform a strict conversion. Add a layout test to check NodeList does
3933 convert indexed property names correctly.
3935 * JavaScriptCore.exp:
3936 * runtime/Arguments.cpp:
3937 (JSC::Arguments::getOwnPropertySlot):
3938 (JSC::Arguments::getOwnPropertyDescriptor):
3939 (JSC::Arguments::put):
3940 (JSC::Arguments::deleteProperty):
3941 * runtime/Identifier.cpp:
3942 (JSC::Identifier::toUInt32):
3943 * runtime/Identifier.h:
3944 (JSC::Identifier::toUInt32):
3945 * runtime/JSArray.cpp:
3946 (JSC::JSArray::getOwnPropertySlot):
3947 (JSC::JSArray::getOwnPropertyDescriptor):
3948 (JSC::JSArray::put):
3949 (JSC::JSArray::deleteProperty):
3950 * runtime/JSArray.h:
3951 (JSC::Identifier::toArrayIndex):
3952 * runtime/JSByteArray.cpp:
3953 (JSC::JSByteArray::getOwnPropertySlot):
3954 (JSC::JSByteArray::getOwnPropertyDescriptor):
3955 (JSC::JSByteArray::put):
3956 * runtime/JSGlobalObjectFunctions.cpp:
3958 (JSC::jsHexIntegerLiteral):
3959 (JSC::jsStrDecimalLiteral):
3962 * runtime/JSGlobalObjectFunctions.h:
3963 * runtime/JSString.cpp:
3964 (JSC::JSString::getPrimitiveNumber):
3965 (JSC::JSString::toNumber):
3966 (JSC::JSString::getStringPropertyDescriptor):
3967 * runtime/JSString.h:
3968 (JSC::JSString::getStringPropertySlot):
3969 * runtime/ObjectPrototype.cpp:
3970 (JSC::ObjectPrototype::put):
3971 * runtime/StringObject.cpp:
3972 (JSC::StringObject::deleteProperty):
3973 * runtime/UString.cpp:
3974 * runtime/UString.h:
3978 2010-08-17 Gavin Barraclough <barraclough@apple.com>
3980 Reviewed by Sam Weinig.
3982 Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
3984 Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
3985 One of these was fixed in r65493, this patch fixes the other and address the
3986 concerns voiced in comment #6 by restructuring the loops to remove the code
3987 dupliction without introducing an additional if check.
3989 * wtf/text/StringImpl.cpp:
3990 (WTF::StringImpl::find):
3991 (WTF::StringImpl::findIgnoringCase):
3992 (WTF::StringImpl::reverseFind):
3993 (WTF::StringImpl::reverseFindIgnoringCase):
3995 2010-08-17 No'am Rosenthal <noam.rosenthal@nokia.com>
3997 Reviewed by Ariya Hidayat.
3999 [Qt] Move the accelerated compositing build flag to the right place
4000 https://bugs.webkit.org/show_bug.cgi?id=43882
4004 2010-08-17 Yuta Kitamura <yutak@chromium.org>
4006 Reviewed by Shinichiro Hamaji.
4008 Avoid uninitialized memory read in StringImpl::find().
4010 REGRESSION(r65468): Crashes in StringImpl::find
4011 https://bugs.webkit.org/show_bug.cgi?id=44099
4013 * wtf/text/StringImpl.cpp:
4014 (WTF::StringImpl::find):
4016 2010-08-16 Gavin Barraclough <barraclough@apple.com>
4018 Rubber stamped by Sam Weinig
4020 Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
4022 * runtime/UString.h:
4023 (JSC::UStringHash::hash):
4024 (JSC::UStringHash::equal):
4026 * wtf/text/WTFString.h:
4029 2010-08-16 Gavin Barraclough <barraclough@apple.com>
4031 Rubber stamped by Sam Weinig
4033 Remove unnecessary includes from UString.h, add new includes as necessary.
4035 * profiler/CallIdentifier.h:
4036 * profiler/ProfileNode.h:
4037 * runtime/DateConversion.cpp:
4038 * runtime/Identifier.h:
4039 (JSC::IdentifierRepHash::hash):
4040 * runtime/RegExpCache.h:
4041 * runtime/RegExpKey.h:
4042 * runtime/UString.cpp:
4043 (JSC::UString::substr):
4044 * runtime/UString.h:
4045 * wtf/text/WTFString.h:
4047 2010-08-16 Gavin Barraclough <barraclough@apple.com>
4049 Reviewed by Sam Weinig
4051 Bug 44080 - String find/reverseFind methods need tidying up
4052 These methods have a couple of problems with their interface, and implementation.
4054 These methods take and int index, and return an int - however this is problematic
4055 since on 64-bit string indices may have a full 32-bit range. This spills out into
4056 surrounding code, which unsafely casts string indices from unsigned to int. Code
4057 checking the result of these methods check for a mix of "== -1", "< 0", and
4058 "== notFound". Clean this up by changing these methods to take an unsigned
4059 starting index, and return a size_t. with a failed match indicated by notFound.
4060 reverseFind also has a special meaning for the starting index argument, in that a
4061 negative index is interpreted as an offset back from the end of the string. Remove
4062 this functionality, in the (1!) case where it is used we should just calculate the
4063 offset by subtracting from the string's length.
4065 The implementation has a few problems too. The code is not in webkit style, in
4066 using assorted abbreviations in variable names, and implementations of similar
4067 find methods with differing argument types were unnecessarily inconsistent. When
4068 find is passed const char* data the string would be handled as latin1 (zero
4069 extended to UTF-16) for all characters but the first; this is sign extended.
4070 Case-insensitive find is broken for unicode strings; the hashing optimization is
4071 not unicode safe, and could result in false negatives.
4073 Unify UString find methods to match String.
4075 * JavaScriptCore.exp:
4076 * bytecode/CodeBlock.cpp:
4077 (JSC::escapeQuotes):
4078 * bytecompiler/NodesCodegen.cpp:
4080 * runtime/JSString.cpp:
4081 (JSC::JSString::replaceCharacter):
4082 * runtime/RegExp.cpp:
4083 (JSC::RegExp::RegExp):
4084 * runtime/RegExpKey.h:
4085 (JSC::RegExpKey::getFlagsValue):
4086 * runtime/StringPrototype.cpp:
4087 (JSC::substituteBackreferencesSlow):
4088 (JSC::substituteBackreferences):
4089 (JSC::stringProtoFuncReplace):
4090 (JSC::stringProtoFuncIndexOf):
4091 (JSC::stringProtoFuncLastIndexOf):
4092 (JSC::stringProtoFuncSplit):
4093 * runtime/UString.cpp:
4094 * runtime/UString.h:
4095 (JSC::UString::find):
4096 (JSC::UString::reverseFind):
4097 * wtf/text/AtomicString.h:
4098 (WTF::AtomicString::find):
4099 * wtf/text/StringImpl.cpp:
4100 (WTF::StringImpl::find):
4101 (WTF::StringImpl::findCaseInsensitive):
4102 (WTF::StringImpl::reverseFind):
4103 (WTF::StringImpl::reverseFindCaseInsensitive):
4104 (WTF::StringImpl::endsWith):
4105 (WTF::StringImpl::replace):
4106 * wtf/text/StringImpl.h:
4107 (WTF::StringImpl::startsWith):
4108 * wtf/text/WTFString.cpp:
4109 (WTF::String::split):
4110 * wtf/text/WTFString.h:
4111 (WTF::String::find):
4112 (WTF::String::reverseFind):
4113 (WTF::String::findCaseInsensitive):
4114 (WTF::String::reverseFindCaseInsensitive):
4115 (WTF::String::contains):
4119 2010-08-16 Kevin Ollivier <kevino@theolliviers.com>
4121 [wx] Build fix, do not build WebCore as a convenience library as this leads to
4122 errors in the Win build w/export symbols and causes problems with DOM bindings
4127 2010-08-16 Leandro Pereira <leandro@profusion.mobi>
4129 [EFL] Build fix after r65366.
4131 * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
4133 * jsc/CMakeLists.txt: Ditto.
4134 * wtf/CMakeLists.txt: Ditto.
4136 2010-08-15 Kevin Ollivier <kevino@theolliviers.com>
4138 [wx] Build fix, don't build intermediate source in DerivedSources dir.
4142 2010-08-14 Patrick Gansterer <paroga@paroga.com>
4144 Reviewed by Kenneth Rohde Christiansen.
4146 [CMake] Add preprocessor detection for generator scripts
4147 https://bugs.webkit.org/show_bug.cgi?id=43984
4151 2010-08-14 Patrick Gansterer <paroga@paroga.com>
4153 Reviewed by Kenneth Rohde Christiansen.
4155 [CMake] Set target properties only if available
4156 https://bugs.webkit.org/show_bug.cgi?id=43978
4159 * jsc/CMakeLists.txt:
4160 * wtf/CMakeLists.txt:
4162 2010-08-13 Kevin Ollivier <kevino@theolliviers.com>
4164 [wx] Build fix, add CString to the list of forwards.
4168 2010-08-13 Gavin Barraclough <barraclough@apple.com>
4172 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4174 2010-08-13 Gavin Barraclough <barraclough@apple.com>
4178 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4180 2010-08-13 Gavin Barraclough <barraclough@apple.com>
4184 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4186 2010-08-13 Gavin Barraclough <barraclough@apple.com>
4188 Rubber stamped by Sam Weinig.
4189 Switch String::/UString::ascii() to return a CString.
4191 * JavaScriptCore.exp:
4192 * JavaScriptCore.xcodeproj/project.pbxproj:
4193 * bytecode/CodeBlock.cpp:
4194 (JSC::CodeBlock::dump):
4195 * bytecode/SamplingTool.cpp:
4196 (JSC::SamplingTool::dump):
4197 * interpreter/CallFrame.cpp:
4198 (JSC::CallFrame::dumpCaller):
4202 * runtime/Identifier.h:
4203 (JSC::Identifier::ascii):
4204 * runtime/ScopeChain.cpp:
4205 (JSC::ScopeChainNode::print):
4206 * runtime/UString.cpp:
4207 (JSC::UString::ascii):
4208 (JSC::UString::latin1):
4209 * runtime/UString.h:
4210 * wtf/text/StringImpl.cpp:
4211 (WTF::StringImpl::asciiOLD):
4212 * wtf/text/StringImpl.h:
4213 * wtf/text/WTFString.cpp:
4214 (WTF::String::ascii):
4215 (WTF::String::latin1):
4216 * wtf/text/WTFString.h:
4218 2010-08-13 Gabor Loki <loki@webkit.org>
4220 Reviewed by Gavin Barraclough.
4222 Avoid increasing required alignment of target type warning on ARM
4223 https://bugs.webkit.org/show_bug.cgi?id=38045
4225 The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
4226 sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
4227 increases required alignment of target type warnings.