1 2009-08-10 Oliver Hunt <oliver@apple.com>
3 Reviewed by NOBODY (And another build fix).
5 Add new exports for MSVC
7 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9 * JavaScriptCore.xcodeproj/project.pbxproj:
11 2009-08-10 Oliver Hunt <oliver@apple.com>
13 Reviewed by NOBODY (yet another build fix).
15 Remove obsolete entries from MSVC exports file
17 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
20 2009-08-10 Oliver Hunt <oliver@apple.com>
22 Reviewed by NOBODY (Build fix).
24 Add includes needed for non-allinonefile builds
26 * runtime/GetterSetter.h:
27 * runtime/ScopeChain.h:
29 2009-08-10 Oliver Hunt <oliver@apple.com>
31 Reviewed by NOBODY (Build fix).
33 Fix export file for last build fix
37 2009-08-10 Oliver Hunt <oliver@apple.com>
39 Reviewed by NOBODY (Build fix).
41 Hoist page size initialization into platform specific code.
43 * jit/ExecutableAllocatorPosix.cpp:
44 * jit/ExecutableAllocatorWin.cpp:
45 * runtime/MarkStack.h:
46 (JSC::MarkStack::pageSize):
47 * runtime/MarkStackPosix.cpp:
48 (JSC::MarkStack::initializePagesize):
49 * runtime/MarkStackWin.cpp:
50 (JSC::MarkStack::initializePagesize):
52 2009-08-07 Oliver Hunt <oliver@apple.com>
54 Reviewed by Gavin Barraclough.
56 Stack overflow crash in JavaScript garbage collector mark pass
57 https://bugs.webkit.org/show_bug.cgi?id=12216
59 Make the GC mark phase iterative by using an explicit mark stack.
60 To do this marking any single object is performed in multiple stages
61 * The object is appended to the MarkStack, this sets the marked
62 bit for the object using the new markDirect() function, and then
64 * When the MarkStack is drain()ed the object is popped off the stack
65 and markChildren(MarkStack&) is called on the object to collect
66 all of its children. drain() then repeats until the stack is empty.
68 Additionally I renamed a number of methods from 'mark' to 'markAggregate'
69 in order to make it more clear that marking of those object was not
70 going to result in an actual recursive mark.
74 * JavaScriptCore.gypi:
76 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
77 * JavaScriptCore.xcodeproj/project.pbxproj:
78 * bytecode/CodeBlock.cpp:
79 (JSC::CodeBlock::markAggregate):
80 * bytecode/CodeBlock.h:
81 * bytecode/EvalCodeCache.h:
82 (JSC::EvalCodeCache::markAggregate):
83 * debugger/DebuggerActivation.cpp:
84 (JSC::DebuggerActivation::markChildren):
85 * debugger/DebuggerActivation.h:
86 * interpreter/Register.h:
87 * interpreter/RegisterFile.h:
88 (JSC::RegisterFile::markGlobals):
89 (JSC::RegisterFile::markCallFrames):
91 (JSC::ScopeNodeData::markAggregate):
92 (JSC::EvalNode::markAggregate):
93 (JSC::FunctionBodyNode::markAggregate):
95 (JSC::ScopeNode::markAggregate):
96 * runtime/ArgList.cpp:
97 (JSC::MarkedArgumentBuffer::markLists):
99 * runtime/Arguments.cpp:
100 (JSC::Arguments::markChildren):
101 * runtime/Arguments.h:
102 * runtime/Collector.cpp:
103 (JSC::Heap::markConservatively):
104 (JSC::Heap::markCurrentThreadConservativelyInternal):
105 (JSC::Heap::markCurrentThreadConservatively):
106 (JSC::Heap::markOtherThreadConservatively):
107 (JSC::Heap::markStackObjectsConservatively):
108 (JSC::Heap::markProtectedObjects):
109 (JSC::Heap::collect):
110 * runtime/Collector.h:
111 * runtime/GetterSetter.cpp:
112 (JSC::GetterSetter::markChildren):
113 * runtime/GetterSetter.h:
114 (JSC::GetterSetter::GetterSetter):
115 (JSC::GetterSetter::createStructure):
116 * runtime/GlobalEvalFunction.cpp:
117 (JSC::GlobalEvalFunction::markChildren):
118 * runtime/GlobalEvalFunction.h:
119 * runtime/JSActivation.cpp:
120 (JSC::JSActivation::markChildren):
121 * runtime/JSActivation.h:
122 * runtime/JSArray.cpp:
123 (JSC::JSArray::markChildren):
126 (JSC::JSCell::markCellDirect):
127 (JSC::JSCell::markChildren):
128 (JSC::JSValue::markDirect):
129 (JSC::JSValue::markChildren):
130 (JSC::JSValue::hasChildren):
131 (JSC::MarkStack::append):
132 (JSC::MarkStack::drain):
133 * runtime/JSFunction.cpp:
134 (JSC::JSFunction::markChildren):
135 * runtime/JSFunction.h:
136 * runtime/JSGlobalData.cpp:
137 (JSC::JSGlobalData::JSGlobalData):
138 * runtime/JSGlobalData.h:
139 * runtime/JSGlobalObject.cpp:
141 (JSC::JSGlobalObject::markChildren):
142 * runtime/JSGlobalObject.h:
143 * runtime/JSNotAnObject.cpp:
144 (JSC::JSNotAnObject::markChildren):
145 * runtime/JSNotAnObject.h:
146 * runtime/JSONObject.cpp:
147 (JSC::Stringifier::markAggregate):
148 (JSC::JSONObject::markStringifiers):
149 * runtime/JSONObject.h:
150 * runtime/JSObject.cpp:
151 (JSC::JSObject::markChildren):
152 (JSC::JSObject::defineGetter):
153 (JSC::JSObject::defineSetter):
154 * runtime/JSObject.h:
155 * runtime/JSPropertyNameIterator.cpp:
156 (JSC::JSPropertyNameIterator::markChildren):
157 * runtime/JSPropertyNameIterator.h:
158 (JSC::JSPropertyNameIterator::createStructure):
159 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
160 (JSC::JSPropertyNameIterator::create):
161 * runtime/JSStaticScopeObject.cpp:
162 (JSC::JSStaticScopeObject::markChildren):
163 * runtime/JSStaticScopeObject.h:
167 * runtime/JSWrapperObject.cpp:
168 (JSC::JSWrapperObject::markChildren):
169 * runtime/JSWrapperObject.h:
170 * runtime/MarkStack.cpp: Added.
171 (JSC::MarkStack::compact):
172 * runtime/MarkStack.h: Added.
174 (JSC::MarkStack::MarkStack):
175 (JSC::MarkStack::append):
176 (JSC::MarkStack::appendValues):
177 (JSC::MarkStack::~MarkStack):
178 (JSC::MarkStack::MarkSet::MarkSet):
179 (JSC::MarkStack::pageSize):
181 MarkStackArray is a non-shrinking, mmap-based vector type
182 used for storing objects to be marked.
183 (JSC::MarkStack::MarkStackArray::MarkStackArray):
184 (JSC::MarkStack::MarkStackArray::~MarkStackArray):
185 (JSC::MarkStack::MarkStackArray::expand):
186 (JSC::MarkStack::MarkStackArray::append):
187 (JSC::MarkStack::MarkStackArray::removeLast):
188 (JSC::MarkStack::MarkStackArray::isEmpty):
189 (JSC::MarkStack::MarkStackArray::size):
190 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
191 * runtime/MarkStackPosix.cpp: Added.
192 (JSC::MarkStack::allocateStack):
193 (JSC::MarkStack::releaseStack):
194 * runtime/MarkStackWin.cpp: Added.
195 (JSC::MarkStack::allocateStack):
196 (JSC::MarkStack::releaseStack):
198 * runtime/ScopeChain.h:
199 * runtime/ScopeChainMark.h:
200 (JSC::ScopeChain::markAggregate):
201 * runtime/SmallStrings.cpp:
202 (JSC::SmallStrings::mark):
203 * runtime/Structure.h:
204 (JSC::Structure::markAggregate):
206 2009-08-10 Mark Rowe <mrowe@apple.com>
208 Reviewed by Darin Adler.
210 Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot.
212 * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since
213 we implement the nothrow variants of new and new[]. The nothrow variant of delete is called
214 explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated
215 memory being passed to the system allocator to free.
217 2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
219 [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug
220 section. This file is already part of AllInOneFile in Release builds.
224 2009-08-10 Darin Adler <darin@apple.com>
226 * wtf/FastMalloc.h: Fix build.
228 2009-08-10 Darin Adler <darin@apple.com>
230 Reviewed by Mark Rowe.
232 FastMalloc.h has cross-platform code but marked as WinCE-only
233 https://bugs.webkit.org/show_bug.cgi?id=28160
235 1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is
236 not platform-specific.
237 2) The code tried to override operator delete nothrow, which does not exist.
238 3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code
239 in FastMalloc.cpp checks only if the macro is defined.
241 * wtf/FastMalloc.h: See above.
242 * wtf/FastMalloc.cpp: Ditto.
244 2009-08-10 Sam Weinig <sam@webkit.org>
246 Reviewed by Anders Carlsson.
248 Fix an annoying indentation issue.
250 * runtime/DateConstructor.cpp:
251 (JSC::constructDate):
253 2009-08-10 Xan Lopez <xlopez@igalia.com>
255 Unreviewed build fix.
257 Add new files to makefile.
261 2009-08-10 Simon Hausmann <simon.hausmann@nokia.com>
263 Fix compilation with the interpreter instead of the JIT by including
264 PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h.
266 * runtime/ObjectConstructor.cpp:
268 2009-08-09 Oliver Hunt <oliver@apple.com>
270 Reviewed by George Staikos.
272 JSON.stringify replacer returning undefined does not omit object properties
273 https://bugs.webkit.org/show_bug.cgi?id=28118
275 Correct behaviour of stringify when using a replacer function that returns
276 undefined. This is a simple change to move the undefined value check to
277 after the replacer function is called. This means that the replacer function
278 is now called for properties with the value undefined, however i've confirmed
279 that this behaviour is correct.
281 In addition I've made the cyclic object exception have a more useful error
284 * runtime/JSONObject.cpp:
285 (JSC::Stringifier::appendStringifiedValue):
287 2009-08-08 Oliver Hunt <oliver@apple.com>
289 Reviewed by Eric Seidel and Sam Weinig.
291 [ES5] Implement Object.getPrototypeOf
292 https://bugs.webkit.org/show_bug.cgi?id=28114
294 Implement getPrototypeOf
296 * runtime/CommonIdentifiers.h:
297 * runtime/JSGlobalObject.cpp:
298 (JSC::JSGlobalObject::reset):
299 * runtime/ObjectConstructor.cpp:
300 (JSC::ObjectConstructor::ObjectConstructor):
301 (JSC::objectConsGetPrototypeOf):
302 * runtime/ObjectConstructor.h:
304 2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
306 Reviewed by Eric Seidel.
308 Allow custom memory allocation control for Noncopyable class
309 https://bugs.webkit.org/show_bug.cgi?id=27879
311 Several classes which are inherited from Noncopyable are instantiated by
312 operator new, so Noncopyable class has been inherited from FastAllocBase.
316 2009-08-07 George Staikos <george.staikos@torchmobile.com>
318 Reviewed by Eric Seidel.
320 https://bugs.webkit.org/show_bug.cgi?id=27305
321 Implement WinCE-specific unicode layer.
322 Written by George Staikos <george.staikos@torchmobile.com>
323 with bug fixes by Yong Li <yong.li@torchmobile.com>
324 refactored by Joe Mason <joe.mason@torchmobile.com>
327 * wtf/unicode/Unicode.h:
328 * wtf/unicode/wince/UnicodeWince.cpp: Added.
329 (WTF::Unicode::toLower):
330 (WTF::Unicode::toUpper):
331 (WTF::Unicode::foldCase):
332 (WTF::Unicode::isPrintableChar):
333 (WTF::Unicode::isSpace):
334 (WTF::Unicode::isLetter):
335 (WTF::Unicode::isUpper):
336 (WTF::Unicode::isLower):
337 (WTF::Unicode::isDigit):
338 (WTF::Unicode::isPunct):
339 (WTF::Unicode::toTitleCase):
340 (WTF::Unicode::direction):
341 (WTF::Unicode::category):
342 (WTF::Unicode::decompositionType):
343 (WTF::Unicode::combiningClass):
344 (WTF::Unicode::mirroredChar):
345 (WTF::Unicode::digitValue):
346 * wtf/unicode/wince/UnicodeWince.h: Added.
348 (WTF::Unicode::isSeparatorSpace):
349 (WTF::Unicode::isHighSurrogate):
350 (WTF::Unicode::isLowSurrogate):
351 (WTF::Unicode::isArabicChar):
352 (WTF::Unicode::hasLineBreakingPropertyComplexContext):
353 (WTF::Unicode::umemcasecmp):
354 (WTF::Unicode::surrogateToUcs4):
356 2009-08-07 Yongjun Zhang <yongjun.zhang@nokia.com>
358 Reviewed by Eric Seidel.
360 https://bugs.webkit.org/show_bug.cgi?id=28069
362 Add inline to help winscw compiler resolve specialized argument in
365 * runtime/LiteralParser.cpp:
366 (JSC::LiteralParser::Lexer::lexString):
368 2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
370 Reviewed by Eric Seidel.
372 Allow custom memory allocation control for RegExpObjectData struct
373 http://bugs.webkit.org/show_bug.cgi?id=26750
375 Inherits RegExpObjectData struct from FastAllocBase because
376 it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62
378 * runtime/RegExpObject.h:
380 2009-08-06 Norbert Leser <norbert.leser@nokia.com>
382 Reviewed by Darin Adler.
384 Updated patch for bug #27059:
385 Symbian platform always uses little endian encoding,
386 regardless of compiler.
387 We need to make sure that we correctly detect EABI architecture
388 for armv5 targets on Symbian,
389 where __EABI__ is set but not __ARM_EABI__
393 2009-08-06 Adam Barth <abarth@webkit.org>
397 http://bugs.webkit.org/show_bug.cgi?id=27879
399 Revert 46877 because it broke GTK.
403 2009-08-06 Gavin Barraclough <barraclough@apple.com>
405 Reviewed by Oliver Hunt.
407 Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
408 ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
410 This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
411 (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
413 * bytecode/CodeBlock.cpp:
414 (JSC::printStructureStubInfo):
415 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
417 * bytecode/CodeBlock.h:
419 (JSC::CallLinkInfo::seenOnce):
420 (JSC::CallLinkInfo::setSeen):
421 (JSC::MethodCallLinkInfo::seenOnce):
422 (JSC::MethodCallLinkInfo::setSeen):
423 - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
425 * bytecode/StructureStubInfo.cpp:
426 (JSC::StructureStubInfo::deref):
427 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
429 * bytecode/StructureStubInfo.h:
430 (JSC::StructureStubInfo::StructureStubInfo):
431 (JSC::StructureStubInfo::initGetByIdSelf):
432 (JSC::StructureStubInfo::initGetByIdProto):
433 (JSC::StructureStubInfo::initGetByIdChain):
434 (JSC::StructureStubInfo::initGetByIdSelfList):
435 (JSC::StructureStubInfo::initGetByIdProtoList):
436 (JSC::StructureStubInfo::initPutByIdTransition):
437 (JSC::StructureStubInfo::initPutByIdReplace):
438 (JSC::StructureStubInfo::seenOnce):
439 (JSC::StructureStubInfo::setSeen):
440 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
442 * bytecompiler/BytecodeGenerator.cpp:
443 (JSC::BytecodeGenerator::emitGetById):
444 (JSC::BytecodeGenerator::emitPutById):
445 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
448 (JSC::JIT::privateCompileCTIMachineTrampolines):
449 (JSC::JIT::unlinkCall):
450 - Remove the "don't lazy link" stage of calls.
453 (JSC::JIT::compileCTIMachineTrampolines):
454 - Remove the "don't lazy link" stage of calls.
457 (JSC::JIT::compileOpCallSlowCase):
458 - Remove the "don't lazy link" stage of calls.
461 (JSC::JITThunks::JITThunks):
462 (JSC::JITThunks::tryCachePutByID):
463 (JSC::JITThunks::tryCacheGetByID):
464 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
465 (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
466 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
469 (JSC::JITThunks::ctiStringLengthTrampoline):
471 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
474 (WTF::PtrAndFlags::PtrAndFlags):
475 (WTF::PtrAndFlags::operator!):
476 (WTF::PtrAndFlags::operator->):
477 - Add ! and -> operators, add constuctor with pointer argument.
479 2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
481 Reviewed by Adam Barth.
483 Allow custom memory allocation control for Noncopyable class
484 https://bugs.webkit.org/show_bug.cgi?id=27879
486 Several classes which inherited from Noncopyable are instantiated by
487 operator new, so Noncopyable class has been inherited from FastAllocBase.
491 2009-08-06 Mark Rowe <mrowe@apple.com>
493 Rubber-stamped by Sam Weinig.
495 Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
497 * JavaScriptCore.xcodeproj/project.pbxproj:
499 2009-08-06 Mark Rowe <mrowe@apple.com>
501 Bring a little order to our otherwise out of control lives.
503 * JavaScriptCore.xcodeproj/project.pbxproj:
505 2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
507 Reviewed by Darin Adler.
509 Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct
510 https://bugs.webkit.org/show_bug.cgi?id=27877
512 Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by
513 'new' in JavaScriptCore/jit/JITStubs.cpp:1229.
515 * bytecode/Instruction.h:
517 2009-08-05 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
519 Reviewed by Darin Adler.
521 Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct
522 https://bugs.webkit.org/show_bug.cgi?id=27875
524 Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by
525 'new' in JavaScriptCore/parser/Nodes.cpp:1848.
529 2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
531 Reviewed by Gavin Barraclough.
533 Add floating point support for generic ARM port.
534 https://bugs.webkit.org/show_bug.cgi?id=24986
536 * assembler/ARMAssembler.cpp:
537 (JSC::ARMAssembler::doubleTransfer):
538 * assembler/ARMAssembler.h:
540 (JSC::ARMAssembler::):
541 (JSC::ARMAssembler::faddd_r):
542 (JSC::ARMAssembler::fsubd_r):
543 (JSC::ARMAssembler::fmuld_r):
544 (JSC::ARMAssembler::fcmpd_r):
545 (JSC::ARMAssembler::fdtr_u):
546 (JSC::ARMAssembler::fdtr_d):
547 (JSC::ARMAssembler::fmsr_r):
548 (JSC::ARMAssembler::fsitod_r):
549 (JSC::ARMAssembler::fmstat):
550 * assembler/MacroAssemblerARM.h:
551 (JSC::MacroAssemblerARM::):
552 (JSC::MacroAssemblerARM::supportsFloatingPoint):
553 (JSC::MacroAssemblerARM::loadDouble):
554 (JSC::MacroAssemblerARM::storeDouble):
555 (JSC::MacroAssemblerARM::addDouble):
556 (JSC::MacroAssemblerARM::subDouble):
557 (JSC::MacroAssemblerARM::mulDouble):
558 (JSC::MacroAssemblerARM::convertInt32ToDouble):
559 (JSC::MacroAssemblerARM::branchDouble):
562 2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
564 Reviewed by Gavin Barraclough.
566 Add JIT support for generic ARM port without optimizations.
567 https://bugs.webkit.org/show_bug.cgi?id=24986
569 All JIT optimizations are disabled.
571 Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
572 Signed off by Gabor Loki <loki@inf.u-szeged.hu>
574 * assembler/ARMAssembler.cpp:
575 (JSC::ARMAssembler::baseIndexTransfer32):
576 * assembler/AbstractMacroAssembler.h:
577 (JSC::AbstractMacroAssembler::Imm32::Imm32):
578 * assembler/MacroAssemblerARM.h:
579 (JSC::MacroAssemblerARM::store32):
580 (JSC::MacroAssemblerARM::move):
581 (JSC::MacroAssemblerARM::branch32):
582 (JSC::MacroAssemblerARM::add32):
583 (JSC::MacroAssemblerARM::sub32):
584 (JSC::MacroAssemblerARM::load32):
585 * bytecode/CodeBlock.h:
586 (JSC::CodeBlock::getBytecodeIndex):
588 * jit/JITInlineMethods.h:
589 (JSC::JIT::restoreArgumentReference):
590 * jit/JITOpcodes.cpp:
593 (JSC::JITStackFrame::returnAddressSlot):
596 2009-08-04 Gavin Barraclough <barraclough@apple.com>
598 Rubber Stamped by Oiver Hunt.
600 Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests.
601 https://bugs.webkit.org/show_bug.cgi?id=27874
603 * yarr/RegexInterpreter.cpp:
604 (JSC::Yarr::Interpreter::allocDisjunctionContext):
605 (JSC::Yarr::Interpreter::freeDisjunctionContext):
606 (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
607 (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
609 2009-08-04 Oliver Hunt <oliver@apple.com>
611 Reviewed by NOBODY (build fix).
617 2009-08-04 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
619 Reviewed by Adam Treat
621 Explicitly include limits.h header when using INT_MAX and INT_MIN
623 * interpreter/Interpreter.cpp
625 2009-08-03 Harald Fernengel <harald.fernengel@nokia.com>
627 Reviewed by Darin Adler.
629 Fix compile error for ambigous call to abs()
630 https://bugs.webkit.org/show_bug.cgi?id=27873
632 Fix ambiguity in abs(long int) call by calling labs() instead
634 * wtf/DateMath.cpp: replace call to abs() with labs()
636 2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
638 Reviewed by Eric Seidel.
640 [Qt] Consolidate common gcc flags to WebKit.pri
641 https://bugs.webkit.org/show_bug.cgi?id=27934
643 * JavaScriptCore.pro:
645 2009-08-03 Ada Chan <adachan@apple.com>
647 Fixed the Tiger build.
649 * wtf/FastMalloc.cpp:
651 2009-08-03 Ada Chan <adachan@apple.com>
653 Reviewed by Darin Adler.
655 Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash.
656 https://bugs.webkit.org/show_bug.cgi?id=27900
658 * wtf/FastMalloc.cpp:
660 2009-08-03 Fumitoshi Ukai <ukai@chromium.org>
662 Reviewed by Jan Alonzo.
664 Fix build break on Gtk/x86_64.
665 https://bugs.webkit.org/show_bug.cgi?id=27936
667 Use JSVALUE64 for X86_64 LINUX, except Qt.
671 2009-08-02 Xan Lopez <xlopez@igalia.com>
677 2009-08-02 Geoffrey Garen <ggaren@apple.com>
679 Reviewed by Sam Weinig.
681 Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously
682 crash with it enabled.
686 2009-08-02 Geoffrey Garen <ggaren@apple.com>
690 Added JSAPIValueWrapper.cpp to the build.
692 * JavaScriptCore.pri:
694 2009-08-02 Geoffrey Garen <ggaren@apple.com>
698 Exported symbols for JSAPIValueWrapper.
700 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
701 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
703 2009-08-02 Geoffrey Garen <ggaren@apple.com>
707 * jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start.
709 2009-08-02 Geoffrey Garen <ggaren@apple.com>
713 * runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX.
715 2009-08-02 Geoffrey Garen <ggaren@apple.com>
717 Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject,
718 and JSImmediate::toThisObject, and removed their exported symbols.
720 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
721 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
722 * runtime/JSImmediate.cpp:
723 * runtime/JSImmediate.h:
725 2009-08-02 Geoffrey Garen <ggaren@apple.com>
727 Reviewed by Mark Rowe.
729 Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64).
733 2009-08-02 Kevin Ollivier <kevino@theolliviers.com>
735 Reviewed by Jan Alonzo.
737 Script for building the JavaScriptCore library for wx.
738 https://bugs.webkit.org/show_bug.cgi?id=27619
742 2009-08-02 Yong Li <yong.li@torchmobile.com>
744 Reviewed by George Staikos.
746 DateMath depends on strftime and localtime, which need to be imported manually on WinCE
747 https://bugs.webkit.org/show_bug.cgi?id=26558
751 2009-08-01 David Kilzer <ddkilzer@apple.com>
753 wtf/Threading.h: added include of Platform.h
755 Reviewed by Mark Rowe.
757 * wtf/Threading.h: Added #include "Platform.h" since this header
758 uses PLATFORM() and other macros.
760 2009-08-01 Mark Rowe <mrowe@apple.com>
762 Rubber-stamped by Oliver Hunt.
764 Roll out r46668 as it was misinformed. ScopeChain is only used with placement new.
766 * runtime/ScopeChain.h:
768 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
770 Allow custom memory allocation control for JavaScriptCore's HashMap class
771 http://bugs.webkit.org/show_bug.cgi?id=27871
773 Inherits HashMap class from FastAllocBase because it has been
774 instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148.
776 * wtf/RefPtrHashMap.h:
779 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
781 Allow custom memory allocation control for JavaScriptCore's ScopeChain class
782 https://bugs.webkit.org/show_bug.cgi?id=27834
784 Inherits ScopeChain class from FastAllocBase because it has been
785 instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109.
787 * runtime/ScopeChain.h:
789 2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
791 Reviewed by Darin Adler.
793 Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct
794 https://bugs.webkit.org/show_bug.cgi?id=27833
796 Inherits RegExpConstructorPrivate class from FastAllocBase because it has been
797 instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152.
799 * runtime/RegExpConstructor.cpp:
801 2009-07-31 Yong Li <yong.li@torchmobile.com>
803 Reviewed by George Staikos.
805 Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER
806 currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com>
807 https://bugs.webkit.org/show_bug.cgi?id=27848
809 * wtf/CurrentTime.cpp:
810 (WTF::currentSystemTime): get current time with GetCurrentFT
811 (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount
814 2009-07-31 Ada Chan <adachan@apple.com>
816 Fixes the Windows release-PGO build.
818 Reviewed by Jon Honeycutt.
820 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread().
821 * wtf/FastMalloc.cpp:
822 (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build.
824 2009-07-31 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
826 Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
827 https://bugs.webkit.org/show_bug.cgi?id=27874
829 Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
831 * yarr/RegexInterpreter.cpp:
832 (JSC::Yarr::Interpreter::allocDisjunctionContext):
833 (JSC::Yarr::Interpreter::freeDisjunctionContext):
834 (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
835 (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
837 2009-07-30 Xan Lopez <xlopez@igalia.com>
839 Reviewed by Jan Alonzo.
841 Fix compiler warning.
843 GCC does not like C++-style comments in preprocessor directives.
847 2009-07-30 John McCall <rjmccall@apple.com>
849 Reviewed by Gavin Barraclough.
851 Optimize the X86_64 trampolines: avoid the need for filler arguments
852 and move the stub-args area closer to the stack pointer.
854 * jit/JIT.h: adjust patch offsets because of slight code-size change
856 (JSC::JITCode::execute): don't pass filler args
858 (ctiTrampoline): (X86_64): push args onto stack, use args directly
859 (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement
860 (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement
862 (JITStackFrame): (X86_64): move args area earlier
863 (ctiTrampoline): remove filler args from prototype
865 2009-07-30 Gavin Barraclough <barraclough@apple.com>
867 Reviewed by NOBODY (build fix).
869 Temporarily revert r46618 since this is b0rking on Linux.
871 2009-07-23 Gavin Barraclough <barraclough@apple.com>
873 Reviewed by Oliver Hunt.
875 Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
876 ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
878 This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
879 (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
881 * bytecode/CodeBlock.cpp:
882 (JSC::printStructureStubInfo):
883 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
885 * bytecode/CodeBlock.h:
887 (JSC::CallLinkInfo::seenOnce):
888 (JSC::CallLinkInfo::setSeen):
889 (JSC::MethodCallLinkInfo::seenOnce):
890 (JSC::MethodCallLinkInfo::setSeen):
891 - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
893 * bytecode/StructureStubInfo.cpp:
894 (JSC::StructureStubInfo::deref):
895 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
897 * bytecode/StructureStubInfo.h:
898 (JSC::StructureStubInfo::StructureStubInfo):
899 (JSC::StructureStubInfo::initGetByIdSelf):
900 (JSC::StructureStubInfo::initGetByIdProto):
901 (JSC::StructureStubInfo::initGetByIdChain):
902 (JSC::StructureStubInfo::initGetByIdSelfList):
903 (JSC::StructureStubInfo::initGetByIdProtoList):
904 (JSC::StructureStubInfo::initPutByIdTransition):
905 (JSC::StructureStubInfo::initPutByIdReplace):
906 (JSC::StructureStubInfo::seenOnce):
907 (JSC::StructureStubInfo::setSeen):
908 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
910 * bytecompiler/BytecodeGenerator.cpp:
911 (JSC::BytecodeGenerator::emitGetById):
912 (JSC::BytecodeGenerator::emitPutById):
913 - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
916 (JSC::JIT::privateCompileCTIMachineTrampolines):
917 (JSC::JIT::unlinkCall):
918 - Remove the "don't lazy link" stage of calls.
921 (JSC::JIT::compileCTIMachineTrampolines):
922 - Remove the "don't lazy link" stage of calls.
925 (JSC::JIT::compileOpCallSlowCase):
926 - Remove the "don't lazy link" stage of calls.
929 (JSC::JITThunks::JITThunks):
930 (JSC::JITThunks::tryCachePutByID):
931 (JSC::JITThunks::tryCacheGetByID):
932 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
933 (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
934 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
937 (JSC::JITThunks::ctiStringLengthTrampoline):
939 - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
942 (WTF::PtrAndFlags::PtrAndFlags):
943 (WTF::PtrAndFlags::operator!):
944 (WTF::PtrAndFlags::operator->):
945 - Add ! and -> operators, add constuctor with pointer argument.
947 2009-07-30 Geoffrey Garen <ggaren@apple.com>
949 Reviewed by Gavin Barraclough.
951 Fixed failing tests seen on Windows buildbot.
954 (JSC::DEFINE_STUB_FUNCTION):
956 (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result,
957 regardless of compiler. gcc on mac uses 32-bit values for bool,
958 but gcc on linux and MSVC on Windows use 8-bit values.
960 2009-07-30 Geoffrey Garen <ggaren@apple.com>
962 Windows build fix: added missing symbols on Windows.
964 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
965 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
967 2009-07-30 Geoffrey Garen <ggaren@apple.com>
969 Windows build fix: removed stale symbols on Windows.
971 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
972 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
974 === End merge of nitro-extreme branch 2009-07-30 ===
976 2009-07-20 Geoffrey Garen <ggaren@apple.com>
978 Fixed a post-review typo in r46066 that caused tons of test failures.
980 SunSpider reports no change.
982 * runtime/JSArray.cpp:
983 (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid
984 uninitialized members at the end.
986 2009-07-20 Geoffrey Garen <ggaren@apple.com>
988 Windows WebKit build fix: Added some missing exports.
990 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
991 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
993 2009-07-17 Geoffrey Garen <ggaren@apple.com>
995 Reviewed by Sam Weinig.
997 Get the branch working on windows.
998 https://bugs.webkit.org/show_bug.cgi?id=27391
1000 SunSpider says 0.3% faster.
1002 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1003 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated
1004 MSVC export lists to fix linker errors.
1006 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed
1007 new / old project files.
1010 (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell
1011 MSVC that these structures represent actual memory layout, and should not be
1012 automatically aligned. Changed the return value load to load a 64bit quantity
1013 into the canonical registers.
1015 * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because
1016 it's needed by more than just the JIT, and it supplements a standard library
1020 (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed
1021 cast to resolve an MSVC warning.
1023 * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures
1024 represent actual memory layout, and should not be automatically aligned.
1026 * runtime/JSArray.cpp:
1027 (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since
1028 memset_pattern8 is not portable. (I verified that this version of the loop
1029 gives the best performance / generated code in GCC.)
1031 * runtime/JSObject.h:
1032 (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET --
1033 OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a
1034 definition in winnt.h.)
1036 * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds.
1038 * runtime/JSValue.h:
1039 (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values.
1040 (GCC doesn't seem to care one way or the other.)
1042 * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a
1043 while ago to resolve a conflict with winnt.h. I can't remember if it's truly
1044 still needed, but what the heck.
1046 * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here.
1048 2009-07-06 Geoffrey Garen <ggaren@apple.com>
1050 Reviewed by Sam Weinig (?).
1052 Fixed an assertion seen during the stress test.
1054 Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly,
1055 not all constants get folded.
1057 * jit/JITArithmetic.cpp:
1058 (JSC::JIT::emit_op_jnless):
1059 (JSC::JIT::emitSlow_op_jnless):
1060 (JSC::JIT::emit_op_jnlesseq):
1061 (JSC::JIT::emitSlow_op_jnlesseq):
1063 2009-07-06 Geoffrey Garen <ggaren@apple.com>
1065 Reviewed by Sam Weinig.
1067 Include op_convert_this in result caching.
1069 No change on SunSpider or v8.
1071 * jit/JITOpcodes.cpp:
1072 (JSC::JIT::emit_op_convert_this):
1075 (JSC::DEFINE_STUB_FUNCTION):
1077 (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so
1078 to maintain the result caching contract that { tag, payload } can be
1079 found in { regT1, regT0 }.
1081 2009-07-06 Geoffrey Garen <ggaren@apple.com>
1083 Reviewed by Sam Weinig.
1085 Implemented result chaining.
1087 1% faster on SunSpider. 4%-5% faster on v8.
1089 * assembler/MacroAssemblerX86Common.h:
1090 (JSC::MacroAssemblerX86Common::move):
1091 * assembler/X86Assembler.h:
1092 (JSC::X86Assembler::movl_rr): Added an optimization to eliminate
1093 no-op mov instructions, to simplify chaining.
1097 * jit/JIT.h: Added data members and helper functions for recording
1098 chained results. We record both a mapping from virtual to machine register
1099 and the opcode for which the mapping is valid, to help ensure that the
1100 mapping isn't used after the mapped register has been stomped by other
1104 (JSC::JIT::compileOpCallVarargs):
1105 (JSC::JIT::compileOpCallVarargsSlowCase):
1106 (JSC::JIT::emit_op_ret):
1107 (JSC::JIT::emit_op_construct_verify):
1108 (JSC::JIT::compileOpCall):
1109 (JSC::JIT::compileOpCallSlowCase): Chain function call results.
1111 * jit/JITInlineMethods.h:
1112 (JSC::JIT::emitLoadTag):
1113 (JSC::JIT::emitLoadPayload):
1114 (JSC::JIT::emitLoad):
1115 (JSC::JIT::emitLoad2):
1116 (JSC::JIT::isLabeled):
1119 (JSC::JIT::isMapped):
1120 (JSC::JIT::getMappedPayload):
1121 (JSC::JIT::getMappedTag): Use helper functions when loading virtual
1122 registers into machine registers, in case the loads can be eliminated
1125 * jit/JITOpcodes.cpp:
1126 (JSC::JIT::emit_op_mov):
1127 (JSC::JIT::emit_op_end):
1128 (JSC::JIT::emit_op_instanceof):
1129 (JSC::JIT::emit_op_get_global_var):
1130 (JSC::JIT::emit_op_put_global_var):
1131 (JSC::JIT::emit_op_get_scoped_var):
1132 (JSC::JIT::emit_op_put_scoped_var):
1133 (JSC::JIT::emit_op_to_primitive):
1134 (JSC::JIT::emit_op_resolve_global):
1135 (JSC::JIT::emit_op_jneq_ptr):
1136 (JSC::JIT::emit_op_next_pname):
1137 (JSC::JIT::emit_op_to_jsnumber):
1138 (JSC::JIT::emit_op_catch): Chain results from these opcodes.
1140 (JSC::JIT::emit_op_profile_will_call):
1141 (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to
1142 avoid stomping a chained result.
1144 * jit/JITPropertyAccess.cpp:
1145 (JSC::JIT::emit_op_method_check):
1146 (JSC::JIT::emit_op_get_by_val):
1147 (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes.
1149 * jit/JITStubCall.h:
1150 (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate
1153 (JSC::JITStubCall::call): Unmap all mapped registers, since our callee
1154 stub might stomp them.
1156 2009-07-01 Sam Weinig <sam@webkit.org>
1158 Reviewed by Gavin Barraclough.
1160 Don't reload values in emitBinaryDoubleOp.
1162 SunSpider reports a 0.6% progression.
1165 * jit/JITArithmetic.cpp:
1166 (JSC::JIT::emit_op_jnless):
1167 (JSC::JIT::emit_op_jnlesseq):
1168 (JSC::JIT::emitBinaryDoubleOp):
1170 2009-07-01 Sam Weinig <sam@webkit.org>
1172 Reviewed by Geoffrey Garen.
1174 Convert op_div to load op1 and op2 up front.
1176 * jit/JITArithmetic.cpp:
1177 (JSC::JIT::emit_op_div):
1179 2009-07-01 Sam Weinig <sam@webkit.org>
1181 Reviewed by Geoffrey Garen.
1183 Don't emit code in emitBinaryDoubleOp if code is unreachable, observable
1184 via an empty (unlinked) jumplist passed in. This only effects op_jnless
1185 and op_jnlesseq at present.
1187 * jit/JITArithmetic.cpp:
1188 (JSC::JIT::emitSlow_op_jnless):
1189 (JSC::JIT::emitSlow_op_jnlesseq):
1190 (JSC::JIT::emitBinaryDoubleOp):
1192 2009-07-01 Geoffrey Garen <ggaren@apple.com>
1194 Reviewed by Sam Weinig.
1196 Converted op_mod to put { tag, payload } in { regT1, regT0 }, and
1197 tidied up its constant case.
1199 SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod
1200 shows a 12% speedup, and the SunSpider test that uses op_mod most should
1201 benefit a lot from result caching in the end, since it almost always
1202 performs (expression) % constant.
1204 * jit/JITArithmetic.cpp:
1205 (JSC::JIT::emit_op_mod):
1206 (JSC::JIT::emitSlow_op_mod):
1208 2009-06-30 Sam Weinig <sam@webkit.org>
1210 Reviewed by Geoffrey Garen.
1212 Converted some more arithmetic ops to put { tag, payload } in
1215 * jit/JITArithmetic.cpp:
1216 (JSC::JIT::emit_op_mul):
1217 (JSC::JIT::emitSlow_op_mul):
1219 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1221 Reviewed by Sam Weinig.
1223 Converted some more arithmetic ops to put { tag, payload } in
1224 { regT1, regT0 }, and added a case for subtract constant.
1226 SunSpider says no change. v8 says 0.3% slower.
1229 * jit/JITArithmetic.cpp:
1230 (JSC::JIT::emit_op_add):
1231 (JSC::JIT::emitAdd32Constant):
1232 (JSC::JIT::emitSlow_op_add):
1233 (JSC::JIT::emit_op_sub):
1234 (JSC::JIT::emitSub32Constant):
1235 (JSC::JIT::emitSlow_op_sub):
1237 2009-06-30 Gavin Barraclough <barraclough@apple.com>
1239 Reviewed by Sam Weinig.
1241 Remove more uses of addressFor(), load double constants directly from
1242 the constantpool in the CodeBlock, rather than from the register file.
1244 * jit/JITArithmetic.cpp:
1245 (JSC::JIT::emitAdd32Constant):
1246 (JSC::JIT::emitBinaryDoubleOp):
1248 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1250 Reviewed by Sam Weinig.
1252 Fixed a bug in postfix ops, where we would treat x = x++ and x = x--
1253 as a no-op, even if x were not an int, and the ++/-- could have side-effects.
1255 * jit/JITArithmetic.cpp:
1256 (JSC::JIT::emit_op_post_inc):
1257 (JSC::JIT::emitSlow_op_post_inc):
1258 (JSC::JIT::emit_op_post_dec):
1259 (JSC::JIT::emitSlow_op_post_dec):
1261 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1263 Reviewed by Sam Weinig.
1265 Converted some arithmetic ops to put { tag, payload } in
1268 SunSpider says 0.7% faster. v8 says no change.
1271 * jit/JITArithmetic.cpp:
1272 (JSC::JIT::emit_op_jnless):
1273 (JSC::JIT::emit_op_jnlesseq):
1274 (JSC::JIT::emit_op_lshift):
1275 (JSC::JIT::emit_op_rshift):
1276 (JSC::JIT::emit_op_bitand):
1277 (JSC::JIT::emit_op_bitor):
1278 (JSC::JIT::emit_op_bitxor):
1279 * jit/JITInlineMethods.h:
1280 (JSC::JIT::isOperandConstantImmediateInt):
1281 (JSC::JIT::getOperandConstantImmediateInt):
1283 2009-06-30 Gavin Barraclough <barraclough@apple.com>
1285 Reviewed by Sam Weinig.
1287 Start removing cases of addressFor().
1290 * jit/JITArithmetic.cpp:
1291 (JSC::JIT::emitAdd32Constant):
1292 (JSC::JIT::emitBinaryDoubleOp):
1293 (JSC::JIT::emit_op_div):
1294 * jit/JITInlineMethods.h:
1295 (JSC::JIT::emitLoadDouble):
1296 (JSC::JIT::emitLoadInt32ToDouble):
1297 (JSC::JIT::emitStoreDouble):
1298 * jit/JITOpcodes.cpp:
1299 (JSC::JIT::emit_op_jfalse):
1300 (JSC::JIT::emit_op_jtrue):
1302 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1304 Rolled back in my last patch with regression fixed.
1307 (JSC::JIT::privateCompileSlowCases):
1309 * jit/JITOpcodes.cpp:
1310 (JSC::JIT::emit_op_loop_if_less):
1311 (JSC::JIT::emit_op_loop_if_lesseq):
1312 (JSC::JIT::emit_op_resolve_global):
1313 (JSC::JIT::emitSlow_op_resolve_global):
1314 (JSC::JIT::emit_op_eq):
1315 (JSC::JIT::emitSlow_op_eq):
1316 (JSC::JIT::emit_op_neq):
1317 (JSC::JIT::emitSlow_op_neq):
1319 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1321 Rolled out my last patch because it was a 2% SunSpider regression.
1324 (JSC::JIT::privateCompileSlowCases):
1326 * jit/JITOpcodes.cpp:
1327 (JSC::JIT::emit_op_loop_if_less):
1328 (JSC::JIT::emit_op_loop_if_lesseq):
1329 (JSC::JIT::emit_op_resolve_global):
1330 (JSC::JIT::emit_op_eq):
1331 (JSC::JIT::emitSlow_op_eq):
1332 (JSC::JIT::emit_op_neq):
1333 (JSC::JIT::emitSlow_op_neq):
1335 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1337 Reviewed by Gavin "Sam Weinig" Barraclough.
1339 Standardized the rest of our opcodes to put { tag, payload } in
1340 { regT1, regT0 } where possible.
1343 (JSC::JIT::privateCompileSlowCases):
1345 * jit/JITOpcodes.cpp:
1346 (JSC::JIT::emit_op_loop_if_less):
1347 (JSC::JIT::emit_op_loop_if_lesseq):
1348 (JSC::JIT::emit_op_resolve_global):
1349 (JSC::JIT::emitSlow_op_resolve_global):
1350 (JSC::JIT::emit_op_eq):
1351 (JSC::JIT::emitSlow_op_eq):
1352 (JSC::JIT::emit_op_neq):
1353 (JSC::JIT::emitSlow_op_neq):
1355 2009-06-30 Gavin Barraclough <barraclough@apple.com>
1357 Reviewed by Geoffrey Garen.
1359 Replace calls to store32(tagFor()) and store32(payloadFor())
1360 with emitStoreInt32(), emitStoreBool(), and emitStoreCell().
1363 * jit/JITArithmetic.cpp:
1364 (JSC::JIT::emit_op_negate):
1365 (JSC::JIT::emit_op_lshift):
1366 (JSC::JIT::emit_op_rshift):
1367 (JSC::JIT::emit_op_bitand):
1368 (JSC::JIT::emitBitAnd32Constant):
1369 (JSC::JIT::emit_op_bitor):
1370 (JSC::JIT::emitBitOr32Constant):
1371 (JSC::JIT::emit_op_bitxor):
1372 (JSC::JIT::emitBitXor32Constant):
1373 (JSC::JIT::emit_op_bitnot):
1374 (JSC::JIT::emit_op_post_inc):
1375 (JSC::JIT::emit_op_post_dec):
1376 (JSC::JIT::emit_op_pre_inc):
1377 (JSC::JIT::emit_op_pre_dec):
1378 (JSC::JIT::emit_op_add):
1379 (JSC::JIT::emitAdd32Constant):
1380 (JSC::JIT::emit_op_sub):
1381 (JSC::JIT::emitSub32ConstantLeft):
1382 (JSC::JIT::emitSub32ConstantRight):
1383 (JSC::JIT::emit_op_mul):
1384 (JSC::JIT::emitSlow_op_mul):
1385 (JSC::JIT::emit_op_div):
1386 (JSC::JIT::emit_op_mod):
1388 (JSC::JIT::emit_op_load_varargs):
1389 * jit/JITInlineMethods.h:
1390 (JSC::JIT::emitStoreInt32):
1391 (JSC::JIT::emitStoreCell):
1392 (JSC::JIT::emitStoreBool):
1393 (JSC::JIT::emitStore):
1394 * jit/JITOpcodes.cpp:
1395 (JSC::JIT::emit_op_instanceof):
1396 (JSC::JIT::emit_op_not):
1397 (JSC::JIT::emit_op_eq):
1398 (JSC::JIT::emitSlow_op_eq):
1399 (JSC::JIT::emit_op_neq):
1400 (JSC::JIT::emitSlow_op_neq):
1401 (JSC::JIT::compileOpStrictEq):
1402 (JSC::JIT::emit_op_eq_null):
1403 (JSC::JIT::emit_op_neq_null):
1404 * jit/JITStubCall.h:
1405 (JSC::JITStubCall::call):
1407 2009-06-30 Geoffrey Garen <ggaren@apple.com>
1409 Reviewed by Sam Weinig.
1411 Standardized the rest of the property access instructions to put { tag,
1412 payload } in { regT1, regT0 }.
1414 Small v8 speedup, 0.2% SunSpider slowdown.
1417 * jit/JITInlineMethods.h:
1418 (JSC::JIT::emitLoad):
1419 (JSC::JIT::emitLoad2):
1420 * jit/JITPropertyAccess.cpp:
1421 (JSC::JIT::emit_op_get_by_val):
1422 (JSC::JIT::emitSlow_op_get_by_val):
1423 (JSC::JIT::emit_op_put_by_val):
1424 (JSC::JIT::emitSlow_op_put_by_val):
1425 (JSC::JIT::emit_op_put_by_id):
1426 (JSC::JIT::emitSlow_op_put_by_id):
1427 (JSC::JIT::patchPutByIdReplace):
1429 2009-06-29 Sam Weinig <sam@webkit.org>
1431 Reviewed by Gavin Barraclough.
1434 - Use fpRegT* instead of X86::xmm*.
1435 - Use a switch statement in emitBinaryDoubleOp instead of a bunch of
1438 * jit/JITArithmetic.cpp:
1439 (JSC::JIT::emitAdd32Constant):
1440 (JSC::JIT::emitBinaryDoubleOp):
1441 (JSC::JIT::emit_op_div):
1443 2009-06-29 Sam Weinig <sam@webkit.org>
1445 Reviewed by Geoffrey Garen.
1447 Add inline code dealing with doubles for op_jfalse and op_jtrue.
1449 * assembler/MacroAssemblerX86Common.h:
1450 (JSC::MacroAssemblerX86Common::):
1451 (JSC::MacroAssemblerX86Common::zeroDouble):
1452 * jit/JITOpcodes.cpp:
1453 (JSC::JIT::emit_op_jfalse):
1454 (JSC::JIT::emit_op_jtrue):
1456 2009-06-28 Geoffrey Garen <ggaren@apple.com>
1458 Reviewed by Sam Weinig.
1460 Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }.
1462 SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization
1463 this enables will win much more than that back.
1466 (JSC::JIT::privateCompileCTIMachineTrampolines):
1468 * jit/JITPropertyAccess.cpp:
1469 (JSC::JIT::emit_op_method_check):
1470 (JSC::JIT::emit_op_get_by_id):
1471 (JSC::JIT::compileGetByIdHotPath):
1472 (JSC::JIT::compileGetByIdSlowCase):
1473 (JSC::JIT::patchGetByIdSelf):
1474 (JSC::JIT::privateCompilePatchGetArrayLength):
1475 (JSC::JIT::privateCompileGetByIdProto):
1476 (JSC::JIT::privateCompileGetByIdSelfList):
1477 (JSC::JIT::privateCompileGetByIdProtoList):
1478 (JSC::JIT::privateCompileGetByIdChainList):
1479 (JSC::JIT::privateCompileGetByIdChain):
1481 2009-06-26 Geoffrey Garen <ggaren@apple.com>
1483 Reviewed by Maciej Stachowiak.
1485 Standardized op_call to put { tag, payload } in { regT1, regT0 }.
1487 SunSpider and v8 report no change.
1490 (JSC::JIT::privateCompileCTIMachineTrampolines):
1492 (JSC::JIT::compileOpCallInitializeCallFrame):
1493 (JSC::JIT::compileOpCallSetupArgs):
1494 (JSC::JIT::compileOpConstructSetupArgs):
1495 (JSC::JIT::compileOpCallVarargsSetupArgs):
1496 (JSC::JIT::compileOpCallVarargs):
1497 (JSC::JIT::compileOpCall):
1498 (JSC::JIT::compileOpCallSlowCase):
1500 2009-06-26 Sam Weinig <sam@webkit.org>
1502 Reviewed by Geoffrey Garen.
1504 Handle multiplying by zero a little better by
1505 inlining the case that both operands are non-negative
1508 * assembler/MacroAssemblerX86Common.h:
1509 (JSC::MacroAssemblerX86Common::branchOr32):
1510 * jit/JITArithmetic.cpp:
1511 (JSC::JIT::emit_op_mul):
1512 (JSC::JIT::emitSlow_op_mul):
1514 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1516 Reviewed by Sam Weinig.
1518 Optimize x++ to ++x inside for loops.
1520 Sadly, no measurable speedup, but this should help with result chaining.
1523 (JSC::ForNode::emitBytecode):
1525 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1527 Reviewed by Sam Weinig.
1529 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
1531 * jit/JITArithmetic.cpp:
1532 (JSC::JIT::emitSlow_op_bitnot):
1533 (JSC::JIT::emit_op_post_inc):
1535 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1537 Reviewed by Sam Weinig.
1539 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
1541 * jit/JITArithmetic.cpp:
1542 (JSC::JIT::emit_op_bitnot):
1543 (JSC::JIT::emit_op_post_dec):
1544 (JSC::JIT::emit_op_pre_inc):
1545 (JSC::JIT::emitSlow_op_pre_inc):
1546 (JSC::JIT::emit_op_pre_dec):
1547 (JSC::JIT::emitSlow_op_pre_dec):
1549 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1551 Reviewed by Sam Weinig.
1553 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
1555 * jit/JITArithmetic.cpp:
1556 (JSC::JIT::emit_op_negate):
1557 (JSC::JIT::emitSlow_op_negate):
1559 (JSC::JIT::emit_op_construct_verify):
1560 (JSC::JIT::emitSlow_op_construct_verify):
1562 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1564 Reviewed by Sam Weinig.
1566 Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
1568 * jit/JITOpcodes.cpp:
1569 (JSC::JIT::emit_op_loop_if_true):
1570 (JSC::JIT::emit_op_jfalse):
1571 (JSC::JIT::emit_op_jtrue):
1572 (JSC::JIT::emit_op_jeq_null):
1573 (JSC::JIT::emit_op_jneq_null):
1574 (JSC::JIT::emit_op_eq_null):
1575 (JSC::JIT::emit_op_neq_null):
1577 2009-06-25 Geoffrey Garen <ggaren@apple.com>
1579 Reviewed by Sam Weinig (sort of, maybe).
1581 Fixed some ASSERTs in http/tests/security.
1583 These ASSERTs were introduced by http://trac.webkit.org/changeset/45057,
1584 but the underlying problem was actually older. http://trac.webkit.org/changeset/45057
1585 just exposed the problem by enabling optimization in more cases.
1587 The ASSERTs fired because we tested PropertySlot::slotBase() for validity,
1588 but slotBase() ASSERTs if it's invalid, so we would ASSERT before
1589 the test could happen. Solution: Remove the ASSERT. Maybe it was valid
1590 once, but it clearly goes against a pattern we've deployed of late.
1592 The underlying problem was that WebCore would re-use a PropertySlot in
1593 the case of a forwarding access, and the second use would not completely
1594 overwrite the first use. Solution: Make sure to overwrite m_offset when
1595 setting a value on a PropertySlot. (Other values already get implicitly
1596 overwritten during reuse.)
1598 * runtime/PropertySlot.h:
1599 (JSC::PropertySlot::PropertySlot):
1600 (JSC::PropertySlot::setValueSlot):
1601 (JSC::PropertySlot::setValue):
1602 (JSC::PropertySlot::setRegisterSlot):
1603 (JSC::PropertySlot::setUndefined):
1604 (JSC::PropertySlot::slotBase):
1605 (JSC::PropertySlot::clearOffset):
1607 2009-06-24 Gavin Barraclough <barraclough@apple.com>
1609 Reviewed by Geoff Garen.
1611 Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT.
1614 * jit/JITPropertyAccess.cpp:
1615 (JSC::JIT::emit_op_method_check):
1616 (JSC::JIT::emitSlow_op_method_check):
1617 (JSC::JIT::emit_op_get_by_id):
1618 (JSC::JIT::compileGetByIdHotPath):
1619 (JSC::JIT::emitSlow_op_get_by_id):
1620 (JSC::JIT::compileGetByIdSlowCase):
1622 2009-06-23 Geoffrey Garen <ggaren@apple.com>
1624 Reviewed by Sam Weinig.
1626 Bit off a tiny bit more of standardizing opcode behavior to help with result
1629 SunSpider reports no change, v8 maybe a tiny speedup.
1631 * jit/JITOpcodes.cpp:
1632 (JSC::JIT::emit_op_to_jsnumber):
1633 (JSC::JIT::emitSlow_op_to_jsnumber):
1634 (JSC::JIT::emit_op_convert_this):
1635 (JSC::JIT::emitSlow_op_convert_this):
1637 2009-06-23 Geoffrey Garen <ggaren@apple.com>
1639 Reviewed by Sam Weinig.
1641 Bit off a tiny bit more of standardizing opcode behavior to help with result
1642 caching -- including removing my old enemy, op_resolve_function, because
1643 it was non-standard, and removing it felt better than helping it limp along.
1645 SunSpider reports no change, v8 maybe a tiny speedup.
1647 * bytecode/CodeBlock.cpp:
1648 (JSC::CodeBlock::dump):
1649 * bytecode/Opcode.h:
1650 * bytecompiler/BytecodeGenerator.cpp:
1651 * bytecompiler/BytecodeGenerator.h:
1652 * interpreter/Interpreter.cpp:
1653 (JSC::Interpreter::privateExecute):
1655 (JSC::JIT::privateCompileMainPass):
1657 * jit/JITOpcodes.cpp:
1658 (JSC::JIT::emit_op_get_scoped_var):
1659 (JSC::JIT::emit_op_put_scoped_var):
1660 (JSC::JIT::emit_op_to_primitive):
1661 (JSC::JIT::emitSlow_op_to_primitive):
1665 (JSC::FunctionCallResolveNode::emitBytecode):
1667 2009-06-23 Geoffrey Garen <ggaren@apple.com>
1669 Reviewed by Sam Weinig.
1671 Bit off a tiny bit of standardizing opcode behavior to help with result
1674 0.6% SunSpider speedup. 0.3% v8 speedup.
1676 * jit/JITInlineMethods.h:
1677 (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload
1678 by loading tag before payload, to avoid stomping base/payload.
1680 * jit/JITOpcodes.cpp:
1681 (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in
1684 (JSC::JIT::emit_op_get_global_var):
1685 (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent
1686 loads while I was at it. The global object's "d" pointer never changes
1689 2009-06-23 Gavin Barraclough <barraclough@apple.com>
1691 Reviewed by Sam Weinig.
1693 Remove 'arguments' field from Register union (again).
1694 This time do so without breaking tests (radical, I know).
1696 * interpreter/CallFrame.h:
1697 (JSC::ExecState::optionalCalleeArguments):
1698 (JSC::ExecState::setArgumentCount):
1699 (JSC::ExecState::init):
1700 * interpreter/Interpreter.cpp:
1701 (JSC::Interpreter::dumpRegisters):
1702 (JSC::Interpreter::unwindCallFrame):
1703 (JSC::Interpreter::privateExecute):
1704 (JSC::Interpreter::retrieveArguments):
1705 * interpreter/Register.h:
1706 (JSC::Register::withInt):
1708 (JSC::Register::Register):
1711 (JSC::JITStubs::cti_op_tear_off_arguments):
1712 * runtime/Arguments.h:
1713 (JSC::JSActivation::copyRegisters):
1714 (JSC::Register::arguments):
1715 * runtime/JSActivation.cpp:
1716 (JSC::JSActivation::argumentsGetter):
1717 * runtime/JSActivation.h:
1719 2009-06-23 Geoffrey Garen <ggaren@apple.com>
1721 Reviewed by Sam Weinig.
1723 Removed some result register tracking cruft in preparation for a new
1724 result tracking mechanism.
1726 SunSpider reports no change.
1728 * assembler/AbstractMacroAssembler.h:
1729 * assembler/X86Assembler.h:
1730 (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in
1731 machine code; we already do this in bytecode.
1735 (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result
1736 registers, so an opcode with a timeout check can still benefit from result
1739 (JSC::JIT::privateCompileMainPass):
1740 (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister()
1741 in preparation for something new.
1744 * jit/JITArithmetic.cpp:
1745 (JSC::JIT::emit_op_jnless):
1746 (JSC::JIT::emit_op_jnlesseq):
1747 * jit/JITInlineMethods.h:
1748 (JSC::JIT::emitGetFromCallFrameHeaderPtr):
1749 (JSC::JIT::emitGetFromCallFrameHeader32):
1750 * jit/JITOpcodes.cpp:
1751 (JSC::JIT::emit_op_jmp):
1752 (JSC::JIT::emit_op_jfalse):
1753 (JSC::JIT::emit_op_jtrue):
1754 (JSC::JIT::emit_op_jeq_null):
1755 (JSC::JIT::emit_op_jneq_null):
1756 (JSC::JIT::emit_op_jneq_ptr):
1757 (JSC::JIT::emit_op_jsr):
1758 (JSC::JIT::emit_op_sret):
1759 (JSC::JIT::emit_op_jmp_scopes): ditto
1761 * jit/JITStubCall.h:
1762 (JSC::JITStubCall::JITStubCall):
1763 (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument
1764 you passed to a JIT stub, for use in emitTimeoutCheck.
1766 2009-06-23 Sam Weinig <sam@webkit.org>
1768 Reviewed by Geoffrey Garen.
1770 Remove now-useless inplace variants of binary ops.
1773 * jit/JITArithmetic.cpp:
1774 (JSC::JIT::emit_op_bitand):
1775 (JSC::JIT::emit_op_bitor):
1776 (JSC::JIT::emit_op_bitxor):
1777 (JSC::JIT::emit_op_add):
1778 (JSC::JIT::emit_op_sub):
1779 (JSC::JIT::emit_op_mul):
1781 2009-06-23 Sam Weinig <sam@webkit.org>
1783 Reviewed by Geoffrey Garen.
1785 Move off memory operands to aid in re-enabling result caching.
1787 - No regression measured.
1790 * jit/JITArithmetic.cpp:
1791 (JSC::JIT::emit_op_negate):
1792 (JSC::JIT::emit_op_jnless):
1793 (JSC::JIT::emit_op_jnlesseq):
1794 (JSC::JIT::emit_op_lshift):
1795 (JSC::JIT::emit_op_rshift):
1796 (JSC::JIT::emit_op_bitand):
1797 (JSC::JIT::emitBitAnd32Constant):
1798 (JSC::JIT::emitBitAnd32InPlace):
1799 (JSC::JIT::emit_op_bitor):
1800 (JSC::JIT::emitBitOr32Constant):
1801 (JSC::JIT::emitBitOr32InPlace):
1802 (JSC::JIT::emit_op_bitxor):
1803 (JSC::JIT::emitBitXor32Constant):
1804 (JSC::JIT::emitBitXor32InPlace):
1805 (JSC::JIT::emit_op_bitnot):
1806 (JSC::JIT::emit_op_post_inc):
1807 (JSC::JIT::emit_op_post_dec):
1808 (JSC::JIT::emit_op_pre_inc):
1809 (JSC::JIT::emitSlow_op_pre_inc):
1810 (JSC::JIT::emit_op_pre_dec):
1811 (JSC::JIT::emitSlow_op_pre_dec):
1812 (JSC::JIT::emit_op_add):
1813 (JSC::JIT::emitAdd32Constant):
1814 (JSC::JIT::emitAdd32InPlace):
1815 (JSC::JIT::emitSlow_op_add):
1816 (JSC::JIT::emitSlowAdd32Constant):
1817 (JSC::JIT::emit_op_sub):
1818 (JSC::JIT::emitSlow_op_sub):
1819 (JSC::JIT::emitSub32ConstantLeft):
1820 (JSC::JIT::emitSub32ConstantRight):
1821 (JSC::JIT::emitSub32InPlaceLeft):
1822 (JSC::JIT::emitSub32InPlaceRight):
1823 (JSC::JIT::emitBinaryDoubleOp):
1824 (JSC::JIT::emit_op_mul):
1825 (JSC::JIT::emitMul32InPlace):
1826 (JSC::JIT::emit_op_div):
1827 (JSC::JIT::emit_op_mod):
1829 (JSC::JIT::compileOpCallVarargs):
1830 * jit/JITOpcodes.cpp:
1831 (JSC::JIT::emit_op_loop_if_less):
1832 (JSC::JIT::emit_op_loop_if_lesseq):
1833 (JSC::JIT::emit_op_instanceof):
1834 (JSC::JIT::emit_op_to_primitive):
1835 (JSC::JIT::emit_op_not):
1836 (JSC::JIT::emit_op_jneq_ptr):
1837 (JSC::JIT::emit_op_eq):
1838 (JSC::JIT::emit_op_neq):
1839 (JSC::JIT::emit_op_to_jsnumber):
1840 * jit/JITPropertyAccess.cpp:
1841 (JSC::JIT::emit_op_get_by_val):
1842 (JSC::JIT::emit_op_put_by_val):
1844 2009-06-23 Geoffrey Garen <ggaren@apple.com>
1846 Reviewed by Sam Weinig.
1848 Fixed some missing and/or misplaced labels in bytecode generation, so
1849 we don't have to work around them in JIT code generation.
1851 * bytecompiler/BytecodeGenerator.cpp:
1852 (JSC::BytecodeGenerator::emitJumpSubroutine):
1854 (JSC::TryNode::emitBytecode):
1856 2009-06-22 Geoffrey Garen <ggaren@apple.com>
1858 Reviewed by Sam Weinig.
1860 For member function calls, emit "this" directly into the "this" slot
1861 for the function call, instead of moving it there later. This reduces
1862 time spent in op_mov during certain calls, like "a.b.c()".
1864 1%-2% speedup on v8, mostly richards and delta-blue.
1867 (JSC::FunctionCallDotNode::emitBytecode):
1869 2009-06-22 Gavin Barraclough <barraclough@apple.com>
1871 Reviewed by Sam Weinig.
1873 Remove 'arguments' field from Register union. Having JSCell derived types in the union is
1874 dangerous since it opens the possibility for the field to be written as a raw pointer but
1875 then read as a JSValue. This will lead to statle data being read for the tag, which may
1876 be dangerous. Having removed Arguments* types form Register, all arguments objects must
1877 always explicitly be stored in the register file as JSValues.
1879 * interpreter/CallFrame.h:
1880 (JSC::ExecState::optionalCalleeArguments):
1881 * interpreter/Interpreter.cpp:
1882 (JSC::Interpreter::unwindCallFrame):
1883 (JSC::Interpreter::privateExecute):
1884 (JSC::Interpreter::retrieveArguments):
1885 * interpreter/Register.h:
1888 (JSC::JITStubs::cti_op_tear_off_arguments):
1889 * runtime/Arguments.h:
1890 (JSC::JSActivation::copyRegisters):
1891 * runtime/JSActivation.cpp:
1892 (JSC::JSActivation::argumentsGetter):
1893 * runtime/JSActivation.h:
1895 2009-06-03 Sam Weinig <sam@webkit.org>
1897 Reviewed by Geoffrey Garen.
1899 Add back known this value optimization by abstracting
1900 slow case if not JSCell jumps.
1904 (JSC::JIT::compileOpCallVarargs):
1905 (JSC::JIT::compileOpCallVarargsSlowCase):
1906 (JSC::JIT::compileOpCall):
1907 (JSC::JIT::compileOpCallSlowCase):
1908 * jit/JITInlineMethods.h:
1909 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1910 (JSC::JIT::linkSlowCaseIfNotJSCell):
1911 * jit/JITOpcodes.cpp:
1912 (JSC::JIT::emit_op_instanceof):
1913 (JSC::JIT::emitSlow_op_instanceof):
1914 * jit/JITPropertyAccess.cpp:
1915 (JSC::JIT::emit_op_get_by_val):
1916 (JSC::JIT::emitSlow_op_get_by_val):
1917 (JSC::JIT::emit_op_put_by_val):
1918 (JSC::JIT::emitSlow_op_put_by_val):
1919 (JSC::JIT::emit_op_get_by_id):
1920 (JSC::JIT::emitSlow_op_get_by_id):
1921 (JSC::JIT::emit_op_put_by_id):
1922 (JSC::JIT::emitSlow_op_put_by_id):
1924 2009-06-01 Geoffrey Garen <ggaren@apple.com>
1926 Reviewed by Sam Weinig.
1928 Fixed some of the regression in crypto-aes.js. (8.5% speedup in
1931 SunSpider reports no change overall.
1933 Division was producing double results, which took the slow path through
1936 Strangely, all my attempts at versions of this patch that modified array
1937 access code to accept ints encoded as doubles along the fast or slow paths
1938 were regressions. So I did this instead.
1940 * jit/JITArithmetic.cpp:
1941 (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try
1942 to turn the result into an int. Don't just do int division, though, because
1943 testing shows it to be slower than SSE double division, and the corner
1944 cases are pretty complicated / lengthy on top of that. Also, don't try
1945 to canonicalize division of known tiny numerators into ints, since that's a
1948 2009-05-26 Geoffrey Garen <ggaren@apple.com>
1950 Reviewed by Oliver Hunt.
1952 Fixed a regression caused by my recent fix for NaN.
1954 * jit/JITArithmetic.cpp:
1955 (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse
1956 order, like the ChangeLog said we would, bokay?
1958 2009-05-26 Geoffrey Garen <ggaren@apple.com>
1960 Reviewed by Sam Weinig and Oliver Hunt.
1962 Fixed two edge cases in %:
1964 - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1,
1965 which will signal a hardware exception due to overflow.
1967 - In the case of a zero remainder, be sure to store negative zero if the
1970 SunSpider reports no change.
1972 * jit/JITArithmetic.cpp:
1973 (JSC::JIT::emit_op_mod):
1974 (JSC::JIT::emitSlow_op_mod):
1976 2009-05-25 Geoffrey Garen <ggaren@apple.com>
1978 Reviewed by Maciej Stachowiak.
1980 Fixed a regression when comparing to NaN.
1982 * jit/JITArithmetic.cpp:
1983 (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the
1984 comparison in reverse order, and jump if the result is below or
1985 below-or-equal. This ensures that we do jump in the case of NaN.
1987 2009-05-25 Geoffrey Garen <ggaren@apple.com>
1989 Reviewed by Oliver Hunt.
1991 SunSpider says no change.
1993 Fixed regressions in fast/js/var-declarations-shadowing.html and
1994 fast/js/equality.html, caused by recent == and != optimizations.
1997 (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always
1998 numeric or string comparison. If the second operand is an object, you
1999 need to ToPrimitive it, and start all over again. Also, I wrote out each
2000 of the possible cases explicitly, to cut down on redundant branching.
2002 2009-05-25 Sam Weinig <sam@webkit.org>
2004 Reviewed by Mark Rowe.
2006 Fix bug in fast/js/constant-folding.html where we were not negating
2009 * jit/JITArithmetic.cpp:
2010 (JSC::JIT::emit_op_negate):
2012 2009-05-23 Geoffrey Garen <ggaren@apple.com>
2014 Reviewed by Oliver Hunt.
2016 Refactored new slow case codegen for == and !=.
2018 SunSpider reports no change, maybe a tiny speedup.
2020 * jit/JITOpcodes.cpp:
2021 (JSC::JIT::emitSlow_op_eq):
2022 (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation,
2023 instead of *32, to make it portable to 64bit. Reorganized the string
2024 and generic cases to make their control flow a little clearer.
2026 2009-05-23 Geoffrey Garen <ggaren@apple.com>
2028 Reviewed by Maciej Stachowiak.
2030 Optimized == and != for our new value representation -- especially for strings.
2032 14% speedup on date-format-tofte.
2034 * jit/JITOpcodes.cpp:
2035 (JSC::JIT::emit_op_eq):
2036 (JSC::JIT::emitSlow_op_eq):
2037 (JSC::JIT::emit_op_neq):
2038 (JSC::JIT::emitSlow_op_neq):
2039 * jit/JITStubCall.h:
2040 (JSC::JITStubCall::JITStubCall):
2042 (JSC::JITStubs::cti_op_eq):
2043 (JSC::JITStubs::cti_op_eq_strings):
2044 (JSC::JITStubs::cti_op_call_eval):
2047 * runtime/JSValue.h:
2049 2009-05-22 Sam Weinig <sam@webkit.org>
2051 Reviewed by Gavin Barraclough.
2053 Fix non-SSE enabled builds.
2055 * jit/JITArithmetic.cpp:
2056 (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub.
2057 (JSC::JIT::emitSlow_op_sub): Ditto.
2059 2009-05-22 Geoffrey Garen <ggaren@apple.com>
2061 Reviewed by Sam Weinig.
2063 Here's a thought: let's not take a jit stub call just to multiply by 1,
2066 imul doesn't set the zero flag, so to test for a zero result, we need
2067 an explicit instruction. (Luckily, it does set the overflow flag, so
2068 we can still use that.)
2071 * jit/JITArithmetic.cpp:
2072 (JSC::JIT::emit_op_mul):
2073 (JSC::JIT::emitSlow_op_mul):
2074 (JSC::JIT::emitMul32InPlace):
2076 2009-05-22 Sam Weinig <sam@webkit.org>
2078 Reviewed by Geoffrey "Premature Commit" Garen.
2080 Add back constant integer cases for op_add.
2083 * jit/JITArithmetic.cpp:
2084 (JSC::JIT::emit_op_add):
2085 (JSC::JIT::emitAdd32Constant):
2086 (JSC::JIT::emitSlow_op_add):
2087 (JSC::JIT::emitSlowAdd32Constant):
2088 * jit/JITInlineMethods.h:
2089 (JSC::JIT::getConstantOperandImmediateDouble):
2090 (JSC::JIT::isOperandConstantImmediateDouble):
2092 2009-05-22 Geoffrey Garen <ggaren@apple.com>
2094 Reviewed by Sam Weinig.
2096 Added fast double cases for op_jnless and op_jnlesseq.
2098 * assembler/AbstractMacroAssembler.h:
2099 (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by
2102 * assembler/X86Assembler.h:
2103 (JSC::X86Assembler::ucomisd_rm): New method for comparing register to
2107 * jit/JITArithmetic.cpp:
2108 (JSC::JIT::emit_op_jnless):
2109 (JSC::JIT::emitSlow_op_jnless):
2110 (JSC::JIT::emit_op_jnlesseq):
2111 (JSC::JIT::emitSlow_op_jnlesseq):
2112 (JSC::JIT::emit_op_add):
2113 (JSC::JIT::emit_op_sub):
2114 (JSC::JIT::emitBinaryDoubleOp):
2115 (JSC::JIT::emit_op_mul):
2116 (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump
2117 operations in addition to operations with explicit result registers.
2119 * jit/JITInlineMethods.h:
2120 (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients
2121 can track multiple jumps to the same slow case condition together.
2123 2009-05-21 Sam Weinig <sam@webkit.org>
2125 Reviewed by Gavin Barraclough.
2127 Implement op_negate inline fast cases.
2129 * assembler/MacroAssemblerX86Common.h:
2130 (JSC::MacroAssemblerX86Common::neg32):
2131 * assembler/X86Assembler.h:
2132 (JSC::X86Assembler::):
2133 (JSC::X86Assembler::negl_m):
2134 (JSC::X86Assembler::xorpd_rr):
2136 (JSC::JIT::privateCompileMainPass):
2137 (JSC::JIT::privateCompileSlowCases):
2139 * jit/JITArithmetic.cpp:
2140 (JSC::JIT::emit_op_negate):
2141 (JSC::JIT::emitSlow_op_negate):
2143 2009-05-20 Sam Weinig <sam@webkit.org>
2145 Reviewed by Gavin Barraclough.
2147 Update the patchOffsetGetByIdSlowCaseCall constant for the
2148 case that OPCODE_SAMPLING is enabled.
2152 2009-05-20 Geoffrey Garen <ggaren@apple.com>
2154 Reviewed by Sam Weinig.
2156 Added support for inline subtraction of doubles.
2158 * jit/JITArithmetic.cpp:
2159 (JSC::JIT::emit_op_sub):
2160 (JSC::JIT::emitSlow_op_sub):
2161 (JSC::JIT::emitSlowSub32InPlaceLeft):
2162 (JSC::JIT::emitBinaryDoubleOp):
2164 2009-05-20 Sam Weinig <sam@webkit.org>
2166 Reviewed by Geoffrey Garen.
2168 Added support for inline division.
2170 * assembler/X86Assembler.h:
2171 (JSC::X86Assembler::):
2172 (JSC::X86Assembler::divsd_rr):
2173 (JSC::X86Assembler::divsd_mr):
2174 * bytecode/CodeBlock.cpp:
2175 (JSC::CodeBlock::dump):
2176 * bytecode/Opcode.h:
2177 * bytecompiler/BytecodeGenerator.cpp:
2178 (JSC::BytecodeGenerator::emitBinaryOp):
2179 * interpreter/Interpreter.cpp:
2180 (JSC::Interpreter::privateExecute):
2182 (JSC::JIT::privateCompileMainPass):
2183 (JSC::JIT::privateCompileSlowCases):
2185 * jit/JITArithmetic.cpp:
2186 (JSC::JIT::emitBinaryDoubleOp):
2187 (JSC::JIT::emit_op_div):
2188 (JSC::JIT::emitSlow_op_div):
2190 2009-05-20 Geoffrey Garen <ggaren@apple.com>
2192 Reviewed by Sam Weinig.
2194 Added support for inline addition of doubles.
2196 * jit/JITArithmetic.cpp:
2197 (JSC::JIT::emit_op_add):
2198 (JSC::JIT::emitSlow_op_add):
2199 (JSC::JIT::emitSlowAdd32InPlace):
2200 (JSC::JIT::emitBinaryDoubleOp):
2201 (JSC::JIT::emit_op_mul):
2202 (JSC::JIT::emitSlow_op_mul):
2204 2009-05-20 Geoffrey Garen <ggaren@apple.com>
2206 Reviewed by Sam Weinig.
2208 Factored inline double operations into a helper function, so that we
2209 can reuse this code for other math operations.
2212 * jit/JITArithmetic.cpp:
2213 (JSC::JIT::emitBinaryDoubleOp):
2214 (JSC::JIT::emit_op_mul):
2216 (JSC::JIT::compileOpCallInitializeCallFrame):
2218 2009-05-20 Geoffrey Garen <ggaren@apple.com>
2220 Reviewed by Sam Weinig.
2222 Added support for inline multiplication of doubles.
2224 * assembler/X86Assembler.h:
2225 (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an
2226 int32 into a double register.
2228 * jit/JITArithmetic.cpp:
2229 (JSC::JIT::emit_op_mul):
2230 (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic.
2233 * jit/JITInlineMethods.h:
2234 (JSC::JIT::addressFor): New function, useful for addressing a JSValue's
2235 full 64bits as a double.
2237 2009-05-19 Sam Weinig <sam@webkit.org>
2239 Reviewed by Geoffrey Garen.
2241 Implement and enable optimized calls.
2244 (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards
2245 around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink).
2246 Update the trampolines to account for the new JSValue representation.
2247 (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue.
2250 (JSC::JIT::compileOpCall): Update to account for the new JSValue representation
2251 (JSC::JIT::compileOpCallSlowCase): Ditto.
2253 * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard.
2255 * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL.
2257 2009-05-19 Sam Weinig <sam@webkit.org>
2259 Reviewed by Geoffrey Garen.
2261 Implement and enable optimized property access.
2263 * assembler/AbstractMacroAssembler.h: Fix comment.
2265 (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline
2266 and implement the string length trampoline.
2267 * jit/JIT.h: Add new constants for patch offsets.
2268 * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h.
2269 * jit/JITPropertyAccess.cpp:
2270 (JSC::JIT::emit_op_get_by_id):
2271 (JSC::JIT::emitSlow_op_get_by_id):
2272 (JSC::JIT::emit_op_put_by_id):
2273 (JSC::JIT::emitSlow_op_put_by_id):
2274 (JSC::JIT::compilePutDirectOffset):
2275 (JSC::JIT::compileGetDirectOffset):
2276 (JSC::JIT::privateCompilePutByIdTransition):
2277 (JSC::JIT::patchGetByIdSelf):
2278 (JSC::JIT::patchPutByIdReplace):
2279 (JSC::JIT::privateCompilePatchGetArrayLength):
2280 (JSC::JIT::privateCompileGetByIdProto):
2281 (JSC::JIT::privateCompileGetByIdSelfList):
2282 (JSC::JIT::privateCompileGetByIdProtoList):
2283 (JSC::JIT::privateCompileGetByIdChainList):
2284 (JSC::JIT::privateCompileGetByIdChain):
2285 * jit/JITStubCall.h:
2286 (JSC::JITStubCall::addArgument): Add version of addArgument that takes
2287 two registers for the tag and payload.
2289 (JSC::JITStubs::JITStubs): Remove array length trampoline pointer.
2290 (JSC::JITStubs::cti_op_get_by_id_self_fail):
2292 * runtime/JSObject.h:
2293 (JSC::JSObject::JSObject): Move m_inheritorID below the property storage
2294 to align it to a 16 byte boundary.
2295 * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
2296 * wtf/StdLibExtras.h: Move FIELD_OFFSET here.
2298 2009-05-17 Sam Weinig <sam@webkit.org>
2300 Reviewed by Geoffrey Garen.
2302 Remove unneeded ExecState parameter from the number JSValue constructors.
2304 * runtime/JSValue.h:
2307 (JSC::JSValue::JSValue):
2309 2009-05-15 Sam Weinig <sam@webkit.org>
2311 Reviewed by Geoffrey Garen.
2313 Implemented fast path for op_put_by_val when putting to arrays.
2315 * jit/JITPropertyAccess.cpp:
2316 (JSC::JIT::emit_op_put_by_val):
2317 (JSC::JIT::emitSlow_op_put_by_val):
2319 2009-05-15 Geoffrey Garen <ggaren@apple.com> (Mostly by Sam)
2321 Reviewed by Sam Weinig.
2323 Implemented fast path for op_get_by_val when accessing array.
2326 * jit/JITPropertyAccess.cpp:
2327 (JSC::JIT::emit_op_get_by_val):
2328 (JSC::JIT::emitSlow_op_get_by_val):
2330 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2332 Reviewed by Sam Weinig.
2334 Fixed a failure in fast/js/math-transforms.html caused by failing to
2335 preserve -0 in multiplication.
2337 * assembler/X86Assembler.h:
2338 (JSC::X86Assembler::jz):
2339 * jit/JITArithmetic.cpp:
2340 (JSC::JIT::emit_op_mul):
2341 (JSC::JIT::emitSlow_op_mul):
2342 (JSC::JIT::emitMul32Constant):
2343 (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
2344 doing multiplication. Use a slow case to get these right.
2346 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2348 Reviewed by Sam Weinig.
2350 Fixed a bug in the varargs calling convention.
2353 (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1,
2354 since that's where ctiVirtualCall expects it to be.
2356 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2358 Reviewed by Sam Weinig.
2360 Fixed a small bug in instanceof's looping code.
2362 * jit/JITOpcodes.cpp:
2363 (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype,
2364 so only loop when *not* equal to NULL.
2366 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2368 Reviewed by Sam Weinig.
2370 Fixed a small bug in instanceof's result writing code.
2372 * jit/JITOpcodes.cpp:
2373 (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits
2376 2009-05-14 Sam Weinig <sam@webkit.org>
2378 Reviewed by Geoffrey Garen.
2380 Removed an invalid assertion in cti_op_urshift which
2381 depended on a fast path for op_urshift which has
2385 (JSC::JITStubs::cti_op_urshift):
2387 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2389 Reviewed by Sam Weinig.
2391 Fixed loop_if_true, which had the same reversed test that jtrue had.
2393 * jit/JITOpcodes.cpp:
2394 (JSC::JIT::emit_op_loop_if_true):
2396 2009-05-14 Sam Weinig <sam@webkit.org>
2398 Reviewed by Geoffrey Garen.
2400 In op_neq, we apparently want to check that one value
2401 does *not* equal another. Go figure.
2403 * jit/JITOpcodes.cpp:
2404 (JSC::JIT::emit_op_neq):
2406 2009-05-14 Sam Weinig <sam@webkit.org>
2408 Reviewed by Geoffrey Garen.
2410 The slow case of op_mod should call op_mod's jit stub,
2411 not op_mul. That would be dumb.
2413 * jit/JITArithmetic.cpp:
2414 (JSC::JIT::emitSlow_op_mod):
2416 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2418 Reviewed by Sam Weinig.
2420 Fixed problems when using 'arguments' due to a half-initialized register.
2422 * interpreter/CallFrame.h:
2423 (JSC::ExecState::setCalleeArguments):
2424 (JSC::ExecState::init): Require a full JSValue when setting up the
2425 'arguments' virtual register, since this register is accessible from JIT
2426 code and bytecode, and needs to be a true JSValue.
2428 * interpreter/CallFrameClosure.h:
2429 (JSC::CallFrameClosure::resetCallFrame): ditto
2431 * interpreter/Interpreter.cpp:
2432 (JSC::Interpreter::privateExecute): ditto
2434 * interpreter/Register.h: Removed the constructor that allowed assignment
2435 of a JSArguments* to a register. That is not safe. See above.
2438 (JSC::JITStubs::cti_op_create_arguments):
2439 (JSC::JITStubs::cti_op_create_arguments_no_params): ditto
2441 2009-05-14 Sam Weinig <sam@webkit.org>
2443 Reviewed by Geoffrey Garen.
2445 We really want to go to the slow case in op_jfalse and
2446 op_jtrue if the value is *not* boolean.
2448 * jit/JITOpcodes.cpp:
2449 (JSC::JIT::emit_op_jfalse):
2450 (JSC::JIT::emit_op_jtrue):
2452 2009-05-14 Sam Weinig <sam@webkit.org>
2454 Reviewed by Geoffrey Garen.
2456 Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq
2457 if the first operand is a constant.
2459 * jit/JITOpcodes.cpp:
2460 (JSC::JIT::emit_op_loop_if_less):
2461 (JSC::JIT::emit_op_loop_if_lesseq):
2463 2009-05-14 Sam Weinig <sam@webkit.org>
2465 Reviewed by Geoffrey Garen.
2467 Added missing return in op_jnless and op_jnlesseq.
2469 * jit/JITArithmetic.cpp:
2470 (JSC::JIT::emit_op_jnless):
2471 (JSC::JIT::emit_op_jnlesseq):
2473 2009-05-14 Sam Weinig <sam@webkit.org>
2475 Reviewed by Geoffrey Garen.
2477 Load constants into the the register file as a temporary measure to
2478 aid bring up. This allows us to use to treat constants like any
2479 other virtual register.
2481 * jit/JITOpcodes.cpp:
2482 (JSC::JIT::emit_op_enter):
2483 (JSC::JIT::emit_op_enter_with_activation):
2485 2009-05-14 Geoffrey Garen <ggaren@apple.com>
2487 Reviewed by Sam Weinig.
2489 Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.
2491 * assembler/MacroAssemblerX86Common.h:
2492 (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
2493 faster than set32, and the new value representation usually doesn't
2498 * jit/JITInlineMethods.h:
2499 (JSC::JIT::emitLoadTag):
2500 (JSC::JIT::emitLoadPayload): Added helper functions for dealing with
2501 constants. Eventually, we should write special cases for all constants,
2502 but these are helpful in the short term.
2504 * jit/JITOpcodes.cpp:
2505 (JSC::JIT::compileOpStrictEq):
2506 (JSC::JIT::emitSlow_op_stricteq):
2507 (JSC::JIT::emitSlow_op_nstricteq): teh opcodez.
2509 * runtime/JSValue.h:
2511 (JSC::JSValue::isDouble): Added a LowestTag for clarity.
2513 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2515 Reviewed by Sam Weinig.
2517 Fixed some bugs in host function calls.
2521 * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
2522 which is how JSValues are now returned. Also changed the code that
2523 passes thisValue to pass the full 64bits of the value. Also added
2524 an #error compiler directive to other platform builds, since the JSValue
2525 return signature probably won't return in edx:eax on those platforms,
2526 and we'll have to investigate a solution.
2528 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2530 Reviewed by Sam Weinig.
2532 Removed parameters from functions that are intended never to use their
2535 * jit/JITPropertyAccess.cpp:
2536 (JSC::JIT::emitSlow_op_get_by_val):
2537 (JSC::JIT::emitSlow_op_put_by_val):
2539 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2541 Reviewed by Sam Weinig.
2543 Ported op_instance_of from TOT. It's basically the same, but some register
2544 stuff changed to memory stuff.
2546 * jit/JITInlineMethods.h:
2547 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
2548 (JSC::JIT::emitStore): Changed to use helper functions.
2550 * jit/JITOpcodes.cpp:
2551 (JSC::JIT::emit_op_instanceof):
2552 (JSC::JIT::emitSlow_op_instanceof): Ported from TOT.
2554 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2556 Reviewed by Gavin Barraclough.
2558 Added a comment to explain an exception-handling subtelty that we found
2559 hard to remember when reviewing my last patch.
2561 * jit/JITOpcodes.cpp:
2562 (JSC::JIT::emit_op_catch):
2564 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2566 Reviewed by Sam Weinig.
2568 Implemented try/catch.
2570 * jit/JITOpcodes.cpp:
2571 (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction.
2572 (JSC::JIT::emit_op_catch): Filled out.
2574 2009-05-13 Sam Weinig <sam@webkit.org>
2576 Reviewed by Geoffrey Garen.
2578 Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null
2580 * jit/JITOpcodes.cpp:
2581 (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its
2584 (JSC::JIT::emit_op_loop_if_true): Similar to the old version
2585 in that it tries to do the integer case first and reduce the
2586 number of jumps you might need to take.
2587 (JSC::JIT::emitSlow_op_loop_if_true):
2589 (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only
2590 the inverse and without a timeout check.
2591 (JSC::JIT::emitSlow_op_jfalse):
2593 (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except
2594 without the timeout check.
2595 (JSC::JIT::emitSlow_op_jtrue):
2597 (JSC::JIT::emit_op_jeq_null): Very similar to the implementation
2598 of op_eq, except it takes jumps instead of copying the condition
2600 (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq.
2602 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2604 Reviewed by Sam Weinig.
2606 Implemented op_call_varargs.
2609 (JSC::JIT::compileOpCallVarargsSetupArgs):
2610 (JSC::JIT::compileOpCallVarargs):
2611 (JSC::JIT::emit_op_call):
2612 (JSC::JIT::emit_op_call_eval):
2613 (JSC::JIT::emit_op_load_varargs):
2614 (JSC::JIT::emit_op_call_varargs):
2615 (JSC::JIT::emit_op_construct):
2616 * jit/JITOpcodes.cpp:
2617 (JSC::JIT::emit_op_jneq_ptr):
2619 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2621 Reviewed by Sam Weinig.
2623 Implemented op_call_eval.
2626 (JSC::JIT::compileOpCallVarargsSetupArgs):
2627 (JSC::JIT::compileOpCall):
2628 * jit/JITStubCall.h:
2629 (JSC::CallEvalJITStub::CallEvalJITStub):
2631 2009-05-13 Sam Weinig <sam@webkit.org>
2633 Reviewed by Gavin Barraclough.
2635 Implemented op_not. (Gavin did most of the work!)
2637 * jit/JITOpcodes.cpp:
2638 (JSC::JIT::emit_op_not):
2639 (JSC::JIT::emitSlow_op_not):
2641 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2643 Reviewed by Sam Weinig.
2645 Implemented op_global_resolve.
2647 * jit/JITOpcodes.cpp:
2648 (JSC::JIT::emit_op_loop_if_less):
2649 (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed
2652 (JSC::JIT::emit_op_resolve_global):
2654 (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code,
2655 but we need two reads and a TimesEight step in order to account for the
2659 (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*,
2660 to avoid having to pass an irrelevant tag pointer to the stub.
2662 2009-05-13 Sam Weinig <sam@webkit.org>
2664 Reviewed by Geoffrey Garen.
2666 Implemented op_to_jsnumber.
2668 * jit/JITOpcodes.cpp:
2669 (JSC::JIT::emit_op_to_jsnumber):
2670 (JSC::JIT::emitSlow_op_to_jsnumber):
2672 2009-05-13 Sam Weinig <sam@webkit.org>
2674 Reviewed by Geoffrey Garen.
2676 Implemented op_convert_this.
2678 * jit/JITOpcodes.cpp:
2679 (JSC::JIT::emit_op_convert_this):
2680 (JSC::JIT::emitSlow_op_convert_this):
2682 2009-05-13 Geoffrey Garen <ggaren@apple.com>
2684 Reviewed by Sam Weinig.
2686 Got basic JS function and constructor calls working.
2689 (JSC::JIT::privateCompileCTIMachineTrampolines):
2692 (JSC::JIT::compileOpCallSetupArgs):
2693 (JSC::JIT::compileOpCallVarargsSetupArgs):
2694 (JSC::JIT::compileOpConstructSetupArgs):
2695 (JSC::JIT::emit_op_ret):
2696 (JSC::JIT::emit_op_construct_verify):
2697 (JSC::JIT::emitSlow_op_construct_verify):
2698 (JSC::JIT::emitSlow_op_call):
2699 (JSC::JIT::emitSlow_op_call_eval):
2700 (JSC::JIT::emitSlow_op_call_varargs):
2701 (JSC::JIT::emitSlow_op_construct):
2702 (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out.
2704 * jit/JITInlineMethods.h:
2705 (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
2706 (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
2707 since I wanted to avoid the complexity of revamping the API here while
2708 trying to bring it up. Eventually, we should re-remove all of these functions.
2710 (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
2711 not silence me, Sam Weinig! The world will know that you are a crufty,
2712 crufty, crufty programmer!!!
2714 * jit/JITOpcodes.cpp:
2717 * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
2718 and off-by-one error was causing stack misalignment.
2720 2009-05-13 Sam Weinig <sam@webkit.org>
2722 Reviewed by Geoffrey Garen.
2724 Implement op_eq_null and op_neq_null.
2726 * assembler/MacroAssemblerX86Common.h:
2727 (JSC::MacroAssemblerX86Common::set8):
2728 (JSC::MacroAssemblerX86Common::setTest8):
2729 * jit/JITOpcodes.cpp:
2730 (JSC::JIT::emit_op_stricteq):
2731 (JSC::JIT::emitSlow_op_stricteq):
2732 (JSC::JIT::emit_op_nstricteq):
2733 (JSC::JIT::emitSlow_op_nstricteq):
2734 (JSC::JIT::emit_op_eq_null):
2735 (JSC::JIT::emit_op_neq_null):
2738 2009-05-12 Sam Weinig <sam@webkit.org>
2740 Reviewed by Geoffrey Garen.
2742 Implement op_new_error.
2744 * jit/JITOpcodes.cpp:
2745 (JSC::JIT::emit_op_new_error):
2746 * jit/JITStubCall.h:
2747 (JSC::JITStubCall::addArgument): Add a version of addArgument
2748 that takes a constant JSValue.
2750 2009-05-12 Sam Weinig <sam@webkit.org>
2752 Reviewed by Geoffrey Garen.
2754 Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister.
2759 2009-05-12 Sam Weinig <sam@webkit.org>
2761 Reviewed by Geoffrey Garen.
2763 Implement op_to_primitive and op_next_pname.
2765 * jit/JITOpcodes.cpp:
2766 (JSC::JIT::emitSlow_op_construct_verify):
2767 (JSC::JIT::emit_op_to_primitive):
2768 (JSC::JIT::emitSlow_op_to_primitive):
2769 (JSC::JIT::emitSlow_op_loop_if_true):
2770 (JSC::JIT::emit_op_jtrue):
2771 (JSC::JIT::emit_op_next_pname):
2773 2009-05-12 Sam Weinig <sam@webkit.org>
2775 Reviewed by Geoffrey Garen.
2777 Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and
2781 * jit/JITInlineMethods.h:
2783 (JSC::JIT::payloadFor):
2784 (JSC::JIT::emitLoad):
2785 (JSC::JIT::emitStore):
2786 (JSC::JIT::emitLoadReturnValue):
2787 * jit/JITOpcodes.cpp:
2788 (JSC::JIT::emit_op_get_global_var):
2789 (JSC::JIT::emit_op_put_global_var):
2790 (JSC::JIT::emit_op_get_scoped_var):
2791 (JSC::JIT::emit_op_put_scoped_var):
2792 (JSC::JIT::emit_op_unexpected_load):
2794 2009-05-12 Geoffrey Garen <ggaren@apple.com>
2796 Reviewed by Sam Weinig.
2798 Added overflow handling to op_sub.
2801 * jit/JITArithmetic.cpp:
2802 (JSC::JIT::emitSlow_op_sub):
2803 (JSC::JIT::emitSlowSub32InPlaceLeft):
2805 2009-05-12 Sam Weinig <sam@webkit.org>
2807 Reviewed by Geoffrey Garen.
2809 Remove a function call by folding op_get_by_id and op_put_by_id into
2810 their respective compile functions.
2813 * jit/JITPropertyAccess.cpp:
2814 (JSC::JIT::emit_op_get_by_id):
2815 (JSC::JIT::emitSlow_op_get_by_id):
2816 (JSC::JIT::emit_op_put_by_id):
2817 (JSC::JIT::emitSlow_op_put_by_id):
2819 2009-05-12 Sam Weinig <sam@webkit.org>
2821 Reviewed by Geoffrey Garen.
2823 Make JITStubCall work in 64bit by making the stack index
2824 step dependent on the size of void*.
2826 * jit/JITStubCall.h:
2827 (JSC::JITStubCall::JITStubCall):
2828 (JSC::JITStubCall::addArgument):
2830 2009-05-12 Sam Weinig <sam@webkit.org>
2832 Reviewed by Geoffrey Garen.
2834 Implement simple version of property access opcodes
2835 which just call a stub functions.
2837 * jit/JITOpcodes.cpp:
2838 * jit/JITPropertyAccess.cpp:
2839 (JSC::JIT::emitSlow_op_put_by_id):
2840 (JSC::JIT::emitSlow_op_get_by_id):
2841 (JSC::JIT::emit_op_get_by_val):
2842 (JSC::JIT::emitSlow_op_get_by_val):
2843 (JSC::JIT::emit_op_put_by_val):
2844 (JSC::JIT::emitSlow_op_put_by_val):
2845 (JSC::JIT::emit_op_put_by_index):
2846 (JSC::JIT::emit_op_put_getter):
2847 (JSC::JIT::emit_op_put_setter):
2848 (JSC::JIT::emit_op_del_by_id):
2849 (JSC::JIT::compileGetByIdHotPath):
2850 (JSC::JIT::compilePutByIdHotPath):
2851 * jit/JITStubCall.h:
2852 (JSC::JITStubCall::addArgument):
2855 2009-05-12 Geoffrey Garen <ggaren@apple.com>
2857 Reviewed by Sam Weinig.
2859 Added work-around for XCode debugging echo problem.
2864 2009-05-12 Geoffrey Garen <ggaren@apple.com>
2866 Reviewed by Sam Weinig.
2868 Added overflow handling to op_add.
2871 * jit/JITArithmetic.cpp:
2872 (JSC::JIT::emitSlow_op_add):
2873 (JSC::JIT::emitSlowAdd32InPlace):
2875 2009-05-12 Sam Weinig <sam@webkit.org>
2877 Reviewed by Geoffrey Garen.
2879 Add slow cases for op_jnless or emit_op_jnlesseq.
2881 * jit/JITArithmetic.cpp:
2882 (JSC::JIT::emitSlow_op_jnless):
2883 (JSC::JIT::emitSlow_op_jnlesseq):
2885 2009-05-12 Sam Weinig <sam@webkit.org>
2887 Reviewed by Geoffrey Garen.
2889 Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq.
2890 No slow cases for op_jnless or emit_op_jnlesseq yet.
2892 * jit/JITArithmetic.cpp:
2893 (JSC::JIT::emit_op_jnless):
2894 (JSC::JIT::emitSlow_op_jnless):
2895 (JSC::JIT::emit_op_jnlesseq):
2896 (JSC::JIT::emitSlow_op_jnlesseq):
2897 * jit/JITOpcodes.cpp:
2898 (JSC::JIT::emit_op_loop_if_less):
2899 (JSC::JIT::emitSlow_op_loop_if_less):
2900 (JSC::JIT::emit_op_loop_if_lesseq):
2901 (JSC::JIT::emitSlow_op_loop_if_lesseq):
2903 2009-05-12 Sam Weinig <sam@webkit.org>
2905 Reviewed by Geoffrey Garen.
2907 Turn the RECORD_JUMP_TARGET macro into an inline function.
2910 * jit/JITInlineMethods.h:
2911 (JSC::JIT::recordJumpTarget):
2912 * jit/JITOpcodes.cpp:
2913 (JSC::JIT::emit_op_jmp):
2914 (JSC::JIT::emit_op_jsr):
2915 (JSC::JIT::emit_op_jmp_scopes):
2917 2009-05-12 Sam Weinig <sam@webkit.org>
2919 Add MacroAssemblerX86Common::set8 to fix the build.
2921 * assembler/MacroAssemblerX86Common.h:
2922 (JSC::MacroAssemblerX86Common::set8):
2924 2009-05-12 Geoffrey Garen <ggaren@apple.com>
2926 Reviewed by Sam Weinig.
2928 Added overflow recovery for pre_inc and pre_dec.
2930 Turned some short-circuit code into early returns, as is the WebKit style.
2932 * jit/JITArithmetic.cpp:
2933 (JSC::JIT::emit_op_post_inc):
2934 (JSC::JIT::emitSlow_op_post_inc):
2935 (JSC::JIT::emit_op_post_dec):
2936 (JSC::JIT::emitSlow_op_post_dec):
2937 (JSC::JIT::emitSlow_op_pre_inc):
2938 (JSC::JIT::emitSlow_op_pre_dec):
2940 2009-05-12 Sam Weinig <sam@webkit.org>
2942 Reviewed by Geoffrey Garen.
2944 Implement op_jmp, op_loop, op_eq and op_neq.
2946 * jit/JITOpcodes.cpp:
2947 (JSC::JIT::emit_op_jmp):
2948 (JSC::JIT::emit_op_loop):
2949 (JSC::JIT::emit_op_eq):
2950 (JSC::JIT::emitSlow_op_eq):
2951 (JSC::JIT::emit_op_neq):
2952 (JSC::JIT::emitSlow_op_neq):
2953 (JSC::JIT::emit_op_enter):
2954 (JSC::JIT::emit_op_enter_with_activation):
2956 2009-05-12 Sam Weinig <sam@webkit.org>
2958 Reviewed by Geoffrey Garen.
2960 Implement the slow cases for arithmetic opcodes.
2962 * jit/JITArithmetic.cpp:
2963 (JSC::JIT::emitSlow_op_lshift):
2964 (JSC::JIT::emitSlow_op_rshift):
2965 (JSC::JIT::emitSlow_op_bitand):
2966 (JSC::JIT::emitSlow_op_bitor):
2967 (JSC::JIT::emitSlow_op_bitxor):
2968 (JSC::JIT::emitSlow_op_bitnot):
2969 (JSC::JIT::emitSlow_op_sub):
2970 (JSC::JIT::emitSlow_op_mul):
2971 (JSC::JIT::emitSlow_op_mod):
2972 (JSC::JIT::emit_op_mod):
2974 2009-05-12 Sam Weinig <sam@webkit.org>
2976 Reviewed by Geoffrey Garen.
2978 Implement op_bitnot.
2980 * assembler/MacroAssemblerX86Common.h:
2981 (JSC::MacroAssemblerX86Common::not32):
2982 * assembler/X86Assembler.h:
2983 (JSC::X86Assembler::notl_m):
2984 * jit/JITArithmetic.cpp:
2985 (JSC::JIT::emit_op_bitnot):
2987 2009-05-12 Sam Weinig <sam@webkit.org>
2989 Reviewed by Geoffrey Garen.
2991 Add arithmetic opcode implementations from the old nitro-extreme branch.
2994 * jit/JITArithmetic.cpp:
2995 (JSC::JIT::emit_op_jnless):
2996 (JSC::JIT::emitSlow_op_jnless):
2997 (JSC::JIT::emit_op_jnlesseq):
2998 (JSC::JIT::emitSlow_op_jnlesseq):
2999 (JSC::JIT::emit_op_lshift):
3000 (JSC::JIT::emitSlow_op_lshift):
3001 (JSC::JIT::emit_op_rshift):
3002 (JSC::JIT::emitSlow_op_rshift):
3003 (JSC::JIT::emit_op_bitand):
3004 (JSC::JIT::emitBitAnd32Constant):
3005 (JSC::JIT::emitBitAnd32InPlace):
3006 (JSC::JIT::emit_op_bitor):
3007 (JSC::JIT::emitSlow_op_bitor):
3008 (JSC::JIT::emitBitOr32Constant):
3009 (JSC::JIT::emitBitOr32InPlace):
3010 (JSC::JIT::emit_op_bitxor):
3011 (JSC::JIT::emitSlow_op_bitxor):
3012 (JSC::JIT::emitBitXor32Constant):
3013 (JSC::JIT::emitBitXor32InPlace):
3014 (JSC::JIT::emit_op_bitnot):
3015 (JSC::JIT::emitSlow_op_bitnot):
3016 (JSC::JIT::emit_op_post_inc):
3017 (JSC::JIT::emitSlow_op_post_inc):
3018 (JSC::JIT::emit_op_post_dec):
3019 (JSC::JIT::emitSlow_op_post_dec):
3020 (JSC::JIT::emit_op_pre_inc):
3021 (JSC::JIT::emitSlow_op_pre_inc):
3022 (JSC::JIT::emit_op_pre_dec):
3023 (JSC::JIT::emitSlow_op_pre_dec):
3024 (JSC::JIT::emit_op_add):
3025 (JSC::JIT::emitAdd32Constant):
3026 (JSC::JIT::emitAdd32InPlace):
3027 (JSC::JIT::emitSlow_op_add):
3028 (JSC::JIT::emit_op_sub):
3029 (JSC::JIT::emitSlow_op_sub):
3030 (JSC::JIT::emitSub32ConstantLeft):
3031 (JSC::JIT::emitSub32ConstantRight):
3032 (JSC::JIT::emitSub32InPlaceLeft):
3033 (JSC::JIT::emitSub32InPlaceRight):
3034 (JSC::JIT::emit_op_mul):
3035 (JSC::JIT::emitSlow_op_mul):
3036 (JSC::JIT::emitMul32Constant):
3037 (JSC::JIT::emitMul32InPlace):
3038 (JSC::JIT::emit_op_mod):
3039 (JSC::JIT::emitSlow_op_mod):
3040 * jit/JITOpcodes.cpp:
3042 2009-05-12 Geoffrey Garen <ggaren@apple.com>
3044 Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit
3045 value representations.
3047 Added JSAPIValueWrapper to the repository.
3050 * jit/JITArithmetic.cpp:
3051 * runtime/JSAPIValueWrapper.cpp: Added.
3052 (JSC::JSAPIValueWrapper::toPrimitive):
3053 (JSC::JSAPIValueWrapper::getPrimitiveNumber):
3054 (JSC::JSAPIValueWrapper::toBoolean):
3055 (JSC::JSAPIValueWrapper::toNumber):
3056 (JSC::JSAPIValueWrapper::toString):
3057 (JSC::JSAPIValueWrapper::toObject):
3058 * runtime/JSAPIValueWrapper.h: Added.
3059 (JSC::JSAPIValueWrapper::value):
3060 (JSC::JSAPIValueWrapper::isAPIValueWrapper):
3061 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3062 (JSC::jsAPIValueWrapper):
3065 2009-05-12 Geoffrey Garen <ggaren@apple.com>
3067 Turned on the JIT and got it building and running the most trivial of
3070 All configurable optimizations are turned off, and a few opcodes are ad
3073 So far, I've only merged op_mov and op_end, but some stub-reliant
3074 opcodes work as-is from TOT.
3076 * bytecode/CodeBlock.cpp:
3077 (JSC::CodeBlock::~CodeBlock):
3078 * bytecode/CodeBlock.h:
3080 (JSC::JIT::compileOpStrictEq):
3082 * jit/JITArithmetic.cpp:
3083 (JSC::JIT::emit_op_lshift):
3084 (JSC::JIT::emitSlow_op_lshift):
3085 (JSC::JIT::emit_op_rshift):
3086 (JSC::JIT::emitSlow_op_rshift):
3087 (JSC::JIT::emit_op_jnless):
3088 (JSC::JIT::emitSlow_op_jnless):
3089 (JSC::JIT::emit_op_jnlesseq):
3090 (JSC::JIT::emitSlow_op_jnlesseq):
3091 (JSC::JIT::emit_op_bitand):
3092 (JSC::JIT::emitSlow_op_bitand):
3093 (JSC::JIT::emit_op_post_inc):
3094 (JSC::JIT::emitSlow_op_post_inc):
3095 (JSC::JIT::emit_op_post_dec):
3096 (JSC::JIT::emitSlow_op_post_dec):
3097 (JSC::JIT::emit_op_pre_inc):
3098 (JSC::JIT::emitSlow_op_pre_inc):
3099 (JSC::JIT::emit_op_pre_dec):
3100 (JSC::JIT::emitSlow_op_pre_dec):
3101 (JSC::JIT::emit_op_mod):
3102 (JSC::JIT::emitSlow_op_mod):
3103 (JSC::JIT::emit_op_add):
3104 (JSC::JIT::emit_op_mul):
3105 (JSC::JIT::emit_op_sub):
3106 (JSC::JIT::compileBinaryArithOpSlowCase):
3107 (JSC::JIT::emitSlow_op_add):
3108 (JSC::JIT::emitSlow_op_mul):
3110 (JSC::JIT::compileOpCallInitializeCallFrame):
3111 (JSC::JIT::compileOpConstructSetupArgs):
3112 (JSC::JIT::compileOpCallVarargs):
3113 (JSC::JIT::compileOpCall):
3114 (JSC::JIT::compileOpCallSlowCase):
3115 * jit/JITInlineMethods.h:
3116 (JSC::JIT::getConstantOperandImmediateInt):
3117 (JSC::JIT::isOperandConstantImmediateInt):
3118 (JSC::JIT::emitInitRegister):
3119 (JSC::JIT::addSlowCase):
3120 (JSC::JIT::addJump):
3121 (JSC::JIT::emitJumpSlowToHot):
3123 (JSC::JIT::payloadFor):
3124 (JSC::JIT::emitLoad):
3125 (JSC::JIT::emitLoadReturnValue):
3126 (JSC::JIT::emitStore):
3127 (JSC::JIT::emitStoreReturnValue):
3128 * jit/JITOpcodes.cpp:
3129 (JSC::JIT::emit_op_mov):
3130 (JSC::JIT::emit_op_end):
3131 (JSC::JIT::emit_op_jmp):
3132 (JSC::JIT::emit_op_loop):
3133 (JSC::JIT::emit_op_loop_if_less):
3134 (JSC::JIT::emit_op_loop_if_lesseq):
3135 (JSC::JIT::emit_op_instanceof):
3136 (JSC::JIT::emit_op_get_global_var):
3137 (JSC::JIT::emit_op_put_global_var):
3138 (JSC::JIT::emit_op_get_scoped_var):
3139 (JSC::JIT::emit_op_put_scoped_var):
3140 (JSC::JIT::emit_op_tear_off_activation):
3141 (JSC::JIT::emit_op_ret):
3142 (JSC::JIT::emit_op_construct_verify):
3143 (JSC::JIT::emit_op_to_primitive):
3144 (JSC::JIT::emit_op_loop_if_true):
3145 (JSC::JIT::emit_op_resolve_global):
3146 (JSC::JIT::emit_op_not):
3147 (JSC::JIT::emit_op_jfalse):
3148 (JSC::JIT::emit_op_jeq_null):
3149 (JSC::JIT::emit_op_jneq_null):
3150 (JSC::JIT::emit_op_jneq_ptr):
3151 (JSC::JIT::emit_op_unexpected_load):
3152 (JSC::JIT::emit_op_eq):
3153 (JSC::JIT::emit_op_bitnot):
3154 (JSC::JIT::emit_op_jtrue):
3155 (JSC::JIT::emit_op_neq):
3156 (JSC::JIT::emit_op_bitxor):
3157 (JSC::JIT::emit_op_bitor):
3158 (JSC::JIT::emit_op_throw):
3159 (JSC::JIT::emit_op_next_pname):
3160 (JSC::JIT::emit_op_push_scope):
3161 (JSC::JIT::emit_op_to_jsnumber):
3162 (JSC::JIT::emit_op_push_new_scope):
3163 (JSC::JIT::emit_op_catch):
3164 (JSC::JIT::emit_op_switch_imm):
3165 (JSC::JIT::emit_op_switch_char):
3166 (JSC::JIT::emit_op_switch_string):
3167 (JSC::JIT::emit_op_new_error):
3168 (JSC::JIT::emit_op_eq_null):
3169 (JSC::JIT::emit_op_neq_null):
3170 (JSC::JIT::emit_op_convert_this):
3171 (JSC::JIT::emit_op_profile_will_call):
3172 (JSC::JIT::emit_op_profile_did_call):
3173 (JSC::JIT::emitSlow_op_construct_verify):
3174 (JSC::JIT::emitSlow_op_get_by_val):
3175 (JSC::JIT::emitSlow_op_loop_if_less):
3176 (JSC::JIT::emitSlow_op_loop_if_lesseq):
3177 (JSC::JIT::emitSlow_op_put_by_val):
3178 (JSC::JIT::emitSlow_op_not):
3179 (JSC::JIT::emitSlow_op_instanceof):
3180 * jit/JITPropertyAccess.cpp:
3181 (JSC::JIT::emit_op_get_by_val):
3182 (JSC::JIT::emit_op_put_by_val):
3183 (JSC::JIT::emit_op_put_by_index):
3184 (JSC::JIT::emit_op_put_getter):
3185 (JSC::JIT::emit_op_put_setter):
3186 (JSC::JIT::emit_op_del_by_id):
3187 (JSC::JIT::compileGetByIdHotPath):
3188 (JSC::JIT::compilePutByIdHotPath):
3189 * jit/JITStubCall.h:
3190 (JSC::JITStubCall::JITStubCall):
3191 (JSC::JITStubCall::addArgument):
3192 (JSC::JITStubCall::call):
3193 (JSC::JITStubCall::):
3194 (JSC::CallEvalJITStub::CallEvalJITStub):
3197 (JSC::JITStubs::cti_op_add):
3198 (JSC::JITStubs::cti_op_pre_inc):
3199 (JSC::JITStubs::cti_op_mul):
3200 (JSC::JITStubs::cti_op_get_by_val):
3201 (JSC::JITStubs::cti_op_get_by_val_string):
3202 (JSC::JITStubs::cti_op_get_by_val_byte_array):
3203 (JSC::JITStubs::cti_op_sub):
3204 (JSC::JITStubs::cti_op_put_by_val):
3205 (JSC::JITStubs::cti_op_put_by_val_array):
3206 (JSC::JITStubs::cti_op_put_by_val_byte_array):
3207 (JSC::JITStubs::cti_op_negate):
3208 (JSC::JITStubs::cti_op_div):
3209 (JSC::JITStubs::cti_op_pre_dec):
3210 (JSC::JITStubs::cti_op_post_inc):
3211 (JSC::JITStubs::cti_op_eq):
3212 (JSC::JITStubs::cti_op_lshift):
3213 (JSC::JITStubs::cti_op_bitand):
3214 (JSC::JITStubs::cti_op_rshift):
3215 (JSC::JITStubs::cti_op_bitnot):
3216 (JSC::JITStubs::cti_op_mod):
3217 (JSC::JITStubs::cti_op_neq):
3218 (JSC::JITStubs::cti_op_post_dec):
3219 (JSC::JITStubs::cti_op_urshift):
3220 (JSC::JITStubs::cti_op_bitxor):
3221 (JSC::JITStubs::cti_op_bitor):
3222 (JSC::JITStubs::cti_op_switch_imm):
3224 * runtime/JSArray.cpp:
3225 (JSC::JSArray::JSArray):
3226 * runtime/JSFunction.cpp:
3227 (JSC::JSFunction::~JSFunction):
3228 * runtime/JSValue.h:
3229 (JSC::JSValue::payload):
3232 2009-05-07 Sam Weinig <sam@webkit.org>
3234 Reviewed by Geoffrey Garen.
3236 Add some new MacroAssembler and assembler functions that will be needed shortly.
3238 * assembler/MacroAssemblerX86Common.h:
3239 (JSC::MacroAssemblerX86Common::add32):
3240 (JSC::MacroAssemblerX86Common::and32):
3241 (JSC::MacroAssemblerX86Common::mul32):
3242 (JSC::MacroAssemblerX86Common::neg32):
3243 (JSC::MacroAssemblerX86Common::or32):
3244 (JSC::MacroAssemblerX86Common::sub32):
3245 (JSC::MacroAssemblerX86Common::xor32):
3246 (JSC::MacroAssemblerX86Common::branchAdd32):
3247 (JSC::MacroAssemblerX86Common::branchMul32):
3248 (JSC::MacroAssemblerX86Common::branchSub32):
3249 * assembler/X86Assembler.h:
3250 (JSC::X86Assembler::):
3251 (JSC::X86Assembler::addl_rm):
3252 (JSC::X86Assembler::andl_mr):
3253 (JSC::X86Assembler::andl_rm):
3254 (JSC::X86Assembler::andl_im):
3255 (JSC::X86Assembler::negl_r):
3256 (JSC::X86Assembler::notl_r):
3257 (JSC::X86Assembler::orl_rm):
3258 (JSC::X86Assembler::orl_im):
3259 (JSC::X86Assembler::subl_rm):
3260 (JSC::X86Assembler::xorl_mr):
3261 (JSC::X86Assembler::xorl_rm):
3262 (JSC::X86Assembler::xorl_im):
3263 (JSC::X86Assembler::imull_mr):
3265 2009-05-11 Sam Weinig <sam@webkit.org>
3267 Reviewed by Cameron Zwarich.
3269 Remove the NumberHeap.
3271 * JavaScriptCore.exp:
3272 * runtime/Collector.cpp:
3274 (JSC::Heap::destroy):
3275 (JSC::Heap::recordExtraCost):
3276 (JSC::Heap::heapAllocate):
3277 (JSC::Heap::markConservatively):
3279 (JSC::Heap::collect):
3280 (JSC::Heap::objectCount):
3281 (JSC::Heap::statistics):
3283 (JSC::Heap::isBusy):
3284 * runtime/Collector.h:
3285 (JSC::Heap::globalData):
3288 2009-05-11 Geoffrey Garen <ggaren@apple.com>
3290 Reviewed by Sam Weinig.
3292 Land initial commit of new number representation for 32 bit platforms,
3298 * API/JSCallbackObjectFunctions.h:
3299 (JSC::::hasInstance):
3302 * API/tests/testapi.c:
3303 (EvilExceptionObject_convertToType):
3305 * JavaScriptCore.exp:
3306 * JavaScriptCore.xcodeproj/project.pbxproj:
3307 * bytecode/CodeBlock.cpp:
3308 (JSC::valueToSourceString):
3309 * bytecompiler/BytecodeGenerator.cpp:
3310 (JSC::BytecodeGenerator::emitLoad):
3311 (JSC::BytecodeGenerator::emitUnexpectedLoad):
3312 (JSC::keyForImmediateSwitch):
3313 * bytecompiler/BytecodeGenerator.h:
3314 * interpreter/Interpreter.cpp:
3315 (JSC::Interpreter::dumpRegisters):
3316 (JSC::Interpreter::privateExecute):
3318 (JSC::ArrayNode::emitBytecode):
3319 (JSC::processClauseList):
3320 * runtime/ArgList.h:
3321 * runtime/Collector.h:
3323 * runtime/DateMath.cpp:
3324 * runtime/ExceptionHelpers.h:
3325 * runtime/InitializeThreading.cpp:
3326 * runtime/JSArray.cpp:
3327 (JSC::JSArray::JSArray):
3328 * runtime/JSCell.cpp:
3330 (JSC::JSCell::isAPIValueWrapper):
3331 (JSC::JSValue::isString):
3332 (JSC::JSValue::isGetterSetter):
3333 (JSC::JSValue::isObject):
3334 (JSC::JSValue::getString):
3335 (JSC::JSValue::getObject):
3336 (JSC::JSValue::getCallData):
3337 (JSC::JSValue::getConstructData):
3338 (JSC::JSValue::getUInt32):
3339 (JSC::JSValue::marked):
3340 (JSC::JSValue::toPrimitive):
3341 (JSC::JSValue::getPrimitiveNumber):
3342 (JSC::JSValue::toBoolean):
3343 (JSC::JSValue::toNumber):
3344 (JSC::JSValue::toString):
3345 (JSC::JSValue::needsThisConversion):
3346 (JSC::JSValue::toThisString):
3347 (JSC::JSValue::getJSNumber):
3348 (JSC::JSValue::toObject):
3349 (JSC::JSValue::toThisObject):
3350 * runtime/JSGlobalData.cpp:
3351 (JSC::JSGlobalData::JSGlobalData):
3352 * runtime/JSGlobalData.h:
3353 * runtime/JSGlobalObject.h:
3354 (JSC::Structure::prototypeForLookup):
3355 * runtime/JSGlobalObjectFunctions.cpp:
3356 (JSC::globalFuncParseInt):
3357 * runtime/JSImmediate.h:
3358 * runtime/JSNumberCell.cpp: Removed.
3359 * runtime/JSNumberCell.h: Removed.
3360 * runtime/JSObject.h:
3361 (JSC::JSValue::get):
3362 (JSC::JSValue::put):
3363 * runtime/JSString.h:
3364 (JSC::JSValue::toThisJSString):
3365 * runtime/JSValue.cpp:
3366 (JSC::JSValue::toInteger):
3367 (JSC::JSValue::toIntegerPreserveNaN):
3368 (JSC::JSValue::toObjectSlowCase):
3369 (JSC::JSValue::toThisObjectSlowCase):
3370 (JSC::JSValue::synthesizeObject):
3371 (JSC::JSValue::synthesizePrototype):
3372 (JSC::JSValue::description):
3373 (JSC::nonInlineNaN):
3374 * runtime/JSValue.h:
3376 (JSC::EncodedJSValueHashTraits::emptyValue):
3382 (JSC::JSValue::encode):
3383 (JSC::JSValue::decode):
3384 (JSC::JSValue::JSValue):
3385 (JSC::JSValue::operator bool):
3386 (JSC::JSValue::operator==):
3387 (JSC::JSValue::operator!=):
3388 (JSC::JSValue::isUndefined):
3389 (JSC::JSValue::isNull):
3390 (JSC::JSValue::isUndefinedOrNull):
3391 (JSC::JSValue::isCell):
3392 (JSC::JSValue::isInt32):
3393 (JSC::JSValue::isUInt32):
3394 (JSC::JSValue::isDouble):
3395 (JSC::JSValue::isTrue):
3396 (JSC::JSValue::isFalse):
3397 (JSC::JSValue::tag):
3398 (JSC::JSValue::asInt32):
3399 (JSC::JSValue::asUInt32):
3400 (JSC::JSValue::asDouble):
3401 (JSC::JSValue::asCell):
3402 (JSC::JSValue::isNumber):
3403 (JSC::JSValue::isBoolean):
3404 (JSC::JSValue::getBoolean):
3405 (JSC::JSValue::uncheckedGetNumber):
3406 (JSC::JSValue::toJSNumber):
3407 (JSC::JSValue::getNumber):
3408 (JSC::JSValue::toInt32):
3409 (JSC::JSValue::toUInt32):
3410 * runtime/Operations.h:
3411 (JSC::JSValue::equal):
3412 (JSC::JSValue::equalSlowCaseInline):
3413 (JSC::JSValue::strictEqual):
3414 (JSC::JSValue::strictEqualSlowCaseInline):
3418 * runtime/PropertySlot.h:
3419 * runtime/StringPrototype.cpp:
3420 (JSC::stringProtoFuncCharAt):
3421 (JSC::stringProtoFuncCharCodeAt):
3422 (JSC::stringProtoFuncIndexOf):
3425 === Start merge of nitro-extreme branch 2009-07-30 ===
3427 2009-07-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3429 Reviewed by George Staikos.
3431 Resolve class/struct mixup in forward declarations
3432 https://bugs.webkit.org/show_bug.cgi?id=27708
3435 * bytecode/SamplingTool.h:
3436 * interpreter/Interpreter.h:
3438 * profiler/ProfileGenerator.h:
3439 * profiler/Profiler.h:
3440 * runtime/ClassInfo.h:
3441 * runtime/ExceptionHelpers.h:
3442 * runtime/JSByteArray.h:
3444 * runtime/JSFunction.h:
3445 * runtime/JSGlobalData.h:
3446 * runtime/JSObject.h:
3447 * runtime/JSString.h:
3449 2009-07-28 Ada Chan <adachan@apple.com>
3451 Reviewed by Darin Adler.
3453 https://bugs.webkit.org/show_bug.cgi?id=27236
3454 - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows.
3455 - Use a background thread to periodically scavenge memory to release back to the system.
3457 * wtf/FastMalloc.cpp:
3458 (WTF::TCMalloc_PageHeap::init):
3459 (WTF::TCMalloc_PageHeap::runScavengerThread):
3460 (WTF::TCMalloc_PageHeap::scavenge):
3461 (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
3462 (WTF::TCMalloc_PageHeap::New):
3463 (WTF::TCMalloc_PageHeap::AllocLarge):
3464 (WTF::TCMalloc_PageHeap::Delete):
3465 (WTF::TCMalloc_PageHeap::GrowHeap):
3467 (WTF::TCMalloc_PageHeap::scavengerThread):
3468 * wtf/TCSystemAlloc.cpp:
3469 (TCMalloc_SystemRelease):
3470 (TCMalloc_SystemCommit):
3471 * wtf/TCSystemAlloc.h:
3473 2009-07-28 Xan Lopez <xlopez@igalia.com>
3475 Add new files, fixes distcheck.
3479 2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
3481 Reviewed by Simon Hausmann.
3483 [Qt] Determining whether to use JIT or interpreter
3484 moved from JavaScriptCore.pri to Platform.h
3486 * JavaScriptCore.pri:
3489 2009-07-27 Brian Weinstein <bweinstein@apple.com>
3491 Fix of misuse of sort command.
3493 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3494 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3496 2009-07-27 Brian Weinstein <bweinstein@apple.com>
3498 Build fix for Windows.
3500 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3501 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3503 2009-07-27 Gavin Barraclough <barraclough@apple.com>
3505 Rubber stamped by Oliver Hunt.
3507 Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
3510 (JSC::JIT::privateCompile):
3511 (JSC::JIT::privateCompileCTIMachineTrampolines):
3513 * jit/JITInlineMethods.h:
3514 (JSC::JIT::preserveReturnAddressAfterCall):
3515 * jit/JITPropertyAccess.cpp:
3516 (JSC::JIT::privateCompilePutByIdTransition):
3518 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
3522 * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
3524 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
3528 * runtime/JSLock.h: (JSC::JSLock::~JSLock):
3530 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
3532 Reviewed by Darin Adler.
3534 https://bugs.webkit.org/show_bug.cgi?id=27735
3535 Give a helpful name to JSLock constructor argument
3539 * API/JSContextRef.cpp:
3540 * API/JSObjectRef.cpp:
3541 (JSPropertyNameArrayRelease):
3542 (JSPropertyNameAccumulatorAddName):
3543 * JavaScriptCore.exp:
3546 (cleanupGlobalData):
3548 * runtime/Collector.cpp:
3549 (JSC::Heap::destroy):
3550 * runtime/JSLock.cpp:
3551 (JSC::JSLock::JSLock):
3552 (JSC::JSLock::lock):
3553 (JSC::JSLock::unlock):
3554 (JSC::JSLock::DropAllLocks::DropAllLocks):
3555 (JSC::JSLock::DropAllLocks::~DropAllLocks):
3558 (JSC::JSLock::JSLock):
3559 (JSC::JSLock::~JSLock):
3561 2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
3563 Reviewed by Eric Seidel.
3565 Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
3566 https://bugs.webkit.org/show_bug.cgi?id=27342
3568 Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
3569 instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
3571 * API/JSObjectRef.cpp:
3573 2009-07-24 Ada Chan <adachan@apple.com>
3575 In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
3576 Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans.
3577 We have tested this and show it has little impact on performance.
3579 Reviewed by Mark Rowe.
3581 * wtf/FastMalloc.cpp:
3582 (WTF::TCMalloc_PageHeap::New):
3583 (WTF::TCMalloc_PageHeap::AllocLarge):
3584 (WTF::propagateDecommittedState):
3585 (WTF::mergeDecommittedStates):
3586 (WTF::TCMalloc_PageHeap::Delete):
3587 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
3589 2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
3591 Reviewed by Darin Adler and Adam Barth.
3593 Build fix for x86 platforms.
3594 https://bugs.webkit.org/show_bug.cgi?id=27602
3598 2009-07-23 Kevin Ollivier <kevino@theolliviers.com>
3600 wx build fix, adding missing header.
3604 2009-07-22 Yong Li <yong.li@torchmobile.com>
3606 Reviewed by George Staikos.
3608 Add wince specific memory files into wtf/wince
3609 https://bugs.webkit.org/show_bug.cgi?id=27550
3611 * wtf/wince/FastMallocWince.h: Added.
3612 * wtf/wince/MemoryManager.cpp: Added.
3613 * wtf/wince/MemoryManager.h: Added.
3615 2009-07-23 Norbert Leser <norbert.leser@nokia.com>
3617 Reviewed by Simon Hausmann.
3619 Fix for missing mmap features in Symbian
3620 https://bugs.webkit.org/show_bug.cgi?id=24540
3622 Fix, conditionally for PLATFORM(SYMBIAN), as an alternative
3623 to missing support for the MAP_ANON property flag in mmap.
3624 It utilizes Symbian specific memory allocation features.
3626 * runtime/Collector.cpp
3628 2009-07-22 Gavin Barraclough <barraclough@apple.com>
3630 Reviewed by Sam Weinig.
3632 With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
3633 ( https://bugs.webkit.org/show_bug.cgi?id=27564 )
3635 Currently we change permissions forwards and backwards for each instruction modified,
3636 instead we should only change permissions once per complete repatching event.
3638 2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
3639 which recoups 1/3 of the penalty of running with this mode enabled.
3641 * assembler/ARMAssembler.cpp:
3642 (JSC::ARMAssembler::linkBranch):
3643 - Replace usage of MakeWritable with cacheFlush.
3645 * assembler/ARMAssembler.h:
3646 (JSC::ARMAssembler::patchPointerInternal):
3647 (JSC::ARMAssembler::repatchLoadPtrToLEA):
3648 - Replace usage of MakeWritable with cacheFlush.
3650 * assembler/ARMv7Assembler.h:
3651 (JSC::ARMv7Assembler::relinkJump):
3652 (JSC::ARMv7Assembler::relinkCall):
3653 (JSC::ARMv7Assembler::repatchInt32):
3654 (JSC::ARMv7Assembler::repatchPointer):
3655 (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
3656 (JSC::ARMv7Assembler::setInt32):
3657 - Replace usage of MakeWritable with cacheFlush.
3659 * assembler/LinkBuffer.h:
3660 (JSC::LinkBuffer::performFinalization):
3661 - Make explicit call to cacheFlush.
3663 * assembler/MacroAssemblerCodeRef.h:
3664 (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
3665 - Make size always available.
3667 * assembler/RepatchBuffer.h:
3668 (JSC::RepatchBuffer::RepatchBuffer):
3669 (JSC::RepatchBuffer::~RepatchBuffer):
3670 - Add calls to MakeWritable & makeExecutable.
3672 * assembler/X86Assembler.h:
3673 (JSC::X86Assembler::relinkJump):
3674 (JSC::X86Assembler::relinkCall):
3675 (JSC::X86Assembler::repatchInt32):
3676 (JSC::X86Assembler::repatchPointer):
3677 (JSC::X86Assembler::repatchLoadPtrToLEA):
3678 - Remove usage of MakeWritable.
3680 * bytecode/CodeBlock.h:
3681 (JSC::CodeBlock::getJITCode):
3682 - Provide access to CodeBlock's JITCode.
3684 * jit/ExecutableAllocator.h:
3685 (JSC::ExecutableAllocator::makeExecutable):
3686 (JSC::ExecutableAllocator::cacheFlush):
3687 - Remove MakeWritable, make cacheFlush public.
3690 (JSC::ctiPatchNearCallByReturnAddress):
3691 (JSC::ctiPatchCallByReturnAddress):
3692 (JSC::JIT::privateCompile):
3693 (JSC::JIT::unlinkCall):
3694 (JSC::JIT::linkCall):
3695 - Add CodeBlock argument to RepatchBuffer.
3698 - Pass CodeBlock argument for use by RepatchBuffer.
3701 (JSC::JITCode::start):
3702 (JSC::JITCode::size):
3703 - Provide access to code start & size.
3705 * jit/JITPropertyAccess.cpp:
3706 (JSC::JIT::privateCompilePutByIdTransition):
3707 (JSC::JIT::patchGetByIdSelf):
3708 (JSC::JIT::patchMethodCallProto):
3709 (JSC::JIT::patchPutByIdReplace):
3710 (JSC::JIT::privateCompilePatchGetArrayLength):
3711 (JSC::JIT::privateCompileGetByIdProto):
3712 (JSC::JIT::privateCompileGetByIdSelfList):
3713 (JSC::JIT::privateCompileGetByIdProtoList):
3714 (JSC::JIT::privateCompileGetByIdChainList):
3715 (JSC::JIT::privateCompileGetByIdChain):
3716 - Add CodeBlock argument to RepatchBuffer.
3719 (JSC::JITThunks::tryCachePutByID):
3720 (JSC::JITThunks::tryCacheGetByID):
3721 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
3722 - Pass CodeBlock argument for use by RepatchBuffer.
3724 2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
3726 Reviewed by Gavin Barraclough.
3728 Cache not only the structure of the method, but the
3729 structure of its prototype as well.
3730 https://bugs.webkit.org/show_bug.cgi?id=27077
3732 * bytecode/CodeBlock.cpp:
3733 (JSC::CodeBlock::~CodeBlock):
3734 * bytecode/CodeBlock.h:
3735 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
3736 * jit/JITPropertyAccess.cpp:
3737 (JSC::JIT::patchMethodCallProto):
3739 2009-07-21 Gavin Barraclough <barraclough@apple.com>
3741 Reviewed by Sam Weinig.
3743 Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
3744 ( https://bugs.webkit.org/show_bug.cgi?id=27527 )
3746 This allows the implementation to be defined per architecture. Specifically this addresses the
3747 fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
3748 to register. Patching the call actually requires the pointer load to be patched, rather than
3749 the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as
3750 such is best handled there.
3752 * assembler/AbstractMacroAssembler.h:
3753 * assembler/MacroAssemblerARM.h:
3754 (JSC::MacroAssemblerARM::linkCall):
3755 (JSC::MacroAssemblerARM::repatchCall):
3756 * assembler/MacroAssemblerARMv7.h:
3757 (JSC::MacroAssemblerARMv7::linkCall):
3758 (JSC::MacroAssemblerARMv7::repatchCall):
3759 * assembler/MacroAssemblerX86.h:
3760 (JSC::MacroAssemblerX86::linkCall):
3761 (JSC::MacroAssemblerX86::repatchCall):
3762 * assembler/MacroAssemblerX86_64.h:
3763 (JSC::MacroAssemblerX86_64::linkCall):
3764 (JSC::MacroAssemblerX86_64::repatchCall):
3766 2009-07-21 Adam Treat <adam.treat@torchmobile.com>
3768 Reviewed by George Staikos.
3770 Every wtf file includes other wtf files with <> style includes
3771 except this one. Fix the exception.
3775 2009-07-21 Gavin Barraclough <barraclough@apple.com>
3777 Reviewed by Oliver Hunt.
3779 Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
3780 ( https://bugs.webkit.org/show_bug.cgi?id=27485 )
3782 This change is the first step in a process to move code that should be in
3783 the architecture-specific MacroAssembler classes up out of Assmbler and
3784 AbstractMacroAssembler.
3786 * JavaScriptCore.xcodeproj/project.pbxproj:
3789 * assembler/ARMAssembler.h:
3790 (JSC::ARMAssembler::linkPointer):
3791 - rename patchPointer to bring it in line with the current link/repatch naming scheme
3793 * assembler/ARMv7Assembler.h:
3794 (JSC::ARMv7Assembler::linkCall):
3795 (JSC::ARMv7Assembler::linkPointer):
3796 (JSC::ARMv7Assembler::relinkCall):
3797 (JSC::ARMv7Assembler::repatchInt32):
3798 (JSC::ARMv7Assembler::repatchPointer):
3799 (JSC::ARMv7Assembler::setInt32):
3800 (JSC::ARMv7Assembler::setPointer):
3801 - rename patchPointer to bring it in line with the current link/repatch naming scheme
3803 * assembler/AbstractMacroAssembler.h:
3804 (JSC::AbstractMacroAssembler::linkJump):
3805 (JSC::AbstractMacroAssembler::linkCall):
3806 (JSC::AbstractMacroAssembler::linkPointer):
3807 (JSC::AbstractMacroAssembler::getLinkerAddress):
3808 (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
3809 (JSC::AbstractMacroAssembler::repatchJump):
3810 (JSC::AbstractMacroAssembler::repatchCall):
3811 (JSC::AbstractMacroAssembler::repatchNearCall):
3812 (JSC::AbstractMacroAssembler::repatchInt32):
3813 (JSC::AbstractMacroAssembler::repatchPointer):
3814 (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
3815 - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
3817 * assembler/LinkBuffer.h: Added.
3818 (JSC::LinkBuffer::LinkBuffer):
3819 (JSC::LinkBuffer::~LinkBuffer):
3820 (JSC::LinkBuffer::link):
3821 (JSC::LinkBuffer::patch):
3822 (JSC::LinkBuffer::locationOf):
3823 (JSC::LinkBuffer::locationOfNearCall):
3824 (JSC::LinkBuffer::returnAddressOffset):
3825 (JSC::LinkBuffer::finalizeCode):
3826 (JSC::LinkBuffer::finalizeCodeAddendum):
3827 (JSC::LinkBuffer::code):
3828 (JSC::LinkBuffer::performFinalization):
3829 - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
3831 * assembler/RepatchBuffer.h: Added.
3832 (JSC::RepatchBuffer::RepatchBuffer):
3833 (JSC::RepatchBuffer::relink):
3834 (JSC::RepatchBuffer::repatch):
3835 (JSC::RepatchBuffer::repatchLoadPtrToLEA):
3836 (JSC::RepatchBuffer::relinkCallerToTrampoline):
3837 (JSC::RepatchBuffer::relinkCallerToFunction):
3838 (JSC::RepatchBuffer::relinkNearCallerToTrampoline):
3839 - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
3841 * assembler/X86Assembler.h:
3842 (JSC::X86Assembler::linkJump):
3843 (JSC::X86Assembler::linkCall):
3844 (JSC::X86Assembler::linkPointerForCall):
3845 (JSC::X86Assembler::linkPointer):
3846 (JSC::X86Assembler::relinkJump):
3847 (JSC::X86Assembler::relinkCall):
3848 (JSC::X86Assembler::repatchInt32):
3849 (JSC::X86Assembler::repatchPointer):
3850 (JSC::X86Assembler::setPointer):
3851 (JSC::X86Assembler::setInt32):
3852 (JSC::X86Assembler::setRel32):
3853 - rename patchPointer to bring it in line with the current link/repatch naming scheme
3856 (JSC::ctiPatchNearCallByReturnAddress):
3857 (JSC::ctiPatchCallByReturnAddress):
3858 - include new headers
3859 - remove MacroAssembler:: specification from RepatchBuffer usage
3861 * jit/JITPropertyAccess.cpp:
3862 * yarr/RegexJIT.cpp:
3863 - include new headers
3865 2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
3867 Reviewed by David Levin.
3870 https://bugs.webkit.org/show_bug.cgi?id=27506
3872 * bytecode/Opcode.h:
3874 2009-07-21 Adam Roben <aroben@apple.com>
3876 Roll out r46153, r46154, and r46155
3878 These changes were causing build failures and assertion failures on
3881 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3882 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3883 * JavaScriptCore.xcodeproj/project.pbxproj:
3884 * runtime/JSArray.cpp:
3885 * runtime/StringPrototype.cpp:
3886 * runtime/UString.cpp:
3887 * runtime/UString.h:
3888 * wtf/FastMalloc.cpp:
3891 * wtf/PossiblyNull.h: Removed.
3893 2009-07-21 Roland Steiner <rolandsteiner@google.com>
3895 Reviewed by David Levin.
3897 Add ENABLE_RUBY to list of build options
3898 https://bugs.webkit.org/show_bug.cgi?id=27324
3900 * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
3902 2009-07-20 Oliver Hunt <oliver@apple.com>
3904 Reviewed by NOBODY (Build fix).
3906 Build fix attempt #2
3908 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3909 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3911 2009-07-20 Oliver Hunt <oliver@apple.com>
3913 Reviewed by NOBODY (Build fix).
3915 Build fix attempt #1
3917 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3918 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3920 2009-07-20 Oliver Hunt <oliver@apple.com>
3922 Reviewed by Gavin Barraclough.
3924 Make it harder to misuse try* allocation routines
3925 https://bugs.webkit.org/show_bug.cgi?id=27469
3927 Jump through a few hoops to make it much harder to accidentally
3928 miss null-checking of values returned by the try-* allocation
3931 * JavaScriptCore.xcodeproj/project.pbxproj:
3932 * runtime/JSArray.cpp:
3933 (JSC::JSArray::putSlowCase):
3934 (JSC::JSArray::increaseVectorLength):
3935 * runtime/StringPrototype.cpp:
3936 (JSC::stringProtoFuncFontsize):
3937 (JSC::stringProtoFuncLink):
3938 * runtime/UString.cpp:
3940 (JSC::reallocChars):
3941 (JSC::expandCapacity):
3942 (JSC::UString::Rep::reserveCapacity):
3943 (JSC::UString::expandPreCapacity):
3946 (JSC::UString::spliceSubstringsWithSeparators):
3947 (JSC::UString::replaceRange):
3948 (JSC::UString::append):
3949 (JSC::UString::operator=):
3950 * runtime/UString.h:
3951 (JSC::UString::Rep::createEmptyBuffer):
3952 * wtf/FastMalloc.cpp:
3953 (WTF::tryFastZeroedMalloc):
3954 (WTF::tryFastMalloc):
3955 (WTF::tryFastCalloc):
3956 (WTF::tryFastRealloc):
3957 (WTF::TCMallocStats::tryFastMalloc):
3958 (WTF::TCMallocStats::tryFastCalloc):
3959 (WTF::TCMallocStats::tryFastRealloc):
3961 (WTF::TryMallocReturnValue::TryMallocReturnValue):
3962 (WTF::TryMallocReturnValue::~TryMallocReturnValue):
3963 (WTF::TryMallocReturnValue::operator Maybe<T>):
3964 (WTF::TryMallocReturnValue::getValue):
3965 * wtf/PossiblyNull.h:
3966 (WTF::PossiblyNull::PossiblyNull):
3967 (WTF::PossiblyNull::~PossiblyNull):
3968 (WTF::PossiblyNull::getValue):
3971 2009-07-20 Gavin Barraclough <barraclough@apple.com>
3975 Add ARM assembler files to xcodeproj, for convenience editing.
3977 * JavaScriptCore.xcodeproj/project.pbxproj:
3979 2009-07-20 Jessie Berlin <jberlin@apple.com>
3981 Reviewed by David Levin.
3983 Fix an incorrect assertion in Vector::remove.
3985 https://bugs.webkit.org/show_bug.cgi?id=27477
3989 Assert that the position at which to start removing elements + the
3990 length (the number of elements to remove) is less than or equal to the
3991 size of the entire Vector.
3993 2009-07-20 Peter Kasting <pkasting@google.com>
3995 Reviewed by Mark Rowe.
3997 https://bugs.webkit.org/show_bug.cgi?id=27468
3998 Back out r46060, which caused problems for some Apple developers.
4000 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
4001 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
4002 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
4003 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
4004 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
4006 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4008 Reviewed by Oliver Hunt.
4010 Allow custom memory allocation control in NewThreadContext
4011 https://bugs.webkit.org/show_bug.cgi?id=27338
4013 Inherits NewThreadContext struct from FastAllocBase because it
4014 has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
4016 * wtf/Threading.cpp:
4018 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4020 Reviewed by Oliver Hunt.
4022 Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
4023 https://bugs.webkit.org/show_bug.cgi?id=27340
4025 Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
4026 have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
4027 and in JavaScriptCore/API/JSClassRef.cpp:166.
4031 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4033 Reviewed by Darin Adler.
4035 Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
4036 https://bugs.webkit.org/show_bug.cgi?id=27343
4038 Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
4040 CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
4041 PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221)
4042 PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
4044 * yarr/RegexPattern.h:
4046 2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4048 Reviewed by Darin Adler.
4050 Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
4051 https://bugs.webkit.org/show_bug.cgi?id=27344
4053 Inherits MatchFrame struct from FastAllocBase because it has
4054 been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
4056 * pcre/pcre_exec.cpp:
4058 2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4060 Reviewed by Holger Freyther.
4062 Remove some outdated S60 platform specific code
4063 https://bugs.webkit.org/show_bug.cgi?id=27423
4067 2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
4069 Reviewed by Simon Hausmann.
4071 Qt build fix with MSVC and MinGW.
4073 * jsc.pro: Make sure jsc is a console application, and turn off
4074 exceptions and stl support to fix the build.
4076 2009-07-20 Xan Lopez <xlopez@igalia.com>
4078 Reviewed by Gustavo Noronha.
4080 Do not use C++-style comments in preprocessor directives.
4082 GCC does not like this in some configurations, using C-style
4087 2009-07-17 Peter Kasting <pkasting@google.com>
4089 Reviewed by Steve Falkenburg.
4091 https://bugs.webkit.org/show_bug.cgi?id=27323
4092 Only add Cygwin to the path when it isn't already there. This avoids
4093 causing problems for people who purposefully have non-Cygwin versions of
4094 executables like svn in front of the Cygwin ones in their paths.
4096 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
4097 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
4098 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
4099 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
4100 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
4102 2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
4104 Reviewed by Gavin Barraclough.
4106 Add YARR support for generic ARM platforms (disabled by default).
4107 https://bugs.webkit.org/show_bug.cgi?id=24986
4109 Add generic ARM port for MacroAssembler. It supports the whole
4110 MacroAssembler functionality except floating point.
4112 The class JmpSrc is extended with a flag which enables to patch
4113 the jump destination offset during execution. This feature is
4114 required for generic ARM port.
4116 Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4117 Signed off by Gabor Loki <loki@inf.u-szeged.hu>
4119 * JavaScriptCore.pri:
4120 * assembler/ARMAssembler.cpp: Added.
4121 (JSC::ARMAssembler::getLdrImmAddress):
4122 (JSC::ARMAssembler::linkBranch):
4123 (JSC::ARMAssembler::patchConstantPoolLoad):
4124 (JSC::ARMAssembler::getOp2):
4125 (JSC::ARMAssembler::genInt):
4126 (JSC::ARMAssembler::getImm):
4127 (JSC::ARMAssembler::moveImm):
4128 (JSC::ARMAssembler::dataTransfer32):
4129 (JSC::ARMAssembler::baseIndexTransfer32):
4130 (JSC::ARMAssembler::executableCopy):
4131 * assembler/ARMAssembler.h: Added.
4133 (JSC::ARMAssembler::ARMAssembler):
4134 (JSC::ARMAssembler::):
4135 (JSC::ARMAssembler::JmpSrc::JmpSrc):
4136 (JSC::ARMAssembler::JmpSrc::enableLatePatch):
4137 (JSC::ARMAssembler::JmpDst::JmpDst):
4138 (JSC::ARMAssembler::JmpDst::isUsed):
4139 (JSC::ARMAssembler::JmpDst::used):
4140 (JSC::ARMAssembler::emitInst):
4141 (JSC::ARMAssembler::and_r):
4142 (JSC::ARMAssembler::ands_r):
4143 (JSC::ARMAssembler::eor_r):
4144 (JSC::ARMAssembler::eors_r):
4145 (JSC::ARMAssembler::sub_r):
4146 (JSC::ARMAssembler::subs_r):
4147 (JSC::ARMAssembler::rsb_r):
4148 (JSC::ARMAssembler::rsbs_r):
4149 (JSC::ARMAssembler::add_r):
4150 (JSC::ARMAssembler::adds_r):
4151 (JSC::ARMAssembler::adc_r):
4152 (JSC::ARMAssembler::adcs_r):
4153 (JSC::ARMAssembler::sbc_r):
4154 (JSC::ARMAssembler::sbcs_r):
4155 (JSC::ARMAssembler::rsc_r):
4156 (JSC::ARMAssembler::rscs_r):
4157 (JSC::ARMAssembler::tst_r):
4158 (JSC::ARMAssembler::teq_r):
4159 (JSC::ARMAssembler::cmp_r):
4160 (JSC::ARMAssembler::orr_r):
4161 (JSC::ARMAssembler::orrs_r):
4162 (JSC::ARMAssembler::mov_r):
4163 (JSC::ARMAssembler::movs_r):
4164 (JSC::ARMAssembler::bic_r):
4165 (JSC::ARMAssembler::bics_r):
4166 (JSC::ARMAssembler::mvn_r):
4167 (JSC::ARMAssembler::mvns_r):
4168 (JSC::ARMAssembler::mul_r):
4169 (JSC::ARMAssembler::muls_r):
4170 (JSC::ARMAssembler::mull_r):
4171 (JSC::ARMAssembler::ldr_imm):
4172 (JSC::ARMAssembler::ldr_un_imm):
4173 (JSC::ARMAssembler::dtr_u):
4174 (JSC::ARMAssembler::dtr_ur):
4175 (JSC::ARMAssembler::dtr_d):
4176 (JSC::ARMAssembler::dtr_dr):
4177 (JSC::ARMAssembler::ldrh_r):
4178 (JSC::ARMAssembler::ldrh_d):
4179 (JSC::ARMAssembler::ldrh_u):
4180 (JSC::ARMAssembler::strh_r):
4181 (JSC::ARMAssembler::push_r):
4182 (JSC::ARMAssembler::pop_r):
4183 (JSC::ARMAssembler::poke_r):
4184 (JSC::ARMAssembler::peek_r):
4185 (JSC::ARMAssembler::clz_r):
4186 (JSC::ARMAssembler::bkpt):
4187 (JSC::ARMAssembler::lsl):
4188 (JSC::ARMAssembler::lsr):
4189 (JSC::ARMAssembler::asr):
4190 (JSC::ARMAssembler::lsl_r):
4191 (JSC::ARMAssembler::lsr_r):
4192 (JSC::ARMAssembler::asr_r):
4193 (JSC::ARMAssembler::size):
4194 (JSC::ARMAssembler::ensureSpace):
4195 (JSC::ARMAssembler::label):
4196 (JSC::ARMAssembler::align):
4197 (JSC::ARMAssembler::jmp):
4198 (JSC::ARMAssembler::patchPointerInternal):
4199 (JSC::ARMAssembler::patchConstantPoolLoad):
4200 (JSC::ARMAssembler::patchPointer):
4201 (JSC::ARMAssembler::repatchInt32):
4202 (JSC::ARMAssembler::repatchPointer):
4203 (JSC::ARMAssembler::repatchLoadPtrToLEA):
4204 (JSC::ARMAssembler::linkJump):
4205 (JSC::ARMAssembler::relinkJump):
4206 (JSC::ARMAssembler::linkCall):
4207 (JSC::ARMAssembler::relinkCall):
4208 (JSC::ARMAssembler::getRelocatedAddress):
4209 (JSC::ARMAssembler::getDifferenceBetweenLabels):
4210 (JSC::ARMAssembler::getCallReturnOffset):
4211 (JSC::ARMAssembler::getOp2Byte):
4212 (JSC::ARMAssembler::placeConstantPoolBarrier):
4213 (JSC::ARMAssembler::RM):
4214 (JSC::ARMAssembler::RS):
4215 (JSC::ARMAssembler::RD):
4216 (JSC::ARMAssembler::RN):
4217 (JSC::ARMAssembler::getConditionalField):
4218 * assembler/ARMv7Assembler.h:
4219 (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
4220 * assembler/AbstractMacroAssembler.h:
4221 (JSC::AbstractMacroAssembler::Call::enableLatePatch):
4222 (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
4223 * assembler/MacroAssembler.h:
4224 * assembler/MacroAssemblerARM.h: Added.
4225 (JSC::MacroAssemblerARM::):
4226 (JSC::MacroAssemblerARM::add32):
4227 (JSC::MacroAssemblerARM::and32):
4228 (JSC::MacroAssemblerARM::lshift32):
4229 (JSC::MacroAssemblerARM::mul32):
4230 (JSC::MacroAssemblerARM::not32):
4231 (JSC::MacroAssemblerARM::or32):
4232 (JSC::MacroAssemblerARM::rshift32):
4233 (JSC::MacroAssemblerARM::sub32):
4234 (JSC::MacroAssemblerARM::xor32):
4235 (JSC::MacroAssemblerARM::load32):
4236 (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
4237 (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
4238 (JSC::MacroAssemblerARM::load16):
4239 (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
4240 (JSC::MacroAssemblerARM::store32):
4241 (JSC::MacroAssemblerARM::pop):
4242 (JSC::MacroAssemblerARM::push):
4243 (JSC::MacroAssemblerARM::move):
4244 (JSC::MacroAssemblerARM::swap):
4245 (JSC::MacroAssemblerARM::signExtend32ToPtr):
4246 (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
4247 (JSC::MacroAssemblerARM::branch32):
4248 (JSC::MacroAssemblerARM::branch16):
4249 (JSC::MacroAssemblerARM::branchTest32):
4250 (JSC::MacroAssemblerARM::jump):
4251 (JSC::MacroAssemblerARM::branchAdd32):
4252 (JSC::MacroAssemblerARM::mull32):
4253 (JSC::MacroAssemblerARM::branchMul32):
4254 (JSC::MacroAssemblerARM::branchSub32):
4255 (JSC::MacroAssemblerARM::breakpoint):
4256 (JSC::MacroAssemblerARM::nearCall):
4257 (JSC::MacroAssemblerARM::call):
4258 (JSC::MacroAssemblerARM::ret):
4259 (JSC::MacroAssemblerARM::set32):
4260 (JSC::MacroAssemblerARM::setTest32):
4261 (JSC::MacroAssemblerARM::tailRecursiveCall):
4262 (JSC::MacroAssemblerARM::makeTailRecursiveCall):
4263 (JSC::MacroAssemblerARM::moveWithPatch):
4264 (JSC::MacroAssemblerARM::branchPtrWithPatch):
4265 (JSC::MacroAssemblerARM::storePtrWithPatch):
4266 (JSC::MacroAssemblerARM::supportsFloatingPoint):
4267 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
4268 (JSC::MacroAssemblerARM::loadDouble):
4269 (JSC::MacroAssemblerARM::storeDouble):
4270 (JSC::MacroAssemblerARM::addDouble):
4271 (JSC::MacroAssemblerARM::subDouble):
4272 (JSC::MacroAssemblerARM::mulDouble):
4273 (JSC::MacroAssemblerARM::convertInt32ToDouble):
4274 (JSC::MacroAssemblerARM::branchDouble):
4275 (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
4276 (JSC::MacroAssemblerARM::ARMCondition):
4277 (JSC::MacroAssemblerARM::prepareCall):
4278 (JSC::MacroAssemblerARM::call32):
4279 * assembler/X86Assembler.h:
4280 (JSC::X86Assembler::JmpSrc::enableLatePatch):
4281 * jit/ExecutableAllocator.h:
4282 (JSC::ExecutableAllocator::cacheFlush):
4284 * yarr/RegexJIT.cpp:
4285 (JSC::Yarr::RegexGenerator::generateEnter):
4286 (JSC::Yarr::RegexGenerator::generateReturn):
4288 2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
4290 Reviewed by Gavin Barraclough.
4292 Extend AssemblerBuffer with constant pool handling mechanism.
4293 https://bugs.webkit.org/show_bug.cgi?id=24986
4295 Add a platform independed constant pool framework.
4296 This pool can store 32 or 64 bits values which is enough to hold
4297 any integer, pointer or double constant.
4299 * assembler/AssemblerBuffer.h:
4300 (JSC::AssemblerBuffer::putIntUnchecked):
4301 (JSC::AssemblerBuffer::putInt64Unchecked):
4302 (JSC::AssemblerBuffer::append):
4303 (JSC::AssemblerBuffer::grow):
4304 * assembler/AssemblerBufferWithConstantPool.h: Added.
4307 2009-07-17 Eric Roman <eroman@chromium.org>
4309 Reviewed by Darin Adler.
4311 Build fix for non-Darwin.
4312 Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
4314 https://bugs.webkit.org/show_bug.cgi?id=27382
4316 * wtf/unicode/icu/CollatorICU.cpp:
4318 2009-07-17 Alexey Proskuryakov <ap@webkit.org>
4320 Reviewed by John Sullivan.
4322 Get user default collation order via a CFLocale API when available.
4324 * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
4326 2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4328 Reviewed by Simon Hausmann.
4330 [Qt] Fix the include path for the Symbian port
4331 https://bugs.webkit.org/show_bug.cgi?id=27358
4333 * JavaScriptCore.pri:
4335 2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
4337 Reviewed by David Levin.
4339 Build fix on platforms don't have MMAP.
4340 https://bugs.webkit.org/show_bug.cgi?id=27365
4342 * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
4344 2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
4346 Reviewed by David Levin.
4348 Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
4349 https://bugs.webkit.org/show_bug.cgi?id=27206
4351 Add ENABLE_WEB_SOCKETS
4353 * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
4355 2009-07-16 Maxime Simon <simon.maxime@gmail.com>
4357 Reviewed by Eric Seidel.
4359 Added Haiku-specific files for JavaScriptCore.
4360 https://bugs.webkit.org/show_bug.cgi?id=26620
4362 * wtf/haiku/MainThreadHaiku.cpp: Added.
4363 (WTF::initializeMainThreadPlatform):
4364 (WTF::scheduleDispatchFunctionsOnMainThread):
4366 2009-07-16 Gavin Barraclough <barraclough@apple.com>
4370 Revert r45969, this fix does not appear to be valid.
4371 https://bugs.webkit.org/show_bug.cgi?id=27077
4373 * bytecode/CodeBlock.cpp:
4374 (JSC::CodeBlock::~CodeBlock):
4375 (JSC::CodeBlock::unlinkCallers):
4379 2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4381 Reviewed by Oliver Hunt.
4383 Allow custom memory allocation control in ExceptionInfo and RareData struct
4384 https://bugs.webkit.org/show_bug.cgi?id=27336
4386 Inherits ExceptionInfo and RareData struct from FastAllocBase because these
4387 have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
4388 in JavaScriptCore/bytecode/CodeBlock.h:453.
4390 Remove unnecessary WTF:: namespace from CodeBlock inheritance.
4392 * bytecode/CodeBlock.h:
4394 2009-07-16 Mark Rowe <mrowe@apple.com>
4396 Rubber-stamped by Geoff Garen.
4398 Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
4400 * Configurations/FeatureDefines.xcconfig:
4402 2009-07-16 Yong Li <yong.li@torchmobile.com>
4404 Reviewed by George Staikos.
4406 https://bugs.webkit.org/show_bug.cgi?id=27320
4407 _countof is only included in CE6; for CE5 we need to define it ourself
4411 2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4413 Reviewed by Oliver Hunt.
4415 Workers + garbage collector: weird crashes
4416 https://bugs.webkit.org/show_bug.cgi?id=27077
4418 We need to unlink cached method call sites when a function is destroyed.
4420 * JavaScriptCore.xcodeproj/project.pbxproj:
4421 * bytecode/CodeBlock.cpp:
4422 (JSC::CodeBlock::~CodeBlock):
4423 (JSC::CodeBlock::unlinkCallers):
4425 (JSC::JIT::unlinkMethodCall):
4428 2009-07-15 Steve Falkenburg <sfalken@apple.com>
4432 Visual Studio reset our intermediate directory on us.
4435 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4436 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
4438 2009-07-15 Kwang Yul Seo <skyul@company100.net>
4440 Reviewed by Eric Seidel.
4442 https://bugs.webkit.org/show_bug.cgi?id=26794
4443 Make Yacc-generated parsers to use fastMalloc/fastFree.
4445 Define YYMALLOC and YYFREE to fastMalloc and fastFree
4450 2009-07-15 Darin Adler <darin@apple.com>
4452 Fix a build for a particular Apple configuration.
4454 * wtf/FastAllocBase.h: Change include to use "" style for
4455 including another wtf header. This is the style we use for
4456 including other public headers in the same directory.
4458 2009-07-15 George Staikos <george.staikos@torchmobile.com>
4460 Reviewed by Adam Treat.
4462 https://bugs.webkit.org/show_bug.cgi?id=27303
4463 Implement createThreadInternal for WinCE.
4464 Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
4466 * wtf/ThreadingWin.cpp:
4467 (WTF::createThreadInternal):
4469 2009-07-15 Joe Mason <joe.mason@torchmobile.com>
4471 Reviewed by George Staikos.
4473 https://bugs.webkit.org/show_bug.cgi?id=27298
4474 Platform defines for WINCE.
4475 Contains changes by Yong Li <yong.li@torchmobile.com>,
4476 George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
4480 2009-07-15 Yong Li <yong.li@torchmobile.com>
4482 Reviewed by Adam Treat.
4484 https://bugs.webkit.org/show_bug.cgi?id=27306
4485 Use RegisterClass instead of RegisterClassEx on WinCE.
4487 * wtf/win/MainThreadWin.cpp:
4488 (WTF::initializeMainThreadPlatform):
4490 2009-07-15 Yong Li <yong.li@torchmobile.com>
4492 Reviewed by George Staikos.
4494 https://bugs.webkit.org/show_bug.cgi?id=27301
4495 Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
4496 Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
4497 Joe Mason <joe.mason@torchmobile.com>
4499 * wtf/Assertions.cpp: vprintf_stderr_common
4501 2009-07-15 Yong Li <yong.li@torchmobile.com>
4503 Reviewed by George Staikos.
4505 https://bugs.webkit.org/show_bug.cgi?id=27020
4506 msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
4509 (WTF::gregorianDateTimeToMS):
4511 2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4513 Reviewed by Simon Hausmann.
4515 [Qt] Cleanup - Remove obsolete code from the make system
4516 https://bugs.webkit.org/show_bug.cgi?id=27299
4518 * JavaScriptCore.pro:
4521 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
4523 Reviewed by Simon Hausmann.
4525 https://bugs.webkit.org/show_bug.cgi?id=27056
4527 Alternate bool operator for codewarrior compiler (WINSCW).
4528 Compiler (latest b482) reports error for UnspecifiedBoolType construct:
4529 "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
4531 Same fix as in r38391.
4533 * JavaScriptCore/wtf/OwnArrayPtr.h:
4535 2009-07-15 Norbert Leser <norbert.leser@nokia.com>
4537 Reviewed by Darin Adler.
4539 Qualify include path with wtf to fix compilation
4541 https://bugs.webkit.org/show_bug.cgi?id=27055
4543 * interpreter/Interpreter.h:
4545 2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4547 Reviewed by Dave Kilzer.
4549 Turn off non-portable date manipulations for SYMBIAN
4550 https://bugs.webkit.org/show_bug.cgi?id=27064
4552 Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards
4553 and place the rules for controlling the guards in Platform.h.
4554 Turn off these newly introduced guards for SYMBIAN.
4557 (WTF::calculateUTCOffset):
4559 (WTF::GregorianDateTime::GregorianDateTime):
4560 (WTF::GregorianDateTime::operator tm):
4563 2009-07-15 Norbert Leser <norbert.leser@nokia.com>
4565 Reviewed by Simon Hausmann.
4567 Undef ASSERT on Symbian, to avoid excessive warnings
4568 https://bugs.webkit.org/show_bug.cgi?id=27052
4572 2009-07-15 Oliver Hunt <oliver@apple.com>
4574 Reviewed by Simon Hausmann.
4576 REGRESSION: fast/js/postfix-syntax.html fails with interpreter
4577 https://bugs.webkit.org/show_bug.cgi?id=27294
4579 When postfix operators operating on locals assign to the same local
4580 the order of operations has to be to store the incremented value, then
4581 store the unmodified number. Rather than implementing this subtle
4582 semantic in the interpreter I've just made the logic explicit in the
4583 bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
4587 (JSC::emitPostIncOrDec):
4589 2009-07-15 Oliver Hunt <oliver@apple.com>
4591 Reviewed by Simon Hausmann.
4593 REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
4594 https://bugs.webkit.org/show_bug.cgi?id=27259
4596 The interpreter was incorrectly basing its need to create the arguments object
4597 based on the presence of the callframe's argument reference rather than the local
4598 arguments reference. Based on this it then overrode the local variable reference.
4600 * interpreter/Interpreter.cpp:
4601 (JSC::Interpreter::privateExecute):
4603 2009-07-14 Steve Falkenburg <sfalken@apple.com>
4605 Reorganize JavaScriptCore headers into:
4606 API: include/JavaScriptCore/
4607 Private: include/private/JavaScriptCore/
4609 Reviewed by Darin Adler.
4611 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4612 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
4613 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
4614 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
4615 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
4617 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4619 Reviewed by Darin Adler.
4621 Change JSCell's superclass to NoncopyableCustomAllocated
4622 https://bugs.webkit.org/show_bug.cgi?id=27248
4624 JSCell class customizes operator new, since Noncopyable will be
4625 inherited from FastAllocBase, NoncopyableCustomAllocated has
4630 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4632 Reviewed by Darin Adler.
4634 Change all Noncopyable inheriting visibility to public.
4635 https://bugs.webkit.org/show_bug.cgi?id=27225
4637 Change all Noncopyable inheriting visibility to public because
4638 it is needed to the custom allocation framework (bug #20422).
4640 * bytecode/SamplingTool.h:
4641 * bytecompiler/RegisterID.h:
4642 * interpreter/CachedCall.h:
4643 * interpreter/RegisterFile.h:
4646 * runtime/ArgList.h:
4647 * runtime/BatchedTransitionOptimizer.h:
4648 * runtime/Collector.h:
4649 * runtime/CommonIdentifiers.h:
4651 * runtime/JSGlobalObject.h:
4653 * runtime/JSONObject.cpp:
4654 * runtime/SmallStrings.cpp:
4655 * runtime/SmallStrings.h:
4656 * wtf/CrossThreadRefCounted.h:
4659 * wtf/MessageQueue.h:
4660 * wtf/OwnArrayPtr.h:
4661 * wtf/OwnFastMallocPtr.h:
4664 * wtf/ThreadSpecific.h:
4667 * wtf/unicode/Collator.h:
4669 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4671 Reviewed by Darin Adler.
4673 Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
4674 https://bugs.webkit.org/show_bug.cgi?id=27249
4676 ParserArenaDeletable customizes operator new, to avoid double inheritance
4677 ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
4681 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4683 Reviewed by Darin Adler.
4685 Add RefCountedCustomAllocated to RefCounted.h
4686 https://bugs.webkit.org/show_bug.cgi?id=27232
4688 Some class which are inherited from RefCounted customize
4689 operator new, but RefCounted is inherited from Noncopyable
4690 which will be inherited from FastAllocBase. To avoid
4691 conflicts Noncopyable inheriting was moved down to RefCounted
4692 and to avoid double inheritance this class has been added.
4695 (WTF::RefCountedCustomAllocated::deref):
4696 (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
4698 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4700 Reviewed by Darin Adler.
4702 Add NoncopyableCustomAllocated to Noncopyable.h.
4703 https://bugs.webkit.org/show_bug.cgi?id=27228
4705 Some classes which inherited from Noncopyable overrides operator new
4706 since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
4707 needs to be extended with this new class to support the overriding.
4709 * wtf/Noncopyable.h:
4710 (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
4711 (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
4713 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4715 Reviewed by Darin Adler.
4717 Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
4718 https://bugs.webkit.org/show_bug.cgi?id=27260
4720 Inherits IdentifierTable class from FastAllocBase because it has been
4721 instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
4723 * runtime/Identifier.cpp:
4725 2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4727 Reviewed by Darin Adler.
4729 Allow custom memory allocation control for JavaScriptCore's Profiler class
4730 https://bugs.webkit.org/show_bug.cgi?id=27253
4732 Inherits Profiler class from FastAllocBase because it has been instantiated by
4733 'new' in JavaScriptCore/profiler/Profiler.cpp:56.
4735 * profiler/Profiler.h:
4737 2009-07-06 George Staikos <george.staikos@torchmobile.com>
4739 Reviewed by Adam Treat.
4741 Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
4743 https://bugs.webkit.org/show_bug.cgi?id=27030
4744 Implement custom RNG for WinCE using Mersenne Twister
4746 * wtf/RandomNumber.cpp:
4747 (WTF::randomNumber):
4748 * wtf/RandomNumberSeed.h:
4749 (WTF::initializeRandomNumberGenerator):
4750 * wtf/wince/mt19937ar.c: Added.
4760 2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
4762 Unreviewed make dist build fix.
4766 2009-07-13 Drew Wilson <atwilson@google.com>
4768 Reviewed by David Levin.
4770 Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
4771 https://bugs.webkit.org/show_bug.cgi?id=26932
4773 Added ENABLE(SHARED_WORKERS) flag (off by default).
4775 * Configurations/FeatureDefines.xcconfig:
4777 2009-07-07 Norbert Leser <norbert.leser@nokia.com>
4779 Reviewed by Maciej Stachoviak.
4781 https://bugs.webkit.org/show_bug.cgi?id=27058
4783 Removed superfluous parenthesis around single expression.
4784 Compilers on Symbian platform fail to properly parse and compile.
4786 * JavaScriptCore/wtf/Platform.h:
4788 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
4790 Reviewed by Maciej Stachoviak.
4792 https://bugs.webkit.org/show_bug.cgi?id=27054
4794 Renamed Translator to HashTranslator
4796 Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
4797 mismatch between template declaration and definition
4798 (HashTranslator / Translator)
4802 2009-07-13 Norbert Leser <norbert.leser@nokia.com>
4804 Reviewed by Eric Seidel.
4806 https://bugs.webkit.org/show_bug.cgi?id=27053
4808 Ambiguity in LabelScope initialization
4810 Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
4811 type of "0" unambiguously. Set expression explicitly to
4812 PassRefPtr<Label>::PassRefPtr()
4814 * bytecompiler/BytecodeGenerator.cpp
4816 2009-07-11 Simon Fraser <simon.fraser@apple.com>
4818 Enable support for accelerated compositing and 3d transforms on Leopard.
4819 <https://bugs.webkit.org/show_bug.cgi?id=20166>
4820 <rdar://problem/6120614>
4822 Reviewed by Oliver Hunt.
4824 * Configurations/FeatureDefines.xcconfig:
4827 2009-07-10 Mark Rowe <mrowe@apple.com>
4829 Second part of the "make Windows happier" dance.
4831 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4832 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4834 2009-07-10 Mark Rowe <mrowe@apple.com>
4836 Try and make the Windows build happy.
4838 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4839 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4841 2009-07-10 Kevin McCullough <kmccullough@apple.com>
4843 Reviewed by Geoffrey Garen.
4845 * debugger/Debugger.h: Made this function virtual for use in WebCore's
4848 2009-07-10 Kwang Yul Seo <skyul@company100.net>
4850 Reviewed by Darin Adler.
4852 ParserArenaDeletable should override delete
4853 https://bugs.webkit.org/show_bug.cgi?id=26790
4855 ParserArenaDeletable overrides new, but it does not override delete.
4856 ParserArenaDeletable must be freed by fastFree
4857 because it is allocated by fastMalloc.
4859 * parser/NodeConstructors.h:
4860 (JSC::ParserArenaDeletable::operator delete):
4863 2009-07-10 Adam Roben <aroben@apple.com>
4865 Sort all our Xcode projects
4867 Accomplished using sort-Xcode-project-file.
4869 Requested by Dave Kilzer.
4871 * JavaScriptCore.xcodeproj/project.pbxproj:
4873 2009-07-09 Maciej Stachowiak <mjs@apple.com>
4875 Not reviewed, build fix.
4877 Windows build fix for the last change.
4879 * wtf/dtoa.cpp: Forgot to include Vector.h
4881 2009-07-09 Maciej Stachowiak <mjs@apple.com>
4883 Reviewed by Darin Adler.
4885 REGRESSION: crash in edge cases of floating point parsing.
4886 https://bugs.webkit.org/show_bug.cgi?id=27110
4887 <rdar://problem/7044458>
4889 Tests: fast/css/number-parsing-crash.html
4890 fast/css/number-parsing-crash.html
4891 fast/js/number-parsing-crash.html
4894 (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
4895 with inline capacity
4897 (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
4898 Added an assertion to verify that invariants are maintained.
4900 All other functions are adapted fairly mechanically to the above changes.
4901 (WTF::BigInt::clear):
4902 (WTF::BigInt::size):
4903 (WTF::BigInt::resize):
4904 (WTF::BigInt::words):
4905 (WTF::BigInt::append):
4919 2009-07-09 Drew Wilson <atwilson@google.com>
4921 Reviewed by Alexey Proskuryakov.
4923 Turned on CHANNEL_MESSAGING by default because the MessageChannel API
4924 can now be implemented for Web Workers and is reasonably stable.
4926 * Configurations/FeatureDefines.xcconfig:
4928 2009-07-09 Oliver Hunt <oliver@apple.com>
4930 Reviewed by NOBODY (Build fix).
4932 * interpreter/Interpreter.cpp:
4933 (JSC::Interpreter::privateExecute):
4935 2009-07-09 Oliver Hunt <oliver@apple.com>
4937 Reviewed by Darin Adler.
4939 Bug 27016 - Interpreter crashes due to invalid array indexes
4940 <https://bugs.webkit.org/show_bug.cgi?id=27016>
4942 Unsigned vs signed conversions results in incorrect behaviour in
4943 64bit interpreter builds.
4945 * interpreter/Interpreter.cpp:
4946 (JSC::Interpreter::privateExecute):
4948 2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
4950 Reviewed by Darin Fisher.
4952 [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
4953 https://bugs.webkit.org/show_bug.cgi?id=27135
4955 * JavaScriptCore.gypi: Added.
4957 2009-07-09 Joe Mason <joe.mason@torchmobile.com>
4959 Reviewed by George Staikos.
4961 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
4963 https://bugs.webkit.org/show_bug.cgi?id=27031
4964 Add an override for deleteOwnedPtr(HDC) on Windows
4966 * wtf/OwnPtrCommon.h:
4967 * wtf/OwnPtrWin.cpp:
4968 (WTF::deleteOwnedPtr):
4970 2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
4972 Reviewed by Darin Adler.
4974 Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
4977 https://bugs.webkit.org/show_bug.cgi?id=27026
4979 Based on Norbert Leser's work.
4982 (printUsageStatement):
4986 2009-07-07 Gavin Barraclough <barraclough@apple.com>
4988 Reviewed by Sam Weinig.
4990 Stop loading constants into the register file.
4992 Instead, use high register values (highest bit bar the sign bit set) to indicate
4993 constants in the instruction stream, and when we encounter such a value load it
4994 directly from the CodeBlock.
4996 Since constants are no longer copied into the register file, this patch renders
4997 the 'unexpected constant' mechanism redundant, and removes it.
4999 2% improvement, thanks to Sam Weinig.
5001 * bytecode/CodeBlock.cpp:
5002 (JSC::CodeBlock::dump):
5003 (JSC::CodeBlock::CodeBlock):
5004 (JSC::CodeBlock::mark):
5005 (JSC::CodeBlock::shrinkToFit):
5006 * bytecode/CodeBlock.h:
5007 (JSC::CodeBlock::isTemporaryRegisterIndex):
5008 (JSC::CodeBlock::constantRegister):
5009 (JSC::CodeBlock::isConstantRegisterIndex):
5010 (JSC::CodeBlock::getConstant):
5011 (JSC::ExecState::r):
5012 * bytecode/Opcode.h:
5013 * bytecompiler/BytecodeGenerator.cpp:
5014 (JSC::BytecodeGenerator::preserveLastVar):
5015 (JSC::BytecodeGenerator::BytecodeGenerator):
5016 (JSC::BytecodeGenerator::addConstantValue):
5017 (JSC::BytecodeGenerator::emitEqualityOp):
5018 (JSC::BytecodeGenerator::emitLoad):
5019 (JSC::BytecodeGenerator::emitResolveBase):
5020 (JSC::BytecodeGenerator::emitResolveWithBase):
5021 (JSC::BytecodeGenerator::emitNewError):
5022 * bytecompiler/BytecodeGenerator.h:
5023 (JSC::BytecodeGenerator::emitNode):
5024 * interpreter/CallFrame.h:
5025 (JSC::ExecState::noCaller):
5026 (JSC::ExecState::hasHostCallFrameFlag):
5027 (JSC::ExecState::addHostCallFrameFlag):
5028 (JSC::ExecState::removeHostCallFrameFlag):
5029 * interpreter/Interpreter.cpp:
5030 (JSC::Interpreter::resolve):
5031 (JSC::Interpreter::resolveSkip):
5032 (JSC::Interpreter::resolveGlobal):
5033 (JSC::Interpreter::resolveBase):
5034 (JSC::Interpreter::resolveBaseAndProperty):
5035 (JSC::Interpreter::resolveBaseAndFunc):
5036 (JSC::Interpreter::dumpRegisters):
5037 (JSC::Interpreter::throwException):
5038 (JSC::Interpreter::createExceptionScope):
5039 (JSC::Interpreter::privateExecute):
5040 (JSC::Interpreter::retrieveArguments):
5042 (JSC::JIT::privateCompileMainPass):
5043 * jit/JITInlineMethods.h:
5044 (JSC::JIT::emitLoadDouble):
5045 (JSC::JIT::emitLoadInt32ToDouble):
5046 * jit/JITOpcodes.cpp:
5047 (JSC::JIT::emit_op_new_error):
5048 (JSC::JIT::emit_op_enter):
5049 (JSC::JIT::emit_op_enter_with_activation):
5051 (JSC::DeleteResolveNode::emitBytecode):
5052 (JSC::DeleteValueNode::emitBytecode):
5053 (JSC::PrefixResolveNode::emitBytecode):
5054 * runtime/JSActivation.cpp:
5055 (JSC::JSActivation::JSActivation):
5058 2009-07-07 Mark Rowe <mrowe@apple.com>
5060 Reviewed by Darin Adler.
5062 Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
5063 Bug 27025: Crashes and regression test failures related to regexps in 64-bit
5065 For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
5066 neglects to save and restore it. The change in handling of the output vector in r45545
5067 altered code generation so that the RegExp::match was now storing important data in rbx,
5068 which caused crashes and bogus results when it was clobbered.
5070 * yarr/RegexJIT.cpp:
5071 (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
5072 (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
5074 2009-07-06 Ada Chan <adachan@apple.com>
5076 Reviewed by Darin Adler and Mark Rowe.
5078 Decommitted spans are added to the list of normal spans rather than
5079 the returned spans in TCMalloc_PageHeap::Delete().
5080 https://bugs.webkit.org/show_bug.cgi?id=26998
5082 In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
5083 the process of merging with neighboring spans that are also decommitted.
5084 The merged span needs to be placed in the list of returned spans (spans
5085 whose memory has been returned to the system). Right now it's always added
5086 to the list of the normal spans which can theoretically cause thrashing.
5088 * wtf/FastMalloc.cpp:
5089 (WTF::TCMalloc_PageHeap::Delete):
5091 2009-07-05 Lars Knoll <lars.knoll@nokia.com>
5093 Reviewed by Maciej Stachowiak.
5095 https://bugs.webkit.org/show_bug.cgi?id=26843
5097 Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
5099 The Metrowerks compiler on the Symbian platform moves the globally
5100 defined Hashtables into read-only memory, despite one of the members
5101 being mutable. This causes crashes at run-time due to write access to
5104 Avoid the use of const with this compiler by introducing the
5105 JSC_CONST_HASHTABLE macro.
5107 Based on idea by Norbert Leser.
5109 * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
5110 * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
5111 * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
5113 2009-07-04 Dan Bernstein <mitz@apple.com>
5117 * runtime/RegExpConstructor.cpp:
5118 (JSC::RegExpConstructor::getLastParen):
5120 2009-07-03 Yong Li <yong.li@torchmobile.com>
5122 Reviewed by Maciej Stachowiak (and revised slightly)
5124 RegExp::match to be optimized
5125 https://bugs.webkit.org/show_bug.cgi?id=26957
5127 Allow regexp matching to use Vectors with inline capacity instead of
5128 allocating a new ovector buffer every time.
5130 ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
5132 * runtime/RegExp.cpp:
5133 (JSC::RegExp::match):
5135 * runtime/RegExpConstructor.cpp:
5136 (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
5137 (JSC::RegExpConstructorPrivate::lastOvector):
5138 (JSC::RegExpConstructorPrivate::tempOvector):
5139 (JSC::RegExpConstructorPrivate::changeLastOvector):
5140 (JSC::RegExpConstructor::performMatch):
5141 (JSC::RegExpMatchesArray::RegExpMatchesArray):
5142 (JSC::RegExpMatchesArray::fillArrayInstance):
5143 (JSC::RegExpConstructor::getBackref):
5144 (JSC::RegExpConstructor::getLastParen):
5145 (JSC::RegExpConstructor::getLeftContext):
5146 (JSC::RegExpConstructor::getRightContext):
5147 * runtime/StringPrototype.cpp:
5148 (JSC::stringProtoFuncSplit):
5150 2009-06-30 Kwang Yul Seo <skyul@company100.net>
5152 Reviewed by Eric Seidel.
5154 Override operator new/delete with const std::nothrow_t& as the second
5156 https://bugs.webkit.org/show_bug.cgi?id=26792
5158 On Windows CE, operator new/delete, new[]/delete[] with const
5159 std::nothrow_t& must be overrided because some standard template
5160 libraries use these operators.
5162 The problem occurs when memory allocated by new(size_t s, const
5163 std::nothrow_t&) is freed by delete(void* p). This causes the umatched
5164 malloc/free problem.
5166 The patch overrides all new, delete, new[] and delete[] to use
5167 fastMaloc and fastFree consistently.
5172 2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
5174 Reviewed by Sam Weinig.
5176 <https://bugs.webkit.org/show_bug.cgi?id=24986>
5178 Remove unnecessary references to AssemblerBuffer.
5180 * interpreter/Interpreter.cpp:
5181 * interpreter/Interpreter.h:
5183 2009-06-29 David Levin <levin@chromium.org>
5185 Reviewed by Oliver Hunt.
5187 Still seeing occasional leaks from UString::sharedBuffer code
5188 https://bugs.webkit.org/show_bug.cgi?id=26420
5190 The problem is that the pointer to the memory allocation isn't visible
5191 by "leaks" due to the lower bits being used as flags. The fix is to
5192 make the pointer visible in memory (in debug only). The downside of
5193 this fix that the memory allocated by sharedBuffer will still look like
5194 a leak in non-debug builds when any flags are set.
5196 * wtf/PtrAndFlags.h:
5197 (WTF::PtrAndFlags::set):
5199 2009-06-29 Sam Weinig <sam@webkit.org>
5201 Reviewed by Mark Rowe.
5203 Remove more unused scons support.
5205 * SConstruct: Removed.
5207 2009-06-29 Oliver Hunt <oliver@apple.com>
5209 Reviewed by Gavin Barraclough.
5211 <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
5212 <https://bugs.webkit.org/show_bug.cgi?id=26802>
5214 In the original JSON.parse patch unicode was handled correctly, however in some last
5215 minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
5217 * runtime/LiteralParser.cpp:
5218 (JSC::isSafeStringCharacter):
5219 (JSC::LiteralParser::Lexer::lexString):
5221 2009-06-26 Oliver Hunt <oliver@apple.com>
5223 Reviewed by Dan Bernstein.
5225 <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
5226 <https://bugs.webkit.org/show_bug.cgi?id=26746>
5228 Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this
5229 is less than correct. This patch corrects that error.
5231 * interpreter/Interpreter.cpp:
5232 (JSC::Interpreter::tryCacheGetByID):
5234 2009-06-26 Eric Seidel <eric@webkit.org>
5236 No review, only rolling out r45259.
5238 Roll out r45259 after crash appeared on the bots:
5239 plugins/undefined-property-crash.html
5240 ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
5241 (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
5242 void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
5244 * runtime/DateInstance.cpp:
5245 * runtime/Identifier.cpp:
5247 * runtime/RegExpConstructor.cpp:
5248 * runtime/RegExpObject.h:
5249 * runtime/ScopeChain.h:
5250 * runtime/UString.h:
5252 2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
5254 Reviewed by Simon Hausmann.
5256 Add support for QDataStream operators to Vector.
5262 2009-06-24 Sam Weinig <sam@webkit.org>
5264 Reviewed by Gavin Barraclough.
5266 Make the opcode sampler work once again.
5269 (JSC::JIT::compileGetByIdProto):
5270 (JSC::JIT::compileGetByIdSelfList):
5271 (JSC::JIT::compileGetByIdProtoList):
5272 (JSC::JIT::compileGetByIdChainList):
5273 (JSC::JIT::compileGetByIdChain):
5274 (JSC::JIT::compilePutByIdTransition):
5275 (JSC::JIT::compileCTIMachineTrampolines):
5276 (JSC::JIT::compilePatchGetArrayLength):
5277 * jit/JITStubCall.h:
5278 (JSC::JITStubCall::call):
5280 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5282 Reviewed by Maciej Stachowiak.
5284 Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
5285 unnecessary WTF:: usings.
5286 Remove existing unnecessary WTF:: usings.
5288 * interpreter/Interpreter.h:
5289 * profiler/CallIdentifier.h:
5290 * runtime/ScopeChain.h:
5291 * wtf/FastAllocBase.h:
5293 2009-06-24 David Levin <levin@chromium.org>
5297 * bytecode/CodeBlock.h:
5298 * bytecompiler/BytecodeGenerator.h:
5299 * interpreter/Register.h:
5301 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5303 Reviewed by Maciej Stachowiak.
5305 https://bugs.webkit.org/show_bug.cgi?id=26677
5307 Inherits CodeBlock class from FastAllocBase because it
5308 has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
5310 * bytecode/CodeBlock.h:
5312 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5314 Reviewed by Maciej Stachowiak.
5316 https://bugs.webkit.org/show_bug.cgi?id=26676
5318 Inherits BytecodeGenerator class from FastAllocBase because it has been
5319 instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
5321 * bytecompiler/BytecodeGenerator.h:
5323 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5325 Reviewed by Maciej Stachowiak.
5327 https://bugs.webkit.org/show_bug.cgi?id=26675
5329 Inherits Register class from FastAllocBase because it has been
5330 instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
5332 * interpreter/Register.h:
5334 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5336 Reviewed by Darin Adler.
5338 https://bugs.webkit.org/show_bug.cgi?id=26674
5340 Inherits HashMap class from FastAllocBase because it has been
5341 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
5345 2009-06-24 Oliver Hunt <oliver@apple.com>
5347 Reviewed by Darin Adler.
5349 <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
5351 The problem was caused by the page returned with a function using a
5352 var declaration list containing around ~3000 variables. The solution
5353 to this is to flatten the comma expression representation and make
5354 codegen comma expressions and initializer lists iterative rather than
5358 * parser/NodeConstructors.h:
5359 (JSC::CommaNode::CommaNode):
5361 (JSC::CommaNode::emitBytecode):
5363 (JSC::ExpressionNode::isCommaNode):
5364 (JSC::CommaNode::isCommaNode):
5365 (JSC::CommaNode::append):
5367 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5369 Reviewed by Maciej Stachowiak.
5371 https://bugs.webkit.org/show_bug.cgi?id=26645
5373 Inherits ScopeChainNode class from FastAllocBase because it has been
5374 instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
5378 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5380 Reviewed by Darin Adler.
5382 https://bugs.webkit.org/show_bug.cgi?id=26648
5384 Inherits Deque class from FastAllocBase because it has been
5385 instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
5386 JavaScriptCore/wtf/MainThread.cpp:62.
5390 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5392 Reviewed by Darin Adler.
5394 https://bugs.webkit.org/show_bug.cgi?id=26644
5396 Inherits RefPtr class from FastAllocBase because it has been
5397 instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
5401 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5403 Reviewed by Darin Adler.
5405 Inherits HashSet class from FastAllocBase, because it has been
5406 instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
5410 2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5412 Reviewed by Darin Adler.
5414 Inherits Vector class from FastAllocBase because it has been
5415 instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
5419 2009-06-24 Norbert Leser <norbert.leser@nokia.com>
5421 Reviewed by Maciej Stachoviak.
5423 The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
5424 (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
5425 Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
5426 the stack overflows immediately on Symbian hardware (max. 80 kB).
5427 Proposed change allocates generator objects on heap.
5428 Performance impact (if any) should be negligible and change is proposed as general fix,
5429 rather than ifdef'd for SYMBIAN.
5432 (JSC::ProgramNode::generateBytecode):
5433 (JSC::EvalNode::generateBytecode):
5434 (JSC::EvalNode::bytecodeForExceptionInfoReparse):
5435 (JSC::FunctionBodyNode::generateBytecode):
5436 (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
5438 2009-06-23 Oliver Hunt <oliver@apple.com>
5440 Reviewed by Gavin Barraclough.
5442 <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
5443 <https://bugs.webkit.org/show_bug.cgi?id=26593>
5445 Do not attempt to cache structure chains if they contain a dictionary at any level.
5447 * interpreter/Interpreter.cpp:
5448 (JSC::Interpreter::tryCachePutByID):
5449 (JSC::Interpreter::tryCacheGetByID):
5451 (JSC::JITThunks::tryCachePutByID):
5452 * runtime/Structure.cpp:
5453 (JSC::Structure::getEnumerablePropertyNames):
5454 (JSC::Structure::addPropertyTransition):
5455 * runtime/StructureChain.cpp:
5456 (JSC::StructureChain::isCacheable):
5457 * runtime/StructureChain.h:
5459 2009-06-23 Yong Li <yong.li@torchmobile.com>
5461 Reviewed by George Staikos.
5463 https://bugs.webkit.org/show_bug.cgi?id=26654
5464 Add the proper export define for the JavaScriptCore API when building for WINCE.
5468 2009-06-23 Joe Mason <joe.mason@torchmobile.com>
5470 Reviewed by Adam Treat.
5472 Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
5474 https://bugs.webkit.org/show_bug.cgi?id=26611
5475 Implement currentThreadStackBase on WINCE by adding a global,
5476 g_stackBase, which must be set to the address of a local variable
5477 by the caller before calling any WebKit function that invokes JSC.
5479 * runtime/Collector.cpp:
5480 (JSC::isPageWritable):
5481 (JSC::getStackBase):
5482 Starts at the top of the stack and returns the entire range of
5483 consecutive writable pages as an estimate of the actual stack.
5484 This will be much bigger than the actual stack range, so some
5485 dead objects can't be collected, but it guarantees live objects
5486 aren't collected prematurely.
5488 (JSC::currentThreadStackBase):
5489 On WinCE, returns g_stackBase if set or call getStackBase as a
5492 2009-06-23 Oliver Hunt <oliver@apple.com>
5494 Reviewed by Alexey Proskuryakov.
5496 Fix stupid performance problem in the LiteralParser
5498 The LiteralParser was making a new UString in order to use
5499 toDouble, however UString's toDouble allows a much wider range
5500 of numberic strings than the LiteralParser accepts, and requires
5501 an additional heap allocation or two for the construciton of the
5502 UString. To rectify this we just call WTF::dtoa directly using
5503 a stack allocated buffer to hold the validated numeric literal.
5505 * runtime/LiteralParser.cpp:
5506 (JSC::LiteralParser::Lexer::lexNumber):
5507 (JSC::LiteralParser::parse):
5508 * runtime/LiteralParser.h:
5510 2009-06-22 Oliver Hunt <oliver@apple.com>
5512 Reviewed by Alexey Proskuryakov.
5514 Bug 26640: JSON.stringify needs to special case Boolean objects
5515 <https://bugs.webkit.org/show_bug.cgi?id=26640>
5517 Add special case handling of the Boolean object so we match current
5520 * runtime/JSONObject.cpp:
5521 (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
5523 (JSC::Stringifier::appendStringifiedValue):
5525 2009-06-22 Oliver Hunt <oliver@apple.com>
5527 Reviewed by Darin Adler.
5529 Bug 26591: Support revivers in JSON.parse
5530 <https://bugs.webkit.org/show_bug.cgi?id=26591>
5532 Add reviver support to JSON.parse. This completes the JSON object.
5534 * runtime/JSONObject.cpp:
5535 (JSC::Walker::Walker):
5536 (JSC::Walker::callReviver):
5537 (JSC::Walker::walk):
5538 (JSC::JSONProtoFuncParse):
5540 2009-06-21 Oliver Hunt <oliver@apple.com>
5542 Reviewed by Darin Adler.
5544 Bug 26592: Support standard toJSON functions
5545 <https://bugs.webkit.org/show_bug.cgi?id=26592>
5547 Add support for the standard Date.toJSON function.
5549 * runtime/DatePrototype.cpp:
5550 (JSC::dateProtoFuncToJSON):
5552 2009-06-21 Oliver Hunt <oliver@apple.com>
5554 Reviewed by Sam Weinig.
5556 Bug 26594: JSC needs to support Date.toISOString
5557 <https://bugs.webkit.org/show_bug.cgi?id=26594>
5559 Add support for Date.toISOString.
5561 * runtime/DatePrototype.cpp:
5562 (JSC::dateProtoFuncToISOString):
5564 2009-06-21 Oliver Hunt <oliver@apple.com>
5566 Reviewed by NOBODY (Build fix).
5570 * runtime/LiteralParser.cpp:
5571 (JSC::LiteralParser::parse):
5573 2009-06-21 Oliver Hunt <oliver@apple.com>
5575 Reviewed by Darin Adler and Cameron Zwarich.
5577 Bug 26587: Support JSON.parse
5578 <https://bugs.webkit.org/show_bug.cgi?id=26587>
5580 Extend the LiteralParser to support the full strict JSON
5581 grammar, fix a few places where the grammar was incorrectly
5582 lenient. Doesn't yet support the JSON.parse reviver function
5583 but that does not block the JSON.parse functionality itself.
5585 * interpreter/Interpreter.cpp:
5586 (JSC::Interpreter::callEval):
5587 * runtime/JSGlobalObjectFunctions.cpp:
5588 (JSC::globalFuncEval):
5589 * runtime/JSONObject.cpp:
5590 (JSC::JSONProtoFuncParse):
5591 * runtime/LiteralParser.cpp:
5592 (JSC::LiteralParser::Lexer::lex):
5593 (JSC::isSafeStringCharacter):
5594 (JSC::LiteralParser::Lexer::lexString):
5595 (JSC::LiteralParser::parse):
5596 * runtime/LiteralParser.h:
5597 (JSC::LiteralParser::LiteralParser):
5598 (JSC::LiteralParser::tryJSONParse):
5599 (JSC::LiteralParser::):
5600 (JSC::LiteralParser::Lexer::Lexer):
5602 2009-06-21 David Levin <levin@chromium.org>
5604 Reviewed by NOBODY (speculative build fix for windows).
5606 Simply removed some whitespace form this file to make windows build wtf and
5607 hopefully copy the new MessageQueque.h so that WebCore picks it up.
5609 * wtf/Assertions.cpp:
5611 2009-06-21 Drew Wilson <atwilson@google.com>
5613 Reviewed by David Levin.
5615 <https://bugs.webkit.org/show_bug.cgi?id=25043>
5616 Added support for multi-threaded MessagePorts.
5618 * wtf/MessageQueue.h:
5619 (WTF::::appendAndCheckEmpty):
5620 Added API to test whether the queue was empty before adding an element.
5622 2009-06-20 David D. Kilzer <ddkilzer@webkit.org>
5624 Fix namespace comment in SegmentedVector.h
5626 * wtf/SegmentedVector.h: Updated namespace comment to reflect
5627 new namespace after r44897.
5629 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
5631 Bug 24986: ARM JIT port
5632 <https://bugs.webkit.org/show_bug.cgi?id=24986>
5634 Reviewed by Oliver Hunt.
5636 An Iterator added for SegmentedVector. Currently
5637 only the pre ++ operator is supported.
5639 * wtf/SegmentedVector.h:
5640 (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
5641 (WTF::SegmentedVectorIterator::operator*):
5642 (WTF::SegmentedVectorIterator::operator->):
5643 (WTF::SegmentedVectorIterator::operator++):
5644 (WTF::SegmentedVectorIterator::operator==):
5645 (WTF::SegmentedVectorIterator::operator!=):
5646 (WTF::SegmentedVectorIterator::operator=):
5647 (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
5648 (WTF::SegmentedVector::alloc):
5649 (WTF::SegmentedVector::begin):
5650 (WTF::SegmentedVector::end):
5652 2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
5654 Bug 24986: ARM JIT port
5655 <https://bugs.webkit.org/show_bug.cgi?id=24986>
5657 Reviewed by Oliver Hunt.
5659 Move SegmentedVector to /wtf subdirectory
5660 and change "namespace JSC" to "namespace WTF"
5662 Additional build file updates by David Kilzer.
5664 * GNUmakefile.am: Updated path to SegmentedVector.h.
5665 * JavaScriptCore.order: Updated SegmentedVector namespace from
5666 JSC to WTF in mangled C++ method name.
5667 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5668 Removed reference to bytecompiler\SegmentedVector.h.
5669 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
5670 wtf\SegmentedVector.h.
5671 * JavaScriptCore.xcodeproj/project.pbxproj: Moved
5672 SegmentedVector.h definition from bytecompiler subdirectory to
5674 * bytecompiler/BytecodeGenerator.h: Updated #include path to
5675 SegmentedVector.h and prepended WTF:: namespace to its use.
5676 * parser/Lexer.h: Ditto.
5677 * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
5678 (WTF::SegmentedVector::SegmentedVector):
5679 (WTF::SegmentedVector::~SegmentedVector):
5680 (WTF::SegmentedVector::size):
5681 (WTF::SegmentedVector::at):
5682 (WTF::SegmentedVector::operator[]):
5683 (WTF::SegmentedVector::last):
5684 (WTF::SegmentedVector::append):
5685 (WTF::SegmentedVector::removeLast):
5686 (WTF::SegmentedVector::grow):
5687 (WTF::SegmentedVector::clear):
5688 (WTF::SegmentedVector::deleteAllSegments):
5689 (WTF::SegmentedVector::segmentExistsFor):
5690 (WTF::SegmentedVector::segmentFor):
5691 (WTF::SegmentedVector::subscriptFor):
5692 (WTF::SegmentedVector::ensureSegmentsFor):
5693 (WTF::SegmentedVector::ensureSegment):
5695 2009-06-19 Gavin Barraclough <barraclough@apple.com>
5697 Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
5700 (JSC::JIT::privateCompile):
5701 (JSC::JIT::privateCompileCTIMachineTrampolines):
5702 (JSC::JIT::emitGetVariableObjectRegister):
5703 (JSC::JIT::emitPutVariableObjectRegister):
5705 * jit/JITArithmetic.cpp:
5706 (JSC::JIT::emit_op_rshift):
5707 (JSC::JIT::emitSlow_op_jnless):
5708 (JSC::JIT::emitSlow_op_jnlesseq):
5709 (JSC::JIT::compileBinaryArithOp):
5711 (JSC::JIT::compileOpCallInitializeCallFrame):
5712 (JSC::JIT::compileOpCall):
5713 * jit/JITInlineMethods.h:
5714 (JSC::JIT::restoreArgumentReference):
5715 (JSC::JIT::checkStructure):
5716 * jit/JITOpcodes.cpp:
5717 (JSC::JIT::emit_op_instanceof):
5718 (JSC::JIT::emit_op_get_scoped_var):
5719 (JSC::JIT::emit_op_put_scoped_var):
5720 (JSC::JIT::emit_op_construct_verify):
5721 (JSC::JIT::emit_op_resolve_global):
5722 (JSC::JIT::emit_op_jeq_null):
5723 (JSC::JIT::emit_op_jneq_null):
5724 (JSC::JIT::emit_op_to_jsnumber):
5725 (JSC::JIT::emit_op_catch):
5726 (JSC::JIT::emit_op_eq_null):
5727 (JSC::JIT::emit_op_neq_null):
5728 (JSC::JIT::emit_op_convert_this):
5729 (JSC::JIT::emit_op_profile_will_call):
5730 (JSC::JIT::emit_op_profile_did_call):
5731 (JSC::JIT::emitSlow_op_get_by_val):
5732 * jit/JITPropertyAccess.cpp:
5733 (JSC::JIT::emit_op_get_by_val):
5734 (JSC::JIT::emit_op_put_by_val):
5735 (JSC::JIT::emit_op_method_check):
5736 (JSC::JIT::compileGetByIdHotPath):
5737 (JSC::JIT::emit_op_put_by_id):
5738 (JSC::JIT::compilePutDirectOffset):
5739 (JSC::JIT::compileGetDirectOffset):
5740 (JSC::JIT::privateCompilePutByIdTransition):
5741 (JSC::JIT::privateCompilePatchGetArrayLength):
5743 (JSC::JITThunks::JITThunks):
5745 2009-06-19 Gavin Barraclough <barraclough@apple.com>
5747 Reviewed by NOBODY (Windows build fix).
5750 * jit/JITInlineMethods.h:
5752 2009-06-19 Gabor Loki <loki@inf.u-szeged.hu>
5754 Reviewed by Gavin Barraclough.
5756 Reorganize ARM architecture specific macros.
5757 Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
5759 Bug 24986: ARM JIT port
5760 <https://bugs.webkit.org/show_bug.cgi?id=24986>
5762 * assembler/ARMv7Assembler.h:
5763 * assembler/AbstractMacroAssembler.h:
5764 (JSC::AbstractMacroAssembler::Imm32::Imm32):
5765 * assembler/MacroAssembler.h:
5766 * assembler/MacroAssemblerCodeRef.h:
5767 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
5768 * jit/ExecutableAllocator.h:
5769 (JSC::ExecutableAllocator::cacheFlush):
5771 * jit/JITInlineMethods.h:
5772 (JSC::JIT::restoreArgumentReferenceForTrampoline):
5776 * yarr/RegexJIT.cpp:
5777 (JSC::Yarr::RegexGenerator::generateEnter):
5778 (JSC::Yarr::RegexGenerator::generateReturn):
5780 2009-06-19 Gavin Barraclough <barraclough@apple.com>
5782 Reviewed by Oliver Hunt.
5784 Fix armv7 JIT build issues.
5786 Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
5787 and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
5789 * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
5790 * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
5794 * jit/JITInlineMethods.h:
5795 (JSC::JIT::restoreArgumentReference):
5796 * jit/JITOpcodes.cpp:
5797 (JSC::JIT::emit_op_catch):
5799 (JSC::JITThunks::JITThunks):
5801 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
5803 Blind attempt at build fix.
5805 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5806 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5808 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5810 Reviewed by Oliver Hunt.
5812 Inherits CallIdentifier struct from FastAllocBase because it has been
5813 instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
5815 * wtf/HashCountedSet.h:
5817 2009-06-19 Adam Treat <adam.treat@torchmobile.com>
5819 Reviewed by Oliver Hunt.
5821 https://bugs.webkit.org/show_bug.cgi?id=26540
5822 Modify the test shell to add a new function 'checkSyntax' that will
5823 only parse the source instead of executing it. In this way we can test
5824 pure parsing performance against some of the larger scripts in the wild.
5827 (GlobalObject::GlobalObject):
5828 (functionCheckSyntax):
5830 2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5832 Reviewed by Darin Adler.
5834 Inherits HashCountedSet class from FastAllocBase because it has been
5835 instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
5837 * wtf/HashCountedSet.h:
5839 2009-06-19 Yong Li <yong.li@torchmobile.com>
5841 Reviewed by George Staikos.
5843 https://bugs.webkit.org/show_bug.cgi?id=26558
5844 Declare these symbols extern for WINCE as they are provided by libce.
5846 * runtime/DateConstructor.cpp:
5847 * runtime/DatePrototype.cpp:
5848 (JSC::formatLocaleDate):
5850 2009-06-19 Oliver Hunt <oliver@apple.com>
5852 Reviewed by Maciej Stachowiak.
5854 <rdar://problem/6988973> ScopeChain leak in interpreter builds
5856 Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
5859 * runtime/JSFunction.cpp:
5860 (JSC::JSFunction::~JSFunction):
5863 2009-06-19 Yong Li <yong.li@torchmobile.com>
5865 Reviewed by George Staikos.
5867 https://bugs.webkit.org/show_bug.cgi?id=26543
5868 Windows CE uses 'GetLastError' instead of 'errno.'
5870 * interpreter/RegisterFile.h:
5871 (JSC::RegisterFile::RegisterFile):
5872 (JSC::RegisterFile::grow):
5874 2009-06-19 David Levin <levin@chromium.org>
5876 Reviewed by NOBODY (Windows build fix).
5878 Add export for Windows corresponding to OSX export done in r44844.
5879 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5880 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5882 2009-06-18 Oliver Hunt <oliver@apple.com>
5884 Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
5886 Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
5887 <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
5889 We need to make sure that each native function instance correctly unlinks any references to it
5890 when it is collected. Allowing this to happen required a few changes:
5891 * Every native function needs a codeblock to track the link information
5892 * To have this codeblock, every function now also needs its own functionbodynode
5893 so we no longer get to have a single shared instance.
5894 * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
5896 * JavaScriptCore.exp:
5897 * bytecode/CodeBlock.cpp:
5898 (JSC::CodeBlock::CodeBlock):
5899 Constructor for NativeCode CodeBlock
5900 (JSC::CodeBlock::derefStructures):
5901 (JSC::CodeBlock::refStructures):
5902 (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
5903 (JSC::CodeBlock::handlerForBytecodeOffset):
5904 (JSC::CodeBlock::lineNumberForBytecodeOffset):
5905 (JSC::CodeBlock::expressionRangeForBytecodeOffset):
5906 (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
5907 (JSC::CodeBlock::functionRegisterForBytecodeOffset):
5908 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
5909 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
5910 (JSC::CodeBlock::setJITCode):
5911 Add assertions to ensure we don't try and use NativeCode CodeBlocks as
5914 * bytecode/CodeBlock.h:
5916 (JSC::CodeBlock::source):
5917 (JSC::CodeBlock::sourceOffset):
5918 (JSC::CodeBlock::evalCodeCache):
5919 (JSC::CodeBlock::createRareDataIfNecessary):
5923 (JSC::JIT::privateCompileCTIMachineTrampolines):
5924 (JSC::JIT::linkCall):
5925 Update logic to allow native function caching
5929 (JSC::FunctionBodyNode::createNativeThunk):
5930 (JSC::FunctionBodyNode::isHostFunction):
5932 * runtime/JSFunction.cpp:
5933 (JSC::JSFunction::JSFunction):
5934 (JSC::JSFunction::~JSFunction):
5935 (JSC::JSFunction::mark):
5936 * runtime/JSGlobalData.cpp:
5937 (JSC::JSGlobalData::~JSGlobalData):
5938 * runtime/JSGlobalData.h:
5940 2009-06-18 Gavin Barraclough <barraclough@apple.com>
5942 Reviewed by NOBODY (Windows build fix).
5945 (WTF::calculateUTCOffset):
5947 2009-06-18 Gavin Barraclough <barraclough@apple.com>
5949 Reviewed by Geoff Garen.
5951 Timezone calculation incorrect in Venezuela.
5953 https://bugs.webkit.org/show_bug.cgi?id=26531
5954 <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
5956 The problem is that we're calculating the timezone relative to 01/01/2000,
5957 but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
5958 According to the spec, section 15.9.1.9 states "the time since the beginning
5959 of the year", presumably meaning the *current* year. Change the calculation
5960 to be based on whatever the current year is, rather than a canned date.
5962 No performance impact.
5965 (WTF::calculateUTCOffset):
5967 2009-06-18 Gavin Barraclough <barraclough@apple.com>
5969 Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
5971 (Reintroducing patch added in r44492, and reverted in r44796.)
5973 Change the implementation of op_throw so the stub function always modifies its
5974 return address - if it doesn't find a 'catch' it will switch to a trampoline
5975 to force a return from JIT execution. This saves memory, by avoiding the need
5976 for a unique return for every op_throw.
5978 * jit/JITOpcodes.cpp:
5979 (JSC::JIT::emit_op_throw):
5980 JITStubs::cti_op_throw now always changes its return address,
5981 remove return code generated after the stub call (this is now
5982 handled by ctiOpThrowNotCaught).
5985 Add ctiOpThrowNotCaught definitions.
5986 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
5987 Change cti_op_throw to always change its return address.
5989 Add ctiOpThrowNotCaught declaration.
5991 2009-06-18 Kevin McCullough <kmccullough@apple.com>
5993 Reviewed by Oliver Hunt.
5995 <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
5997 - Exposed functions now needed by WebCore.
5999 * JavaScriptCore.exp:
6001 2009-06-17 Darin Adler <darin@apple.com>
6003 Reviewed by Oliver Hunt.
6005 Bug 26429: Make JSON.stringify non-recursive so it can handle objects
6006 of arbitrary complexity
6007 https://bugs.webkit.org/show_bug.cgi?id=26429
6009 For marking I decided not to use gcProtect, because this is inside the engine
6010 so it's easy enough to just do marking. And that darned gcProtect does locking!
6011 Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
6012 for that class says "FIXME: Remove all clients of this API, then remove this API."
6014 * runtime/Collector.cpp:
6015 (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
6017 * runtime/CommonIdentifiers.cpp:
6018 (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
6019 * runtime/CommonIdentifiers.h: Ditto.
6021 * runtime/JSGlobalData.cpp:
6022 (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
6023 * runtime/JSGlobalData.h: Added firstStringifierToMark.
6025 * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
6026 (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
6027 objects to get their number and string values.
6028 (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
6029 to wrap an identifier or integer so we don't have to do any work unless we
6030 actually call a replacer.
6031 (JSC::ReplacerPropertyName::value): Added.
6032 (JSC::gap): Added. Helper function for the Stringifier constructor.
6033 (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
6034 The class is used to wrap an identifier or integer so we don't have to
6035 allocate a number or string until we actually call toJSON or a replacer.
6036 (JSC::PropertyNameForFunctionCall::asJSValue): Added.
6037 (JSC::Stringifier::Stringifier): Updated and moved out of the class
6038 definition. Added code to hook this into a singly linked list for marking.
6039 (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
6040 (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
6041 (JSC::Stringifier::stringify): Updated.
6042 (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
6043 (JSC::Stringifier::toJSON): Renamed from toJSONValue.
6044 (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
6045 Added code to use the m_holderStack to do non-recursive stringify of
6046 objects and arrays. This code also uses the timeout checker since in
6047 pathological cases it could be slow even without calling into the
6048 JavaScript virtual machine.
6049 (JSC::Stringifier::willIndent): Added.
6050 (JSC::Stringifier::indent): Added.
6051 (JSC::Stringifier::unindent): Added.
6052 (JSC::Stringifier::startNewLine): Added.
6053 (JSC::Stringifier::Holder::Holder): Added.
6054 (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
6055 function that handles the format of arrays and objects.
6056 (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
6057 of the file so the JSONObject class is not interleaved with the
6059 (JSC::JSONObject::markStringifiers): Added. Calls mark.
6060 (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
6061 to compute the gap string is now a separate function.
6063 * runtime/JSONObject.h: Made everything private. Added markStringifiers.
6065 2009-06-17 Oliver Hunt <oliver@apple.com>
6067 Reviewed by Gavin Barraclough.
6069 <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
6071 Roll out r43849 as it appears that we cannot rely on the address of
6072 an objects property storage being constant even if the structure is
6076 * jit/JITPropertyAccess.cpp:
6077 (JSC::JIT::compileGetDirectOffset):
6078 (JSC::JIT::privateCompileGetByIdProto):
6079 (JSC::JIT::privateCompileGetByIdProtoList):
6080 (JSC::JIT::privateCompileGetByIdChainList):
6081 (JSC::JIT::privateCompileGetByIdChain):
6083 2009-06-17 Gavin Barraclough <barraclough@apple.com>
6085 Rubber Stamped by Mark Rowe.
6087 Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
6089 * jit/JITOpcodes.cpp:
6090 (JSC::JIT::emit_op_throw):
6093 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
6096 2009-06-17 Gavin Barraclough <barraclough@apple.com>
6098 Reviewed by Mark Rowe.
6100 <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
6102 On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
6104 No performance impact.
6106 * jit/JITArithmetic.cpp:
6107 (JSC::JIT::emit_op_rshift):
6109 2009-06-17 Adam Treat <adam.treat@torchmobile.com>
6111 Reviewed by George Staikos.
6113 https://bugs.webkit.org/show_bug.cgi?id=23155
6114 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
6119 2009-06-17 George Staikos <george.staikos@torchmobile.com>
6121 Reviewed by Adam Treat.
6123 https://bugs.webkit.org/show_bug.cgi?id=23155
6124 Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
6128 * wtf/Assertions.cpp:
6130 * wtf/CurrentTime.cpp:
6131 (WTF::lowResUTCTime):
6133 (WTF::getLocalTime):
6136 * wtf/StringExtras.h:
6138 * wtf/win/MainThreadWin.cpp:
6140 2009-06-17 Gavin Barraclough <barraclough@apple.com>
6142 Reviewed by Oliver Hunt.
6144 <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
6146 Remove PropertySlot::putValue - PropertySlots should only be used for getting,
6147 not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
6148 which is what it really was being used to ask, and remove some other getOwnPropertySlot
6149 & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
6151 * runtime/JSGlobalObject.h:
6152 (JSC::JSGlobalObject::hasOwnPropertyForWrite):
6153 * runtime/JSObject.h:
6154 * runtime/JSStaticScopeObject.cpp:
6155 * runtime/JSStaticScopeObject.h:
6156 * runtime/PropertySlot.h:
6158 2009-06-16 Gavin Barraclough <barraclough@apple.com>
6160 Reviewed by Oliver hunt.
6162 Temporarily partially disable r44492, since this is causing some problems on internal builds.
6164 * jit/JITOpcodes.cpp:
6165 (JSC::JIT::emit_op_throw):
6167 (JSC::JITStubs::DEFINE_STUB_FUNCTION):
6169 2009-06-16 Sam Weinig <sam@webkit.org>
6176 2009-06-16 Sam Weinig <sam@webkit.org>
6178 Reviewed by Oliver Hunt.
6180 Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
6181 it for each type of stub using the return address to find the correct
6187 (JSC::JIT::compileGetByIdProto):
6188 (JSC::JIT::compileGetByIdSelfList):
6189 (JSC::JIT::compileGetByIdProtoList):
6190 (JSC::JIT::compileGetByIdChainList):
6191 (JSC::JIT::compileGetByIdChain):
6192 (JSC::JIT::compilePutByIdTransition):
6193 (JSC::JIT::compileCTIMachineTrampolines):
6194 (JSC::JIT::compilePatchGetArrayLength):
6195 * jit/JITStubCall.h:
6196 (JSC::JITStubCall::call):
6198 == Rolled over to ChangeLog-2009-06-16 ==