1 2010-10-15 Ilya Tikhonovsky <loislo@chromium.org>
3 Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
5 * yarr/RegexInterpreter.cpp:
6 (JSC::Yarr::ByteCompiler::emitDisjunction):
8 2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
10 Reviewed by Gavin Barraclough.
12 The parenthetical assertion checking isn't working in some cases with YARR
14 https://bugs.webkit.org/show_bug.cgi?id=46893
16 Calculate the countToCheck value of a TypeParentheticalAssertion by
17 subtracting the number of characters which follows
18 a TypeParentheticalAssertion term with the number of characters which should
19 be matched by terms which are contained
20 in the TypeParentheticalAssertion term (minimumSize).
22 * yarr/RegexInterpreter.cpp:
23 (JSC::Yarr::ByteCompiler::emitDisjunction):
25 2010-10-14 Nathan Vander Wilt <nate@andyet.net>
27 Reviewed by Darin Adler.
29 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
31 * runtime/DateConversion.cpp:
34 (WTF::ymdhmsToSeconds):
35 (WTF::parseES5DateFromNullTerminatedCharacters):
38 2010-10-14 Nikolas Zimmermann <nzimmermann@rim.com>
40 Reviewed by Gavin Barraclough.
42 Replace lots of String::format() usages by StringConcatenate
43 https://bugs.webkit.org/show_bug.cgi?id=47664
45 Add StringTypeAdapter<char> to accept single characters for makeString().
47 * wtf/text/StringConcatenate.h:
50 2010-10-14 David Goodwin <david_goodwin@apple.com>
52 Reviewed by Darin Adler.
54 need way to measure size of JITed ARM code
55 https://bugs.webkit.org/show_bug.cgi?id=47121
57 * assembler/LinkBuffer.h:
58 (JSC::LinkBuffer::linkCode):
59 (JSC::LinkBuffer::dumpLinkStats):
60 (JSC::LinkBuffer::dumpCode):
62 2010-10-14 Peter Varga <pvarga@inf.u-szeged.hu>
64 Reviewed by Gavin Barraclough.
66 The backreference checking isn't working in some cases with YARR Interpreter
67 https://bugs.webkit.org/show_bug.cgi?id=46904
69 The Interpreter::matchBackReference() function returns true without matching
70 when a backreference points to the same parentheses where it is.
72 * yarr/RegexInterpreter.cpp:
73 (JSC::Yarr::Interpreter::matchBackReference):
75 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
77 Reviewed by Andreas Kling.
79 [Qt] Text breaking is slow: enable ICU as an opt-in
80 https://bugs.webkit.org/show_bug.cgi?id=40332
82 Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
83 Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
86 * wtf/unicode/qt4/UnicodeQt4.h:
87 (WTF::Unicode::toLower):
88 (WTF::Unicode::toUpper):
89 (WTF::Unicode::toTitleCase):
90 (WTF::Unicode::foldCase):
91 (WTF::Unicode::isPrintableChar):
92 (WTF::Unicode::isSeparatorSpace):
93 (WTF::Unicode::isPunct):
94 (WTF::Unicode::isLower):
95 (WTF::Unicode::mirroredChar):
96 (WTF::Unicode::combiningClass):
97 (WTF::Unicode::direction):
98 (WTF::Unicode::category):
100 2010-10-14 Anton Faern <anton@bladehawke.com>
102 Reviewed by Csaba Osztrogonác.
104 https://bugs.webkit.org/show_bug.cgi?id=47658
105 NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
106 change. This means that OS(NETBSD) is also undefined.
108 * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
110 2010-10-13 David Goodwin <david_goodwin@apple.com>
112 Reviewed by Oliver Hunt.
114 ARMv7 JIT should generated conditional branches when possible
115 https://bugs.webkit.org/show_bug.cgi?id=47384
117 Use different jump padding sizes for conditional and unconditional
118 jumps (12 bytes and 10 bytes respectively). This allows the JIT to
119 include the IT instruction as part of the conditional jump sequence
120 which in turn allows it to optimize away the IT using an ARMv7
121 conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
122 conditional branches when displacement is in range. Also use IT/B(T4)
123 for conditional branch when displacement does not fit in B(T3).
125 For unconditional jump, instruction selection options are:
126 B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
127 options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
129 * assembler/ARMv7Assembler.cpp:
130 * assembler/ARMv7Assembler.h:
131 (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
132 (JSC::ARMv7Assembler::ifThenElse):
133 (JSC::ARMv7Assembler::jumpSizeDelta):
134 (JSC::ARMv7Assembler::canCompact):
135 (JSC::ARMv7Assembler::computeJumpType):
136 (JSC::ARMv7Assembler::link):
137 (JSC::ARMv7Assembler::canBeJumpT1):
138 (JSC::ARMv7Assembler::canBeJumpT3):
139 (JSC::ARMv7Assembler::canBeJumpT4):
140 (JSC::ARMv7Assembler::linkJumpT1):
141 (JSC::ARMv7Assembler::linkJumpT3):
142 (JSC::ARMv7Assembler::linkJumpT4):
143 (JSC::ARMv7Assembler::linkConditionalJumpT4):
144 (JSC::ARMv7Assembler::linkBX):
145 (JSC::ARMv7Assembler::linkConditionalBX):
146 (JSC::ARMv7Assembler::linkJumpAbsolute):
147 * assembler/LinkBuffer.h:
148 (JSC::LinkBuffer::linkCode):
149 * assembler/MacroAssemblerARMv7.h:
150 (JSC::MacroAssemblerARMv7::canCompact):
151 (JSC::MacroAssemblerARMv7::computeJumpType):
152 (JSC::MacroAssemblerARMv7::jumpSizeDelta):
153 (JSC::MacroAssemblerARMv7::jump):
154 (JSC::MacroAssemblerARMv7::nearCall):
155 (JSC::MacroAssemblerARMv7::call):
156 (JSC::MacroAssemblerARMv7::ret):
157 (JSC::MacroAssemblerARMv7::tailRecursiveCall):
158 (JSC::MacroAssemblerARMv7::makeJump):
159 (JSC::MacroAssemblerARMv7::makeBranch):
161 2010-10-13 Fridrich Strba <fridrich.strba@bluewin.ch>
163 Reviewed by Darin Adler.
165 Don't depend on Windows on sched_yield and sched.h
166 https://bugs.webkit.org/show_bug.cgi?id=45543
168 sched.h is part of pthreads and sched_yield is implemented
169 in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
170 dependency on pthreads-win32 in this file.
175 2010-10-13 Kwang Yul Seo <skyul@company100.net>
177 Reviewed by Kent Tamura.
179 [BREWMP] Port unicode
180 https://bugs.webkit.org/show_bug.cgi?id=45716
182 Brew MP port uses only the subset of ICU library to reduce the binary size.
183 Follow the WinCE's implementation.
186 * wtf/unicode/Unicode.h:
187 * wtf/unicode/brew/UnicodeBrew.cpp: Added.
188 (WTF::Unicode::toLower):
189 (WTF::Unicode::toUpper):
190 (WTF::Unicode::foldCase):
191 (WTF::Unicode::isPrintableChar):
192 (WTF::Unicode::isUpper):
193 (WTF::Unicode::isLower):
194 (WTF::Unicode::isDigit):
195 (WTF::Unicode::isPunct):
196 (WTF::Unicode::isAlphanumeric):
197 (WTF::Unicode::toTitleCase):
198 (WTF::Unicode::direction):
199 (WTF::Unicode::category):
200 (WTF::Unicode::decompositionType):
201 (WTF::Unicode::combiningClass):
202 (WTF::Unicode::mirroredChar):
203 (WTF::Unicode::digitValue):
204 (WTF::Unicode::isSpace):
205 (WTF::Unicode::isLetter):
206 * wtf/unicode/brew/UnicodeBrew.h: Added.
207 (WTF::Unicode::isArabicChar):
208 (WTF::Unicode::isSeparatorSpace):
209 (WTF::Unicode::hasLineBreakingPropertyComplexContext):
210 (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
211 (WTF::Unicode::umemcasecmp):
213 2010-10-13 Gavin Barraclough <barraclough@apple.com>
217 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
219 2010-10-13 Adam Barth <abarth@webkit.org>
221 Reviewed by Maciej Stachowiak.
223 [WTFURL] Add URLQueryCanonicalizer
224 https://bugs.webkit.org/show_bug.cgi?id=45088
226 This class canonicalizes the query component of URLs. The main tricky
227 bit there is the convertCharset function, which I've moved to a
228 templated dependency. There'll likely be more about that in future
231 * JavaScriptCore.xcodeproj/project.pbxproj:
232 * wtf/url/src/URLEscape.cpp: Added.
233 * wtf/url/src/URLEscape.h: Added.
234 (WTF::appendEscapedCharacter):
235 * wtf/url/src/URLQueryCanonicalizer.h: Added.
236 (WTF::URLQueryCanonicalizer::canonicalize):
237 (WTF::URLQueryCanonicalizer::isAllASCII):
238 (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
239 (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
241 2010-10-13 Gavin Barraclough <barraclough@apple.com>
243 Reviewed by Oliver Hunt.
245 Bug 43987 - Downloading using XHR is much slower than before
246 Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
247 Fundamentally this should be the same (copies current contents to expand capacity,
248 rather than using a rope), but this approach allows the intermadiate state of the
249 String to be inspected in the buffer without copying to resolve.
251 * runtime/JSONObject.cpp:
252 (JSC::Stringifier::appendQuotedString):
253 (JSC::Stringifier::Holder::appendNextProperty):
254 Renamed StringBuilder::size() -> length() (to match other String types).
256 * runtime/UStringBuilder.h:
257 (JSC::UStringBuilder::append):
258 (JSC::UStringBuilder::toUString):
259 Update for changes in parent class, can just 'using' the append methods.
261 * wtf/text/StringBuilder.cpp: Added.
262 (WTF::StringBuilder::reifyString):
263 (WTF::StringBuilder::resize):
264 (WTF::StringBuilder::reserveCapacity):
265 (WTF::StringBuilder::allocateBuffer):
266 (WTF::StringBuilder::appendUninitialized):
267 (WTF::StringBuilder::append):
268 (WTF::StringBuilder::shrinkToFit):
269 * wtf/text/StringBuilder.h:
270 (WTF::StringBuilder::StringBuilder):
271 (WTF::StringBuilder::append):
272 (WTF::StringBuilder::toString):
273 (WTF::StringBuilder::toStringPreserveCapacity):
274 (WTF::StringBuilder::length):
275 (WTF::StringBuilder::isEmpty):
276 (WTF::StringBuilder::operator[]):
277 (WTF::StringBuilder::clear):
278 Class updated to use overcapacity in a StringImpl, rather than a Vector.
283 * JavaScriptCore.exp:
284 * JavaScriptCore.gypi:
285 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
286 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
287 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
288 * JavaScriptCore.xcodeproj/project.pbxproj:
289 * wtf/CMakeLists.txt:
292 2010-10-13 Adam Roben <aroben@apple.com>
294 Export tryFastRealloc for WebKit2's benefit
296 Rubber-stamped by Anders Carlsson.
298 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
299 tryFastRealloc. Removed RegExpObject::info, which is now exported via
302 2010-10-13 Adam Barth <abarth@webkit.org>
304 Reviewed by Maciej Stachowiak.
306 [WTFURL] Add a mechanism for classifying types of characters
307 https://bugs.webkit.org/show_bug.cgi?id=45085
309 Various characters have different escaping rules depending on where
310 they are in URLs. This patch adds a table containing that information.
312 * JavaScriptCore.xcodeproj/project.pbxproj:
313 * wtf/url/src/URLCharacterTypes.cpp: Added.
314 * wtf/url/src/URLCharacterTypes.h: Added.
315 (WTF::URLCharacterTypes::isQueryChar):
316 (WTF::URLCharacterTypes::isIPv4Char):
317 (WTF::URLCharacterTypes::isHexChar):
318 (WTF::URLCharacterTypes::isCharOfType):
320 2010-10-13 Xan Lopez <xlopez@igalia.com>
322 Reviewed by Csaba Osztrogonác.
324 Missing parameters for bytecode dump of next_pname
325 https://bugs.webkit.org/show_bug.cgi?id=47590
327 * bytecode/CodeBlock.cpp:
328 (JSC::CodeBlock::dump): add missing parameters to the dump.
330 2010-10-13 Nikolas Zimmermann <nzimmermann@rim.com>
332 Reviewed by Dirk Schulze.
334 Add wtf/text/StringConcatenate
335 https://bugs.webkit.org/show_bug.cgi?id=47584
337 Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
338 Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
339 Exactly the same design that has been followed while refactoring StringBuilder.
341 The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
343 * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
344 * JavaScriptCore.gypi: Ditto.
345 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
346 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
347 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
348 * bytecode/CodeBlock.cpp: s/makeString/makeUString/
350 (JSC::valueToSourceString):
353 (JSC::CodeBlock::registerName):
354 (JSC::regexpToSourceString):
356 * bytecompiler/NodesCodegen.cpp: Ditto.
358 * profiler/Profiler.cpp: Ditto.
359 (JSC::Profiler::createCallIdentifier):
360 * runtime/ExceptionHelpers.cpp: Ditto.
361 (JSC::createUndefinedVariableError):
362 (JSC::createErrorMessage):
363 (JSC::createInvalidParamError):
364 * runtime/FunctionConstructor.cpp: Ditto.
365 (JSC::constructFunction):
366 * runtime/FunctionPrototype.cpp: Ditto.
367 (JSC::insertSemicolonIfNeeded):
368 * runtime/JSONObject.cpp: Ditto.
369 (JSC::Stringifier::indent):
370 * runtime/JSStringBuilder.h:
371 (JSC::jsMakeNontrivialString):
372 * runtime/RegExpConstructor.cpp: Ditto.
373 (JSC::constructRegExp):
374 * runtime/RegExpObject.cpp: Ditto.
375 (JSC::RegExpObject::match):
376 * runtime/RegExpPrototype.cpp: Ditto.
377 (JSC::regExpProtoFuncCompile):
378 * runtime/StringConcatenate.h: Removed.
379 * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
381 * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
384 2010-10-12 Gavin Barraclough <barraclough@apple.com>
388 * wtf/text/StringBuilder.h:
389 (WTF::StringBuilder::length):
391 2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
393 Reviewed by Gavin Barraclough.
395 Unify JSC::StringBuilder & WebCore::StringBuilder
396 https://bugs.webkit.org/show_bug.cgi?id=47538
398 Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
399 Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
400 UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
402 No new code, just move code around.
404 * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
405 * JavaScriptCore.gypi: Ditto.
406 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
407 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
408 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
409 * runtime/Executable.cpp:
410 (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
411 * runtime/FunctionConstructor.cpp:
412 (JSC::constructFunction): Ditto.
413 * runtime/JSGlobalObjectFunctions.cpp:
414 (JSC::globalFuncUnescape): Ditto.
415 * runtime/JSONObject.cpp:
416 (JSC::Stringifier::stringify): Ditto.
417 (JSC::Stringifier::appendQuotedString): Ditto.
418 (JSC::Stringifier::appendStringifiedValue): Ditto.
419 (JSC::Stringifier::startNewLine): Ditto.
420 (JSC::Stringifier::Holder::appendNextProperty): Ditto.
421 * runtime/LiteralParser.cpp:
422 (JSC::LiteralParser::Lexer::lexString): Ditto.
423 * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
424 * runtime/StringBuilder.h: Removed.
425 * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
426 (JSC::UStringBuilder::append): append(const JSC::UString&)
427 (JSC::UStringBuilder::toUString):
428 * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
429 (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
430 (WTF::StringBuilder::isEmpty): Ditto (+ constify method).
431 (WTF::StringBuilder::reserveCapacity): Ditto.
432 (WTF::StringBuilder::resize): Ditto.
433 (WTF::StringBuilder::size): Ditto.
434 (WTF::StringBuilder::operator[]): Ditto.
435 (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.
437 2010-10-12 Michael Saboff <msaboff@apple.com>
439 Reviewed by Oliver Hunt.
441 Cleaned up the processing of replacements after regular expression
442 processing, especially the case where there wasn't a match.
443 Changed to use empty strings instead of computing a zero length sub
445 https://bugs.webkit.org/show_bug.cgi?id=47506
447 * runtime/StringPrototype.cpp:
448 (JSC::jsSpliceSubstringsWithSeparators):
449 (JSC::stringProtoFuncReplace):
451 2010-10-11 Patrick Gansterer <paroga@webkit.org>
455 Clang build fix after r69472.
456 https://bugs.webkit.org/show_bug.cgi?id=46523
458 * wtf/text/StringHash.h:
460 2010-10-11 Oliver Hunt <oliver@apple.com>
462 Undo last minute change to 32bit build.
464 * jit/JITOpcodes32_64.cpp:
465 (JSC::JIT::emit_op_convert_this_strict):
467 2010-10-11 Brian Weinstein <bweinstein@apple.com>
469 Build fix for Windows. Add a necessary export from r69516.
471 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
473 2010-10-11 Oliver Hunt <oliver@apple.com>
475 Fix interpreter build -- was broken by incorrect merge.
477 * interpreter/Interpreter.cpp:
478 (JSC::Interpreter::privateExecute):
480 2010-10-01 Oliver Hunt <oliver@apple.com>
482 Reviewed by Gavin Barraclough.
484 [ES5] Implement strict mode
485 https://bugs.webkit.org/show_bug.cgi?id=10701
487 Initial strict mode implementation. This is the simplest
488 implementation that could possibly work and adds (hopefully)
489 all of the restrictions required by strict mode. There are
490 a number of inefficiencies, especially in the handling of
491 arguments and eval as smart implementations would make this
492 patch more complicated.
494 The SyntaxChecker AST builder has become somewhat more complex
495 as strict mode does require more parse tree information to
498 Summary of major changes to the parser:
499 * We track when we enter strict mode (this may come as a surprise)
500 * Strict mode actually requires a degree of AST knowledge to validate
501 so the SyntaxChecker now produces values that can be used to distinguish
503 * We now track variables that are written to. We do this to
504 statically identify writes to global properties that don't exist
505 and abort at that point. This should actually make it possible
506 to optimise some other cases in the future but for now it's
507 purely for validity checking. Currently writes are only tracked
509 * Labels are now tracked as it is now a syntax error to jump to a label
510 that does not exist (or to use break, continue, or return in a context
511 where they would be invalid).
514 * In order to get correct hanlding of the Arguments object all
515 strict mode functions that reference arguments create and tearoff
516 the arguments object on entry. This is not strictly necessary
517 but was the least work necessary to get the correct behaviour.
518 * PutPropertySlot now tracks whether it is being used for a strict
519 mode write, and if so Object::put will throw when a write can't be
521 * StrictEvalActivation was added as an "activation" object for strict
522 mode eval (so that strict eval does not introduce new variables into
523 the containing scope).
527 * JavaScriptCore.exp:
528 * JavaScriptCore.pro:
529 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
530 * JavaScriptCore.xcodeproj/project.pbxproj:
531 * bytecode/CodeBlock.cpp:
532 (JSC::CodeBlock::dump):
533 (JSC::CodeBlock::CodeBlock):
534 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
535 * bytecode/CodeBlock.h:
536 (JSC::CodeBlock::isStrictMode):
537 * bytecode/EvalCodeCache.h:
538 (JSC::EvalCodeCache::get):
540 * bytecompiler/BytecodeGenerator.cpp:
541 (JSC::BytecodeGenerator::BytecodeGenerator):
542 (JSC::BytecodeGenerator::createArgumentsIfNecessary):
543 (JSC::BytecodeGenerator::emitReturn):
544 * bytecompiler/BytecodeGenerator.h:
545 (JSC::BytecodeGenerator::isStrictMode):
546 (JSC::BytecodeGenerator::makeFunction):
547 * debugger/Debugger.cpp:
548 (JSC::evaluateInGlobalCallFrame):
549 * debugger/DebuggerCallFrame.cpp:
550 (JSC::DebuggerCallFrame::evaluate):
551 * interpreter/Interpreter.cpp:
552 (JSC::Interpreter::callEval):
553 (JSC::Interpreter::unwindCallFrame):
554 (JSC::Interpreter::execute):
555 (JSC::Interpreter::privateExecute):
557 (JSC::JIT::privateCompileMainPass):
558 (JSC::JIT::privateCompileSlowCases):
560 * jit/JITOpcodes.cpp:
561 (JSC::JIT::emit_op_get_pnames):
562 (JSC::JIT::emit_op_convert_this_strict):
563 (JSC::JIT::emitSlow_op_convert_this_strict):
564 * jit/JITOpcodes32_64.cpp:
565 (JSC::JIT::emit_op_get_pnames):
567 (JSC::DEFINE_STUB_FUNCTION):
569 * parser/ASTBuilder.h:
570 (JSC::ASTBuilder::createFunctionBody):
571 (JSC::ASTBuilder::isResolve):
572 * parser/JSParser.cpp:
573 (JSC::JSParser::next):
574 (JSC::JSParser::startLoop):
575 (JSC::JSParser::endLoop):
576 (JSC::JSParser::startSwitch):
577 (JSC::JSParser::endSwitch):
578 (JSC::JSParser::setStrictMode):
579 (JSC::JSParser::strictMode):
580 (JSC::JSParser::isValidStrictMode):
581 (JSC::JSParser::declareParameter):
582 (JSC::JSParser::breakIsValid):
583 (JSC::JSParser::pushLabel):
584 (JSC::JSParser::popLabel):
585 (JSC::JSParser::hasLabel):
586 (JSC::JSParser::DepthManager::DepthManager):
587 (JSC::JSParser::DepthManager::~DepthManager):
588 (JSC::JSParser::Scope::Scope):
589 (JSC::JSParser::Scope::startSwitch):
590 (JSC::JSParser::Scope::endSwitch):
591 (JSC::JSParser::Scope::startLoop):
592 (JSC::JSParser::Scope::endLoop):
593 (JSC::JSParser::Scope::inLoop):
594 (JSC::JSParser::Scope::breakIsValid):
595 (JSC::JSParser::Scope::pushLabel):
596 (JSC::JSParser::Scope::popLabel):
597 (JSC::JSParser::Scope::hasLabel):
598 (JSC::JSParser::Scope::isFunction):
599 (JSC::JSParser::Scope::declareVariable):
600 (JSC::JSParser::Scope::declareWrite):
601 (JSC::JSParser::Scope::deleteProperty):
602 (JSC::JSParser::Scope::declareParameter):
603 (JSC::JSParser::Scope::setNeedsFullActivation):
604 (JSC::JSParser::Scope::collectFreeVariables):
605 (JSC::JSParser::Scope::getUncapturedWrittenVariables):
606 (JSC::JSParser::Scope::getDeletedVariables):
607 (JSC::JSParser::Scope::setStrictMode):
608 (JSC::JSParser::Scope::strictMode):
609 (JSC::JSParser::Scope::isValidStrictMode):
610 (JSC::JSParser::pushScope):
611 (JSC::JSParser::popScope):
612 (JSC::JSParser::declareVariable):
613 (JSC::JSParser::declareWrite):
614 (JSC::JSParser::deleteProperty):
616 (JSC::JSParser::JSParser):
617 (JSC::JSParser::parseProgram):
618 (JSC::JSParser::parseSourceElements):
619 (JSC::JSParser::parseDoWhileStatement):
620 (JSC::JSParser::parseWhileStatement):
621 (JSC::JSParser::parseVarDeclarationList):
622 (JSC::JSParser::parseConstDeclarationList):
623 (JSC::JSParser::parseForStatement):
624 (JSC::JSParser::parseBreakStatement):
625 (JSC::JSParser::parseContinueStatement):
626 (JSC::JSParser::parseReturnStatement):
627 (JSC::JSParser::parseWithStatement):
628 (JSC::JSParser::parseSwitchStatement):
629 (JSC::JSParser::parseSwitchClauses):
630 (JSC::JSParser::parseSwitchDefaultClause):
631 (JSC::JSParser::parseTryStatement):
632 (JSC::JSParser::parseBlockStatement):
633 (JSC::JSParser::parseStatement):
634 (JSC::JSParser::parseFormalParameters):
635 (JSC::JSParser::parseFunctionBody):
636 (JSC::JSParser::parseFunctionInfo):
637 (JSC::JSParser::parseFunctionDeclaration):
638 (JSC::JSParser::parseExpressionOrLabelStatement):
639 (JSC::JSParser::parseIfStatement):
640 (JSC::JSParser::parseExpression):
641 (JSC::JSParser::parseAssignmentExpression):
642 (JSC::JSParser::parseConditionalExpression):
643 (JSC::JSParser::parseBinaryExpression):
644 (JSC::JSParser::parseStrictObjectLiteral):
645 (JSC::JSParser::parsePrimaryExpression):
646 (JSC::JSParser::parseMemberExpression):
647 (JSC::JSParser::parseUnaryExpression):
650 (JSC::Lexer::parseString):
653 (JSC::Lexer::isReparsing):
655 (JSC::ScopeNode::ScopeNode):
656 (JSC::FunctionBodyNode::FunctionBodyNode):
657 (JSC::FunctionBodyNode::create):
659 (JSC::ScopeNode::isStrictMode):
661 (JSC::Parser::parse):
663 (JSC::Parser::parse):
664 * parser/SyntaxChecker.h:
665 (JSC::SyntaxChecker::SyntaxChecker):
666 (JSC::SyntaxChecker::makeFunctionCallNode):
667 (JSC::SyntaxChecker::appendToComma):
668 (JSC::SyntaxChecker::createCommaExpr):
669 (JSC::SyntaxChecker::makeAssignNode):
670 (JSC::SyntaxChecker::makePrefixNode):
671 (JSC::SyntaxChecker::makePostfixNode):
672 (JSC::SyntaxChecker::makeTypeOfNode):
673 (JSC::SyntaxChecker::makeDeleteNode):
674 (JSC::SyntaxChecker::makeNegateNode):
675 (JSC::SyntaxChecker::makeBitwiseNotNode):
676 (JSC::SyntaxChecker::createLogicalNot):
677 (JSC::SyntaxChecker::createUnaryPlus):
678 (JSC::SyntaxChecker::createVoid):
679 (JSC::SyntaxChecker::thisExpr):
680 (JSC::SyntaxChecker::createResolve):
681 (JSC::SyntaxChecker::createObjectLiteral):
682 (JSC::SyntaxChecker::createArray):
683 (JSC::SyntaxChecker::createNumberExpr):
684 (JSC::SyntaxChecker::createString):
685 (JSC::SyntaxChecker::createBoolean):
686 (JSC::SyntaxChecker::createNull):
687 (JSC::SyntaxChecker::createBracketAccess):
688 (JSC::SyntaxChecker::createDotAccess):
689 (JSC::SyntaxChecker::createRegex):
690 (JSC::SyntaxChecker::createNewExpr):
691 (JSC::SyntaxChecker::createConditionalExpr):
692 (JSC::SyntaxChecker::createAssignResolve):
693 (JSC::SyntaxChecker::createFunctionExpr):
694 (JSC::SyntaxChecker::createFunctionBody):
695 (JSC::SyntaxChecker::appendBinaryExpressionInfo):
696 (JSC::SyntaxChecker::operatorStackPop):
697 * runtime/Arguments.cpp:
698 (JSC::Arguments::createStrictModeCallerIfNecessary):
699 (JSC::Arguments::createStrictModeCalleeIfNecessary):
700 (JSC::Arguments::getOwnPropertySlot):
701 (JSC::Arguments::getOwnPropertyDescriptor):
702 (JSC::Arguments::put):
703 (JSC::Arguments::deleteProperty):
704 * runtime/Arguments.h:
705 (JSC::Arguments::Arguments):
706 * runtime/CommonIdentifiers.cpp:
707 (JSC::CommonIdentifiers::CommonIdentifiers):
708 * runtime/CommonIdentifiers.h:
710 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
711 (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
712 (JSC::StrictModeTypeErrorFunction::getConstructData):
713 (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
714 (JSC::StrictModeTypeErrorFunction::getCallData):
715 (JSC::createTypeErrorFunction):
717 * runtime/Executable.cpp:
718 (JSC::EvalExecutable::EvalExecutable):
719 (JSC::ProgramExecutable::ProgramExecutable):
720 (JSC::FunctionExecutable::FunctionExecutable):
721 (JSC::EvalExecutable::compileInternal):
722 (JSC::ProgramExecutable::checkSyntax):
723 (JSC::ProgramExecutable::compileInternal):
724 (JSC::FunctionExecutable::compileForCallInternal):
725 (JSC::FunctionExecutable::compileForConstructInternal):
726 (JSC::FunctionExecutable::reparseExceptionInfo):
727 (JSC::EvalExecutable::reparseExceptionInfo):
728 (JSC::FunctionExecutable::fromGlobalCode):
729 (JSC::ProgramExecutable::reparseExceptionInfo):
730 * runtime/Executable.h:
731 (JSC::ScriptExecutable::ScriptExecutable):
732 (JSC::ScriptExecutable::isStrictMode):
733 (JSC::EvalExecutable::create):
734 (JSC::FunctionExecutable::create):
735 * runtime/JSActivation.cpp:
736 (JSC::JSActivation::toStrictThisObject):
737 * runtime/JSActivation.h:
738 * runtime/JSFunction.cpp:
739 (JSC::createDescriptorForThrowingProperty):
740 (JSC::JSFunction::getOwnPropertySlot):
741 (JSC::JSFunction::getOwnPropertyDescriptor):
742 (JSC::JSFunction::put):
743 * runtime/JSGlobalData.cpp:
744 (JSC::JSGlobalData::JSGlobalData):
745 * runtime/JSGlobalData.h:
746 * runtime/JSGlobalObject.cpp:
747 (JSC::JSGlobalObject::reset):
748 * runtime/JSGlobalObject.h:
749 (JSC::JSGlobalObject::internalFunctionStructure):
750 * runtime/JSGlobalObjectFunctions.cpp:
751 (JSC::globalFuncEval):
752 * runtime/JSObject.cpp:
753 (JSC::JSObject::put):
754 (JSC::JSObject::toStrictThisObject):
755 (JSC::throwTypeError):
756 * runtime/JSObject.h:
757 (JSC::JSObject::isStrictModeFunction):
758 (JSC::JSObject::putDirectInternal):
759 (JSC::JSObject::putDirect):
760 (JSC::JSValue::putDirect):
761 (JSC::JSValue::toStrictThisObject):
762 * runtime/JSStaticScopeObject.cpp:
763 (JSC::JSStaticScopeObject::toStrictThisObject):
764 * runtime/JSStaticScopeObject.h:
766 * runtime/JSZombie.h:
767 (JSC::JSZombie::toStrictThisObject):
768 * runtime/PutPropertySlot.h:
769 (JSC::PutPropertySlot::PutPropertySlot):
770 (JSC::PutPropertySlot::isStrictMode):
771 * runtime/StrictEvalActivation.cpp: Added.
772 (JSC::StrictEvalActivation::StrictEvalActivation):
773 (JSC::StrictEvalActivation::deleteProperty):
774 (JSC::StrictEvalActivation::toThisObject):
775 (JSC::StrictEvalActivation::toStrictThisObject):
776 * runtime/StrictEvalActivation.h: Added.
778 2010-10-10 Patrick Gansterer <paroga@webkit.org>
782 Windows build fix after r69472.
784 * wtf/text/StringHash.h:
785 (WTF::CaseFoldingHash::hash):
787 2010-10-10 Patrick Gansterer <paroga@webkit.org>
789 Reviewed by Adam Barth.
791 Use WTF::StringHasher in WTF::CaseFoldingHash
792 https://bugs.webkit.org/show_bug.cgi?id=46523
794 * wtf/text/StringHash.h:
795 (WTF::CaseFoldingHash::foldCase):
796 (WTF::CaseFoldingHash::hash):
798 2010-10-09 Pratik Solanki <psolanki@apple.com>
800 Reviewed by Xan Lopez.
802 https://bugs.webkit.org/show_bug.cgi?id=47445
803 Remove unused function WTFThreadData::initializeIdentifierTable()
805 * wtf/WTFThreadData.h:
807 2010-10-08 Michael Saboff <msaboff@apple.com>
809 Reviewed by Darin Adler.
811 Added check to start of subexpression being positive before using
812 subexpression in replacement.
813 https://bugs.webkit.org/show_bug.cgi?id=47324
815 * runtime/StringPrototype.cpp:
816 (JSC::substituteBackreferencesSlow):
818 2010-10-08 Chris Evans <cevans@google.com>
820 Reviewed by David Levin.
822 https://bugs.webkit.org/show_bug.cgi?id=47393
824 Use unsigned consistently to check for max StringImpl length.
825 Add a few integer overflow checks.
826 Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
828 * wtf/text/WTFString.cpp:
829 * wtf/text/StringImpl.h:
830 * wtf/text/StringImpl.cpp:
831 Better use of size_t vs. unsigned; check for integer overflows.
833 2010-10-07 David Goodwin <david_goodwin@apple.com>
835 Reviewed by Oliver Hunt.
837 ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
838 https://bugs.webkit.org/show_bug.cgi?id=47356
840 * assembler/ARMv7Assembler.h:
842 2010-10-06 Chris Evans <cevans@google.com>
844 Reviewed by David Levin.
846 https://bugs.webkit.org/show_bug.cgi?id=47248
848 Use size_t consistently in CString, to prevent theoretical trouble
849 with > 4GB strings on 64-bit platforms.
851 * wtf/text/CString.h:
852 * wtf/text/CString.cpp:
853 Use size_t for string lengths.
855 (WTF::expectMD5): use suitable format string + cast for size_t.
856 * JavaScriptCore.exp:
859 2010-10-06 Anders Carlsson <andersca@apple.com>
861 Reviewed by Sam Weinig.
863 Start cleaning up Arguments.h
864 https://bugs.webkit.org/show_bug.cgi?id=47304
867 * wtf/TypeTraits.cpp:
868 Add RemoveReference type trait.
870 2010-10-06 Rafael Antognolli <antognolli@profusion.mobi>
872 Unreviewed build fix.
874 [EFL] Build fix for glib support.
875 https://bugs.webkit.org/show_bug.cgi?id=47221
877 If compiling with GLib support enabled, we also need to link wtf against
880 * wtf/CMakeListsEfl.txt:
882 2010-10-05 Kwang Yul Seo <skyul@company100.net>
884 Reviewed by Gavin Barraclough.
886 [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
887 https://bugs.webkit.org/show_bug.cgi?id=47117
889 Use IMemCache1 to flush data cache and invalidate instruction cache.
891 * jit/ExecutableAllocator.h:
892 (JSC::ExecutableAllocator::cacheFlush):
894 2010-10-05 Leandro Pereira <leandro@profusion.mobi>
896 Unreviewed. Build fix.
898 Moved "jsc" directory to "shell", so that the name does not clash with the
899 JavaScriptCore shell in some build systems.
900 http://webkit.org/b/47049
902 * CMakeLists.txt: Changed reference from "jsc" to "shell".
904 * jsc/CMakeLists.txt: Removed.
905 * jsc/CMakeListsEfl.txt: Removed.
906 * shell: Copied from JavaScriptCore/jsc.
908 2010-10-05 Kwang Yul Seo <skyul@company100.net>
910 Reviewed by Kent Tamura.
912 [BREWMP] Use PlatformRefPtr in randomNumber
913 https://bugs.webkit.org/show_bug.cgi?id=46989
915 Use PlatformRefPtr to free memory automatically.
917 * wtf/RandomNumber.cpp:
920 2010-10-05 Oliver Hunt <oliver@apple.com>
922 Reviewed by Darin Adler.
924 REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
925 https://bugs.webkit.org/show_bug.cgi?id=46690
927 Use the correct register value when initialising the arguments
928 object in the interpreter. This is covered by existing tests.
930 * interpreter/Interpreter.cpp:
931 (JSC::Interpreter::privateExecute):
933 2010-10-04 David Goodwin <david_goodwin@apple.com>
935 Reviewed by Oliver Hunt.
937 ARMv7 JIT should take advantage of 2-byte branches to reduce code size
938 https://bugs.webkit.org/show_bug.cgi?id=47007
940 * assembler/ARMv7Assembler.cpp:
941 * assembler/ARMv7Assembler.h:
942 (JSC::ARMv7Assembler::computeJumpType):
943 (JSC::ARMv7Assembler::link):
944 (JSC::ARMv7Assembler::canBeJumpT2):
945 (JSC::ARMv7Assembler::canBeJumpT4):
946 (JSC::ARMv7Assembler::linkBX):
947 (JSC::ARMv7Assembler::linkJumpT4):
948 (JSC::ARMv7Assembler::linkJumpT2):
949 (JSC::ARMv7Assembler::linkJumpAbsolute):
951 2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
953 Reviewed by Antonio Gomes.
955 [EFL] Use fast malloc for WebKit EFL
956 https://bugs.webkit.org/show_bug.cgi?id=46691
958 Use fast malloc for WebKit EFL because the fast malloc is to allocate
961 * wtf/CMakeListsEfl.txt:
963 2010-10-04 Oliver Hunt <oliver@apple.com>
965 Reviewed by Geoff Garen.
967 Lazily create activation objects
968 https://bugs.webkit.org/show_bug.cgi?id=47107
970 Make it possible to lazily create the activation object
971 for a function that needs one. This allows us to reduce
972 the overhead of entering a function that may require
973 an activation in some cases, but not always.
975 This does make exception handling a little more complex as
976 it's now necessary to verify that a callframes activation
977 has been created, and create it if not, in all of the
978 paths used in exception handling.
980 We also need to add logic to check for the existence of
981 the activation in the scoped_var opcodes, as well as
982 op_ret, op_ret_object_or_this and op_tearoff_activation
983 so that we can avoid creating an activation unnecesarily
986 * bytecode/CodeBlock.cpp:
987 (JSC::CodeBlock::dump):
988 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
989 (JSC::CodeBlock::createActivation):
990 * bytecode/CodeBlock.h:
991 (JSC::CodeBlock::setActivationRegister):
992 (JSC::CodeBlock::activationRegister):
994 * bytecompiler/BytecodeGenerator.cpp:
995 (JSC::BytecodeGenerator::BytecodeGenerator):
996 (JSC::BytecodeGenerator::emitNewFunctionInternal):
997 (JSC::BytecodeGenerator::emitNewFunctionExpression):
998 (JSC::BytecodeGenerator::createActivationIfNecessary):
999 * bytecompiler/BytecodeGenerator.h:
1000 * interpreter/Interpreter.cpp:
1001 (JSC::Interpreter::resolveSkip):
1002 (JSC::Interpreter::resolveGlobalDynamic):
1003 (JSC::Interpreter::resolveBase):
1004 (JSC::Interpreter::unwindCallFrame):
1005 (JSC::Interpreter::throwException):
1006 (JSC::Interpreter::privateExecute):
1008 (JSC::JIT::privateCompileMainPass):
1010 * jit/JITCall32_64.cpp:
1011 (JSC::JIT::emit_op_ret):
1012 (JSC::JIT::emit_op_ret_object_or_this):
1013 * jit/JITOpcodes.cpp:
1014 (JSC::JIT::emit_op_end):
1015 (JSC::JIT::emit_op_get_scoped_var):
1016 (JSC::JIT::emit_op_put_scoped_var):
1017 (JSC::JIT::emit_op_tear_off_activation):
1018 (JSC::JIT::emit_op_ret):
1019 (JSC::JIT::emit_op_ret_object_or_this):
1020 (JSC::JIT::emit_op_create_activation):
1021 (JSC::JIT::emit_op_resolve_global_dynamic):
1022 * jit/JITOpcodes32_64.cpp:
1023 (JSC::JIT::emit_op_get_scoped_var):
1024 (JSC::JIT::emit_op_put_scoped_var):
1025 (JSC::JIT::emit_op_tear_off_activation):
1026 (JSC::JIT::emit_op_create_activation):
1028 (JSC::DEFINE_STUB_FUNCTION):
1030 2010-10-04 Adam Barth <abarth@webkit.org>
1032 Reviewed by Sam Weinig.
1034 Remove ENABLE_SANDBOX
1035 https://bugs.webkit.org/show_bug.cgi?id=47032
1037 * Configurations/FeatureDefines.xcconfig:
1039 2010-10-01 Pratik Solanki <psolanki@apple.com>
1041 Reviewed by Geoffrey Garen.
1042 Specify ALWAYS_INLINE at function declaration not function definition
1043 https://bugs.webkit.org/show_bug.cgi?id=46960
1045 For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
1047 * bytecompiler/BytecodeGenerator.h:
1048 * wtf/FastMalloc.cpp:
1050 2010-10-01 Kwang Yul Seo <skyul@company100.net>
1054 [BREWMP] Change Collector BLOCK_SIZE to 64KB
1055 https://bugs.webkit.org/show_bug.cgi?id=46436
1057 Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
1059 * runtime/Collector.h:
1061 2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
1063 Reviewed by Andreas Kling.
1065 [Qt] Stack overflow on symbian platform.
1066 https://bugs.webkit.org/show_bug.cgi?id=40598
1068 Move big allocation in arrayProtoFuncToString from stack to heap.
1069 JSC::arrayProtoFuncToString function can be called recursivly and
1070 1K allocation on stack cahse stack overflow.
1071 Can be useful for other platforms with limited stack size.
1073 * runtime/ArrayPrototype.cpp:
1074 (JSC::arrayProtoFuncToString):
1076 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1078 Reviewed by Kent Tamura.
1080 [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
1081 https://bugs.webkit.org/show_bug.cgi?id=46373
1083 A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
1084 to wrap the instance in PlatformRefPtr.
1086 * wtf/brew/ShellBrew.h:
1087 (WTF::createRefPtrInstance):
1089 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1091 Reviewed by Kent Tamura.
1093 [BREWMP] Port PlatformRefPtr
1094 https://bugs.webkit.org/show_bug.cgi?id=46370
1096 Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
1098 * wtf/brew/RefPtrBrew.h: Added.
1099 (WTF::refPlatformPtr):
1100 (WTF::derefPlatformPtr):
1102 2010-09-29 Sam Weinig <sam@webkit.org>
1104 Reviewed by Darin Adler.
1106 Add additional checks to StringBuffer.
1107 <rdar://problem/7756381>
1109 * wtf/text/StringBuffer.h:
1110 (WTF::StringBuffer::StringBuffer):
1111 (WTF::StringBuffer::resize):
1113 2010-09-30 Chris Marrin <cmarrin@apple.com>
1115 Reviewed by Simon Fraser.
1117 Make 2D accelerated canvas rendering build on Mac
1118 https://bugs.webkit.org/show_bug.cgi?id=46007
1120 Added ACCELERATED_2D_CANVAS to FeatureDefines
1122 * Configurations/FeatureDefines.xcconfig:
1124 2010-09-30 Kevin Ollivier <kevino@theolliviers.com>
1126 [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
1127 the copy so as not to alter global settings.
1131 2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu>
1133 Reviewed by Gavin Barraclough.
1135 The case-insensitivity backreference checking isn't working with YARR
1137 https://bugs.webkit.org/show_bug.cgi?id=46882
1139 Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
1141 * yarr/RegexInterpreter.cpp:
1142 (JSC::Yarr::Interpreter::tryConsumeBackReference):
1144 2010-09-30 Kwang Yul Seo <skyul@company100.net>
1146 Reviewed by Andreas Kling.
1148 [BREWMP] Leave initializeRandomNumberGenerator empty.
1149 https://bugs.webkit.org/show_bug.cgi?id=46851
1151 On Brew MP, AEECLSID_RANDOM initializes itself.
1153 * wtf/RandomNumberSeed.h:
1154 (WTF::initializeRandomNumberGenerator):
1156 2010-09-30 Gabor Loki <loki@webkit.org>
1158 Reviewed by Csaba Osztrogonác.
1160 Remove unnecessary cacheFlush calls from Thumb-2
1161 https://bugs.webkit.org/show_bug.cgi?id=46702
1163 * assembler/ARMv7Assembler.h:
1164 (JSC::ARMv7Assembler::relinkCall):
1165 (JSC::ARMv7Assembler::repatchInt32):
1166 (JSC::ARMv7Assembler::repatchPointer):
1168 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1172 Next try to fix cygwin build.
1174 * wtf/Assertions.cpp:
1176 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1180 Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
1182 * wtf/Assertions.cpp:
1184 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1188 Build fix for cygwin.
1190 * wtf/Assertions.cpp:
1192 2010-09-29 Patrick Gansterer <paroga@webkit.org>
1194 Reviewed by Andreas Kling.
1196 [WINCE] Buildfix for Assertions.cpp after r68511.
1197 https://bugs.webkit.org/show_bug.cgi?id=46807
1199 Some, but not all WinCE environments have support for IsDebuggerPresent().
1200 Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
1201 HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
1203 * wtf/Assertions.cpp:
1206 2010-09-29 Peter Varga <pvarga@inf.u-szeged.hu>
1208 Reviewed by Csaba Osztrogonác.
1210 JSC compile fails on 32bit platform when Regexp Tracing is enabled
1211 https://bugs.webkit.org/show_bug.cgi?id=46713
1213 Fix the cast of pointer in regexp tracing to avoid the warning.
1215 * runtime/RegExp.cpp:
1216 (JSC::RegExp::match):
1218 2010-09-28 Anders Carlsson <andersca@apple.com>
1220 Reviewed by Sam Weinig.
1222 Begin hooking up painting in the plug-in process
1223 https://bugs.webkit.org/show_bug.cgi?id=46766
1225 * JavaScriptCore.exp:
1226 Add tryFastRealloc, used by WebKit2.
1228 2010-09-28 Philippe Normand <pnormand@igalia.com>
1230 Reviewed by Martin Robinson.
1232 Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
1233 https://bugs.webkit.org/show_bug.cgi?id=46721
1235 Enable GOwnPtr/GRefPtr build only if glib support has been
1236 explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
1238 * wtf/gobject/GOwnPtr.cpp:
1239 * wtf/gobject/GOwnPtr.h:
1240 * wtf/gobject/GRefPtr.cpp:
1241 * wtf/gobject/GRefPtr.h:
1243 2010-09-28 İsmail Dönmez <ismail@namtrac.org>
1245 Reviewed by Andreas Kling.
1247 Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
1248 Remove reference to unexisting path JavaScriptCore/os-wince.
1250 * JavaScriptCore.pri:
1251 * wtf/Assertions.cpp:
1253 2010-09-27 Michael Saboff <msaboff@apple.com>
1255 Reviewed by Geoffrey Garen.
1257 Changed the initialization of JSArray objects to have space for
1258 3 elements for the constructor that takes a ArgList argument.
1259 This improves v8-deltablue performance by about 2.8% by reducing
1260 the number of realloc() calls.
1261 https://bugs.webkit.org/show_bug.cgi?id=46664
1263 * runtime/JSArray.cpp:
1264 (JSC::JSArray::JSArray):
1266 2010-09-27 Gavin Barraclough <barraclough@apple.com>
1268 Reviewed by Darin Adler.
1270 Bug 46680 - Inlining string concatenation can regress interpreter performance
1271 <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
1272 Do not inline calls to string concatenation in the interpret loop.
1274 * interpreter/Interpreter.cpp:
1275 (JSC::concatenateStrings):
1276 (JSC::Interpreter::privateExecute):
1278 2010-09-27 Anders Carlsson <andersca@apple.com>
1284 2010-09-27 Anders Carlsson <andersca@apple.com>
1286 Reviewed by Adam Roben.
1288 Try to fix Windows build.
1291 (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
1292 (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
1294 2010-09-27 Erik Arvidsson <arv@chromium.org>
1296 Reviewed by Darin Adler.
1298 Add operator == for AtomicString and Vector<Uchar>
1299 https://bugs.webkit.org/show_bug.cgi?id=46509
1301 * JavaScriptCore.exp:
1302 * wtf/text/AtomicString.cpp:
1304 * wtf/text/AtomicString.h:
1308 2010-09-27 Anders Carlsson <andersca@apple.com>
1310 Try to fix the Windows build.
1312 * wtf/Noncopyable.h:
1314 2010-09-26 Anders Carlsson <andersca@apple.com>
1316 Reviewed by Alexey Proskuryakov and Adam Barth.
1318 Add WTF_MAKE_NONCOPYABLE macro
1319 https://bugs.webkit.org/show_bug.cgi?id=46589
1321 Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
1322 reason for this is that the Itanium C++ ABI states that no empty classes of the same type
1323 can be laid out at the same offset in the class. This can result in objects getting larger
1324 which leads to memory regressions. (One example of this is the String class which grew by
1325 sizeof(void*) when both its base class and its first member variable inherited indirectly
1326 from FastAllocBase).
1328 * wtf/Noncopyable.h:
1329 Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
1333 Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
1335 2010-09-27 Philippe Normand <pnormand@igalia.com>
1337 Reviewed by Martin Robinson.
1339 [GTK] use ENABLE(GLIB_SUPPORT)
1340 https://bugs.webkit.org/show_bug.cgi?id=46630
1342 * wtf/Platform.h: Include GTypedefs.h only if glib support
1343 is explicitly enabled.
1345 2010-09-25 Holger Hans Peter Freyther <holger@moiji-mobile.com>
1347 Reviewed by Adam Barth.
1349 jsc: Document the strcat opcode.
1350 https://bugs.webkit.org/show_bug.cgi?id=46571
1352 * interpreter/Interpreter.cpp:
1353 (JSC::Interpreter::privateExecute):
1355 2010-09-21 Holger Hans Peter Freyther <holger@moiji-mobile.com>
1357 Reviewed by Adam Barth.
1359 make-bytecode-docs.pl: Add a comment to the generated HTML
1360 https://bugs.webkit.org/show_bug.cgi?id=46570
1362 Generate an HTML Comment that this file was generated from
1363 Interpreter.cpp with the make-bytecode-docs.pl script.
1365 * docs/make-bytecode-docs.pl:
1367 2010-09-27 Patrick Gansterer <paroga@webkit.org>
1369 Reviewed by Adam Barth.
1371 Remove WTF::stringHash functions
1372 https://bugs.webkit.org/show_bug.cgi?id=46520
1374 Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
1375 So use StringHasher::createHash directly and remove stringHash.
1377 * wtf/StringHashFunctions.h:
1378 * wtf/text/StringImpl.h:
1379 (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
1381 2010-09-26 Patrick Gansterer <paroga@webkit.org>
1383 Reviewed by Adam Barth.
1385 Add WTF::StringHasher::createBlobHash
1386 https://bugs.webkit.org/show_bug.cgi?id=46514
1388 Add this function for hashing FormElementKey and QualifiedNameComponents.
1390 * wtf/StringHashFunctions.h:
1391 (WTF::StringHasher::createBlobHash):
1393 2010-09-26 Patrick Gansterer <paroga@webkit.org>
1395 Reviewed by Adam Barth.
1397 REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
1398 running websocket/tests/bad-sub-protocol-non-ascii.html
1399 https://bugs.webkit.org/show_bug.cgi?id=46553
1401 Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
1402 Add an additional member variable to indicate if we have an pending character
1403 instead of only using an invalid character for this purpose.
1405 * wtf/StringHashFunctions.h:
1406 (WTF::StringHasher::StringHasher):
1407 (WTF::StringHasher::addCharacters):
1408 (WTF::StringHasher::addCharacter):
1409 (WTF::StringHasher::hash):
1411 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
1413 Reviewed by Oliver Hunt.
1415 valueOf called in wrong order in atan2 and date constructors.
1416 https://bugs.webkit.org/show_bug.cgi?id=26978
1418 Fixed the bug where the arguments to atan2 were being evaluated
1421 * runtime/MathObject.cpp:
1422 (JSC::mathProtoFuncATan2):
1424 2010-09-26 Mark Hahnenberg <mhahnenb@gmail.com>
1426 Reviewed by Oliver Hunt.
1428 valueOf called in wrong order in atan2 and date constructors.
1429 https://bugs.webkit.org/show_bug.cgi?id=26978
1431 Fixed the issue where the parameters to the Date constructor
1432 were being evaluated to numbers more than once.
1434 * runtime/DateConstructor.cpp:
1435 (JSC::constructDate):
1438 2010-09-25 Oliver Hunt <oliver@apple.com>
1442 Relearning the lesson that last minute changes are bad.
1444 * bytecode/CodeBlock.cpp:
1445 (JSC::CodeBlock::dump):
1446 * bytecompiler/BytecodeGenerator.cpp:
1447 (JSC::BytecodeGenerator::emitGetArgumentsLength):
1448 * jit/JITOpcodes.cpp:
1449 (JSC::JIT::emitSlow_op_get_argument_by_val):
1451 2010-09-25 Oliver Hunt <oliver@apple.com>
1453 Reviewed by Cameron Zwarich.
1455 Avoid constructing arguments object when accessing length and index properties
1456 https://bugs.webkit.org/show_bug.cgi?id=46572
1458 Add opcodes to read argument length and properties, and then implement them.
1459 Much like other lazy opcodes these opcodes take a fast path when the arguments
1460 object has not been instantiated, and fall back on generic access mechanisms
1461 if they are acting on an instantiated object.
1463 3% win on v8-earleyboyer, no change elsewhere.
1465 * bytecode/CodeBlock.cpp:
1466 (JSC::CodeBlock::dump):
1467 * bytecode/Opcode.h:
1468 * bytecompiler/BytecodeGenerator.cpp:
1469 (JSC::BytecodeGenerator::emitGetArgumentsLength):
1470 (JSC::BytecodeGenerator::emitGetArgumentByVal):
1471 * bytecompiler/BytecodeGenerator.h:
1472 * bytecompiler/NodesCodegen.cpp:
1473 (JSC::BracketAccessorNode::emitBytecode):
1474 (JSC::DotAccessorNode::emitBytecode):
1475 * interpreter/Interpreter.cpp:
1476 (JSC::Interpreter::privateExecute):
1478 (JSC::JIT::privateCompileMainPass):
1479 (JSC::JIT::privateCompileSlowCases):
1481 * jit/JITOpcodes.cpp:
1482 (JSC::JIT::emit_op_get_arguments_length):
1483 (JSC::JIT::emitSlow_op_get_arguments_length):
1484 (JSC::JIT::emit_op_get_argument_by_val):
1485 (JSC::JIT::emitSlow_op_get_argument_by_val):
1486 * jit/JITOpcodes32_64.cpp:
1487 (JSC::JIT::emit_op_get_arguments_length):
1488 (JSC::JIT::emitSlow_op_get_arguments_length):
1489 (JSC::JIT::emit_op_get_argument_by_val):
1490 (JSC::JIT::emitSlow_op_get_argument_by_val):
1492 2010-09-25 Patrick Gansterer <paroga@webkit.org>
1496 Fix typo in StringHasher class
1497 https://bugs.webkit.org/show_bug.cgi?id=45970
1499 * wtf/StringHashFunctions.h:
1500 (WTF::StringHasher::createHash):
1502 2010-09-24 Patrick Gansterer <paroga@paroga.com>
1504 Reviewed by Gavin Barraclough.
1506 Add WTF::StringHasher
1507 https://bugs.webkit.org/show_bug.cgi?id=45970
1509 StringHasher is a class for calculation stringHash out of character string.
1510 This class will unify the different usages of the same algorithm.
1512 * wtf/StringHashFunctions.h:
1513 (WTF::StringHasher::StringHasher):
1514 (WTF::StringHasher::addCharacters):
1515 (WTF::StringHasher::addCharacter):
1516 (WTF::StringHasher::hash):
1517 (WTF::StringHasher::createHash):
1518 (WTF::StringHasher::defaultCoverter):
1519 (WTF::StringHasher::addCharactersToHash):
1522 2010-09-24 Oliver Hunt <oliver@apple.com>
1524 Reviewed by Geoffrey Garen.
1526 Variable declarations inside a catch scope don't get propogated to the parent scope
1527 https://bugs.webkit.org/show_bug.cgi?id=46501
1529 Add logic to make variable declaration look for a scope for the
1530 new variable. This allows us to create a scope (eg. for catch)
1531 and then seal it, so that additional variable declarations
1532 contained are propogated to the correct target. Strangely this
1533 comes out as a performance win, but I think it's mostly cache
1536 * parser/JSParser.cpp:
1537 (JSC::JSParser::Scope::Scope):
1538 (JSC::JSParser::Scope::preventNewDecls):
1539 (JSC::JSParser::Scope::allowsNewDecls):
1540 (JSC::JSParser::declareVariable):
1541 (JSC::JSParser::parseVarDeclarationList):
1542 (JSC::JSParser::parseConstDeclarationList):
1543 (JSC::JSParser::parseTryStatement):
1544 (JSC::JSParser::parseFormalParameters):
1545 (JSC::JSParser::parseFunctionDeclaration):
1547 2010-09-24 İsmail Dönmez <ismail@namtrac.org>
1549 Reviewed by Csaba Osztrogonác.
1551 Add a Windows compatible inttypes.h header to fix WinCE build.
1552 https://bugs.webkit.org/show_bug.cgi?id=46463
1554 * os-win32/inttypes.h: Added.
1556 2010-09-24 Oliver Hunt <oliver@apple.com>
1558 Reviewed by Gavin Barraclough.
1560 REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
1561 https://bugs.webkit.org/show_bug.cgi?id=46448
1563 Roll this back in, with additional logic to prevent us from delaying construction
1564 of functions named "arguments"
1566 * bytecode/CodeBlock.cpp:
1567 (JSC::CodeBlock::dump):
1568 * bytecode/Opcode.h:
1569 * bytecompiler/BytecodeGenerator.cpp:
1570 (JSC::BytecodeGenerator::BytecodeGenerator):
1571 (JSC::BytecodeGenerator::emitInitLazyRegister):
1572 (JSC::BytecodeGenerator::registerFor):
1573 (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
1574 (JSC::BytecodeGenerator::constRegisterFor):
1575 (JSC::BytecodeGenerator::emitNewFunction):
1576 (JSC::BytecodeGenerator::emitLazyNewFunction):
1577 (JSC::BytecodeGenerator::emitNewFunctionInternal):
1578 * bytecompiler/BytecodeGenerator.h:
1579 * interpreter/Interpreter.cpp:
1580 (JSC::Interpreter::privateExecute):
1582 (JSC::JIT::privateCompileMainPass):
1584 * jit/JITOpcodes.cpp:
1585 (JSC::JIT::emit_op_init_lazy_reg):
1586 (JSC::JIT::emit_op_new_func):
1587 * jit/JITOpcodes32_64.cpp:
1588 (JSC::JIT::emit_op_init_lazy_reg):
1590 (JSC::ScopeNode::needsActivationForMoreThanVariables):
1592 2010-09-23 Sheriff Bot <webkit.review.bot@gmail.com>
1594 Unreviewed, rolling out r68223.
1595 http://trac.webkit.org/changeset/68223
1596 https://bugs.webkit.org/show_bug.cgi?id=46448
1598 It broke 2-3 tests on bots (Requested by Ossy on #webkit).
1600 * bytecode/CodeBlock.cpp:
1601 (JSC::CodeBlock::dump):
1602 * bytecode/Opcode.h:
1603 * bytecompiler/BytecodeGenerator.cpp:
1604 (JSC::BytecodeGenerator::BytecodeGenerator):
1605 (JSC::BytecodeGenerator::registerFor):
1606 (JSC::BytecodeGenerator::constRegisterFor):
1607 (JSC::BytecodeGenerator::emitNewFunction):
1608 * bytecompiler/BytecodeGenerator.h:
1609 * interpreter/Interpreter.cpp:
1610 (JSC::Interpreter::privateExecute):
1612 (JSC::JIT::privateCompileMainPass):
1614 * jit/JITOpcodes.cpp:
1615 (JSC::JIT::emit_op_new_func):
1616 (JSC::JIT::emit_op_init_arguments):
1617 * jit/JITOpcodes32_64.cpp:
1618 (JSC::JIT::emit_op_new_func):
1619 (JSC::JIT::emit_op_init_arguments):
1622 2010-09-23 Oliver Hunt <oliver@apple.com>
1624 Reviewed by Geoffrey Garen.
1626 Delay construction of functions that aren't captured
1627 https://bugs.webkit.org/show_bug.cgi?id=46433
1629 If a function isn't captured by an activation there's no
1630 way it can be accessed indirectly, so we can delay the
1631 construction until it's used (similar to what we do with
1632 arguments). We rename the existing op_init_arguments to
1633 op_init_lazy_reg and removed its implicit handling of
1634 the anonymous argument register, and make op_new_function
1635 take a parameter to indicate whether it should null check
1636 the target slot before creating the function object.
1638 * bytecode/CodeBlock.cpp:
1639 (JSC::CodeBlock::dump):
1640 * bytecode/Opcode.h:
1641 * bytecompiler/BytecodeGenerator.cpp:
1642 (JSC::BytecodeGenerator::BytecodeGenerator):
1643 (JSC::BytecodeGenerator::emitInitLazyRegister):
1644 (JSC::BytecodeGenerator::registerFor):
1645 (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
1646 (JSC::BytecodeGenerator::constRegisterFor):
1647 (JSC::BytecodeGenerator::emitNewFunction):
1648 (JSC::BytecodeGenerator::emitLazyNewFunction):
1649 (JSC::BytecodeGenerator::emitNewFunctionInternal):
1650 * bytecompiler/BytecodeGenerator.h:
1651 * interpreter/Interpreter.cpp:
1652 (JSC::Interpreter::privateExecute):
1654 (JSC::JIT::privateCompileMainPass):
1656 * jit/JITOpcodes.cpp:
1657 (JSC::JIT::emit_op_init_lazy_reg):
1658 (JSC::JIT::emit_op_new_func):
1659 * jit/JITOpcodes32_64.cpp:
1660 (JSC::JIT::emit_op_init_lazy_reg):
1662 (JSC::ScopeNode::needsActivationForMoreThanVariables):
1664 2010-09-23 David Kilzer <ddkilzer@apple.com>
1666 <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
1667 https://bugs.webkit.org/show_bug.cgi?id=46423
1669 Reviewed by Oliver Hunt.
1671 * interpreter/Interpreter.cpp:
1672 (JSC::Interpreter::privateExecute): Disable the gcc computed
1673 goto hacks added in r55564 when compiling with llvm-gcc-4.2.
1675 2010-09-23 Lucas De Marchi <lucas.demarchi@profusion.mobi>
1677 Reviewed by Darin Adler.
1679 Fix usage of enum as if it was a define
1680 https://bugs.webkit.org/show_bug.cgi?id=46355
1682 pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
1683 enum. Hence, it cannot be used by the preprocessor which always
1684 evaluates that condition as true. This was giving a warning when
1685 compiling with gcc and "-Wundef" flag.
1687 The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
1688 PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
1689 and get rid of that #if.
1691 * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
1692 set mutex type to PTHREAD_MUTEX_NORMAL.
1693 (WTF::Mutex::Mutex):
1695 2010-09-23 Michael Saboff <msaboff@apple.com>
1697 Reviewed by Geoffrey Garen.
1699 Removed extraneous truncation of ovector on entry and error exit.
1700 Changed the initialization to -1 of vector to only initialize
1701 the start indecies, which is sufficient for the pattern/subpatterns.
1702 Changed the JIT code to not clear the end index for subpatterns
1703 as it isn't needed. These changes are worth ~2.7% on v8-regexp.
1704 https://bugs.webkit.org/show_bug.cgi?id=46404
1706 * runtime/RegExp.cpp:
1707 (JSC::RegExp::match):
1708 * yarr/RegexJIT.cpp:
1709 (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1711 2010-09-22 Oliver Hunt <oliver@apple.com>
1713 Reviewed by Geoff Garen.
1715 Only copy captured variables into activation
1716 https://bugs.webkit.org/show_bug.cgi?id=46330
1718 We now track free variable information which means that
1719 we no longer need to copy every variable defined in a
1720 function. With this patch activations only retain those
1721 variables needed for correctness. In order to interact
1722 safely with the inspector this means that JSActivation
1723 now provides its own lookup functions so it can avoid
1724 trying to read or write to variables that have been
1727 * bytecode/CodeBlock.h:
1728 * bytecompiler/BytecodeGenerator.cpp:
1729 (JSC::BytecodeGenerator::BytecodeGenerator):
1731 (JSC::ScopeNode::capturedVariableCount):
1732 (JSC::ScopeNode::captures):
1733 * runtime/Arguments.h:
1734 (JSC::JSActivation::copyRegisters):
1735 * runtime/Executable.cpp:
1736 (JSC::FunctionExecutable::FunctionExecutable):
1737 (JSC::FunctionExecutable::compileForCallInternal):
1738 (JSC::FunctionExecutable::compileForConstructInternal):
1739 * runtime/Executable.h:
1740 (JSC::FunctionExecutable::capturedVariableCount):
1741 * runtime/JSActivation.cpp:
1742 (JSC::JSActivation::markChildren):
1743 (JSC::JSActivation::symbolTableGet):
1744 (JSC::JSActivation::symbolTablePut):
1745 (JSC::JSActivation::getOwnPropertyNames):
1746 (JSC::JSActivation::symbolTablePutWithAttributes):
1747 * runtime/JSActivation.h:
1749 2010-09-23 Ismail Donmez <ismail@namtrac.org>
1751 Reviewed by Andreas Kling.
1753 Fix jsc.exe build for Windows CE
1755 * jsc.pro: Add mmtimer.lib for Windows CE.
1757 2010-09-23 Ismail Donmez <ismail@namtrac.org>
1761 JIT should be disabled on Windows CE. Broken in r64176.
1765 2010-09-23 Peter Varga <pvarga@inf.u-szeged.hu>
1767 Reviewed by Gavin Barraclough.
1769 Reduce the number of BOL checks in YARR Interpreter
1770 https://bugs.webkit.org/show_bug.cgi?id=46260
1772 Extend the YARR Interpreter with an optimization which reduces the number of
1773 BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
1774 "TypeAssertionBOL" byteTerm it will be checked just one time.
1776 * yarr/RegexInterpreter.cpp:
1777 (JSC::Yarr::Interpreter::matchDisjunction):
1778 (JSC::Yarr::ByteCompiler::compile):
1779 (JSC::Yarr::ByteCompiler::regexBegin):
1780 (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1781 (JSC::Yarr::ByteCompiler::emitDisjunction):
1782 * yarr/RegexInterpreter.h:
1783 (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
1784 (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
1785 (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
1786 (JSC::Yarr::ByteTerm::AlternativeBegin):
1787 (JSC::Yarr::ByteTerm::AlternativeDisjunction):
1788 (JSC::Yarr::ByteTerm::AlternativeEnd):
1790 2010-09-22 Michael Saboff <msaboff@apple.com>
1792 Reviewed by Gavin Barraclough.
1794 Fixed the cross over from alternatives executed once and
1795 those that loop. This fixed the problem where the index
1796 was getting messed up for looping alternatives causing an
1798 https://bugs.webkit.org/show_bug.cgi?id=46189
1800 * yarr/RegexJIT.cpp:
1801 (JSC::Yarr::RegexGenerator::generateDisjunction):
1803 2010-09-22 Steve Falkenburg <sfalken@apple.com>
1805 Rubber stamped by Jon Honeycutt.
1807 Allow jsc.exe to be run against unversioned ICU.
1809 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1811 2010-09-22 Kwang Yul Seo <skyul@company100.net>
1813 Reviewed by Laszlo Gombos.
1815 Use "typedef wchar_t JSChar" when compiled with RVCT
1816 https://bugs.webkit.org/show_bug.cgi?id=40651
1818 Use wchar_t for JSChar and UChar when compiled with RVCT.
1819 Linux is the exception for this rule.
1821 * API/JSStringRef.h:
1822 * wtf/unicode/qt4/UnicodeQt4.h:
1824 2010-09-22 Oliver Hunt <oliver@apple.com>
1826 Reviewed by Gavin Barraclough.
1828 [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
1829 https://bugs.webkit.org/show_bug.cgi?id=44245
1831 Remove incorrect code from op_load_varargs in the interpreter.
1833 * interpreter/Interpreter.cpp:
1834 (JSC::Interpreter::privateExecute):
1836 2010-09-22 Oliver Hunt <oliver@apple.com>
1838 Reviewed by Gavin Barraclough.
1840 [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
1841 https://bugs.webkit.org/show_bug.cgi?id=44246
1843 JIT code generated for instanceof was not checking to ensure that the prototype property was
1844 an object, this patch ensures that it does.
1846 * jit/JITOpcodes.cpp:
1847 (JSC::JIT::emit_op_instanceof):
1848 (JSC::JIT::emitSlow_op_instanceof):
1849 * jit/JITOpcodes32_64.cpp:
1850 (JSC::JIT::emit_op_instanceof):
1851 (JSC::JIT::emitSlow_op_instanceof):
1853 2010-09-22 Patrick Gansterer <paroga@webkit.org>
1855 Reviewed by Darin Adler.
1857 Inline UTF8SequenceLength
1858 https://bugs.webkit.org/show_bug.cgi?id=45589
1860 * wtf/unicode/UTF8.cpp:
1861 (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
1863 2010-09-21 Oliver Hunt <oliver@apple.com>
1865 RS=Gavin Barraclough.
1867 Fix codeblock dumping
1869 * bytecode/CodeBlock.cpp:
1870 (JSC::CodeBlock::dump):
1871 * runtime/Executable.h:
1872 (JSC::ScriptExecutable::ScriptExecutable):
1874 2010-09-21 Oliver Hunt <oliver@apple.com>
1876 Reviewed by Geoffrey Garen.
1878 Speed up function.apply(..., arguments)
1879 https://bugs.webkit.org/show_bug.cgi?id=46207
1881 Add code to do argument copying inline in the case
1882 where we're using Function.apply to forward our arguments
1886 (JSC::JIT::privateCompileSlowCases):
1887 Splitted op_load_varargs into fast and slow paths, so add the call
1888 to the slow path generator.
1890 * jit/JITCall32_64.cpp:
1891 Remove 32bit specific emit_op_load_varargs as the logic is the
1892 same for all value representations
1893 * jit/JITOpcodes.cpp:
1894 (JSC::JIT::emit_op_load_varargs):
1895 Copy arguments inline
1896 (JSC::JIT::emitSlow_op_load_varargs):
1898 2010-09-21 Geoffrey Garen <ggaren@apple.com>
1900 Reviewed by Oliver Hunt.
1902 <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
1903 interpreter due to 54724 and 54596
1905 Fixed a typo (using "UNLIKELY" instead of "LIKELY").
1908 (WTF::refIfNotNull):
1909 (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
1910 hold real data. Also, in cases where they do not hold real data, the
1911 compiler usually sees a call to release() right before the call to the
1912 destructor, so it can probably optimize out the test completely.
1914 2010-09-21 Fridrich Strba <fridrich.strba@bluewin.ch>
1916 Reviewed by Martin Robinson.
1918 Build issues with Windows versions of the GTK+ port
1919 https://bugs.webkit.org/show_bug.cgi?id=45844
1921 Link with winmm.dll when necessary and specify the executable extension
1922 explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
1923 rule actually works.
1925 Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
1926 a section in ThreadSpecific.cpp
1930 2010-09-21 Martin Robinson <mrobinson@igalia.com>
1932 Reviewed by Xan Lopez.
1934 [GTK] 'make dist' should be fixed in preparation for the next release
1935 https://bugs.webkit.org/show_bug.cgi?id=46129
1937 * GNUmakefile.am: Update the sources list to include missing headers.
1939 2010-09-21 Dave Tapuska <dtapuska@rim.com>
1941 Reviewed by Csaba Osztrogonác.
1943 https://bugs.webkit.org/show_bug.cgi?id=45673
1945 r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
1946 8 byte aligned. A non 8 byte divisible value for this will
1947 cause the sp to become non 8 byte aligned.
1949 Verify and correct offset values that r65596 effected that
1955 2010-09-21 Xan Lopez <xlopez@igalia.com>
1957 Reviewed by Martin Robinson.
1959 Fix Opcode stats compilation
1960 https://bugs.webkit.org/show_bug.cgi?id=46079
1962 The FixedArray API had changed, and <stdio.h> was not included for
1965 * bytecode/Opcode.cpp:
1966 (JSC::OpcodeStats::~OpcodeStats):
1968 2010-09-20 Michael Saboff <msaboff@apple.com>
1970 Reviewed by Gavin Barraclough.
1972 Fixed detection of alternative smaller than the first alternative
1973 to only check looping alternatives.
1974 https://bugs.webkit.org/show_bug.cgi?id=46049
1976 * yarr/RegexJIT.cpp:
1977 (JSC::Yarr::RegexGenerator::generateDisjunction):
1979 2010-09-20 Peter Varga <pvarga@inf.u-szeged.hu>
1981 Reviewed by Geoffrey Garen.
1983 REGRESSION(67790): jsc tests are failed with YARR interpreter
1984 https://bugs.webkit.org/show_bug.cgi?id=46083
1986 Fix the initializing of the lastSubpatternId member of
1989 * yarr/RegexCompiler.cpp:
1990 (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
1992 2010-09-20 Gavin Barraclough <barraclough@apple.com>
1994 Reviewed by Oliver Hunt.
1996 Bug 46077 - ASSERT failure in YARR JIT
1998 We will currently attempt to loop if there are multiple alternatives, they are all
1999 BOL predicated, and the last alternative is longer then the first - however if all
2000 alternatives are BOL predicated the head of loop label will not have been set, and
2001 we'll try to link a jump to an undefined label. Stop doing so.
2003 * yarr/RegexJIT.cpp:
2004 (JSC::Yarr::RegexGenerator::generateDisjunction):
2006 2010-09-20 Adam Roben <aroben@apple.com>
2008 Export RegExpObject::info from JavaScriptCore
2010 This allows obj->inherits(&RegExpObject::info) to work correctly from
2011 outside JavaScriptCore.dll on Windows.
2013 Fixes <http://webkit.org/b/46098>
2014 fast/loader/stateobjects/pushstate-object-types.html fails on Windows
2016 Reviewed by John Sullivan.
2018 * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
2019 we already have for some other classes whose info members have to be
2020 used from outside the DLL.
2022 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2024 Windows build fix pt 2.
2026 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2028 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2030 Windows build fix pt 1.
2032 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2034 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2036 Build fix - implicit double-to-int conversion invalid on 32-bit.
2038 * runtime/DatePrototype.cpp:
2039 (JSC::fillStructuresUsingDateArgs):
2040 (JSC::dateProtoFuncSetYear):
2042 2010-09-19 Gavin Barraclough <barraclough@apple.com>
2044 Reviewed by Oliver Hunt.
2046 Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
2048 These methods implement the same conversion (see discussion in the notes
2049 of sections of 9.5 and 9.6 of the spec), only differing in how the result
2052 Date prototype is incorrectly using toInt32, and this is causing us to
2053 provide an output value indicating whether the input to ToInt32 was finite
2054 (the corresponding methods on Date are actually spec'ed to use ToInteger,
2055 not ToInt32). This patch partially fixes this in order to remove this
2056 bogus output value, hoewever more work will be require to bring Date
2057 fully up to spec compliance (the constructor is still performing ToInt32
2060 * JavaScriptCore.exp:
2061 * runtime/DatePrototype.cpp:
2062 (JSC::fillStructuresUsingTimeArgs):
2063 (JSC::fillStructuresUsingDateArgs):
2064 (JSC::dateProtoFuncSetYear):
2065 * runtime/JSValue.cpp:
2067 * runtime/JSValue.h:
2069 (JSC::JSValue::toInt32):
2070 (JSC::JSValue::toUInt32):
2072 2010-09-18 Darin Adler <darin@apple.com>
2074 First step in fixing Windows build.
2076 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2077 Removed incorrect symbol. The build will probably still fail,
2078 but the failure will tell us what symbol to add.
2080 2010-09-18 Michael Saboff <msaboff@apple.com>
2082 Reviewed by Gavin Barraclough.
2084 Added code to unroll regular expressions containing ^.
2085 Alternatives that begin with ^ are tagged during parsing
2086 and rolled up in containing sub expression structs.
2087 After parsing, a regular expression flagged as containing
2088 a ^ (a.k.a. BOL) is processed further in optimizeBOL().
2089 A copy of the disjunction is made excluding alternatives that
2090 are rooted with BOL. The original alternatives are flagged
2091 to only be executed once. The copy of the other alternatives are
2092 added to the original expression.
2093 In the case that all original alternatives are flagged, there
2094 won't be any looping alternatives.
2095 The JIT generator will emit code accordingly, executing the
2096 original alternatives once and then looping over the
2097 alternatives that aren't anchored with a BOL (if any).
2098 https://bugs.webkit.org/show_bug.cgi?id=45787
2100 * yarr/RegexCompiler.cpp:
2101 (JSC::Yarr::RegexPatternConstructor::assertionBOL):
2102 (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
2103 (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
2104 (JSC::Yarr::RegexPatternConstructor::copyTerm):
2105 (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
2106 (JSC::Yarr::compileRegex):
2107 * yarr/RegexJIT.cpp:
2108 (JSC::Yarr::RegexGenerator::generateDisjunction):
2109 * yarr/RegexPattern.h:
2110 (JSC::Yarr::PatternAlternative::PatternAlternative):
2111 (JSC::Yarr::PatternAlternative::setOnceThrough):
2112 (JSC::Yarr::PatternAlternative::onceThrough):
2113 (JSC::Yarr::PatternDisjunction::PatternDisjunction):
2114 (JSC::Yarr::RegexPattern::RegexPattern):
2115 (JSC::Yarr::RegexPattern::reset):
2117 2010-09-18 Patrick Gansterer <paroga@paroga.com>
2119 Reviewed by Darin Adler.
2121 Rename Wince files to WinCE
2122 https://bugs.webkit.org/show_bug.cgi?id=37287
2124 * wtf/unicode/Unicode.h:
2125 * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
2126 * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
2127 * wtf/unicode/wince/UnicodeWince.cpp: Removed.
2128 * wtf/unicode/wince/UnicodeWince.h: Removed.
2129 * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
2130 * wtf/wince/FastMallocWince.h: Removed.
2132 2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
2134 Reviewed by Kenneth Rohde Christiansen.
2136 Enable Platform Strategies on Qt
2138 [Qt] Turn on PLATFORM_STRATEGIES
2139 https://bugs.webkit.org/show_bug.cgi?id=45831
2141 * wtf/Platform.h: Enable Platform Strategies when building QtWebkit
2143 2010-09-17 Oliver Hunt <oliver@apple.com>
2145 Reviewed by Gavin Barraclough.
2147 Imprecise tracking of variable capture leads to overly pessimistic creation of activations
2148 https://bugs.webkit.org/show_bug.cgi?id=46020
2150 The old logic for track free and captured variables would cause us
2151 to decide we needed an activation in every function along the scope
2152 chain between a variable capture and its declaration. We now track
2153 captured variables precisely which requires a bit of additional work
2155 The most substantial change is that the parsing routine needs to
2156 be passed the list of function parameters when reparsing a function
2157 as when reparsing we don't parse the function declaration itself only
2160 * JavaScriptCore.exp:
2161 * parser/JSParser.cpp:
2162 (JSC::JSParser::Scope::Scope):
2163 (JSC::JSParser::Scope::needsFullActivation):
2164 We need to distinguish between use of a feature that requires
2165 an activation and eval so we now get this additional flag.
2166 (JSC::JSParser::Scope::collectFreeVariables):
2167 (JSC::JSParser::Scope::getCapturedVariables):
2168 We can't simply return the list of "capturedVariables" now as
2169 is insufficiently precise, so we compute them instead.
2170 (JSC::JSParser::popScope):
2172 (JSC::JSParser::JSParser):
2173 (JSC::JSParser::parseProgram):
2174 (JSC::JSParser::parseWithStatement):
2175 (JSC::JSParser::parseTryStatement):
2176 (JSC::JSParser::parseFunctionInfo):
2177 (JSC::JSParser::parseFunctionDeclaration):
2178 (JSC::JSParser::parseProperty):
2179 (JSC::JSParser::parseMemberExpression):
2180 * parser/JSParser.h:
2181 * parser/Parser.cpp:
2182 (JSC::Parser::parse):
2184 (JSC::Parser::parse):
2185 * runtime/Executable.cpp:
2186 (JSC::EvalExecutable::compileInternal):
2187 (JSC::ProgramExecutable::checkSyntax):
2188 (JSC::ProgramExecutable::compileInternal):
2189 (JSC::FunctionExecutable::compileForCallInternal):
2190 (JSC::FunctionExecutable::compileForConstructInternal):
2191 (JSC::FunctionExecutable::reparseExceptionInfo):
2192 (JSC::EvalExecutable::reparseExceptionInfo):
2193 (JSC::FunctionExecutable::fromGlobalCode):
2194 Pass function parameters (if available) to the parser.
2196 2010-09-17 Anders Carlsson <andersca@apple.com>
2198 Reviewed by Sam Weinig.
2200 Add IsFloatingPoint and IsArithmetic type traits
2201 https://bugs.webkit.org/show_bug.cgi?id=46018
2204 * wtf/TypeTraits.cpp:
2206 2010-09-17 Martin Robinson <mrobinson@igalia.com>
2208 Reviewed by Oliver Hunt.
2210 [GTK] FontPlatformDataFreeType should use smart pointers to hold its members
2211 https://bugs.webkit.org/show_bug.cgi?id=45917
2213 Added support to PlatformRefPtr for handling HashTableDeletedValue.
2215 * wtf/PlatformRefPtr.h:
2216 (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
2217 (WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
2219 2010-09-16 Oliver Hunt <oliver@apple.com>
2221 Reviewed by Geoffrey Garen.
2223 Crash due to timer triggered GC on one heap while another heap is active
2224 https://bugs.webkit.org/show_bug.cgi?id=45932
2225 <rdar://problem/8318446>
2227 The GC timer may trigger for one heap while another heap is active. This
2228 is safe, but requires us to ensure that we have temporarily associated the
2229 thread's identifierTable with the heap we're collecting on. Otherwise we
2230 may end up with the identifier tables in an inconsistent state leading to
2233 * runtime/Collector.cpp:
2234 (JSC::Heap::allocate):
2236 (JSC::Heap::collectAllGarbage):
2237 Add assertions to ensure we have the correct identifierTable active
2239 * runtime/GCActivityCallbackCF.cpp:
2240 (JSC::DefaultGCActivityCallbackPlatformData::trigger):
2241 Temporarily make the expected IdentifierTable active
2242 * wtf/WTFThreadData.h:
2243 (JSC::IdentifierTable::remove):
2244 Make it possible to see when IdentifierTable::remove has succeeded
2245 * wtf/text/StringImpl.cpp:
2246 (WTF::StringImpl::~StringImpl):
2247 CRASH if an StringImpl is an Identifier but isn't present in the
2248 active IdentifierTable. If we get to this state something has
2249 gone wrong and we should just crash immediately.
2251 2010-09-16 Martin Robinson <mrobinson@igalia.com>
2253 Reviewed by Xan Lopez.
2255 [GTK] Implement dissolveDragImageToFraction
2256 https://bugs.webkit.org/show_bug.cgi?id=45826
2258 * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
2260 2010-09-16 Eric Uhrhane <ericu@chromium.org>
2262 Reviewed by Jian Li.
2264 Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
2265 https://bugs.webkit.org/show_bug.cgi?id=45798
2267 * Configurations/FeatureDefines.xcconfig:
2269 2010-09-15 Oliver Hunt <oliver@apple.com>
2271 Reviewed by Geoffrey Garen.
2273 Use free variable analysis to improve activation performance
2274 https://bugs.webkit.org/show_bug.cgi?id=45837
2276 Adds free and captured variable tracking to the JS parser. This
2277 allows us to avoid construction of an activation object in some
2278 cases. Future patches will make more use of this information to
2279 improve those cases where activations are still needed.
2281 * parser/ASTBuilder.h:
2282 * parser/JSParser.cpp:
2283 (JSC::JSParser::Scope::Scope):
2284 (JSC::JSParser::Scope::declareVariable):
2285 (JSC::JSParser::Scope::useVariable):
2286 (JSC::JSParser::Scope::collectFreeVariables):
2287 (JSC::JSParser::Scope::capturedVariables):
2288 (JSC::JSParser::ScopeRef::ScopeRef):
2289 (JSC::JSParser::ScopeRef::operator->):
2290 (JSC::JSParser::ScopeRef::index):
2291 (JSC::JSParser::currentScope):
2292 (JSC::JSParser::pushScope):
2293 (JSC::JSParser::popScope):
2294 (JSC::JSParser::parseProgram):
2295 (JSC::JSParser::parseVarDeclarationList):
2296 (JSC::JSParser::parseConstDeclarationList):
2297 (JSC::JSParser::parseTryStatement):
2298 (JSC::JSParser::parseFormalParameters):
2299 (JSC::JSParser::parseFunctionInfo):
2300 (JSC::JSParser::parseFunctionDeclaration):
2301 (JSC::JSParser::parsePrimaryExpression):
2303 (JSC::ScopeNodeData::ScopeNodeData):
2304 (JSC::ScopeNode::ScopeNode):
2305 (JSC::ProgramNode::ProgramNode):
2306 (JSC::ProgramNode::create):
2307 (JSC::EvalNode::EvalNode):
2308 (JSC::EvalNode::create):
2309 (JSC::FunctionBodyNode::FunctionBodyNode):
2310 (JSC::FunctionBodyNode::create):
2312 (JSC::ScopeNode::needsActivation):
2313 (JSC::ScopeNode::hasCapturedVariables):
2314 * parser/Parser.cpp:
2315 (JSC::Parser::didFinishParsing):
2317 (JSC::Parser::parse):
2318 * parser/SyntaxChecker.h:
2319 * runtime/Executable.cpp:
2320 (JSC::EvalExecutable::compileInternal):
2321 (JSC::ProgramExecutable::compileInternal):
2322 (JSC::FunctionExecutable::compileForCallInternal):
2323 (JSC::FunctionExecutable::compileForConstructInternal):
2324 * runtime/Executable.h:
2325 (JSC::ScriptExecutable::needsActivation):
2326 (JSC::ScriptExecutable::recordParse):
2328 2010-09-14 Hyung Song <beergun@company100.net>
2330 Reviewed by Kent Tamura.
2332 [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
2333 https://bugs.webkit.org/show_bug.cgi?id=44764
2335 * wtf/OwnPtrCommon.h:
2336 * wtf/brew/OwnPtrBrew.cpp:
2337 (WTF::deleteOwnedPtr):
2339 2010-09-14 Darin Adler <darin@apple.com>
2341 Reviewed by Geoffrey Garen.
2343 Sort with non-numeric custom sort function fails on array with length but no values
2344 https://bugs.webkit.org/show_bug.cgi?id=45781
2346 * runtime/JSArray.cpp:
2347 (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
2348 exit for any array without values, even if it has a non-0 length.
2350 2010-09-14 Steve Falkenburg <sfalken@apple.com>
2352 Windows production build fix.
2355 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2357 2010-09-14 Kwang Yul Seo <skyul@company100.net>
2359 Reviewed by Darin Adler.
2361 Share UnicodeMacrosFromICU.h
2362 https://bugs.webkit.org/show_bug.cgi?id=45710
2364 glib, qt4 and wince use the same macros from ICU.
2365 Remove the code duplication and use the same header file.
2367 * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
2368 * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
2369 * wtf/unicode/qt4/UnicodeQt4.h:
2370 * wtf/unicode/wince/UnicodeWince.h:
2372 2010-09-13 Darin Adler <darin@apple.com>
2374 Reviewed by Adam Barth.
2376 Preparation for eliminating deprecatedParseURL
2377 https://bugs.webkit.org/show_bug.cgi?id=45695
2379 * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
2380 the HTML tree builder.
2382 2010-09-13 Darin Fisher <darin@chromium.org>
2384 Reviewed by David Levin.
2386 Add option to conditionally compile smooth scrolling support.
2387 https://bugs.webkit.org/show_bug.cgi?id=45689
2389 ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
2393 2010-09-13 Adam Roben <aroben@apple.com>
2395 Copy JavaScriptCore's generated sources to the right directory
2397 * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
2399 2010-09-13 Kwang Yul Seo <skyul@company100.net>
2401 Reviewed by Kent Tamura.
2403 [BREWMP] Don't call _msize
2404 https://bugs.webkit.org/show_bug.cgi?id=45556
2406 Because Brew MP uses its own memory allocator, it is not correct to use
2407 _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
2409 * wtf/FastMalloc.cpp:
2410 (WTF::fastMallocSize):
2412 2010-09-11 Simon Hausmann <simon.hausmann@nokia.com>
2414 Reviewed by Andreas Kling.
2416 [Qt] V8 port: webcore project files changes
2417 https://bugs.webkit.org/show_bug.cgi?id=45141
2419 * JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
2420 so that they can also be used from WebCore.pro for v8 builds.
2421 * wtf/wtf.pri: Added.
2423 2010-09-10 Fridrich Strba <fridrich.strba@bluewin.ch>
2425 Reviewed by Andreas Kling.
2427 Add a define missing when building with glib unicode backend
2428 https://bugs.webkit.org/show_bug.cgi?id=45544
2430 * wtf/unicode/glib/UnicodeMacrosFromICU.h:
2432 2010-09-10 Stephanie Lewis <slewis@apple.com>
2434 Reviewed by Alexey Proskuryakov.
2436 Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
2437 about the JIT and other implementation details of JavaScriptCore. Necessary
2440 https://bugs.webkit.org/show_bug.cgi?id=45528
2442 * JavaScriptCore.exp:
2443 * JavaScriptCore.xcodeproj/project.pbxproj:
2444 * runtime/MemoryStatistics.cpp: Added.
2445 (JSC::memoryStatistics):
2446 * runtime/MemoryStatistics.h: Added.
2448 2010-09-09 Michael Saboff <msaboff@apple.com>
2450 Reviewed by Gavin Barraclough.
2452 Added a regular expression tracing facility. This tracing is connected
2453 to jsc. Every compiled regular expression object is added to a list.
2454 When the process exits, each regular expression dumps its pattern,
2455 JIT address, number of times it was executed and the number of matches.
2456 This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
2458 https://bugs.webkit.org/show_bug.cgi?id=45401
2460 * JavaScriptCore.exp:
2463 * runtime/JSGlobalData.cpp:
2464 (JSC::JSGlobalData::JSGlobalData):
2465 (JSC::JSGlobalData::~JSGlobalData):
2466 (JSC::JSGlobalData::addRegExpToTrace):
2467 (JSC::JSGlobalData::dumpRegExpTrace):
2468 * runtime/JSGlobalData.h:
2469 * runtime/RegExp.cpp:
2470 (JSC::RegExp::RegExp):
2471 (JSC::RegExp::create):
2472 (JSC::RegExp::match):
2476 (JSC::Yarr::RegexCodeBlock::getAddr):
2478 2010-09-09 John Therrell <jtherrell@apple.com>
2482 * jit/ExecutableAllocator.cpp:
2483 (JSC::ExecutableAllocator::committedByteCount):
2485 2010-09-09 John Therrell <jtherrell@apple.com>
2487 Reviewed by Alexey Proskuryakov.
2489 Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
2490 https://bugs.webkit.org/show_bug.cgi?id=45134
2492 Added thread-safe committed byte counting and reporting functionality to RegisterFile and
2493 ExecutableAllocator.
2495 * JavaScriptCore.exp:
2496 Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
2498 * interpreter/RegisterFile.cpp:
2499 (JSC::registerFileStatisticsMutex):
2500 Added function which returns a static Mutex used for locking during read/write access to
2501 static committed byte count variable.
2502 (JSC::RegisterFile::~RegisterFile):
2503 Added call to addToStatistics since memory is decommitted here.
2504 (JSC::RegisterFile::releaseExcessCapacity):
2505 Added call to addToStatistics since memory is decommitted here.
2506 (JSC::RegisterFile::initializeThreading):
2507 Added function which calls registerFileStatisticsMutex().
2508 (JSC::RegisterFile::committedByteCount):
2509 Added function which returns the current committed byte count for RegisterFile.
2510 (JSC::RegisterFile::addToCommittedByteCount):
2511 Added function which updates committed byte count.
2513 * interpreter/RegisterFile.h:
2514 (JSC::RegisterFile::RegisterFile):
2515 Added call to addToStatistics since memory is committed here.
2516 (JSC::RegisterFile::grow):
2517 Added call to addToStatistics since memory is committed here.
2519 * jit/ExecutableAllocator.h:
2520 Added function prototype for public static function committedByteCount().
2522 * jit/ExecutableAllocatorFixedVMPool.cpp:
2523 (JSC::FixedVMPoolAllocator::release):
2524 Added call to addToStatistics since memory is decommitted here.
2525 (JSC::FixedVMPoolAllocator::reuse):
2526 Added call to addToStatistics since memory is committed here.
2527 (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
2528 Added function which updates committed byte count.
2529 (JSC::ExecutableAllocator::committedByteCount):
2530 Added function which returns the current committed byte count for ExecutableAllocator.
2532 * runtime/InitializeThreading.cpp:
2533 (JSC::initializeThreadingOnce):
2534 Added call to RegisterFile::initializeThreading.
2536 2010-09-09 Mark Rowe <mrowe@apple.com>
2538 Reviewed by Oliver Hunt.
2540 <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
2542 * API/JSObjectRef.cpp:
2543 (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
2544 failure. Instead map NULL directly to the null JSValue.
2545 * API/tests/testapi.c:
2546 (main): Add test coverage for the NULL value case.
2548 2010-09-09 Csaba Osztrogonác <ossy@webkit.org>
2550 Reviewed by Gavin Barraclough.
2552 [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
2553 https://bugs.webkit.org/show_bug.cgi?id=29268
2555 * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
2557 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
2559 Reviewed by Darin Adler.
2561 Removing doneSemicolon label in the lexer
2562 https://bugs.webkit.org/show_bug.cgi?id=45289
2564 As a side effect of moving the multiline comment parsing
2565 to a separate function, an opportunity raised to simplify
2566 the single line comment parsing, and removing doneSemicolon
2567 label. Slight performance increase on --parse-only
2568 tests (from 32.8ms to 31.5ms)
2573 2010-09-08 Xan Lopez <xlopez@igalia.com>
2575 Reviewed by Alexey Proskuryakov.
2577 Remove accessor for private member variable in JSParser
2578 https://bugs.webkit.org/show_bug.cgi?id=45378
2580 m_token is private to JSParser, so it does not seem to be useful
2581 to have an accessor for it. On top of that, the file was both
2582 using the accessor and directly accessing the member variable,
2583 only one style should be used.
2585 2010-09-08 Csaba Osztrogonác <ossy@webkit.org>
2587 Reviewed by Oliver Hunt.
2589 [Qt] REGRESSION(63348): jsc is broken
2590 https://bugs.webkit.org/show_bug.cgi?id=42818
2592 Need fastcall conventions on Qt/Win/MinGW.
2593 Based on patches of Gavin Barraclough: r63947 and r63948.
2598 2010-09-08 Robert Hogan <robert@webkit.org>
2600 Reviewed by Antonio Gomes.
2602 Remove some unnecessary duplicate calls to string functions
2604 https://bugs.webkit.org/show_bug.cgi?id=45314
2606 * wtf/text/WTFString.cpp:
2607 (WTF::String::format):
2609 2010-09-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2611 Reviewed by Andreas Kling.
2613 Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
2614 https://bugs.webkit.org/show_bug.cgi?id=45382
2616 It was enabled in the cleanup made in r64176, though it is still
2621 2010-09-08 Martin Robinson <mrobinson@igalia.com>
2623 Reviewed by Xan Lopez.
2625 [GTK] Need a WebSocket implementation
2626 https://bugs.webkit.org/show_bug.cgi?id=45197
2628 Add a GIO-based WebSocket implementation.
2630 * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
2631 (WTF::refPlatformPtr):
2632 (WTF::derefPlatformPtr):
2633 * wtf/gobject/GRefPtr.h: Added new template specialization declarations.
2634 * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
2636 2010-08-30 Maciej Stachowiak <mjs@apple.com>
2638 Reviewed by Darin Adler.
2640 Handle MediaQueryExp memory management exclusively with smart pointers
2641 https://bugs.webkit.org/show_bug.cgi?id=44874
2643 Implemented a non-copying sort function to make it possible to sort a Vector
2644 of OwnPtrs (which cannot be copied). This is required for the above.
2646 * wtf/NonCopyingSort.h: Added.
2647 (WTF::nonCopyingSort): It's secretly heapsort.
2648 (WTF::heapSort): heapsort implementation.
2649 (WTF::siftDown): Helper function for heapsort.
2650 (WTF::heapify): ditto
2652 Adjust build systems.
2655 * JavaScriptCore.gypi:
2656 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2657 * JavaScriptCore.xcodeproj/project.pbxproj:
2659 2010-09-08 Zoltan Herczeg <zherczeg@webkit.org>
2661 Reviewed by Darin Adler.
2663 Refactoring multiline comments in the lexer
2664 https://bugs.webkit.org/show_bug.cgi?id=45289
2666 MultiLine comment parsing is moved to a separate function.
2668 Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
2669 SunSpider reports no change (from 523.1ms to 521.2ms).
2672 (JSC::Lexer::parseMultilineComment):
2676 2010-09-07 James Robinson <jamesr@chromium.org>
2678 Compile fix attempt for windows.
2680 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2682 2010-09-07 Mihai Parparita <mihaip@chromium.org>
2684 Reviewed by James Robinson.
2686 Fix Windows build after r66936
2687 https://bugs.webkit.org/show_bug.cgi?id=45348
2689 Add symbol names that were missing from r66936.
2691 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2693 2010-09-07 Mihai Parparita <mihaip@chromium.org>
2695 Reviewed by Oliver Hunt.
2697 pushState and replaceState do not clone RegExp objects correctly
2698 https://bugs.webkit.org/show_bug.cgi?id=44718
2700 Move internal representation of JSC::RegExp (which depends on wether
2701 YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
2702 in the implementation only. This makes it feasible to use RegExp in
2703 WebCore without bringing in all of YARR.
2705 * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
2706 needed inside WebCore's JSC bindings.
2707 * runtime/RegExp.cpp:
2708 (JSC::RegExpRepresentation::~RegExpRepresentation):
2709 (JSC::RegExp::RegExp):
2710 (JSC::RegExp::~RegExp):
2711 (JSC::RegExp::compile):
2712 (JSC::RegExp::match):
2715 2010-09-07 Anders Carlsson <andersca@apple.com>
2717 Reviewed by Darin Adler.
2719 <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
2721 Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
2723 * Configurations/Base.xcconfig:
2725 2010-09-07 Zoltan Horvath <zoltan@webkit.org>
2727 Reviewed by Darin Adler.
2729 REGRESSION(66741): Undefined pthread macros
2730 https://bugs.webkit.org/show_bug.cgi?id=45246
2732 PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux,
2733 but used in a statement. Add an additional check to test this.
2735 * wtf/FastMalloc.cpp:
2736 (WTF::TCMalloc_PageHeap::initializeScavenger):
2738 2010-09-06 Oliver Hunt <oliver@apple.com>
2742 2010-09-05 Oliver Hunt <oliver@apple.com>
2744 Reviewed by Sam Weinig.
2746 SerializedScriptValue needs to use a flat storage mechanism
2747 https://bugs.webkit.org/show_bug.cgi?id=45244
2751 * JavaScriptCore.exp:
2753 2010-09-06 Chao-ying Fu <fu@mips.com>
2755 Reviewed by Oliver Hunt.
2757 Support JSVALUE32_64 on MIPS
2758 https://bugs.webkit.org/show_bug.cgi?id=43999
2760 Add missing functions to support JSVALUE32_64 on MIPS.
2761 Remove JSVALUE32 as the default for MIPS.
2763 * assembler/MIPSAssembler.h:
2764 (JSC::MIPSAssembler::divd):
2765 (JSC::MIPSAssembler::mthc1):
2766 (JSC::MIPSAssembler::cvtwd):
2767 * assembler/MacroAssemblerMIPS.h:
2768 (JSC::MacroAssemblerMIPS::neg32):
2769 (JSC::MacroAssemblerMIPS::branchOr32):
2770 (JSC::MacroAssemblerMIPS::set8):
2771 (JSC::MacroAssemblerMIPS::loadDouble):
2772 (JSC::MacroAssemblerMIPS::divDouble):
2773 (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
2774 (JSC::MacroAssemblerMIPS::branchDouble):
2775 (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
2776 (JSC::MacroAssemblerMIPS::zeroDouble):
2778 * jit/JITOpcodes32_64.cpp:
2779 (JSC::JIT::privateCompileCTINativeCall):
2780 * jit/JITPropertyAccess32_64.cpp:
2781 (JSC::JIT::privateCompilePutByIdTransition):
2783 (JSC::JITThunks::JITThunks):
2787 2010-09-06 Robert Hogan <robert@webkit.org>
2789 Unreviewed, compile fix.
2791 Fix compile failure in r66843
2793 Revert to original patch in bugzilla. Leave bug open for
2794 discussion on potential removal of double utf8 conversion.
2796 https://bugs.webkit.org/show_bug.cgi?id=45240
2798 * wtf/text/WTFString.cpp:
2799 (WTF::String::format):
2801 2010-09-06 Robert Hogan <robert@webkit.org>
2803 Reviewed by Andreas Kling.
2805 [Qt] utf8 encoding of console() messages
2808 http/tests/security/xssAuditor/embed-tag-null-char.html
2809 http/tests/security/xssAuditor/object-embed-tag-null-char.html
2811 Both tests failed because Qt's implementation of String::format()
2812 is casting a utf8 result to String, which assumes latin1 in
2813 its constructor. So instead of casting a QString to a String, use
2814 StringImpl::create() instead. Unfortunately, this involves a lot
2815 of extra casts but the end result is correct.
2817 https://bugs.webkit.org/show_bug.cgi?id=45240
2819 * wtf/text/WTFString.cpp:
2820 (WTF::String::format):
2822 2010-09-03 Alexey Proskuryakov <ap@apple.com>
2824 Reviewed by Darin Adler.
2826 https://bugs.webkit.org/show_bug.cgi?id=45135
2827 <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
2829 * wtf/FastMalloc.cpp:
2830 (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
2831 regardless of platform default, so that we can assert that it's held (this is for platforms
2832 that don't have libdispatch).
2833 (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
2834 at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
2836 (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
2837 manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
2838 can make unbalanced calls to dispatch_resume().
2840 2010-09-03 Lucas De Marchi <lucas.demarchi@profusion.mobi>
2842 Reviewed by Martin Robinson.
2844 [EFL] Regression (66531) Build break with Glib Support
2845 https://bugs.webkit.org/show_bug.cgi?id=45011
2847 Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
2848 since when glib is enabled, EFL port needs it, too.
2850 * CMakeListsEfl.txt: Include gobject directory to find new header
2852 * GNUmakefile.am: Ditto.
2853 * wtf/CMakeListsEfl.txt: Ditto.
2854 * wtf/Platform.h: Include header if port is EFL and glib support is
2856 * wtf/gtk/GtkTypedefs.h: Removed.
2857 * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
2858 guarded by PLATFORM(GTK).
2860 2010-09-03 Csaba Osztrogonác <ossy@webkit.org>
2862 Reviewed by Simon Hausmann.
2864 Fix warning in wtf/ByteArray.h
2865 https://bugs.webkit.org/show_bug.cgi?id=44672
2867 * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
2869 2010-09-02 Adam Barth <abarth@webkit.org>
2871 Reviewed by Eric Seidel.
2873 Actually parse a URL from ParsedURL
2874 https://bugs.webkit.org/show_bug.cgi?id=45080
2876 This patch only handles standard URLs. At some point we'll need to
2877 distinguish between standard URLs and other kinds of URLs.
2879 * wtf/url/api/ParsedURL.cpp:
2880 (WTF::ParsedURL::ParsedURL):
2882 2010-09-02 Adam Barth <abarth@webkit.org>
2884 Reviewed by Eric Seidel.
2886 Add ParsedURL and URLString to WTFURL API
2887 https://bugs.webkit.org/show_bug.cgi?id=45078
2889 Currently there's no actual URL parsing going on, but this patch is a
2890 start to sketching out the API.
2892 * JavaScriptCore.xcodeproj/project.pbxproj:
2893 * wtf/url/api/ParsedURL.cpp: Added.
2894 (WTF::ParsedURL::ParsedURL):
2895 (WTF::ParsedURL::scheme):
2896 (WTF::ParsedURL::username):
2897 (WTF::ParsedURL::password):
2898 (WTF::ParsedURL::host):
2899 (WTF::ParsedURL::port):
2900 (WTF::ParsedURL::path):
2901 (WTF::ParsedURL::query):
2902 (WTF::ParsedURL::fragment):
2903 (WTF::ParsedURL::segment):
2904 * wtf/url/api/ParsedURL.h: Added.
2905 (WTF::ParsedURL::spec):
2906 * wtf/url/api/URLString.h: Added.
2907 (WTF::URLString::URLString):
2908 (WTF::URLString::string):
2910 2010-09-02 Adam Barth <abarth@webkit.org>
2912 Reviewed by Eric Seidel.
2914 Add WTFURL to the JavaScriptCore build on Mac
2915 https://bugs.webkit.org/show_bug.cgi?id=45075
2917 Building code is good.
2919 * JavaScriptCore.xcodeproj/project.pbxproj:
2921 2010-09-02 Alexey Proskuryakov <ap@apple.com>
2923 Reviewed by Oliver Hunt.
2925 https://bugs.webkit.org/show_bug.cgi?id=43230
2926 <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
2928 One can't delete a ThreadSpecific object that has data in it. It's not even possible to
2929 enumerate data objects in all threads, much less destroy them from a thread that's destroying
2932 * parser/JSParser.cpp:
2933 (JSC::JSParser::JSParser):
2934 * runtime/JSGlobalData.h:
2935 * wtf/WTFThreadData.cpp:
2936 (WTF::WTFThreadData::WTFThreadData):
2937 * wtf/WTFThreadData.h:
2938 (WTF::WTFThreadData::approximatedStackStart):
2939 Moved stack guard tracking from JSGlobalData to WTFThreadData.
2941 * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
2942 ever face a situation where we'd want to delete a ThreadSpecific object.
2944 2010-09-01 Gavin Barraclough <barraclough@apple.com>
2946 Rubber stamped by Oliver Hunt.
2948 Ecma-262 15.11.1.1 states that if the argument is undefined then an
2949 Error object's message property should be set to the empty string.
2951 * runtime/ErrorInstance.cpp:
2952 (JSC::ErrorInstance::ErrorInstance):
2953 (JSC::ErrorInstance::create):
2954 * runtime/ErrorInstance.h:
2955 * runtime/ErrorPrototype.cpp:
2956 (JSC::ErrorPrototype::ErrorPrototype):
2958 2010-08-31 Darin Adler <darin@apple.com>
2960 Reviewed by Anders Carlsson.
2962 * wtf/FastMalloc.cpp:
2963 (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
2964 mixed types with code that uses size_t.
2966 * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
2968 2010-08-31 Martin Robinson <mrobinson@igalia.com>
2970 Reviewed by Gustavo Noronha Silva.
2972 [GTK] Isolate all GTK+ typedefs into one file
2973 https://bugs.webkit.org/show_bug.cgi?id=44900
2975 * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
2976 * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
2977 * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
2978 * wtf/gobject/GOwnPtr.h: Ditto.
2979 * wtf/gobject/GRefPtr.h: Ditto.
2980 * wtf/gtk/GtkTypedefs.h: Added.
2982 2010-08-31 Martin Robinson <mrobinson@igalia.com>
2984 Reviewed by Gustavo Noronha Silva.
2986 [GTK] Fix 'make dist' in preparation of the 1.3.3 release
2987 https://bugs.webkit.org/show_bug.cgi?id=44978
2989 * GNUmakefile.am: Adding missing headers to the sources list.
2991 2010-08-31 Chao-ying Fu <fu@mips.com>
2993 Reviewed by Oliver Hunt.
2995 Support emit_op_mod() for MIPS
2996 https://bugs.webkit.org/show_bug.cgi?id=42855
2998 This patch uses MIPS div instructions for op_mod to improve performance.
3000 * assembler/MIPSAssembler.h:
3001 (JSC::MIPSAssembler::div):
3002 * jit/JITArithmetic.cpp:
3003 (JSC::JIT::emit_op_mod):
3004 (JSC::JIT::emitSlow_op_mod):
3006 2010-08-31 Csaba Osztrogonác <ossy@webkit.org>
3008 Reviewed by Darin Adler.
3010 Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
3011 https://bugs.webkit.org/show_bug.cgi?id=44870
3014 * wtf/UnusedParam.h:
3016 2010-08-31 Benjamin Poulain <benjamin.poulain@nokia.com>
3018 Reviewed by Kenneth Rohde Christiansen.
3020 JSC TimeoutChecker::didTimeOut overflows on ARM
3021 https://bugs.webkit.org/show_bug.cgi?id=38538
3023 Make getCPUTime() return values relative to the first call.
3024 The previous implementation relied on simply on currentTime(), which
3025 return a time since epoch and not a time since the thread started. This
3026 made the return value of getCPUTime() overflow on 32 bits.
3028 * runtime/TimeoutChecker.cpp:
3031 2010-08-30 Mihai Parparita <mihaip@chromium.org>
3033 Reviewed by Adam Barth.
3035 HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
3036 https://bugs.webkit.org/show_bug.cgi?id=44315
3038 Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
3042 2010-08-30 Chris Rogers <crogers@google.com>
3044 Reviewed by Kenneth Russell.
3046 Fix namespace for wtf/Complex.h and wtf/Vector3.h
3047 https://bugs.webkit.org/show_bug.cgi?id=44892
3052 2010-08-30 Andy Estes <aestes@apple.com>
3054 Reviewed by Eric Carlson.
3056 Strings returned by asciiDebug() should be NULL-terminated.
3057 https://bugs.webkit.org/show_bug.cgi?id=44866
3059 * wtf/text/WTFString.cpp:
3062 2010-08-30 Zoltan Herczeg <zherczeg@webkit.org>
3064 Reviewed by Darin Adler.
3066 Refactor number parsing in the lexer
3067 https://bugs.webkit.org/show_bug.cgi?id=44104
3069 Number parsing was full of gotos, and needed a complete
3070 redesign to remove them (Only one remained). Furthermore
3071 integer arithmetic is empolyed for fast cases (= small
3075 (JSC::Lexer::parseHex):
3076 (JSC::Lexer::parseOctal):
3077 (JSC::Lexer::parseDecimal):
3078 (JSC::Lexer::parseNumberAfterDecimalPoint):
3079 (JSC::Lexer::parseNumberAfterExponentIndicator):
3083 2010-08-29 Darin Adler <darin@apple.com>
3087 * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
3088 * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
3089 * wtf/unicode/wince/UnicodeWince.h: Ditto.
3091 2010-08-29 Kwang Yul Seo <skyul@company100.net>
3093 Reviewed by Kent Tamura.
3095 [BREWMP] Port vprintf_stderr_common
3096 https://bugs.webkit.org/show_bug.cgi?id=33568
3098 Use BREW's DBGPRINTF to output debug messages.
3100 * wtf/Assertions.cpp:
3102 2010-08-28 Gavin Barraclough <barraclough@apple.com>
3104 Reviewed by Oliver Hunt.
3106 Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
3108 We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
3109 that the result is within bounds. This is problematic in the case of double-to-unsigned
3110 conversion because we should be saturating to array length.
3112 Also, the error return value from Array.splice should be [], not undefined.
3114 I don't see any security concerns here. These methods are spec'ed in such a way that they
3115 can be applied to non Array objects, so in all cases the (potentially bogus) indices are
3116 being passed to functions that will safely check accesses are within bounds.
3118 * runtime/ArrayPrototype.cpp:
3119 (JSC::argumentClampedIndexFromStartOrEnd):
3120 (JSC::arrayProtoFuncJoin):
3121 (JSC::arrayProtoFuncConcat):
3122 (JSC::arrayProtoFuncReverse):
3123 (JSC::arrayProtoFuncShift):
3124 (JSC::arrayProtoFuncSlice):
3125 (JSC::arrayProtoFuncSort):
3126 (JSC::arrayProtoFuncSplice):
3127 (JSC::arrayProtoFuncUnShift):
3128 (JSC::arrayProtoFuncFilter):
3129 (JSC::arrayProtoFuncMap):
3130 (JSC::arrayProtoFuncEvery):
3131 (JSC::arrayProtoFuncForEach):
3132 (JSC::arrayProtoFuncSome):
3133 (JSC::arrayProtoFuncReduce):
3134 (JSC::arrayProtoFuncReduceRight):
3135 (JSC::arrayProtoFuncIndexOf):
3136 (JSC::arrayProtoFuncLastIndexOf):
3137 * runtime/JSValue.h:
3138 (JSC::JSValue::toUInt32):
3140 2010-08-28 Pratik Solanki <psolanki@apple.com>
3142 Reviewed by Dan Bernstein.
3144 Add an ENABLE define for purgeable memory support
3145 https://bugs.webkit.org/show_bug.cgi?id=44777
3149 2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
3151 Reviewed by Kenneth Rohde Christiansen.
3153 [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
3154 https://bugs.webkit.org/show_bug.cgi?id=43179
3156 Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
3157 NPAPI Plugin Cache. The flag is enabled by default.
3159 * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
3161 2010-07-27 Jer Noble <jer.noble@apple.com>
3163 Reviewed by Eric Carlson.
3165 Add JavaScript API to allow a page to go fullscreen.
3166 rdar://problem/6867795
3167 https://bugs.webkit.org/show_bug.cgi?id=43099
3169 * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
3171 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3173 Windows build fix pt 2.
3175 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3177 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3179 Windows build fix pt 1.
3181 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3183 2010-08-27 Gavin Barraclough <barraclough@apple.com>
3185 Reviewed by Oliver Hunt.
3187 Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
3189 These methods should be using a version of dtoa that can generate results accurate
3190 to the requested precision, whereas our version of dtoa is only currently able to
3191 support producing results sufficiently accurate to distinguish the value from any
3192 other IEEE-754 double precision number.
3194 This change has no impact on benchmarks we track.
3196 On microbenchmarks for these functions, this is a slight regression where a high
3197 precision is requested (dtoa now need to iterate further to generate a a greater
3198 number of digits), but with smaller precision values (hopefully more common) this
3199 improves performance, since it reduced the accurate of result dtoa is required,
3200 to produce, and removes the need to pre-round values before calling dtoa.
3202 * JavaScriptCore.exp:
3203 doubleToStringInJavaScriptFormat renamed to numberToString
3205 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3206 doubleToStringInJavaScriptFormat renamed to numberToString
3208 * runtime/UString.cpp:
3209 (JSC::UString::number):
3210 doubleToStringInJavaScriptFormat renamed to numberToString
3212 * wtf/DecimalNumber.h:
3213 (WTF::DecimalNumber::DecimalNumber):
3214 (WTF::DecimalNumber::toStringDecimal):
3215 (WTF::DecimalNumber::toStringExponential):
3216 Remove all pre-rounding of values, instead call dtoa correctly.
3221 Reenable support for rounding to specific-figures/decimal-places in dtoa.
3222 Modify to remove unbiased rounding, provide ECMA required away-from-zero.
3223 Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
3226 2010-08-27 Chao-ying Fu <fu@mips.com>
3228 Reviewed by Oliver Hunt.
3230 Byte alignment issue on MIPS
3231 https://bugs.webkit.org/show_bug.cgi?id=29415
3233 MIPS accesses one byte at a time for now to avoid the help from the
3234 kernel to fix unaligned accesses.
3236 * wtf/text/AtomicString.cpp:
3238 * wtf/text/StringHash.h:
3239 (WebCore::StringHash::equal):
3241 2010-08-27 Xan Lopez <xlopez@igalia.com>
3243 Reviewed by Tor Arne Vestbø.
3245 Fix a couple of typos in comment.
3247 * bytecode/CodeBlock.h:
3249 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3255 2010-08-26 Gavin Barraclough <baraclough@apple.com>
3257 Reviewed by Sam Weinig.
3259 Bug 44735 - Clean up dtoa.cpp
3260 Remove unused & unmaintained code paths, reformat code to match
3261 coding standard & use platform #defines from Platform.h directly.
3281 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3283 Rubber Stamped by Oliver Hunt.
3285 Partially revert r65959. The toString changes regressed the v8 tests,
3286 but keep the toFixed/toExponential/toPrecision changes.
3288 * JavaScriptCore.exp:
3289 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3290 * runtime/NumberPrototype.cpp:
3291 * runtime/UString.cpp:
3292 (JSC::UString::number):
3293 * wtf/DecimalNumber.h:
3296 (WTF::doubleToStringInJavaScriptFormat):
3298 * wtf/text/WTFString.cpp:
3299 * wtf/text/WTFString.h:
3301 2010-08-26 James Robinson <jamesr@chromium.org>
3303 Reviewed by Darin Fisher.
3305 [chromium] Remove the USE(GLES2_RENDERING) define and associated code
3306 https://bugs.webkit.org/show_bug.cgi?id=43761
3308 Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
3312 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3314 Rolling out r64608, this regressed performance.
3316 * JavaScriptCore.xcodeproj/project.pbxproj:
3317 * assembler/ARMAssembler.cpp:
3318 (JSC::ARMAssembler::executableCopy):
3319 * assembler/LinkBuffer.h:
3320 (JSC::LinkBuffer::LinkBuffer):
3321 (JSC::LinkBuffer::~LinkBuffer):
3322 (JSC::LinkBuffer::performFinalization):
3323 * assembler/MIPSAssembler.h:
3324 (JSC::MIPSAssembler::executableCopy):
3325 * assembler/X86Assembler.h:
3326 (JSC::X86Assembler::executableCopy):
3327 * bytecode/StructureStubInfo.h:
3328 (JSC::StructureStubInfo::initGetByIdProto):
3329 (JSC::StructureStubInfo::initGetByIdChain):
3330 (JSC::StructureStubInfo::initGetByIdSelfList):
3331 (JSC::StructureStubInfo::initGetByIdProtoList):
3332 (JSC::StructureStubInfo::initPutByIdTransition):
3333 * jit/ExecutableAllocator.cpp:
3334 (JSC::ExecutablePool::systemAlloc):
3335 * jit/ExecutableAllocator.h:
3336 (JSC::ExecutablePool::create):
3337 (JSC::ExecutableAllocator::ExecutableAllocator):
3338 (JSC::ExecutableAllocator::poolForSize):
3339 (JSC::ExecutablePool::ExecutablePool):
3340 (JSC::ExecutablePool::poolAllocate):
3341 * jit/ExecutableAllocatorFixedVMPool.cpp:
3342 (JSC::FixedVMPoolAllocator::allocInternal):
3344 (JSC::JIT::privateCompile):
3346 (JSC::JIT::compileGetByIdProto):
3347 (JSC::JIT::compileGetByIdSelfList):
3348 (JSC::JIT::compileGetByIdProtoList):
3349 (JSC::JIT::compileGetByIdChainList):
3350 (JSC::JIT::compileGetByIdChain):
3351 (JSC::JIT::compilePutByIdTransition):
3352 (JSC::JIT::compilePatchGetArrayLength):
3353 * jit/JITOpcodes.cpp:
3354 (JSC::JIT::privateCompileCTIMachineTrampolines):
3355 * jit/JITOpcodes32_64.cpp:
3356 (JSC::JIT::privateCompileCTIMachineTrampolines):
3357 (JSC::JIT::privateCompileCTINativeCall):
3358 * jit/JITPropertyAccess.cpp:
3359 (JSC::JIT::stringGetByValStubGenerator):
3360 (JSC::JIT::privateCompilePutByIdTransition):
3361 (JSC::JIT::privateCompilePatchGetArrayLength):
3362 (JSC::JIT::privateCompileGetByIdProto):
3363 (JSC::JIT::privateCompileGetByIdSelfList):
3364 (JSC::JIT::privateCompileGetByIdProtoList):
3365 (JSC::JIT::privateCompileGetByIdChainList):
3366 (JSC::JIT::privateCompileGetByIdChain):
3367 * jit/JITPropertyAccess32_64.cpp:
3368 (JSC::JIT::stringGetByValStubGenerator):
3369 (JSC::JIT::privateCompilePutByIdTransition):
3370 (JSC::JIT::privateCompilePatchGetArrayLength):
3371 (JSC::JIT::privateCompileGetByIdProto):
3372 (JSC::JIT::privateCompileGetByIdSelfList):
3373 (JSC::JIT::privateCompileGetByIdProtoList):
3374 (JSC::JIT::privateCompileGetByIdChainList):
3375 (JSC::JIT::privateCompileGetByIdChain):
3377 (JSC::JITThunks::tryCachePutByID):
3378 (JSC::JITThunks::tryCacheGetByID):
3379 (JSC::DEFINE_STUB_FUNCTION):
3380 (JSC::getPolymorphicAccessStructureListSlot):
3382 * jit/SpecializedThunkJIT.h:
3383 (JSC::SpecializedThunkJIT::finalize):
3384 * runtime/ExceptionHelpers.cpp:
3385 * runtime/ExceptionHelpers.h:
3386 * runtime/Executable.cpp:
3387 (JSC::EvalExecutable::compileInternal):
3388 (JSC::ProgramExecutable::compileInternal):
3389 (JSC::FunctionExecutable::compileForCallInternal):
3390 (JSC::FunctionExecutable::compileForConstructInternal):
3391 (JSC::FunctionExecutable::reparseExceptionInfo):
3392 (JSC::EvalExecutable::reparseExceptionInfo):
3393 * yarr/RegexJIT.cpp:
3394 (JSC::Yarr::RegexGenerator::compile):
3396 2010-08-26 Gavin Barraclough <barraclough@apple.com>
3398 Reviewed by Brady Eidson.
3400 Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
3402 * wtf/text/WTFString.cpp:
3404 Return a Vector<char> containing the contents of a string as ASCII.
3406 2010-08-26 Sam Weinig <sam@webkit.org>
3408 Reviewed by Darin Adler.
3411 https://bugs.webkit.org/show_bug.cgi?id=44627
3414 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3415 * JavaScriptCore.xcodeproj/project.pbxproj:
3419 Forward declare PassOwnArrayPtr.
3421 * wtf/OwnArrayPtr.h:
3422 Mimic the OwnPtr interface.
3424 * wtf/OwnArrayPtrCommon.h: Added.
3425 (WTF::deleteOwnedArrayPtr):
3426 Move delete function here so it can be shared by OwnArrayPtr and
3429 * wtf/PassOwnArrayPtr.h: Added.
3430 Mimic the PassOwnPtr interface.
3432 2010-08-26 Oliver Hunt <oliver@apple.com>
3434 Reviewed by Gavin Barraclough.
3436 [JSC] JavaScript parsing error when loading Equifax web page
3437 https://bugs.webkit.org/show_bug.cgi?id=42900
3439 '-->' is ostensibly only meant to occur when there is only
3440 whitespace preceeding it on the line. However firefox treats
3441 multiline comments as a space character, so they are allowed.
3442 One side effect of the firefox model is that any line terminators
3443 inside the multiline comment are ignored, so
3452 and so '-->' will not be a comment in this case. Happily this simply
3453 means that to fix this issue all we need to do is stop updating
3454 m_atLineStart when handling multiline comments.
3459 2010-08-25 Oliver Hunt <oliver@apple.com>
3461 Reviewed by Geoffrey Garen.
3463 Improve overflow handling in StringImpl::Replace
3464 https://bugs.webkit.org/show_bug.cgi?id=42502
3465 <rdar://problem/8203794>
3467 Harden StringImpl::replace against overflow -- I can't see how this
3468 could be abused, but it's better to be safe than sorry.
3470 * wtf/text/StringImpl.cpp:
3471 (WTF::StringImpl::replace):
3473 2010-08-26 Martin Robinson <mrobinson@igalia.com>
3475 Reviewed by Xan Lopez.
3477 [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
3478 https://bugs.webkit.org/show_bug.cgi?id=44624
3480 Clean up GNUmakefile.am.
3482 * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
3483 a couple include lines from the top-level GNUmakefile.am.
3485 2010-08-25 Xan Lopez <xlopez@igalia.com>
3487 Reviewed by Kent Tamura.
3489 Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
3490 https://bugs.webkit.org/show_bug.cgi?id=29259
3492 Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
3497 2010-08-25 Kwang Yul Seo <skyul@company100.net>
3499 Reviewed by Kevin Ollivier.
3501 [BREWMP] Add build system
3502 https://bugs.webkit.org/show_bug.cgi?id=44645
3504 Make waf script portable so that we can add more ports.
3508 2010-08-25 Michael Saboff <msaboff@apple.com>
3510 Reviewed by Sam Weinig.
3512 Remove the single entry regular expression cache introduced as part of
3513 the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
3514 The performance problem in Dromaeo that initiated that bug is no
3515 longer present. Dromaeo has been modified so that the regular
3516 expression tests are somewhat random and don't benefit from a
3519 * runtime/RegExp.cpp:
3520 (JSC::RegExp::RegExp):
3521 (JSC::RegExp::match):
3524 2010-08-25 Martin Robinson <mrobinson@igalia.com>
3526 Reviewed by Gustavo Noronha Silva.
3528 Cairo and EFL port shouldn't depend on glib.
3529 https://bugs.webkit.org/show_bug.cgi?id=44354
3531 Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
3534 * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
3535 * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
3536 (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
3537 (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
3538 (WTF::PlatformRefPtr::clear): Ditto.
3539 (WTF::PlatformRefPtr::get): Ditto.
3540 (WTF::PlatformRefPtr::operator*): Ditto.
3541 (WTF::PlatformRefPtr::operator->): Ditto.
3542 (WTF::PlatformRefPtr::operator!): Ditto.
3543 (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
3544 (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
3545 (WTF::::operator): Ditto.
3546 (WTF::::swap): Ditto.
3548 (WTF::operator==): Ditto.
3549 (WTF::operator!=): Ditto.
3550 (WTF::static_pointer_cast): Ditto.
3551 (WTF::const_pointer_cast): Ditto.
3552 (WTF::getPtr): Ditto.
3553 (WTF::adoptPlatformRef): Ditto.
3554 * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
3555 (WTF::refPlatformPtr):
3556 (WTF::derefPlatformPtr):
3557 * wtf/gobject/GRefPtr.h: Ditto.
3558 (WTF::refPlatformPtr):
3559 (WTF::derefPlatformPtr):
3561 2010-08-25 Xan Lopez <xlopez@igalia.com>
3563 Reviewed by Alexey Proskuryakov.
3565 Remove dead code in JSGlobalObject
3566 https://bugs.webkit.org/show_bug.cgi?id=44615
3568 The recursion data member in the JSGlobalObject and its getter
3569 plus inc/dec methods seems to be unused, remove them.
3571 * runtime/JSGlobalObject.cpp:
3572 (JSC::JSGlobalObject::init):
3573 * runtime/JSGlobalObject.h:
3575 2010-08-25 Michael Saboff <msaboff@apple.com>
3577 Reviewed by Geoffrey Garen.
3579 Changed the initial and subsequent allocation of vector storage to
3580 Array()s. The changes are to limit sparse arrays to 100000 entries
3581 and fixed the sparse map to vector storage conversion to use the
3582 minimum amount of memory needed to store the current number of entries.
3583 These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
3585 * runtime/JSArray.cpp:
3586 (JSC::JSArray::putSlowCase):
3587 (JSC::JSArray::getNewVectorLength):
3589 2010-08-16 Gabor Loki <loki@webkit.org>