1 2010-12-09 Michael Saboff <msaboff@apple.com>
3 Reviewed by Darin Adler.
5 Changed setting of backtrack labels to not overwrite a prior
6 label. Where losing prior labe which then reverted back to
8 https://bugs.webkit.org/show_bug.cgi?id=50579
11 (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
13 2010-12-08 Gavin Barraclough <barraclough@apple.com>
15 Reviewed by Sam Weinig.
17 Permit Character Class Escape in CharacterRange in Character Class.
18 https://bugs.webkit.org/show_bug.cgi?id=50483
19 https://bugs.webkit.org/show_bug.cgi?id=50538
20 https://bugs.webkit.org/show_bug.cgi?id=50654
21 https://bugs.webkit.org/show_bug.cgi?id=50646
23 We recently tightened up our spec conformance in generating syntax
24 error in these cases, however testing in the wild has shown this
25 to be problematic. This reverts the previous change in allowing
26 class escapes (e.g. \d) in ranges in character classes ([]), but
27 does retain some closer conformance to the spec in only allowing
28 ranges that would be permitted per the grammar rules in the spec
29 (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
32 (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
33 (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
34 (JSC::Yarr::Parser::parse):
36 2010-12-08 Geoffrey Garen <ggaren@apple.com>
38 Reviewed by Sam Weinig.
40 Try to fix crash-on-launch seen on Windows builder.
42 * wtf/OSAllocatorWin.cpp:
43 (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
44 a bug that hasn't been fixed yet.
46 2010-12-08 Geoffrey Garen <ggaren@apple.com>
48 Try to fix Windows build.
50 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
52 2010-12-08 Geoffrey Garen <ggaren@apple.com>
54 Try to fix Windows build.
56 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
57 file to remove a symbol -- the next build failure will say which symbol
60 2010-12-08 Geoffrey Garen <ggaren@apple.com>
62 Try to fix Windows build.
64 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
66 2010-12-08 Geoffrey Garen <ggaren@apple.com>
68 Try to fix GTK Linux build.
70 * jit/ExecutableAllocator.cpp:
71 (JSC::ExecutablePool::systemAlloc):
72 * runtime/AlignedMemoryAllocator.h:
73 (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
75 2010-12-07 Geoffrey Garen <ggaren@apple.com>
77 Reviewed by Sam Weinig.
79 Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
80 https://bugs.webkit.org/show_bug.cgi?id=50653
82 * JavaScriptCore.exp: Updated for new function signature.
84 * interpreter/RegisterFile.h:
85 (JSC::RegisterFile::RegisterFile):
86 (JSC::RegisterFile::grow):
87 * jit/ExecutableAllocatorFixedVMPool.cpp:
88 (JSC::FixedVMPoolAllocator::reuse):
89 (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
90 OSAllocator is now the central location for verifying that allocation succeeds.
91 This allowed me to remove some complicating cross-platform cruft.
93 * runtime/AlignedMemoryAllocator.h:
94 (JSC::::allocate): Updated for code motion.
96 * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
97 support VM features required by clients of PageAllocation and PageReservation.
99 * wtf/OSAllocatorPosix.cpp:
100 (WTF::OSAllocator::reserve):
101 (WTF::OSAllocator::reserveAndCommit):
102 (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
103 executable memory here.
105 * wtf/OSAllocatorSymbian.cpp:
106 (WTF::OSAllocator::reserve):
107 (WTF::OSAllocator::reserveAndCommit):
108 (WTF::OSAllocator::commit): Updated for new function signatures.
110 * wtf/OSAllocatorWin.cpp:
112 (WTF::OSAllocator::reserve):
113 (WTF::OSAllocator::reserveAndCommit):
114 (WTF::OSAllocator::commit):
115 (WTF::OSAllocator::release): Updated for new function signatures. Moved
116 some protection-related and WINCE-related code from PageAllocation here.
118 * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
119 it was only used by checkAllocatedOkay, which is now gone.
121 * wtf/PageAllocation.h:
122 (WTF::PageAllocation::allocate):
123 (WTF::PageAllocation::allocateAligned):
124 (WTF::PageAllocation::deallocate):
125 (WTF::PageAllocation::isPowerOfTwo):
126 (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
127 and replaced calls to them with calls to OSAllocator.
129 * wtf/PageReservation.h:
130 (WTF::PageReservation::commit):
131 (WTF::PageReservation::decommit):
132 (WTF::PageReservation::reserve):
133 (WTF::PageReservation::deallocate):
134 (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
135 m_executable because these flags are now required when committing memory.
137 2010-12-08 Chris Rogers <crogers@google.com>
139 Reviewed by Kenneth Russell.
141 Add web audio files to mac port Xcode projects
142 https://bugs.webkit.org/show_bug.cgi?id=50721
144 * JavaScriptCore.xcodeproj/project.pbxproj:
146 2010-12-08 Oliver Hunt <oliver@apple.com>
148 Reviewed by Gavin Barraclough.
150 Marking the active global object re-enters through markConservatively
151 https://bugs.webkit.org/show_bug.cgi?id=50711
153 draining of the MarkStack is not allowed to be re-entrant, we got away
154 with this simply due to the logic in MarkStack::drain implicitly handling
155 changes that could be triggered by the re-entry.
157 Just to be safe this patch removes the re-entry through markConservatively
158 so we don't accidentally introduce such an issue in future. I've also
159 added an assertion to catch such errors.
161 * runtime/Collector.cpp:
162 (JSC::Heap::markConservatively):
163 (JSC::Heap::markCurrentThreadConservativelyInternal):
164 (JSC::Heap::markOtherThreadConservatively):
166 (JSC::MarkStack::drain):
167 * runtime/MarkStack.h:
168 (JSC::MarkStack::MarkStack):
170 2010-12-08 Chris Marrin <cmarrin@apple.com>
172 Reviewed by Simon Fraser.
174 Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
175 https://bugs.webkit.org/show_bug.cgi?id=49388
177 Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
178 which was decided was the best way to identify a build with CoreAnimation
182 2010-12-07 Anders Carlsson <andersca@apple.com>
184 Build fix follow up build fix.
186 * pcre/pcre_ucp_searchfuncs.cpp:
187 (jsc_pcre_ucp_othercase):
189 2010-12-07 Anders Carlsson <andersca@apple.com>
191 Reviewed by Darin Adler.
194 https://bugs.webkit.org/show_bug.cgi?id=50645
196 Explicitly cast offset to int.
198 * pcre/pcre_ucp_searchfuncs.cpp:
199 (jsc_pcre_ucp_othercase):
201 2010-12-07 Kenneth Russell <kbr@google.com>
203 Reviewed by David Levin.
205 Fix compilation of core web audio files on Windows
206 https://bugs.webkit.org/show_bug.cgi?id=50603
208 Added log2 definition to MathExtras.h on Windows platform.
213 2010-12-07 Antti Koivisto <antti@apple.com>
215 Reviewed by Gavin Barraclough.
217 https://bugs.webkit.org/show_bug.cgi?id=50412
218 http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading
220 Creating a substring caused the original string be flattened if it was in the rope form. This could use
221 significant amount of memory by reducing buffer sharing between strings.
223 Add a rope specific substring function that constructs the substring by reusing the rope fibers
224 instead of flattening the rope.
226 No change observed in SunSpider.
228 * runtime/JSString.cpp:
229 (JSC::JSString::substringFromRope):
230 * runtime/JSString.h:
232 * runtime/StringPrototype.cpp:
233 (JSC::stringProtoFuncSubstr):
234 (JSC::stringProtoFuncSubstring):
236 2010-12-06 Geoffrey Garen <ggaren@apple.com>
238 Reviewed by Gavin Barraclough.
240 Simplified some ASLR-related code in PageAllocation/Reservation
241 https://bugs.webkit.org/show_bug.cgi?id=50599
243 Removed reserveAt, allocateAt, and friends, since they all existed to
244 serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
245 ASLR code down into systemAllocate -- now, any time you allocate
246 executable memory on a supporting platform, the memory's location is
249 * jit/ExecutableAllocatorFixedVMPool.cpp:
250 (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
251 to randomize anything.
253 * wtf/PageAllocation.h:
254 (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
255 beefed up executable allocation with randomization.
257 * wtf/PageReservation.h:
258 (WTF::PageReservation::systemReserve): Removed some *At() functions.
260 2010-12-06 Geoffrey Garen <ggaren@apple.com>
262 Reviewed by Maciej Stachowiak.
264 reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
265 https://bugs.webkit.org/show_bug.cgi?id=50588
267 * wtf/OSAllocatorPosix.cpp:
268 (WTF::OSAllocator::reserve):
269 (WTF::OSAllocator::reserveAndCommit):
270 (WTF::OSAllocator::commit): Tightened up some comments. Changed
271 reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
273 2010-12-06 Patrick Gansterer <paroga@webkit.org>
275 Reviewed by Andreas Kling.
277 [WINCE] Add build system
278 https://bugs.webkit.org/show_bug.cgi?id=50522
280 * CMakeListsWinCE.txt: Added.
281 * shell/CMakeListsWinCE.txt: Added.
282 * wtf/CMakeListsWinCE.txt: Added.
284 2010-12-06 John Tantalo <john.tantalo@gmail.com>
286 Reviewed by Geoffrey Garen.
288 jsc does not ignore shebang
289 https://bugs.webkit.org/show_bug.cgi?id=49576
292 (fillBufferWithContentsOfFile):
293 - translate shebang into a valid JavaScript comment so the lexer ignores it
295 2010-12-05 Adam Roben <aroben@apple.com>
297 Windows production build fix
299 Put spaces after trailing backslashes when setting
300 %WebKitVSPropsRedirectionDir%. According to MSDN
301 <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
303 A backslash ( \ ) followed by a newline character is interpreted as
304 a space in the command; use a backslash at the end of a line to
305 continue a command onto the next line. NMAKE interprets the
306 backslash literally if any other character, including a space or
307 tab, follows the backslash.
309 * JavaScriptCore.vcproj/JavaScriptCore.make:
311 2010-12-04 Patrick Gansterer <paroga@webkit.org>
313 Unreviewed, build fix after r69132.
315 * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
317 2010-12-04 Xan Lopez <xlopez@igalia.com>
319 Reviewed by Martin Robinson.
321 [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
322 https://bugs.webkit.org/show_bug.cgi?id=50451
324 * wtf/gobject/GTypedefs.h: add GdkWindow defines.
326 2010-12-03 Gavin Barraclough <barraclough@apple.com>
328 Rubber stamped by Oliver Hunt.
330 Bug 50509 - set* methods on MacroAssembler are awfully named.
332 Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
333 set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
334 setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
338 set32 -> set32Compare32
339 setTest32 -> set32Test32
340 set8 -> set8Compare32
341 setTest8 -> set32Test8
343 * assembler/MacroAssembler.h:
344 (JSC::MacroAssembler::setPtr):
345 * assembler/MacroAssemblerARM.h:
346 (JSC::MacroAssemblerARM::set32Compare32):
347 (JSC::MacroAssemblerARM::set8Compare32):
348 (JSC::MacroAssemblerARM::set32Test32):
349 (JSC::MacroAssemblerARM::set32Test8):
350 * assembler/MacroAssemblerARMv7.h:
351 (JSC::MacroAssemblerARMv7::set32Compare32):
352 (JSC::MacroAssemblerARMv7::set8Compare32):
353 (JSC::MacroAssemblerARMv7::set32Test32):
354 (JSC::MacroAssemblerARMv7::set32Test8):
355 * assembler/MacroAssemblerMIPS.h:
356 (JSC::MacroAssemblerMIPS::set8Compare32):
357 (JSC::MacroAssemblerMIPS::set32Compare32):
358 (JSC::MacroAssemblerMIPS::set32Test8):
359 (JSC::MacroAssemblerMIPS::set32Test32):
360 * assembler/MacroAssemblerX86Common.h:
361 (JSC::MacroAssemblerX86Common::set8Compare32):
362 (JSC::MacroAssemblerX86Common::set32Compare32):
363 (JSC::MacroAssemblerX86Common::set32Test8):
364 (JSC::MacroAssemblerX86Common::set32Test32):
365 * jit/JITOpcodes.cpp:
366 (JSC::JIT::emit_op_eq):
367 (JSC::JIT::emit_op_neq):
368 (JSC::JIT::compileOpStrictEq):
369 (JSC::JIT::emit_op_eq_null):
370 (JSC::JIT::emit_op_neq_null):
371 * jit/JITOpcodes32_64.cpp:
372 (JSC::JIT::emit_op_eq):
373 (JSC::JIT::emit_op_neq):
374 (JSC::JIT::compileOpStrictEq):
375 (JSC::JIT::emit_op_eq_null):
376 (JSC::JIT::emit_op_neq_null):
378 2010-12-03 Oliver Hunt <oliver@apple.com>
380 Reviewed by Geoff Garen.
382 Incorrect logic for returning memory at the end of linking.
383 Reviewed by Geoff Garen.
385 At the end of linking we return any space at the end of the
386 allocated executable region that was saved due to branch
387 compaction. This is currently by done by subtracting the
388 different from the m_freePtr in the allocation pool. This
389 can be incorrect if your allocation was made from a new
390 page that was not selected for subsequent allocations.
392 This patch corrects this behaviour by verifying that the
393 memory being returned actually comes from the current
396 * assembler/LinkBuffer.h:
397 (JSC::LinkBuffer::linkCode):
398 * jit/ExecutableAllocator.h:
399 (JSC::ExecutablePool::tryShrink):
401 2010-12-03 Michael Saboff <msaboff@apple.com>
403 Reviewed by Gavin Barraclough
405 Changes to significantly reduce branches to branches in JIT'ed
406 parentheses backtrack processing. The changes include the following:
407 - Taking the backtracking processing out of line and adding it as
408 code at the end of the JIT'ed routine.
409 - Allow backtracks to be direct via an indirect branch for an address
410 pushed onto the stack. If the use of an indirect branch is from a
411 conditional jump, then we emit a trampoline at the end of the
413 - Propogate backtracks instead of adding trampolines. Backtracks are
414 propogated to where they are used. This change also eliminated
415 trampoline branch code that aren't used.
416 - Added global expression state to keep track of parentheses tail
417 code and indirect branches.
418 Other changes made to support these changes.
419 - Split invertOrCapture flag on Patterns to two separate flags. Added
420 getters for these flags. Rippled these changes to both the JIT
421 and interpreter code.
422 - Split BacktrackDestination out off TermGenerationState struct.
423 This is done to hold references to a backtrack for later code
425 https://bugs.webkit.org/show_bug.cgi?id=50295
427 * assembler/ARMAssembler.h:
428 (JSC::ARMAssembler::JmpDst::isSet):
429 * assembler/ARMv7Assembler.h:
430 (JSC::ARMv7Assembler::JmpDst::isSet):
431 * assembler/AbstractMacroAssembler.h:
432 (JSC::AbstractMacroAssembler::Label::isSet):
433 (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
434 (JSC::AbstractMacroAssembler::DataLabelPtr::used):
435 (JSC::AbstractMacroAssembler::JumpList::clear):
436 * assembler/MIPSAssembler.h:
437 (JSC::MIPSAssembler::JmpDst::isSet):
438 * assembler/X86Assembler.h:
439 (JSC::X86Assembler::JmpDst::isSet):
440 * yarr/RegexCompiler.cpp:
441 (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
442 (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
443 (JSC::Yarr::RegexPatternConstructor::atomBackReference):
444 (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
445 * yarr/RegexInterpreter.cpp:
446 (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
447 (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
448 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
449 (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
450 (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
451 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
452 (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
453 (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
454 (JSC::Yarr::ByteCompiler::emitDisjunction):
455 * yarr/RegexInterpreter.h:
456 (JSC::Yarr::ByteTerm::ByteTerm):
457 (JSC::Yarr::ByteTerm::BackReference):
458 (JSC::Yarr::ByteTerm::invert):
459 (JSC::Yarr::ByteTerm::capture):
461 (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
462 (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
463 (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
464 (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
465 (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
466 (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
467 (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
468 (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
469 (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
470 (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
471 (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
472 (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
473 (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
474 (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
475 (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
476 (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
477 (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
478 (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
479 (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
480 (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
481 (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
482 (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
483 (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
484 (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
485 (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
486 (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
487 (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
488 (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
489 (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
490 (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
491 (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
492 (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
493 (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
494 (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
495 (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
496 (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
497 (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
498 (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
499 (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
500 (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
501 (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
502 (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
503 (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
504 (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
505 (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
506 (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
507 (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
508 (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
509 (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
510 (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
511 (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
512 (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
513 (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
514 (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
515 (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
516 (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
517 (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
518 (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
519 (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
520 (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
521 (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
522 (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
523 (JSC::Yarr::RegexGenerator::generateAssertionBOL):
524 (JSC::Yarr::RegexGenerator::generateAssertionEOL):
525 (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
526 (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
527 (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
528 (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
529 (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
530 (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
531 (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
532 (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
533 (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
534 (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
535 (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
536 (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
537 (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
538 (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
539 (JSC::Yarr::RegexGenerator::generateDisjunction):
540 (JSC::Yarr::RegexGenerator::compile):
541 * yarr/RegexPattern.h:
542 (JSC::Yarr::PatternTerm::PatternTerm):
543 (JSC::Yarr::PatternTerm::invert):
544 (JSC::Yarr::PatternTerm::capture):
546 2010-12-03 Chris Rogers <crogers@google.com>
548 Reviewed by Kenneth Russell.
550 First steps to adding web audio files to build systems
551 https://bugs.webkit.org/show_bug.cgi?id=49952
555 2010-12-03 Patrick Gansterer <paroga@webkit.org>
557 Reviewed by Andreas Kling.
559 Move StringWx.cpp into wtf directory
560 https://bugs.webkit.org/show_bug.cgi?id=50060
562 * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
563 (WTF::String::String):
565 2010-12-03 Patrick Gansterer <paroga@webkit.org>
567 Reviewed by Andreas Kling.
569 Move StringBrew.cpp into wtf directory
570 https://bugs.webkit.org/show_bug.cgi?id=50058
572 * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
573 (WTF::String::String):
575 2010-12-03 Patrick Gansterer <paroga@webkit.org>
577 Reviewed by Andreas Kling.
579 Move StringHaiku.cpp into wtf directory
580 https://bugs.webkit.org/show_bug.cgi?id=50057
582 * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
583 (WTF::String::String):
584 (WTF::String::operator BString):
586 2010-12-02 Geoffrey Garen <ggaren@apple.com>
588 Try to fix Windows build.
590 * runtime/GCActivityCallback.cpp:
591 (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
593 2010-12-02 Geoffrey Garen <ggaren@apple.com>
595 Reviewed by Gavin Barraclough.
597 Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
598 com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
601 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
602 synchronize() function.
604 * runtime/Collector.cpp:
605 (JSC::Heap::activityCallback):
606 * runtime/Collector.h: Added an activityCallback() accessor, for the
609 * runtime/GCActivityCallback.h:
610 (JSC::GCActivityCallback::synchronize):
611 * runtime/GCActivityCallbackCF.cpp:
612 (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
613 (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
614 (JSC::DefaultGCActivityCallback::operator()):
615 (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
616 scheduled in. If we begin/resume execution within a new run loop, reschedule
617 on it. This prevents a crash when using a lockless context group on
618 multiple threads -- the crash would happen if the GC timer scheduled on
619 thread A, then you continued execution on thread B, then the thread A
622 2010-12-02 Darin Adler <darin@apple.com>
624 * wtf/ASCIICType.h: Fix wrong type from last check-in.
626 2010-12-02 Darin Adler <darin@apple.com>
628 Try to fix certain builds (Qt Windows).
630 * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
631 versions of ICU, UChar32 can be a typedef for unsigned. Adding this
632 overload should make us compatible with these old ICUs.
634 2010-12-02 Patrick Gansterer <paroga@webkit.org>
636 Reviewed by Darin Adler.
638 Add AtomicString::fromUTF8
639 https://bugs.webkit.org/show_bug.cgi?id=45594
641 Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
642 calculates the required length for the UTF16 conversation in one step.
643 This is then used in a specialized translator for the string table of AtomicString.
645 * JavaScriptCore.exp:
646 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
647 * wtf/text/AtomicString.cpp:
648 (WTF::CStringTranslator::equal):
649 (WTF::HashAndUTF8CharactersTranslator::hash):
650 (WTF::HashAndUTF8CharactersTranslator::equal):
651 (WTF::HashAndUTF8CharactersTranslator::translate):
652 (WTF::AtomicString::add):
653 (WTF::AtomicString::addSlowCase):
654 (WTF::AtomicString::find):
655 (WTF::AtomicString::fromUTF8):
656 * wtf/text/AtomicString.h:
657 * wtf/text/StringImpl.h:
658 * wtf/text/WTFString.h:
659 * wtf/unicode/UTF8.cpp:
660 (WTF::Unicode::readUTF8Sequence):
661 (WTF::Unicode::convertUTF8ToUTF16):
662 (WTF::Unicode::calculateStringHashFromUTF8):
663 (WTF::Unicode::equalUTF16WithUTF8):
664 * wtf/unicode/UTF8.h:
666 2010-12-02 Geoffrey Garen <ggaren@apple.com>
668 Reviewed by Sam Weinig.
670 Added a little hardening to OSAllocator.
672 * wtf/OSAllocatorPosix.cpp:
673 (WTF::OSAllocator::release):
674 * wtf/OSAllocatorWin.cpp:
675 (WTF::OSAllocator::reserve):
676 (WTF::OSAllocator::reserveAndCommit):
677 (WTF::OSAllocator::commit):
678 (WTF::OSAllocator::decommit):
679 (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
682 2010-12-02 Csaba Osztrogonác <ossy@webkit.org>
684 Reviewed by Geoffrey Garen.
686 [Qt] Make platform managing of OSAllocator better than r73106
687 https://bugs.webkit.org/show_bug.cgi?id=50385
689 * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
690 * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
691 * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
692 * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
694 2010-12-02 Patrick Gansterer <paroga@webkit.org>
696 Reviewed by Andreas Kling.
698 [WINCE] Use GetTickCount() for srand()
699 https://bugs.webkit.org/show_bug.cgi?id=50338
701 time() is not a native function on WinCE, so use GetTickCount() instead.
703 * wtf/RandomNumberSeed.h:
704 (WTF::initializeRandomNumberGenerator):
706 2010-12-02 Norbert Leser <norbert.leser@nokia.com>
708 Reviewed by Laszlo Gombos.
710 [Qt] [Symbian] Reintroduce compiler optimizations for JSC
711 https://bugs.webkit.org/show_bug.cgi?id=50270
713 Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
714 Tested via Sunspider and V8 - both of which show significant performance improvement.
716 * JavaScriptCore.pro:
718 2010-12-02 Peter Varga <pvarga@inf.u-szeged.hu>
720 Reviewed by Gavin Barraclough.
722 Move regex parsing and fallback handling to runtime/RegExp.cpp
723 https://bugs.webkit.org/show_bug.cgi?id=50015
725 * runtime/RegExp.cpp:
726 (JSC::RegExp::RegExp):
727 (JSC::RegExp::create):
728 (JSC::RegExp::compile):
729 (JSC::RegExp::match):
730 (JSC::RegExp::printTraceData):
732 (JSC::RegExp::pattern):
733 * yarr/RegexInterpreter.cpp:
734 * yarr/RegexInterpreter.h:
736 (JSC::Yarr::RegexGenerator::compile):
737 (JSC::Yarr::jitCompileRegex):
739 (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
740 (JSC::Yarr::RegexCodeBlock::setFallBack):
741 (JSC::Yarr::RegexCodeBlock::isFallBack):
742 (JSC::Yarr::executeRegex):
744 2010-12-01 Geoffrey Garen <ggaren@apple.com>
746 Try to fix the GTK build.
748 * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
750 2010-12-01 Geoffrey Garen <ggaren@apple.com>
752 Try to fix the EFL Linux build.
754 * CMakeListsEfl.txt: Added OSAllocator to the project.
756 2010-12-01 Geoffrey Garen <ggaren@apple.com>
758 Try to fix the Qt build: Include all OS files for Qt's sake, and then
759 use #ifdefs in the files to exclude things based on OS.
761 This is a pretty bad way to manage platforms -- hopefully we can
762 fix the Qt build system and move away from this in the future.
764 * wtf/OSAllocatorPosix.cpp:
765 * wtf/OSAllocatorSymbian.cpp:
766 * wtf/OSAllocatorWin.cpp:
769 2010-12-01 Geoffrey Garen <ggaren@apple.com>
771 Try to fix the Chromium build.
773 * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
775 2010-12-01 Geoffrey Garen <ggaren@apple.com>
777 Try to fix the GTK build.
779 * GNUmakefile.am: Added OSAllocator to another project.
781 2010-12-01 Geoffrey Garen <ggaren@apple.com>
783 Try to fix the GTK Linux build.
785 * JavaScriptCore.gypi: Added OSAllocator to the project.
787 2010-12-01 Geoffrey Garen <ggaren@apple.com>
789 Try to fix the Qt Linux build.
791 * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
793 2010-12-01 Geoffrey Garen <ggaren@apple.com>
795 Try to fix Windows build: export some more symbols.
797 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
799 2010-12-01 Geoffrey Garen <ggaren@apple.com>
801 Try to fix the Qt Linux build.
803 * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
805 2010-12-01 Geoffrey Garen <ggaren@apple.com>
807 Windows build fix: commit doesn't have a return value.
809 * wtf/OSAllocatorWin.cpp:
810 (WTF::OSAllocator::commit):
812 2010-12-01 Geoffrey Garen <ggaren@apple.com>
814 Build fix: Export some symbols.
816 * JavaScriptCore.exp:
818 2010-12-01 Geoffrey Garen <ggaren@apple.com>
822 * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
823 so other projects can see it.
825 * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
827 2010-12-01 Geoffrey Garen <ggaren@apple.com>
829 Reviewed by Sam Weinig.
831 Baby step toward a cross-platform virtual memory abstraction: created
832 an all-static OSAllocator class and changed MarkStack to use it.
834 * JavaScriptCore.exp: These functions are inlined now.
836 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
838 * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
840 * runtime/MarkStack.h:
841 (JSC::MarkStack::allocateStack):
842 (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
843 own platform-specific code.
845 * runtime/MarkStackNone.cpp: Removed. Nothing used this.
847 * runtime/MarkStackPosix.cpp:
848 * runtime/MarkStackSymbian.cpp:
849 * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
850 we use the OSAllocator abstraction now.
852 * wtf/OSAllocator.h: Added.
853 * wtf/OSAllocatorPosix.cpp: Added.
854 (WTF::OSAllocator::reserve):
855 (WTF::OSAllocator::reserveAndCommit):
856 (WTF::OSAllocator::commit):
857 (WTF::OSAllocator::decommit):
858 (WTF::OSAllocator::release):
859 * wtf/OSAllocatorSymbian.cpp: Added.
860 (WTF::OSAllocator::reserve):
861 (WTF::OSAllocator::reserveAndCommit):
862 (WTF::OSAllocator::commit):
863 (WTF::OSAllocator::decommit):
864 (WTF::OSAllocator::release):
865 * wtf/OSAllocatorWin.cpp: Added.
866 (WTF::OSAllocator::reserve):
867 (WTF::OSAllocator::reserveAndCommit):
868 (WTF::OSAllocator::commit):
869 (WTF::OSAllocator::decommit):
870 (WTF::OSAllocator::release): The new OSAllocator abstraction.
872 * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
874 2010-12-01 Steve Falkenburg <sfalken@apple.com>
876 Reviewed by Adam Roben.
878 WinCairo build should not use link-time code generation (LTCG)
879 https://bugs.webkit.org/show_bug.cgi?id=50353
881 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
882 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
883 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
884 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
886 010-12-01 Steve Falkenburg <sfalken@apple.com>
888 Reviewed by Adam Roben.
890 vcproj changes can't be applied cleanly by the Windows EWS bot
891 https://bugs.webkit.org/show_bug.cgi?id=50328
893 * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
894 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
895 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
896 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
897 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
898 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
899 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
900 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
901 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
902 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
903 * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
904 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
905 * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
906 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
908 2010-12-01 Gavin Barraclough <barraclough@apple.com>
910 Reviewed by Sam Weinig.
912 Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
914 For unmatched subpattens we previously used to set the subpattern end to -1,
915 but now we only set the start value. E.g. consider the following:
917 Previously we would generate an internal results array of:
919 Since fairly recently we have generated results of:
921 (With the end index of the subpattern uninitialized).
923 Update these ASSERTs to account for this.
925 Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
926 were checking the wrong property on the pattern term. We should have been
927 looking at term.parentheses.subpatternId, but instead were checking
928 term.subpatternId. The latter is actually only the subpatternId for
929 back reference terms. Rename this to backReferenceSubpatternId.
931 * yarr/RegexInterpreter.cpp:
932 (JSC::Yarr::Interpreter::matchBackReference):
933 (JSC::Yarr::Interpreter::backtrackBackReference):
935 2010-11-30 Gavin Barraclough <barraclough@apple.com>
937 Rubber stamped by Sam Weinig.
939 Bug 50297 - \s in YARR should match BOMs.
941 From section 15.10.2.12 CharacterClassEscape contains:
943 The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
944 characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
946 Table 2 in section 7.2 contains:
948 \uFEFF Byte Order Mark <BOM>
950 * create_regex_tables:
951 Add BOM to spaces table.
953 2010-11-30 Gavin Barraclough <barraclough@apple.com>
955 Reviewed by Darin Adler.
957 Fixed review comments following bug #48101.
958 Mostly typos, plus gave quantifyInfinite a symbolic name.
960 * yarr/RegexCompiler.cpp:
961 (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
962 (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
963 * yarr/RegexInterpreter.cpp:
964 (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
965 (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
966 (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
967 (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
969 (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
970 (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
971 (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
972 * yarr/RegexParser.h:
973 (JSC::Yarr::Parser::parseTokens):
976 2010-11-30 Steve Falkenburg <sfalken@apple.com>
978 Reviewed by Darin Adler.
980 WTF project missing build-stopping code from its pre-build event
981 https://bugs.webkit.org/show_bug.cgi?id=50281
983 * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
985 2010-11-30 Patrick Gansterer <paroga@webkit.org>
987 Reviewed by Darin Adler.
990 https://bugs.webkit.org/show_bug.cgi?id=49581
992 Use macros and functions instead of range values directly.
994 * wtf/unicode/UTF8.cpp:
995 (WTF::Unicode::inlineUTF8SequenceLength):
996 (WTF::Unicode::UTF8SequenceLength):
997 (WTF::Unicode::convertUTF16ToUTF8):
998 (WTF::Unicode::readUTF8Sequence):
999 (WTF::Unicode::convertUTF8ToUTF16):
1000 * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
1002 2010-11-30 Geoffrey Garen <ggaren@apple.com>
1004 Reviewed by Gavin Barraclough.
1006 Fixed a crash seen when using a PageAllocation to store itself.
1008 * wtf/PageAllocation.h:
1009 (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
1010 it, in case unmapping m_base unmaps the PageAllocation.
1012 * wtf/BumpPointerAllocator.h:
1013 (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
1015 2010-11-30 Xan Lopez <xlopez@igalia.com>
1017 Reviewed by Darin Adler.
1019 m_hasNonEnumerableProperties is never initialized in Structure
1020 https://bugs.webkit.org/show_bug.cgi?id=50266
1022 * runtime/Structure.cpp:
1023 (JSC::Structure::Structure): initialize member variable.
1025 2010-11-29 Steve Falkenburg <sfalken@apple.com>
1027 Windows build fix (part 1). Use correct environment variable syntax in cmd files.
1029 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
1030 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
1031 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
1032 * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
1033 * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
1034 * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
1035 * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
1036 * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
1037 * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
1038 * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
1040 2010-11-29 Dan Bernstein <mitz@apple.com>
1042 Reviewed by Darin Adler.
1044 WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
1045 https://bugs.webkit.org/show_bug.cgi?id=50038
1047 * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
1049 2010-11-29 Steve Falkenburg <sfalken@apple.com>
1051 Reviewed by Darin Adler.
1053 JavaScriptCore projects on Windows should use cmd files for build events
1054 https://bugs.webkit.org/show_bug.cgi?id=50193
1056 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1057 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
1058 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
1059 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
1060 * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
1061 * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
1062 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1063 * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
1064 * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
1065 * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
1066 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
1067 * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
1068 * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
1069 * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
1071 2010-11-29 Dai Mikurube <dmikurube@google.com>
1073 Reviewed by Kent Tamura.
1075 when empty, clicking "down" on outer-spin-button returns "max value"
1076 https://bugs.webkit.org/show_bug.cgi?id=45491
1078 It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
1079 date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
1080 returns a struct tm, not milliseconds.
1082 Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
1083 environments. This calculation is already done in calculateUTCOffset(), and complicated.
1084 Duplicating this complicated calculation is unreasonable because of maintainability.
1085 To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
1087 * JavaScriptCore.exp:
1088 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1089 * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
1090 (WTF::calculateUTCOffset):
1091 (WTF::calculateDSTOffset):
1094 2010-11-29 Chris Rogers <crogers@google.com>
1096 Reviewed by Kenneth Russell.
1098 Switch web audio code to use FloatPoint3D instead of Vector3
1099 https://bugs.webkit.org/show_bug.cgi?id=50186
1101 * wtf/Vector3.h: Removed.
1103 2010-11-29 Steve Falkenburg <sfalken@apple.com>
1105 Reviewed by Adam Roben.
1107 Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
1108 https://bugs.webkit.org/show_bug.cgi?id=49858
1110 We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
1111 - To simplify editing (editing vsprops build steps is confusing).
1112 - For more readable diffs.
1114 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
1115 * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
1116 * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
1118 2010-11-29 Geoffrey Garen <ggaren@apple.com>
1120 Reviewed by Gavin Barraclough.
1122 Improved accuracy of command-line SunSpider.
1125 (functionRun): Changed the "run" function to run a given test in
1126 its own global object. Previously, all tests ran in the same global
1127 object, which created name conflicts, and made globals from previous
1128 tests artificially survive into later tests.
1130 Also changed "run" to return the elapsed milliseconds when running a
1131 given test, for slightly more accurate numbers.
1133 (functionCheckSyntax): Ditto on returning elapsed milliseconds.
1135 2010-11-29 Darin Adler <darin@apple.com>
1137 Reviewed by Andreas Kling.
1139 Remove a couple unneeded overflow checks
1140 https://bugs.webkit.org/show_bug.cgi?id=49816
1142 * wtf/text/CString.cpp:
1143 (WTF::CString::init): Use an ASSERT instead of
1144 an overflow check with CRASH.
1146 2010-11-29 Adam Roben <aroben@apple.com>
1148 Robustify react-to-vsprops-changes.py against changes to its location
1149 or the location of the .vsprops files
1151 Suggested by John Sullivan.
1153 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1154 Removed file_modification_times.
1155 (main): Use glob.glob to find the .vsprops files and assert that we found some.
1157 2010-11-29 Adam Roben <aroben@apple.com>
1159 Touch wtf/Platform.h whenever any .vsprops file changes
1161 This will cause all files to be recompiled, which will make changes to
1162 preprocessor macros (e.g., ENABLE_*) actually take effect.
1164 Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
1165 macros are changed (because not enough files are rebuilt)
1167 Reviewed by John Sullivan.
1169 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1170 (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
1171 added some comments and logging to make it clearer what the script is
1174 2010-11-29 Adam Roben <aroben@apple.com>
1176 Update react-to-vsprops-changes.py after r72555
1178 .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
1180 Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
1181 react-to-vsprops-changes.py no longer works for people with a
1182 non-default $WebKitLibrariesDir
1184 Reviewed by John Sullivan.
1186 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1187 (main): Always look in WebKitLibraries/win for .vsprops files, not in
1188 $WebKitLibrariesDir.
1190 2010-11-28 Gavin Barraclough <barraclough@apple.com>
1192 Reviewed by Sam Weinig.
1194 Bug 48100 - YARR allows what seems like a bogus character-class range
1196 Per ECMA-262 character classes containing character ranges containing
1197 character classes are invalid, eg:
1201 These should throw a syntax error.
1203 * yarr/RegexParser.h:
1205 2010-11-27 Gavin Barraclough <barraclough@apple.com>
1207 Reviewed by Sam Weinig.
1209 Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
1211 The test cases in the linked mozilla bug demonstrate a couple of
1212 problems in subpattern matching. These bugs lie in the optimized
1213 cases - for matching parentheses with a quantity count of 1, and
1214 for matching greedy quantified parentheses at the end of a regex
1215 (which do not backtrack).
1217 In both of these cases we are failing to correctly handle empty
1218 matches. In the case of parentheses-single matches (quantity count
1219 one) we are failing to test for empty matches at all. In the case
1220 of terminal subpattern matches we do currently check, however there
1221 is a subtler bug here too. In the case of an empty match we will
1222 presently immediately fall through to the next alternative (or
1223 complete the regex match), whereas upon a failed match we should
1224 be backtracking into the failing alternative, to give it a chance
1225 to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
1226 attempting to match the first alternative this will match the empty
1227 string - since a?? is non-greedy, however rather than moving on to
1228 the second alternative we should be re-matching the first one, at
1229 which point the non-greedy a?? will match, and as such the result
1230 should be "ab", not "a").
1232 Terminal subpattern matching contains a second bug, too. The frame
1233 location values in the subpattern should be being allocated with
1234 the outer disjunction's frame (as we do for the parentheses-single
1235 optimization). Consider the following three regexes:
1239 Considering only the frame location required by the atoms a,b, and
1240 c, (ignoring space associated with the nested subpattern) the first
1241 regex (a normal subpattern match) requires a frame size of 2 for
1242 the outer disjunction, (to backtrack terms a & c), with each
1243 iteration of the subpattern requiring a frame of size 1 (in order
1244 to backtrack b). In the case of the second regex (where the
1245 parentheses-single optimization will kick in) the outer frame must
1246 be set up with a frame size of 3, since the outer frame will also
1247 be used when running the nested subpattern. We will currently only
1248 allocate a farme of size 1 for the outer disjuntion (to contain a),
1249 howver the frame size should be 2 (since the subpattern will be
1250 evaluated in the outer frame). In addition to failing to allocate
1251 frame space the frame offsets are also presently invalid - in the
1252 case of the last regex b's frame location will be set assuming it
1253 to be the first term in the frame, whereas in this case b lies
1254 after the term a, and should be taking a separate frame location.
1256 In order to correctly allocate the frame for terminal subpattern
1257 matches we must move this optimization back up from the JIT into
1258 the compiler (and thus interpreter too), since this is where the
1259 frame allocation takes place.
1261 * yarr/RegexCompiler.cpp:
1262 (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
1263 (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
1264 (JSC::Yarr::compileRegex):
1265 * yarr/RegexInterpreter.cpp:
1266 (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
1267 (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
1268 (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
1269 (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
1270 (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
1271 (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
1272 (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
1273 (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
1274 (JSC::Yarr::Interpreter::matchDisjunction):
1275 (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
1276 (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
1277 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
1278 (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
1279 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
1280 (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
1281 (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
1282 (JSC::Yarr::ByteCompiler::emitDisjunction):
1283 * yarr/RegexInterpreter.h:
1284 * yarr/RegexJIT.cpp:
1285 (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1286 (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
1287 (JSC::Yarr::RegexGenerator::generateTerm):
1288 * yarr/RegexPattern.h:
1289 (JSC::Yarr::PatternTerm::PatternTerm):
1291 2010-11-24 Patrick Gansterer <paroga@webkit.org>
1293 Reviewed by Csaba Osztrogonác.
1295 Remove Bakefile build system files
1296 https://bugs.webkit.org/show_bug.cgi?id=49983
1298 r53757 only removed the content, but not the files.
1299 This patch removes that empty files.
1301 * JavaScriptCoreSources.bkl: Removed.
1302 * jscore.bkl: Removed.
1304 2010-11-24 Gabor Loki <loki@webkit.org>
1306 Reviewed by Csaba Osztrogonác.
1308 Merge the usage of jumps and calls at ARM-JIT
1309 https://bugs.webkit.org/show_bug.cgi?id=50008
1311 Those JmpSrc objects which represent jumps (not calls) should point to
1312 after the jump instruction.
1314 * assembler/ARMAssembler.h:
1315 (JSC::ARMAssembler::blx):
1316 (JSC::ARMAssembler::loadBranchTarget):
1317 (JSC::ARMAssembler::getAbsoluteJumpAddress):
1318 (JSC::ARMAssembler::linkJump):
1319 (JSC::ARMAssembler::relinkJump):
1320 (JSC::ARMAssembler::linkCall):
1321 (JSC::ARMAssembler::relinkCall):
1322 (JSC::ARMAssembler::getRelocatedAddress):
1323 (JSC::ARMAssembler::getDifferenceBetweenLabels):
1324 (JSC::ARMAssembler::getCallReturnOffset):
1325 * assembler/MacroAssemblerARM.h:
1326 (JSC::MacroAssemblerARM::call):
1328 2010-11-24 Carlos Garcia Campos <cgarcia@igalia.com>
1330 Reviewed by Xan Lopez.
1332 [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
1333 https://bugs.webkit.org/show_bug.cgi?id=48625
1335 GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
1336 UTF-8 to perform the case operations and then convert back the result to
1337 UTF-16. GLib conversion methods return a new allocated string, so we
1338 have to memcpy the result into the destination buffer too. Using our
1339 own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
1340 we don't need such memcpy, since they take an already allocated buffer
1341 rather than returning a new one. There's another optimization for the
1342 case when the destination buffer is not large enough. In that case,
1343 methods should return the expected destination buffer size and are
1344 called again with a new buffer. We can avoid the conversion to UTF-16 by
1345 pre-calculating the required size for the destination buffer.
1347 * wtf/unicode/glib/UnicodeGLib.cpp:
1348 (WTF::Unicode::getUTF16LengthFromUTF8):
1349 (WTF::Unicode::convertCase):
1350 (WTF::Unicode::foldCase):
1351 (WTF::Unicode::toLower):
1352 (WTF::Unicode::toUpper):
1354 2010-11-23 Patrick Gansterer <paroga@webkit.org>
1356 Reviewed by Sam Weinig.
1358 Use WTF::StringHasher directly in JavaScriptCore
1359 https://bugs.webkit.org/show_bug.cgi?id=49893
1361 * profiler/CallIdentifier.h:
1362 (JSC::CallIdentifier::Hash::hash):
1363 * runtime/Identifier.cpp:
1364 (JSC::IdentifierCStringTranslator::hash):
1365 (JSC::IdentifierUCharBufferTranslator::hash):
1367 2010-11-22 Patrick Gansterer <paroga@webkit.org>
1369 Reviewed by Sam Weinig.
1371 Add WTF::FixedArray::size()
1372 https://bugs.webkit.org/show_bug.cgi?id=49891
1374 Add a method to get the size of a FixedArray.
1377 (WTF::FixedArray::size):
1379 2010-11-22 Patrick Gansterer <paroga@webkit.org>
1381 Reviewed by Adam Roben.
1383 [WINCE] Set correct preprocessor definitions
1384 https://bugs.webkit.org/show_bug.cgi?id=49887
1388 2010-11-22 Adam Roben <aroben@apple.com>
1390 Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
1392 Apple's Windows build allows placing header files and import libraries for WebKit's
1393 dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
1394 $WebKitLibrariesDir environment variable. This is both required for production builds and
1395 convenient for Apple-internal developer builds. Apple's production builds also require that
1396 WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
1397 builds, the files are copied into that directory tree by the
1398 WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
1400 JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
1402 This .vsprops copying is problematic in one very important case: when a developer updates
1403 their source tree and then tries to build. Visual Studio only reads .vsprops files when a
1404 project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
1405 updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
1406 build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
1407 $WebKitLibrariesDir, but Visual Studio will not pick up the changes. The rest of the build
1408 will proceed with out-of-date .vsprops files, which will likely result in a build failure.
1410 To fix this, we now use normal relative paths to access the .vsprops files in the source
1411 tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
1412 variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
1413 unset, so the normal relative paths are used to read the .vsprops files out of the source
1414 tree directly. In production builds, this environment variable is set to a fake directory
1415 that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
1418 For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
1420 $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1422 In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
1423 files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
1424 JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
1425 "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
1426 FeatureDefines.vsprops becomes:
1428 $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1432 $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1434 (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
1435 actually exist since they are matched by an equal number of ".." path components.)
1437 Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
1438 Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
1440 Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
1443 Reviewed by Dave Hyatt.
1445 * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
1446 production builds can find the .vsprops files.
1448 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
1449 .vsprops files. It isn't needed anymore.
1451 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1452 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1453 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1454 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1455 Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
1458 2010-11-19 Peter Varga <pvarga@inf.u-szeged.hu>
1460 Reviewed by Gavin Barraclough.
1462 YARR JIT should fallback to YARR Interpreter instead of PCRE.
1463 https://bugs.webkit.org/show_bug.cgi?id=46719
1465 Remove the ENABLE_YARR macro and the option of matching regular
1466 expressions with PCRE from JavaScriptCore.
1468 * runtime/JSGlobalData.h:
1469 * runtime/RegExp.cpp:
1470 (JSC::RegExp::compile):
1471 (JSC::RegExp::match):
1472 * tests/mozilla/expected.html:
1474 * yarr/RegexCompiler.cpp:
1475 * yarr/RegexCompiler.h:
1476 * yarr/RegexInterpreter.cpp:
1477 (JSC::Yarr::byteCompileRegex):
1478 * yarr/RegexInterpreter.h:
1479 * yarr/RegexJIT.cpp:
1480 (JSC::Yarr::jitCompileRegex):
1482 (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1483 (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1484 (JSC::Yarr::RegexCodeBlock::getFallback):
1485 (JSC::Yarr::RegexCodeBlock::isFallback):
1486 (JSC::Yarr::RegexCodeBlock::setFallback):
1487 (JSC::Yarr::executeRegex):
1488 * yarr/RegexParser.h:
1489 * yarr/RegexPattern.h:
1491 2010-11-20 Kwang Yul Seo <skyul@company100.net>
1493 Reviewed by David Kilzer.
1495 [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
1496 https://bugs.webkit.org/show_bug.cgi?id=49520
1498 DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
1500 * wtf/Assertions.cpp:
1503 2010-11-20 Gabor Loki <loki@webkit.org>
1505 Reviewed by Gavin Barraclough.
1507 Support JIT_OPTIMIZE_MOD on Thumb-2
1508 https://bugs.webkit.org/show_bug.cgi?id=49432
1510 Rewrite the soft modulo operation into macroassembler form, and move it
1511 to JSValue32_64 section.
1512 Add support for soft modulo on Thumb-2 JIT also.
1514 * assembler/ARMv7Assembler.h:
1515 (JSC::ARMv7Assembler::clz):
1516 * assembler/MacroAssemblerARM.h:
1517 (JSC::MacroAssemblerARM::countLeadingZeros32):
1518 (JSC::MacroAssemblerARM::relativeTableJump):
1519 * assembler/MacroAssemblerARMv7.h:
1520 (JSC::MacroAssemblerARMv7::countLeadingZeros32):
1521 (JSC::MacroAssemblerARMv7::relativeTableJump):
1522 * jit/JITArithmetic.cpp:
1523 (JSC::JIT::emit_op_mod):
1524 * jit/JITOpcodes.cpp:
1525 (JSC::JIT::privateCompileCTIMachineTrampolines):
1526 * jit/JITOpcodes32_64.cpp:
1527 (JSC::JIT::softModulo):
1529 (JSC::JITThunks::JITThunks):
1532 2010-11-20 David Kilzer <ddkilzer@apple.com>
1534 <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
1536 Reviewed by Darin Adler.
1538 * JavaScriptCore.exp:
1539 * wtf/text/StringImpl.cpp:
1540 (WTF::StringImpl::secure): Added argument that controls whether
1541 the last character is obscured or not. Implemented behavior.
1542 * wtf/text/StringImpl.h:
1543 (WTF::StringImpl::LastCharacterBehavior): Added enum.
1544 (WTF::StringImpl::secure): Updated method signature.
1546 2010-11-19 William Chan <willchan@chromium.org>
1548 Reviewed by David Levin.
1550 Add USE(CHROMIUM_NET)
1552 Indicates the use of Chromium's network stack. Chromium's network
1553 stack performs better when it has full view of all resource requests,
1554 so USE(CHROMIUM_NET) can be used to bypass throttles.
1556 https://bugs.webkit.org/show_bug.cgi?id=49778
1560 2010-11-19 Steve Falkenburg <sfalken@apple.com>
1562 Reviewed by Adam Roben.
1564 Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
1565 https://bugs.webkit.org/show_bug.cgi?id=49819
1567 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1568 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1569 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1570 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
1571 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1572 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1574 2010-11-19 Oliver Hunt <oliver@apple.com>
1576 Reviewed by Geoffrey Garen.
1578 Don't check for constant registers when we can guarantee that the register won't be in the constant pool
1579 https://bugs.webkit.org/show_bug.cgi?id=49814
1581 Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
1582 when we can guarantee that the register is not referring to a constant.
1583 This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
1584 logic correct when we're using a faked callframe (as in the case of the globalExec).
1586 * bytecode/CodeBlock.cpp:
1587 (JSC::CodeBlock::createActivation):
1588 * debugger/DebuggerCallFrame.cpp:
1589 (JSC::DebuggerCallFrame::thisObject):
1590 * interpreter/CallFrame.h:
1591 (JSC::ExecState::uncheckedR):
1592 * interpreter/Interpreter.cpp:
1593 (JSC::Interpreter::resolve):
1594 (JSC::Interpreter::resolveSkip):
1595 (JSC::Interpreter::resolveGlobal):
1596 (JSC::Interpreter::resolveGlobalDynamic):
1597 (JSC::Interpreter::resolveBase):
1598 (JSC::Interpreter::resolveBaseAndProperty):
1599 (JSC::Interpreter::callEval):
1600 (JSC::Interpreter::unwindCallFrame):
1601 (JSC::Interpreter::throwException):
1602 (JSC::Interpreter::execute):
1603 (JSC::Interpreter::executeCall):
1604 (JSC::Interpreter::executeConstruct):
1605 (JSC::Interpreter::prepareForRepeatCall):
1606 (JSC::Interpreter::createExceptionScope):
1607 (JSC::Interpreter::privateExecute):
1609 (JSC::DEFINE_STUB_FUNCTION):
1610 * runtime/JSActivation.cpp:
1611 (JSC::JSActivation::argumentsGetter):
1613 2010-11-19 Steve Falkenburg <sfalken@apple.com>
1615 Reviewed by Darin Adler.
1617 Normalize Cairo/CFLite project/solution configuration names
1618 https://bugs.webkit.org/show_bug.cgi?id=49818
1620 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1621 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1622 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1624 2010-11-18 Steve Falkenburg <sfalken@apple.com>
1626 Reviewed by Adam Roben.
1628 Windows vcproj configuration names should be normalized across projects
1629 https://bugs.webkit.org/show_bug.cgi?id=49776
1631 * JavaScriptCore.vcproj/JavaScriptCore.sln:
1632 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1633 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
1634 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
1636 2010-11-19 Patrick Gansterer <paroga@webkit.org>
1638 Unreviewed, build fix after r72360.
1640 * bytecode/CodeBlock.h:
1641 (JSC::CodeBlock::bytecodeOffset):
1643 2010-11-18 Gavin Barraclough <barraclough@apple.com>
1645 Rubber stamped by Geoff Garen.
1647 Bug 49577 - Function.prototype should be non-configurable
1649 Ooops, Function.prototype should not be enumerable!
1651 * runtime/JSFunction.cpp:
1652 (JSC::JSFunction::getOwnPropertySlot):
1654 2010-11-18 Gavin Barraclough <barraclough@apple.com>
1656 Reviewed by Oliver Hunt.
1658 Bug 49708 - Stop recompiling functions to regenerate exception info.
1660 Instead only hold info as necessary – keep divot info is the inspector
1661 is enabled, line number info is debugging or profiling, and handler
1662 info for functions with try/catch.
1664 * bytecode/CodeBlock.cpp:
1665 (JSC::CodeBlock::dumpStatistics):
1666 (JSC::CodeBlock::CodeBlock):
1667 (JSC::CodeBlock::lineNumberForBytecodeOffset):
1668 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1669 (JSC::CodeBlock::shrinkToFit):
1670 * bytecode/CodeBlock.h:
1671 (JSC::CodeBlock::bytecodeOffset):
1672 (JSC::CodeBlock::addExpressionInfo):
1673 (JSC::CodeBlock::addLineInfo):
1674 (JSC::CodeBlock::hasExpressionInfo):
1675 (JSC::CodeBlock::hasLineInfo):
1676 (JSC::CodeBlock::needsCallReturnIndices):
1677 (JSC::CodeBlock::callReturnIndexVector):
1678 * bytecode/SamplingTool.cpp:
1679 (JSC::SamplingTool::dump):
1680 * bytecompiler/BytecodeGenerator.cpp:
1681 (JSC::BytecodeGenerator::generate):
1682 (JSC::BytecodeGenerator::BytecodeGenerator):
1683 * bytecompiler/BytecodeGenerator.h:
1684 (JSC::BytecodeGenerator::emitNode):
1685 (JSC::BytecodeGenerator::emitNodeInConditionContext):
1686 (JSC::BytecodeGenerator::emitExpressionInfo):
1687 (JSC::BytecodeGenerator::addLineInfo):
1688 * interpreter/Interpreter.cpp:
1689 (JSC::Interpreter::unwindCallFrame):
1690 (JSC::appendSourceToError):
1691 (JSC::Interpreter::throwException):
1692 (JSC::Interpreter::privateExecute):
1693 (JSC::Interpreter::retrieveLastCaller):
1694 * interpreter/Interpreter.h:
1696 (JSC::JIT::privateCompile):
1699 (JSC::DEFINE_STUB_FUNCTION):
1700 * runtime/Collector.cpp:
1701 (JSC::Heap::markRoots):
1702 * runtime/Executable.cpp:
1703 (JSC::EvalExecutable::compileInternal):
1704 (JSC::ProgramExecutable::compileInternal):
1705 (JSC::FunctionExecutable::compileForCallInternal):
1706 (JSC::FunctionExecutable::compileForConstructInternal):
1707 * runtime/Executable.h:
1708 * runtime/JSGlobalData.cpp:
1709 (JSC::JSGlobalData::JSGlobalData):
1710 * runtime/JSGlobalData.h:
1711 (JSC::JSGlobalData::usingAPI):
1712 * runtime/JSGlobalObject.h:
1713 (JSC::JSGlobalObject::supportsRichSourceInfo):
1714 (JSC::JSGlobalObject::globalData):
1716 2010-11-18 Adam Roben <aroben@apple.com>
1718 Add a script to delete manifest-related files when they are older than
1721 Changes to .vsprops files can cause the manifest files to become
1722 invalid, and Visual Studio doesn't always figure out that it needs to
1725 Reviewed by Sam Weinig.
1727 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1728 Call the new script.
1730 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1731 Added the new script.
1733 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
1734 (file_modification_times): Generator to return the modification time of
1735 each file in a directory hierarchy.
1736 (main): Get the modification time of the newest vsprops file, then find
1737 all manifest-related files in the obj directory. Delete all
1738 manifest-related files that are older than the newest vsprops file.
1740 2010-11-18 Mark Rowe <mrowe@apple.com>
1742 Rubber-stamped by Adam Roben.
1744 <rdar://problem/8602509&8602717&8602724> Enable compaction support.
1746 * Configurations/JavaScriptCore.xcconfig:
1748 2010-11-18 Gavin Barraclough <barraclough@apple.com>
1750 Reviewed by Oliver Hunt.
1752 Bug 49635 - Profiler implementation is fragile
1754 The profile presently requires the exception handling mechanism to explicitly
1755 remove all stack frames that are exited during the exception unwind mechanism.
1756 This is fragile in a number of ways:
1757 * We have to change bytecode register allocation when compiling code to run
1758 when profiling, to preserve the callee function (this is also required to
1759 call did_call after the call has returned).
1760 * In the JIT we have to maintain additional data structures
1761 (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
1762 containing the callee.
1763 * In the interpreter we use 'magic values' to offset into the instruction
1764 stream to rediscover the register containing the function.
1766 Instead, move profiling into the head and tail of functions.
1767 * This correctly accounts the cost of the call itself to the caller.
1768 * This allows us to access the callee function object from the callframe.
1769 * This means that at the point a call is made we can track the stack depth
1771 * When unwinding we can simply report the depth at which the exception is
1772 being handled - all call frames above this level are freed.
1774 * bytecode/CodeBlock.cpp:
1775 (JSC::CodeBlock::shrinkToFit):
1776 * bytecode/CodeBlock.h:
1777 (JSC::CodeBlock::bytecodeOffset):
1778 (JSC::CodeBlock::methodCallLinkInfo):
1779 * bytecompiler/BytecodeGenerator.cpp:
1780 (JSC::BytecodeGenerator::emitCall):
1781 (JSC::BytecodeGenerator::emitCallVarargs):
1782 * interpreter/Interpreter.cpp:
1783 (JSC::Interpreter::unwindCallFrame):
1784 (JSC::Interpreter::throwException):
1785 (JSC::Interpreter::execute):
1786 (JSC::Interpreter::executeCall):
1787 (JSC::Interpreter::executeConstruct):
1788 (JSC::Interpreter::privateExecute):
1790 (JSC::DEFINE_STUB_FUNCTION):
1791 * profiler/Profile.cpp:
1792 (JSC::Profile::Profile):
1793 * profiler/ProfileGenerator.cpp:
1794 (JSC::ProfileGenerator::addParentForConsoleStart):
1795 (JSC::ProfileGenerator::willExecute):
1796 (JSC::ProfileGenerator::didExecute):
1797 (JSC::ProfileGenerator::exceptionUnwind):
1798 (JSC::ProfileGenerator::stopProfiling):
1799 * profiler/ProfileGenerator.h:
1800 * profiler/ProfileNode.cpp:
1801 (JSC::ProfileNode::ProfileNode):
1802 (JSC::ProfileNode::willExecute):
1803 * profiler/ProfileNode.h:
1804 (JSC::ProfileNode::create):
1805 (JSC::ProfileNode::callerCallFrame):
1806 * profiler/Profiler.cpp:
1807 (JSC::dispatchFunctionToProfiles):
1808 (JSC::Profiler::_willExecute):
1809 (JSC::Profiler::_didExecute):
1810 (JSC::Profiler::exceptionUnwind):
1811 * profiler/Profiler.h:
1813 2010-11-18 Steve Falkenburg <sfalken@apple.com>
1815 Reviewed by Adam Roben.
1817 Remove leftover Windows Debug_Internal configurations
1818 https://bugs.webkit.org/show_bug.cgi?id=49758
1820 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1821 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1822 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1823 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1825 2010-11-18 Chao-ying Fu <fu@mips.com>
1827 Reviewed by Csaba Osztrogonác.
1829 Avoid increasing required alignment of target type warning
1830 https://bugs.webkit.org/show_bug.cgi?id=43963
1832 * runtime/UString.h:
1833 (JSC::UStringHash::equal):
1834 * wtf/StdLibExtras.h:
1836 2010-11-17 Sam Weinig <sam@webkit.org>
1838 Reviewed by Anders Carlsson.
1840 Add stubbed out ScrollAnimator for the Mac
1841 https://bugs.webkit.org/show_bug.cgi?id=49678
1843 * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
1844 change in behavior at the moment.
1846 2010-11-17 David Kilzer <ddkilzer@apple.com>
1848 <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
1850 Reviewed by Darin Adler.
1852 Add an explicit overflow check prior to allocating our buffer,
1853 rather than implicitly relying on the guard in convertUTF16ToUTF8.
1855 * wtf/text/WTFString.cpp:
1856 (WTF::String::utf8):
1858 2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
1860 Unreviewed, rolling out r72197.
1861 http://trac.webkit.org/changeset/72197
1862 https://bugs.webkit.org/show_bug.cgi?id=49661
1864 broke fast/regex/test1.html (Requested by stampho on #webkit).
1866 * runtime/JSGlobalData.h:
1867 * runtime/RegExp.cpp:
1868 (JSC::RegExpRepresentation::~RegExpRepresentation):
1869 (JSC::RegExp::compile):
1870 (JSC::RegExp::match):
1871 * tests/mozilla/expected.html:
1873 * yarr/RegexCompiler.cpp:
1874 * yarr/RegexCompiler.h:
1875 * yarr/RegexInterpreter.cpp:
1876 * yarr/RegexInterpreter.h:
1877 * yarr/RegexJIT.cpp:
1878 (JSC::Yarr::jitCompileRegex):
1880 (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1881 (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1882 (JSC::Yarr::RegexCodeBlock::getFallback):
1883 (JSC::Yarr::RegexCodeBlock::setFallback):
1884 (JSC::Yarr::executeRegex):
1885 * yarr/RegexParser.h:
1886 * yarr/RegexPattern.h:
1888 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
1890 Reviewed by Gavin Barraclough.
1892 YARR JIT should fallback to YARR Interpreter instead of PCRE.
1893 https://bugs.webkit.org/show_bug.cgi?id=46719
1895 Remove the ENABLE_YARR macro and the option of matching regular
1896 expressions with PCRE from JavaScriptCore.
1898 * runtime/JSGlobalData.h:
1899 * runtime/RegExp.cpp:
1900 (JSC::RegExp::compile):
1901 (JSC::RegExp::match):
1902 * tests/mozilla/expected.html:
1904 * yarr/RegexCompiler.cpp:
1905 * yarr/RegexCompiler.h:
1906 * yarr/RegexInterpreter.cpp:
1907 (JSC::Yarr::byteCompileRegex):
1908 * yarr/RegexInterpreter.h:
1909 * yarr/RegexJIT.cpp:
1910 (JSC::Yarr::jitCompileRegex):
1912 (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1913 (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1914 (JSC::Yarr::RegexCodeBlock::getFallback):
1915 (JSC::Yarr::RegexCodeBlock::isFallback):
1916 (JSC::Yarr::RegexCodeBlock::setFallback):
1917 (JSC::Yarr::executeRegex):
1918 * yarr/RegexParser.h:
1919 * yarr/RegexPattern.h:
1921 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
1923 Reviewed by Gavin Barraclough.
1925 Extend YARR Interpreter with beginning character look-up optimization
1926 https://bugs.webkit.org/show_bug.cgi?id=45751
1928 Add beginning character look-up optimization which sets the start
1929 index to the first possible successful pattern match.
1930 Extend YARR Interpreter with lookupForBeginChars function which
1931 implements the beginning character look-up optimization.
1933 * yarr/RegexInterpreter.cpp:
1934 (JSC::Yarr::Interpreter::InputStream::readPair):
1935 (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
1936 (JSC::Yarr::Interpreter::lookupForBeginChars):
1937 (JSC::Yarr::Interpreter::matchDisjunction):
1938 (JSC::Yarr::Interpreter::interpret):
1939 * yarr/RegexInterpreter.h:
1940 (JSC::Yarr::BytecodePattern::BytecodePattern):
1942 2010-11-17 Alexis Menard <alexis.menard@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
1944 Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
1946 [Qt] Add support for use GStreamer with the Qt build
1948 Enable the build/inclusion of the wtf/QObject convenience classes.
1950 * JavaScriptCore.pri:
1953 2010-11-17 Peter Varga <pvarga@inf.u-szeged.hu>
1955 Reviewed by Gavin Barraclough.
1957 Collect the beginning characters in a RegExp pattern for look-up
1959 https://bugs.webkit.org/show_bug.cgi?id=45748
1961 Extend the YARR's parser with an algorithm which collects the potential
1962 beginning characters from a RegExp pattern for later look-up optimization.
1964 * yarr/RegexCompiler.cpp:
1965 (JSC::Yarr::BeginCharHelper::BeginCharHelper):
1966 (JSC::Yarr::BeginCharHelper::addBeginChar):
1967 (JSC::Yarr::BeginCharHelper::merge):
1968 (JSC::Yarr::BeginCharHelper::addCharacter):
1969 (JSC::Yarr::BeginCharHelper::linkHotTerms):
1970 (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
1971 (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
1972 (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
1973 (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
1974 (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
1975 (JSC::Yarr::compileRegex):
1976 * yarr/RegexPattern.h:
1977 (JSC::Yarr::TermChain::TermChain):
1978 (JSC::Yarr::BeginChar::BeginChar):
1979 (JSC::Yarr::RegexPattern::RegexPattern):
1980 (JSC::Yarr::RegexPattern::reset):
1982 2010-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
1984 Unreviewed, rolling out r72160.
1985 http://trac.webkit.org/changeset/72160
1986 https://bugs.webkit.org/show_bug.cgi?id=49646
1988 Broke lots of fast/profiler tests, among others (Requested by
1991 * bytecode/CodeBlock.cpp:
1992 (JSC::CodeBlock::dump):
1993 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1994 (JSC::CodeBlock::shrinkToFit):
1995 * bytecode/CodeBlock.h:
1996 (JSC::CodeBlock::addFunctionRegisterInfo):
1997 * bytecode/Opcode.h:
1998 * bytecompiler/BytecodeGenerator.cpp:
1999 (JSC::BytecodeGenerator::BytecodeGenerator):
2000 (JSC::BytecodeGenerator::emitCall):
2001 (JSC::BytecodeGenerator::emitCallVarargs):
2002 (JSC::BytecodeGenerator::emitReturn):
2003 (JSC::BytecodeGenerator::emitConstruct):
2004 * bytecompiler/BytecodeGenerator.h:
2005 (JSC::CallArguments::profileHookRegister):
2006 * bytecompiler/NodesCodegen.cpp:
2007 (JSC::CallArguments::CallArguments):
2008 * interpreter/Interpreter.cpp:
2009 (JSC::Interpreter::unwindCallFrame):
2010 (JSC::Interpreter::throwException):
2011 (JSC::Interpreter::execute):
2012 (JSC::Interpreter::executeCall):
2013 (JSC::Interpreter::executeConstruct):
2014 (JSC::Interpreter::privateExecute):
2016 (JSC::JIT::privateCompileMainPass):
2018 * jit/JITOpcodes.cpp:
2019 (JSC::JIT::emit_op_profile_will_call):
2020 (JSC::JIT::emit_op_profile_did_call):
2021 * jit/JITOpcodes32_64.cpp:
2022 (JSC::JIT::emit_op_profile_will_call):
2023 (JSC::JIT::emit_op_profile_did_call):
2025 (JSC::DEFINE_STUB_FUNCTION):
2027 * profiler/Profile.cpp:
2028 (JSC::Profile::Profile):
2029 * profiler/ProfileGenerator.cpp:
2030 (JSC::ProfileGenerator::addParentForConsoleStart):
2031 (JSC::ProfileGenerator::willExecute):
2032 (JSC::ProfileGenerator::didExecute):
2033 (JSC::ProfileGenerator::stopProfiling):
2034 * profiler/ProfileGenerator.h:
2035 * profiler/ProfileNode.cpp:
2036 (JSC::ProfileNode::ProfileNode):
2037 (JSC::ProfileNode::willExecute):
2038 * profiler/ProfileNode.h:
2039 (JSC::ProfileNode::create):
2040 (JSC::ProfileNode::operator==):
2041 * profiler/Profiler.cpp:
2042 (JSC::dispatchFunctionToProfiles):
2043 (JSC::Profiler::willExecute):
2044 (JSC::Profiler::didExecute):
2045 * profiler/Profiler.h:
2047 2010-11-16 Gavin Barraclough <barraclough@apple.com>
2049 Reviewed by Sam Weinig.
2051 Bug 49635 - Profiler implementation is fragile
2053 The profile presently requires the exception handling mechanism to explicitly
2054 remove all stack frames that are exited during the exception unwind mechanism.
2055 This is fragile in a number of ways:
2056 * We have to change bytecode register allocation when compiling code to run
2057 when profiling, to preserve the callee function (this is also required to
2058 call did_call after the call has returned).
2059 * In the JIT we have to maintain additional data structures
2060 (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
2061 containing the callee.
2062 * In the interpreter we use 'magic values' to offset into the instruction
2063 stream to rediscover the register containing the function.
2065 Instead, move profiling into the head and tail of functions.
2066 * This correctly accounts the cost of the call itself to the caller.
2067 * This allows us to access the callee function object from the callframe.
2068 * This means that at the point a call is made we can track the stack depth
2070 * When unwinding we can simply report the depth at which the exception is
2071 being handled - all call frames above this level are freed.
2073 * JavaScriptCore.xcodeproj/project.pbxproj:
2074 * bytecode/CodeBlock.cpp:
2075 (JSC::CodeBlock::dump):
2076 (JSC::CodeBlock::shrinkToFit):
2077 * bytecode/CodeBlock.h:
2078 (JSC::CodeBlock::bytecodeOffset):
2079 (JSC::CodeBlock::methodCallLinkInfo):
2080 * bytecode/Opcode.h:
2081 * bytecompiler/BytecodeGenerator.cpp:
2082 (JSC::BytecodeGenerator::BytecodeGenerator):
2083 (JSC::BytecodeGenerator::emitCall):
2084 (JSC::BytecodeGenerator::emitCallVarargs):
2085 (JSC::BytecodeGenerator::emitReturn):
2086 (JSC::BytecodeGenerator::emitConstruct):
2087 * bytecompiler/BytecodeGenerator.h:
2088 (JSC::CallArguments::count):
2089 * bytecompiler/NodesCodegen.cpp:
2090 (JSC::CallArguments::CallArguments):
2091 * interpreter/Interpreter.cpp:
2092 (JSC::ProfileHostCall::ProfileHostCall):
2093 (JSC::ProfileHostCall::~ProfileHostCall):
2094 (JSC::Interpreter::unwindCallFrame):
2095 (JSC::Interpreter::throwException):
2096 (JSC::Interpreter::execute):
2097 (JSC::Interpreter::executeCall):
2098 (JSC::Interpreter::executeConstruct):
2099 (JSC::Interpreter::privateExecute):
2101 (JSC::JIT::privateCompileMainPass):
2103 * jit/JITOpcodes.cpp:
2104 (JSC::JIT::emit_op_profile_has_called):
2105 (JSC::JIT::emit_op_profile_will_return):
2106 * jit/JITOpcodes32_64.cpp:
2107 (JSC::JIT::emit_op_profile_has_called):
2108 (JSC::JIT::emit_op_profile_will_return):
2110 (JSC::DEFINE_STUB_FUNCTION):
2112 * profiler/Profile.cpp:
2113 (JSC::Profile::Profile):
2114 * profiler/ProfileGenerator.cpp:
2115 (JSC::ProfileGenerator::addParentForConsoleStart):
2116 (JSC::ProfileGenerator::willExecute):
2117 (JSC::ProfileGenerator::didExecute):
2118 (JSC::ProfileGenerator::exceptionUnwind):
2119 (JSC::ProfileGenerator::stopProfiling):
2120 * profiler/ProfileGenerator.h:
2121 * profiler/ProfileNode.cpp:
2122 (JSC::ProfileNode::ProfileNode):
2123 (JSC::ProfileNode::willExecute):
2124 * profiler/ProfileNode.h:
2125 (JSC::ProfileNode::create):
2126 (JSC::ProfileNode::operator==):
2127 (JSC::ProfileNode::exec):
2128 * profiler/Profiler.cpp:
2129 (JSC::dispatchFunctionToProfiles):
2130 (JSC::Profiler::hasCalled):
2131 (JSC::Profiler::willEvaluate):
2132 (JSC::Profiler::willReturn):
2133 (JSC::Profiler::didEvaluate):
2134 (JSC::Profiler::exceptionUnwind):
2135 * profiler/Profiler.h:
2137 2010-11-16 Brian Weinstein <bweinstein@apple.com>
2139 Reviewed by Adam Roben and Steve Falkenburg.
2141 Touch Platform.h to force a rebuild for Windows.
2145 2010-11-16 Steve Falkenburg <sfalken@apple.com>
2147 Reviewed by Adam Roben.
2149 Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
2150 https://bugs.webkit.org/show_bug.cgi?id=49632
2152 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2153 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2154 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2155 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2157 2010-11-16 Peter Varga <pvarga@inf.u-szeged.hu>
2159 Reviewed by Gavin Barraclough.
2161 The number of recursive match calls isn't limited in YARR Interpreter
2162 https://bugs.webkit.org/show_bug.cgi?id=47906
2164 Check the number of the matchDisjunction recursive calls to avoid unbounded
2166 Now the matchDisjunction function returns JSRegExpResult instead of bool.
2167 The JSRegExpResult enum contains the result of matching or the error code
2168 of the failure (like HitLimit) which terminates the matching.
2169 The error codes are based on pcre's jsRegExpExecute error codes.
2171 * yarr/RegexInterpreter.cpp:
2172 (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
2173 (JSC::Yarr::Interpreter::matchParentheses):
2174 (JSC::Yarr::Interpreter::backtrackParentheses):
2175 (JSC::Yarr::Interpreter::matchDisjunction):
2176 (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
2177 (JSC::Yarr::Interpreter::interpret):
2178 (JSC::Yarr::Interpreter::Interpreter):
2179 * yarr/RegexInterpreter.h:
2181 2010-11-16 Brian Weinstein <bweinstein@apple.com>
2183 Rest of the Windows build fix.
2185 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2187 2010-11-16 Gavin Barraclough <barraclough@apple.com>
2189 Windows build fix pt 1.
2191 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2193 2010-11-16 Gavin Barraclough <barraclough@apple.com>
2195 Reviewed by Oliver Hunt.
2197 https://bugs.webkit.org/show_bug.cgi?id=49606
2199 The bug here is that we read the prototype from the RHS argument using a regular
2200 op_get_by_id before op_instanceof has checked that this is an object implementing
2201 HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
2202 in the code base, since we have additional logic (implemented using the
2203 GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
2204 from the get_by_id into invalid parameter errors. Having fixed this bug this code
2205 is all redundant, since in these cases the get_by_id will never have been reached.
2207 * bytecode/CodeBlock.cpp:
2208 (JSC::CodeBlock::dump):
2209 (JSC::CodeBlock::shrinkToFit):
2210 * bytecode/CodeBlock.h:
2211 (JSC::CodeBlock::addExpressionInfo):
2212 * bytecode/Opcode.h:
2213 * bytecompiler/BytecodeGenerator.cpp:
2214 (JSC::BytecodeGenerator::BytecodeGenerator):
2215 (JSC::BytecodeGenerator::emitCheckHasInstance):
2216 * bytecompiler/BytecodeGenerator.h:
2217 * bytecompiler/NodesCodegen.cpp:
2218 (JSC::InstanceOfNode::emitBytecode):
2219 * interpreter/Interpreter.cpp:
2220 (JSC::Interpreter::throwException):
2221 (JSC::Interpreter::privateExecute):
2223 (JSC::JIT::privateCompileMainPass):
2224 (JSC::JIT::privateCompileSlowCases):
2226 * jit/JITOpcodes.cpp:
2227 (JSC::JIT::emit_op_check_has_instance):
2228 (JSC::JIT::emit_op_instanceof):
2229 (JSC::JIT::emitSlow_op_check_has_instance):
2230 (JSC::JIT::emitSlow_op_instanceof):
2231 * jit/JITOpcodes32_64.cpp:
2232 (JSC::JIT::emit_op_check_has_instance):
2233 (JSC::JIT::emit_op_instanceof):
2234 (JSC::JIT::emitSlow_op_check_has_instance):
2235 (JSC::JIT::emitSlow_op_instanceof):
2237 (JSC::DEFINE_STUB_FUNCTION):
2239 * runtime/ExceptionHelpers.cpp:
2240 (JSC::createInterruptedExecutionException):
2241 (JSC::createTerminatedExecutionException):
2242 (JSC::createUndefinedVariableError):
2243 (JSC::createNotAFunctionError):
2244 (JSC::createNotAnObjectError):
2245 * runtime/ExceptionHelpers.h:
2246 * runtime/JSGlobalData.cpp:
2247 (JSC::JSGlobalData::JSGlobalData):
2248 * runtime/JSGlobalData.h:
2249 * runtime/JSNotAnObject.cpp:
2250 (JSC::JSNotAnObject::toPrimitive):
2251 (JSC::JSNotAnObject::getPrimitiveNumber):
2252 (JSC::JSNotAnObject::toBoolean):
2253 (JSC::JSNotAnObject::toNumber):
2254 (JSC::JSNotAnObject::toString):
2255 (JSC::JSNotAnObject::toObject):
2256 (JSC::JSNotAnObject::getOwnPropertySlot):
2257 (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2258 (JSC::JSNotAnObject::put):
2259 (JSC::JSNotAnObject::deleteProperty):
2260 (JSC::JSNotAnObject::getOwnPropertyNames):
2261 * runtime/JSNotAnObject.h:
2262 (JSC::JSNotAnObject::JSNotAnObject):
2263 * runtime/JSObject.h:
2264 (JSC::JSObject::isActivationObject):
2265 * runtime/JSValue.cpp:
2266 (JSC::JSValue::toObjectSlowCase):
2267 (JSC::JSValue::synthesizeObject):
2268 (JSC::JSValue::synthesizePrototype):
2270 2010-11-15 Darin Adler <darin@apple.com>
2272 Reviewed by Sam Weinig.
2274 Harden additional string functions against large lengths
2275 https://bugs.webkit.org/show_bug.cgi?id=49574
2277 * wtf/text/CString.cpp:
2278 (WTF::CString::init): Check for length that is too large for CString.
2279 (WTF::CString::newUninitialized): Ditto.
2280 (WTF::CString::copyBufferIfNeeded): Fix types so the length stays
2283 * wtf/text/WTFString.cpp:
2284 (WTF::String::append): Check for length that is too large.
2286 2010-11-15 Gavin Barraclough <barraclough@apple.com>
2288 Reviewed by Sam Weinig.
2290 Bug 49577 - Function.prototype should be non-configurable
2292 JSC lazily allocates the prototype property of Function objects.
2294 We check the prototype exists on 'get', but not on 'put'.
2295 If you 'put' without having first done a 'get' you can end up with a configurable
2296 prototype (prototype should only ever be non-configurable).
2298 This is visible in a couple of ways:
2299 * 'delete' on the property may succeed. (the next access will result in a new,
2300 reset prototype object).
2301 * the prototype may be set to a getter.
2303 * runtime/JSFunction.cpp:
2304 (JSC::JSFunction::getOwnPropertyNames):
2305 Reify the prototype property before allowing an enumerate including don't enum properties.
2306 (JSC::JSFunction::put):
2307 Reify the prototype property before any put to it.
2309 2010-11-15 Gavin Barraclough <barraclough@apple.com>
2311 Reviewed by Geoff Garen.
2313 Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
2315 Three types of source location information are added to errors.
2317 (1) Divot information.
2319 This was added with the intention of using it to provide better source highlighting in the inspector.
2320 We may still want to do so, but we probably should not be exposing these values in a manner visible to
2321 user scripts – only through an internal C++ interface. The code adding divot properties to objects has
2324 (2) Line number information.
2326 Line number information is presently sometimes added at the point the exception is created, and sometimes
2327 added at the point the exception passes through throwException. Change this so that throwException has
2328 the sole responsibility for adding line number and source file information.
2330 (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
2332 These messages are currently created at the point the exceptions is raised. Instead reformat the message
2333 such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
2334 becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
2335 the in throw Exception. This presents a number of advantages:
2336 * we no longer need to have source location information to create these TypeErrors.
2337 * we can chose to append source location information in other error messages, including those where
2338 passing source location to the point of construction would be inconvenient.
2339 * we can chose in future to omit to append source location information when running in a non-debug mode.
2341 This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
2342 removing double periods (..) at end of lines, and adding slightly more context to some errors.
2344 * bytecode/CodeBlock.cpp:
2345 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2346 - Separated called to access line and range information.
2348 * bytecode/CodeBlock.h:
2349 - Separated called to access line and range information.
2351 * interpreter/Interpreter.cpp:
2352 (JSC::Interpreter::resolve):
2353 (JSC::Interpreter::resolveSkip):
2354 (JSC::Interpreter::resolveGlobal):
2355 (JSC::Interpreter::resolveGlobalDynamic):
2356 (JSC::Interpreter::resolveBaseAndProperty):
2357 (JSC::isInvalidParamForIn):
2358 (JSC::isInvalidParamForInstanceOf):
2359 - Update parameters passed to error constructors.
2360 (JSC::appendSourceToError):
2361 - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
2362 (JSC::Interpreter::throwException):
2363 - Updated to call appendSourceToError.
2364 (JSC::Interpreter::privateExecute):
2365 - Update parameters passed to error constructors.
2368 (JSC::DEFINE_STUB_FUNCTION):
2369 - Update parameters passed to error constructors.
2371 * runtime/Error.cpp:
2372 (JSC::addErrorInfo):
2373 (JSC::hasErrorInfo):
2374 - Removed divot properties.
2377 - Removed divot properties.
2379 * runtime/ErrorInstance.cpp:
2380 (JSC::ErrorInstance::ErrorInstance):
2381 - Initialize new property.
2383 * runtime/ErrorInstance.h:
2384 (JSC::ErrorInstance::appendSourceToMessage):
2385 (JSC::ErrorInstance::setAppendSourceToMessage):
2386 (JSC::ErrorInstance::clearAppendSourceToMessage):
2387 - Added flag to check for errors needing location information appending.
2388 (JSC::ErrorInstance::isErrorInstance):
2389 - Added virtual method to check for ErrorInstances.
2391 * runtime/ExceptionHelpers.cpp:
2392 (JSC::createUndefinedVariableError):
2393 (JSC::createInvalidParamError):
2394 (JSC::createNotAConstructorError):
2395 (JSC::createNotAFunctionError):
2396 (JSC::createNotAnObjectError):
2397 - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
2399 * runtime/ExceptionHelpers.h:
2400 - Updated function signatures.
2402 * runtime/JSFunction.cpp:
2403 (JSC::callHostFunctionAsConstructor):
2404 - Update parameters passed to error constructors.
2406 * runtime/JSObject.h:
2407 (JSC::JSObject::isErrorInstance):
2408 - Added virtual method to check for ErrorInstances.
2410 2010-11-12 Anders Carlsson <andersca@apple.com>
2412 Reviewed by Adam Roben.
2414 CString(const char*) crashes when passed a null pointer
2415 https://bugs.webkit.org/show_bug.cgi?id=49450
2417 * wtf/text/CString.cpp:
2418 (WTF::CString::CString):
2419 Return early if str is null.
2421 2010-11-11 Gavin Barraclough <barraclough@apple.com>
2423 Reviewed by Oliver Hunt.
2425 Bug 49420 - Clean up syntax/reference error throw.
2427 Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
2428 This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
2429 attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
2430 this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
2432 We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
2433 Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
2435 * JavaScriptCore.xcodeproj/project.pbxproj:
2436 * bytecode/CodeBlock.cpp:
2437 (JSC::CodeBlock::dump):
2438 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2439 * bytecode/Opcode.h:
2440 * bytecompiler/BytecodeGenerator.cpp:
2441 (JSC::BytecodeGenerator::emitThrowReferenceError):
2442 (JSC::BytecodeGenerator::emitThrowSyntaxError):
2443 (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
2444 * bytecompiler/BytecodeGenerator.h:
2445 (JSC::BytecodeGenerator::emitNodeInConditionContext):
2446 * bytecompiler/NodesCodegen.cpp:
2447 (JSC::ThrowableExpressionData::emitThrowReferenceError):
2448 (JSC::ThrowableExpressionData::emitThrowSyntaxError):
2449 (JSC::RegExpNode::emitBytecode):
2450 (JSC::PostfixErrorNode::emitBytecode):
2451 (JSC::PrefixErrorNode::emitBytecode):
2452 (JSC::AssignErrorNode::emitBytecode):
2453 (JSC::ForInNode::emitBytecode):
2454 (JSC::ContinueNode::emitBytecode):
2455 (JSC::BreakNode::emitBytecode):
2456 (JSC::ReturnNode::emitBytecode):
2457 (JSC::LabelNode::emitBytecode):
2458 * interpreter/Interpreter.cpp:
2459 (JSC::Interpreter::privateExecute):
2461 (JSC::JIT::privateCompileMainPass):
2463 * jit/JITOpcodes.cpp:
2464 (JSC::JIT::emit_op_throw_reference_error):
2465 (JSC::JIT::emit_op_throw_syntax_error):
2466 * jit/JITOpcodes32_64.cpp:
2467 (JSC::JIT::emit_op_throw_reference_error):
2468 (JSC::JIT::emit_op_throw_syntax_error):
2470 (JSC::DEFINE_STUB_FUNCTION):
2474 2010-11-11 Darin Adler <darin@apple.com>
2476 Reviewed by Sam Weinig.
2478 Harden some string functions against large lengths
2479 https://bugs.webkit.org/show_bug.cgi?id=49293
2481 * wtf/text/StringImpl.cpp:
2482 (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
2483 strlen results that are too large for StringImpl.
2484 (WTF::StringImpl::lower): Check for lengths that are too large for
2486 (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
2487 lengths that are too large for int32_t.
2488 (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
2489 rather than int and int32_t so we can handle any length.
2490 (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
2491 lengths that are too large for int32_t.
2492 (WTF::StringImpl::find): Check for strlen results that are too large for
2494 (WTF::StringImpl::findIgnoringCase): Ditto.
2495 (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
2496 (WTF::StringImpl::createWithTerminatingNullCharacter): Check before
2497 incrementing length.
2499 2010-11-11 Dan Horák <dan@danny.cz>
2501 Reviewed by Andreas Kling.
2503 Add support for the s390/s390x architectures, it's big-endian
2504 with s390 being 32-bit and s390x being 64-bit.
2506 https://bugs.webkit.org/show_bug.cgi?id=34786
2510 2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
2512 Reviewed by David Hyatt.
2514 HTML5 Ruby support should be mandatory feature
2515 https://bugs.webkit.org/show_bug.cgi?id=49272
2517 Remove Ruby as optional feature.
2519 * Configurations/FeatureDefines.xcconfig:
2520 * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
2522 2010-11-10 Peter Rybin <peter.rybin@gmail.com>
2524 Reviewed by Adam Barth.
2526 HTML parser should provide script column position within HTML document to JavaScript engine
2527 https://bugs.webkit.org/show_bug.cgi?id=45271
2529 Adds TextPosition* classes -- a structure that stores line/column/generation
2530 level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
2531 wrappers that emphasize whether int number is used as zero-based or
2535 * JavaScriptCore.gypi:
2536 * JavaScriptCore.xcodeproj/project.pbxproj:
2537 * wtf/text/TextPosition.h: Added.
2538 (WTF::TextPosition::TextPosition):
2539 (WTF::TextPosition::minimumPosition):
2540 (WTF::TextPosition::belowRangePosition):
2541 (WTF::ZeroBasedNumber::fromZeroBasedInt):
2542 (WTF::ZeroBasedNumber::ZeroBasedNumber):
2543 (WTF::ZeroBasedNumber::zeroBasedInt):
2544 (WTF::ZeroBasedNumber::base):
2545 (WTF::ZeroBasedNumber::belowBase):
2546 (WTF::OneBasedNumber::fromOneBasedInt):
2547 (WTF::OneBasedNumber::OneBasedNumber):
2548 (WTF::OneBasedNumber::oneBasedInt):
2549 (WTF::OneBasedNumber::convertAsZeroBasedInt):
2550 (WTF::OneBasedNumber::convertToZeroBased):
2551 (WTF::OneBasedNumber::base):
2552 (WTF::OneBasedNumber::belowBase):
2553 (WTF::toZeroBasedTextPosition):
2554 (WTF::toOneBasedTextPosition):
2555 (WTF::ZeroBasedNumber::convertToOneBased):
2557 2010-11-09 Gabor Loki <loki@webkit.org>
2559 Reviewed by Gavin Barraclough.
2561 ARM JIT asserts when loading http://reader.google.com in debug mode
2562 https://bugs.webkit.org/show_bug.cgi?id=48912
2564 There are several cases when the uninterrupted sequence is larger than
2565 maximum required offset for pathing the same sequence. Eg.: if in a
2566 uninterrupted sequence the last macroassembler's instruction is a stub
2567 call, it emits store instruction(s) which should not be included in the
2568 calculation of length of uninterrupted sequence. So, the insnSpace and
2569 constSpace should be upper limit instead of hard limit.
2572 * jit/JITInlineMethods.h:
2573 (JSC::JIT::endUninterruptedSequence):
2575 2010-11-09 David Kilzer <ddkilzer@apple.com>
2577 <http://webkit.org/b/49279> Fix include statements for local headers
2579 Reviewed by Gavin Barraclough.
2581 Use "Foo.h" instead of <Foo.h> for local headers.
2583 * assembler/AbstractMacroAssembler.h: Also fixed sort order.
2584 * assembler/CodeLocation.h:
2586 * yarr/RegexParser.h:
2588 2010-11-08 Adam Roben <aroben@apple.com>
2592 It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
2593 .bashrc unsets %TEMP%, which broke copy-tools.cmd.
2595 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2596 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2597 * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
2598 * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
2600 2010-11-08 Martin Robinson <mrobinson@igalia.com>
2602 Reviewed by Xan Lopez.
2604 >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
2605 https://bugs.webkit.org/show_bug.cgi?id=49128
2607 r59042 introduced a C++-style comment in Platform.h, which is often
2608 included in C source files. Change it to a C-style comment.
2610 * wtf/Platform.h: Fix the C++-style comment.
2612 2010-11-08 Adam Roben <aroben@apple.com>
2614 Show a message and cause the build to immediately fail when any
2615 .vsprops files are copied
2617 When $WebKitLibrariesDir is set to a non-standard location, the
2618 .vsprops files have to be copied from WebKitLibraries/win to
2619 $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
2620 changes to the .vsprops files until the next time it opens the solution
2621 file. Before this patch, the build would soldier on with the old
2622 .vsprops files, leading to strange build failures. Now we detect that
2623 the .vsprops files have been updated, display a message to the user
2624 telling them what to do, and make the build fail immediately.
2626 Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
2627 .vsprops files are updated
2629 Reviewed by Steve Falkenburg.
2631 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2632 Moved code to copy the tools directory to the new copy-tools.cmd
2633 script. Moved that after the command that writes the buildfailed file
2634 so the build will be considered a failure if copy-tools.cmd fails.
2635 Changed to write the project name into buildfailed like all our other
2636 projects do, so those other projects will know that the failure was due
2639 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2642 * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
2643 the tools directory to $WebKitLibrariesDir. If any files were copied,
2644 we display a message to the user and exit with error code 1 to cause
2645 the build to fail. In non-interactive builds, we just print the message
2646 to the build log. In interactive builds, we show the message in an
2649 * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
2650 Windows Scripting Host to display a message in an alert.
2652 2010-11-07 Sam Magnuson <smagnuson@netflix.com>
2654 Reviewed by Andreas Kling.
2656 [Qt] make install does not cause JavaScriptCore to be built
2657 https://bugs.webkit.org/show_bug.cgi?id=49114
2659 * JavaScriptCore.pro:
2661 2010-11-05 Oliver Hunt <oliver@apple.com>
2663 Reviewed by Gavin Barraclough.
2665 Website consistently crashing TOT in JIT::execute() on news.com.au
2666 https://bugs.webkit.org/show_bug.cgi?id=48954
2668 The problem here was the strict pass of this conversion was loading the
2669 this structure into one register but doing the flags check off a different
2670 register. This is clearly wrong. I have been unable to trigger the crash
2671 with a reduction, but I've added an assertion to the this conversion to
2672 attempt to make it more readily catchable in future.
2674 * jit/JITOpcodes.cpp:
2675 (JSC::JIT::emit_op_convert_this_strict):
2676 * jit/JITOpcodes32_64.cpp:
2677 (JSC::JIT::emit_op_convert_this_strict):
2679 (JSC::DEFINE_STUB_FUNCTION):
2681 2010-11-04 Xan Lopez <xlopez@igalia.com>
2683 Reviewed by Adam Barth.
2685 Use leakRef instead of releaseRef
2686 https://bugs.webkit.org/show_bug.cgi?id=48974
2688 Use leakRef instead of the deprecated releaseRef. This was renamed
2689 some time ago because 'releaseRef' is too close to 'release',
2690 which does something completely different.
2692 2010-11-04 Eric Seidel <eric@webkit.org>
2694 Reviewed by Gavin Barraclough.
2696 REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
2697 https://bugs.webkit.org/show_bug.cgi?id=48789
2699 The contract for all String/AtomicString methods seems to be that it's
2700 safe to call them, even when the String is null (impl() returns 0).
2701 This contract was broken by r49798 (unintentionally) when optimizing
2703 This patch adds a null check to AtomicString::lower() fixing this
2704 crash and preventing future confusion.
2706 * wtf/text/AtomicString.cpp:
2707 (WTF::AtomicString::lower):
2709 2010-11-04 Adam Barth <abarth@webkit.org>
2711 Enabled ICCJPEG on Chromium Mac
2712 https://bugs.webkit.org/show_bug.cgi?id=48977
2716 2010-11-03 Oliver Hunt <oliver@apple.com>
2718 Reviewed by Gavin Barraclough.
2720 Crash in Function.prototype.call.apply
2721 https://bugs.webkit.org/show_bug.cgi?id=48485
2723 The problem here was op_load_varargs failing to ensure that
2724 there was sufficient space for the entire callframe prior to
2725 op_call_varargs. This meant that when we then re-entered the
2726 VM it was possible to stomp over an earlier portion of the
2727 stack, so causing sub-optimal behaviour.
2729 * bytecode/Opcode.h:
2730 * bytecompiler/BytecodeGenerator.cpp:
2731 (JSC::BytecodeGenerator::emitLoadVarargs):
2732 * bytecompiler/BytecodeGenerator.h:
2733 * bytecompiler/NodesCodegen.cpp:
2734 (JSC::ApplyFunctionCallDotNode::emitBytecode):
2736 (JSC::JIT::privateCompile):
2737 * jit/JITOpcodes.cpp:
2738 (JSC::JIT::emit_op_load_varargs):
2740 2010-11-03 Kenneth Russell <kbr@google.com>
2742 Reviewed by Chris Marrin.
2744 Redesign extension mechanism in GraphicsContext3D
2745 https://bugs.webkit.org/show_bug.cgi?id=46894
2747 * JavaScriptCore.exp:
2748 - Exposed String::split(const String&, Vector<String>).
2750 2010-11-03 Adam Roben <aroben@apple.com>
2752 Bring WTF.vcproj up to date
2754 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
2755 unicode directories, added new files, removed old files.
2757 2010-11-03 Gabor Loki <loki@webkit.org>
2759 Reviewed by Andreas Kling.
2761 Remove unused initializeWeakRandomNumberGenerator
2762 https://bugs.webkit.org/show_bug.cgi?id=48899
2764 WeakRandom class is used instead of weakRandomNumber and its initializer.
2766 * wtf/RandomNumberSeed.h:
2768 2010-11-03 Gabor Loki <loki@webkit.org>
2770 Reviewed by Geoffrey Garen.
2772 Unused class: JSFastMath with JSValue64
2773 https://bugs.webkit.org/show_bug.cgi?id=48835
2775 Remove unused JSFastMath class.
2777 * runtime/JSImmediate.h:
2779 2010-11-02 Adam Roben <aroben@apple.com>
2781 Windows build fix after r71127
2783 MSVC isn't smart enough to figure out that the definition of the global
2784 nullptr variable isn't needed, so we provide one for it.
2786 Fixes <http://webkit.org/b/48862> Windows build is broken due to
2787 undefined symbol nullptr
2789 Reviewed by Anders Carlsson.
2791 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
2793 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
2796 * wtf/NullPtr.cpp: Added.
2798 2010-11-02 Martin Robinson <mrobinson@igalia.com>
2800 Reviewed by Xan Lopez.
2802 Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
2803 https://bugs.webkit.org/show_bug.cgi?id=48841
2805 Remove special handling of HashTableDeletedValue in PlatformRefPtr.
2806 This is better handled on a case-by-case basis, when HashTraits
2807 cannot account for it.
2809 * wtf/PlatformRefPtr.h:
2810 (WTF::PlatformRefPtr::~PlatformRefPtr):
2811 (WTF::PlatformRefPtr::clear):
2814 2010-10-29 Oliver Hunt <oliver@apple.com>
2816 Reviewed by Gavin Barraclough.
2818 REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
2819 https://bugs.webkit.org/show_bug.cgi?id=47573
2821 I think the interpreter portion of this was introduced by
2822 an incorrect but silent merge when I updated prior to committing.
2823 The JIT change is basically just a correctness fix, but it is
2824 needed to prevent the testcase from asserting in debug builds.
2826 The basic problem is incorrectly setting the activation object
2827 on an arguments object. The crash was due to us setting a null
2828 activation in the interpreter, in the jit we were setting the
2829 activation of a strict mode arguments object.
2831 * interpreter/Interpreter.cpp:
2832 (JSC::Interpreter::privateExecute):
2834 (JSC::DEFINE_STUB_FUNCTION):
2837 2010-10-29 Csaba Osztrogonác <ossy@webkit.org>
2839 Reviewed by Adam Roben and David Kilzer.
2841 Fix and cleanup of build systems
2842 https://bugs.webkit.org/show_bug.cgi?id=48342
2844 * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
2846 2010-10-28 Kwang Yul Seo <skyul@company100.net>
2848 Reviewed by Darin Adler.
2850 Include stddef.h unconditionally in Assertions.h
2851 https://bugs.webkit.org/show_bug.cgi?id=48573
2853 There is no reason to have stddef.h include be MSVC-only.
2857 2010-10-28 Herczeg Zoltan <zherczeg@webkit.org>
2859 Rubber stamped by Csaba Osztrogonác.
2861 Try to fix interpreter build.
2863 Needed parentheses around assignment to avoid GCC warning after
2864 http://trac.webkit.org/changeset/70703
2866 * interpreter/Interpreter.cpp:
2867 (JSC::Interpreter::privateExecute):
2869 2010-10-28 Peter Varga <pvarga@inf.u-szeged.hu>
2871 Reviewed by Csaba Osztrogonác.
2873 resetAssertionMatches() is an unused function in YARR Interpreter
2874 https://bugs.webkit.org/show_bug.cgi?id=48503
2876 The resetAssertionMatches() function is removed from YARR Interpreter
2877 because it's never called.
2879 * yarr/RegexInterpreter.cpp:
2880 (JSC::Yarr::Interpreter::resetMatches):
2882 2010-10-28 Zoltan Herczeg <zherczeg@webkit.org>
2884 Reviewed by Andreas Kling.
2886 Wrong instruction form for BKPT
2887 https://bugs.webkit.org/show_bug.cgi?id=48427
2889 One '0' is missing from BKPT instruction.
2890 Thanks for Jacob Bramley for reporting this error.
2892 * assembler/ARMAssembler.h:
2894 2010-10-28 Xan Lopez <xlopez@igalia.com>
2896 Try to fix Snow Leopard build.
2898 * jit/JITPropertyAccess.cpp:
2899 (JSC::JIT::testPrototype):
2901 2010-10-28 Xan Lopez <xlopez@igalia.com>
2903 Reviewed by Oliver Hunt.
2905 Do not have two different asCell APIs in JSValue
2906 https://bugs.webkit.org/show_bug.cgi?id=47979
2908 Remove JSCell* asCell(JSValue) in favor of only using
2913 * jit/JITPropertyAccess32_64.cpp:
2914 (JSC::JIT::testPrototype):
2916 (JSC::JITThunks::tryCachePutByID):
2917 (JSC::JITThunks::tryCacheGetByID):
2918 (JSC::DEFINE_STUB_FUNCTION):
2919 * runtime/GetterSetter.h:
2920 (JSC::asGetterSetter):
2921 * runtime/JSByteArray.h:
2924 (JSC::JSCell::getCallData):
2925 (JSC::JSCell::getConstructData):
2926 * runtime/JSString.h:
2927 (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2929 * runtime/JSValue.h:
2930 * runtime/Operations.cpp:
2931 (JSC::jsIsObjectType):
2932 * runtime/Operations.h:
2933 (JSC::normalizePrototypeChain):
2934 * runtime/Protect.h:
2938 2010-10-27 Chao-ying Fu <fu@mips.com>
2940 Reviewed by Oliver Hunt.
2942 Support emit_op_mod() for MIPS on JSVALUE32_64
2943 https://bugs.webkit.org/show_bug.cgi?id=46511
2945 This patch uses MIPS div instructions for op_mod to improve performance.
2947 * jit/JITArithmetic32_64.cpp:
2948 (JSC::JIT::emit_op_mod):
2950 2010-10-27 Brent Fulgham <bfulgham@webkit.org>
2952 Unreviewed build correction.
2954 * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
2955 turned off in the WinCairo port. This isn't supported (yet.)
2957 2010-10-27 Chris Rogers <crogers@google.com>
2959 Reviewed by Chris Marrin.
2961 Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
2962 https://bugs.webkit.org/show_bug.cgi?id=48279
2964 * Configurations/FeatureDefines.xcconfig:
2966 2010-10-27 Brian Weinstein <bweinstein@apple.com>
2973 2010-10-27 Gavin Barraclough <barraclough@apple.com>
2975 Reviewed by Oliver Hunt.
2977 Bug 48365 - Remove output parameters from JITStackFrame
2979 The JIT stub functions presently use the stackframe to provide a couple of additional return values.
2980 * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
2981 * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
2983 Change exception returns such that exceptions are always returned on JSGlobalData::exception.
2984 Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
2986 * JavaScriptCore.xcodeproj/project.pbxproj:
2987 * debugger/Debugger.cpp:
2988 (JSC::evaluateInGlobalCallFrame):
2989 * debugger/DebuggerCallFrame.cpp:
2990 (JSC::DebuggerCallFrame::evaluate):
2991 * interpreter/CachedCall.h:
2992 (JSC::CachedCall::CachedCall):
2993 (JSC::CachedCall::call):
2994 * interpreter/CallFrame.h:
2995 (JSC::ExecState::exception):
2996 * interpreter/Interpreter.cpp:
2997 (JSC::Interpreter::callEval):
2998 (JSC::Interpreter::Interpreter):
2999 (JSC::Interpreter::execute):
3000 (JSC::Interpreter::executeCall):
3001 (JSC::Interpreter::executeConstruct):
3002 (JSC::Interpreter::prepareForRepeatCall):
3003 (JSC::Interpreter::privateExecute):
3004 * interpreter/Interpreter.h:
3006 (JSC::JITCode::execute):
3007 * jit/JITOpcodes.cpp:
3008 (JSC::JIT::emit_op_catch):
3009 * jit/JITOpcodes32_64.cpp:
3010 (JSC::JIT::emit_op_catch):
3012 (JSC::ctiTrampoline):
3014 (JSC::DEFINE_STUB_FUNCTION):
3016 * runtime/ArrayPrototype.cpp:
3017 (JSC::arrayProtoFuncFilter):
3018 (JSC::arrayProtoFuncMap):
3019 (JSC::arrayProtoFuncEvery):
3020 (JSC::arrayProtoFuncForEach):
3021 (JSC::arrayProtoFuncSome):
3022 (JSC::arrayProtoFuncReduce):
3023 (JSC::arrayProtoFuncReduceRight):
3024 * runtime/CallData.cpp:
3026 * runtime/Completion.cpp:
3028 * runtime/ConstructData.cpp:
3030 * runtime/ExceptionHelpers.cpp:
3031 (JSC::createErrorForInvalidGlobalAssignment):
3032 (JSC::throwOutOfMemoryError):
3033 (JSC::throwStackOverflowError):
3034 * runtime/ExceptionHelpers.h:
3035 * runtime/JSArray.cpp:
3036 (JSC::JSArray::sort):
3037 * runtime/JSGlobalObjectFunctions.cpp:
3038 (JSC::globalFuncEval):
3039 * runtime/StringPrototype.cpp:
3040 (JSC::stringProtoFuncReplace):
3042 2010-10-27 Gabor Loki <loki@webkit.org>
3044 Reviewed by Oliver Hunt.
3046 https://bugs.webkit.org/show_bug.cgi?id=48060
3047 Speed up op_jeq_null and op_jneq_null.
3049 For both opcodes the NullTag and UndefinedTag are checked to control the
3050 jump. These values can be simply checked by AboveOrEqual or Below
3051 condition if they are the two highest unsigned integers from JSValue's
3054 * jit/JITOpcodes32_64.cpp:
3055 (JSC::JIT::emit_op_jeq_null):
3056 (JSC::JIT::emit_op_jneq_null):
3057 * runtime/JSValue.h:
3059 2010-10-25 Geoffrey Garen <ggaren@apple.com>
3061 Reviewed by Oliver Hunt.
3063 https://bugs.webkit.org/show_bug.cgi?id=41948
3064 REGRESSION(r60392): Registerfile can be unwound too far following an exception
3066 SunSpider reports no change.
3068 * interpreter/Interpreter.cpp:
3069 (JSC::Interpreter::throwException): Walk the stack to calculate the high
3070 water mark currently in use. It's not safe to assume that the current
3071 CallFrame's high water mark is the highest high water mark because
3072 calls do not always set up at the end of a CallFrame. A large caller
3073 CallFrame can encompass a small callee CallFrame.
3075 * jit/JITOpcodes.cpp:
3076 (JSC::JIT::privateCompileCTINativeCall):
3077 * jit/JITOpcodes32_64.cpp:
3078 (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
3079 in the CallFrame of a host call, like the Interpreter does, instead of
3080 leaving the CodeBlock field uninitialized. The backtracing code requires
3081 a valid CodeBlock field in each CallFrame.
3083 2010-10-27 Gabor Loki <loki@webkit.org>
3085 Reviewed by Csaba Osztrogonác.
3087 Add cmn to branch32(reg, imm) on ARM
3088 https://bugs.webkit.org/show_bug.cgi?id=48062
3090 The conditional comparison can be done with cmn if the imm value is
3091 negative and can fit into the cmn instruction.
3093 * assembler/MacroAssemblerARM.h:
3094 (JSC::MacroAssemblerARM::branch32):
3096 2010-10-26 Oliver Hunt <oliver@apple.com>
3098 Interpreter build fix.
3100 * interpreter/Interpreter.cpp:
3101 (JSC::Interpreter::privateExecute):
3103 2010-10-25 Oliver Hunt <oliver@apple.com>
3105 Reviewed by Gavin Barraclough.
3107 Remove exec and globalData arguments from jsNumber
3108 https://bugs.webkit.org/show_bug.cgi?id=48270
3110 Remove the now unused exec and globalData arguments from jsNumber
3111 and mechanically update all users of jsNumber.
3113 * API/JSValueRef.cpp:
3114 (JSValueMakeNumber):
3115 * bytecompiler/BytecodeGenerator.cpp:
3116 (JSC::BytecodeGenerator::emitLoad):
3117 * bytecompiler/NodesCodegen.cpp:
3118 (JSC::ArrayNode::emitBytecode):
3119 * jit/JITArithmetic.cpp:
3120 (JSC::JIT::emit_op_mod):
3121 * jit/JITArithmetic32_64.cpp:
3122 (JSC::JIT::emit_op_mod):
3123 * jit/JITOpcodes.cpp:
3124 (JSC::JIT::emit_op_jfalse):
3125 (JSC::JIT::emit_op_jtrue):
3127 (JSC::DEFINE_STUB_FUNCTION):
3130 * runtime/Arguments.cpp:
3131 (JSC::Arguments::getOwnPropertySlot):
3132 (JSC::Arguments::getOwnPropertyDescriptor):
3133 * runtime/ArrayConstructor.cpp:
3134 (JSC::ArrayConstructor::ArrayConstructor):
3135 * runtime/ArrayPrototype.cpp:
3136 (JSC::arrayProtoFuncPop):
3137 (JSC::arrayProtoFuncPush):
3138 (JSC::arrayProtoFuncShift):
3139 (JSC::arrayProtoFuncSplice):
3140 (JSC::arrayProtoFuncUnShift):
3141 (JSC::arrayProtoFuncFilter):
3142 (JSC::arrayProtoFuncMap):
3143 (JSC::arrayProtoFuncEvery):
3144 (JSC::arrayProtoFuncForEach):
3145 (JSC::arrayProtoFuncSome):
3146 (JSC::arrayProtoFuncReduce):
3147 (JSC::arrayProtoFuncReduceRight):
3148 (JSC::arrayProtoFuncIndexOf):
3149 (JSC::arrayProtoFuncLastIndexOf):
3150 * runtime/BooleanConstructor.cpp:
3151 (JSC::BooleanConstructor::BooleanConstructor):
3152 * runtime/CachedTranscendentalFunction.h:
3153 (JSC::CachedTranscendentalFunction::operator()):
3154 * runtime/DateConstructor.cpp:
3155 (JSC::DateConstructor::DateConstructor):
3159 * runtime/DateInstance.cpp:
3160 (JSC::DateInstance::DateInstance):
3161 * runtime/DatePrototype.cpp:
3162 (JSC::dateProtoFuncGetFullYear):
3163 (JSC::dateProtoFuncGetUTCFullYear):
3164 (JSC::dateProtoFuncGetMonth):
3165 (JSC::dateProtoFuncGetUTCMonth):
3166 (JSC::dateProtoFuncGetDate):
3167 (JSC::dateProtoFuncGetUTCDate):
3168 (JSC::dateProtoFuncGetDay):
3169 (JSC::dateProtoFuncGetUTCDay):
3170 (JSC::dateProtoFuncGetHours):
3171 (JSC::dateProtoFuncGetUTCHours):
3172 (JSC::dateProtoFuncGetMinutes):
3173 (JSC::dateProtoFuncGetUTCMinutes):
3174 (JSC::dateProtoFuncGetSeconds):
3175 (JSC::dateProtoFuncGetUTCSeconds):
3176 (JSC::dateProtoFuncGetMilliSeconds):
3177 (JSC::dateProtoFuncGetUTCMilliseconds):
3178 (JSC::dateProtoFuncGetTimezoneOffset):
3179 (JSC::dateProtoFuncSetTime):
3180 (JSC::setNewValueFromTimeArgs):
3181 (JSC::setNewValueFromDateArgs):
3182 (JSC::dateProtoFuncSetYear):
3183 (JSC::dateProtoFuncGetYear):
3184 * runtime/Error.cpp:
3185 (JSC::addErrorSourceInfo):
3186 (JSC::addErrorDivotInfo):
3187 * runtime/ErrorConstructor.cpp:
3188 (JSC::ErrorConstructor::ErrorConstructor):
3189 * runtime/FunctionConstructor.cpp:
3190 (JSC::FunctionConstructor::FunctionConstructor):
3191 * runtime/FunctionPrototype.cpp:
3192 (JSC::FunctionPrototype::FunctionPrototype):
3193 * runtime/JSArray.cpp:
3194 (JSC::JSArray::getOwnPropertySlot):
3195 (JSC::JSArray::getOwnPropertyDescriptor):
3196 * runtime/JSByteArray.cpp:
3197 (JSC::JSByteArray::JSByteArray):
3198 * runtime/JSByteArray.h:
3199 (JSC::JSByteArray::getIndex):
3200 * runtime/JSFunction.cpp:
3201 (JSC::JSFunction::JSFunction):
3202 (JSC::JSFunction::lengthGetter):
3203 (JSC::JSFunction::getOwnPropertyDescriptor):
3204 * runtime/JSGlobalObject.cpp:
3205 (JSC::JSGlobalObject::reset):
3206 * runtime/JSGlobalObjectFunctions.cpp:
3207 (JSC::globalFuncParseInt):
3208 (JSC::globalFuncParseFloat):
3209 * runtime/JSNumberCell.h:
3210 (JSC::JSValue::JSValue):
3212 (JSC::JSValue::toJSNumber):
3213 * runtime/JSONObject.cpp:
3214 (JSC::unwrapBoxedPrimitive):
3215 (JSC::PropertyNameForFunctionCall::value):
3216 (JSC::JSONStringify):
3217 * runtime/JSString.cpp:
3218 (JSC::JSString::getStringPropertyDescriptor):
3219 * runtime/JSString.h:
3220 (JSC::JSString::getStringPropertySlot):
3221 * runtime/JSValue.h:
3222 (JSC::jsDoubleNumber):
3225 (JSC::JSValue::JSValue):
3226 (JSC::JSValue::toJSNumber):
3227 * runtime/LiteralParser.cpp:
3228 (JSC::LiteralParser::parse):
3229 * runtime/MathObject.cpp:
3230 (JSC::MathObject::MathObject):
3231 (JSC::mathProtoFuncAbs):
3232 (JSC::mathProtoFuncACos):
3233 (JSC::mathProtoFuncASin):
3234 (JSC::mathProtoFuncATan):
3235 (JSC::mathProtoFuncATan2):
3236 (JSC::mathProtoFuncCeil):
3237 (JSC::mathProtoFuncCos):
3238 (JSC::mathProtoFuncExp):
3239 (JSC::mathProtoFuncFloor):
3240 (JSC::mathProtoFuncLog):
3241 (JSC::mathProtoFuncMax):
3242 (JSC::mathProtoFuncMin):
3243 (JSC::mathProtoFuncPow):
3244 (JSC::mathProtoFuncRandom):
3245 (JSC::mathProtoFuncRound):
3246 (JSC::mathProtoFuncSin):
3247 (JSC::mathProtoFuncSqrt):
3248 (JSC::mathProtoFuncTan):
3249 * runtime/NativeErrorConstructor.cpp:
3250 (JSC::NativeErrorConstructor::NativeErrorConstructor):
3251 * runtime/NumberConstructor.cpp:
3252 (JSC::NumberConstructor::NumberConstructor):
3253 (JSC::numberConstructorNaNValue):
3254 (JSC::numberConstructorNegInfinity):
3255 (JSC::numberConstructorPosInfinity):
3256 (JSC::numberConstructorMaxValue):
3257 (JSC::numberConstructorMinValue):
3258 (JSC::constructWithNumberConstructor):
3259 (JSC::callNumberConstructor):
3260 * runtime/NumberPrototype.cpp:
3261 (JSC::NumberPrototype::NumberPrototype):
3262 * runtime/ObjectConstructor.cpp:
3263 (JSC::ObjectConstructor::ObjectConstructor):
3264 * runtime/Operations.cpp:
3265 (JSC::jsAddSlowCase):
3266 * runtime/Operations.h:
3268 * runtime/PrototypeFunction.cpp:
3269 (JSC::PrototypeFunction::PrototypeFunction):
3270 * runtime/RegExpConstructor.cpp:
3271 (JSC::RegExpConstructor::RegExpConstructor):
3272 (JSC::RegExpMatchesArray::fillArrayInstance):
3273 * runtime/RegExpObject.cpp:
3274 (JSC::regExpObjectLastIndex):
3275 * runtime/StringConstructor.cpp:
3276 (JSC::StringConstructor::StringConstructor):
3277 * runtime/StringPrototype.cpp:
3278 (JSC::StringPrototype::StringPrototype):
3279 (JSC::stringProtoFuncReplace):
3280 (JSC::stringProtoFuncCharCodeAt):
3281 (JSC::stringProtoFuncIndexOf):
3282 (JSC::stringProtoFuncLastIndexOf):
3283 (JSC::stringProtoFuncSearch):
3284 (JSC::stringProtoFuncLocaleCompare):
3286 2010-10-25 David Tapuska <dtapuska@rim.com>
3288 Reviewed by David Kilzer.
3290 Enable VFP if our compiler settings indicated we had a hardware
3293 https://bugs.webkit.org/show_bug.cgi?id=46096
3295 * assembler/MacroAssemblerARM.cpp:
3296 (JSC::isVFPPresent):
3298 2010-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
3300 Unreviewed, rolling out r70451.
3301 http://trac.webkit.org/changeset/70451
3302 https://bugs.webkit.org/show_bug.cgi?id=48249
3304 Broke set-unloaded-frame-location.html under Qt (Requested by
3308 * JavaScriptCore.gypi:
3309 * JavaScriptCore.xcodeproj/project.pbxproj:
3310 * wtf/text/TextPosition.h: Removed.
3312 2010-10-25 Patrick Gansterer <paroga@webkit.org>
3314 Reviewed by David Kilzer.
3316 Replace _countof with WTF_ARRAY_LENGTH
3317 https://bugs.webkit.org/show_bug.cgi?id=48229
3321 2010-10-25 Peter Rybin <peter.rybin@gmail.com>
3323 Reviewed by Adam Barth.
3325 HTML parser should provide script column position within HTML document to JavaScript engine
3326 https://bugs.webkit.org/show_bug.cgi?id=45271
3328 Adds TextPosition* classes -- a structure that stores line/column/generation
3329 level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
3330 wrappers that emphasize whether int number is used as zero-based or
3334 * JavaScriptCore.gypi:
3335 * JavaScriptCore.xcodeproj/project.pbxproj:
3336 * wtf/text/TextPosition.h: Added.
3337 (WTF::TextPosition::TextPosition):
3338 (WTF::TextPosition::minimumPosition):
3339 (WTF::TextPosition::belowRangePosition):
3340 (WTF::ZeroBasedNumber::fromZeroBasedInt):
3341 (WTF::ZeroBasedNumber::ZeroBasedNumber):
3342 (WTF::ZeroBasedNumber::zeroBasedInt):
3343 (WTF::ZeroBasedNumber::base):
3344 (WTF::ZeroBasedNumber::belowBase):
3345 (WTF::OneBasedNumber::fromOneBasedInt):
3346 (WTF::OneBasedNumber::OneBasedNumber):
3347 (WTF::OneBasedNumber::oneBasedInt):
3348 (WTF::OneBasedNumber::convertAsZeroBasedInt):
3349 (WTF::OneBasedNumber::convertToZeroBased):
3350 (WTF::OneBasedNumber::base):
3351 (WTF::OneBasedNumber::belowBase):
3352 (WTF::toZeroBasedTextPosition):
3353 (WTF::toOneBasedTextPosition):
3354 (WTF::ZeroBasedNumber::convertToOneBased):
3356 2010-10-24 Kwang Yul Seo <skyul@company100.net>
3358 Reviewed by David Kilzer.
3360 Check endianness with __BIG_ENDIAN in RVCT.
3361 https://bugs.webkit.org/show_bug.cgi?id=46122
3363 RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
3367 2010-10-24 Dan Bernstein <mitz@apple.com>
3369 Rubber-stamped by Dave Kilzer.
3371 Removed empty directories.
3373 * JavaScriptCore: Removed.
3374 * JavaScriptCore/runtime: Removed.
3376 2010-10-24 Patrick Gansterer <paroga@webkit.org>
3378 Unreviewed, fix typo of last build fix.
3382 2010-10-24 Patrick Gansterer <paroga@webkit.org>
3384 Unreviewed build fix for chromium.
3386 * wtf/DateMath.cpp: Added missing include.
3388 2010-10-24 Patrick Gansterer <paroga@webkit.org>
3390 Reviewed by David Kilzer.
3392 Add WTF_ARRAY_LENGTH macro to WTF
3393 https://bugs.webkit.org/show_bug.cgi?id=32828
3395 Unify the different implementations and usages.
3397 * interpreter/Interpreter.cpp:
3398 (JSC::Interpreter::privateExecute):
3399 * runtime/DatePrototype.cpp:
3400 (JSC::formatLocaleDate):
3401 * runtime/JSGlobalObject.cpp:
3402 (JSC::JSGlobalObject::reset):
3403 * runtime/JSONObject.cpp:
3404 (JSC::Stringifier::appendQuotedString):
3405 (JSC::Stringifier::toJSON):
3406 (JSC::Stringifier::appendStringifiedValue):
3407 * runtime/UString.cpp:
3408 (JSC::UString::number):
3410 (WTF::parseDateFromNullTerminatedCharacters):
3411 * wtf/StdLibExtras.h:
3413 2010-10-24 Dirk Schulze <krit@webkit.org>
3415 Reviewed by Nikolas Zimmermann.
3417 Filter example Chiseled from SVG Wow! is slow
3418 https://bugs.webkit.org/show_bug.cgi?id=48174
3420 Added 'using WTF::ByteArray;' at the end of ByteArray.h
3424 2010-10-24 Patrick Gansterer <paroga@webkit.org>
3426 Reviewed by David Kilzer.
3428 Inline WTF::bitwise_cast and fix style
3429 https://bugs.webkit.org/show_bug.cgi?id=48208
3431 * wtf/StdLibExtras.h:
3432 (WTF::bitwise_cast):
3435 2010-10-23 Xan Lopez <xlopez@igalia.com>
3437 Reviewed by Sam Weinig.
3439 Unify globalData APIs
3440 https://bugs.webkit.org/show_bug.cgi?id=47969
3442 Make JSGlobalObject::globalData return a reference and adapt
3443 callers. This unifies the API with the existing
3444 CallFrame::globalData, which also returns a reference.
3446 * debugger/Debugger.cpp:
3447 (JSC::evaluateInGlobalCallFrame):
3448 * interpreter/CallFrame.h:
3449 * interpreter/Interpreter.cpp:
3450 (JSC::Interpreter::dumpRegisters):
3453 * parser/JSParser.cpp:
3455 * parser/Parser.cpp:
3456 (JSC::Parser::parse):
3458 (JSC::Parser::parse):
3459 * runtime/Error.cpp:
3461 (JSC::createEvalError):
3462 (JSC::createRangeError):
3463 (JSC::createReferenceError):
3464 (JSC::createSyntaxError):
3465 (JSC::createTypeError):
3466 (JSC::createURIError):
3467 * runtime/FunctionConstructor.cpp:
3468 (JSC::constructFunction):
3469 * runtime/JSGlobalObject.cpp:
3470 (JSC::JSGlobalObject::~JSGlobalObject):
3471 (JSC::JSGlobalObject::markChildren):
3472 * runtime/JSGlobalObject.h:
3473 (JSC::JSGlobalObject::globalData):
3475 2010-10-23 Dimitri Glazkov <dglazkov@chromium.org>
3477 Unreviewed, rolling out r70369.
3478 http://trac.webkit.org/changeset/70369
3479 https://bugs.webkit.org/show_bug.cgi?id=47974
3481 Caused weird artifacts in expected results.
3485 2010-10-23 Martin Robinson <mrobinson@igalia.com>
3487 Reviewed by Xan Lopez.
3489 Crashes randomly in cairo_scaled_font_destroy
3490 https://bugs.webkit.org/show_bug.cgi?id=46794
3492 Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
3493 goes away this should probably be handled in the future via some special
3494 hooks in RefCounted (or its contained type).
3496 * wtf/PlatformRefPtr.h:
3497 (WTF::PlatformRefPtr::~PlatformRefPtr):
3498 (WTF::PlatformRefPtr::clear):
3501 2010-10-22 Adam Roben <aroben@apple.com>
3503 Remove the QuartzCorePresent.h mechanism
3505 This header was used to detect whether QuartzCore headers were present
3506 on the system. Everyone should have these headers now so we no longer
3509 Reviewed by Sam Weinig.
3511 * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
3512 code to generate QuartzCorePresent.h.
3514 * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
3515 collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
3517 2010-10-22 Adam Barth <abarth@webkit.org>
3519 Unreviewed, rolling out r70290.
3520 http://trac.webkit.org/changeset/70290
3521 https://bugs.webkit.org/show_bug.cgi?id=48111
3523 Undelete Android build files.
3525 * Android.mk: Added.
3527 2010-10-22 Zoltan Herczeg <zherczeg@webkit.org>
3529 Reviewed by Csaba Osztrogonác.
3531 JSC interpreter regressions after r69940
3532 https://bugs.webkit.org/show_bug.cgi?id=47839
3534 Wrong "if": It should test whether the result exists,
3535 and not the opposite. It is an interpreter bug, hence
3536 the bots does not capture it.
3538 * interpreter/Interpreter.cpp:
3539 (JSC::Interpreter::resolveBase):
3541 2010-10-21 Adam Barth <abarth@webkit.org>
3543 Reviewed by David Levin.
3545 Remove Android build system
3546 https://bugs.webkit.org/show_bug.cgi?id=48111
3548 * Android.mk: Removed.
3550 2010-10-21 Kwang Yul Seo <skyul@company100.net>
3552 Reviewed by Kent Tamura.
3554 [BREWMP] Add a String constructor which takes AECHAR*
3555 https://bugs.webkit.org/show_bug.cgi?id=45043
3557 Add String(const AECHAR*) constructor for convenience.
3559 * wtf/text/WTFString.h:
3561 2010-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
3563 Reviewed by Martin Robinson.
3565 [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
3566 https://bugs.webkit.org/show_bug.cgi?id=47896
3568 * wtf/gobject/GTypedefs.h:
3570 2010-10-21 Adam Barth <abarth@webkit.org>
3572 Unreviewed, rolling out r70174.
3573 http://trac.webkit.org/changeset/70174
3574 https://bugs.webkit.org/show_bug.cgi?id=41948
3576 This patch reverts a change that causes
3577 http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
3579 * interpreter/Interpreter.cpp:
3580 (JSC::Interpreter::throwException):
3582 2010-10-20 Simon Fraser <simon.fraser@apple.com>
3586 * wtf/CMakeLists.txt:
3588 2010-10-20 Simon Fraser <simon.fraser@apple.com>
3590 Fix Windows build: export needed symbols.
3592 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3594 2010-10-19 Simon Fraser <simon.fraser@apple.com>
3596 Reviewed by Gavin Barraclough.
3598 https://bugs.webkit.org/show_bug.cgi?id=47851
3600 Add methods to DecimalNumber to return the buffer length
3601 required for decimal and exponential output.
3603 Make some of the DecimalNumber code non-inline (no
3604 effect on Sunspider), adding DecimalNumber.cpp to various
3607 Make some DecimalNumber methods 'const'.
3610 * Android.v8.wtf.mk:
3612 * JavaScriptCore.exp:
3613 * JavaScriptCore.gypi:
3614 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3615 * JavaScriptCore.xcodeproj/project.pbxproj:
3616 * runtime/NumberPrototype.cpp:
3617 (JSC::numberProtoFuncToExponential):
3618 (JSC::numberProtoFuncToFixed):
3619 (JSC::numberProtoFuncToPrecision):
3620 * wtf/DecimalNumber.cpp: Added.
3621 (WTF::DecimalNumber::bufferLengthForStringDecimal):
3622 (WTF::DecimalNumber::bufferLengthForStringExponential):
3623 (WTF::DecimalNumber::toStringDecimal):
3624 (WTF::DecimalNumber::toStringExponential):
3625 * wtf/DecimalNumber.h:
3626 (WTF::DecimalNumber::sign):
3627 (WTF::DecimalNumber::exponent):
3628 (WTF::DecimalNumber::significand):
3629 (WTF::DecimalNumber::precision):
3635 2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
3637 Unreviewed, rolling out r70165.
3638 http://trac.webkit.org/changeset/70165
3639 https://bugs.webkit.org/show_bug.cgi?id=48007
3641 It broke tests on Qt bot (Requested by Ossy on #webkit).
3644 * JavaScriptCore.gypi:
3645 * JavaScriptCore.xcodeproj/project.pbxproj:
3646 * wtf/text/TextPosition.h: Removed.
3648 2010-10-20 Brian Weinstein <bweinstein@apple.com>
3650 Reviewed by Adam Roben.
3652 Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
3653 step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
3655 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
3656 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3658 2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
3660 Unreviewed, fixing the Win build.
3662 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3664 2010-10-20 Geoffrey Garen <ggaren@apple.com>
3666 Reviewed by Darin Adler.
3668 https://bugs.webkit.org/show_bug.cgi?id=41948
3669 REGRESSION(r60392): Registerfile can be unwound too far following an exception
3671 * interpreter/Interpreter.cpp:
3672 (JSC::Interpreter::throwException): Walk the stack to calculate the high
3673 water mark currently in use. It's not safe to assume that the current
3674 CallFrame's high water mark is the highest high water mark because
3675 calls do not always set up at the end of a CallFrame. A large caller
3676 CallFrame can encompass a small callee CallFrame.
3678 2010-10-20 Peter Rybin <peter.rybin@gmail.com>
3680 Reviewed by Adam Barth.
3682 HTML parser should provide script column position within HTML document to JavaScript engine
3683 https://bugs.webkit.org/show_bug.cgi?id=45271
3685 Adds TextPosition* classes -- a structure that stores line/column/generation
3686 level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
3687 wrappers that emphasize whether int number is used as zero-based or
3691 * JavaScriptCore.gypi:
3692 * JavaScriptCore.xcodeproj/project.pbxproj:
3693 * wtf/text/TextPosition.h: Added.
3694 (WTF::TextPosition::TextPosition):
3695 (WTF::TextPosition::minimumPosition):
3696 (WTF::TextPosition::belowRangePosition):
3697 (WTF::ZeroBasedNumber::fromZeroBasedInt):
3698 (WTF::ZeroBasedNumber::ZeroBasedNumber):
3699 (WTF::ZeroBasedNumber::zeroBasedInt):
3700 (WTF::ZeroBasedNumber::base):
3701 (WTF::ZeroBasedNumber::belowBase):
3702 (WTF::OneBasedNumber::fromOneBasedInt):
3703 (WTF::OneBasedNumber::OneBasedNumber):
3704 (WTF::OneBasedNumber::oneBasedInt):
3705 (WTF::OneBasedNumber::convertAsZeroBasedInt):
3706 (WTF::OneBasedNumber::convertToZeroBased):
3707 (WTF::OneBasedNumber::base):
3708 (WTF::OneBasedNumber::belowBase):
3709 (WTF::toZeroBasedTextPosition):
3710 (WTF::toOneBasedTextPosition):
3711 (WTF::ZeroBasedNumber::convertToOneBased):
3713 2010-10-19 Kwang Yul Seo <skyul@company100.net>
3715 Reviewed by David Kilzer.
3717 [BREWMP] Turn off JIT for simulator build
3718 https://bugs.webkit.org/show_bug.cgi?id=47937
3720 We don't need to test x86 JIT.
3724 2010-10-19 Oliver Hunt <oliver@apple.com>
3726 Reviewed by Geoffrey Garen.
3728 Remove support for JSVALUE32 from JSC
3729 https://bugs.webkit.org/show_bug.cgi?id=47948
3731 Remove all the code for supporting JSVALUE32 from JSC.
3734 (JSC::JIT::privateCompileMainPass):
3735 (JSC::JIT::privateCompileSlowCases):
3737 * jit/JITArithmetic.cpp:
3738 (JSC::JIT::emit_op_lshift):
3739 (JSC::JIT::emitSlow_op_lshift):
3740 (JSC::JIT::emit_op_rshift):
3741 (JSC::JIT::emitSlow_op_rshift):
3742 (JSC::JIT::emit_op_urshift):
3743 (JSC::JIT::emitSlow_op_urshift):
3744 (JSC::JIT::emit_op_jnless):
3745 (JSC::JIT::emitSlow_op_jnless):
3746 (JSC::JIT::emit_op_jless):
3747 (JSC::JIT::emitSlow_op_jless):
3748 (JSC::JIT::emit_op_jlesseq):
3749 (JSC::JIT::emitSlow_op_jlesseq):
3750 (JSC::JIT::emit_op_bitand):
3751 (JSC::JIT::emit_op_post_inc):
3752 (JSC::JIT::emit_op_post_dec):
3753 (JSC::JIT::emit_op_pre_inc):
3754 (JSC::JIT::emit_op_pre_dec):
3755 (JSC::JIT::emit_op_mod):
3756 (JSC::JIT::emitSlow_op_mod):
3758 * jit/JITInlineMethods.h:
3759 (JSC::JIT::emitGetFromCallFrameHeaderPtr):
3760 (JSC::JIT::emitGetFromCallFrameHeader32):
3761 * jit/JITOpcodes.cpp:
3762 (JSC::JIT::emit_op_loop_if_lesseq):
3763 (JSC::JIT::emit_op_bitnot):
3764 (JSC::JIT::emit_op_next_pname):
3765 * jit/JITPropertyAccess.cpp:
3766 (JSC::JIT::emit_op_get_by_val):
3767 (JSC::JIT::emit_op_put_by_val):
3769 * jit/JSInterfaceJIT.h:
3770 * jit/SpecializedThunkJIT.h:
3771 (JSC::SpecializedThunkJIT::returnDouble):
3772 (JSC::SpecializedThunkJIT::tagReturnAsInt32):
3773 * jit/ThunkGenerators.cpp:
3774 (JSC::sqrtThunkGenerator):
3775 (JSC::powThunkGenerator):
3776 * runtime/Collector.cpp:
3777 (JSC::isPossibleCell):
3780 * runtime/JSGlobalData.cpp:
3781 (JSC::JSGlobalData::JSGlobalData):
3782 * runtime/JSGlobalData.h:
3783 * runtime/JSGlobalObject.h:
3784 (JSC::Structure::prototypeForLookup):
3785 * runtime/JSImmediate.h:
3786 (JSC::reinterpretIntptrToDouble):
3787 (JSC::JSImmediate::isIntegerNumber):
3788 (JSC::JSImmediate::isDouble):
3789 (JSC::JSImmediate::areBothImmediateIntegerNumbers):
3790 (JSC::JSImmediate::makeDouble):
3791 (JSC::JSImmediate::doubleValue):
3792 (JSC::JSImmediate::toBoolean):
3793 (JSC::JSImmediate::fromNumberOutsideIntegerRange):
3794 (JSC::JSImmediate::from):
3795 (JSC::JSImmediate::toDouble):
3796 (JSC::JSFastMath::rightShiftImmediateNumbers):
3797 * runtime/JSNumberCell.cpp:
3798 * runtime/JSNumberCell.h:
3799 * runtime/JSObject.h:
3800 (JSC::JSObject::JSObject):
3801 * runtime/JSValue.h:
3802 * runtime/NumberObject.h:
3805 2010-10-19 Csaba Osztrogonác <ossy@webkit.org>
3807 Reviewed by Geoffrey Garen.
3809 BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
3810 https://bugs.webkit.org/show_bug.cgi?id=47920
3812 * bytecompiler/BytecodeGenerator.cpp:
3813 (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
3815 2010-10-19 Kwang Yul Seo <skyul@company100.net>
3817 Reviewed by David Kilzer.
3819 RVCT fails to compile DateMath.cpp due to overloaded function pow
3820 https://bugs.webkit.org/show_bug.cgi?id=47844
3822 Choose std::pow(double, double) among multiple overloaded pow functions
3823 to fix build for RVCT.
3826 (WTF::parseES5DateFromNullTerminatedCharacters):
3828 2010-10-19 Patrick Gansterer <paroga@webkit.org>
3830 Reviewed by David Kilzer.
3832 Use UChar instead of wchar_t in UnicodeWinCE
3833 https://bugs.webkit.org/show_bug.cgi?id=47904
3835 Make UnicodeWinCE more portable, so we can use it for other ports too.
3837 * wtf/unicode/wince/UnicodeWinCE.cpp:
3838 (WTF::Unicode::toLower):
3839 (WTF::Unicode::toUpper):
3840 (WTF::Unicode::foldCase):
3841 (WTF::Unicode::isPrintableChar):
3842 (WTF::Unicode::isSpace):
3843 (WTF::Unicode::isLetter):
3844 (WTF::Unicode::isUpper):
3845 (WTF::Unicode::isLower):
3846 (WTF::Unicode::isDigit):
3847 (WTF::Unicode::isPunct):
3848 (WTF::Unicode::isAlphanumeric):
3849 (WTF::Unicode::toTitleCase):
3850 (WTF::Unicode::mirroredChar):
3851 (WTF::Unicode::digitValue):
3852 * wtf/unicode/wince/UnicodeWinCE.h:
3853 (WTF::Unicode::isSeparatorSpace):
3854 (WTF::Unicode::isHighSurrogate):
3855 (WTF::Unicode::isLowSurrogate):
3856 (WTF::Unicode::umemcasecmp):
3857 (WTF::Unicode::surrogateToUcs4):
3859 2010-10-19 Patrick Gansterer <paroga@webkit.org>
3861 Reviewed by Andreas Kling.
3863 Fix style of UnicodeWinCE
3864 https://bugs.webkit.org/show_bug.cgi?id=47818
3866 * wtf/unicode/wince/UnicodeWinCE.cpp:
3867 (WTF::Unicode::toLower):
3868 (WTF::Unicode::toUpper):
3869 * wtf/unicode/wince/UnicodeWinCE.h:
3871 2010-10-18 Xan Lopez <xlopez@igalia.com>
3873 Reviewed by Martin Robinson.
3875 * GNUmakefile.am: add missing file.
3877 2010-10-18 Oliver Hunt <oliver@apple.com>
3879 Reviewed by Sam Weinig.
3881 Strict mode: Functions created with the function constructor don't implement strict mode semantics
3882 https://bugs.webkit.org/show_bug.cgi?id=47860
3884 When creating the FunctionExecutable for a new function the function constructor
3885 was always passing false for whether or not a function was strict, rather than
3886 using the information from the freshly parsed function itself.
3888 * runtime/Executable.cpp:
3889 (JSC::FunctionExecutable::fromGlobalCode):
3891 2010-10-18 Oliver Hunt <oliver@apple.com>
3893 Reviewed by Darin Adler.
3895 Strict mode: |this| should be undefined if it is not explicitly provided
3896 https://bugs.webkit.org/show_bug.cgi?id=47833
3898 To make strict mode behave correctly we want to pass undefined instead of null
3899 as the default this value. This has no impact on behaviour outside of strict
3900 mode as both values are replaced with the global object if necessary.
3902 * bytecompiler/NodesCodegen.cpp:
3903 (JSC::FunctionCallValueNode::emitBytecode):
3904 (JSC::FunctionCallResolveNode::emitBytecode):
3905 (JSC::CallFunctionCallDotNode::emitBytecode):
3906 (JSC::ApplyFunctionCallDotNode::emitBytecode):
3909 2010-10-18 Darin Adler <darin@apple.com>
3911 Reviewed by Anders Carlsson.
3913 Make a nullptr that works with OwnPtr and RefPtr
3914 https://bugs.webkit.org/show_bug.cgi?id=47756
3916 * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
3918 * wtf/NullPtr.h: Added.
3920 * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
3921 * wtf/OwnPtr.h: Ditto.
3922 * wtf/PassOwnArrayPtr.h: Ditto.
3923 * wtf/PassOwnPtr.h: Ditto.
3924 * wtf/PassRefPtr.h: Ditto.
3925 * wtf/RefPtr.h: Ditto.
3926 * wtf/RetainPtr.h: Ditto.
3928 2010-10-18 Oliver Hunt <oliver@apple.com>
3930 Reviewed by Sam Weinig.
3932 Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
3933 https://bugs.webkit.org/show_bug.cgi?id=47826
3935 There's no guarantee that |this| will be a cell in a strict mode function, so
3936 don't claim that it is.
3938 * bytecode/CodeBlock.h:
3939 (JSC::CodeBlock::isKnownNotImmediate):
3941 2010-10-18 Zoltan Herczeg <zherczeg@webkit.org>
3943 Reviewed by Oliver Hunt.
3945 if (0) throw "x" ; else { } throws parse error after r69906
3946 https://bugs.webkit.org/show_bug.cgi?id=47807
3948 r69906 introduced a bug: the semicolon is not parsed after a throw
3949 expression anymore. Thus, the semicolon terminates the "if" parsing
3950 in the example above, and the else token results a parse error.
3952 * parser/JSParser.cpp:
3953 (JSC::JSParser::parseThrowStatement):
3955 2010-10-18 Peter Varga <pvarga@inf.u-szeged.hu>
3957 Reviewed by Andreas Kling.
3959 Remove some unnecessary lines of code from Parser.cpp
3960 https://bugs.webkit.org/show_bug.cgi?id=47816
3962 * parser/Parser.cpp:
3964 2010-10-18 Xan Lopez <xlopez@igalia.com>
3966 Reviewed by Csaba Osztrogonác.
3968 Build broken with JIT disabled
3969 https://bugs.webkit.org/show_bug.cgi?id=47801
3971 This is a regression caused by r69940.
3973 * interpreter/Interpreter.cpp:
3974 (JSC::Interpreter::resolveBase):
3976 2010-10-18 Zoltan Horvath <zoltan@webkit.org>
3978 Reviewed by Darin Adler.
3980 Change FastAllocBase implementation into a macro
3981 https://bugs.webkit.org/show_bug.cgi?id=42998
3983 It was investigated in bug #33896 that inheriting classes from FastAllocBase
3984 can result in objects getting larger which leads to memory regressions.
3985 Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
3987 * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
3989 2010-10-17 Oliver Hunt <oliver@apple.com>
3991 Reviewed by Sam Weinig.
3993 Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
3994 https://bugs.webkit.org/show_bug.cgi?id=47791
3996 Simple fix, check for arguments in addition to eval.
3998 * parser/JSParser.cpp:
3999 (JSC::JSParser::parseUnaryExpression):
4001 2010-10-17 Oliver Hunt <oliver@apple.com>
4003 Reviewed by Sam Weinig.
4005 Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
4006 https://bugs.webkit.org/show_bug.cgi?id=47788
4008 Fixing this required a couple of changes:
4009 * resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
4010 this allows us to throw an exception when we're doing a completely generic resolve for
4011 assignment, and that assignment would create a new global.
4012 * There is a new opcode 'op_ensure_property_exists' that is used to determine whether
4013 the property being assigned to already exists on the global object. This currently
4014 has no caching, but such caching could be added relatively trivially. It is only used
4015 in the case where we know that a property will be placed on the global object, and
4016 we cannot verify that the property already exists.
4018 In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
4019 than making op_resolve_base have an additional runtime branch.
4021 There's also a new helper function to create the exception for the invalid assignment.
4023 * bytecode/CodeBlock.cpp:
4024 (JSC::CodeBlock::dump):
4025 * bytecode/Opcode.h:
4026 * bytecompiler/BytecodeGenerator.cpp:
4027 (JSC::BytecodeGenerator::emitResolveBase):
4028 (JSC::BytecodeGenerator::emitResolveBaseForPut):
4029 * bytecompiler/BytecodeGenerator.h:
4030 * bytecompiler/NodesCodegen.cpp:
4031 (JSC::AssignResolveNode::emitBytecode):
4032 (JSC::ForInNode::emitBytecode):
4033 * interpreter/Interpreter.cpp:
4034 (JSC::Interpreter::resolveBase):
4035 (JSC::Interpreter::privateExecute):
4037 (JSC::JIT::privateCompileMainPass):
4039 * jit/JITOpcodes.cpp:
4040 (JSC::JIT::emit_op_resolve_base):
4041 (JSC::JIT::emit_op_ensure_property_exists):
4042 * jit/JITOpcodes32_64.cpp:
4043 (JSC::JIT::emit_op_resolve_base):
4044 (JSC::JIT::emit_op_ensure_property_exists):
4046 (JSC::DEFINE_STUB_FUNCTION):
4048 * parser/JSParser.cpp:
4049 (JSC::JSParser::parseProgram):
4050 * runtime/ExceptionHelpers.cpp:
4051 (JSC::createErrorForInvalidGlobalAssignment):
4052 * runtime/ExceptionHelpers.h:
4053 * runtime/Operations.h:
4056 2010-10-17 Simon Fraser <simon.fraser@apple.com>
4058 First part of fix for Windows build failure. Will wait for the
4059 next set of link errors to determine the mangled forms for dtoaRoundSF
4062 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4064 2010-10-17 Simon Fraser <simon.fraser@apple.com>
4066 Reviewed by Nikolas Zimmermann.
4068 Very large and small numbers fail to round-trip through CSS
4069 https://bugs.webkit.org/show_bug.cgi?id=20674
4071 New exports required to use DecimalNumber in WebCore.
4073 * JavaScriptCore.exp:
4074 * JavaScriptCore.xcodeproj/project.pbxproj:
4076 2010-10-16 Kyusun Kim <maniagoon@company100.net>
4078 Reviewed by Alexey Proskuryakov.
4080 Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
4081 https://bugs.webkit.org/show_bug.cgi?id=47758
4083 * wtf/CurrentTime.h:
4086 2010-10-16 Patrick Gansterer <paroga@webkit.org>
4088 Reviewed by Adam Barth.
4090 Rename StringHasherFunctions.h to StringHasher.h
4091 https://bugs.webkit.org/show_bug.cgi?id=47200
4093 Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
4096 * JavaScriptCore.gypi:
4097 * JavaScriptCore.xcodeproj/project.pbxproj:
4098 * wtf/StringHashFunctions.h: Removed.
4099 * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
4100 * wtf/text/StringHash.h:
4101 * wtf/text/StringImpl.h:
4103 2010-10-15 Oliver Hunt <oliver@apple.com>
4105 Reviewed by Sam Weinig.
4107 Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
4108 https://bugs.webkit.org/show_bug.cgi?id=47762
4110 The old YACC parser depended on the lexer for some classes of semicolon insertion.
4111 The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
4112 on its own the net result is a spurious semicolon in the input stream. This can result
4113 in incorrect parsing in some cases:
4119 Would result in a parse failure as the output from the lexer is essentially
4125 So the second semicolon is interpreted as a empty statement, which terminates the if,
4126 making the else an error.
4129 * parser/JSParser.cpp:
4130 (JSC::JSParser::parseThrowStatement):
4131 Parsing of throw statement was wrong, and only worked due to the weird behaviour
4135 Remove bogus semicolon insertion from the newline handling
4137 2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
4139 Reviewed by Dirk Schulze.
4141 Replace some String::format() usages by StringConcatenate in WebKit
4142 https://bugs.webkit.org/show_bug.cgi?id=47714
4144 * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
4146 2010-10-15 Ilya Tikhonovsky <loislo@chromium.org>
4148 Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
4150 * yarr/RegexInterpreter.cpp:
4151 (JSC::Yarr::ByteCompiler::emitDisjunction):
4153 2010-10-15 Peter Varga <pvarga@inf.u-szeged.hu>
4155 Reviewed by Gavin Barraclough.
4157 The parenthetical assertion checking isn't working in some cases with YARR
4159 https://bugs.webkit.org/show_bug.cgi?id=46893