1
2009-10-02 Geoffrey Garen <ggaren@apple.com>
3
Reviewed by Sam Weinig.
5
Removed the concept of a "fast access cutoff" in arrays, because it
6
punished some patterns of array access too much, and made things too
7
complex for inlining in some cases.
9
1.3% speedup on SunSpider.
12
(JSC::JIT::emitSlow_op_get_by_val):
13
(JSC::JIT::emitSlow_op_put_by_val):
14
* jit/JITPropertyAccess.cpp:
15
(JSC::JIT::emit_op_get_by_val):
16
(JSC::JIT::emitSlow_op_get_by_val):
17
(JSC::JIT::emit_op_put_by_val):
18
(JSC::JIT::emitSlow_op_put_by_val):
21
(JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
22
getting / putting from / to an array. Inline putting past the end of
25
* runtime/JSArray.cpp:
26
(JSC::JSArray::JSArray):
27
(JSC::JSArray::getOwnPropertySlot):
28
(JSC::JSArray::getOwnPropertyDescriptor):
30
(JSC::JSArray::putSlowCase):
31
(JSC::JSArray::deleteProperty):
32
(JSC::JSArray::getOwnPropertyNames):
33
(JSC::JSArray::increaseVectorLength):
34
(JSC::JSArray::setLength):
38
(JSC::JSArray::fillArgList):
39
(JSC::JSArray::copyToRegisters):
40
(JSC::JSArray::compactForSorting):
41
(JSC::JSArray::checkConsistency):
43
(JSC::JSArray::canGetIndex):
44
(JSC::JSArray::canSetIndex):
45
(JSC::JSArray::setIndex):
46
(JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
47
replaced with checks for JSValue() to detect reads and writes from / to
48
uninitialized parts of the array.
50
2009-10-02 Jonni Rainisto <jonni.rainisto@nokia.com>
52
Reviewed by Darin Adler.
54
Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
55
https://bugs.webkit.org/show_bug.cgi?id=29956
57
* wtf/RandomNumber.cpp:
58
(WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
60
2009-10-02 Geoffrey Garen <ggaren@apple.com>
62
Reviewed by Sam Weinig.
64
Take one branch instead of two to test for JSValue().
66
1.1% SunSpider speedup.
69
(JSC::JIT::compileOpCall):
71
(JSC::JIT::emit_op_to_jsnumber):
72
(JSC::JIT::emit_op_create_arguments):
73
* jit/JITPropertyAccess.cpp:
74
(JSC::JIT::emitSlow_op_get_by_val):
75
(JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
76
of testing for the cell tag with a 0 payload.
78
* runtime/JSValue.cpp:
79
(JSC::JSValue::description): Added support for dumping the new empty value,
80
and deleted values, in debug builds.
83
(JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
85
(JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
86
tag, to avoid having two different c++ versions of null / empty.
88
(JSC::JSValue::operator bool): Test for the empty value tag, instead
89
of testing for the cell tag with a 0 payload.
91
2009-10-01 Zoltan Horvath <zoltan@webkit.org>
93
Reviewed by Simon Hausmann.
95
[Qt] Allow custom memory allocation control for the whole JavaScriptCore
96
https://bugs.webkit.org/show_bug.cgi?id=27029
98
Since in JavaScriptCore almost every class which has been instantiated by operator new is
99
inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
100
when USE_SYSTEM_MALLOC=0.
102
Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
103
(It's needed for the functionality of TCmalloc.)
105
Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
107
* JavaScriptCore.pri:
108
* wtf/FastMalloc.cpp:
112
2009-09-30 Oliver Hunt <oliver@apple.com>
114
Reviewed by Geoff Garen.
116
Devirtualise array toString conversion
118
Tweak the implementation of Array.prototype.toString to have a fast path
119
when acting on a true JSArray.
121
* runtime/ArrayPrototype.cpp:
122
(JSC::arrayProtoFuncToString):
124
2009-09-30 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
126
Reviewed by Geoffrey Garen.
128
Buildfix for platforms using JSVALUE32.
129
https://bugs.webkit.org/show_bug.cgi?id=29915
131
After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
132
Also removed unreachable code.
134
* jit/JITArithmetic.cpp:
135
(JSC::JIT::emit_op_add):
136
- Declaration of "OperandTypes types" moved before first use.
137
- Typos fixed: dst modified to result, regT2 added.
138
- Unreachable code removed.
139
(JSC::JIT::emitSlow_op_add):
140
- Missing declaration of "OperandTypes types" added.
142
2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
144
Reviewed by Simon Hausmann.
146
Fix CRASH() macro for Symbian build.
148
* wtf/Assertions.h: Added missing }
150
2009-09-29 Geoffrey Garen <ggaren@apple.com>
152
Reviewed by Sam Weinig.
154
Standardized an optimization for adding non-numbers.
156
SunSpider says maybe a tiny speedup.
158
* jit/JITArithmetic.cpp:
159
(JSC::JIT::emit_op_add):
160
(JSC::JIT::emitSlow_op_add):
162
2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
164
Reviewed by David Kilzer.
166
[Qt] Assert messages prints visible in Symbian
167
https://bugs.webkit.org/show_bug.cgi?id=29808
169
Asserts use vprintf to print the messages to stderr.
170
In Symbian Open C it is not possible to see stderr so
171
I routed the messages to stdout instead.
173
* wtf/Assertions.cpp:
175
2009-09-29 Janne Koskinen <janne.p.koskinen@digia.com>
177
Reviewed by Darin Adler.
179
[Qt] Symbian CRASH macro implementation
181
Added Symbian specific crash macro that
182
stops to crash line if JIT debugging is used.
183
Additional differentiation of access violation
184
(KERN-EXEC 3) and CRASH panic.
188
2009-09-28 Mark Rowe <mrowe@apple.com>
190
Reviewed by Gavin Barraclough.
192
<rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
194
* runtime/Collector.cpp:
195
(JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
196
to ensure that we correctly interpret the contents of registers during marking.
198
2009-09-29 Geoffrey Garen <ggaren@apple.com>
200
Reviewed by Gavin Barraclough.
202
Inlined a few math operations.
204
~1% SunSpider speedup.
207
* jit/JITArithmetic.cpp:
208
(JSC::JIT::compileBinaryArithOpSlowCase):
209
(JSC::JIT::emitSlow_op_add):
210
(JSC::JIT::emitSlow_op_mul):
211
(JSC::JIT::emit_op_sub):
212
(JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
213
a constant int and a double.
215
2009-09-28 Oliver Hunt <oliver@apple.com>
217
Reviewed by Geoff Garen.
219
Hard dependency on SSE2 instruction set with JIT
220
https://bugs.webkit.org/show_bug.cgi?id=29779
222
Add floating point support checks to op_jfalse and op_jtrue, and
223
fix the logic for the slow case of op_add
225
* jit/JITArithmetic.cpp:
226
(JSC::JIT::emitSlow_op_add):
227
* jit/JITOpcodes.cpp:
228
(JSC::JIT::emit_op_jfalse):
229
(JSC::JIT::emit_op_jtrue):
231
2009-09-28 Yaar Schnitman <yaar@chromium.org>
233
Reviewed by Dimitri Glazkov.
235
Chromium port - recognize we are being built independently
236
of chromium and look for dependencies under webkit/chromium rather
239
https://bugs.webkit.org/show_bug.cgi?id=29722
241
* JavaScriptCore.gyp/JavaScriptCore.gyp:
243
2009-09-28 Jakub Wieczorek <faw217@gmail.com>
245
Reviewed by Simon Hausmann.
247
[Qt] Implement XSLT support with QtXmlPatterns.
248
https://bugs.webkit.org/show_bug.cgi?id=28303
250
* wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
252
2009-09-28 Yongjun Zhang <yongjun.zhang@nokia.com>
254
Reviewed by Eric Seidel.
256
https://bugs.webkit.org/show_bug.cgi?id=28054
258
Use derefInNotNull() to work around winscw compiler forward declaration bug
259
regarding templated classes.
261
The compiler bug is reported at
262
https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
264
The change should be reverted when the above bug is fixed in winscw compiler.
266
Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make winscw compiler
267
work with the default UnSpecifiedBoolType() operator, which removes the winscw hack.
270
(WTF::RefPtr::~RefPtr):
271
(WTF::RefPtr::clear):
272
(WTF::RefPtr::operator UnspecifiedBoolType):
274
2009-09-28 Gabor Loki <loki@inf.u-szeged.hu>
276
Reviewed by Simon Hausmann.
278
Remove __clear_cache which is an internal function of GCC
279
https://bugs.webkit.org/show_bug.cgi?id=28886
281
Although __clear_cache is exported from GCC, this is an internal
282
function. GCC makes no promises about it.
284
* jit/ExecutableAllocator.h:
285
(JSC::ExecutableAllocator::cacheFlush):
287
2009-09-28 Sam Weinig <sam@webkit.org>
289
Reviewed by Oliver Hunt.
291
Fix an absolute path to somewhere in Oliver's machine to a relative path
292
for derived JSONObject.lut.h.
294
* JavaScriptCore.xcodeproj/project.pbxproj:
296
2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
298
Reviewed by Simon Hausmann.
300
Add ARM version detection for Windows CE.
304
2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
306
Reviewed by Simon Hausmann.
308
Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
310
Re-use Windows shrinkAllocation implementation because Symbian doesn't
311
support releasing part of memory region.
313
Use fastMalloc and fastFree to implement allocateStack and releaseStack
316
* JavaScriptCore.pri:
317
* runtime/MarkStack.h:
318
(JSC::MarkStack::MarkStackArray::shrinkAllocation):
319
* runtime/MarkStackSymbian.cpp: Added.
320
(JSC::MarkStack::initializePagesize):
321
(JSC::MarkStack::allocateStack):
322
(JSC::MarkStack::releaseStack):
324
2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
326
Reviewed by Gavin Barraclough.
328
Fix unaligned data access in YARR_JIT on ARMv5 and below.
329
https://bugs.webkit.org/show_bug.cgi?id=29695
331
On ARMv5 and below all data access should be naturally aligned.
332
In the YARR_JIT there is a case when character pairs are
333
loaded from the input string, but this data access is not
334
naturally aligned. This fix introduces load32WithUnalignedHalfWords
335
and branch32WithUnalignedHalfWords functions which contain
336
naturally aligned memory loads - half word loads - on ARMv5 and below.
338
* assembler/MacroAssemblerARM.cpp:
339
(JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
340
* assembler/MacroAssemblerARM.h:
341
(JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
342
(JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
343
* assembler/MacroAssemblerARMv7.h:
344
(JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
345
(JSC::MacroAssemblerARMv7::branch32):
346
(JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
347
* assembler/MacroAssemblerX86Common.h:
348
(JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
349
(JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
352
(JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
354
2009-09-24 Oliver Hunt <oliver@apple.com>
356
Reviewed by Gavin Barraclough.
358
Division is needlessly slow in 64-bit
359
https://bugs.webkit.org/show_bug.cgi?id=29723
361
Add codegen for op_div on x86-64
364
(JSC::JIT::privateCompileMainPass):
365
(JSC::JIT::privateCompileSlowCases):
367
* jit/JITArithmetic.cpp:
368
(JSC::JIT::compileBinaryArithOpSlowCase):
369
(JSC::JIT::emit_op_div):
370
(JSC::JIT::emitSlow_op_div):
371
* jit/JITInlineMethods.h:
372
(JSC::JIT::isOperandConstantImmediateDouble):
373
(JSC::JIT::addressFor):
374
(JSC::JIT::emitLoadDouble):
375
(JSC::JIT::emitLoadInt32ToDouble):
376
(JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
378
2009-09-24 Yong Li <yong.li@torchmobile.com>
380
Reviewed by Adam Barth.
382
Replace platform-dependent code with WTF::currentTime()
383
https://bugs.webkit.org/show_bug.cgi?id=29148
388
(StopWatch::getElapsedMS):
389
* runtime/TimeoutChecker.cpp:
392
2009-09-24 Mark Rowe <mrowe@apple.com>
394
Reviewed by Gavin Barraclough.
396
Fix FastMalloc to build with assertions enabled.
398
* wtf/FastMalloc.cpp:
399
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
401
(TCMalloc_SpinLock::IsHeld):
403
2009-09-24 Mark Rowe <mrowe@apple.com>
405
Reviewed by Sam Weinig.
407
<rdar://problem/7215058> FastMalloc scavenging thread should be named
409
* wtf/FastMalloc.cpp:
410
(WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
411
* wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
412
* wtf/ThreadingPthreads.cpp:
413
(WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
415
2009-09-24 Geoffrey Garen <ggaren@apple.com>
417
Suggested by Darin Adler.
419
Removed some unnecessary parameter names.
421
* wtf/HashCountedSet.h:
423
2009-09-22 Oliver Hunt <oliver@apple.com>
425
Reviewed by Geoff Garen.
427
Code sampling builds are broken.
428
https://bugs.webkit.org/show_bug.cgi?id=29662
432
* bytecode/EvalCodeCache.h:
433
(JSC::EvalCodeCache::get):
434
* bytecode/SamplingTool.cpp:
435
(JSC::ScriptSampleRecord::sample):
436
(JSC::SamplingTool::doRun):
437
(JSC::SamplingTool::notifyOfScope):
438
(JSC::compareScriptSampleRecords):
439
(JSC::SamplingTool::dump):
440
* bytecode/SamplingTool.h:
441
(JSC::ScriptSampleRecord::ScriptSampleRecord):
442
(JSC::ScriptSampleRecord::~ScriptSampleRecord):
443
(JSC::SamplingTool::SamplingTool):
444
* bytecompiler/BytecodeGenerator.cpp:
445
(JSC::BytecodeGenerator::BytecodeGenerator):
446
(JSC::BytecodeGenerator::emitNewFunction):
447
(JSC::BytecodeGenerator::emitNewFunctionExpression):
448
* bytecompiler/BytecodeGenerator.h:
449
(JSC::BytecodeGenerator::makeFunction):
450
* debugger/Debugger.cpp:
451
(JSC::evaluateInGlobalCallFrame):
452
* debugger/DebuggerCallFrame.cpp:
453
(JSC::DebuggerCallFrame::evaluate):
455
(JSC::ScopeNode::ScopeNode):
456
* runtime/Completion.cpp:
459
* runtime/Executable.cpp:
460
(JSC::FunctionExecutable::fromGlobalCode):
461
* runtime/Executable.h:
462
(JSC::ScriptExecutable::ScriptExecutable):
463
(JSC::EvalExecutable::EvalExecutable):
464
(JSC::EvalExecutable::create):
465
(JSC::ProgramExecutable::ProgramExecutable):
466
(JSC::FunctionExecutable::create):
467
(JSC::FunctionExecutable::FunctionExecutable):
468
* runtime/JSGlobalObjectFunctions.cpp:
469
(JSC::globalFuncEval):
471
2009-09-22 Darin Adler <darin@apple.com>
473
Reviewed by Sam Weinig.
475
* wtf/Forward.h: Added PassOwnPtr.
477
2009-09-22 Simon Hausmann <simon.hausmann@nokia.com>
479
Unreviewed build fix for Windows CE < 5
481
Define WINCEBASIC to disable the IsDebuggerPresent() code in
484
* JavaScriptCore.pri:
486
2009-10-02 Tor Arne VestbĆø <tor.arne.vestbo@nokia.com>
488
Rubber-stamped by Simon Hausmann.
490
Fix the Qt on Mac OS X build.
492
* wtf/FastMalloc.cpp:
494
2009-10-02 JĆørgen Lind <jorgen.lind@nokia.com>
496
Reviewed by Simon Hausmann.
498
Allow enabling and disabling of the JIT through a qmake variable.
500
Qt's configure may set this variable through .qmake.cache if a
501
commandline option is given and/or the compile test for hwcap.h
504
* JavaScriptCore.pri:
506
2009-09-23 Geoffrey Garen <ggaren@apple.com>
508
A piece of my last patch that I forgot.
510
* wtf/HashCountedSet.h:
511
(WTF::::clear): Added HashCountedSet::clear.
513
2009-09-24 Gabor Loki <loki@inf.u-szeged.hu>
515
Reviewed by Gavin Barraclough.
517
Reduce heap size on Symbian from 64MB to 8MB.
519
This is not a perfect fix, it requires more fine tuning.
520
But this makes it possible again to debug in the emulator,
521
which is more important in order to be able to fix other
524
* runtime/Collector.h:
526
2009-09-30 Janne Koskinen <janne.p.koskinen@digia.com>
528
Reviewed by Simon Hausmann.
530
Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
531
https://bugs.webkit.org/show_bug.cgi?id=28886
533
There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
534
which contain __clear_cache built-in function only for C while the C++
535
version of __clear_cache is missing on ARM architectures.
537
Fixed a small bug in the inline assembly of cacheFlush function on
540
* jit/ExecutableAllocator.h:
541
(JSC::ExecutableAllocator::cacheFlush):
543
2009-09-21 Oliver Hunt <oliver@apple.com>
545
Reviewed by Geoff Garen.
547
REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
548
https://bugs.webkit.org/show_bug.cgi?id=29599
550
It is unsafe to attempt to cache new property transitions on
551
dictionaries of any type.
553
* interpreter/Interpreter.cpp:
554
(JSC::Interpreter::tryCachePutByID):
556
(JSC::JITThunks::tryCachePutByID):
558
2009-09-21 Oliver Hunt <oliver@apple.com>
560
RS=Maciej Stachowiak.
562
Re-land SNES fix with corrected assertion.
564
* interpreter/Interpreter.cpp:
565
(JSC::Interpreter::resolveGlobal):
566
(JSC::Interpreter::tryCachePutByID):
567
(JSC::Interpreter::tryCacheGetByID):
569
(JSC::JITThunks::tryCachePutByID):
570
(JSC::JITThunks::tryCacheGetByID):
571
(JSC::DEFINE_STUB_FUNCTION):
572
* runtime/BatchedTransitionOptimizer.h:
573
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
574
* runtime/JSObject.cpp:
575
(JSC::JSObject::removeDirect):
576
* runtime/Structure.cpp:
577
(JSC::Structure::Structure):
578
(JSC::Structure::getEnumerablePropertyNames):
579
(JSC::Structure::despecifyDictionaryFunction):
580
(JSC::Structure::addPropertyTransitionToExistingStructure):
581
(JSC::Structure::addPropertyTransition):
582
(JSC::Structure::removePropertyTransition):
583
(JSC::Structure::toDictionaryTransition):
584
(JSC::Structure::toCacheableDictionaryTransition):
585
(JSC::Structure::toUncacheableDictionaryTransition):
586
(JSC::Structure::fromDictionaryTransition):
587
(JSC::Structure::removePropertyWithoutTransition):
588
* runtime/Structure.h:
589
(JSC::Structure::isDictionary):
590
(JSC::Structure::isUncacheableDictionary):
592
* runtime/StructureChain.cpp:
593
(JSC::StructureChain::isCacheable):
595
2009-09-21 Adam Roben <aroben@apple.com>
597
Revert r48573, as it caused many assertion failures
599
* interpreter/Interpreter.cpp:
601
* runtime/BatchedTransitionOptimizer.h:
602
* runtime/JSObject.cpp:
603
* runtime/Structure.cpp:
604
* runtime/Structure.h:
605
* runtime/StructureChain.cpp:
607
2009-09-21 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
609
Unreviewed make dist build fix. Missing files.
613
2009-09-19 Gavin Barraclough <barraclough@apple.com>
615
Reviewed by Sam 'Cabin Boy' Weinig.
617
Fix stack alignment with ARM THUMB2 JIT.
618
https://bugs.webkit.org/show_bug.cgi?id=29526
620
Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
621
multiple of 16 bytes.
624
(JSC::JITThunks::JITThunks):
627
2009-09-20 Oliver Hunt <oliver@apple.com>
629
Reviewed by Maciej Stachowiak.
632
https://bugs.webkit.org/show_bug.cgi?id=29534
634
The problem was that the emulator used multiple classes with
635
more properties than our dictionary cutoff allowed, this resulted
636
in more or less all critical logic inside the emulator requiring
637
uncached property access.
639
Rather than simply bumping the dictionary cutoff, this patch
640
recognises that there are two ways to create a "dictionary"
641
structure. Either by adding a large number of properties, or
642
by removing a property. In the case of adding properties we
643
know all the existing properties will maintain their existing
644
offsets, so we could cache access to those properties, if we
645
know they won't be removed.
647
To make this possible, this patch adds the logic required to
648
distinguish a dictionary created by addition from one created
649
by removal. With this logic in place we can now cache access
650
to objects with large numbers of properties.
652
SNES performance improved by more than 6x.
654
* interpreter/Interpreter.cpp:
655
(JSC::Interpreter::resolveGlobal):
656
(JSC::Interpreter::tryCachePutByID):
657
(JSC::Interpreter::tryCacheGetByID):
659
(JSC::JITThunks::tryCachePutByID):
660
(JSC::JITThunks::tryCacheGetByID):
661
(JSC::DEFINE_STUB_FUNCTION):
662
* runtime/BatchedTransitionOptimizer.h:
663
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
664
* runtime/JSObject.cpp:
665
(JSC::JSObject::removeDirect):
666
* runtime/Structure.cpp:
667
(JSC::Structure::Structure):
668
(JSC::Structure::getEnumerablePropertyNames):
669
(JSC::Structure::despecifyDictionaryFunction):
670
(JSC::Structure::addPropertyTransitionToExistingStructure):
671
(JSC::Structure::addPropertyTransition):
672
(JSC::Structure::removePropertyTransition):
673
(JSC::Structure::toDictionaryTransition):
674
(JSC::Structure::toCacheableDictionaryTransition):
675
(JSC::Structure::toUncacheableDictionaryTransition):
676
(JSC::Structure::fromDictionaryTransition):
677
(JSC::Structure::removePropertyWithoutTransition):
678
* runtime/Structure.h:
679
(JSC::Structure::isDictionary):
680
(JSC::Structure::isUncacheableDictionary):
682
* runtime/StructureChain.cpp:
683
(JSC::StructureChain::isCacheable):
685
2009-09-19 Oliver Hunt <oliver@apple.com>
687
Reviewed by Maciej Stachowiak.
689
Implement ES5 Object.create function
690
https://bugs.webkit.org/show_bug.cgi?id=29524
692
Implement Object.create. Very simple patch, effectively Object.defineProperties
693
only creating the target object itself.
695
* runtime/CommonIdentifiers.h:
696
* runtime/ObjectConstructor.cpp:
697
(JSC::ObjectConstructor::ObjectConstructor):
698
(JSC::objectConstructorCreate):
700
2009-09-19 Dan Bernstein <mitz@apple.com>
702
Fix clean debug builds.
704
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
706
2009-09-19 Joerg Bornemann <joerg.bornemann@nokia.com>
708
Reviewed by George Staikos.
710
QtWebKit Windows CE compile fix
712
https://bugs.webkit.org/show_bug.cgi?id=29379
714
There is no _aligned_alloc or _aligned_free on Windows CE.
715
We just use the Windows code that was there before and use VirtualAlloc.
716
But that also means that the BLOCK_SIZE must be 64K as this function
717
allocates on 64K boundaries.
719
* runtime/Collector.cpp:
720
(JSC::Heap::allocateBlock):
721
(JSC::Heap::freeBlock):
722
* runtime/Collector.h:
724
2009-09-19 Oliver Hunt <oliver@apple.com>
726
Reviewed by Sam Weinig.
728
Implement ES5 Object.defineProperties function
729
https://bugs.webkit.org/show_bug.cgi?id=29522
731
Implement Object.defineProperties. Fairly simple patch, simply makes use of
732
existing functionality used for defineProperty.
734
* runtime/CommonIdentifiers.h:
735
* runtime/ObjectConstructor.cpp:
736
(JSC::ObjectConstructor::ObjectConstructor):
737
(JSC::defineProperties):
738
(JSC::objectConstructorDefineProperties):
740
2009-09-19 Oliver Hunt <oliver@apple.com>
742
Reviewed by NOBODY (Build fix).
744
Windows build fix part2
746
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
747
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
749
2009-09-19 Oliver Hunt <oliver@apple.com>
751
Reviewed by NOBODY (Buildfix).
753
Windows build fix part 1.
755
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
756
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
758
2009-09-18 Oliver Hunt <oliver@apple.com>
760
Reviewed by Geoff Garen.
762
Implement ES5 Object.defineProperty function
763
https://bugs.webkit.org/show_bug.cgi?id=29503
765
Implement Object.defineProperty. This requires adding the API to
766
ObjectConstructor, along with a helper function that implements the
767
ES5 internal [[ToPropertyDescriptor]] function. It then adds
768
JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
769
Currently defineOwnProperty uses a delete followed by a put to redefine
770
attributes of a property, clearly this is less efficient than it could be
771
but we can improve this if it needs to be possible in future.
773
* JavaScriptCore.exp:
774
* debugger/DebuggerActivation.cpp:
775
(JSC::DebuggerActivation::defineGetter):
776
(JSC::DebuggerActivation::defineSetter):
777
* debugger/DebuggerActivation.h:
778
* interpreter/Interpreter.cpp:
779
(JSC::Interpreter::privateExecute):
781
Update defineGetter/Setter calls
782
* runtime/CommonIdentifiers.h:
783
* runtime/JSArray.cpp:
784
(JSC::JSArray::getOwnPropertySlot):
785
* runtime/JSGlobalObject.cpp:
786
(JSC::JSGlobalObject::defineGetter):
787
(JSC::JSGlobalObject::defineSetter):
788
* runtime/JSGlobalObject.h:
789
* runtime/JSObject.cpp:
790
(JSC::JSObject::defineGetter):
791
(JSC::JSObject::defineSetter):
792
(JSC::putDescriptor):
793
(JSC::JSObject::defineOwnProperty):
794
* runtime/JSObject.h:
795
* runtime/ObjectConstructor.cpp:
796
(JSC::ObjectConstructor::ObjectConstructor):
797
(JSC::objectConstructorGetOwnPropertyDescriptor):
798
(JSC::toPropertyDescriptor):
799
(JSC::objectConstructorDefineProperty):
800
* runtime/ObjectPrototype.cpp:
801
(JSC::objectProtoFuncDefineGetter):
802
(JSC::objectProtoFuncDefineSetter):
803
* runtime/PropertyDescriptor.cpp:
804
(JSC::PropertyDescriptor::writable):
805
(JSC::PropertyDescriptor::enumerable):
806
(JSC::PropertyDescriptor::configurable):
807
(JSC::PropertyDescriptor::isDataDescriptor):
808
(JSC::PropertyDescriptor::isGenericDescriptor):
809
(JSC::PropertyDescriptor::isAccessorDescriptor):
810
(JSC::PropertyDescriptor::getter):
811
(JSC::PropertyDescriptor::setter):
812
(JSC::PropertyDescriptor::setDescriptor):
813
(JSC::PropertyDescriptor::setAccessorDescriptor):
814
(JSC::PropertyDescriptor::setWritable):
815
(JSC::PropertyDescriptor::setEnumerable):
816
(JSC::PropertyDescriptor::setConfigurable):
817
(JSC::PropertyDescriptor::setSetter):
818
(JSC::PropertyDescriptor::setGetter):
819
(JSC::PropertyDescriptor::equalTo):
820
(JSC::PropertyDescriptor::attributesEqual):
821
(JSC::PropertyDescriptor::attributesWithOverride):
822
* runtime/PropertyDescriptor.h:
823
(JSC::PropertyDescriptor::PropertyDescriptor):
824
(JSC::PropertyDescriptor::value):
825
(JSC::PropertyDescriptor::setValue):
826
(JSC::PropertyDescriptor::isEmpty):
827
(JSC::PropertyDescriptor::writablePresent):
828
(JSC::PropertyDescriptor::enumerablePresent):
829
(JSC::PropertyDescriptor::configurablePresent):
830
(JSC::PropertyDescriptor::setterPresent):
831
(JSC::PropertyDescriptor::getterPresent):
832
(JSC::PropertyDescriptor::operator==):
833
(JSC::PropertyDescriptor::):
835
2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
837
Reviewed by Gavin Barraclough.
839
Build fix to enable ARM_THUMB2 on Linux
840
https://bugs.webkit.org/show_bug.cgi?id=
842
* jit/ExecutableAllocator.h:
843
(JSC::ExecutableAllocator::cacheFlush):
847
2009-09-18 Gabor Loki <loki@inf.u-szeged.hu>
849
Reviewed by Gavin Barraclough.
851
Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
852
https://bugs.webkit.org/show_bug.cgi?id=29122
854
Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
855
macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
856
when Thumb-2 instruction set is the required target. The
857
PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
858
case where the code is common the PLATFORM(ARM) have to be used.
860
* assembler/ARMAssembler.cpp:
861
* assembler/ARMAssembler.h:
862
* assembler/ARMv7Assembler.h:
863
* assembler/MacroAssembler.h:
864
* assembler/MacroAssemblerARM.cpp:
865
* assembler/MacroAssemblerARM.h:
866
* assembler/MacroAssemblerCodeRef.h:
867
(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
868
* jit/ExecutableAllocator.h:
870
* jit/JITInlineMethods.h:
871
(JSC::JIT::beginUninterruptedSequence):
872
(JSC::JIT::preserveReturnAddressAfterCall):
873
(JSC::JIT::restoreReturnAddressBeforeReturn):
874
(JSC::JIT::restoreArgumentReference):
875
(JSC::JIT::restoreArgumentReferenceForTrampoline):
876
* jit/JITOpcodes.cpp:
878
(JSC::JITThunks::JITThunks):
882
(JSC::Yarr::RegexGenerator::generateEnter):
884
2009-09-18 Joerg Bornemann <joerg.bornemann@nokia.com>
886
Reviewed by Simon Hausmann.
888
Fix the Qt/Windows CE build.
890
* JavaScriptCore.pri: Build the ce_time.cpp functions from
891
within Qt externally.
892
* wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
893
Qt build these functions are no external, too.
895
2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
897
Reviewed by Simon Hausmann.
899
Symbian/WINSCW build fox.
901
Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
904
WINSCW defines wchar_t, thus UChar has to be wchar_t
906
* wtf/unicode/qt4/UnicodeQt4.h:
908
2009-09-17 Janne Koskinen <janne.p.koskinen@digia.com>
910
Reviewed by Simon Hausmann.
912
Symbian/WINSCW build fix.
914
https://bugs.webkit.org/show_bug.cgi?id=29186
916
WINSCW Template specialisation name in declaration must the be the same as in implementation.
918
* runtime/LiteralParser.h:
920
2009-09-15 Norbert Leser <norbert.leser@nokia.com>
922
Reviewed by Darin Adler.
924
https://bugs.webkit.org/show_bug.cgi?id=27060
926
Symbian compiler for emulator target (WINSCW) fails with
927
"illegal operand" for m_attributesInPrevious in structure.ccp
928
(when calling make_pair functions).
929
This error is apparently due to the compiler not properly
930
resolving the unsigned type of the declared bitfield.
932
Initial patch explicitly casted m_attributesInPrevious
933
to unsigned, but since bitfield optimization is not critical for
934
the emulator target, this conditional change in header file
935
appears to be least intrusive.
937
* runtime/Structure.h:
939
2009-09-16 Gabor Loki <loki@inf.u-szeged.hu>
941
Reviewed by Darin Adler.
943
Fix GCC warnings on ARM_THUMB2 platform
945
* assembler/ARMv7Assembler.h:
946
(JSC::ARMThumbImmediate::countLeadingZerosPartial):
947
* assembler/MacroAssemblerARMv7.h:
948
(JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
949
(JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
951
2009-09-16 Greg Bolsinga <bolsinga@apple.com>
953
Add ENABLE(INSPECTOR)
954
https://bugs.webkit.org/show_bug.cgi?id=29260
956
Reviewed by David Kilzer.
960
2009-09-16 Greg Bolsinga <bolsinga@apple.com>
962
Add ENABLE(CONTEXT_MENUS)
963
https://bugs.webkit.org/show_bug.cgi?id=29225
965
Reviewed by David Kilzer.
969
2009-09-16 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
971
Reviewed by Eric Seidel.
973
The webkit stdint and stdbool headers exists because
974
the compiler MSVC doesn't include them. The check
975
should not check for PLATFORM(WIN_OS) but for MSVC.
977
* os-win32/stdbool.h:
980
2009-09-16 Greg Bolsinga <bolsinga@apple.com>
982
Add ENABLE(DRAG_SUPPORT)
983
https://bugs.webkit.org/show_bug.cgi?id=29233
985
Reviewed by David Kilzer.
989
2009-09-16 Kevin Ollivier <kevino@theolliviers.com>
991
waf build fix after flag was moved to correct place.
995
2009-09-16 Tor Arne VestbĆø <tor.arne.vestbo@nokia.com>
997
Reviewed by Simon Hausmann.
999
[Qt] Build fix for 64-bit Qt on Mac OS X
1001
* wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC
1003
2009-09-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
1005
Reviewed by Simon Hausmann.
1007
[Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects.
1008
https://bugs.webkit.org/show_bug.cgi?id=29295
1010
This is an important fix when JavaScript workers are in use, since
1011
unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each).
1012
QThreadStorage calls the destructor of a given object, which is the
1013
ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does
1014
not support the calling of a static utility function when the thread
1015
is about to close. In this patch we call the ThreadSpecific::destroy()
1016
utility function from the destructor of ThreadSpecific::Data. Moreover,
1017
since Qt resets all thread local values to 0 before the calling of the
1018
appropriate destructors, we set back the pointer to its original value.
1019
This is necessary because the get() method of the ThreadSpecific
1020
object may be called during the exuction of the destructor.
1022
* wtf/ThreadSpecific.h:
1023
(WTF::ThreadSpecific::Data::~Data):
1024
(WTF::::~ThreadSpecific):
1028
2009-09-10 Oliver Hunt <oliver@apple.com>
1030
Reviewed by Geoff Garen.
1032
Allow anonymous storage inside JSObject
1033
https://bugs.webkit.org/show_bug.cgi?id=29168
1035
Add the concept of anonymous slots to Structures so that it is
1036
possible to store references to values that need marking in the
1037
standard JSObject storage buffer. This allows us to reduce the
1038
malloc overhead of some objects (by allowing them to store JS
1039
values in the inline storage of the object) and reduce the
1040
dependence of custom mark functions (if all an objects children
1041
are in the standard object property storage there's no need to
1042
mark them manually).
1044
* JavaScriptCore.exp:
1045
* runtime/JSObject.h:
1046
(JSC::JSObject::putAnonymousValue):
1047
(JSC::JSObject::getAnonymousValue):
1048
(JSC::JSObject::addAnonymousSlots):
1049
* runtime/JSWrapperObject.h:
1050
(JSC::JSWrapperObject::createStructure):
1051
(JSC::JSWrapperObject::JSWrapperObject):
1052
(JSC::JSWrapperObject::setInternalValue):
1053
* runtime/PropertyMapHashTable.h:
1054
* runtime/Structure.cpp:
1055
(JSC::Structure::~Structure):
1056
(JSC::Structure::materializePropertyMap):
1057
(JSC::Structure::addAnonymousSlotsTransition):
1058
(JSC::Structure::copyPropertyTable):
1059
(JSC::Structure::put):
1060
(JSC::Structure::rehashPropertyMapHashTable):
1061
* runtime/Structure.h:
1062
(JSC::Structure::propertyStorageSize):
1063
(JSC::StructureTransitionTable::reifySingleTransition):
1064
* runtime/StructureTransitionTable.h:
1065
(JSC::StructureTransitionTable::TransitionTable::addSlotTransition):
1066
(JSC::StructureTransitionTable::TransitionTable::removeSlotTransition):
1067
(JSC::StructureTransitionTable::TransitionTable::getSlotTransition):
1068
(JSC::StructureTransitionTable::getAnonymousSlotTransition):
1069
(JSC::StructureTransitionTable::addAnonymousSlotTransition):
1070
(JSC::StructureTransitionTable::removeAnonymousSlotTransition):
1072
2009-09-15 Alex Milowski <alex@milowski.com>
1074
Reviewed by Tor Arne VestbĆø.
1076
Added the ENABLE_MATHML define to the features
1078
* Configurations/FeatureDefines.xcconfig:
1080
2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
1082
Reviewed by Tor Arne VestbĆø.
1084
[Qt] Build fix for windows.
1086
After http://trac.webkit.org/changeset/47795 the MinGW build broke,
1087
because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
1089
* runtime/Collector.cpp:
1090
(JSC::Heap::allocateBlock): MinGW case added.
1091
(JSC::Heap::freeBlock): MinGW case added.
1093
2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
1095
Reviewed by Tor Arne VestbĆø.
1097
[Qt] Build fix for Windows/MinGW
1099
https://bugs.webkit.org/show_bug.cgi?id=29268
1101
* wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW)
1103
2009-09-14 Gabor Loki <loki@inf.u-szeged.hu>
1105
Reviewed by Gavin Barraclough.
1107
Detect VFP at runtime in generic ARM port on Linux platform.
1108
https://bugs.webkit.org/show_bug.cgi?id=29076
1110
* JavaScriptCore.pri:
1111
* assembler/MacroAssemblerARM.cpp: Added.
1112
(JSC::isVFPPresent):
1113
* assembler/MacroAssemblerARM.h:
1114
(JSC::MacroAssemblerARM::supportsFloatingPoint):
1116
2009-09-14 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
1118
Reviewed by Tor Arne VestbĆø.
1120
[Qt] Build fix for windows build.
1122
* JavaScriptCore.pri: Correct a logic error.
1123
* pcre/dftables: Add missing paranthesis for tmpdir function.
1125
2009-09-12 Oliver Hunt <oliver@apple.com>
1127
Reviewed by NOBODY (Build fix).
1129
Build fix for windows exports (again).
1131
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1132
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1134
2009-09-12 Oliver Hunt <oliver@apple.com>
1136
Reviewed by NOBODY (Build fix).
1138
Build fix for windows exports.
1140
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1141
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1143
2009-09-12 Oliver Hunt <oliver@apple.com>
1145
Reviewed by NOBODY (Build fix).
1147
Correct fix for non-allinonefile builds
1149
* runtime/ObjectConstructor.cpp:
1151
2009-09-12 Oliver Hunt <oliver@apple.com>
1153
Reviewed by NOBODY (Build fix).
1155
Fix non-allinonefile builds
1157
* runtime/ObjectConstructor.cpp:
1159
2009-09-12 Oliver Hunt <oliver@apple.com>
1161
Reviewed by Maciej Stachowiak.
1163
[ES5] Implement Object.keys
1164
https://bugs.webkit.org/show_bug.cgi?id=29170
1166
This patch basically requires two separate steps, the first is to split getPropertyNames
1167
into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave
1168
in the same way as getOwnPropertySlot and getPropertySlot. In essence getOwnPropertyNames
1169
produces the list of properties on an object excluding its prototype chain and getPropertyNames
1170
just iterates the the object and its prototype chain calling getOwnPropertyNames at each level.
1172
* API/JSCallbackObject.h:
1173
* API/JSCallbackObjectFunctions.h:
1174
(JSC::::getOwnPropertyNames):
1175
* JavaScriptCore.exp:
1176
* debugger/DebuggerActivation.cpp:
1177
(JSC::DebuggerActivation::getOwnPropertyNames):
1178
* debugger/DebuggerActivation.h:
1179
* runtime/CommonIdentifiers.h:
1180
* runtime/JSArray.cpp:
1181
(JSC::JSArray::getOwnPropertyNames):
1182
* runtime/JSArray.h:
1183
* runtime/JSByteArray.cpp:
1184
(JSC::JSByteArray::getOwnPropertyNames):
1185
* runtime/JSByteArray.h:
1186
* runtime/JSNotAnObject.cpp:
1187
(JSC::JSNotAnObject::getOwnPropertyNames):
1188
* runtime/JSNotAnObject.h:
1189
* runtime/JSObject.cpp:
1190
(JSC::JSObject::getOwnPropertyNames):
1191
* runtime/JSObject.h:
1192
* runtime/JSVariableObject.cpp:
1193
(JSC::JSVariableObject::getOwnPropertyNames):
1194
* runtime/JSVariableObject.h:
1195
* runtime/ObjectConstructor.cpp:
1196
(JSC::ObjectConstructor::ObjectConstructor):
1197
(JSC::objectConstructorKeys):
1198
* runtime/RegExpMatchesArray.h:
1199
(JSC::RegExpMatchesArray::getOwnPropertyNames):
1200
* runtime/StringObject.cpp:
1201
(JSC::StringObject::getOwnPropertyNames):
1202
* runtime/StringObject.h:
1203
* runtime/Structure.cpp:
1204
(JSC::Structure::getOwnEnumerablePropertyNames):
1205
(JSC::Structure::getEnumerablePropertyNames):
1206
* runtime/Structure.h:
1208
2009-09-11 Oliver Hunt <oliver@apple.com>
1210
Reviewed by Sam Weinig.
1212
getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
1213
https://bugs.webkit.org/show_bug.cgi?id=29214
1215
Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
1216
This flag is used to make sure that caching of the property name data is safe.
1218
* API/JSCallbackConstructor.h:
1219
(JSC::JSCallbackConstructor::createStructure):
1220
* debugger/DebuggerActivation.h:
1221
(JSC::DebuggerActivation::createStructure):
1222
* runtime/BooleanObject.h:
1223
(JSC::BooleanObject::createStructure):
1224
* runtime/DatePrototype.h:
1225
(JSC::DatePrototype::createStructure):
1226
* runtime/FunctionPrototype.h:
1227
(JSC::FunctionPrototype::createStructure):
1228
* runtime/JSONObject.h:
1229
(JSC::JSONObject::createStructure):
1230
* runtime/JSObject.h:
1231
(JSC::JSObject::createStructure):
1232
* runtime/JSTypeInfo.h:
1233
(JSC::TypeInfo::hasDefaultGetPropertyNames):
1234
* runtime/JSVariableObject.h:
1235
(JSC::JSVariableObject::createStructure):
1236
* runtime/JSWrapperObject.h:
1237
(JSC::JSWrapperObject::createStructure):
1238
* runtime/MathObject.h:
1239
(JSC::MathObject::createStructure):
1240
* runtime/NumberConstructor.h:
1241
(JSC::NumberConstructor::createStructure):
1242
* runtime/NumberObject.h:
1243
(JSC::NumberObject::createStructure):
1244
* runtime/RegExpConstructor.h:
1245
(JSC::RegExpConstructor::createStructure):
1246
* runtime/RegExpObject.h:
1247
(JSC::RegExpObject::createStructure):
1248
* runtime/StructureChain.cpp:
1249
(JSC::StructureChain::isCacheable):
1251
2009-09-11 Alexey Proskuryakov <ap@webkit.org>
1253
Reviewed by Geoff Garen.
1255
https://bugs.webkit.org/show_bug.cgi?id=29207
1256
Add checks for using WebCore JS context on secondary threads
1258
* runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
1259
* runtime/JSGlobalData.h:
1260
Added a new mainThreadOnly flag that WebCore would set.
1262
* runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this,
1263
so this is a good place to check that the API isn't used form a wrong thread.
1265
2009-09-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1267
Reviewed by Simon Hausmann.
1269
Compiling JavaScriptCore on sparc 64 with gcc fails.
1271
ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int,
1272
however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).
1274
The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
1275
a mutex instead when compiling for sparc 64 with gcc.
1277
https://bugs.webkit.org/show_bug.cgi?id=29175
1280
__sparc64__ is not defined on all OS.
1281
Uses instead: __sparc__ && __arch64__ || __sparcv9
1284
2009-09-11 Prasanth Ullattil <prasanth.ullattil@nokia.com>
1286
Reviewed by Simon Hausmann.
1288
Fix compile error on Windows7(64Bit) with latest SDK.
1290
Added the missing include file.
1292
* runtime/UString.cpp:
1294
2009-09-11 Joerg Bornemann <joerg.bornemann@trolltech.com>
1296
Reviewed by Simon Hausmann.
1298
Qt/Windows CE compile fix, include the executable allocator and
1299
markstack implementation in the windows build.
1301
* JavaScriptCore.pri:
1303
2009-09-08 John Abd-El-Malek <jam@chromium.org>
1305
Reviewed by Dimitri Glazkov.
1307
Remove unneeded define for ActiveX.
1308
https://bugs.webkit.org/show_bug.cgi?id=29054
1312
2009-09-10 Mark Rowe <mrowe@apple.com>
1314
Rubber-stamped by Sam Weinig.
1316
Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
1318
* Configurations/FeatureDefines.xcconfig:
1320
2009-09-10 Fumitoshi Ukai <ukai@chromium.org>
1322
Reviewed by Alexey Proskuryakov.
1324
Export WTF::tryFastMalloc used in WebSocketChannel.
1325
https://bugs.webkit.org/show_bug.cgi?id=28038
1327
* JavaScriptCore.exp:
1328
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1329
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1331
2009-09-10 Oliver Hunt <oliver@apple.com>
1333
Reviewed by NOBODY (Build fix).
1335
Make StructureTransitionTable use an enum for the PtrAndFlags member
1336
used for the single transition slot optimisation.
1338
* runtime/StructureTransitionTable.h:
1339
(JSC::StructureTransitionTable::StructureTransitionTable):
1340
(JSC::StructureTransitionTable::usingSingleTransitionSlot):
1341
(JSC::StructureTransitionTable::):
1343
2009-09-10 Oliver Hunt <oliver@apple.com>
1345
Reviewed by Geoff Garen.
1347
Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization
1348
https://bugs.webkit.org/show_bug.cgi?id=29141
1350
Make StructureTransitionTable encapsulate the single transition slot optimization.
1352
* runtime/Structure.cpp:
1353
(JSC::Structure::Structure):
1354
(JSC::Structure::~Structure):
1355
(JSC::Structure::addPropertyTransitionToExistingStructure):
1356
(JSC::Structure::addPropertyTransition):
1357
(JSC::Structure::addPropertyWithoutTransition):
1358
(JSC::Structure::removePropertyWithoutTransition):
1359
(JSC::Structure::hasTransition):
1360
* runtime/Structure.h:
1361
(JSC::StructureTransitionTable::contains):
1362
(JSC::StructureTransitionTable::get):
1363
(JSC::StructureTransitionTable::hasTransition):
1364
(JSC::StructureTransitionTable::reifySingleTransition):
1365
* runtime/StructureTransitionTable.h:
1366
(JSC::StructureTransitionTable::StructureTransitionTable):
1367
(JSC::StructureTransitionTable::~StructureTransitionTable):
1368
(JSC::StructureTransitionTable::remove):
1369
(JSC::StructureTransitionTable::add):
1370
(JSC::StructureTransitionTable::table):
1371
(JSC::StructureTransitionTable::singleTransition):
1372
(JSC::StructureTransitionTable::usingSingleTransitionSlot):
1373
(JSC::StructureTransitionTable::setSingleTransition):
1374
(JSC::StructureTransitionTable::setTransitionTable):
1375
(JSC::StructureTransitionTable::):
1376
* wtf/PtrAndFlags.h:
1377
(WTF::PtrAndFlags::PtrAndFlags):
1379
2009-09-10 Zoltan Horvath <zoltan@webkit.org>
1381
Reviewed by Darin Adler.
1383
Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet
1384
https://bugs.webkit.org/show_bug.cgi?id=25930
1386
FastAllocBase has been extended with fastDeleteSkippingDestructor function which
1387
releases memory without destructor call. fastDeleteAllValues has been implemented
1388
similar as deleteAllValues but it uses fastDelete function to release memory.
1390
* wtf/FastAllocBase.h:
1391
(WTF::fastDeleteSkippingDestructor):
1393
(WTF::fastDeleteAllValues):
1395
2009-09-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1397
Reviewed by Darin Adler.
1399
ARM compiler does not understand GCC visibility attribute
1400
https://bugs.webkit.org/show_bug.cgi?id=29079
1402
* API/JSBase.h: Make the test more specific to hit only
1405
2009-09-10 Adam Barth <abarth@webkit.org>
1407
Unreviewed revert of the previous change. It broke the tests.
1412
2009-09-10 Ben Laurie <benl@google.com>
1414
Reviewed by Adam Barth.
1416
<https://bugs.webkit.org/show_bug.cgi?id=26836>
1418
If dtoa was given a small buffer and the number was either infinite or
1419
NaN, then the buffer would be overflowed.
1423
2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1425
Reviewed by Darin Adler.
1427
Change reinterpret_cast to static_cast in r48212.
1429
* jit/ExecutableAllocator.h:
1430
(JSC::ExecutableAllocator::cacheFlush):
1432
2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1434
Reviewed by Darin Adler.
1436
Remove WTF_PLATFORM_FORCE_PACK as it is no longer used
1437
https://bugs.webkit.org/show_bug.cgi?id=29066
1441
2009-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1443
Reviewed by Ariya Hidayat.
1445
Implement flushing the instruction cache for Symbian
1446
https://bugs.webkit.org/show_bug.cgi?id=29075
1448
* jit/ExecutableAllocator.h:
1449
(JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush
1450
the instruction cache on Symbian
1452
2009-09-09 Kent Hansen <khansen@trolltech.com>
1454
Reviewed by Darin Adler.
1456
https://bugs.webkit.org/show_bug.cgi?id=29024
1457
Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL
1459
These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler.
1461
* JavaScriptCore.gypi:
1462
* JavaScriptCore.xcodeproj/project.pbxproj:
1463
* runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h.
1464
* runtime/Structure.h:
1465
* runtime/TypeInfo.h: Removed.
1467
2009-09-08 Oliver Hunt <oliver@apple.com>
1469
Reviewed by Maciej Stachowiak.
1471
JSON.stringify(Date) loses the milliseconds information
1472
https://bugs.webkit.org/show_bug.cgi?id=29063
1474
Make sure we include milliseconds in the output of toISOString.
1476
* runtime/DatePrototype.cpp:
1477
(JSC::dateProtoFuncToISOString):
1479
2009-09-08 Kevin Ollivier <kevino@theolliviers.com>
1481
wx build fix, generate derived sources earlier in order to make sure
1482
they're found by the build system when generating the list of sources to build.
1486
2009-09-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1488
Reviewed by Simon Hausmann.
1490
Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined
1491
https://bugs.webkit.org/show_bug.cgi?id=29011
1493
* wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for
1494
atomicIncrement and atomicDecrement
1496
2009-09-07 Zoltan Horvath <zoltan@webkit.org>
1498
Reviewed by Darin Adler.
1500
Allow custom memory allocation control in Yarr's RegexInterpreter
1501
https://bugs.webkit.org/show_bug.cgi?id=29025
1503
Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has
1504
been instantiated by 'new':
1506
class ByteDisjunction
1507
-> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462
1509
struct BytecodePattern
1510
-> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279
1512
* yarr/RegexInterpreter.h:
1514
2009-09-07 Drew Wilson <atwilson@google.com>
1516
Reverting r48121 to fix Windows build errors.
1518
* JavaScriptCore.exp:
1520
2009-09-07 Drew Wilson <atwilson@google.com>
1522
Reviewed by David Levin.
1524
Enable SHARED_WORKERS by default
1525
https://bugs.webkit.org/show_bug.cgi?id=28959
1527
* Configurations/FeatureDefines.xcconfig:
1529
2009-09-07 Fumitoshi Ukai <ukai@chromium.org>
1531
Reviewed by Alexey Proskuryakov.
1533
Export WTF::tryFastMalloc used in WebSocketChannel.
1534
https://bugs.webkit.org/show_bug.cgi?id=28038
1536
* JavaScriptCore.exp:
1538
2009-09-04 Oliver Hunt <oliver@apple.com>
1540
Reviewed by NOBODY (Build fix).
1542
Fix windows export files
1544
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1545
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1547
2009-09-04 Oliver Hunt <oliver@apple.com>
1549
Reviewed by Gavin Barraclough.
1551
[[ToString]] conversion should use the actual toString function for String objects.
1553
Remove incorrect specialisations of toString conversions on StringObject.
1555
* JavaScriptCore.exp:
1556
* runtime/StringObject.cpp:
1557
* runtime/StringObject.h:
1559
2009-09-04 Steve Falkenburg <sfalken@apple.com>
1563
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export.
1564
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export.
1566
2009-09-04 Steve Falkenburg <sfalken@apple.com>
1570
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export.
1571
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export.
1573
2009-09-04 Darin Adler <darin@apple.com>
1575
Reviewed by Geoff Garen.
1577
DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
1578
https://bugs.webkit.org/show_bug.cgi?id=28909
1582
Make some improvements to garbage collection code:
1584
1) Create a runtime assertion that catches any classes that
1585
override markChildren but have the HasDefaultMark bit set.
1586
2) Remove checks of the mark bit outside the MarkStack::append
1587
function; they are redundant.
1588
3) Improve the efficiency of the asObject and asArray functions
1589
when called on JSCell* to avoid a round trip to JSValue.
1590
4) Make more callers use the checked asCell and asObject
1591
casting functions rather than unchecked casts.
1592
5) Removed the JSCell::marked function and other GC-related
1593
functions because these operations are no longer things that
1594
code other than the core GC code needs to do directly. Fixed
1595
callers that were calling them.
1597
* runtime/Collector.cpp:
1598
(JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain.
1599
(JSC::Heap::markProtectedObjects): Removed unneeded check of the mark
1600
bit and call to MarkStack::drain.
1601
(JSC::Heap::collect): Removed unneeded checks of the mark bit and also
1602
changed call to SmallStrings::mark to call markChildren instead to match
1603
the rest of the objects.
1604
(JSC::typeName): Removed unneeded cast to JSObject*.
1606
* runtime/JSArray.h:
1607
(JSC::asArray): Added an overload for JSCell* and changed the JSValue
1608
version to call it. Removed some unneeded casts.
1609
(JSC::JSArray::markChildrenDirect): Marked this function inline. It's in
1610
a header, and if not marked inline this could lead to linking problems.
1611
(JSC::MarkStack::markChildren): Added. This helper function is used by
1612
the drain function to avoid repating code. Also added the code here to
1613
check fro default mark violations in debug code. If a markChildren
1614
function adds something to the mark stack, but the type info claimed
1615
hasDefaultMark was true, then we will get an assertion now. Also fixed
1616
the assertion about the mark bit to use the Heap function directly
1617
because we don't have a JSCell::marked function any more.
1618
(JSC::MarkStack::drain): Changed a local variable from "v" to "value",
1619
and from "currentCell" to "cell". Changed to call markChildren in two
1620
places instead of repeating a chain of if statements twice. Changed
1621
code that reads and writes the mark bit to use Heap::isCellMarked and
1622
Heap::markCell so we can eliminate the JSCell::marked and
1623
JSCell::markCellDirect functions.
1625
* runtime/JSCell.h: Removed JSCell's markCellDirect and marked member
1626
functions. Added a comment explaining that asCell should be deprecated
1627
in favor of the JSValue asCell member function.
1628
(JSC::MarkStack::append): Added the assertion that catches callers
1629
that have set the HasDefaultMark bit incorrectly. Changed
1630
code that reads and writes the mark bit to use Heap::isCellMarked and
1631
Heap::markCell so we can eliminate the JSCell::marked and
1632
JSCell::markCellDirect functions. Moved the overload of
1633
MarkStack::append for JSValue here so it can call through to the cell
1634
version. The old version had a copy of all the code instead, but that
1635
repeated the conversion from JSValue to JSCell* and the check for
1636
whether a value is a cell multiple times.
1637
(JSC::Structure::markAggregate): Moved this function here to avoid
1638
dependencies for Structure.h, since this calls MarkStack::append.
1640
* runtime/JSObject.cpp:
1641
(JSC::JSObject::markChildren): Added code to clear
1642
m_isCheckingForDefaultMarkViolation so the marking done by JSObject
1643
doesn't trigger the assertion.
1645
* runtime/JSValue.h: Moved some stray includes that were outside the
1646
header guard inside it. Not sure how that happened! Removed the
1647
GC-related member functions markChildren, hasChildren, marked, and
1650
* runtime/JSWrapperObject.h: Made markChildren private.
1651
(JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
1652
HasDefaultMark bit was set.
1654
* runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and
1655
initialized it to false. Moved the append function body from here to
1656
JSCell.h. Added a declaration of a private markChildren function used
1657
inside the drain function.
1659
* runtime/SmallStrings.cpp:
1660
(JSC::SmallStrings::markChildren): Changed the name and style of this
1661
function to match other functions. This allows us to share the normal
1662
mark stack code path.
1664
* runtime/SmallStrings.h: Changed the name and interface of mark to
1665
the more-normal markChildren style.
1667
* runtime/Structure.h: Moved the body of markAggregate into the
1668
JSCell.h to avoid a circular dependency with JSCell.h.
1670
2009-09-04 Darin Adler <darin@apple.com>
1672
Reviewed by Geoff Garen.
1674
DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
1675
https://bugs.webkit.org/show_bug.cgi?id=28909
1679
Make some improvements to garbage collection code:
1681
1) Fix the two classes that had the default mark bit set but
1683
2) Remove checks of the mark bit outside the MarkStack::append
1684
function; they are redundant.
1685
3) Make more callers use the checked asCell and asObject
1686
casting functions rather than unchecked casts.
1687
4) Removed some GC-related functions because these operations are
1688
no longer things that code other than the core GC code needs
1689
to do directly. Fixed callers that were calling them.
1691
* bytecode/CodeBlock.cpp:
1692
(JSC::CodeBlock::markAggregate): Removed unneeded check of the mark
1693
bit before calling MarkStack::append.
1695
* interpreter/Register.h: Removed unneeded marked and markChildren
1699
(op_eq): Removed unneeded assertions, instead using checked casting
1700
functions such as asObject.
1702
* runtime/ArgList.h: Added now-needed forward declaration of MarkStack.
1704
* runtime/GetterSetter.cpp:
1705
(JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit.
1707
* runtime/GlobalEvalFunction.h:
1708
(JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the
1709
HasDefaultMark bit was set.
1711
* runtime/JSCell.cpp:
1712
(JSC::JSCell::getObject): Use asObject to avoid a direct static_cast.
1714
* runtime/JSObject.h:
1715
(JSC::asObject): Added an overload for JSCell* and changed the JSValue
1717
(JSC::JSValue::get): Use asObject to avoid a direct static_cast.
1719
* runtime/JSWrapperObject.h: Made markChildren private.
1720
(JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
1721
HasDefaultMark bit was set. Later we may want to optimize this for
1722
wrapper types that never have cells in their internal values, but there
1723
is no measured performance regression in SunSpider or V8 doing this
1726
* runtime/MarkStack.cpp: Tweaked formatting.
1728
2009-09-04 Kevin Ollivier <kevino@theolliviers.com>
1730
wx build fix. Switch USE_ defines over to the compiler so that they can be
1731
checked by files not including config.h (like WebCorePrefix.h).
1735
2009-09-03 Yong Li <yong.li@torchmobile.com>
1737
Reviewed by David Levin.
1739
Remove unnecessary dependency on unistd.h
1740
https://bugs.webkit.org/show_bug.cgi?id=28962
1742
* runtime/Completion.cpp:
1744
2009-09-03 Fumitoshi Ukai <ukai@chromium.org>
1746
Reviewed by Eric Seidel.
1748
Add strnstr for Linux and Windows in StringExtras.h
1749
https://bugs.webkit.org/show_bug.cgi?id=28901
1751
* wtf/StringExtras.h:
1754
2009-09-03 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
1756
Reviewed by Darin Adler.
1758
Allow custom memory allocation control for JavaScriptCore's HashEntry class
1759
https://bugs.webkit.org/show_bug.cgi?id=27830
1761
Inherits HashEntry class from FastAllocBase because it has been
1762
instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32.
1766
2009-09-02 Gavin Barraclough <barraclough@apple.com>
1768
Should crash if JIT code buffer allocation fails.
1770
https://bugs.webkit.org/show_bug.cgi?id=28926
1771
<rdar://problem/7031922>
1773
* jit/ExecutableAllocatorPosix.cpp:
1774
(JSC::ExecutablePool::systemAlloc):
1775
* jit/ExecutableAllocatorWin.cpp:
1776
(JSC::ExecutablePool::systemAlloc):
1778
2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
1780
waf build fixes for Windows/MSVC.
1784
2009-09-02 Kevin Ollivier <kevino@theolliviers.com>
1786
Build fix for building on Windows.
1788
* wtf/ThreadingPthreads.cpp:
1790
2009-09-02 Norbert Leser <norbert.leser@nokia.com>
1792
Reviewed by Eric Seidel.
1794
Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled
1796
RegisterFile constructor currently throws #error when both
1797
MMAP and VIRTUALALLOC conditions fail.
1798
On any platform that does not provide these features
1799
(for instance, Symbian),
1800
the fallback should be regular malloc (or fastMalloc).
1801
It is functionally equivalent in this case, even though it may
1802
have certain drawbacks such as lack of dynamic pre-allocation.
1804
* interpreter/RegisterFile.cpp:
1805
(JSC::RegisterFile::~RegisterFile):
1806
* interpreter/RegisterFile.h:
1807
(JSC::RegisterFile::RegisterFile):
1809
2009-08-31 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
1811
Reviewed by Gavin Barraclough.
1814
https://bugs.webkit.org/show_bug.cgi?id=28691
1817
(JSC::Parser::parse):
1819
2009-08-27 Oliver Hunt <oliver@apple.com>
1821
Reviewed by Maciej Stachowiak.
1823
JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects
1824
https://bugs.webkit.org/show_bug.cgi?id=28797
1826
Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception
1827
checks, and corrected the logic in gap to correctly convert Number and String objects.
1829
* runtime/JSONObject.cpp:
1830
(JSC::unwrapBoxedPrimitive):
1832
(JSC::Stringifier::Stringifier):
1833
(JSC::Stringifier::appendStringifiedValue):
1835
2009-08-27 Oliver Hunt <oliver@apple.com>
1837
Reviewed by Adam Roben.
1839
JSON.stringify replacer array does not accept values that are not string primitives.
1840
https://bugs.webkit.org/show_bug.cgi?id=28788
1842
Update the JSON stringifier to initialise its replacer array according to the most
1843
recent version of the spec.
1845
* runtime/Identifier.h:
1846
(JSC::Identifier::from):
1847
* runtime/JSONObject.cpp:
1848
(JSC::Stringifier::Stringifier):
1850
2009-08-27 Alexey Proskuryakov <ap@apple.com>
1852
Reviewed by Oliver Hunt.
1854
https://bugs.webkit.org/show_bug.cgi?id=28753
1855
<rdar://problem/7173448> Excessive number of threads (and a crash)
1857
* wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement
1858
and return the new value. Also added using directives for these functions, to match
1861
2009-08-27 Brent Fulgham <bfulgham@webkit.org>
1863
Reviewed by Adam Roben.
1865
Link the testapi against CFLite when building the WinCairo port.
1867
* JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite
1868
target. Update all targets to inherit from either the
1869
JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops
1870
file (WinCairo target).
1871
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove
1872
input file CoreFoundation.lib. This is provided by either the
1873
JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file.
1875
2009-08-27 Steve Falkenburg <sfalken@apple.com>
1877
Reviewed by Geoff Garen.
1879
Fix Windows-specific crash due to missing memory clearing call.
1881
* runtime/Collector.cpp:
1882
(JSC::Heap::allocateBlock):
1884
2009-08-27 Brent Fulgham <bfulgham@webkit.org>
1886
Build fix: JavaScriptCore_debug.def missing some exports. Apple
1887
Windows build does not use this file, so it was not noticed previously.
1889
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1891
2009-08-27 Gavin Barraclough <barraclough@apple.com>
1893
Reviewed by Oliver Hunt.
1895
x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
1896
https://bugs.webkit.org/show_bug.cgi?id=28317
1898
Missed one, fix part II.
1900
* assembler/MacroAssemblerX86Common.h:
1901
(JSC::MacroAssemblerX86Common::move):
1902
* assembler/X86Assembler.h:
1903
(JSC::CAN_SIGN_EXTEND_8_32):
1905
2009-08-27 Oliver Hunt <oliver@apple.com>
1907
Reviewed by Adam Roben.
1909
JSON.stringify replacer array does not accept values that are not string primitives.
1910
https://bugs.webkit.org/show_bug.cgi?id=28788
1912
Update the JSON stringifier to initialise its replacer array according to the most
1913
recent version of the spec.
1915
* runtime/Identifier.h:
1916
(JSC::Identifier::from):
1917
* runtime/JSONObject.cpp:
1918
(JSC::Stringifier::Stringifier):
1920
2009-08-27 Oliver Hunt <oliver@apple.com>
1922
Reviewed by Alexey Proskuryakov.
1924
JSON parser accepts trailing comma in array literals
1925
https://bugs.webkit.org/show_bug.cgi?id=28779
1927
Update parser to correctly fail if there's a trailing comma.
1929
* runtime/LiteralParser.cpp:
1930
(JSC::LiteralParser::parse):
1932
2009-08-26 Oliver Hunt <oliver@apple.com>
1934
Reviewed by Gavin Barraclough.
1936
'this' in JSON.parse reviver is the global object
1937
https://bugs.webkit.org/show_bug.cgi?id=28752
1939
This is a technically simple change, we merely update the code for calling
1940
the reviver function to pass the correct this object. Doing so however
1941
exposes the holder to arbitrary mutation by the reviver function so it is
1942
necessary for us to now guard all property accesses against the possibility
1945
* runtime/JSArray.h:
1946
JSON needs to delete a property from the array, so we friend its
1947
Walker class so that we can make a non-virtual call to the arrays
1948
delete and getOwnPropertySlot methods.
1949
* runtime/JSONObject.cpp:
1950
(JSC::Walker::callReviver):
1951
We need to pass the correct this object
1952
(JSC::Walker::walk):
1953
Update calls to callReviver, and update property logic logic
1954
to correctly handle the holder being mutated by the reviver
1957
2009-08-26 Alice Liu <alice.liu@apple.com>
1959
Windows build fix: added some exported symbols
1961
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1962
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1964
2009-08-26 Geoffrey Garen <ggaren@apple.com>
1966
Windows build fix: Removed some exported symbols that no longer exist.
1968
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1969
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1971
2009-08-26 Gavin Barraclough <barraclough@apple.com>
1973
Reviewed by Olliejver Hunt.
1975
x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
1976
https://bugs.webkit.org/show_bug.cgi?id=28317
1978
We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page,
1979
so pointers are never representable as a 32-bit integer, and always have to be represented by
1980
a separate immediate load instruction, rather than within the immediate field of an arithmetic
1981
or memory operation.
1983
We explicitly check for a couple of cases where a value might be representable in 32-bit, but
1984
these probably never kick in on Mac OS, and only kick in to hose GTK. Deleting these does not
1985
show a performance degradation on SunSpider. Remove.
1987
* assembler/MacroAssemblerX86_64.h:
1988
(JSC::MacroAssemblerX86_64::storePtr):
1989
(JSC::MacroAssemblerX86_64::branchPtr):
1991
2009-08-26 Geoffrey Garen <ggaren@apple.com>
1993
Reviewed by Oliver Hunt.
1995
A bit of Collector refatoring.
1997
SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).
1999
* JavaScriptCore.exp:
2001
* runtime/JSCell.cpp:
2002
(JSC::JSCell::toPrimitive):
2003
(JSC::JSCell::getPrimitiveNumber):
2004
(JSC::JSCell::toBoolean):
2005
(JSC::JSCell::toNumber):
2006
(JSC::JSCell::toString):
2007
(JSC::JSCell::toObject): Removed pure virtual functions from
2008
JSCell, so the collector can construct one. This allowed
2009
me to remove a bunch of ASSERT_NOT_REACHED throughout the
2013
(JSC::JSCell::JSCell): ditto
2014
(JSC::Heap::heap): Inlined this function because it's trivial.
2016
* JavaScriptCore.exp:
2018
* runtime/Collector.cpp:
2019
(JSC::Heap::destroy):
2020
(JSC::Heap::allocateBlock):
2021
(JSC::Heap::freeBlock):
2022
(JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
2023
it doesn't actually free the Heap object.
2024
(JSC::Heap::heapAllocate):
2026
* runtime/Collector.h: Refactored block allocation and destruction
2027
into helper functions.
2029
* runtime/GetterSetter.cpp:
2030
* runtime/JSAPIValueWrapper.cpp:
2031
* runtime/JSPropertyNameIterator.cpp: Removed dummy implementations
2032
of pure virtual functions. (See above.)
2034
=== End re-roll-in of r47738:47740 with Windows crash fixed ===
2036
2009-08-26 Geoffrey Garen <ggaren@apple.com>
2038
Build fix: start out with a 32-bit value to avoid a shortening warning.
2040
* runtime/Collector.cpp:
2043
2009-08-24 Geoffrey Garen <ggaren@apple.com>
2045
Reviewed by Oliver Hunt.
2047
Substantially reduced VM thrash in the GC heap.
2049
1.08x faster on v8 (1.60x faster on v8-splay).
2051
1.40x faster on bench-alloc-nonretained.
2053
1.90x faster on bench-alloc-retained.
2055
SunSpider says no change.
2057
* runtime/Collector.cpp:
2058
(JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local
2059
variables unconditionally after calling collect(), since they may be used
2060
even if we don't "goto scan". (In the bug I saw, usedBlocks got out of
2061
sync with heap.usedBlocks).
2062
(JSC::Heap::sweep): Keep enough free heap space to accomodate
2063
the number of objects we'll allocate before the next GC, plus 25%, for
2065
* runtime/Collector.h: Bumped the block size to 256k. This seems to give
2066
the best cache performance, and it prevents us from initiating lots of
2067
VM traffic to recover very small chunks of memory.
2069
=== Begin re-roll-in of r47738:47740 with Windows crash fixed ===
2071
2009-08-25 Drew Wilson <atwilson@google.com>
2073
Reviewed by David Levin.
2075
postMessage() spec now supports sending arrays of ports
2076
https://bugs.webkit.org/show_bug.cgi?id=26902
2078
Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors.
2080
* wtf/VectorTraits.h:
2082
2009-08-26 Xan Lopez <xlopez@igalia.com>
2084
Rubber-stamped by Gustavo Noronha.
2086
Remove duplicated files from file list.
2090
2009-08-26 Oliver Hunt <oliver@apple.com>
2092
Reviewed by NOBODY (Build fix).
2096
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2097
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2099
2009-08-26 Oliver Hunt <oliver@apple.com>
2101
Reviewed by NOBODY (Build fix).
2103
Hopefully fix all the exports from JSC on windows
2105
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2106
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2108
2009-08-26 Oliver Hunt <oliver@apple.com>
2110
Reviewed by NOBODY (Build fixes).
2112
Forgot I added files to JavaScriptCore.
2115
* JavaScriptCore.gypi:
2116
* JavaScriptCore.pri:
2117
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2118
* JavaScriptCoreSources.bkl:
2120
2009-08-25 Oliver Hunt <oliver@apple.com>
2122
Reviewed by Gavin Barraclough.
2124
[ES5] Implement getOwnPropertyDescriptor
2125
https://bugs.webkit.org/show_bug.cgi?id=28724
2127
Implement the core runtime support for getOwnPropertyDescriptor.
2128
This adds a virtual getOwnPropertyDescriptor method to every class
2129
that implements getOwnPropertySlot that shadows the behaviour of
2130
getOwnPropertySlot. The alternative would be to make getOwnPropertySlot
2131
(or PropertySlots in general) provide property attribute information,
2132
but quick testing showed this to be a regression.
2134
* JavaScriptCore.exp:
2135
* JavaScriptCore.xcodeproj/project.pbxproj:
2136
* runtime/Arguments.cpp:
2137
(JSC::Arguments::getOwnPropertyDescriptor):
2138
* runtime/Arguments.h:
2139
* runtime/ArrayPrototype.cpp:
2140
(JSC::ArrayPrototype::getOwnPropertyDescriptor):
2141
* runtime/ArrayPrototype.h:
2142
* runtime/CommonIdentifiers.h:
2143
* runtime/DatePrototype.cpp:
2144
(JSC::DatePrototype::getOwnPropertyDescriptor):
2145
* runtime/DatePrototype.h:
2146
* runtime/JSArray.cpp:
2147
(JSC::JSArray::getOwnPropertyDescriptor):
2148
* runtime/JSArray.h:
2149
* runtime/JSByteArray.cpp:
2150
(JSC::JSByteArray::getOwnPropertyDescriptor):
2151
* runtime/JSByteArray.h:
2152
* runtime/JSFunction.cpp:
2153
(JSC::JSFunction::getOwnPropertyDescriptor):
2154
* runtime/JSFunction.h:
2155
* runtime/JSGlobalObject.h:
2156
(JSC::JSGlobalObject::getOwnPropertyDescriptor):
2157
* runtime/JSNotAnObject.cpp:
2158
(JSC::JSNotAnObject::getOwnPropertyDescriptor):
2159
* runtime/JSNotAnObject.h:
2160
* runtime/JSONObject.cpp:
2161
(JSC::JSONObject::getOwnPropertySlot):
2162
(JSC::JSONObject::getOwnPropertyDescriptor):
2163
* runtime/JSONObject.h:
2164
* runtime/JSObject.cpp:
2165
(JSC::JSObject::getOwnPropertyDescriptor):
2166
(JSC::JSObject::getPropertyDescriptor):
2167
* runtime/JSObject.h:
2168
* runtime/JSString.cpp:
2169
(JSC::JSString::getStringPropertyDescriptor):
2170
(JSC::JSString::getOwnPropertyDescriptor):
2171
* runtime/JSString.h:
2172
* runtime/JSVariableObject.cpp:
2173
(JSC::JSVariableObject::symbolTableGet):
2174
* runtime/JSVariableObject.h:
2176
(JSC::getStaticPropertyDescriptor):
2177
(JSC::getStaticFunctionDescriptor):
2178
(JSC::getStaticValueDescriptor):
2179
Add property descriptor equivalents of the lookup
2180
table access functions
2182
* runtime/MathObject.cpp:
2183
(JSC::MathObject::getOwnPropertySlot):
2184
(JSC::MathObject::getOwnPropertyDescriptor):
2185
* runtime/MathObject.h:
2186
* runtime/NumberConstructor.cpp:
2187
(JSC::NumberConstructor::getOwnPropertyDescriptor):
2188
* runtime/NumberConstructor.h:
2189
* runtime/ObjectConstructor.cpp:
2190
(JSC::ObjectConstructor::ObjectConstructor):
2191
(JSC::objectConstructorGetOwnPropertyDescriptor):
2192
* runtime/PropertyDescriptor.cpp: Added.
2193
(JSC::PropertyDescriptor::writable):
2194
(JSC::PropertyDescriptor::enumerable):
2195
(JSC::PropertyDescriptor::configurable):
2196
(JSC::PropertyDescriptor::hasAccessors):
2197
(JSC::PropertyDescriptor::setUndefined):
2198
(JSC::PropertyDescriptor::getter):
2199
(JSC::PropertyDescriptor::setter):
2200
(JSC::PropertyDescriptor::setDescriptor):
2201
(JSC::PropertyDescriptor::setAccessorDescriptor):
2202
* runtime/PropertyDescriptor.h: Added.
2203
(JSC::PropertyDescriptor::PropertyDescriptor):
2204
(JSC::PropertyDescriptor::attributes):
2205
(JSC::PropertyDescriptor::isValid):
2206
(JSC::PropertyDescriptor::value):
2207
* runtime/RegExpConstructor.cpp:
2208
(JSC::RegExpConstructor::getOwnPropertyDescriptor):
2209
* runtime/RegExpConstructor.h:
2210
* runtime/RegExpMatchesArray.h:
2211
(JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2212
* runtime/RegExpObject.cpp:
2213
(JSC::RegExpObject::getOwnPropertyDescriptor):
2214
* runtime/RegExpObject.h:
2215
* runtime/StringObject.cpp:
2216
(JSC::StringObject::getOwnPropertyDescriptor):
2217
* runtime/StringObject.h:
2218
* runtime/StringPrototype.cpp:
2219
(JSC::StringPrototype::getOwnPropertyDescriptor):
2220
* runtime/StringPrototype.h:
2222
2009-08-24 Gavin Barraclough <barraclough@apple.com>
2224
Reviewed by Darin Adler.
2226
How many copies of the parameters do you need?
2227
https://bugs.webkit.org/show_bug.cgi?id=28701
2229
The function parameters in JSC get copied a lot - and unnecessarily so.
2231
Originally this happened due to duplicating FunctionBodyNodes on recompilation,
2232
though the problem has been exacerbated by copying the parameters from the
2233
original function body onto the executable, then back onto the real body that
2234
will be generated (this happens on every function). And this is all made worse
2235
since the data structures in question are a little ugly - C style arrays of C++
2236
objects containing ref counts, so they need a full copy-construct (rather than
2239
This can all be greatly simplified by just punting the parameters off into
2240
their own ref-counted object, and forgoing all the copying.
2242
~no performance change, possible slight progression.
2244
* bytecompiler/BytecodeGenerator.cpp:
2245
(JSC::BytecodeGenerator::BytecodeGenerator):
2246
* bytecompiler/BytecodeGenerator.h:
2247
(JSC::BytecodeGenerator::makeFunction):
2249
(JSC::FunctionParameters::FunctionParameters):
2250
(JSC::FunctionBodyNode::FunctionBodyNode):
2251
(JSC::FunctionBodyNode::finishParsing):
2253
(JSC::FunctionBodyNode::parameters):
2254
(JSC::FunctionBodyNode::parameterCount):
2255
* runtime/Executable.cpp:
2256
(JSC::FunctionExecutable::~FunctionExecutable):
2257
(JSC::FunctionExecutable::compile):
2258
(JSC::FunctionExecutable::reparseExceptionInfo):
2259
(JSC::FunctionExecutable::fromGlobalCode):
2260
(JSC::FunctionExecutable::paramString):
2261
* runtime/Executable.h:
2262
(JSC::FunctionExecutable::FunctionExecutable):
2263
(JSC::FunctionExecutable::parameterCount):
2265
2009-08-25 Brent Fulgham <bfulgham@webkit.org>
2267
Reviewed by NOBODY (Buildfix).
2269
* JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target
2270
that inherits from the debug_wincairo property sheet and therefore
2271
links to the proper debug library.
2272
* JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target
2273
that inherits from the debug_wincairo property sheet and therefore
2274
links to the proper debug library.
2276
2009-08-25 Chris Marrin <cmarrin@apple.com>
2278
Reviewed by Simon Fraser.
2280
Export tryFastMalloc for Canvas3D work
2281
https://bugs.webkit.org/show_bug.cgi?id=28018
2283
* JavaScriptCore.exp:
2285
2009-08-25 David Levin <levin@chromium.org>
2287
Reviewed by Adam Roben.
2289
PLATFORM(CFNETWORK) should be USE(CFNETWORK).
2290
https://bugs.webkit.org/show_bug.cgi?id=28713
2292
* wtf/Platform.h: Added a #define to catch this issue in the
2293
future. The define would generate an error on gcc without the
2294
space in the expansion, but Visual C++ needs the space to cause an error.
2296
2009-08-24 Brent Fulgham <bfulgham@webkit.org>
2298
Reviewed by Steve Falkenburg.
2300
Revise CFLite Debug build to emit DLL's with _debug label.
2301
https://bugs.webkit.org/show_bug.cgi?id=28695.
2303
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify
2304
Cairo debug build to inherit from new debug_cairo property sheet.
2305
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops:
2306
Modify to look for debug CFLite when in debug build.
2308
2009-08-24 Gavin Barraclough <barraclough@apple.com>
2310
Reviewed by Oliver Adler & Darin Hunt.
2312
https://bugs.webkit.org/show_bug.cgi?id=28691
2313
Do not retain ScopeNodes outside of parsing
2315
There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.
2317
* bytecode/EvalCodeCache.h:
2318
(JSC::EvalCodeCache::get):
2319
* bytecompiler/BytecodeGenerator.cpp:
2320
(JSC::BytecodeGenerator::BytecodeGenerator):
2321
(JSC::BytecodeGenerator::emitNewFunction):
2322
(JSC::BytecodeGenerator::emitNewFunctionExpression):
2323
* bytecompiler/BytecodeGenerator.h:
2324
(JSC::BytecodeGenerator::makeFunction):
2325
* debugger/Debugger.cpp:
2326
(JSC::Debugger::recompileAllJSFunctions):
2327
(JSC::evaluateInGlobalCallFrame):
2328
* debugger/DebuggerCallFrame.cpp:
2329
(JSC::DebuggerCallFrame::evaluate):
2330
* interpreter/Interpreter.cpp:
2331
(JSC::Interpreter::execute):
2332
(JSC::Interpreter::prepareForRepeatCall):
2333
(JSC::Interpreter::privateExecute):
2335
(JSC::DEFINE_STUB_FUNCTION):
2337
(JSC::ScopeNodeData::ScopeNodeData):
2338
(JSC::ProgramNode::create):
2339
(JSC::EvalNode::create):
2340
(JSC::FunctionBodyNode::create):
2342
(JSC::ScopeNode::adoptData):
2343
(JSC::FunctionBodyNode::parameterCount):
2344
* parser/Parser.cpp:
2346
(JSC::Parser::arena):
2347
(JSC::Parser::Parser):
2348
(JSC::Parser::parse):
2349
* runtime/ArrayPrototype.cpp:
2350
(JSC::isNumericCompareFunction):
2351
(JSC::arrayProtoFuncSort):
2352
* runtime/Completion.cpp:
2355
* runtime/Executable.cpp:
2356
(JSC::FunctionExecutable::~FunctionExecutable):
2357
(JSC::EvalExecutable::compile):
2358
(JSC::ProgramExecutable::checkSyntax):
2359
(JSC::ProgramExecutable::compile):
2360
(JSC::FunctionExecutable::compile):
2361
(JSC::EvalExecutable::generateJITCode):
2362
(JSC::ProgramExecutable::generateJITCode):
2363
(JSC::FunctionExecutable::generateJITCode):
2364
(JSC::FunctionExecutable::reparseExceptionInfo):
2365
(JSC::EvalExecutable::reparseExceptionInfo):
2366
(JSC::FunctionExecutable::recompile):
2367
(JSC::FunctionExecutable::fromGlobalCode):
2368
(JSC::FunctionExecutable::copyParameters):
2369
(JSC::FunctionExecutable::paramString):
2370
* runtime/Executable.h:
2371
(JSC::ScriptExecutable::ScriptExecutable):
2372
(JSC::ScriptExecutable::sourceID):
2373
(JSC::ScriptExecutable::sourceURL):
2374
(JSC::ScriptExecutable::lineNo):
2375
(JSC::ScriptExecutable::lastLine):
2376
(JSC::ScriptExecutable::usesEval):
2377
(JSC::ScriptExecutable::usesArguments):
2378
(JSC::ScriptExecutable::needsActivation):
2379
(JSC::ScriptExecutable::recordParse):
2380
(JSC::EvalExecutable::bytecode):
2381
(JSC::EvalExecutable::jitCode):
2382
(JSC::ProgramExecutable::bytecode):
2383
(JSC::ProgramExecutable::reparseExceptionInfo):
2384
(JSC::ProgramExecutable::jitCode):
2385
(JSC::FunctionExecutable::FunctionExecutable):
2386
(JSC::FunctionExecutable::make):
2387
(JSC::FunctionExecutable::bytecode):
2388
(JSC::FunctionExecutable::isGenerated):
2389
(JSC::FunctionExecutable::name):
2390
(JSC::FunctionExecutable::parameterCount):
2391
(JSC::FunctionExecutable::jitCode):
2392
* runtime/FunctionConstructor.cpp:
2393
(JSC::constructFunction):
2394
* runtime/JSGlobalData.cpp:
2395
(JSC::JSGlobalData::numericCompareFunction):
2396
* runtime/JSGlobalObjectFunctions.cpp:
2397
(JSC::globalFuncEval):
2399
2009-08-24 Darin Adler <darin@apple.com>
2401
* runtime/ObjectPrototype.cpp:
2402
(JSC::ObjectPrototype::put): Landed revised version I had tested but forgot
2403
to land. Leave out the branch, since we don't need one.
2405
2009-08-24 Darin Adler <darin@apple.com>
2407
Reviewed by Geoff Garen.
2409
Array index miss case creates a string every time
2410
https://bugs.webkit.org/show_bug.cgi?id=28664
2412
SunSpider test results I saw:
2415
1% faster on crypto-aes
2416
20% faster on crypto-md5
2417
13% faster on crypto-sha1
2419
* runtime/ObjectPrototype.cpp:
2420
(JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names
2422
(JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new
2423
property has a name that is the string form of a UInt32.
2424
(JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot
2425
if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true.
2427
* runtime/ObjectPrototype.h: Added declarations for the above.
2429
2009-08-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
2431
Unreviewed. Fix a typo in my distcheck build fix.
2435
2009-08-23 Gustavo Noronha Silva <gns@gnome.org>
2437
Unreviewed build fix for make distcheck.
2439
* GNUmakefile.am: Added files required for the build.
2441
2009-08-22 Maciej Stachowiak <mjs@apple.com>
2443
Reviewed by Mark Rowe.
2445
REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC
2446
https://bugs.webkit.org/show_bug.cgi?id=28655
2448
* runtime/JSFunction.cpp:
2449
(JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
2452
2009-08-22 Darin Adler <darin@apple.com>
2454
Fix storage leak from syntax tree arena allocation patch.
2456
* parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
2457
because it has a vector.
2459
2009-08-21 Darin Adler <darin@apple.com>
2464
(JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
2465
This is used outside Nodes.cpp so can't be inline unless
2466
it is in the header.
2468
2009-08-21 Darin Adler <darin@apple.com>
2470
Two loose ends from the last commit.
2472
* JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
2473
and create_hash_table project-internal instead of "private".
2474
* runtime/Executable.h: Removed accidentally-added constructor.
2476
2009-08-21 Darin Adler <darin@apple.com>
2478
Reviewed by Gavin Barraclough.
2480
Syntax tree nodes should use arena allocation
2481
https://bugs.webkit.org/show_bug.cgi?id=25674
2483
Use an actual arena now. 0.6% speedup on SunSpider.
2485
New and improved with 100% less leaking of the universe.
2487
* JavaScriptCore.exp:
2488
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2489
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2490
Removed all exports involving the class FunctionBodyNode, which no
2491
longer needs to be used outside JavaScriptCore.
2493
* JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
2494
Executable.h project-internal instead of "private".
2496
* bytecompiler/BytecodeGenerator.cpp:
2497
(JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
2498
contains const Identifier* now.
2500
* parser/Grammar.y: Made identifiers from the lexer be const
2501
Identifier* and updated since VarStack contains const Identifier* now.
2504
(JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
2505
(JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
2506
and changed to call ParserArena.
2507
(JSC::Lexer::clear): Removed the code to manage m_identifiers and
2508
added code to set m_arena to 0.
2509
* parser/Lexer.h: Updated for changes above.
2511
* parser/NodeConstructors.h:
2512
(JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
2514
(JSC::ParserArenaDeletable::operator new): Changed to call the
2515
allocateDeletable function on the arena instead of deleteWithArena.
2516
(JSC::PropertyNode::PropertyNode): Added new constructor that makes
2517
numeric identifiers. Some day we might want to optimize this for
2518
integers so it doesn't create a string for each one.
2519
(JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
2520
since it's now a const Identifier& so it can't be left uninitialized.
2521
(JSC::BreakNode::BreakNode): Ditto.
2522
(JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
2523
to keep track of the statements rather than a separate statement vector.
2524
(JSC::BlockNode::BlockNode): Ditto.
2525
(JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
2527
* parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
2528
It seemed strangely out of place in the header.
2529
(JSC::ThrowableExpressionData::emitThrowError): Added an overload for
2530
UString as well as Identifier.
2531
(JSC::SourceElements::singleStatement): Added.
2532
(JSC::SourceElements::lastStatement): Added.
2533
(JSC::RegExpNode::emitBytecode): Changed the throwError code to use
2534
the substitution mechanism instead of doing a string append.
2535
(JSC::SourceElements::emitBytecode): Added. Replaces the old
2536
statementListEmitCode function, since we now keep the SourceElements
2538
(JSC::BlockNode::lastStatement): Added.
2539
(JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
2540
statementListEmitCode.
2541
(JSC::CaseClauseNode::emitBytecode): Added.
2542
(JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
2543
instead of statementListEmitCode.
2544
(JSC::ScopeNodeData::ScopeNodeData): Changed to store the
2545
SourceElements* instead of using releaseContentsIntoVector.
2546
(JSC::ScopeNode::emitStatementsBytecode): Added.
2547
(JSC::ScopeNode::singleStatement): Added.
2548
(JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
2549
of statementListEmitCode.
2550
(JSC::EvalNode::emitBytecode): Ditto.
2551
(JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
2552
insetad of statementListEmitCode and check for the return node using
2555
* parser/Nodes.h: Changed VarStack to store const Identifier* instead
2556
of Identifier and rely on the arena to control lifetime. Added a new
2557
ParserArenaFreeable class. Made ParserArenaDeletable inherit from
2558
FastAllocBase instead of having its own operator new. Base the Node
2559
class on ParserArenaFreeable. Changed the various Node classes
2560
to use const Identifier& instead of Identifier to avoid the need to
2561
call their destructors and allow them to function as "freeable" in the
2562
arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
2563
Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
2564
CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
2565
as a base class since they do not descend from Node. Eliminated the
2566
StatementVector type and instead have various classes use SourceElements*
2567
instead of StatementVector. This prevents those classes from having to
2568
use ParserArenaDeletable to make sure the vector destructor is called.
2570
* parser/Parser.cpp:
2571
(JSC::Parser::parse): Pass the arena to the lexer.
2573
* parser/Parser.h: Added an include of ParserArena.h, which is no longer
2574
included by Nodes.h.
2575
(JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
2576
singleStatement function, since there is no longer any children function.
2577
Removed some unneeded use of RefPtr.
2579
* parser/ParserArena.cpp:
2580
(JSC::ParserArena::ParserArena): Added. Initializes the new members,
2581
m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
2582
(JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
2583
since we store only the current pointer and the end of pool pointer.
2584
(JSC::ParserArena::deallocateObjects): Added. Contains the common
2585
memory-deallocation logic used by both the destructor and the
2587
(JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
2588
(JSC::ParserArena::reset): Ditto. Also added code to zero out the
2589
new structures, and switched to use clear() instead of shrink(0) since
2590
we don't really reuse arenas.
2591
(JSC::ParserArena::makeNumericIdentifier): Added.
2592
(JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
2594
(JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
2595
since this is used only for assertions at the moment.
2596
(JSC::ParserArena::derefWithArena): Make non-inline.
2598
* parser/ParserArena.h: Added an actual arena of "freeable" objects,
2599
ones that don't need destructors to be called. Also added a separate
2600
IdentifierArena object, a segmented vector of identifiers that used
2603
* runtime/Executable.h: Moved the definition of the
2604
FunctionExecutable::make function here. It can't go in JSFunction.h
2605
since that header has to be used outside JavaScriptCore and so can't
2606
include this, which includes Nodes.h. The function could be moved
2607
elswhere if we don't want to include JSFunction.h in this header, but
2608
for now this seems to be the best place.
2610
* runtime/JSFunction.h: Removed the include of Executable.h and
2611
definition of the FunctionExecutable::make function.
2613
* wtf/FastMalloc.cpp: Fixed an incorrect comment.
2615
2009-08-21 Mark Rowe <mrowe@apple.com>
2617
Fix the non-JIT build.
2619
* runtime/Executable.cpp:
2620
* runtime/Executable.h:
2622
2009-08-21 Gavin Barraclough <barraclough@apple.com>
2624
Speculative QuickTime build fix.
2626
* runtime/JSArray.cpp:
2628
2009-08-21 Gavin Barraclough <barraclough@apple.com>
2630
Speculative QT build fix.
2632
* runtime/StringPrototype.cpp:
2634
2009-08-21 Gavin Barraclough <barraclough@apple.com>
2636
Reviewed by Oliver Hunt.
2638
Restructure Executable types so that host functions do not hold a FunctionExecutable.
2639
https://bugs.webkit.org/show_bug.cgi?id=28621
2641
All JSFunction objects have a pointer to an Executable*. This is currently always a
2642
FunctionExecutable, however this has a couple of drawbacks. Host functions do not
2643
store a range of information that the FunctionExecutable provides (source, name,
2644
CodeBlock & information presently held on the FunctionBodyNode).
2646
[ * nearly all... see below! ]
2648
Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific
2649
to JS sourced executable types (source, node) into a new subclass (ScriptExecutable),
2650
and create a new NativeExecutable type. We now provide a new method in JSFunction
2651
to access & downcast to FunctionExecutable, but in doing so we can make an early
2652
check (with an ASSERT) to ensure that the Executable read from a function will only
2653
be treated as a FunctionExecutable (and thus the JS sepcific fields will only be
2654
accessed) if the JSFunction is not a host function.
2656
There is one JSFunction that currently does not have an Executable, which is the
2657
object created to allow us to read out the vtable pointer. By making this change
2658
we can also add a new Executable type fror this object (VPtrHackExecutable).
2659
Since this means that really all JSFunctions have an Executable we no longer have
2660
to null-check m_executable before us it - particularly in isHostFunction().
2662
This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase
2663
can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase
2664
that might be a FunctionExecutable or a NativeExecutable. This does now mean that all
2665
ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be
2666
ref-counted, however this seems less-bad than host functions unnecessarily providing
2667
interface to access non-host specific information.
2669
The class hierarcy has changed from this:
2674
- CacheableEvalExecutable (also RefCounted by multiple-inheritance)
2675
- FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions)
2682
- VPtrHackExecutable
2686
- FunctionExecutable
2688
This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()).
2690
* bytecode/CodeBlock.cpp:
2691
(JSC::CodeBlock::CodeBlock):
2692
* bytecode/CodeBlock.h:
2693
(JSC::CodeBlock::ownerExecutable):
2694
(JSC::GlobalCodeBlock::GlobalCodeBlock):
2695
* bytecode/EvalCodeCache.h:
2696
(JSC::EvalCodeCache::get):
2697
* debugger/Debugger.cpp:
2698
(JSC::Debugger::recompileAllJSFunctions):
2699
* interpreter/CachedCall.h:
2700
(JSC::CachedCall::CachedCall):
2701
* interpreter/Interpreter.cpp:
2702
(JSC::Interpreter::callEval):
2703
(JSC::Interpreter::privateExecute):
2705
(JSC::DEFINE_STUB_FUNCTION):
2706
* profiler/Profiler.cpp:
2707
(JSC::createCallIdentifierFromFunctionImp):
2708
* runtime/Arguments.h:
2709
(JSC::Arguments::getArgumentsData):
2710
(JSC::Arguments::Arguments):
2711
* runtime/Executable.cpp:
2712
(JSC::NativeExecutable::~NativeExecutable):
2713
(JSC::VPtrHackExecutable::~VPtrHackExecutable):
2714
* runtime/Executable.h:
2715
(JSC::ExecutableBase::ExecutableBase):
2716
(JSC::ExecutableBase::~ExecutableBase):
2717
(JSC::ExecutableBase::isHostFunction):
2718
(JSC::NativeExecutable::NativeExecutable):
2719
(JSC::VPtrHackExecutable::VPtrHackExecutable):
2720
(JSC::ScriptExecutable::ScriptExecutable):
2721
(JSC::ScriptExecutable::source):
2722
(JSC::ScriptExecutable::sourceID):
2723
(JSC::ScriptExecutable::sourceURL):
2724
(JSC::ScriptExecutable::lineNo):
2725
(JSC::ScriptExecutable::lastLine):
2726
(JSC::ScriptExecutable::usesEval):
2727
(JSC::ScriptExecutable::usesArguments):
2728
(JSC::ScriptExecutable::needsActivation):
2729
(JSC::EvalExecutable::EvalExecutable):
2730
(JSC::EvalExecutable::create):
2731
(JSC::ProgramExecutable::ProgramExecutable):
2732
(JSC::FunctionExecutable::FunctionExecutable):
2733
* runtime/FunctionPrototype.cpp:
2734
(JSC::functionProtoFuncToString):
2735
* runtime/JSFunction.cpp:
2736
(JSC::JSFunction::JSFunction):
2737
(JSC::JSFunction::~JSFunction):
2738
(JSC::JSFunction::markChildren):
2739
(JSC::JSFunction::getCallData):
2740
(JSC::JSFunction::call):
2741
(JSC::JSFunction::lengthGetter):
2742
(JSC::JSFunction::getConstructData):
2743
(JSC::JSFunction::construct):
2744
* runtime/JSFunction.h:
2745
(JSC::JSFunction::executable):
2746
(JSC::JSFunction::jsExecutable):
2747
(JSC::JSFunction::isHostFunction):
2749
2009-08-20 Oliver Hunt <oliver@apple.com>
2751
Reviewed by Maciej Stachowiak.
2753
Browser hangs on opening Web Inspector.
2754
https://bugs.webkit.org/show_bug.cgi?id=28438
2756
Code generation needs to be able to walk the entire scopechain in some
2757
cases, however the symbol table used by activations was a member of the
2758
codeblock. Following recompilation this may no longer exist, leading
2759
to a crash or hang on lookup.
2761
We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable,
2762
for the CodeBlocks used by function code. This allows activations to
2763
maintain ownership of a copy of the symbol table even after recompilation so
2764
they can continue to work.
2766
* bytecode/CodeBlock.cpp:
2767
(JSC::CodeBlock::CodeBlock):
2768
* bytecode/CodeBlock.h:
2769
(JSC::CodeBlock::symbolTable):
2770
(JSC::CodeBlock::sharedSymbolTable):
2771
(JSC::GlobalCodeBlock::GlobalCodeBlock):
2772
(JSC::FunctionCodeBlock::FunctionCodeBlock):
2773
(JSC::FunctionCodeBlock::~FunctionCodeBlock):
2774
* interpreter/Interpreter.cpp:
2775
(JSC::Interpreter::retrieveArguments):
2776
* runtime/Executable.cpp:
2777
(JSC::EvalExecutable::generateBytecode):
2778
(JSC::FunctionExecutable::generateBytecode):
2779
(JSC::FunctionExecutable::reparseExceptionInfo):
2780
(JSC::EvalExecutable::reparseExceptionInfo):
2781
* runtime/JSActivation.h:
2782
(JSC::JSActivation::JSActivationData::JSActivationData):
2783
(JSC::JSActivation::JSActivationData::~JSActivationData):
2784
* runtime/SymbolTable.h:
2786
2009-08-20 Xan Lopez <xlopez@igalia.com>
2788
Add new file to GTK+ build.
2792
2009-08-20 Geoffrey Garen <ggaren@apple.com>
2794
Reviewed by Maciej Stachowiak.
2796
Added a number => string cache.
2798
1.07x faster on v8 (1.7x faster on v8-splay).
2799
1.004x faster on SunSpider.
2801
* runtime/JSCell.h: Moved JSValue::toString to JSString.h.
2802
* runtime/JSGlobalData.h: Holds the cache.
2803
* runtime/JSNumberCell.cpp:
2804
(JSC::JSNumberCell::toString):
2805
(JSC::JSNumberCell::toThisString): Removed -0 special case.
2806
UString handles this now, since too many clients were
2809
* runtime/JSString.h:
2810
(JSC::JSValue::toString): Use the cache when converting
2811
an int or double to string.
2813
* runtime/Operations.h:
2814
(JSC::concatenateStrings): Call toString to take advantage
2817
* runtime/SmallStrings.h:
2818
(JSC::NumericStrings::add):
2819
(JSC::NumericStrings::lookup): The cache.
2821
* runtime/UString.cpp:
2822
(JSC::UString::from): Added -0 special case mentioned above.
2823
Removed appendNumeric because it's mutually exclusive with the
2826
2009-08-20 Oliver Hunt <oliver@apple.com>
2828
Reviewed by Gavin Barraclough.
2830
REGRESSION: fast/profiler/call.html is crashing occasionally
2831
https://bugs.webkit.org/show_bug.cgi?id=28476
2833
Using the codeblock for information about how many parameters and
2834
locals a function has is unsafe in certain circumstances. The
2835
basic scenario is all function code being cleared in response to
2836
the debugger or profiler being enabled, and then an activation is
2837
marked before its associated function is re-executed.
2839
To deal with this scenario we store the variable count of a function
2840
directly in the FunctionExecutable, and then use that information.
2842
* runtime/Arguments.h:
2843
(JSC::Arguments::getArgumentsData):
2844
* runtime/Executable.cpp:
2845
(JSC::FunctionExecutable::generateBytecode):
2846
* runtime/Executable.h:
2847
(JSC::FunctionExecutable::FunctionExecutable):
2848
(JSC::FunctionExecutable::variableCount):
2849
* runtime/JSActivation.cpp:
2850
(JSC::JSActivation::markChildren):
2852
2009-08-20 Gavin Barraclough <barraclough@apple.com>
2854
Reviewed by Oliver Hunt.
2856
Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect
2857
<bug lost in the great bug disasteroony of 08/20/09!>
2859
The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match
2860
the argument number used within the stub functions in JITStubs.cpp, but it doesn't.
2862
Firstly, all the numbers changed when we added a void* 'reserved' as the first slot
2863
(rather than leaving argument 0 unused), and secondly in 32_64 builds the index to
2864
peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number
2865
of machine words, and on 32_64 build the argument slots to stub functions are two
2870
(JSC::JIT::compileOpCallSetupArgs):
2871
(JSC::JIT::compileOpConstructSetupArgs):
2872
(JSC::JIT::compileOpCallVarargsSetupArgs):
2873
(JSC::JIT::compileOpCall):
2874
* jit/JITInlineMethods.h:
2875
(JSC::JIT::emitPutJITStubArg):
2876
(JSC::JIT::emitPutJITStubArgConstant):
2877
(JSC::JIT::emitGetJITStubArg):
2878
(JSC::JIT::emitPutJITStubArgFromVirtualRegister):
2879
* jit/JITOpcodes.cpp:
2880
(JSC::JIT::privateCompileCTIMachineTrampolines):
2881
* jit/JITPropertyAccess.cpp:
2882
(JSC::JIT::privateCompilePutByIdTransition):
2884
2009-08-20 Oliver Hunt <oliver@apple.com>
2886
Reviewed by Geoff Garen.
2888
REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
2889
https://bugs.webkit.org/show_bug.cgi?id=28332
2891
Follow up style fixes that were missed in review.
2893
* runtime/Structure.cpp:
2894
(JSC::Structure::hasTransition):
2895
* runtime/Structure.h:
2896
(JSC::Structure::get):
2897
(JSC::StructureTransitionTable::contains):
2898
* runtime/StructureTransitionTable.h:
2899
(JSC::StructureTransitionTable::add):
2901
2009-08-20 Oliver Hunt <oliver@apple.com>
2903
Add new exports to windows jsc build
2905
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2906
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2908
2009-08-20 Oliver Hunt <oliver@apple.com>
2910
Reviewed by Gavin Barraclough.
2912
REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
2913
https://bugs.webkit.org/show_bug.cgi?id=28332
2915
The method check optimisation made transitions aware of the value being
2916
assigned when a transition was assigning a function. This had the side
2917
effect of making every assignment of a function expression result in a
2918
new transition, and thus a new Structure. The net result of this is that
2919
the common JS idiom of
2921
function MyObject() {
2922
this.myFunction = function(...){...};
2926
Will produce a unique structure on every iteration, meaning that all
2927
caching is defeated and there is a significant amount of structure churn.
2929
The fix is to return the transition to its original form where it is
2930
keyed off a property name + attributes tuple, but have each transition
2931
support an optional transition on a specific value.
2933
* JavaScriptCore.exp:
2934
* runtime/JSObject.h:
2935
(JSC::JSObject::putDirectInternal):
2936
* runtime/Structure.cpp:
2937
(JSC::Structure::~Structure):
2938
(JSC::Structure::addPropertyTransitionToExistingStructure):
2939
(JSC::Structure::addPropertyTransition):
2940
(JSC::Structure::hasTransition):
2941
* runtime/Structure.h:
2942
(JSC::Structure::transitionedFor):
2943
(JSC::Structure::hasTransition):
2945
(JSC::StructureTransitionTable::contains):
2946
(JSC::StructureTransitionTable::get):
2947
* runtime/StructureTransitionTable.h:
2948
(JSC::StructureTransitionTableHashTraits::emptyValue):
2949
(JSC::StructureTransitionTable::hasTransition):
2950
(JSC::StructureTransitionTable::remove):
2951
(JSC::StructureTransitionTable::add):
2953
2009-08-20 Gavin Barraclough <barraclough@apple.com>
2955
Reviewed by Oliver Hunt.
2957
Remove FunctionCodeBlock.
2958
https://bugs.webkit.org/show_bug.cgi?id=28502
2960
These only exist to allow JIT code to dereference properties off the
2961
CodeBlock for any callee, regardless of whether it is a host function.
2963
Instead just use the FunctionExecutable. Copy the m_parameters field
2964
from the CodeBlock into the Executable, and use this to distinguish
2965
between host functions, functions that have been bytecompiled, and
2966
functions that have not.
2968
m_parameters is moved to ExecutableBase rather than FunctionExecutable
2969
so that (as a separate change) we can move make a separate class of
2970
executable for host code, which is not devived from FunctionExecutable
2971
(host code does not feature any of the properties that normal executable
2972
do and will provide, such as source, attributes, and a parsed name).
2974
1% win on v8 tests, 0.5% on sunspider.
2976
* bytecode/CodeBlock.cpp:
2977
(JSC::CodeBlock::derefStructures):
2978
(JSC::CodeBlock::refStructures):
2979
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
2980
(JSC::CodeBlock::handlerForBytecodeOffset):
2981
(JSC::CodeBlock::lineNumberForBytecodeOffset):
2982
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
2983
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
2984
(JSC::CodeBlock::functionRegisterForBytecodeOffset):
2985
(JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
2986
(JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
2987
* bytecode/CodeBlock.h:
2989
(JSC::CodeBlock::source):
2990
(JSC::CodeBlock::sourceOffset):
2991
(JSC::CodeBlock::evalCodeCache):
2992
(JSC::CodeBlock::createRareDataIfNecessary):
2994
remove NativeCodeBlocks and the NativeCode code type.
2997
(JSC::JIT::linkCall):
2999
Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
3002
(JSC::JIT::compileOpCallInitializeCallFrame):
3003
(JSC::JIT::compileOpCallSetupArgs):
3004
(JSC::JIT::compileOpCallVarargsSetupArgs):
3005
(JSC::JIT::compileOpConstructSetupArgs):
3006
(JSC::JIT::compileOpCallVarargs):
3007
(JSC::JIT::compileOpCall):
3008
(JSC::JIT::compileOpCallSlowCase):
3010
Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
3012
* jit/JITOpcodes.cpp:
3013
(JSC::JIT::privateCompileCTIMachineTrampolines):
3015
Rewrite call trampolines to not use the CodeBlock.
3018
(JSC::DEFINE_STUB_FUNCTION):
3020
Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
3022
* runtime/Executable.cpp:
3023
(JSC::FunctionExecutable::generateBytecode):
3024
(JSC::FunctionExecutable::recompile):
3025
(JSC::FunctionExecutable::FunctionExecutable):
3026
* runtime/Executable.h:
3027
(JSC::ExecutableBase::):
3028
(JSC::ExecutableBase::ExecutableBase):
3029
(JSC::FunctionExecutable::isHostFunction):
3031
Add m_numParameters.
3033
* runtime/JSFunction.cpp:
3034
(JSC::JSFunction::~JSFunction):
3036
Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.
3038
2009-08-20 Yongjun Zhang <yongjun.zhang@nokia.com>
3040
Reviewed by Eric Seidel.
3042
https://bugs.webkit.org/show_bug.cgi?id=28054
3044
Use a helper function to work around winscw compiler forward declaration bug
3045
regarding templated classes.
3047
Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler
3048
work with the default UnSpecifiedBoolType() operator, which removes the winscw
3049
specific bool cast hack.
3052
(WTF::derefIfNotNull):
3053
(WTF::PassRefPtr::~PassRefPtr):
3055
2009-08-19 Yong Li <yong.li@torchmobile.com>
3057
Reviewed by Gavin Barraclough.
3059
Change namespace ARM to ARMRegisters
3060
X86 to X86Registers to avoid conflict with macros
3061
https://bugs.webkit.org/show_bug.cgi?id=28428
3063
* assembler/ARMAssembler.cpp:
3064
* assembler/ARMAssembler.h:
3065
* assembler/ARMv7Assembler.h:
3066
* assembler/MacroAssemblerARM.h:
3067
* assembler/MacroAssemblerARMv7.h:
3068
* assembler/MacroAssemblerX86Common.h:
3069
* assembler/MacroAssemblerX86_64.h:
3070
* assembler/X86Assembler.h:
3072
* jit/JITArithmetic.cpp:
3073
* jit/JITInlineMethods.h:
3074
* jit/JITOpcodes.cpp:
3075
* wrec/WRECGenerator.cpp:
3076
* wrec/WRECGenerator.h:
3077
* yarr/RegexJIT.cpp:
3079
2009-08-19 Oliver Hunt <oliver@apple.com>
3081
Reviewed by Gavin Barraclough.
3083
Devirtualise marking
3084
https://bugs.webkit.org/show_bug.cgi?id=28294
3086
We actually need to mark the value in a number object if we're using the
3087
32bit number representation.
3089
* runtime/NumberObject.h:
3090
(JSC::NumberObject::createStructure):
3092
2009-08-19 Gavin Barraclough <barraclough@apple.com>
3094
Reviewed by Darin Adler.
3096
We probably shouldn't be keeping the AST for eval nodes around forevar.
3097
https://bugs.webkit.org/show_bug.cgi?id=28469
3099
EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
3100
their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away.
3102
* bytecode/CodeBlock.h:
3103
(JSC::EvalCodeBlock::variable):
3104
(JSC::EvalCodeBlock::numVariables):
3105
(JSC::EvalCodeBlock::adoptVariables):
3106
* bytecompiler/BytecodeGenerator.cpp:
3107
(JSC::BytecodeGenerator::BytecodeGenerator):
3108
* interpreter/Interpreter.cpp:
3109
(JSC::Interpreter::execute):
3111
* runtime/Executable.cpp:
3112
(JSC::EvalExecutable::generateBytecode):
3113
* runtime/Executable.h:
3115
2009-08-19 Jungshik Shin <jshin@chromium.org>
3117
Reviewed by Darin Adler.
3119
http://bugs.webkit.org/show_bug.cgi?id=28441
3121
Fix a build issue with ICU 4.2 or later on Windows with Visual C++.
3122
Instead of defining all isXXX and toupper/tolower as
3123
WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h,
3124
#define them to be different by prepending 'WTF_...ASCIIType_h' with
3125
the originial names like 'toupper_WTF_...ASCIIType_h'.
3127
* wtf/DisallowCType.h:
3129
2009-08-18 Oliver Hunt <oliver@apple.com>
3131
Reviewed by Gavin Barraclough.
3133
Assigning a function to an object should always use the existing transition, even if the transition is not specialized
3134
https://bugs.webkit.org/show_bug.cgi?id=28442
3136
Check for an unspecialized transition as an alternative to always failing if specialisation does not match.
3138
* runtime/Structure.cpp:
3139
(JSC::Structure::addPropertyTransitionToExistingStructure):
3141
2009-08-18 Dirk Schulze <krit@webkit.org>
3143
Reviewed by Oliver Hunt.
3145
Added additional getter to ByteArray with an unsigned char as return.
3146
ByteArray can take unsigned char directly now.
3149
(WTF::ByteArray::set):
3150
(WTF::ByteArray::get):
3152
2009-08-18 Peter Kasting <pkasting@google.com>
3154
Reviewed by Eric Seidel.
3156
https://bugs.webkit.org/show_bug.cgi?id=28415
3157
Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
3160
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3161
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
3163
2009-08-18 Xan Lopez <xlopez@igalia.com>
3165
Try to fix the GTK+ build.
3169
2009-08-17 Gavin Barraclough <barraclough@apple.com>
3171
Reviewed by Sam Weinig.
3173
No, silly runtime, AST nodes are not for you.
3175
We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within
3176
the runtime, which means that these nodes must be persisted outside of the
3177
arena, contain both parser & runtime data, etc. This is all a bit of a mess.
3179
Move functionality into a new FunctionExecutable class.
3181
* API/JSCallbackFunction.cpp:
3182
* API/JSObjectRef.cpp:
3183
* JavaScriptCore.exp:
3184
* JavaScriptCore.xcodeproj/project.pbxproj:
3185
* bytecode/CodeBlock.cpp:
3186
(JSC::CodeBlock::CodeBlock):
3187
(JSC::CodeBlock::markAggregate):
3188
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
3189
(JSC::CodeBlock::lineNumberForBytecodeOffset):
3190
(JSC::CodeBlock::shrinkToFit):
3191
* bytecode/CodeBlock.h:
3192
(JSC::CodeBlock::getBytecodeIndex):
3193
(JSC::CodeBlock::discardBytecode):
3194
(JSC::CodeBlock::instructionCount):
3195
(JSC::CodeBlock::getJITCode):
3196
(JSC::CodeBlock::executablePool):
3197
(JSC::CodeBlock::ownerExecutable):
3198
(JSC::CodeBlock::extractExceptionInfo):
3199
(JSC::CodeBlock::addFunctionDecl):
3200
(JSC::CodeBlock::functionDecl):
3201
(JSC::CodeBlock::numberOfFunctionDecls):
3202
(JSC::CodeBlock::addFunctionExpr):
3203
(JSC::CodeBlock::functionExpr):
3204
(JSC::GlobalCodeBlock::GlobalCodeBlock):
3205
(JSC::ProgramCodeBlock::ProgramCodeBlock):
3206
(JSC::EvalCodeBlock::EvalCodeBlock):
3207
(JSC::FunctionCodeBlock::FunctionCodeBlock):
3208
(JSC::NativeCodeBlock::NativeCodeBlock):
3209
* bytecode/EvalCodeCache.h:
3210
* bytecode/SamplingTool.cpp:
3211
(JSC::SamplingTool::doRun):
3212
* bytecompiler/BytecodeGenerator.cpp:
3213
(JSC::BytecodeGenerator::BytecodeGenerator):
3214
(JSC::BytecodeGenerator::emitNewFunction):
3215
(JSC::BytecodeGenerator::emitNewFunctionExpression):
3216
* bytecompiler/BytecodeGenerator.h:
3217
* debugger/Debugger.cpp:
3218
(JSC::Debugger::recompileAllJSFunctions):
3219
* interpreter/CachedCall.h:
3220
(JSC::CachedCall::CachedCall):
3221
* interpreter/CallFrameClosure.h:
3222
* interpreter/Interpreter.cpp:
3223
(JSC::Interpreter::unwindCallFrame):
3224
(JSC::Interpreter::throwException):
3225
(JSC::Interpreter::execute):
3226
(JSC::Interpreter::prepareForRepeatCall):
3227
(JSC::Interpreter::debug):
3228
(JSC::Interpreter::privateExecute):
3229
(JSC::Interpreter::retrieveLastCaller):
3230
* interpreter/Interpreter.h:
3232
(JSC::JIT::privateCompile):
3234
(JSC::JIT::compile):
3235
* jit/JITOpcodes.cpp:
3236
(JSC::JIT::privateCompileCTIMachineTrampolines):
3237
(JSC::JIT::emit_op_new_func):
3238
(JSC::JIT::emit_op_new_func_exp):
3240
(JSC::DEFINE_STUB_FUNCTION):
3244
(JSC::FunctionBodyNode::reparseDataIfNecessary):
3246
(JSC::EvalNode::partialDestroyData):
3248
* profiler/ProfileGenerator.cpp:
3249
* profiler/Profiler.cpp:
3250
(JSC::Profiler::createCallIdentifier):
3251
(JSC::createCallIdentifierFromFunctionImp):
3252
* runtime/Arguments.h:
3253
(JSC::Arguments::getArgumentsData):
3254
(JSC::Arguments::Arguments):
3255
(JSC::JSActivation::copyRegisters):
3256
* runtime/ArrayPrototype.cpp:
3257
(JSC::isNumericCompareFunction):
3258
* runtime/CallData.h:
3260
* runtime/Collector.cpp:
3261
(JSC::Heap::collect):
3262
* runtime/ConstructData.h:
3264
* runtime/ExceptionHelpers.cpp:
3265
(JSC::createUndefinedVariableError):
3266
(JSC::createInvalidParamError):
3267
(JSC::createNotAConstructorError):
3268
(JSC::createNotAFunctionError):
3269
(JSC::createNotAnObjectError):
3270
* runtime/Executable.cpp: Added.
3271
(JSC::EvalExecutable::generateBytecode):
3272
(JSC::ProgramExecutable::generateBytecode):
3273
(JSC::FunctionExecutable::generateBytecode):
3274
(JSC::EvalExecutable::generateJITCode):
3275
(JSC::ProgramExecutable::generateJITCode):
3276
(JSC::FunctionExecutable::generateJITCode):
3277
(JSC::FunctionExecutable::isHostFunction):
3278
(JSC::FunctionExecutable::markAggregate):
3279
(JSC::FunctionExecutable::reparseExceptionInfo):
3280
(JSC::EvalExecutable::reparseExceptionInfo):
3281
(JSC::FunctionExecutable::recompile):
3282
(JSC::FunctionExecutable::FunctionExecutable):
3283
* runtime/Executable.h:
3284
(JSC::ExecutableBase::~ExecutableBase):
3285
(JSC::ExecutableBase::ExecutableBase):
3286
(JSC::ExecutableBase::source):
3287
(JSC::ExecutableBase::sourceID):
3288
(JSC::ExecutableBase::lastLine):
3289
(JSC::ExecutableBase::usesEval):
3290
(JSC::ExecutableBase::usesArguments):
3291
(JSC::ExecutableBase::needsActivation):
3292
(JSC::ExecutableBase::astNode):
3293
(JSC::ExecutableBase::generatedJITCode):
3294
(JSC::ExecutableBase::getExecutablePool):
3295
(JSC::EvalExecutable::EvalExecutable):
3296
(JSC::EvalExecutable::bytecode):
3297
(JSC::EvalExecutable::varStack):
3298
(JSC::EvalExecutable::evalNode):
3299
(JSC::EvalExecutable::jitCode):
3300
(JSC::ProgramExecutable::ProgramExecutable):
3301
(JSC::ProgramExecutable::reparseExceptionInfo):
3302
(JSC::ProgramExecutable::bytecode):
3303
(JSC::ProgramExecutable::programNode):
3304
(JSC::ProgramExecutable::jitCode):
3305
(JSC::FunctionExecutable::FunctionExecutable):
3306
(JSC::FunctionExecutable::name):
3307
(JSC::FunctionExecutable::bytecode):
3308
(JSC::FunctionExecutable::generatedBytecode):
3309
(JSC::FunctionExecutable::usesEval):
3310
(JSC::FunctionExecutable::usesArguments):
3311
(JSC::FunctionExecutable::parameterCount):
3312
(JSC::FunctionExecutable::paramString):
3313
(JSC::FunctionExecutable::isGenerated):
3314
(JSC::FunctionExecutable::body):
3315
(JSC::FunctionExecutable::jitCode):
3316
(JSC::FunctionExecutable::createNativeThunk):
3317
* runtime/FunctionConstructor.cpp:
3318
(JSC::constructFunction):
3319
* runtime/FunctionPrototype.cpp:
3320
(JSC::functionProtoFuncToString):
3321
* runtime/JSActivation.cpp:
3322
(JSC::JSActivation::JSActivation):
3323
(JSC::JSActivation::markChildren):
3324
(JSC::JSActivation::isDynamicScope):
3325
(JSC::JSActivation::argumentsGetter):
3326
* runtime/JSActivation.h:
3327
(JSC::JSActivation::JSActivationData::JSActivationData):
3328
* runtime/JSFunction.cpp:
3329
(JSC::JSFunction::isHostFunction):
3330
(JSC::JSFunction::JSFunction):
3331
(JSC::JSFunction::~JSFunction):
3332
(JSC::JSFunction::markChildren):
3333
(JSC::JSFunction::getCallData):
3334
(JSC::JSFunction::call):
3335
(JSC::JSFunction::lengthGetter):
3336
(JSC::JSFunction::getConstructData):
3337
(JSC::JSFunction::construct):
3338
* runtime/JSFunction.h:
3339
(JSC::JSFunction::executable):
3340
(JSC::FunctionExecutable::make):
3341
* runtime/JSGlobalData.cpp:
3342
(JSC::JSGlobalData::JSGlobalData):
3343
(JSC::JSGlobalData::numericCompareFunction):
3344
* runtime/JSGlobalData.h:
3346
2009-08-17 Mark Rowe <mrowe@apple.com>
3348
Reviewed by Darin Adler.
3350
Fix 300,000+ leaks seen during the regression tests.
3352
EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference.
3353
While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated.
3354
To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the
3355
refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get
3356
now uses CacheableEvalExecutable::create and avoids the leak.
3358
* bytecode/EvalCodeCache.h:
3359
(JSC::EvalCodeCache::get):
3360
* interpreter/Interpreter.cpp:
3361
(JSC::Interpreter::callEval):
3362
* runtime/Executable.h:
3363
(JSC::CacheableEvalExecutable::create):
3364
(JSC::CacheableEvalExecutable::CacheableEvalExecutable):
3366
2009-08-17 Oliver Hunt <oliver@apple.com>
3370
REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes
3371
https://bugs.webkit.org/show_bug.cgi?id=28341
3372
<rdar://problem/7145615>
3374
Reverting r47292. Alas Prototype.js breaks with Arguments inheriting
3375
from Array as ES5 attempted. Prototype.js defines $A in terms of a
3376
function it places on (among other global objects) the Array prototype,
3377
thus breaking $A for arrays.
3379
* runtime/Arguments.h:
3380
(JSC::Arguments::Arguments):
3381
* runtime/JSGlobalObject.cpp:
3382
(JSC::JSGlobalObject::reset):
3383
(JSC::JSGlobalObject::markChildren):
3384
* runtime/JSGlobalObject.h:
3385
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3386
* runtime/ObjectPrototype.cpp:
3387
(JSC::ObjectPrototype::ObjectPrototype):
3388
* runtime/ObjectPrototype.h:
3389
* tests/mozilla/ecma_3/Function/arguments-001.js:
3391
2009-08-17 Peter Kasting <pkasting@google.com>
3393
Reviewed by Steve Falkenburg.
3395
https://bugs.webkit.org/show_bug.cgi?id=27323
3396
Only add Cygwin to the path when it isn't already there. This avoids
3397
causing problems for people who purposefully have non-Cygwin versions of
3398
executables like svn in front of the Cygwin ones in their paths.
3400
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
3401
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3402
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
3403
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
3404
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
3406
2009-08-17 Xan Lopez <xlopez@igalia.com>
3408
Reviewed by Mark Rowe.
3410
Fix build with FAST_MALLOC_MATCH_VALIDATION enabled.
3412
* wtf/FastMalloc.cpp:
3417
2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org>
3419
Reviewed by Mark Rowe.
3421
Fix crash on ./ecma_2/RegExp/exec-002.js.
3422
https://bugs.webkit.org/show_bug.cgi?id=28353
3424
Change the order of freeParenthesesDisjunctionContext and
3425
popParenthesesDisjunctionContext on all call sites as the pop
3426
method is accessing backTrack->lastContext which is the context
3427
that is about to be freed.
3429
* yarr/RegexInterpreter.cpp:
3430
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
3431
(JSC::Yarr::Interpreter::backtrackParentheses):
3433
2009-08-16 Holger Hans Peter Freyther <zecke@selfish.org>
3435
Reviewed by Mark Rowe.
3437
https://bugs.webkit.org/show_bug.cgi?id=28352
3439
Fix coding style violations. Use m_ for C++ class members. Remove
3440
trailing whitespace on empty lines.
3442
* yarr/RegexInterpreter.cpp:
3443
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
3444
(JSC::Yarr::Interpreter::tryConsumeCharacter):
3445
(JSC::Yarr::Interpreter::tryConsumeBackReference):
3446
(JSC::Yarr::Interpreter::parenthesesDoBacktrack):
3447
(JSC::Yarr::Interpreter::backtrackParentheses):
3448
(JSC::Yarr::ByteCompiler::ByteCompiler):
3449
(JSC::Yarr::ByteCompiler::compile):
3450
(JSC::Yarr::ByteCompiler::checkInput):
3451
(JSC::Yarr::ByteCompiler::assertionBOL):
3452
(JSC::Yarr::ByteCompiler::assertionEOL):
3453
(JSC::Yarr::ByteCompiler::assertionWordBoundary):
3454
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
3455
(JSC::Yarr::ByteCompiler::atomCharacterClass):
3456
(JSC::Yarr::ByteCompiler::atomBackReference):
3457
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
3458
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
3459
(JSC::Yarr::ByteCompiler::popParenthesesStack):
3460
(JSC::Yarr::ByteCompiler::closeAlternative):
3461
(JSC::Yarr::ByteCompiler::closeBodyAlternative):
3462
(JSC::Yarr::ByteCompiler::atomParenthesesEnd):
3463
(JSC::Yarr::ByteCompiler::regexBegin):
3464
(JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction):
3465
(JSC::Yarr::ByteCompiler::alterantiveDisjunction):
3466
(JSC::Yarr::ByteCompiler::emitDisjunction):
3468
2009-08-15 Mark Rowe <mrowe@apple.com>
3470
Fix the build with JIT disabled.
3472
* runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled.
3473
* runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what
3474
NativeFunctionWrapper is when the JIT is disabled.
3476
2009-08-15 Adam Bergkvist <adam.bergkvist@ericsson.com>
3478
Reviewed by Sam Weinig.
3480
Added ENABLE_EVENTSOURCE flag.
3481
https://bugs.webkit.org/show_bug.cgi?id=14997
3483
* Configurations/FeatureDefines.xcconfig:
3485
2009-08-14 Gavin Barraclough <barraclough@apple.com>
3488
(JSC::EvalExecutable::parse):
3489
(JSC::ProgramExecutable::parse):
3490
* runtime/Executable.h:
3492
2009-08-14 Gavin Barraclough <barraclough@apple.com>
3494
Reviewed by Oliver Hunt.
3496
Remove AST nodes from use within the Runtime (outside of parsing), stage 1
3497
https://bugs.webkit.org/show_bug.cgi?id=28330
3499
Remove the EvalNode and ProgramNode from use in the runtime. They still exist
3500
after this patch, but are hidden behind EvalExecutable and FunctionExecutable,
3501
and are also still reachable behind CodeBlock::m_ownerNode.
3503
The next step will be to beat back FunctionBodyNode in the same fashion.
3504
Then remove the usage via CodeBlock, then only construct these nodes only on
3505
demand during bytecode generation.
3507
* JavaScriptCore.xcodeproj/project.pbxproj:
3508
* bytecode/CodeBlock.h:
3509
(JSC::GlobalCodeBlock::GlobalCodeBlock):
3510
(JSC::GlobalCodeBlock::~GlobalCodeBlock):
3511
(JSC::ProgramCodeBlock::ProgramCodeBlock):
3512
(JSC::EvalCodeBlock::EvalCodeBlock):
3513
(JSC::FunctionCodeBlock::FunctionCodeBlock):
3514
(JSC::NativeCodeBlock::NativeCodeBlock):
3515
* bytecode/EvalCodeCache.h:
3516
(JSC::EvalCodeCache::get):
3517
* debugger/Debugger.cpp:
3518
(JSC::evaluateInGlobalCallFrame):
3519
* debugger/DebuggerCallFrame.cpp:
3520
(JSC::DebuggerCallFrame::evaluate):
3521
* interpreter/Interpreter.cpp:
3522
(JSC::Interpreter::callEval):
3523
(JSC::Interpreter::execute):
3524
* interpreter/Interpreter.h:
3526
(JSC::FunctionBodyNode::createNativeThunk):
3527
(JSC::FunctionBodyNode::generateBytecode):
3528
(JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
3530
(JSC::Parser::parse):
3531
(JSC::Parser::reparse):
3532
(JSC::Parser::parseFunctionFromGlobalCode):
3534
* runtime/Completion.cpp:
3537
* runtime/Error.cpp:
3540
* runtime/Executable.h: Added.
3541
(JSC::TemplateExecutable::TemplateExecutable):
3542
(JSC::TemplateExecutable::markAggregate):
3543
(JSC::TemplateExecutable::sourceURL):
3544
(JSC::TemplateExecutable::lineNo):
3545
(JSC::TemplateExecutable::bytecode):
3546
(JSC::TemplateExecutable::jitCode):
3547
(JSC::EvalExecutable::EvalExecutable):
3548
(JSC::ProgramExecutable::ProgramExecutable):
3549
* runtime/FunctionConstructor.cpp:
3550
(JSC::constructFunction):
3551
* runtime/FunctionConstructor.h:
3552
* runtime/JSGlobalData.cpp:
3553
(JSC::JSGlobalData::numericCompareFunction):
3554
* runtime/JSGlobalObject.cpp:
3555
(JSC::JSGlobalObject::~JSGlobalObject):
3556
(JSC::JSGlobalObject::markChildren):
3557
* runtime/JSGlobalObject.h:
3558
(JSC::JSGlobalObject::codeBlocks):
3559
* runtime/JSGlobalObjectFunctions.cpp:
3560
(JSC::globalFuncEval):
3562
2009-08-14 Darin Adler <darin@apple.com>
3564
Reviewed by Sam Weinig.
3566
Rename the confusing isObject(<class>) to inherits(<class>).
3567
It still works on non-objects, returning false.
3569
* runtime/ArrayConstructor.cpp:
3570
(JSC::arrayConstructorIsArray): Removed unneeded isObject call
3571
and updated remaining isObject call to new name, inherits.
3573
* runtime/JSCell.h: Renamed isObject(<class>) to inherits(<class>)
3574
but more importantly, made it non-virtual (it was already inline)
3575
so it is now as fast as JSObject::inherits was.
3577
* runtime/JSObject.h: Removed inherits function since the one
3578
in the base class is fine as-is. Also made various JSCell functions
3579
that should not be called on JSObject uncallable by making them
3580
both private and not implemented.
3581
(JSC::JSCell::inherits): Updated name.
3582
(JSC::JSValue::inherits): Ditto.
3584
* debugger/Debugger.cpp:
3585
(JSC::Debugger::recompileAllJSFunctions):
3586
* interpreter/Interpreter.cpp:
3587
(JSC::Interpreter::unwindCallFrame):
3588
* runtime/ArrayPrototype.cpp:
3589
(JSC::arrayProtoFuncToString):
3590
(JSC::arrayProtoFuncToLocaleString):
3591
(JSC::arrayProtoFuncConcat):
3592
* runtime/BooleanPrototype.cpp:
3593
(JSC::booleanProtoFuncToString):
3594
(JSC::booleanProtoFuncValueOf):
3595
* runtime/DateConstructor.cpp:
3596
(JSC::constructDate):
3597
* runtime/DatePrototype.cpp:
3598
(JSC::dateProtoFuncToString):
3599
(JSC::dateProtoFuncToUTCString):
3600
(JSC::dateProtoFuncToISOString):
3601
(JSC::dateProtoFuncToDateString):
3602
(JSC::dateProtoFuncToTimeString):
3603
(JSC::dateProtoFuncToLocaleString):
3604
(JSC::dateProtoFuncToLocaleDateString):
3605
(JSC::dateProtoFuncToLocaleTimeString):
3606
(JSC::dateProtoFuncGetTime):
3607
(JSC::dateProtoFuncGetFullYear):
3608
(JSC::dateProtoFuncGetUTCFullYear):
3609
(JSC::dateProtoFuncToGMTString):
3610
(JSC::dateProtoFuncGetMonth):
3611
(JSC::dateProtoFuncGetUTCMonth):
3612
(JSC::dateProtoFuncGetDate):
3613
(JSC::dateProtoFuncGetUTCDate):
3614
(JSC::dateProtoFuncGetDay):
3615
(JSC::dateProtoFuncGetUTCDay):
3616
(JSC::dateProtoFuncGetHours):
3617
(JSC::dateProtoFuncGetUTCHours):
3618
(JSC::dateProtoFuncGetMinutes):
3619
(JSC::dateProtoFuncGetUTCMinutes):
3620
(JSC::dateProtoFuncGetSeconds):
3621
(JSC::dateProtoFuncGetUTCSeconds):
3622
(JSC::dateProtoFuncGetMilliSeconds):
3623
(JSC::dateProtoFuncGetUTCMilliseconds):
3624
(JSC::dateProtoFuncGetTimezoneOffset):
3625
(JSC::dateProtoFuncSetTime):
3626
(JSC::setNewValueFromTimeArgs):
3627
(JSC::setNewValueFromDateArgs):
3628
(JSC::dateProtoFuncSetYear):
3629
(JSC::dateProtoFuncGetYear):
3630
* runtime/FunctionPrototype.cpp:
3631
(JSC::functionProtoFuncToString):
3632
* runtime/JSActivation.cpp:
3633
(JSC::JSActivation::argumentsGetter):
3634
* runtime/JSValue.h:
3635
* runtime/RegExpConstructor.cpp:
3636
(JSC::constructRegExp):
3637
* runtime/RegExpPrototype.cpp:
3638
(JSC::regExpProtoFuncTest):
3639
(JSC::regExpProtoFuncExec):
3640
(JSC::regExpProtoFuncCompile):
3641
(JSC::regExpProtoFuncToString):
3642
* runtime/ScopeChain.cpp:
3643
(JSC::ScopeChain::localDepth):
3644
* runtime/StringPrototype.cpp:
3645
(JSC::stringProtoFuncReplace):
3646
(JSC::stringProtoFuncToString):
3647
(JSC::stringProtoFuncMatch):
3648
(JSC::stringProtoFuncSearch):
3649
(JSC::stringProtoFuncSplit):
3650
Updated to new name, inherits, from old name, isObject.
3652
2009-07-31 Harald Fernengel <harald.fernengel@nokia.com>
3654
Reviewed by Simon Hausmann.
3656
Adding QNX as a platform. Currently only tested with Qt.
3658
https://bugs.webkit.org/show_bug.cgi?id=27885
3660
* JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base
3661
since QNX doesn't have the pthread _nt functions
3662
* JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding
3664
* WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX
3666
2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
3668
Reviewed by Simon Hausmann.
3670
Currently generic ARM and ARMv7 platforms work only with JSVALUE32
3671
https://bugs.webkit.org/show_bug.cgi?id=28300
3675
2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
3677
Reviewed by Simon Hausmann.
3679
Enable JIT on ARM for QT by default
3680
https://bugs.webkit.org/show_bug.cgi?id=28259
3684
2009-08-14 Gabor Loki <loki@inf.u-szeged.hu>
3686
Reviewed by Simon Hausmann.
3688
Enable YARR_JIT on ARM for QT by default
3689
https://bugs.webkit.org/show_bug.cgi?id=28259
3693
2009-08-14 Oliver Hunt <oliver@apple.com>
3695
Reviewed by Gavin Barraclough.
3697
[ES5] Arguments object should inherit from Array
3698
https://bugs.webkit.org/show_bug.cgi?id=28298
3700
Make the Arguments object conform to the behaviour specified in ES5.
3701
The simple portion of this is to make Arguments use Array.prototype
3702
as its prototype rather than Object.prototype.
3704
The spec then requires us to set instance.constructor to the pristine
3705
Object constructor, and instance.toString and instance.toLocaleString
3706
to the pristine versions from Object.prototype. To do this we now
3707
make the ObjectPrototype constructor return its toString and
3708
toLocaleString functions (similar to the call and apply functions
3709
from FunctionPrototype).
3711
Oddly enough this reports itself as a slight win, but given the code
3712
isn't hit in the tests that claim to have improved I put this down to
3715
* runtime/Arguments.h:
3716
(JSC::Arguments::Arguments):
3717
(JSC::Arguments::initializeStandardProperties):
3718
* runtime/JSGlobalObject.cpp:
3719
(JSC::JSGlobalObject::reset):
3720
(JSC::JSGlobalObject::markChildren):
3721
* runtime/JSGlobalObject.h:
3722
(JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3723
(JSC::JSGlobalObject::objectConstructor):
3724
(JSC::JSGlobalObject::objectToStringFunction):
3725
(JSC::JSGlobalObject::objectToLocaleStringFunction):
3726
* runtime/ObjectPrototype.cpp:
3727
(JSC::ObjectPrototype::ObjectPrototype):
3728
* runtime/ObjectPrototype.h:
3729
* tests/mozilla/ecma_3/Function/arguments-001.js:
3730
Update test to new es5 behaviour
3732
2009-08-14 Oliver Hunt <oliver@apple.com>
3734
Remove MarkStack::drain from the JSC exports file
3736
MarkStack::drain is now marked inline, the including it in the exports file
3737
produces an ld warning
3739
* JavaScriptCore.exp:
3741
2009-08-13 Sam Weinig <sam@webkit.org>
3743
Reviewed by Oliver Hunt.
3745
Remove accidentally left in debugging statement.
3747
* runtime/JSArray.h:
3748
(JSC::MarkStack::drain):
3750
2009-08-13 Oliver Hunt <oliver@apple.com>
3752
Reviewed by Maciej Stachowiak.
3754
[ES5] Implement Array.isArray
3755
https://bugs.webkit.org/show_bug.cgi?id=28296
3757
Add support for Array.isArray to the Array constructor
3759
* runtime/ArrayConstructor.cpp:
3760
(JSC::ArrayConstructor::ArrayConstructor):
3761
(JSC::arrayConstructorIsArray):
3762
* runtime/ArrayConstructor.h:
3763
* runtime/CommonIdentifiers.h:
3764
* runtime/JSArray.h:
3765
(JSC::MarkStack::drain):
3766
* runtime/JSGlobalObject.cpp:
3767
(JSC::JSGlobalObject::reset):
3769
2009-08-13 Oliver Hunt <oliver@apple.com>
3771
Reviewed by NOBODY (Buildfix).
3773
Attempt to fix windows build
3775
* runtime/Collector.cpp:
3777
2009-08-13 Oliver Hunt <oliver@apple.com>
3779
Reviewed by Maciej Stachowiak.
3781
Devirtualise marking
3782
https://bugs.webkit.org/show_bug.cgi?id=28294
3784
Add a bit to TypeInfo to indicate that an object uses the standard
3785
JSObject::markChildren method. This allows us to devirtualise marking
3786
of most objects (though a branch is still needed). We also add a branch
3787
to identify arrays thus devirtualising marking in that case as well.
3789
In order to make the best use of this devirtualisation I've also reworked
3790
the MarkStack::drain() logic to make the iteration more efficient.
3792
* API/JSCallbackConstructor.h:
3793
(JSC::JSCallbackConstructor::createStructure):
3794
* API/JSCallbackFunction.h:
3795
(JSC::JSCallbackFunction::createStructure):
3796
* JavaScriptCore.exp:
3797
* runtime/BooleanObject.h:
3798
(JSC::BooleanObject::createStructure):
3799
* runtime/FunctionPrototype.h:
3800
(JSC::FunctionPrototype::createStructure):
3801
* runtime/InternalFunction.h:
3802
(JSC::InternalFunction::createStructure):
3803
* runtime/JSAPIValueWrapper.h:
3804
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3805
* runtime/JSArray.cpp:
3806
(JSC::JSArray::markChildren):
3807
* runtime/JSArray.h:
3808
(JSC::JSArray::markChildrenDirect):
3809
(JSC::MarkStack::drain):
3810
* runtime/JSByteArray.cpp:
3811
(JSC::JSByteArray::createStructure):
3813
(JSC::MarkStack::append):
3814
* runtime/JSGlobalData.cpp:
3815
(JSC::JSGlobalData::JSGlobalData):
3816
* runtime/JSNumberCell.h:
3817
(JSC::JSNumberCell::createStructure):
3818
* runtime/JSONObject.h:
3819
(JSC::JSONObject::createStructure):
3820
* runtime/JSObject.cpp:
3821
(JSC::JSObject::markChildren):
3822
* runtime/JSObject.h:
3823
(JSC::JSObject::markChildrenDirect):
3824
(JSC::JSObject::createStructure):
3825
* runtime/JSString.h:
3826
(JSC::JSString::createStructure):
3829
* runtime/MarkStack.h:
3830
(JSC::MarkStack::MarkStack):
3831
(JSC::MarkStack::MarkSet::MarkSet):
3832
(JSC::MarkStack::MarkStackArray::last):
3833
* runtime/MathObject.h:
3834
(JSC::MathObject::createStructure):
3835
* runtime/NumberConstructor.h:
3836
(JSC::NumberConstructor::createStructure):
3837
* runtime/NumberObject.h:
3838
(JSC::NumberObject::createStructure):
3839
* runtime/RegExpConstructor.h:
3840
(JSC::RegExpConstructor::createStructure):
3841
* runtime/RegExpObject.h:
3842
(JSC::RegExpObject::createStructure):
3843
* runtime/StringObjectThatMasqueradesAsUndefined.h:
3844
(JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3845
* runtime/TypeInfo.h:
3846
(JSC::TypeInfo::hasDefaultMark):
3848
2009-08-13 Darin Adler <darin@apple.com>
3850
Reviewed by Mark Rowe.
3852
Some small bits of housekeeping.
3854
* JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h
3855
project instead of private. Remove JSONObject.lut.h.
3857
* assembler/ARMAssembler.h: Remove unneeded WTF prefix.
3858
* assembler/AssemblerBufferWithConstantPool.h: Ditto.
3859
* bytecompiler/BytecodeGenerator.h: Ditto.
3861
* wtf/SegmentedVector.h: Add a "using" statement as we do
3862
with the other WTF headers.
3864
2009-08-13 Darin Adler <darin@apple.com>
3868
* parser/Grammar.y: Use a template function so we can compile
3869
setStatementLocation even if it comes before YYLTYPE is defined.
3871
2009-08-13 Darin Adler <darin@apple.com>
3873
Reviewed by George Staikos.
3875
Too much use of void* in Grammar.y
3876
https://bugs.webkit.org/show_bug.cgi?id=28287
3878
* parser/Grammar.y: Changed all the helper functions to
3879
take a JSGlobalData* instead of a void*. A couple formatting
3880
tweaks that I missed when breaking this into pieces.
3882
2009-08-13 Darin Adler <darin@apple.com>
3884
Reviewed by George Staikos.
3886
Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
3888
* parser/Grammar.y: Reduced and sorted includes. Tweaked comment
3889
format. Marked a few more functions inline.
3891
2009-08-13 Darin Adler <darin@apple.com>
3893
Reviewed by George Staikos.
3895
Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
3897
* parser/Grammar.y: Pass the number to the PropertyNode instead of
3898
first turning it into an Identifier.
3900
* parser/NodeConstructors.h:
3901
(JSC::PropertyNode::PropertyNode): Add an overload that takes a double
3902
so the code to convert to a string can be here instead of Grammar.y.
3903
* parser/Nodes.h: Ditto.
3905
2009-08-13 Darin Adler <darin@apple.com>
3907
Reviewed by George Staikos.
3909
Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
3911
* parser/Grammar.y: Eliminate the DBG macro.
3913
2009-08-13 Darin Adler <darin@apple.com>
3915
Reviewed by George Staikos.
3917
Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
3919
* parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro.
3921
2009-08-13 Darin Adler <darin@apple.com>
3923
Reviewed by George Staikos.
3925
George asked me to break the patch from
3926
https://bugs.webkit.org/show_bug.cgi?id=28287
3927
into smaller pieces and land it in stages.
3929
* parser/Grammar.y: Eliminate the LEXER macro.
3931
2009-08-13 Mark Rowe <mrowe@apple.com>
3933
Try some more to fix the Windows build.
3935
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
3936
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
3938
2009-08-13 Mark Rowe <mrowe@apple.com>
3940
Try and fix the Windows build.
3942
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
3943
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
3945
2009-08-13 Darin Adler <darin@apple.com>
3947
Reviewed by David Levin.
3949
JavaScriptCore tweaks to get ready for the parser arena
3950
https://bugs.webkit.org/show_bug.cgi?id=28243
3952
Eliminate dependencies on Nodes.h outside JavaScriptCore,
3953
and cut down on them inside JavaScriptCore.
3955
Change regular expression parsing to use identifiers as
3956
with other strings we parse.
3958
Fix a couple things that are needed to use const Identifier
3959
more, which will be part of the parser arena work.
3961
* JavaScriptCore.exp: Resorted and updated.
3963
* JavaScriptCore.xcodeproj/project.pbxproj: Changed
3964
CollectorHeapIterator.h to be project-internal.
3966
* bytecompiler/BytecodeGenerator.cpp:
3967
(JSC::BytecodeGenerator::emitPushNewScope): Added const.
3968
* bytecompiler/BytecodeGenerator.h: Ditto.
3970
* debugger/Debugger.cpp:
3971
(JSC::Debugger::recompileAllJSFunctions): Moved this function
3972
here from WebCore. Here is better since it uses so many internals.
3973
Removed unimportant optimization for the no listener case.
3974
* debugger/Debugger.h: Ditto. Also removed unneeded include
3975
and tweaked formatting and comments.
3977
* debugger/DebuggerCallFrame.cpp:
3978
(JSC::DebuggerCallFrame::functionName): Call asFunction instead
3979
of doing the unchecked static_cast.
3980
(JSC::DebuggerCallFrame::calculatedFunctionName): Ditto.
3983
(JSC::op_call_JSFunction): Call isHostFunction on the body rather
3984
than on the JSFunction.
3985
(JSC::vm_lazyLinkCall): Ditto.
3986
(JSC::op_construct_JSConstruct): Ditto.
3988
* parser/Grammar.y: Changed callers to use new scanRegExp with
3989
out arguments instead of relying on state in the Lexer. And
3990
callers that just want to skip a regular expression to use
3994
(JSC::Lexer::scanRegExp): Changed to use out arguments, and to
3995
add a prefix argument so we can add in the "=" character as needed.
3996
Also rewrote to streamline the logic a bit inspired by suggestions
3998
(JSC::Lexer::skipRegExp): Added. Version of the function above that
3999
does not actually put the regular expression into a string.
4000
(JSC::Lexer::clear): Removed code to clear m_pattern and m_flags.
4001
* parser/Lexer.h: Changed scanRegExp to have out arguments. Added
4002
skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags.
4004
* parser/NodeConstructors.h:
4005
(JSC::RegExpNode::RegExpNode): Changed to take const Identifier&.
4007
(JSC::RegExpNode::emitBytecode): Changed since m_pattern and
4008
m_flags are now Identifier instead of UString.
4009
(JSC::FunctionBodyNode::make): Moved this function here instead
4010
of putting it in the JSFunction.h header.
4011
* parser/Nodes.h: Changed RegExpNode to use Identifier.
4013
* profiler/Profiler.cpp:
4014
(JSC::Profiler::createCallIdentifier): Changed to use isHostFunction
4015
on the body instead of on the JSFunction object.
4016
* runtime/FunctionPrototype.cpp:
4017
(JSC::functionProtoFuncToString): Ditto.
4019
* runtime/JSFunction.cpp:
4020
(JSC::JSFunction::isHostFunction): Moved here from header.
4021
(JSC::JSFunction::isHostFunctionNonInline): Added.
4022
(JSC::JSFunction::JSFunction): Removed unneeded initialization of
4024
(JSC::JSFunction::setBody): Moved here from header.
4026
* runtime/JSFunction.h: Removed unneeded includes. Moved private
4027
constructor down to the private section. Made virtual functions
4028
private. Removed unneeded overload of setBody and moved the body
4029
of the function into the .cpp file. Changed assertions to use
4030
the non-inline version of isHostFunction.
4032
* runtime/PropertySlot.cpp:
4033
(JSC::PropertySlot::functionGetter): Use asFunction instead
4034
of doing the unchecked static_cast.
4036
* wtf/SegmentedVector.h:
4037
(WTF::SegmentedVector::isEmpty): Added.
4039
2009-08-13 Mark Rowe <mrowe@apple.com>
4041
Rubber-stamped by Darin Adler.
4043
Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode
4044
from within the grammar to prevent these nodes from being leaked.
4048
2009-08-13 Simon Hausmann <simon.hausmann@nokia.com>
4050
Reviewed by Ariya Hidayat.
4052
Remove the special-case for Qt wrt JSVALUE_32 introduced in
4053
r46709. It must've been a dependency issue on the bot, as
4054
after a manual build all the tests pass on amd64 and ia32.
4058
2009-08-12 Gabor Loki <loki@inf.u-szeged.hu>
4060
Reviewed by Gavin Barraclough.
4062
Add optimize call and property access support for ARM JIT.
4063
https://bugs.webkit.org/show_bug.cgi?id=24986
4065
For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and
4066
END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure
4067
space for instructions and constants of the named sequence. This
4068
method is vital for those architecture which are using constant pool.
4070
The 'latePatch' method - which was linked to JmpSrc - is replaced with
4071
a port specific solution (each calls are marked to place their address
4072
on the constant pool).
4074
* assembler/ARMAssembler.cpp:
4075
(JSC::ARMAssembler::linkBranch):
4076
(JSC::ARMAssembler::executableCopy): Add extra align for constant pool.
4077
* assembler/ARMAssembler.h:
4078
(JSC::ARMAssembler::JmpSrc::JmpSrc):
4079
(JSC::ARMAssembler::sizeOfConstantPool):
4080
(JSC::ARMAssembler::jmp):
4081
(JSC::ARMAssembler::linkCall):
4082
* assembler/ARMv7Assembler.h:
4083
* assembler/AbstractMacroAssembler.h:
4084
* assembler/AssemblerBufferWithConstantPool.h:
4085
(JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the
4086
computation of the remaining space.
4087
* assembler/MacroAssemblerARM.h:
4088
(JSC::MacroAssemblerARM::branch32):
4089
(JSC::MacroAssemblerARM::nearCall):
4090
(JSC::MacroAssemblerARM::call):
4091
(JSC::MacroAssemblerARM::branchPtrWithPatch):
4092
(JSC::MacroAssemblerARM::ensureSpace):
4093
(JSC::MacroAssemblerARM::sizeOfConstantPool):
4094
(JSC::MacroAssemblerARM::prepareCall):
4095
* assembler/X86Assembler.h:
4098
(JSC::JIT::compileOpCall):
4099
* jit/JITInlineMethods.h:
4100
(JSC::JIT::beginUninterruptedSequence):
4101
(JSC::JIT::endUninterruptedSequence):
4102
* jit/JITPropertyAccess.cpp:
4103
(JSC::JIT::emit_op_method_check):
4104
(JSC::JIT::compileGetByIdHotPath):
4105
(JSC::JIT::compileGetByIdSlowCase):
4106
(JSC::JIT::emit_op_put_by_id):
4108
2009-08-12 Gavin Barraclough <barraclough@apple.com>
4110
Rubber Stamped by Dave Kilzer.
4112
Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7).
4116
2009-08-12 Gavin Barraclough <barraclough@apple.com>
4118
Reviewed by Maciej Stachoviak.
4120
Ooops - moved code that had been accidentally added to op_new_func instead of
4121
op_new_func_exp, to where it shoulds be.
4123
* interpreter/Interpreter.cpp:
4124
(JSC::Interpreter::privateExecute):
4127
2009-08-12 Ada Chan <adachan@apple.com>
4129
Added workaround for the limitation that VirtualFree with MEM_RELEASE
4130
can only accept the base address returned by VirtualAlloc when the region
4131
was reserved and it can only free the entire region, and not a part of it.
4133
Reviewed by Oliver Hunt.
4135
* runtime/MarkStack.h:
4136
(JSC::MarkStack::MarkStackArray::shrinkAllocation):
4137
* runtime/MarkStackWin.cpp:
4138
(JSC::MarkStack::releaseStack):
4140
2009-08-12 Balazs Kelemen <kelemen.balazs.3@stud.u-szeged.hu>
4142
Reviewed by Ariya Hidayat.
4144
Build fix: use std::numeric_limits<long long>::min() instead of LLONG_MIN
4145
since LLONG_MIN is not defined in standard c++.
4147
* runtime/UString.cpp:
4148
(JSC::UString::from):
4150
2009-08-12 Benjamin Otte <otte@gnome.org>
4152
Reviewed by Jan Alonzo.
4154
Buildfix for Gtk platforms debug builds.
4156
* GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp
4157
depending on platform.
4159
2009-08-12 Simon Hausmann <simon.hausmann@nokia.com>
4161
Prospective build fix for Mac and 32-bit Windows.
4163
* runtime/UString.cpp: Include wtf/StringExtras.h for snprintf.
4164
(JSC::UString::from): Use %lld instead of %I64d for snprintf
4165
on non-windows platforms.
4167
2009-08-12 Prasanth Ullattil <prasanth.ullattil@nokia.com>
4169
Reviewed by Simon Hausmann.
4171
Fix compile error on 64Bit Windows, when UString::from
4172
is called with an intptr_t.
4174
Added new UString::From overload with long long parameter.
4176
Thanks to Holger for the long long idea.
4178
* runtime/UString.cpp:
4179
(JSC::UString::from):
4180
* runtime/UString.h:
4182
2009-08-11 Oliver Hunt <oliver@apple.com>
4184
Reviewed by Mark Rowe.
4188
* runtime/UString.h:
4189
(JSC::UString::Rep::createEmptyBuffer):
4191
(WTF::TryMallocReturnValue::getValue):
4193
2009-08-11 Oliver Hunt <oliver@apple.com>
4195
Reviewed by Gavin Barraclough.
4197
Make it harder to misuse try* allocation routines
4198
https://bugs.webkit.org/show_bug.cgi?id=27469
4200
Jump through a few hoops to make it much harder to accidentally
4201
miss null-checking of values returned by the try-* allocation
4204
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4205
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4206
* JavaScriptCore.xcodeproj/project.pbxproj:
4207
* runtime/JSArray.cpp:
4208
(JSC::JSArray::putSlowCase):
4209
(JSC::JSArray::increaseVectorLength):
4210
* runtime/StringPrototype.cpp:
4211
(JSC::stringProtoFuncFontsize):
4212
(JSC::stringProtoFuncLink):
4213
* runtime/UString.cpp:
4215
(JSC::reallocChars):
4216
(JSC::expandCapacity):
4217
(JSC::UString::Rep::reserveCapacity):
4218
(JSC::UString::expandPreCapacity):
4221
(JSC::UString::spliceSubstringsWithSeparators):
4222
(JSC::UString::replaceRange):
4223
(JSC::UString::append):
4224
(JSC::UString::operator=):
4225
* runtime/UString.h:
4226
(JSC::UString::Rep::createEmptyBuffer):
4227
* wtf/FastMalloc.cpp:
4228
(WTF::tryFastZeroedMalloc):
4229
(WTF::tryFastMalloc):
4230
(WTF::tryFastCalloc):
4231
(WTF::tryFastRealloc):
4232
(WTF::TCMallocStats::tryFastMalloc):
4233
(WTF::TCMallocStats::tryFastCalloc):
4234
(WTF::TCMallocStats::tryFastRealloc):
4236
(WTF::TryMallocReturnValue::TryMallocReturnValue):
4237
(WTF::TryMallocReturnValue::~TryMallocReturnValue):
4238
(WTF::TryMallocReturnValue::operator PossiblyNull<T>):
4239
(WTF::TryMallocReturnValue::getValue):
4241
* wtf/PossiblyNull.h: Added.
4242
(WTF::PossiblyNull::PossiblyNull):
4243
(WTF::PossiblyNull::~PossiblyNull):
4246
2009-08-11 Gavin Barraclough <barraclough@apple.com>
4248
Reviewed by NOBODY (build fix part deux).
4250
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4251
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4253
2009-08-11 Gavin Barraclough <barraclough@apple.com>
4255
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4256
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4258
2009-08-11 Gavin Barraclough <barraclough@apple.com>
4260
Reviewed by Oliver Hunt.
4262
Restrict use of FuncDeclNode & FuncExprNode to the parser.
4263
https://bugs.webkit.org/show_bug.cgi?id=28209
4265
These objects were also being referenced from the CodeBlock. By changing this
4266
to just retain pointers to FunctionBodyNodes these classes can be restricted to
4269
No performance impact (or sub-percent progression).
4271
* JavaScriptCore.exp:
4274
* bytecode/CodeBlock.cpp:
4275
(JSC::CodeBlock::mark):
4276
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
4277
(JSC::CodeBlock::shrinkToFit):
4278
* bytecode/CodeBlock.h:
4279
(JSC::CodeBlock::addFunction):
4280
(JSC::CodeBlock::function):
4281
Unify m_functions & m_functionExpressions into a single Vector<RefPtr<FuncExprNode> >.
4283
* bytecompiler/BytecodeGenerator.cpp:
4284
(JSC::BytecodeGenerator::BytecodeGenerator):
4285
(JSC::BytecodeGenerator::addConstant):
4286
(JSC::BytecodeGenerator::emitNewFunction):
4287
(JSC::BytecodeGenerator::emitNewFunctionExpression):
4288
* bytecompiler/BytecodeGenerator.h:
4289
FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
4291
* interpreter/Interpreter.cpp:
4292
(JSC::Interpreter::execute):
4293
(JSC::Interpreter::privateExecute):
4294
Update to reflect chnages in CodeBlock.
4296
* jit/JITOpcodes.cpp:
4297
(JSC::JIT::emit_op_new_func_exp):
4299
(JSC::DEFINE_STUB_FUNCTION):
4302
Update to reflect chnages in CodeBlock.
4305
FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
4307
* parser/NodeConstructors.h:
4308
(JSC::FuncExprNode::FuncExprNode):
4309
(JSC::FuncDeclNode::FuncDeclNode):
4311
(JSC::ScopeNodeData::mark):
4312
(JSC::FunctionBodyNode::finishParsing):
4314
(JSC::FunctionBodyNode::ident):
4315
Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode.
4317
* runtime/JSFunction.h:
4318
(JSC::FunctionBodyNode::make):
4319
Make this method inline (was FuncDeclNode::makeFunction).
4321
2009-08-11 Oliver Hunt <oliver@apple.com>
4323
Reviewed by Gavin Barraclough.
4325
Native JSON.stringify does not omit functions
4326
https://bugs.webkit.org/show_bug.cgi?id=28117
4328
Objects that are callable should be treated as undefined when
4329
serialising to JSON.
4331
* runtime/JSONObject.cpp:
4332
(JSC::Stringifier::appendStringifiedValue):
4334
2009-08-11 Oliver Hunt <oliver@apple.com>
4336
Reviewed by Geoff Garen.
4338
REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page
4339
https://bugs.webkit.org/show_bug.cgi?id=28169
4341
Handle the case where someone has attempted to shadow a property
4342
on the global object with a constant.
4344
* bytecompiler/BytecodeGenerator.cpp:
4345
(JSC::BytecodeGenerator::constRegisterFor):
4347
(JSC::ConstDeclNode::emitCodeSingle):
4349
2009-08-11 John Gregg <johnnyg@google.com>
4351
Reviewed by Maciej Stachowiak.
4353
Desktop Notifications API
4354
https://bugs.webkit.org/show_bug.cgi?id=25463
4356
Adds ENABLE_NOTIFICATION flag.
4358
* Configurations/FeatureDefines.xcconfig:
4361
2009-08-11 Maxime Simon <simon.maxime@gmail.com>
4363
Reviewed by Eric Seidel.
4365
Modifications on JavaScriptCore to allow Haiku port.
4366
https://bugs.webkit.org/show_bug.cgi?id=28121
4368
* runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead.
4369
(JSC::currentThreadStackBase): Haiku uses its own threading system.
4370
* wtf/Platform.h: Defining all Haiku platform values.
4371
* wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h).
4373
2009-08-11 Jessie Berlin <jberlin@apple.com>
4375
Reviewed by Adam Roben.
4379
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4381
2009-08-11 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
4383
Reviewed by Tor Arne VestbĆø.
4385
Buildfix for Qt-win platforms.
4387
* JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform.
4389
2009-08-10 Oliver Hunt <oliver@apple.com>
4391
Reviewed by NOBODY (And another build fix).
4393
Add new exports for MSVC
4395
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4396
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4397
* JavaScriptCore.xcodeproj/project.pbxproj:
4399
2009-08-10 Oliver Hunt <oliver@apple.com>
4401
Reviewed by NOBODY (yet another build fix).
4403
Remove obsolete entries from MSVC exports file
4405
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4406
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
4408
2009-08-10 Oliver Hunt <oliver@apple.com>
4410
Add includes needed for non-allinonefile builds
4412
* runtime/GetterSetter.h:
4413
* runtime/ScopeChain.h:
4415
2009-08-10 Oliver Hunt <oliver@apple.com>
4417
Fix export file for last build fix
4419
* JavaScriptCore.exp:
4421
2009-08-10 Oliver Hunt <oliver@apple.com>
4423
Hoist page size initialization into platform specific code.
4425
* jit/ExecutableAllocatorPosix.cpp:
4426
* jit/ExecutableAllocatorWin.cpp:
4427
* runtime/MarkStack.h:
4428
(JSC::MarkStack::pageSize):
4429
* runtime/MarkStackPosix.cpp:
4430
(JSC::MarkStack::initializePagesize):
4431
* runtime/MarkStackWin.cpp:
4432
(JSC::MarkStack::initializePagesize):
4434
2009-08-07 Oliver Hunt <oliver@apple.com>
4436
Reviewed by Gavin Barraclough.
4438
Stack overflow crash in JavaScript garbage collector mark pass
4439
https://bugs.webkit.org/show_bug.cgi?id=12216
4441
Make the GC mark phase iterative by using an explicit mark stack.
4442
To do this marking any single object is performed in multiple stages
4443
* The object is appended to the MarkStack, this sets the marked
4444
bit for the object using the new markDirect() function, and then
4446
* When the MarkStack is drain()ed the object is popped off the stack
4447
and markChildren(MarkStack&) is called on the object to collect
4448
all of its children. drain() then repeats until the stack is empty.
4450
Additionally I renamed a number of methods from 'mark' to 'markAggregate'
4451
in order to make it more clear that marking of those object was not
4452
going to result in an actual recursive mark.
4455
* JavaScriptCore.exp:
4456
* JavaScriptCore.gypi:
4457
* JavaScriptCore.pri:
4458
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4459
* JavaScriptCore.xcodeproj/project.pbxproj:
4460
* bytecode/CodeBlock.cpp:
4461
(JSC::CodeBlock::markAggregate):
4462
* bytecode/CodeBlock.h:
4463
* bytecode/EvalCodeCache.h:
4464
(JSC::EvalCodeCache::markAggregate):
4465
* debugger/DebuggerActivation.cpp:
4466
(JSC::DebuggerActivation::markChildren):
4467
* debugger/DebuggerActivation.h:
4468
* interpreter/Register.h:
4469
* interpreter/RegisterFile.h:
4470
(JSC::RegisterFile::markGlobals):
4471
(JSC::RegisterFile::markCallFrames):
4473
(JSC::ScopeNodeData::markAggregate):
4474
(JSC::EvalNode::markAggregate):
4475
(JSC::FunctionBodyNode::markAggregate):
4477
(JSC::ScopeNode::markAggregate):
4478
* runtime/ArgList.cpp:
4479
(JSC::MarkedArgumentBuffer::markLists):
4480
* runtime/ArgList.h:
4481
* runtime/Arguments.cpp:
4482
(JSC::Arguments::markChildren):
4483
* runtime/Arguments.h:
4484
* runtime/Collector.cpp:
4485
(JSC::Heap::markConservatively):
4486
(JSC::Heap::markCurrentThreadConservativelyInternal):
4487
(JSC::Heap::markCurrentThreadConservatively):
4488
(JSC::Heap::markOtherThreadConservatively):
4489
(JSC::Heap::markStackObjectsConservatively):
4490
(JSC::Heap::markProtectedObjects):
4491
(JSC::Heap::collect):
4492
* runtime/Collector.h:
4493
* runtime/GetterSetter.cpp:
4494
(JSC::GetterSetter::markChildren):
4495
* runtime/GetterSetter.h:
4496
(JSC::GetterSetter::GetterSetter):
4497
(JSC::GetterSetter::createStructure):
4498
* runtime/GlobalEvalFunction.cpp:
4499
(JSC::GlobalEvalFunction::markChildren):
4500
* runtime/GlobalEvalFunction.h:
4501
* runtime/JSActivation.cpp:
4502
(JSC::JSActivation::markChildren):
4503
* runtime/JSActivation.h:
4504
* runtime/JSArray.cpp:
4505
(JSC::JSArray::markChildren):
4506
* runtime/JSArray.h:
4508
(JSC::JSCell::markCellDirect):
4509
(JSC::JSCell::markChildren):
4510
(JSC::JSValue::markDirect):
4511
(JSC::JSValue::markChildren):
4512
(JSC::JSValue::hasChildren):
4513
(JSC::MarkStack::append):
4514
(JSC::MarkStack::drain):
4515
* runtime/JSFunction.cpp:
4516
(JSC::JSFunction::markChildren):
4517
* runtime/JSFunction.h:
4518
* runtime/JSGlobalData.cpp:
4519
(JSC::JSGlobalData::JSGlobalData):
4520
* runtime/JSGlobalData.h:
4521
* runtime/JSGlobalObject.cpp:
4522
(JSC::markIfNeeded):
4523
(JSC::JSGlobalObject::markChildren):
4524
* runtime/JSGlobalObject.h:
4525
* runtime/JSNotAnObject.cpp:
4526
(JSC::JSNotAnObject::markChildren):
4527
* runtime/JSNotAnObject.h:
4528
* runtime/JSONObject.cpp:
4529
(JSC::Stringifier::markAggregate):
4530
(JSC::JSONObject::markStringifiers):
4531
* runtime/JSONObject.h:
4532
* runtime/JSObject.cpp:
4533
(JSC::JSObject::markChildren):
4534
(JSC::JSObject::defineGetter):
4535
(JSC::JSObject::defineSetter):
4536
* runtime/JSObject.h:
4537
* runtime/JSPropertyNameIterator.cpp:
4538
(JSC::JSPropertyNameIterator::markChildren):
4539
* runtime/JSPropertyNameIterator.h:
4540
(JSC::JSPropertyNameIterator::createStructure):
4541
(JSC::JSPropertyNameIterator::JSPropertyNameIterator):
4542
(JSC::JSPropertyNameIterator::create):
4543
* runtime/JSStaticScopeObject.cpp:
4544
(JSC::JSStaticScopeObject::markChildren):
4545
* runtime/JSStaticScopeObject.h:
4548
* runtime/JSValue.h:
4549
* runtime/JSWrapperObject.cpp:
4550
(JSC::JSWrapperObject::markChildren):
4551
* runtime/JSWrapperObject.h:
4552
* runtime/MarkStack.cpp: Added.
4553
(JSC::MarkStack::compact):
4554
* runtime/MarkStack.h: Added.
4556
(JSC::MarkStack::MarkStack):
4557
(JSC::MarkStack::append):
4558
(JSC::MarkStack::appendValues):
4559
(JSC::MarkStack::~MarkStack):
4560
(JSC::MarkStack::MarkSet::MarkSet):
4561
(JSC::MarkStack::pageSize):
4563
MarkStackArray is a non-shrinking, mmap-based vector type
4564
used for storing objects to be marked.
4565
(JSC::MarkStack::MarkStackArray::MarkStackArray):
4566
(JSC::MarkStack::MarkStackArray::~MarkStackArray):
4567
(JSC::MarkStack::MarkStackArray::expand):
4568
(JSC::MarkStack::MarkStackArray::append):
4569
(JSC::MarkStack::MarkStackArray::removeLast):
4570
(JSC::MarkStack::MarkStackArray::isEmpty):
4571
(JSC::MarkStack::MarkStackArray::size):
4572
(JSC::MarkStack::MarkStackArray::shrinkAllocation):
4573
* runtime/MarkStackPosix.cpp: Added.
4574
(JSC::MarkStack::allocateStack):
4575
(JSC::MarkStack::releaseStack):
4576
* runtime/MarkStackWin.cpp: Added.
4577
(JSC::MarkStack::allocateStack):
4578
(JSC::MarkStack::releaseStack):
4580
* runtime/ScopeChain.h:
4581
* runtime/ScopeChainMark.h:
4582
(JSC::ScopeChain::markAggregate):
4583
* runtime/SmallStrings.cpp:
4584
(JSC::SmallStrings::mark):
4585
* runtime/Structure.h:
4586
(JSC::Structure::markAggregate):
4588
2009-08-10 Mark Rowe <mrowe@apple.com>
4590
Reviewed by Darin Adler.
4592
Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot.
4594
* wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since
4595
we implement the nothrow variants of new and new[]. The nothrow variant of delete is called
4596
explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated
4597
memory being passed to the system allocator to free.
4599
2009-08-10 Jan Michael Alonzo <jmalonzo@webkit.org>
4601
[Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug
4602
section. This file is already part of AllInOneFile in Release builds.
4606
2009-08-10 Darin Adler <darin@apple.com>
4608
* wtf/FastMalloc.h: Fix build.
4610
2009-08-10 Darin Adler <darin@apple.com>
4612
Reviewed by Mark Rowe.
4614
FastMalloc.h has cross-platform code but marked as WinCE-only
4615
https://bugs.webkit.org/show_bug.cgi?id=28160
4617
1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is
4618
not platform-specific.
4619
2) The code tried to override operator delete nothrow, which does not exist.
4620
3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code
4621
in FastMalloc.cpp checks only if the macro is defined.
4623
* wtf/FastMalloc.h: See above.
4624
* wtf/FastMalloc.cpp: Ditto.
4626
2009-08-10 Sam Weinig <sam@webkit.org>
4628
Reviewed by Anders Carlsson.
4630
Fix an annoying indentation issue.
4632
* runtime/DateConstructor.cpp:
4633
(JSC::constructDate):
4635
2009-08-10 Xan Lopez <xlopez@igalia.com>
4637
Unreviewed build fix.
4639
Add new files to makefile.
4643
2009-08-10 Simon Hausmann <simon.hausmann@nokia.com>
4645
Fix compilation with the interpreter instead of the JIT by including
4646
PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h.
4648
* runtime/ObjectConstructor.cpp:
4650
2009-08-09 Oliver Hunt <oliver@apple.com>
4652
Reviewed by George Staikos.
4654
JSON.stringify replacer returning undefined does not omit object properties
4655
https://bugs.webkit.org/show_bug.cgi?id=28118
4657
Correct behaviour of stringify when using a replacer function that returns
4658
undefined. This is a simple change to move the undefined value check to
4659
after the replacer function is called. This means that the replacer function
4660
is now called for properties with the value undefined, however i've confirmed
4661
that this behaviour is correct.
4663
In addition I've made the cyclic object exception have a more useful error
4666
* runtime/JSONObject.cpp:
4667
(JSC::Stringifier::appendStringifiedValue):
4669
2009-08-08 Oliver Hunt <oliver@apple.com>
4671
Reviewed by Eric Seidel and Sam Weinig.
4673
[ES5] Implement Object.getPrototypeOf
4674
https://bugs.webkit.org/show_bug.cgi?id=28114
4676
Implement getPrototypeOf
4678
* runtime/CommonIdentifiers.h:
4679
* runtime/JSGlobalObject.cpp:
4680
(JSC::JSGlobalObject::reset):
4681
* runtime/ObjectConstructor.cpp:
4682
(JSC::ObjectConstructor::ObjectConstructor):
4683
(JSC::objectConsGetPrototypeOf):
4684
* runtime/ObjectConstructor.h:
4686
2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4688
Reviewed by Eric Seidel.
4690
Allow custom memory allocation control for Noncopyable class
4691
https://bugs.webkit.org/show_bug.cgi?id=27879
4693
Several classes which are inherited from Noncopyable are instantiated by
4694
operator new, so Noncopyable class has been inherited from FastAllocBase.
4696
* wtf/Noncopyable.h:
4698
2009-08-07 George Staikos <george.staikos@torchmobile.com>
4700
Reviewed by Eric Seidel.
4702
https://bugs.webkit.org/show_bug.cgi?id=27305
4703
Implement WinCE-specific unicode layer.
4704
Written by George Staikos <george.staikos@torchmobile.com>
4705
with bug fixes by Yong Li <yong.li@torchmobile.com>
4706
refactored by Joe Mason <joe.mason@torchmobile.com>
4709
* wtf/unicode/Unicode.h:
4710
* wtf/unicode/wince/UnicodeWince.cpp: Added.
4711
(WTF::Unicode::toLower):
4712
(WTF::Unicode::toUpper):
4713
(WTF::Unicode::foldCase):
4714
(WTF::Unicode::isPrintableChar):
4715
(WTF::Unicode::isSpace):
4716
(WTF::Unicode::isLetter):
4717
(WTF::Unicode::isUpper):
4718
(WTF::Unicode::isLower):
4719
(WTF::Unicode::isDigit):
4720
(WTF::Unicode::isPunct):
4721
(WTF::Unicode::toTitleCase):
4722
(WTF::Unicode::direction):
4723
(WTF::Unicode::category):
4724
(WTF::Unicode::decompositionType):
4725
(WTF::Unicode::combiningClass):
4726
(WTF::Unicode::mirroredChar):
4727
(WTF::Unicode::digitValue):
4728
* wtf/unicode/wince/UnicodeWince.h: Added.
4730
(WTF::Unicode::isSeparatorSpace):
4731
(WTF::Unicode::isHighSurrogate):
4732
(WTF::Unicode::isLowSurrogate):
4733
(WTF::Unicode::isArabicChar):
4734
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
4735
(WTF::Unicode::umemcasecmp):
4736
(WTF::Unicode::surrogateToUcs4):
4738
2009-08-07 Yongjun Zhang <yongjun.zhang@nokia.com>
4740
Reviewed by Eric Seidel.
4742
https://bugs.webkit.org/show_bug.cgi?id=28069
4744
Add inline to help winscw compiler resolve specialized argument in
4745
templated functions.
4747
* runtime/LiteralParser.cpp:
4748
(JSC::LiteralParser::Lexer::lexString):
4750
2009-08-07 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4752
Reviewed by Eric Seidel.
4754
Allow custom memory allocation control for RegExpObjectData struct
4755
http://bugs.webkit.org/show_bug.cgi?id=26750
4757
Inherits RegExpObjectData struct from FastAllocBase because
4758
it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62
4760
* runtime/RegExpObject.h:
4762
2009-08-06 Norbert Leser <norbert.leser@nokia.com>
4764
Reviewed by Darin Adler.
4766
Updated patch for bug #27059:
4767
Symbian platform always uses little endian encoding,
4768
regardless of compiler.
4769
We need to make sure that we correctly detect EABI architecture
4770
for armv5 targets on Symbian,
4771
where __EABI__ is set but not __ARM_EABI__
4775
2009-08-06 Adam Barth <abarth@webkit.org>
4779
http://bugs.webkit.org/show_bug.cgi?id=27879
4781
Revert 46877 because it broke GTK.
4783
* wtf/Noncopyable.h:
4785
2009-08-06 Gavin Barraclough <barraclough@apple.com>
4787
Reviewed by Oliver Hunt.
4789
Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
4790
( https://bugs.webkit.org/show_bug.cgi?id=27635 )
4792
This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
4793
(No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
4795
* bytecode/CodeBlock.cpp:
4796
(JSC::printStructureStubInfo):
4797
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
4799
* bytecode/CodeBlock.h:
4801
(JSC::CallLinkInfo::seenOnce):
4802
(JSC::CallLinkInfo::setSeen):
4803
(JSC::MethodCallLinkInfo::seenOnce):
4804
(JSC::MethodCallLinkInfo::setSeen):
4805
- Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
4807
* bytecode/StructureStubInfo.cpp:
4808
(JSC::StructureStubInfo::deref):
4809
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
4811
* bytecode/StructureStubInfo.h:
4812
(JSC::StructureStubInfo::StructureStubInfo):
4813
(JSC::StructureStubInfo::initGetByIdSelf):
4814
(JSC::StructureStubInfo::initGetByIdProto):
4815
(JSC::StructureStubInfo::initGetByIdChain):
4816
(JSC::StructureStubInfo::initGetByIdSelfList):
4817
(JSC::StructureStubInfo::initGetByIdProtoList):
4818
(JSC::StructureStubInfo::initPutByIdTransition):
4819
(JSC::StructureStubInfo::initPutByIdReplace):
4820
(JSC::StructureStubInfo::seenOnce):
4821
(JSC::StructureStubInfo::setSeen):
4822
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
4824
* bytecompiler/BytecodeGenerator.cpp:
4825
(JSC::BytecodeGenerator::emitGetById):
4826
(JSC::BytecodeGenerator::emitPutById):
4827
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
4830
(JSC::JIT::privateCompileCTIMachineTrampolines):
4831
(JSC::JIT::unlinkCall):
4832
- Remove the "don't lazy link" stage of calls.
4835
(JSC::JIT::compileCTIMachineTrampolines):
4836
- Remove the "don't lazy link" stage of calls.
4839
(JSC::JIT::compileOpCallSlowCase):
4840
- Remove the "don't lazy link" stage of calls.
4843
(JSC::JITThunks::JITThunks):
4844
(JSC::JITThunks::tryCachePutByID):
4845
(JSC::JITThunks::tryCacheGetByID):
4846
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
4847
(JSC::JITStubs::getPolymorphicAccessStructureListSlot):
4848
- Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
4851
(JSC::JITThunks::ctiStringLengthTrampoline):
4853
- Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
4855
* wtf/PtrAndFlags.h:
4856
(WTF::PtrAndFlags::PtrAndFlags):
4857
(WTF::PtrAndFlags::operator!):
4858
(WTF::PtrAndFlags::operator->):
4859
- Add ! and -> operators, add constuctor with pointer argument.
4861
2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4863
Reviewed by Adam Barth.
4865
Allow custom memory allocation control for Noncopyable class
4866
https://bugs.webkit.org/show_bug.cgi?id=27879
4868
Several classes which inherited from Noncopyable are instantiated by
4869
operator new, so Noncopyable class has been inherited from FastAllocBase.
4871
* wtf/Noncopyable.h:
4873
2009-08-06 Mark Rowe <mrowe@apple.com>
4875
Rubber-stamped by Sam Weinig.
4877
Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
4879
* JavaScriptCore.xcodeproj/project.pbxproj:
4881
2009-08-06 Mark Rowe <mrowe@apple.com>
4883
Bring a little order to our otherwise out of control lives.
4885
* JavaScriptCore.xcodeproj/project.pbxproj:
4887
2009-08-06 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4889
Reviewed by Darin Adler.
4891
Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct
4892
https://bugs.webkit.org/show_bug.cgi?id=27877
4894
Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by
4895
'new' in JavaScriptCore/jit/JITStubs.cpp:1229.
4897
* bytecode/Instruction.h:
4899
2009-08-05 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
4901
Reviewed by Darin Adler.
4903
Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct
4904
https://bugs.webkit.org/show_bug.cgi?id=27875
4906
Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by
4907
'new' in JavaScriptCore/parser/Nodes.cpp:1848.
4911
2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4913
Reviewed by Gavin Barraclough.
4915
Add floating point support for generic ARM port.
4916
https://bugs.webkit.org/show_bug.cgi?id=24986
4918
* assembler/ARMAssembler.cpp:
4919
(JSC::ARMAssembler::doubleTransfer):
4920
* assembler/ARMAssembler.h:
4922
(JSC::ARMAssembler::):
4923
(JSC::ARMAssembler::faddd_r):
4924
(JSC::ARMAssembler::fsubd_r):
4925
(JSC::ARMAssembler::fmuld_r):
4926
(JSC::ARMAssembler::fcmpd_r):
4927
(JSC::ARMAssembler::fdtr_u):
4928
(JSC::ARMAssembler::fdtr_d):
4929
(JSC::ARMAssembler::fmsr_r):
4930
(JSC::ARMAssembler::fsitod_r):
4931
(JSC::ARMAssembler::fmstat):
4932
* assembler/MacroAssemblerARM.h:
4933
(JSC::MacroAssemblerARM::):
4934
(JSC::MacroAssemblerARM::supportsFloatingPoint):
4935
(JSC::MacroAssemblerARM::loadDouble):
4936
(JSC::MacroAssemblerARM::storeDouble):
4937
(JSC::MacroAssemblerARM::addDouble):
4938
(JSC::MacroAssemblerARM::subDouble):
4939
(JSC::MacroAssemblerARM::mulDouble):
4940
(JSC::MacroAssemblerARM::convertInt32ToDouble):
4941
(JSC::MacroAssemblerARM::branchDouble):
4944
2009-08-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4946
Reviewed by Gavin Barraclough.
4948
Add JIT support for generic ARM port without optimizations.
4949
https://bugs.webkit.org/show_bug.cgi?id=24986
4951
All JIT optimizations are disabled.
4953
Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
4954
Signed off by Gabor Loki <loki@inf.u-szeged.hu>
4956
* assembler/ARMAssembler.cpp:
4957
(JSC::ARMAssembler::baseIndexTransfer32):
4958
* assembler/AbstractMacroAssembler.h:
4959
(JSC::AbstractMacroAssembler::Imm32::Imm32):
4960
* assembler/MacroAssemblerARM.h:
4961
(JSC::MacroAssemblerARM::store32):
4962
(JSC::MacroAssemblerARM::move):
4963
(JSC::MacroAssemblerARM::branch32):
4964
(JSC::MacroAssemblerARM::add32):
4965
(JSC::MacroAssemblerARM::sub32):
4966
(JSC::MacroAssemblerARM::load32):
4967
* bytecode/CodeBlock.h:
4968
(JSC::CodeBlock::getBytecodeIndex):
4970
* jit/JITInlineMethods.h:
4971
(JSC::JIT::restoreArgumentReference):
4972
* jit/JITOpcodes.cpp:
4975
(JSC::JITStackFrame::returnAddressSlot):
4978
2009-08-04 Gavin Barraclough <barraclough@apple.com>
4980
Rubber Stamped by Oiver Hunt.
4982
Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests.
4983
https://bugs.webkit.org/show_bug.cgi?id=27874
4985
* yarr/RegexInterpreter.cpp:
4986
(JSC::Yarr::Interpreter::allocDisjunctionContext):
4987
(JSC::Yarr::Interpreter::freeDisjunctionContext):
4988
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
4989
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
4991
2009-08-04 Oliver Hunt <oliver@apple.com>
4997
2009-08-04 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
4999
Reviewed by Adam Treat
5001
Explicitly include limits.h header when using INT_MAX and INT_MIN
5003
* interpreter/Interpreter.cpp
5005
2009-08-03 Harald Fernengel <harald.fernengel@nokia.com>
5007
Reviewed by Darin Adler.
5009
Fix compile error for ambigous call to abs()
5010
https://bugs.webkit.org/show_bug.cgi?id=27873
5012
Fix ambiguity in abs(long int) call by calling labs() instead
5014
* wtf/DateMath.cpp: replace call to abs() with labs()
5016
2009-08-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
5018
Reviewed by Eric Seidel.
5020
[Qt] Consolidate common gcc flags to WebKit.pri
5021
https://bugs.webkit.org/show_bug.cgi?id=27934
5023
* JavaScriptCore.pro:
5025
2009-08-03 Ada Chan <adachan@apple.com>
5027
Fixed the Tiger build.
5029
* wtf/FastMalloc.cpp:
5031
2009-08-03 Ada Chan <adachan@apple.com>
5033
Reviewed by Darin Adler.
5035
Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash.
5036
https://bugs.webkit.org/show_bug.cgi?id=27900
5038
* wtf/FastMalloc.cpp:
5040
2009-08-03 Fumitoshi Ukai <ukai@chromium.org>
5042
Reviewed by Jan Alonzo.
5044
Fix build break on Gtk/x86_64.
5045
https://bugs.webkit.org/show_bug.cgi?id=27936
5047
Use JSVALUE64 for X86_64 LINUX, except Qt.
5051
2009-08-02 Xan Lopez <xlopez@igalia.com>
5057
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5059
Reviewed by Sam Weinig.
5061
Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously
5062
crash with it enabled.
5066
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5070
Added JSAPIValueWrapper.cpp to the build.
5072
* JavaScriptCore.pri:
5074
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5078
Exported symbols for JSAPIValueWrapper.
5080
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5081
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5083
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5087
* jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start.
5089
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5093
* runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX.
5095
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5097
Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject,
5098
and JSImmediate::toThisObject, and removed their exported symbols.
5100
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5101
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5102
* runtime/JSImmediate.cpp:
5103
* runtime/JSImmediate.h:
5105
2009-08-02 Geoffrey Garen <ggaren@apple.com>
5107
Reviewed by Mark Rowe.
5109
Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64).
5113
2009-08-02 Kevin Ollivier <kevino@theolliviers.com>
5115
Reviewed by Jan Alonzo.
5117
Script for building the JavaScriptCore library for wx.
5118
https://bugs.webkit.org/show_bug.cgi?id=27619
5122
2009-08-02 Yong Li <yong.li@torchmobile.com>
5124
Reviewed by George Staikos.
5126
DateMath depends on strftime and localtime, which need to be imported manually on WinCE
5127
https://bugs.webkit.org/show_bug.cgi?id=26558
5131
2009-08-01 David Kilzer <ddkilzer@apple.com>
5133
wtf/Threading.h: added include of Platform.h
5135
Reviewed by Mark Rowe.
5137
* wtf/Threading.h: Added #include "Platform.h" since this header
5138
uses PLATFORM() and other macros.
5140
2009-08-01 Mark Rowe <mrowe@apple.com>
5142
Rubber-stamped by Oliver Hunt.
5144
Roll out r46668 as it was misinformed. ScopeChain is only used with placement new.
5146
* runtime/ScopeChain.h:
5148
2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5150
Allow custom memory allocation control for JavaScriptCore's HashMap class
5151
http://bugs.webkit.org/show_bug.cgi?id=27871
5153
Inherits HashMap class from FastAllocBase because it has been
5154
instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148.
5156
* wtf/RefPtrHashMap.h:
5159
2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5161
Allow custom memory allocation control for JavaScriptCore's ScopeChain class
5162
https://bugs.webkit.org/show_bug.cgi?id=27834
5164
Inherits ScopeChain class from FastAllocBase because it has been
5165
instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109.
5167
* runtime/ScopeChain.h:
5169
2009-08-01 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5171
Reviewed by Darin Adler.
5173
Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct
5174
https://bugs.webkit.org/show_bug.cgi?id=27833
5176
Inherits RegExpConstructorPrivate class from FastAllocBase because it has been
5177
instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152.
5179
* runtime/RegExpConstructor.cpp:
5181
2009-07-31 Yong Li <yong.li@torchmobile.com>
5183
Reviewed by George Staikos.
5185
Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER
5186
currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com>
5187
https://bugs.webkit.org/show_bug.cgi?id=27848
5189
* wtf/CurrentTime.cpp:
5190
(WTF::currentSystemTime): get current time with GetCurrentFT
5191
(WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount
5194
2009-07-31 Ada Chan <adachan@apple.com>
5196
Fixes the Windows release-PGO build.
5198
Reviewed by Jon Honeycutt.
5200
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread().
5201
* wtf/FastMalloc.cpp:
5202
(WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build.
5204
2009-07-31 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
5206
Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
5207
https://bugs.webkit.org/show_bug.cgi?id=27874
5209
Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
5211
* yarr/RegexInterpreter.cpp:
5212
(JSC::Yarr::Interpreter::allocDisjunctionContext):
5213
(JSC::Yarr::Interpreter::freeDisjunctionContext):
5214
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
5215
(JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
5217
2009-07-30 Xan Lopez <xlopez@igalia.com>
5219
Reviewed by Jan Alonzo.
5221
Fix compiler warning.
5223
GCC does not like C++-style comments in preprocessor directives.
5227
2009-07-30 John McCall <rjmccall@apple.com>
5229
Reviewed by Gavin Barraclough.
5231
Optimize the X86_64 trampolines: avoid the need for filler arguments
5232
and move the stub-args area closer to the stack pointer.
5234
* jit/JIT.h: adjust patch offsets because of slight code-size change
5236
(JSC::JITCode::execute): don't pass filler args
5238
(ctiTrampoline): (X86_64): push args onto stack, use args directly
5239
(ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement
5240
(ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement
5242
(JITStackFrame): (X86_64): move args area earlier
5243
(ctiTrampoline): remove filler args from prototype
5245
2009-07-30 Gavin Barraclough <barraclough@apple.com>
5247
Temporarily revert r46618 since this is b0rking on Linux.
5249
2009-07-23 Gavin Barraclough <barraclough@apple.com>
5251
Reviewed by Oliver Hunt.
5253
Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
5254
( https://bugs.webkit.org/show_bug.cgi?id=27635 )
5256
This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
5257
(No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
5259
* bytecode/CodeBlock.cpp:
5260
(JSC::printStructureStubInfo):
5261
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
5263
* bytecode/CodeBlock.h:
5265
(JSC::CallLinkInfo::seenOnce):
5266
(JSC::CallLinkInfo::setSeen):
5267
(JSC::MethodCallLinkInfo::seenOnce):
5268
(JSC::MethodCallLinkInfo::setSeen):
5269
- Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
5271
* bytecode/StructureStubInfo.cpp:
5272
(JSC::StructureStubInfo::deref):
5273
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
5275
* bytecode/StructureStubInfo.h:
5276
(JSC::StructureStubInfo::StructureStubInfo):
5277
(JSC::StructureStubInfo::initGetByIdSelf):
5278
(JSC::StructureStubInfo::initGetByIdProto):
5279
(JSC::StructureStubInfo::initGetByIdChain):
5280
(JSC::StructureStubInfo::initGetByIdSelfList):
5281
(JSC::StructureStubInfo::initGetByIdProtoList):
5282
(JSC::StructureStubInfo::initPutByIdTransition):
5283
(JSC::StructureStubInfo::initPutByIdReplace):
5284
(JSC::StructureStubInfo::seenOnce):
5285
(JSC::StructureStubInfo::setSeen):
5286
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
5288
* bytecompiler/BytecodeGenerator.cpp:
5289
(JSC::BytecodeGenerator::emitGetById):
5290
(JSC::BytecodeGenerator::emitPutById):
5291
- Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
5294
(JSC::JIT::privateCompileCTIMachineTrampolines):
5295
(JSC::JIT::unlinkCall):
5296
- Remove the "don't lazy link" stage of calls.
5299
(JSC::JIT::compileCTIMachineTrampolines):
5300
- Remove the "don't lazy link" stage of calls.
5303
(JSC::JIT::compileOpCallSlowCase):
5304
- Remove the "don't lazy link" stage of calls.
5307
(JSC::JITThunks::JITThunks):
5308
(JSC::JITThunks::tryCachePutByID):
5309
(JSC::JITThunks::tryCacheGetByID):
5310
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
5311
(JSC::JITStubs::getPolymorphicAccessStructureListSlot):
5312
- Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
5315
(JSC::JITThunks::ctiStringLengthTrampoline):
5317
- Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
5319
* wtf/PtrAndFlags.h:
5320
(WTF::PtrAndFlags::PtrAndFlags):
5321
(WTF::PtrAndFlags::operator!):
5322
(WTF::PtrAndFlags::operator->):
5323
- Add ! and -> operators, add constuctor with pointer argument.
5325
2009-07-30 Geoffrey Garen <ggaren@apple.com>
5327
Reviewed by Gavin Barraclough.
5329
Fixed failing tests seen on Windows buildbot.
5332
(JSC::DEFINE_STUB_FUNCTION):
5334
(JSC::): Use "int" instead of "bool" to guarantee a 32-bit result,
5335
regardless of compiler. gcc on mac uses 32-bit values for bool,
5336
but gcc on linux and MSVC on Windows use 8-bit values.
5338
2009-07-30 Geoffrey Garen <ggaren@apple.com>
5340
Windows build fix: added missing symbols on Windows.
5342
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5343
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5345
2009-07-30 Geoffrey Garen <ggaren@apple.com>
5347
Windows build fix: removed stale symbols on Windows.
5349
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5350
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5352
=== End merge of nitro-extreme branch 2009-07-30 ===
5354
2009-07-20 Geoffrey Garen <ggaren@apple.com>
5356
Fixed a post-review typo in r46066 that caused tons of test failures.
5358
SunSpider reports no change.
5360
* runtime/JSArray.cpp:
5361
(JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid
5362
uninitialized members at the end.
5364
2009-07-20 Geoffrey Garen <ggaren@apple.com>
5366
Windows WebKit build fix: Added some missing exports.
5368
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5369
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
5371
2009-07-17 Geoffrey Garen <ggaren@apple.com>
5373
Reviewed by Sam Weinig.
5375
Get the branch working on windows.
5376
https://bugs.webkit.org/show_bug.cgi?id=27391
5378
SunSpider says 0.3% faster.
5380
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5381
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated
5382
MSVC export lists to fix linker errors.
5384
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed
5385
new / old project files.
5388
(JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell
5389
MSVC that these structures represent actual memory layout, and should not be
5390
automatically aligned. Changed the return value load to load a 64bit quantity
5391
into the canonical registers.
5393
* jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because
5394
it's needed by more than just the JIT, and it supplements a standard library
5398
(JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed
5399
cast to resolve an MSVC warning.
5401
* jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures
5402
represent actual memory layout, and should not be automatically aligned.
5404
* runtime/JSArray.cpp:
5405
(JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since
5406
memset_pattern8 is not portable. (I verified that this version of the loop
5407
gives the best performance / generated code in GCC.)
5409
* runtime/JSObject.h:
5410
(JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET --
5411
OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a
5412
definition in winnt.h.)
5414
* runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds.
5416
* runtime/JSValue.h:
5417
(JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values.
5418
(GCC doesn't seem to care one way or the other.)
5420
* wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a
5421
while ago to resolve a conflict with winnt.h. I can't remember if it's truly
5422
still needed, but what the heck.
5424
* wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here.
5426
2009-07-06 Geoffrey Garen <ggaren@apple.com>
5428
Reviewed by Sam Weinig (?).
5430
Fixed an assertion seen during the stress test.
5432
Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly,
5433
not all constants get folded.
5435
* jit/JITArithmetic.cpp:
5436
(JSC::JIT::emit_op_jnless):
5437
(JSC::JIT::emitSlow_op_jnless):
5438
(JSC::JIT::emit_op_jnlesseq):
5439
(JSC::JIT::emitSlow_op_jnlesseq):
5441
2009-07-06 Geoffrey Garen <ggaren@apple.com>
5443
Reviewed by Sam Weinig.
5445
Include op_convert_this in result caching.
5447
No change on SunSpider or v8.
5449
* jit/JITOpcodes.cpp:
5450
(JSC::JIT::emit_op_convert_this):
5453
(JSC::DEFINE_STUB_FUNCTION):
5455
(JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so
5456
to maintain the result caching contract that { tag, payload } can be
5457
found in { regT1, regT0 }.
5459
2009-07-06 Geoffrey Garen <ggaren@apple.com>
5461
Reviewed by Sam Weinig.
5463
Implemented result chaining.
5465
1% faster on SunSpider. 4%-5% faster on v8.
5467
* assembler/MacroAssemblerX86Common.h:
5468
(JSC::MacroAssemblerX86Common::move):
5469
* assembler/X86Assembler.h:
5470
(JSC::X86Assembler::movl_rr): Added an optimization to eliminate
5471
no-op mov instructions, to simplify chaining.
5475
* jit/JIT.h: Added data members and helper functions for recording
5476
chained results. We record both a mapping from virtual to machine register
5477
and the opcode for which the mapping is valid, to help ensure that the
5478
mapping isn't used after the mapped register has been stomped by other
5482
(JSC::JIT::compileOpCallVarargs):
5483
(JSC::JIT::compileOpCallVarargsSlowCase):
5484
(JSC::JIT::emit_op_ret):
5485
(JSC::JIT::emit_op_construct_verify):
5486
(JSC::JIT::compileOpCall):
5487
(JSC::JIT::compileOpCallSlowCase): Chain function call results.
5489
* jit/JITInlineMethods.h:
5490
(JSC::JIT::emitLoadTag):
5491
(JSC::JIT::emitLoadPayload):
5492
(JSC::JIT::emitLoad):
5493
(JSC::JIT::emitLoad2):
5494
(JSC::JIT::isLabeled):
5497
(JSC::JIT::isMapped):
5498
(JSC::JIT::getMappedPayload):
5499
(JSC::JIT::getMappedTag): Use helper functions when loading virtual
5500
registers into machine registers, in case the loads can be eliminated
5503
* jit/JITOpcodes.cpp:
5504
(JSC::JIT::emit_op_mov):
5505
(JSC::JIT::emit_op_end):
5506
(JSC::JIT::emit_op_instanceof):
5507
(JSC::JIT::emit_op_get_global_var):
5508
(JSC::JIT::emit_op_put_global_var):
5509
(JSC::JIT::emit_op_get_scoped_var):
5510
(JSC::JIT::emit_op_put_scoped_var):
5511
(JSC::JIT::emit_op_to_primitive):
5512
(JSC::JIT::emit_op_resolve_global):
5513
(JSC::JIT::emit_op_jneq_ptr):
5514
(JSC::JIT::emit_op_next_pname):
5515
(JSC::JIT::emit_op_to_jsnumber):
5516
(JSC::JIT::emit_op_catch): Chain results from these opcodes.
5518
(JSC::JIT::emit_op_profile_will_call):
5519
(JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to
5520
avoid stomping a chained result.
5522
* jit/JITPropertyAccess.cpp:
5523
(JSC::JIT::emit_op_method_check):
5524
(JSC::JIT::emit_op_get_by_val):
5525
(JSC::JIT::emit_op_get_by_id): Chain results from these opcodes.
5527
* jit/JITStubCall.h:
5528
(JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate
5531
(JSC::JITStubCall::call): Unmap all mapped registers, since our callee
5532
stub might stomp them.
5534
2009-07-01 Sam Weinig <sam@webkit.org>
5536
Reviewed by Gavin Barraclough.
5538
Don't reload values in emitBinaryDoubleOp.
5540
SunSpider reports a 0.6% progression.
5543
* jit/JITArithmetic.cpp:
5544
(JSC::JIT::emit_op_jnless):
5545
(JSC::JIT::emit_op_jnlesseq):
5546
(JSC::JIT::emitBinaryDoubleOp):
5548
2009-07-01 Sam Weinig <sam@webkit.org>
5550
Reviewed by Geoffrey Garen.
5552
Convert op_div to load op1 and op2 up front.
5554
* jit/JITArithmetic.cpp:
5555
(JSC::JIT::emit_op_div):
5557
2009-07-01 Sam Weinig <sam@webkit.org>
5559
Reviewed by Geoffrey Garen.
5561
Don't emit code in emitBinaryDoubleOp if code is unreachable, observable
5562
via an empty (unlinked) jumplist passed in. This only effects op_jnless
5563
and op_jnlesseq at present.
5565
* jit/JITArithmetic.cpp:
5566
(JSC::JIT::emitSlow_op_jnless):
5567
(JSC::JIT::emitSlow_op_jnlesseq):
5568
(JSC::JIT::emitBinaryDoubleOp):
5570
2009-07-01 Geoffrey Garen <ggaren@apple.com>
5572
Reviewed by Sam Weinig.
5574
Converted op_mod to put { tag, payload } in { regT1, regT0 }, and
5575
tidied up its constant case.
5577
SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod
5578
shows a 12% speedup, and the SunSpider test that uses op_mod most should
5579
benefit a lot from result caching in the end, since it almost always
5580
performs (expression) % constant.
5582
* jit/JITArithmetic.cpp:
5583
(JSC::JIT::emit_op_mod):
5584
(JSC::JIT::emitSlow_op_mod):
5586
2009-06-30 Sam Weinig <sam@webkit.org>
5588
Reviewed by Geoffrey Garen.
5590
Converted some more arithmetic ops to put { tag, payload } in
5593
* jit/JITArithmetic.cpp:
5594
(JSC::JIT::emit_op_mul):
5595
(JSC::JIT::emitSlow_op_mul):
5597
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5599
Reviewed by Sam Weinig.
5601
Converted some more arithmetic ops to put { tag, payload } in
5602
{ regT1, regT0 }, and added a case for subtract constant.
5604
SunSpider says no change. v8 says 0.3% slower.
5607
* jit/JITArithmetic.cpp:
5608
(JSC::JIT::emit_op_add):
5609
(JSC::JIT::emitAdd32Constant):
5610
(JSC::JIT::emitSlow_op_add):
5611
(JSC::JIT::emit_op_sub):
5612
(JSC::JIT::emitSub32Constant):
5613
(JSC::JIT::emitSlow_op_sub):
5615
2009-06-30 Gavin Barraclough <barraclough@apple.com>
5617
Reviewed by Sam Weinig.
5619
Remove more uses of addressFor(), load double constants directly from
5620
the constantpool in the CodeBlock, rather than from the register file.
5622
* jit/JITArithmetic.cpp:
5623
(JSC::JIT::emitAdd32Constant):
5624
(JSC::JIT::emitBinaryDoubleOp):
5626
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5628
Reviewed by Sam Weinig.
5630
Fixed a bug in postfix ops, where we would treat x = x++ and x = x--
5631
as a no-op, even if x were not an int, and the ++/-- could have side-effects.
5633
* jit/JITArithmetic.cpp:
5634
(JSC::JIT::emit_op_post_inc):
5635
(JSC::JIT::emitSlow_op_post_inc):
5636
(JSC::JIT::emit_op_post_dec):
5637
(JSC::JIT::emitSlow_op_post_dec):
5639
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5641
Reviewed by Sam Weinig.
5643
Converted some arithmetic ops to put { tag, payload } in
5646
SunSpider says 0.7% faster. v8 says no change.
5649
* jit/JITArithmetic.cpp:
5650
(JSC::JIT::emit_op_jnless):
5651
(JSC::JIT::emit_op_jnlesseq):
5652
(JSC::JIT::emit_op_lshift):
5653
(JSC::JIT::emit_op_rshift):
5654
(JSC::JIT::emit_op_bitand):
5655
(JSC::JIT::emit_op_bitor):
5656
(JSC::JIT::emit_op_bitxor):
5657
* jit/JITInlineMethods.h:
5658
(JSC::JIT::isOperandConstantImmediateInt):
5659
(JSC::JIT::getOperandConstantImmediateInt):
5661
2009-06-30 Gavin Barraclough <barraclough@apple.com>
5663
Reviewed by Sam Weinig.
5665
Start removing cases of addressFor().
5668
* jit/JITArithmetic.cpp:
5669
(JSC::JIT::emitAdd32Constant):
5670
(JSC::JIT::emitBinaryDoubleOp):
5671
(JSC::JIT::emit_op_div):
5672
* jit/JITInlineMethods.h:
5673
(JSC::JIT::emitLoadDouble):
5674
(JSC::JIT::emitLoadInt32ToDouble):
5675
(JSC::JIT::emitStoreDouble):
5676
* jit/JITOpcodes.cpp:
5677
(JSC::JIT::emit_op_jfalse):
5678
(JSC::JIT::emit_op_jtrue):
5680
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5682
Rolled back in my last patch with regression fixed.
5685
(JSC::JIT::privateCompileSlowCases):
5687
* jit/JITOpcodes.cpp:
5688
(JSC::JIT::emit_op_loop_if_less):
5689
(JSC::JIT::emit_op_loop_if_lesseq):
5690
(JSC::JIT::emit_op_resolve_global):
5691
(JSC::JIT::emitSlow_op_resolve_global):
5692
(JSC::JIT::emit_op_eq):
5693
(JSC::JIT::emitSlow_op_eq):
5694
(JSC::JIT::emit_op_neq):
5695
(JSC::JIT::emitSlow_op_neq):
5697
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5699
Rolled out my last patch because it was a 2% SunSpider regression.
5702
(JSC::JIT::privateCompileSlowCases):
5704
* jit/JITOpcodes.cpp:
5705
(JSC::JIT::emit_op_loop_if_less):
5706
(JSC::JIT::emit_op_loop_if_lesseq):
5707
(JSC::JIT::emit_op_resolve_global):
5708
(JSC::JIT::emit_op_eq):
5709
(JSC::JIT::emitSlow_op_eq):
5710
(JSC::JIT::emit_op_neq):
5711
(JSC::JIT::emitSlow_op_neq):
5713
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5715
Reviewed by Gavin "Sam Weinig" Barraclough.
5717
Standardized the rest of our opcodes to put { tag, payload } in
5718
{ regT1, regT0 } where possible.
5721
(JSC::JIT::privateCompileSlowCases):
5723
* jit/JITOpcodes.cpp:
5724
(JSC::JIT::emit_op_loop_if_less):
5725
(JSC::JIT::emit_op_loop_if_lesseq):
5726
(JSC::JIT::emit_op_resolve_global):
5727
(JSC::JIT::emitSlow_op_resolve_global):
5728
(JSC::JIT::emit_op_eq):
5729
(JSC::JIT::emitSlow_op_eq):
5730
(JSC::JIT::emit_op_neq):
5731
(JSC::JIT::emitSlow_op_neq):
5733
2009-06-30 Gavin Barraclough <barraclough@apple.com>
5735
Reviewed by Geoffrey Garen.
5737
Replace calls to store32(tagFor()) and store32(payloadFor())
5738
with emitStoreInt32(), emitStoreBool(), and emitStoreCell().
5741
* jit/JITArithmetic.cpp:
5742
(JSC::JIT::emit_op_negate):
5743
(JSC::JIT::emit_op_lshift):
5744
(JSC::JIT::emit_op_rshift):
5745
(JSC::JIT::emit_op_bitand):
5746
(JSC::JIT::emitBitAnd32Constant):
5747
(JSC::JIT::emit_op_bitor):
5748
(JSC::JIT::emitBitOr32Constant):
5749
(JSC::JIT::emit_op_bitxor):
5750
(JSC::JIT::emitBitXor32Constant):
5751
(JSC::JIT::emit_op_bitnot):
5752
(JSC::JIT::emit_op_post_inc):
5753
(JSC::JIT::emit_op_post_dec):
5754
(JSC::JIT::emit_op_pre_inc):
5755
(JSC::JIT::emit_op_pre_dec):
5756
(JSC::JIT::emit_op_add):
5757
(JSC::JIT::emitAdd32Constant):
5758
(JSC::JIT::emit_op_sub):
5759
(JSC::JIT::emitSub32ConstantLeft):
5760
(JSC::JIT::emitSub32ConstantRight):
5761
(JSC::JIT::emit_op_mul):
5762
(JSC::JIT::emitSlow_op_mul):
5763
(JSC::JIT::emit_op_div):
5764
(JSC::JIT::emit_op_mod):
5766
(JSC::JIT::emit_op_load_varargs):
5767
* jit/JITInlineMethods.h:
5768
(JSC::JIT::emitStoreInt32):
5769
(JSC::JIT::emitStoreCell):
5770
(JSC::JIT::emitStoreBool):
5771
(JSC::JIT::emitStore):
5772
* jit/JITOpcodes.cpp:
5773
(JSC::JIT::emit_op_instanceof):
5774
(JSC::JIT::emit_op_not):
5775
(JSC::JIT::emit_op_eq):
5776
(JSC::JIT::emitSlow_op_eq):
5777
(JSC::JIT::emit_op_neq):
5778
(JSC::JIT::emitSlow_op_neq):
5779
(JSC::JIT::compileOpStrictEq):
5780
(JSC::JIT::emit_op_eq_null):
5781
(JSC::JIT::emit_op_neq_null):
5782
* jit/JITStubCall.h:
5783
(JSC::JITStubCall::call):
5785
2009-06-30 Geoffrey Garen <ggaren@apple.com>
5787
Reviewed by Sam Weinig.
5789
Standardized the rest of the property access instructions to put { tag,
5790
payload } in { regT1, regT0 }.
5792
Small v8 speedup, 0.2% SunSpider slowdown.
5795
* jit/JITInlineMethods.h:
5796
(JSC::JIT::emitLoad):
5797
(JSC::JIT::emitLoad2):
5798
* jit/JITPropertyAccess.cpp:
5799
(JSC::JIT::emit_op_get_by_val):
5800
(JSC::JIT::emitSlow_op_get_by_val):
5801
(JSC::JIT::emit_op_put_by_val):
5802
(JSC::JIT::emitSlow_op_put_by_val):
5803
(JSC::JIT::emit_op_put_by_id):
5804
(JSC::JIT::emitSlow_op_put_by_id):
5805
(JSC::JIT::patchPutByIdReplace):
5807
2009-06-29 Sam Weinig <sam@webkit.org>
5809
Reviewed by Gavin Barraclough.
5812
- Use fpRegT* instead of X86::xmm*.
5813
- Use a switch statement in emitBinaryDoubleOp instead of a bunch of
5816
* jit/JITArithmetic.cpp:
5817
(JSC::JIT::emitAdd32Constant):
5818
(JSC::JIT::emitBinaryDoubleOp):
5819
(JSC::JIT::emit_op_div):
5821
2009-06-29 Sam Weinig <sam@webkit.org>
5823
Reviewed by Geoffrey Garen.
5825
Add inline code dealing with doubles for op_jfalse and op_jtrue.
5827
* assembler/MacroAssemblerX86Common.h:
5828
(JSC::MacroAssemblerX86Common::):
5829
(JSC::MacroAssemblerX86Common::zeroDouble):
5830
* jit/JITOpcodes.cpp:
5831
(JSC::JIT::emit_op_jfalse):
5832
(JSC::JIT::emit_op_jtrue):
5834
2009-06-28 Geoffrey Garen <ggaren@apple.com>
5836
Reviewed by Sam Weinig.
5838
Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }.
5840
SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization
5841
this enables will win much more than that back.
5844
(JSC::JIT::privateCompileCTIMachineTrampolines):
5846
* jit/JITPropertyAccess.cpp:
5847
(JSC::JIT::emit_op_method_check):
5848
(JSC::JIT::emit_op_get_by_id):
5849
(JSC::JIT::compileGetByIdHotPath):
5850
(JSC::JIT::compileGetByIdSlowCase):
5851
(JSC::JIT::patchGetByIdSelf):
5852
(JSC::JIT::privateCompilePatchGetArrayLength):
5853
(JSC::JIT::privateCompileGetByIdProto):
5854
(JSC::JIT::privateCompileGetByIdSelfList):
5855
(JSC::JIT::privateCompileGetByIdProtoList):
5856
(JSC::JIT::privateCompileGetByIdChainList):
5857
(JSC::JIT::privateCompileGetByIdChain):
5859
2009-06-26 Geoffrey Garen <ggaren@apple.com>
5861
Reviewed by Maciej Stachowiak.
5863
Standardized op_call to put { tag, payload } in { regT1, regT0 }.
5865
SunSpider and v8 report no change.
5868
(JSC::JIT::privateCompileCTIMachineTrampolines):
5870
(JSC::JIT::compileOpCallInitializeCallFrame):
5871
(JSC::JIT::compileOpCallSetupArgs):
5872
(JSC::JIT::compileOpConstructSetupArgs):
5873
(JSC::JIT::compileOpCallVarargsSetupArgs):
5874
(JSC::JIT::compileOpCallVarargs):
5875
(JSC::JIT::compileOpCall):
5876
(JSC::JIT::compileOpCallSlowCase):
5878
2009-06-26 Sam Weinig <sam@webkit.org>
5880
Reviewed by Geoffrey Garen.
5882
Handle multiplying by zero a little better by
5883
inlining the case that both operands are non-negative
5886
* assembler/MacroAssemblerX86Common.h:
5887
(JSC::MacroAssemblerX86Common::branchOr32):
5888
* jit/JITArithmetic.cpp:
5889
(JSC::JIT::emit_op_mul):
5890
(JSC::JIT::emitSlow_op_mul):
5892
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5894
Reviewed by Sam Weinig.
5896
Optimize x++ to ++x inside for loops.
5898
Sadly, no measurable speedup, but this should help with result chaining.
5901
(JSC::ForNode::emitBytecode):
5903
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5905
Reviewed by Sam Weinig.
5907
Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
5909
* jit/JITArithmetic.cpp:
5910
(JSC::JIT::emitSlow_op_bitnot):
5911
(JSC::JIT::emit_op_post_inc):
5913
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5915
Reviewed by Sam Weinig.
5917
Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
5919
* jit/JITArithmetic.cpp:
5920
(JSC::JIT::emit_op_bitnot):
5921
(JSC::JIT::emit_op_post_dec):
5922
(JSC::JIT::emit_op_pre_inc):
5923
(JSC::JIT::emitSlow_op_pre_inc):
5924
(JSC::JIT::emit_op_pre_dec):
5925
(JSC::JIT::emitSlow_op_pre_dec):
5927
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5929
Reviewed by Sam Weinig.
5931
Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
5933
* jit/JITArithmetic.cpp:
5934
(JSC::JIT::emit_op_negate):
5935
(JSC::JIT::emitSlow_op_negate):
5937
(JSC::JIT::emit_op_construct_verify):
5938
(JSC::JIT::emitSlow_op_construct_verify):
5940
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5942
Reviewed by Sam Weinig.
5944
Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
5946
* jit/JITOpcodes.cpp:
5947
(JSC::JIT::emit_op_loop_if_true):
5948
(JSC::JIT::emit_op_jfalse):
5949
(JSC::JIT::emit_op_jtrue):
5950
(JSC::JIT::emit_op_jeq_null):
5951
(JSC::JIT::emit_op_jneq_null):
5952
(JSC::JIT::emit_op_eq_null):
5953
(JSC::JIT::emit_op_neq_null):
5955
2009-06-25 Geoffrey Garen <ggaren@apple.com>
5957
Reviewed by Sam Weinig (sort of, maybe).
5959
Fixed some ASSERTs in http/tests/security.
5961
These ASSERTs were introduced by http://trac.webkit.org/changeset/45057,
5962
but the underlying problem was actually older. http://trac.webkit.org/changeset/45057
5963
just exposed the problem by enabling optimization in more cases.
5965
The ASSERTs fired because we tested PropertySlot::slotBase() for validity,
5966
but slotBase() ASSERTs if it's invalid, so we would ASSERT before
5967
the test could happen. Solution: Remove the ASSERT. Maybe it was valid
5968
once, but it clearly goes against a pattern we've deployed of late.
5970
The underlying problem was that WebCore would re-use a PropertySlot in
5971
the case of a forwarding access, and the second use would not completely
5972
overwrite the first use. Solution: Make sure to overwrite m_offset when
5973
setting a value on a PropertySlot. (Other values already get implicitly
5974
overwritten during reuse.)
5976
* runtime/PropertySlot.h:
5977
(JSC::PropertySlot::PropertySlot):
5978
(JSC::PropertySlot::setValueSlot):
5979
(JSC::PropertySlot::setValue):
5980
(JSC::PropertySlot::setRegisterSlot):
5981
(JSC::PropertySlot::setUndefined):
5982
(JSC::PropertySlot::slotBase):
5983
(JSC::PropertySlot::clearOffset):
5985
2009-06-24 Gavin Barraclough <barraclough@apple.com>
5987
Reviewed by Geoff Garen.
5989
Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT.
5992
* jit/JITPropertyAccess.cpp:
5993
(JSC::JIT::emit_op_method_check):
5994
(JSC::JIT::emitSlow_op_method_check):
5995
(JSC::JIT::emit_op_get_by_id):
5996
(JSC::JIT::compileGetByIdHotPath):
5997
(JSC::JIT::emitSlow_op_get_by_id):
5998
(JSC::JIT::compileGetByIdSlowCase):
6000
2009-06-23 Geoffrey Garen <ggaren@apple.com>
6002
Reviewed by Sam Weinig.
6004
Bit off a tiny bit more of standardizing opcode behavior to help with result
6007
SunSpider reports no change, v8 maybe a tiny speedup.
6009
* jit/JITOpcodes.cpp:
6010
(JSC::JIT::emit_op_to_jsnumber):
6011
(JSC::JIT::emitSlow_op_to_jsnumber):
6012
(JSC::JIT::emit_op_convert_this):
6013
(JSC::JIT::emitSlow_op_convert_this):
6015
2009-06-23 Geoffrey Garen <ggaren@apple.com>
6017
Reviewed by Sam Weinig.
6019
Bit off a tiny bit more of standardizing opcode behavior to help with result
6020
caching -- including removing my old enemy, op_resolve_function, because
6021
it was non-standard, and removing it felt better than helping it limp along.
6023
SunSpider reports no change, v8 maybe a tiny speedup.
6025
* bytecode/CodeBlock.cpp:
6026
(JSC::CodeBlock::dump):
6027
* bytecode/Opcode.h:
6028
* bytecompiler/BytecodeGenerator.cpp:
6029
* bytecompiler/BytecodeGenerator.h:
6030
* interpreter/Interpreter.cpp:
6031
(JSC::Interpreter::privateExecute):
6033
(JSC::JIT::privateCompileMainPass):
6035
* jit/JITOpcodes.cpp:
6036
(JSC::JIT::emit_op_get_scoped_var):
6037
(JSC::JIT::emit_op_put_scoped_var):
6038
(JSC::JIT::emit_op_to_primitive):
6039
(JSC::JIT::emitSlow_op_to_primitive):
6043
(JSC::FunctionCallResolveNode::emitBytecode):
6045
2009-06-23 Geoffrey Garen <ggaren@apple.com>
6047
Reviewed by Sam Weinig.
6049
Bit off a tiny bit of standardizing opcode behavior to help with result
6052
0.6% SunSpider speedup. 0.3% v8 speedup.
6054
* jit/JITInlineMethods.h:
6055
(JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload
6056
by loading tag before payload, to avoid stomping base/payload.
6058
* jit/JITOpcodes.cpp:
6059
(JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in
6062
(JSC::JIT::emit_op_get_global_var):
6063
(JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent
6064
loads while I was at it. The global object's "d" pointer never changes
6067
2009-06-23 Gavin Barraclough <barraclough@apple.com>
6069
Reviewed by Sam Weinig.
6071
Remove 'arguments' field from Register union (again).
6072
This time do so without breaking tests (radical, I know).
6074
* interpreter/CallFrame.h:
6075
(JSC::ExecState::optionalCalleeArguments):
6076
(JSC::ExecState::setArgumentCount):
6077
(JSC::ExecState::init):
6078
* interpreter/Interpreter.cpp:
6079
(JSC::Interpreter::dumpRegisters):
6080
(JSC::Interpreter::unwindCallFrame):
6081
(JSC::Interpreter::privateExecute):
6082
(JSC::Interpreter::retrieveArguments):
6083
* interpreter/Register.h:
6084
(JSC::Register::withInt):
6086
(JSC::Register::Register):
6089
(JSC::JITStubs::cti_op_tear_off_arguments):
6090
* runtime/Arguments.h:
6091
(JSC::JSActivation::copyRegisters):
6092
(JSC::Register::arguments):
6093
* runtime/JSActivation.cpp:
6094
(JSC::JSActivation::argumentsGetter):
6095
* runtime/JSActivation.h:
6097
2009-06-23 Geoffrey Garen <ggaren@apple.com>
6099
Reviewed by Sam Weinig.
6101
Removed some result register tracking cruft in preparation for a new
6102
result tracking mechanism.
6104
SunSpider reports no change.
6106
* assembler/AbstractMacroAssembler.h:
6107
* assembler/X86Assembler.h:
6108
(JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in
6109
machine code; we already do this in bytecode.
6113
(JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result
6114
registers, so an opcode with a timeout check can still benefit from result
6117
(JSC::JIT::privateCompileMainPass):
6118
(JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister()
6119
in preparation for something new.
6122
* jit/JITArithmetic.cpp:
6123
(JSC::JIT::emit_op_jnless):
6124
(JSC::JIT::emit_op_jnlesseq):
6125
* jit/JITInlineMethods.h:
6126
(JSC::JIT::emitGetFromCallFrameHeaderPtr):
6127
(JSC::JIT::emitGetFromCallFrameHeader32):
6128
* jit/JITOpcodes.cpp:
6129
(JSC::JIT::emit_op_jmp):
6130
(JSC::JIT::emit_op_jfalse):
6131
(JSC::JIT::emit_op_jtrue):
6132
(JSC::JIT::emit_op_jeq_null):
6133
(JSC::JIT::emit_op_jneq_null):
6134
(JSC::JIT::emit_op_jneq_ptr):
6135
(JSC::JIT::emit_op_jsr):
6136
(JSC::JIT::emit_op_sret):
6137
(JSC::JIT::emit_op_jmp_scopes): ditto
6139
* jit/JITStubCall.h:
6140
(JSC::JITStubCall::JITStubCall):
6141
(JSC::JITStubCall::getArgument): added a mechanism for reloading an argument
6142
you passed to a JIT stub, for use in emitTimeoutCheck.
6144
2009-06-23 Sam Weinig <sam@webkit.org>
6146
Reviewed by Geoffrey Garen.
6148
Remove now-useless inplace variants of binary ops.
6151
* jit/JITArithmetic.cpp:
6152
(JSC::JIT::emit_op_bitand):
6153
(JSC::JIT::emit_op_bitor):
6154
(JSC::JIT::emit_op_bitxor):
6155
(JSC::JIT::emit_op_add):
6156
(JSC::JIT::emit_op_sub):
6157
(JSC::JIT::emit_op_mul):
6159
2009-06-23 Sam Weinig <sam@webkit.org>
6161
Reviewed by Geoffrey Garen.
6163
Move off memory operands to aid in re-enabling result caching.
6165
- No regression measured.
6168
* jit/JITArithmetic.cpp:
6169
(JSC::JIT::emit_op_negate):
6170
(JSC::JIT::emit_op_jnless):
6171
(JSC::JIT::emit_op_jnlesseq):
6172
(JSC::JIT::emit_op_lshift):
6173
(JSC::JIT::emit_op_rshift):
6174
(JSC::JIT::emit_op_bitand):
6175
(JSC::JIT::emitBitAnd32Constant):
6176
(JSC::JIT::emitBitAnd32InPlace):
6177
(JSC::JIT::emit_op_bitor):
6178
(JSC::JIT::emitBitOr32Constant):
6179
(JSC::JIT::emitBitOr32InPlace):
6180
(JSC::JIT::emit_op_bitxor):
6181
(JSC::JIT::emitBitXor32Constant):
6182
(JSC::JIT::emitBitXor32InPlace):
6183
(JSC::JIT::emit_op_bitnot):
6184
(JSC::JIT::emit_op_post_inc):
6185
(JSC::JIT::emit_op_post_dec):
6186
(JSC::JIT::emit_op_pre_inc):
6187
(JSC::JIT::emitSlow_op_pre_inc):
6188
(JSC::JIT::emit_op_pre_dec):
6189
(JSC::JIT::emitSlow_op_pre_dec):
6190
(JSC::JIT::emit_op_add):
6191
(JSC::JIT::emitAdd32Constant):
6192
(JSC::JIT::emitAdd32InPlace):
6193
(JSC::JIT::emitSlow_op_add):
6194
(JSC::JIT::emitSlowAdd32Constant):
6195
(JSC::JIT::emit_op_sub):
6196
(JSC::JIT::emitSlow_op_sub):
6197
(JSC::JIT::emitSub32ConstantLeft):
6198
(JSC::JIT::emitSub32ConstantRight):
6199
(JSC::JIT::emitSub32InPlaceLeft):
6200
(JSC::JIT::emitSub32InPlaceRight):
6201
(JSC::JIT::emitBinaryDoubleOp):
6202
(JSC::JIT::emit_op_mul):
6203
(JSC::JIT::emitMul32InPlace):
6204
(JSC::JIT::emit_op_div):
6205
(JSC::JIT::emit_op_mod):
6207
(JSC::JIT::compileOpCallVarargs):
6208
* jit/JITOpcodes.cpp:
6209
(JSC::JIT::emit_op_loop_if_less):
6210
(JSC::JIT::emit_op_loop_if_lesseq):
6211
(JSC::JIT::emit_op_instanceof):
6212
(JSC::JIT::emit_op_to_primitive):
6213
(JSC::JIT::emit_op_not):
6214
(JSC::JIT::emit_op_jneq_ptr):
6215
(JSC::JIT::emit_op_eq):
6216
(JSC::JIT::emit_op_neq):
6217
(JSC::JIT::emit_op_to_jsnumber):
6218
* jit/JITPropertyAccess.cpp:
6219
(JSC::JIT::emit_op_get_by_val):
6220
(JSC::JIT::emit_op_put_by_val):
6222
2009-06-23 Geoffrey Garen <ggaren@apple.com>
6224
Reviewed by Sam Weinig.
6226
Fixed some missing and/or misplaced labels in bytecode generation, so
6227
we don't have to work around them in JIT code generation.
6229
* bytecompiler/BytecodeGenerator.cpp:
6230
(JSC::BytecodeGenerator::emitJumpSubroutine):
6232
(JSC::TryNode::emitBytecode):
6234
2009-06-22 Geoffrey Garen <ggaren@apple.com>
6236
Reviewed by Sam Weinig.
6238
For member function calls, emit "this" directly into the "this" slot
6239
for the function call, instead of moving it there later. This reduces
6240
time spent in op_mov during certain calls, like "a.b.c()".
6242
1%-2% speedup on v8, mostly richards and delta-blue.
6245
(JSC::FunctionCallDotNode::emitBytecode):
6247
2009-06-22 Gavin Barraclough <barraclough@apple.com>
6249
Reviewed by Sam Weinig.
6251
Remove 'arguments' field from Register union. Having JSCell derived types in the union is
6252
dangerous since it opens the possibility for the field to be written as a raw pointer but
6253
then read as a JSValue. This will lead to statle data being read for the tag, which may
6254
be dangerous. Having removed Arguments* types form Register, all arguments objects must
6255
always explicitly be stored in the register file as JSValues.
6257
* interpreter/CallFrame.h:
6258
(JSC::ExecState::optionalCalleeArguments):
6259
* interpreter/Interpreter.cpp:
6260
(JSC::Interpreter::unwindCallFrame):
6261
(JSC::Interpreter::privateExecute):
6262
(JSC::Interpreter::retrieveArguments):
6263
* interpreter/Register.h:
6266
(JSC::JITStubs::cti_op_tear_off_arguments):
6267
* runtime/Arguments.h:
6268
(JSC::JSActivation::copyRegisters):
6269
* runtime/JSActivation.cpp:
6270
(JSC::JSActivation::argumentsGetter):
6271
* runtime/JSActivation.h:
6273
2009-06-03 Sam Weinig <sam@webkit.org>
6275
Reviewed by Geoffrey Garen.
6277
Add back known this value optimization by abstracting
6278
slow case if not JSCell jumps.
6282
(JSC::JIT::compileOpCallVarargs):
6283
(JSC::JIT::compileOpCallVarargsSlowCase):
6284
(JSC::JIT::compileOpCall):
6285
(JSC::JIT::compileOpCallSlowCase):
6286
* jit/JITInlineMethods.h:
6287
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
6288
(JSC::JIT::linkSlowCaseIfNotJSCell):
6289
* jit/JITOpcodes.cpp:
6290
(JSC::JIT::emit_op_instanceof):
6291
(JSC::JIT::emitSlow_op_instanceof):
6292
* jit/JITPropertyAccess.cpp:
6293
(JSC::JIT::emit_op_get_by_val):
6294
(JSC::JIT::emitSlow_op_get_by_val):
6295
(JSC::JIT::emit_op_put_by_val):
6296
(JSC::JIT::emitSlow_op_put_by_val):
6297
(JSC::JIT::emit_op_get_by_id):
6298
(JSC::JIT::emitSlow_op_get_by_id):
6299
(JSC::JIT::emit_op_put_by_id):
6300
(JSC::JIT::emitSlow_op_put_by_id):
6302
2009-06-01 Geoffrey Garen <ggaren@apple.com>
6304
Reviewed by Sam Weinig.
6306
Fixed some of the regression in crypto-aes.js. (8.5% speedup in
6309
SunSpider reports no change overall.
6311
Division was producing double results, which took the slow path through
6314
Strangely, all my attempts at versions of this patch that modified array
6315
access code to accept ints encoded as doubles along the fast or slow paths
6316
were regressions. So I did this instead.
6318
* jit/JITArithmetic.cpp:
6319
(JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try
6320
to turn the result into an int. Don't just do int division, though, because
6321
testing shows it to be slower than SSE double division, and the corner
6322
cases are pretty complicated / lengthy on top of that. Also, don't try
6323
to canonicalize division of known tiny numerators into ints, since that's a
6326
2009-05-26 Geoffrey Garen <ggaren@apple.com>
6328
Reviewed by Oliver Hunt.
6330
Fixed a regression caused by my recent fix for NaN.
6332
* jit/JITArithmetic.cpp:
6333
(JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse
6334
order, like the ChangeLog said we would, bokay?
6336
2009-05-26 Geoffrey Garen <ggaren@apple.com>
6338
Reviewed by Sam Weinig and Oliver Hunt.
6340
Fixed two edge cases in %:
6342
- Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1,
6343
which will signal a hardware exception due to overflow.
6345
- In the case of a zero remainder, be sure to store negative zero if the
6348
SunSpider reports no change.
6350
* jit/JITArithmetic.cpp:
6351
(JSC::JIT::emit_op_mod):
6352
(JSC::JIT::emitSlow_op_mod):
6354
2009-05-25 Geoffrey Garen <ggaren@apple.com>
6356
Reviewed by Maciej Stachowiak.
6358
Fixed a regression when comparing to NaN.
6360
* jit/JITArithmetic.cpp:
6361
(JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the
6362
comparison in reverse order, and jump if the result is below or
6363
below-or-equal. This ensures that we do jump in the case of NaN.
6365
2009-05-25 Geoffrey Garen <ggaren@apple.com>
6367
Reviewed by Oliver Hunt.
6369
SunSpider says no change.
6371
Fixed regressions in fast/js/var-declarations-shadowing.html and
6372
fast/js/equality.html, caused by recent == and != optimizations.
6375
(JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always
6376
numeric or string comparison. If the second operand is an object, you
6377
need to ToPrimitive it, and start all over again. Also, I wrote out each
6378
of the possible cases explicitly, to cut down on redundant branching.
6380
2009-05-25 Sam Weinig <sam@webkit.org>
6382
Reviewed by Mark Rowe.
6384
Fix bug in fast/js/constant-folding.html where we were not negating
6387
* jit/JITArithmetic.cpp:
6388
(JSC::JIT::emit_op_negate):
6390
2009-05-23 Geoffrey Garen <ggaren@apple.com>
6392
Reviewed by Oliver Hunt.
6394
Refactored new slow case codegen for == and !=.
6396
SunSpider reports no change, maybe a tiny speedup.
6398
* jit/JITOpcodes.cpp:
6399
(JSC::JIT::emitSlow_op_eq):
6400
(JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation,
6401
instead of *32, to make it portable to 64bit. Reorganized the string
6402
and generic cases to make their control flow a little clearer.
6404
2009-05-23 Geoffrey Garen <ggaren@apple.com>
6406
Reviewed by Maciej Stachowiak.
6408
Optimized == and != for our new value representation -- especially for strings.
6410
14% speedup on date-format-tofte.
6412
* jit/JITOpcodes.cpp:
6413
(JSC::JIT::emit_op_eq):
6414
(JSC::JIT::emitSlow_op_eq):
6415
(JSC::JIT::emit_op_neq):
6416
(JSC::JIT::emitSlow_op_neq):
6417
* jit/JITStubCall.h:
6418
(JSC::JITStubCall::JITStubCall):
6420
(JSC::JITStubs::cti_op_eq):
6421
(JSC::JITStubs::cti_op_eq_strings):
6422
(JSC::JITStubs::cti_op_call_eval):
6425
* runtime/JSValue.h:
6427
2009-05-22 Sam Weinig <sam@webkit.org>
6429
Reviewed by Gavin Barraclough.
6431
Fix non-SSE enabled builds.
6433
* jit/JITArithmetic.cpp:
6434
(JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub.
6435
(JSC::JIT::emitSlow_op_sub): Ditto.
6437
2009-05-22 Geoffrey Garen <ggaren@apple.com>
6439
Reviewed by Sam Weinig.
6441
Here's a thought: let's not take a jit stub call just to multiply by 1,
6444
imul doesn't set the zero flag, so to test for a zero result, we need
6445
an explicit instruction. (Luckily, it does set the overflow flag, so
6446
we can still use that.)
6449
* jit/JITArithmetic.cpp:
6450
(JSC::JIT::emit_op_mul):
6451
(JSC::JIT::emitSlow_op_mul):
6452
(JSC::JIT::emitMul32InPlace):
6454
2009-05-22 Sam Weinig <sam@webkit.org>
6456
Reviewed by Geoffrey "Premature Commit" Garen.
6458
Add back constant integer cases for op_add.
6461
* jit/JITArithmetic.cpp:
6462
(JSC::JIT::emit_op_add):
6463
(JSC::JIT::emitAdd32Constant):
6464
(JSC::JIT::emitSlow_op_add):
6465
(JSC::JIT::emitSlowAdd32Constant):
6466
* jit/JITInlineMethods.h:
6467
(JSC::JIT::getConstantOperandImmediateDouble):
6468
(JSC::JIT::isOperandConstantImmediateDouble):
6470
2009-05-22 Geoffrey Garen <ggaren@apple.com>
6472
Reviewed by Sam Weinig.
6474
Added fast double cases for op_jnless and op_jnlesseq.
6476
* assembler/AbstractMacroAssembler.h:
6477
(JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by
6480
* assembler/X86Assembler.h:
6481
(JSC::X86Assembler::ucomisd_rm): New method for comparing register to
6485
* jit/JITArithmetic.cpp:
6486
(JSC::JIT::emit_op_jnless):
6487
(JSC::JIT::emitSlow_op_jnless):
6488
(JSC::JIT::emit_op_jnlesseq):
6489
(JSC::JIT::emitSlow_op_jnlesseq):
6490
(JSC::JIT::emit_op_add):
6491
(JSC::JIT::emit_op_sub):
6492
(JSC::JIT::emitBinaryDoubleOp):
6493
(JSC::JIT::emit_op_mul):
6494
(JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump
6495
operations in addition to operations with explicit result registers.
6497
* jit/JITInlineMethods.h:
6498
(JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients
6499
can track multiple jumps to the same slow case condition together.
6501
2009-05-21 Sam Weinig <sam@webkit.org>
6503
Reviewed by Gavin Barraclough.
6505
Implement op_negate inline fast cases.
6507
* assembler/MacroAssemblerX86Common.h:
6508
(JSC::MacroAssemblerX86Common::neg32):
6509
* assembler/X86Assembler.h:
6510
(JSC::X86Assembler::):
6511
(JSC::X86Assembler::negl_m):
6512
(JSC::X86Assembler::xorpd_rr):
6514
(JSC::JIT::privateCompileMainPass):
6515
(JSC::JIT::privateCompileSlowCases):
6517
* jit/JITArithmetic.cpp:
6518
(JSC::JIT::emit_op_negate):
6519
(JSC::JIT::emitSlow_op_negate):
6521
2009-05-20 Sam Weinig <sam@webkit.org>
6523
Reviewed by Gavin Barraclough.
6525
Update the patchOffsetGetByIdSlowCaseCall constant for the
6526
case that OPCODE_SAMPLING is enabled.
6530
2009-05-20 Geoffrey Garen <ggaren@apple.com>
6532
Reviewed by Sam Weinig.
6534
Added support for inline subtraction of doubles.
6536
* jit/JITArithmetic.cpp:
6537
(JSC::JIT::emit_op_sub):
6538
(JSC::JIT::emitSlow_op_sub):
6539
(JSC::JIT::emitSlowSub32InPlaceLeft):
6540
(JSC::JIT::emitBinaryDoubleOp):
6542
2009-05-20 Sam Weinig <sam@webkit.org>
6544
Reviewed by Geoffrey Garen.
6546
Added support for inline division.
6548
* assembler/X86Assembler.h:
6549
(JSC::X86Assembler::):
6550
(JSC::X86Assembler::divsd_rr):
6551
(JSC::X86Assembler::divsd_mr):
6552
* bytecode/CodeBlock.cpp:
6553
(JSC::CodeBlock::dump):
6554
* bytecode/Opcode.h:
6555
* bytecompiler/BytecodeGenerator.cpp:
6556
(JSC::BytecodeGenerator::emitBinaryOp):
6557
* interpreter/Interpreter.cpp:
6558
(JSC::Interpreter::privateExecute):
6560
(JSC::JIT::privateCompileMainPass):
6561
(JSC::JIT::privateCompileSlowCases):
6563
* jit/JITArithmetic.cpp:
6564
(JSC::JIT::emitBinaryDoubleOp):
6565
(JSC::JIT::emit_op_div):
6566
(JSC::JIT::emitSlow_op_div):
6568
2009-05-20 Geoffrey Garen <ggaren@apple.com>
6570
Reviewed by Sam Weinig.
6572
Added support for inline addition of doubles.
6574
* jit/JITArithmetic.cpp:
6575
(JSC::JIT::emit_op_add):
6576
(JSC::JIT::emitSlow_op_add):
6577
(JSC::JIT::emitSlowAdd32InPlace):
6578
(JSC::JIT::emitBinaryDoubleOp):
6579
(JSC::JIT::emit_op_mul):
6580
(JSC::JIT::emitSlow_op_mul):
6582
2009-05-20 Geoffrey Garen <ggaren@apple.com>
6584
Reviewed by Sam Weinig.
6586
Factored inline double operations into a helper function, so that we
6587
can reuse this code for other math operations.
6590
* jit/JITArithmetic.cpp:
6591
(JSC::JIT::emitBinaryDoubleOp):
6592
(JSC::JIT::emit_op_mul):
6594
(JSC::JIT::compileOpCallInitializeCallFrame):
6596
2009-05-20 Geoffrey Garen <ggaren@apple.com>
6598
Reviewed by Sam Weinig.
6600
Added support for inline multiplication of doubles.
6602
* assembler/X86Assembler.h:
6603
(JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an
6604
int32 into a double register.
6606
* jit/JITArithmetic.cpp:
6607
(JSC::JIT::emit_op_mul):
6608
(JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic.
6611
* jit/JITInlineMethods.h:
6612
(JSC::JIT::addressFor): New function, useful for addressing a JSValue's
6613
full 64bits as a double.
6615
2009-05-19 Sam Weinig <sam@webkit.org>
6617
Reviewed by Geoffrey Garen.
6619
Implement and enable optimized calls.
6622
(JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards
6623
around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink).
6624
Update the trampolines to account for the new JSValue representation.
6625
(JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue.
6628
(JSC::JIT::compileOpCall): Update to account for the new JSValue representation
6629
(JSC::JIT::compileOpCallSlowCase): Ditto.
6631
* jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard.
6633
* wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL.
6635
2009-05-19 Sam Weinig <sam@webkit.org>
6637
Reviewed by Geoffrey Garen.
6639
Implement and enable optimized property access.
6641
* assembler/AbstractMacroAssembler.h: Fix comment.
6643
(JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline
6644
and implement the string length trampoline.
6645
* jit/JIT.h: Add new constants for patch offsets.
6646
* jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h.
6647
* jit/JITPropertyAccess.cpp:
6648
(JSC::JIT::emit_op_get_by_id):
6649
(JSC::JIT::emitSlow_op_get_by_id):
6650
(JSC::JIT::emit_op_put_by_id):
6651
(JSC::JIT::emitSlow_op_put_by_id):
6652
(JSC::JIT::compilePutDirectOffset):
6653
(JSC::JIT::compileGetDirectOffset):
6654
(JSC::JIT::privateCompilePutByIdTransition):
6655
(JSC::JIT::patchGetByIdSelf):
6656
(JSC::JIT::patchPutByIdReplace):
6657
(JSC::JIT::privateCompilePatchGetArrayLength):
6658
(JSC::JIT::privateCompileGetByIdProto):
6659
(JSC::JIT::privateCompileGetByIdSelfList):
6660
(JSC::JIT::privateCompileGetByIdProtoList):
6661
(JSC::JIT::privateCompileGetByIdChainList):
6662
(JSC::JIT::privateCompileGetByIdChain):
6663
* jit/JITStubCall.h:
6664
(JSC::JITStubCall::addArgument): Add version of addArgument that takes
6665
two registers for the tag and payload.
6667
(JSC::JITStubs::JITStubs): Remove array length trampoline pointer.
6668
(JSC::JITStubs::cti_op_get_by_id_self_fail):
6670
* runtime/JSObject.h:
6671
(JSC::JSObject::JSObject): Move m_inheritorID below the property storage
6672
to align it to a 16 byte boundary.
6673
* wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
6674
* wtf/StdLibExtras.h: Move FIELD_OFFSET here.
6676
2009-05-17 Sam Weinig <sam@webkit.org>
6678
Reviewed by Geoffrey Garen.
6680
Remove unneeded ExecState parameter from the number JSValue constructors.
6682
* runtime/JSValue.h:
6685
(JSC::JSValue::JSValue):
6687
2009-05-15 Sam Weinig <sam@webkit.org>
6689
Reviewed by Geoffrey Garen.
6691
Implemented fast path for op_put_by_val when putting to arrays.
6693
* jit/JITPropertyAccess.cpp:
6694
(JSC::JIT::emit_op_put_by_val):
6695
(JSC::JIT::emitSlow_op_put_by_val):
6697
2009-05-15 Geoffrey Garen <ggaren@apple.com> (Mostly by Sam)
6699
Reviewed by Sam Weinig.
6701
Implemented fast path for op_get_by_val when accessing array.
6704
* jit/JITPropertyAccess.cpp:
6705
(JSC::JIT::emit_op_get_by_val):
6706
(JSC::JIT::emitSlow_op_get_by_val):
6708
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6710
Reviewed by Sam Weinig.
6712
Fixed a failure in fast/js/math-transforms.html caused by failing to
6713
preserve -0 in multiplication.
6715
* assembler/X86Assembler.h:
6716
(JSC::X86Assembler::jz):
6717
* jit/JITArithmetic.cpp:
6718
(JSC::JIT::emit_op_mul):
6719
(JSC::JIT::emitSlow_op_mul):
6720
(JSC::JIT::emitMul32Constant):
6721
(JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
6722
doing multiplication. Use a slow case to get these right.
6724
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6726
Reviewed by Sam Weinig.
6728
Fixed a bug in the varargs calling convention.
6731
(JSC::JIT::compileOpCallVarargs): Move the argument count into regT1,
6732
since that's where ctiVirtualCall expects it to be.
6734
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6736
Reviewed by Sam Weinig.
6738
Fixed a small bug in instanceof's looping code.
6740
* jit/JITOpcodes.cpp:
6741
(JSC::JIT::emit_op_instanceof): NULL means the object has no prototype,
6742
so only loop when *not* equal to NULL.
6744
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6746
Reviewed by Sam Weinig.
6748
Fixed a small bug in instanceof's result writing code.
6750
* jit/JITOpcodes.cpp:
6751
(JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits
6754
2009-05-14 Sam Weinig <sam@webkit.org>
6756
Reviewed by Geoffrey Garen.
6758
Removed an invalid assertion in cti_op_urshift which
6759
depended on a fast path for op_urshift which has
6763
(JSC::JITStubs::cti_op_urshift):
6765
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6767
Reviewed by Sam Weinig.
6769
Fixed loop_if_true, which had the same reversed test that jtrue had.
6771
* jit/JITOpcodes.cpp:
6772
(JSC::JIT::emit_op_loop_if_true):
6774
2009-05-14 Sam Weinig <sam@webkit.org>
6776
Reviewed by Geoffrey Garen.
6778
In op_neq, we apparently want to check that one value
6779
does *not* equal another. Go figure.
6781
* jit/JITOpcodes.cpp:
6782
(JSC::JIT::emit_op_neq):
6784
2009-05-14 Sam Weinig <sam@webkit.org>
6786
Reviewed by Geoffrey Garen.
6788
The slow case of op_mod should call op_mod's jit stub,
6789
not op_mul. That would be dumb.
6791
* jit/JITArithmetic.cpp:
6792
(JSC::JIT::emitSlow_op_mod):
6794
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6796
Reviewed by Sam Weinig.
6798
Fixed problems when using 'arguments' due to a half-initialized register.
6800
* interpreter/CallFrame.h:
6801
(JSC::ExecState::setCalleeArguments):
6802
(JSC::ExecState::init): Require a full JSValue when setting up the
6803
'arguments' virtual register, since this register is accessible from JIT
6804
code and bytecode, and needs to be a true JSValue.
6806
* interpreter/CallFrameClosure.h:
6807
(JSC::CallFrameClosure::resetCallFrame): ditto
6809
* interpreter/Interpreter.cpp:
6810
(JSC::Interpreter::privateExecute): ditto
6812
* interpreter/Register.h: Removed the constructor that allowed assignment
6813
of a JSArguments* to a register. That is not safe. See above.
6816
(JSC::JITStubs::cti_op_create_arguments):
6817
(JSC::JITStubs::cti_op_create_arguments_no_params): ditto
6819
2009-05-14 Sam Weinig <sam@webkit.org>
6821
Reviewed by Geoffrey Garen.
6823
We really want to go to the slow case in op_jfalse and
6824
op_jtrue if the value is *not* boolean.
6826
* jit/JITOpcodes.cpp:
6827
(JSC::JIT::emit_op_jfalse):
6828
(JSC::JIT::emit_op_jtrue):
6830
2009-05-14 Sam Weinig <sam@webkit.org>
6832
Reviewed by Geoffrey Garen.
6834
Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq
6835
if the first operand is a constant.
6837
* jit/JITOpcodes.cpp:
6838
(JSC::JIT::emit_op_loop_if_less):
6839
(JSC::JIT::emit_op_loop_if_lesseq):
6841
2009-05-14 Sam Weinig <sam@webkit.org>
6843
Reviewed by Geoffrey Garen.
6845
Added missing return in op_jnless and op_jnlesseq.
6847
* jit/JITArithmetic.cpp:
6848
(JSC::JIT::emit_op_jnless):
6849
(JSC::JIT::emit_op_jnlesseq):
6851
2009-05-14 Sam Weinig <sam@webkit.org>
6853
Reviewed by Geoffrey Garen.
6855
Load constants into the the register file as a temporary measure to
6856
aid bring up. This allows us to use to treat constants like any
6857
other virtual register.
6859
* jit/JITOpcodes.cpp:
6860
(JSC::JIT::emit_op_enter):
6861
(JSC::JIT::emit_op_enter_with_activation):
6863
2009-05-14 Geoffrey Garen <ggaren@apple.com>
6865
Reviewed by Sam Weinig.
6867
Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.
6869
* assembler/MacroAssemblerX86Common.h:
6870
(JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
6871
faster than set32, and the new value representation usually doesn't
6876
* jit/JITInlineMethods.h:
6877
(JSC::JIT::emitLoadTag):
6878
(JSC::JIT::emitLoadPayload): Added helper functions for dealing with
6879
constants. Eventually, we should write special cases for all constants,
6880
but these are helpful in the short term.
6882
* jit/JITOpcodes.cpp:
6883
(JSC::JIT::compileOpStrictEq):
6884
(JSC::JIT::emitSlow_op_stricteq):
6885
(JSC::JIT::emitSlow_op_nstricteq): teh opcodez.
6887
* runtime/JSValue.h:
6889
(JSC::JSValue::isDouble): Added a LowestTag for clarity.
6891
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6893
Reviewed by Sam Weinig.
6895
Fixed some bugs in host function calls.
6899
* jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
6900
which is how JSValues are now returned. Also changed the code that
6901
passes thisValue to pass the full 64bits of the value. Also added
6902
an #error compiler directive to other platform builds, since the JSValue
6903
return signature probably won't return in edx:eax on those platforms,
6904
and we'll have to investigate a solution.
6906
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6908
Reviewed by Sam Weinig.
6910
Removed parameters from functions that are intended never to use their
6913
* jit/JITPropertyAccess.cpp:
6914
(JSC::JIT::emitSlow_op_get_by_val):
6915
(JSC::JIT::emitSlow_op_put_by_val):
6917
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6919
Reviewed by Sam Weinig.
6921
Ported op_instance_of from TOT. It's basically the same, but some register
6922
stuff changed to memory stuff.
6924
* jit/JITInlineMethods.h:
6925
(JSC::JIT::emitPutJITStubArgFromVirtualRegister):
6926
(JSC::JIT::emitStore): Changed to use helper functions.
6928
* jit/JITOpcodes.cpp:
6929
(JSC::JIT::emit_op_instanceof):
6930
(JSC::JIT::emitSlow_op_instanceof): Ported from TOT.
6932
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6934
Reviewed by Gavin Barraclough.
6936
Added a comment to explain an exception-handling subtelty that we found
6937
hard to remember when reviewing my last patch.
6939
* jit/JITOpcodes.cpp:
6940
(JSC::JIT::emit_op_catch):
6942
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6944
Reviewed by Sam Weinig.
6946
Implemented try/catch.
6948
* jit/JITOpcodes.cpp:
6949
(JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction.
6950
(JSC::JIT::emit_op_catch): Filled out.
6952
2009-05-13 Sam Weinig <sam@webkit.org>
6954
Reviewed by Geoffrey Garen.
6956
Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null
6958
* jit/JITOpcodes.cpp:
6959
(JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its
6962
(JSC::JIT::emit_op_loop_if_true): Similar to the old version
6963
in that it tries to do the integer case first and reduce the
6964
number of jumps you might need to take.
6965
(JSC::JIT::emitSlow_op_loop_if_true):
6967
(JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only
6968
the inverse and without a timeout check.
6969
(JSC::JIT::emitSlow_op_jfalse):
6971
(JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except
6972
without the timeout check.
6973
(JSC::JIT::emitSlow_op_jtrue):
6975
(JSC::JIT::emit_op_jeq_null): Very similar to the implementation
6976
of op_eq, except it takes jumps instead of copying the condition
6978
(JSC::JIT::emit_op_jneq_null): Ditto but for op_neq.
6980
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6982
Reviewed by Sam Weinig.
6984
Implemented op_call_varargs.
6987
(JSC::JIT::compileOpCallVarargsSetupArgs):
6988
(JSC::JIT::compileOpCallVarargs):
6989
(JSC::JIT::emit_op_call):
6990
(JSC::JIT::emit_op_call_eval):
6991
(JSC::JIT::emit_op_load_varargs):
6992
(JSC::JIT::emit_op_call_varargs):
6993
(JSC::JIT::emit_op_construct):
6994
* jit/JITOpcodes.cpp:
6995
(JSC::JIT::emit_op_jneq_ptr):
6997
2009-05-13 Geoffrey Garen <ggaren@apple.com>
6999
Reviewed by Sam Weinig.
7001
Implemented op_call_eval.
7004
(JSC::JIT::compileOpCallVarargsSetupArgs):
7005
(JSC::JIT::compileOpCall):
7006
* jit/JITStubCall.h:
7007
(JSC::CallEvalJITStub::CallEvalJITStub):
7009
2009-05-13 Sam Weinig <sam@webkit.org>
7011
Reviewed by Gavin Barraclough.
7013
Implemented op_not. (Gavin did most of the work!)
7015
* jit/JITOpcodes.cpp:
7016
(JSC::JIT::emit_op_not):
7017
(JSC::JIT::emitSlow_op_not):
7019
2009-05-13 Geoffrey Garen <ggaren@apple.com>
7021
Reviewed by Sam Weinig.
7023
Implemented op_global_resolve.
7025
* jit/JITOpcodes.cpp:
7026
(JSC::JIT::emit_op_loop_if_less):
7027
(JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed
7030
(JSC::JIT::emit_op_resolve_global):
7032
(JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code,
7033
but we need two reads and a TimesEight step in order to account for the
7037
(JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*,
7038
to avoid having to pass an irrelevant tag pointer to the stub.
7040
2009-05-13 Sam Weinig <sam@webkit.org>
7042
Reviewed by Geoffrey Garen.
7044
Implemented op_to_jsnumber.
7046
* jit/JITOpcodes.cpp:
7047
(JSC::JIT::emit_op_to_jsnumber):
7048
(JSC::JIT::emitSlow_op_to_jsnumber):
7050
2009-05-13 Sam Weinig <sam@webkit.org>
7052
Reviewed by Geoffrey Garen.
7054
Implemented op_convert_this.
7056
* jit/JITOpcodes.cpp:
7057
(JSC::JIT::emit_op_convert_this):
7058
(JSC::JIT::emitSlow_op_convert_this):
7060
2009-05-13 Geoffrey Garen <ggaren@apple.com>
7062
Reviewed by Sam Weinig.
7064
Got basic JS function and constructor calls working.
7067
(JSC::JIT::privateCompileCTIMachineTrampolines):
7070
(JSC::JIT::compileOpCallSetupArgs):
7071
(JSC::JIT::compileOpCallVarargsSetupArgs):
7072
(JSC::JIT::compileOpConstructSetupArgs):
7073
(JSC::JIT::emit_op_ret):
7074
(JSC::JIT::emit_op_construct_verify):
7075
(JSC::JIT::emitSlow_op_construct_verify):
7076
(JSC::JIT::emitSlow_op_call):
7077
(JSC::JIT::emitSlow_op_call_eval):
7078
(JSC::JIT::emitSlow_op_call_varargs):
7079
(JSC::JIT::emitSlow_op_construct):
7080
(JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out.
7082
* jit/JITInlineMethods.h:
7083
(JSC::JIT::emitPutJITStubArgFromVirtualRegister):
7084
(JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
7085
since I wanted to avoid the complexity of revamping the API here while
7086
trying to bring it up. Eventually, we should re-remove all of these functions.
7088
(JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
7089
not silence me, Sam Weinig! The world will know that you are a crufty,
7090
crufty, crufty programmer!!!
7092
* jit/JITOpcodes.cpp:
7095
* jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
7096
and off-by-one error was causing stack misalignment.
7098
2009-05-13 Sam Weinig <sam@webkit.org>
7100
Reviewed by Geoffrey Garen.
7102
Implement op_eq_null and op_neq_null.
7104
* assembler/MacroAssemblerX86Common.h:
7105
(JSC::MacroAssemblerX86Common::set8):
7106
(JSC::MacroAssemblerX86Common::setTest8):
7107
* jit/JITOpcodes.cpp:
7108
(JSC::JIT::emit_op_stricteq):
7109
(JSC::JIT::emitSlow_op_stricteq):
7110
(JSC::JIT::emit_op_nstricteq):
7111
(JSC::JIT::emitSlow_op_nstricteq):
7112
(JSC::JIT::emit_op_eq_null):
7113
(JSC::JIT::emit_op_neq_null):
7116
2009-05-12 Sam Weinig <sam@webkit.org>
7118
Reviewed by Geoffrey Garen.
7120
Implement op_new_error.
7122
* jit/JITOpcodes.cpp:
7123
(JSC::JIT::emit_op_new_error):
7124
* jit/JITStubCall.h:
7125
(JSC::JITStubCall::addArgument): Add a version of addArgument
7126
that takes a constant JSValue.
7128
2009-05-12 Sam Weinig <sam@webkit.org>
7130
Reviewed by Geoffrey Garen.
7132
Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister.
7137
2009-05-12 Sam Weinig <sam@webkit.org>
7139
Reviewed by Geoffrey Garen.
7141
Implement op_to_primitive and op_next_pname.
7143
* jit/JITOpcodes.cpp:
7144
(JSC::JIT::emitSlow_op_construct_verify):
7145
(JSC::JIT::emit_op_to_primitive):
7146
(JSC::JIT::emitSlow_op_to_primitive):
7147
(JSC::JIT::emitSlow_op_loop_if_true):
7148
(JSC::JIT::emit_op_jtrue):
7149
(JSC::JIT::emit_op_next_pname):
7151
2009-05-12 Sam Weinig <sam@webkit.org>
7153
Reviewed by Geoffrey Garen.
7155
Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and
7159
* jit/JITInlineMethods.h:
7161
(JSC::JIT::payloadFor):
7162
(JSC::JIT::emitLoad):
7163
(JSC::JIT::emitStore):
7164
(JSC::JIT::emitLoadReturnValue):
7165
* jit/JITOpcodes.cpp:
7166
(JSC::JIT::emit_op_get_global_var):
7167
(JSC::JIT::emit_op_put_global_var):
7168
(JSC::JIT::emit_op_get_scoped_var):
7169
(JSC::JIT::emit_op_put_scoped_var):
7170
(JSC::JIT::emit_op_unexpected_load):
7172
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7174
Reviewed by Sam Weinig.
7176
Added overflow handling to op_sub.
7179
* jit/JITArithmetic.cpp:
7180
(JSC::JIT::emitSlow_op_sub):
7181
(JSC::JIT::emitSlowSub32InPlaceLeft):
7183
2009-05-12 Sam Weinig <sam@webkit.org>
7185
Reviewed by Geoffrey Garen.
7187
Remove a function call by folding op_get_by_id and op_put_by_id into
7188
their respective compile functions.
7191
* jit/JITPropertyAccess.cpp:
7192
(JSC::JIT::emit_op_get_by_id):
7193
(JSC::JIT::emitSlow_op_get_by_id):
7194
(JSC::JIT::emit_op_put_by_id):
7195
(JSC::JIT::emitSlow_op_put_by_id):
7197
2009-05-12 Sam Weinig <sam@webkit.org>
7199
Reviewed by Geoffrey Garen.
7201
Make JITStubCall work in 64bit by making the stack index
7202
step dependent on the size of void*.
7204
* jit/JITStubCall.h:
7205
(JSC::JITStubCall::JITStubCall):
7206
(JSC::JITStubCall::addArgument):
7208
2009-05-12 Sam Weinig <sam@webkit.org>
7210
Reviewed by Geoffrey Garen.
7212
Implement simple version of property access opcodes
7213
which just call a stub functions.
7215
* jit/JITOpcodes.cpp:
7216
* jit/JITPropertyAccess.cpp:
7217
(JSC::JIT::emitSlow_op_put_by_id):
7218
(JSC::JIT::emitSlow_op_get_by_id):
7219
(JSC::JIT::emit_op_get_by_val):
7220
(JSC::JIT::emitSlow_op_get_by_val):
7221
(JSC::JIT::emit_op_put_by_val):
7222
(JSC::JIT::emitSlow_op_put_by_val):
7223
(JSC::JIT::emit_op_put_by_index):
7224
(JSC::JIT::emit_op_put_getter):
7225
(JSC::JIT::emit_op_put_setter):
7226
(JSC::JIT::emit_op_del_by_id):
7227
(JSC::JIT::compileGetByIdHotPath):
7228
(JSC::JIT::compilePutByIdHotPath):
7229
* jit/JITStubCall.h:
7230
(JSC::JITStubCall::addArgument):
7233
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7235
Reviewed by Sam Weinig.
7237
Added work-around for XCode debugging echo problem.
7242
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7244
Reviewed by Sam Weinig.
7246
Added overflow handling to op_add.
7249
* jit/JITArithmetic.cpp:
7250
(JSC::JIT::emitSlow_op_add):
7251
(JSC::JIT::emitSlowAdd32InPlace):
7253
2009-05-12 Sam Weinig <sam@webkit.org>
7255
Reviewed by Geoffrey Garen.
7257
Add slow cases for op_jnless or emit_op_jnlesseq.
7259
* jit/JITArithmetic.cpp:
7260
(JSC::JIT::emitSlow_op_jnless):
7261
(JSC::JIT::emitSlow_op_jnlesseq):
7263
2009-05-12 Sam Weinig <sam@webkit.org>
7265
Reviewed by Geoffrey Garen.
7267
Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq.
7268
No slow cases for op_jnless or emit_op_jnlesseq yet.
7270
* jit/JITArithmetic.cpp:
7271
(JSC::JIT::emit_op_jnless):
7272
(JSC::JIT::emitSlow_op_jnless):
7273
(JSC::JIT::emit_op_jnlesseq):
7274
(JSC::JIT::emitSlow_op_jnlesseq):
7275
* jit/JITOpcodes.cpp:
7276
(JSC::JIT::emit_op_loop_if_less):
7277
(JSC::JIT::emitSlow_op_loop_if_less):
7278
(JSC::JIT::emit_op_loop_if_lesseq):
7279
(JSC::JIT::emitSlow_op_loop_if_lesseq):
7281
2009-05-12 Sam Weinig <sam@webkit.org>
7283
Reviewed by Geoffrey Garen.
7285
Turn the RECORD_JUMP_TARGET macro into an inline function.
7288
* jit/JITInlineMethods.h:
7289
(JSC::JIT::recordJumpTarget):
7290
* jit/JITOpcodes.cpp:
7291
(JSC::JIT::emit_op_jmp):
7292
(JSC::JIT::emit_op_jsr):
7293
(JSC::JIT::emit_op_jmp_scopes):
7295
2009-05-12 Sam Weinig <sam@webkit.org>
7297
Add MacroAssemblerX86Common::set8 to fix the build.
7299
* assembler/MacroAssemblerX86Common.h:
7300
(JSC::MacroAssemblerX86Common::set8):
7302
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7304
Reviewed by Sam Weinig.
7306
Added overflow recovery for pre_inc and pre_dec.
7308
Turned some short-circuit code into early returns, as is the WebKit style.
7310
* jit/JITArithmetic.cpp:
7311
(JSC::JIT::emit_op_post_inc):
7312
(JSC::JIT::emitSlow_op_post_inc):
7313
(JSC::JIT::emit_op_post_dec):
7314
(JSC::JIT::emitSlow_op_post_dec):
7315
(JSC::JIT::emitSlow_op_pre_inc):
7316
(JSC::JIT::emitSlow_op_pre_dec):
7318
2009-05-12 Sam Weinig <sam@webkit.org>
7320
Reviewed by Geoffrey Garen.
7322
Implement op_jmp, op_loop, op_eq and op_neq.
7324
* jit/JITOpcodes.cpp:
7325
(JSC::JIT::emit_op_jmp):
7326
(JSC::JIT::emit_op_loop):
7327
(JSC::JIT::emit_op_eq):
7328
(JSC::JIT::emitSlow_op_eq):
7329
(JSC::JIT::emit_op_neq):
7330
(JSC::JIT::emitSlow_op_neq):
7331
(JSC::JIT::emit_op_enter):
7332
(JSC::JIT::emit_op_enter_with_activation):
7334
2009-05-12 Sam Weinig <sam@webkit.org>
7336
Reviewed by Geoffrey Garen.
7338
Implement the slow cases for arithmetic opcodes.
7340
* jit/JITArithmetic.cpp:
7341
(JSC::JIT::emitSlow_op_lshift):
7342
(JSC::JIT::emitSlow_op_rshift):
7343
(JSC::JIT::emitSlow_op_bitand):
7344
(JSC::JIT::emitSlow_op_bitor):
7345
(JSC::JIT::emitSlow_op_bitxor):
7346
(JSC::JIT::emitSlow_op_bitnot):
7347
(JSC::JIT::emitSlow_op_sub):
7348
(JSC::JIT::emitSlow_op_mul):
7349
(JSC::JIT::emitSlow_op_mod):
7350
(JSC::JIT::emit_op_mod):
7352
2009-05-12 Sam Weinig <sam@webkit.org>
7354
Reviewed by Geoffrey Garen.
7356
Implement op_bitnot.
7358
* assembler/MacroAssemblerX86Common.h:
7359
(JSC::MacroAssemblerX86Common::not32):
7360
* assembler/X86Assembler.h:
7361
(JSC::X86Assembler::notl_m):
7362
* jit/JITArithmetic.cpp:
7363
(JSC::JIT::emit_op_bitnot):
7365
2009-05-12 Sam Weinig <sam@webkit.org>
7367
Reviewed by Geoffrey Garen.
7369
Add arithmetic opcode implementations from the old nitro-extreme branch.
7372
* jit/JITArithmetic.cpp:
7373
(JSC::JIT::emit_op_jnless):
7374
(JSC::JIT::emitSlow_op_jnless):
7375
(JSC::JIT::emit_op_jnlesseq):
7376
(JSC::JIT::emitSlow_op_jnlesseq):
7377
(JSC::JIT::emit_op_lshift):
7378
(JSC::JIT::emitSlow_op_lshift):
7379
(JSC::JIT::emit_op_rshift):
7380
(JSC::JIT::emitSlow_op_rshift):
7381
(JSC::JIT::emit_op_bitand):
7382
(JSC::JIT::emitBitAnd32Constant):
7383
(JSC::JIT::emitBitAnd32InPlace):
7384
(JSC::JIT::emit_op_bitor):
7385
(JSC::JIT::emitSlow_op_bitor):
7386
(JSC::JIT::emitBitOr32Constant):
7387
(JSC::JIT::emitBitOr32InPlace):
7388
(JSC::JIT::emit_op_bitxor):
7389
(JSC::JIT::emitSlow_op_bitxor):
7390
(JSC::JIT::emitBitXor32Constant):
7391
(JSC::JIT::emitBitXor32InPlace):
7392
(JSC::JIT::emit_op_bitnot):
7393
(JSC::JIT::emitSlow_op_bitnot):
7394
(JSC::JIT::emit_op_post_inc):
7395
(JSC::JIT::emitSlow_op_post_inc):
7396
(JSC::JIT::emit_op_post_dec):
7397
(JSC::JIT::emitSlow_op_post_dec):
7398
(JSC::JIT::emit_op_pre_inc):
7399
(JSC::JIT::emitSlow_op_pre_inc):
7400
(JSC::JIT::emit_op_pre_dec):
7401
(JSC::JIT::emitSlow_op_pre_dec):
7402
(JSC::JIT::emit_op_add):
7403
(JSC::JIT::emitAdd32Constant):
7404
(JSC::JIT::emitAdd32InPlace):
7405
(JSC::JIT::emitSlow_op_add):
7406
(JSC::JIT::emit_op_sub):
7407
(JSC::JIT::emitSlow_op_sub):
7408
(JSC::JIT::emitSub32ConstantLeft):
7409
(JSC::JIT::emitSub32ConstantRight):
7410
(JSC::JIT::emitSub32InPlaceLeft):
7411
(JSC::JIT::emitSub32InPlaceRight):
7412
(JSC::JIT::emit_op_mul):
7413
(JSC::JIT::emitSlow_op_mul):
7414
(JSC::JIT::emitMul32Constant):
7415
(JSC::JIT::emitMul32InPlace):
7416
(JSC::JIT::emit_op_mod):
7417
(JSC::JIT::emitSlow_op_mod):
7418
* jit/JITOpcodes.cpp:
7420
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7422
Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit
7423
value representations.
7425
Added JSAPIValueWrapper to the repository.
7428
* jit/JITArithmetic.cpp:
7429
* runtime/JSAPIValueWrapper.cpp: Added.
7430
(JSC::JSAPIValueWrapper::toPrimitive):
7431
(JSC::JSAPIValueWrapper::getPrimitiveNumber):
7432
(JSC::JSAPIValueWrapper::toBoolean):
7433
(JSC::JSAPIValueWrapper::toNumber):
7434
(JSC::JSAPIValueWrapper::toString):
7435
(JSC::JSAPIValueWrapper::toObject):
7436
* runtime/JSAPIValueWrapper.h: Added.
7437
(JSC::JSAPIValueWrapper::value):
7438
(JSC::JSAPIValueWrapper::isAPIValueWrapper):
7439
(JSC::JSAPIValueWrapper::JSAPIValueWrapper):
7440
(JSC::jsAPIValueWrapper):
7443
2009-05-12 Geoffrey Garen <ggaren@apple.com>
7445
Turned on the JIT and got it building and running the most trivial of
7448
All configurable optimizations are turned off, and a few opcodes are ad
7451
So far, I've only merged op_mov and op_end, but some stub-reliant
7452
opcodes work as-is from TOT.
7454
* bytecode/CodeBlock.cpp:
7455
(JSC::CodeBlock::~CodeBlock):
7456
* bytecode/CodeBlock.h:
7458
(JSC::JIT::compileOpStrictEq):
7460
* jit/JITArithmetic.cpp:
7461
(JSC::JIT::emit_op_lshift):
7462
(JSC::JIT::emitSlow_op_lshift):
7463
(JSC::JIT::emit_op_rshift):
7464
(JSC::JIT::emitSlow_op_rshift):
7465
(JSC::JIT::emit_op_jnless):
7466
(JSC::JIT::emitSlow_op_jnless):
7467
(JSC::JIT::emit_op_jnlesseq):
7468
(JSC::JIT::emitSlow_op_jnlesseq):
7469
(JSC::JIT::emit_op_bitand):
7470
(JSC::JIT::emitSlow_op_bitand):
7471
(JSC::JIT::emit_op_post_inc):
7472
(JSC::JIT::emitSlow_op_post_inc):
7473
(JSC::JIT::emit_op_post_dec):
7474
(JSC::JIT::emitSlow_op_post_dec):
7475
(JSC::JIT::emit_op_pre_inc):
7476
(JSC::JIT::emitSlow_op_pre_inc):
7477
(JSC::JIT::emit_op_pre_dec):
7478
(JSC::JIT::emitSlow_op_pre_dec):
7479
(JSC::JIT::emit_op_mod):
7480
(JSC::JIT::emitSlow_op_mod):
7481
(JSC::JIT::emit_op_add):
7482
(JSC::JIT::emit_op_mul):
7483
(JSC::JIT::emit_op_sub):
7484
(JSC::JIT::compileBinaryArithOpSlowCase):
7485
(JSC::JIT::emitSlow_op_add):
7486
(JSC::JIT::emitSlow_op_mul):
7488
(JSC::JIT::compileOpCallInitializeCallFrame):
7489
(JSC::JIT::compileOpConstructSetupArgs):
7490
(JSC::JIT::compileOpCallVarargs):
7491
(JSC::JIT::compileOpCall):
7492
(JSC::JIT::compileOpCallSlowCase):
7493
* jit/JITInlineMethods.h:
7494
(JSC::JIT::getConstantOperandImmediateInt):
7495
(JSC::JIT::isOperandConstantImmediateInt):
7496
(JSC::JIT::emitInitRegister):
7497
(JSC::JIT::addSlowCase):
7498
(JSC::JIT::addJump):
7499
(JSC::JIT::emitJumpSlowToHot):
7501
(JSC::JIT::payloadFor):
7502
(JSC::JIT::emitLoad):
7503
(JSC::JIT::emitLoadReturnValue):
7504
(JSC::JIT::emitStore):
7505
(JSC::JIT::emitStoreReturnValue):
7506
* jit/JITOpcodes.cpp:
7507
(JSC::JIT::emit_op_mov):
7508
(JSC::JIT::emit_op_end):
7509
(JSC::JIT::emit_op_jmp):
7510
(JSC::JIT::emit_op_loop):
7511
(JSC::JIT::emit_op_loop_if_less):
7512
(JSC::JIT::emit_op_loop_if_lesseq):
7513
(JSC::JIT::emit_op_instanceof):
7514
(JSC::JIT::emit_op_get_global_var):
7515
(JSC::JIT::emit_op_put_global_var):
7516
(JSC::JIT::emit_op_get_scoped_var):
7517
(JSC::JIT::emit_op_put_scoped_var):
7518
(JSC::JIT::emit_op_tear_off_activation):
7519
(JSC::JIT::emit_op_ret):
7520
(JSC::JIT::emit_op_construct_verify):
7521
(JSC::JIT::emit_op_to_primitive):
7522
(JSC::JIT::emit_op_loop_if_true):
7523
(JSC::JIT::emit_op_resolve_global):
7524
(JSC::JIT::emit_op_not):
7525
(JSC::JIT::emit_op_jfalse):
7526
(JSC::JIT::emit_op_jeq_null):
7527
(JSC::JIT::emit_op_jneq_null):
7528
(JSC::JIT::emit_op_jneq_ptr):
7529
(JSC::JIT::emit_op_unexpected_load):
7530
(JSC::JIT::emit_op_eq):
7531
(JSC::JIT::emit_op_bitnot):
7532
(JSC::JIT::emit_op_jtrue):
7533
(JSC::JIT::emit_op_neq):
7534
(JSC::JIT::emit_op_bitxor):
7535
(JSC::JIT::emit_op_bitor):
7536
(JSC::JIT::emit_op_throw):
7537
(JSC::JIT::emit_op_next_pname):
7538
(JSC::JIT::emit_op_push_scope):
7539
(JSC::JIT::emit_op_to_jsnumber):
7540
(JSC::JIT::emit_op_push_new_scope):
7541
(JSC::JIT::emit_op_catch):
7542
(JSC::JIT::emit_op_switch_imm):
7543
(JSC::JIT::emit_op_switch_char):
7544
(JSC::JIT::emit_op_switch_string):
7545
(JSC::JIT::emit_op_new_error):
7546
(JSC::JIT::emit_op_eq_null):
7547
(JSC::JIT::emit_op_neq_null):
7548
(JSC::JIT::emit_op_convert_this):
7549
(JSC::JIT::emit_op_profile_will_call):
7550
(JSC::JIT::emit_op_profile_did_call):
7551
(JSC::JIT::emitSlow_op_construct_verify):
7552
(JSC::JIT::emitSlow_op_get_by_val):
7553
(JSC::JIT::emitSlow_op_loop_if_less):
7554
(JSC::JIT::emitSlow_op_loop_if_lesseq):
7555
(JSC::JIT::emitSlow_op_put_by_val):
7556
(JSC::JIT::emitSlow_op_not):
7557
(JSC::JIT::emitSlow_op_instanceof):
7558
* jit/JITPropertyAccess.cpp:
7559
(JSC::JIT::emit_op_get_by_val):
7560
(JSC::JIT::emit_op_put_by_val):
7561
(JSC::JIT::emit_op_put_by_index):
7562
(JSC::JIT::emit_op_put_getter):
7563
(JSC::JIT::emit_op_put_setter):
7564
(JSC::JIT::emit_op_del_by_id):
7565
(JSC::JIT::compileGetByIdHotPath):
7566
(JSC::JIT::compilePutByIdHotPath):
7567
* jit/JITStubCall.h:
7568
(JSC::JITStubCall::JITStubCall):
7569
(JSC::JITStubCall::addArgument):
7570
(JSC::JITStubCall::call):
7571
(JSC::JITStubCall::):
7572
(JSC::CallEvalJITStub::CallEvalJITStub):
7575
(JSC::JITStubs::cti_op_add):
7576
(JSC::JITStubs::cti_op_pre_inc):
7577
(JSC::JITStubs::cti_op_mul):
7578
(JSC::JITStubs::cti_op_get_by_val):
7579
(JSC::JITStubs::cti_op_get_by_val_string):
7580
(JSC::JITStubs::cti_op_get_by_val_byte_array):
7581
(JSC::JITStubs::cti_op_sub):
7582
(JSC::JITStubs::cti_op_put_by_val):
7583
(JSC::JITStubs::cti_op_put_by_val_array):
7584
(JSC::JITStubs::cti_op_put_by_val_byte_array):
7585
(JSC::JITStubs::cti_op_negate):
7586
(JSC::JITStubs::cti_op_div):
7587
(JSC::JITStubs::cti_op_pre_dec):
7588
(JSC::JITStubs::cti_op_post_inc):
7589
(JSC::JITStubs::cti_op_eq):
7590
(JSC::JITStubs::cti_op_lshift):
7591
(JSC::JITStubs::cti_op_bitand):
7592
(JSC::JITStubs::cti_op_rshift):
7593
(JSC::JITStubs::cti_op_bitnot):
7594
(JSC::JITStubs::cti_op_mod):
7595
(JSC::JITStubs::cti_op_neq):
7596
(JSC::JITStubs::cti_op_post_dec):
7597
(JSC::JITStubs::cti_op_urshift):
7598
(JSC::JITStubs::cti_op_bitxor):
7599
(JSC::JITStubs::cti_op_bitor):
7600
(JSC::JITStubs::cti_op_switch_imm):
7602
* runtime/JSArray.cpp:
7603
(JSC::JSArray::JSArray):
7604
* runtime/JSFunction.cpp:
7605
(JSC::JSFunction::~JSFunction):
7606
* runtime/JSValue.h:
7607
(JSC::JSValue::payload):
7610
2009-05-07 Sam Weinig <sam@webkit.org>
7612
Reviewed by Geoffrey Garen.
7614
Add some new MacroAssembler and assembler functions that will be needed shortly.
7616
* assembler/MacroAssemblerX86Common.h:
7617
(JSC::MacroAssemblerX86Common::add32):
7618
(JSC::MacroAssemblerX86Common::and32):
7619
(JSC::MacroAssemblerX86Common::mul32):
7620
(JSC::MacroAssemblerX86Common::neg32):
7621
(JSC::MacroAssemblerX86Common::or32):
7622
(JSC::MacroAssemblerX86Common::sub32):
7623
(JSC::MacroAssemblerX86Common::xor32):
7624
(JSC::MacroAssemblerX86Common::branchAdd32):
7625
(JSC::MacroAssemblerX86Common::branchMul32):
7626
(JSC::MacroAssemblerX86Common::branchSub32):
7627
* assembler/X86Assembler.h:
7628
(JSC::X86Assembler::):
7629
(JSC::X86Assembler::addl_rm):
7630
(JSC::X86Assembler::andl_mr):
7631
(JSC::X86Assembler::andl_rm):
7632
(JSC::X86Assembler::andl_im):
7633
(JSC::X86Assembler::negl_r):
7634
(JSC::X86Assembler::notl_r):
7635
(JSC::X86Assembler::orl_rm):
7636
(JSC::X86Assembler::orl_im):
7637
(JSC::X86Assembler::subl_rm):
7638
(JSC::X86Assembler::xorl_mr):
7639
(JSC::X86Assembler::xorl_rm):
7640
(JSC::X86Assembler::xorl_im):
7641
(JSC::X86Assembler::imull_mr):
7643
2009-05-11 Sam Weinig <sam@webkit.org>
7645
Reviewed by Cameron Zwarich.
7647
Remove the NumberHeap.
7649
* JavaScriptCore.exp:
7650
* runtime/Collector.cpp:
7652
(JSC::Heap::destroy):
7653
(JSC::Heap::recordExtraCost):
7654
(JSC::Heap::heapAllocate):
7655
(JSC::Heap::markConservatively):
7657
(JSC::Heap::collect):
7658
(JSC::Heap::objectCount):
7659
(JSC::Heap::statistics):
7661
(JSC::Heap::isBusy):
7662
* runtime/Collector.h:
7663
(JSC::Heap::globalData):
7666
2009-05-11 Geoffrey Garen <ggaren@apple.com>
7668
Reviewed by Sam Weinig.
7670
Land initial commit of new number representation for 32 bit platforms,
7676
* API/JSCallbackObjectFunctions.h:
7677
(JSC::::hasInstance):
7680
* API/tests/testapi.c:
7681
(EvilExceptionObject_convertToType):
7683
* JavaScriptCore.exp:
7684
* JavaScriptCore.xcodeproj/project.pbxproj:
7685
* bytecode/CodeBlock.cpp:
7686
(JSC::valueToSourceString):
7687
* bytecompiler/BytecodeGenerator.cpp:
7688
(JSC::BytecodeGenerator::emitLoad):
7689
(JSC::BytecodeGenerator::emitUnexpectedLoad):
7690
(JSC::keyForImmediateSwitch):
7691
* bytecompiler/BytecodeGenerator.h:
7692
* interpreter/Interpreter.cpp:
7693
(JSC::Interpreter::dumpRegisters):
7694
(JSC::Interpreter::privateExecute):
7696
(JSC::ArrayNode::emitBytecode):
7697
(JSC::processClauseList):
7698
* runtime/ArgList.h:
7699
* runtime/Collector.h:
7701
* runtime/DateMath.cpp:
7702
* runtime/ExceptionHelpers.h:
7703
* runtime/InitializeThreading.cpp:
7704
* runtime/JSArray.cpp:
7705
(JSC::JSArray::JSArray):
7706
* runtime/JSCell.cpp:
7708
(JSC::JSCell::isAPIValueWrapper):
7709
(JSC::JSValue::isString):
7710
(JSC::JSValue::isGetterSetter):
7711
(JSC::JSValue::isObject):
7712
(JSC::JSValue::getString):
7713
(JSC::JSValue::getObject):
7714
(JSC::JSValue::getCallData):
7715
(JSC::JSValue::getConstructData):
7716
(JSC::JSValue::getUInt32):
7717
(JSC::JSValue::marked):
7718
(JSC::JSValue::toPrimitive):
7719
(JSC::JSValue::getPrimitiveNumber):
7720
(JSC::JSValue::toBoolean):
7721
(JSC::JSValue::toNumber):
7722
(JSC::JSValue::toString):
7723
(JSC::JSValue::needsThisConversion):
7724
(JSC::JSValue::toThisString):
7725
(JSC::JSValue::getJSNumber):
7726
(JSC::JSValue::toObject):
7727
(JSC::JSValue::toThisObject):
7728
* runtime/JSGlobalData.cpp:
7729
(JSC::JSGlobalData::JSGlobalData):
7730
* runtime/JSGlobalData.h:
7731
* runtime/JSGlobalObject.h:
7732
(JSC::Structure::prototypeForLookup):
7733
* runtime/JSGlobalObjectFunctions.cpp:
7734
(JSC::globalFuncParseInt):
7735
* runtime/JSImmediate.h:
7736
* runtime/JSNumberCell.cpp: Removed.
7737
* runtime/JSNumberCell.h: Removed.
7738
* runtime/JSObject.h:
7739
(JSC::JSValue::get):
7740
(JSC::JSValue::put):
7741
* runtime/JSString.h:
7742
(JSC::JSValue::toThisJSString):
7743
* runtime/JSValue.cpp:
7744
(JSC::JSValue::toInteger):
7745
(JSC::JSValue::toIntegerPreserveNaN):
7746
(JSC::JSValue::toObjectSlowCase):
7747
(JSC::JSValue::toThisObjectSlowCase):
7748
(JSC::JSValue::synthesizeObject):
7749
(JSC::JSValue::synthesizePrototype):
7750
(JSC::JSValue::description):
7751
(JSC::nonInlineNaN):
7752
* runtime/JSValue.h:
7754
(JSC::EncodedJSValueHashTraits::emptyValue):
7760
(JSC::JSValue::encode):
7761
(JSC::JSValue::decode):
7762
(JSC::JSValue::JSValue):
7763
(JSC::JSValue::operator bool):
7764
(JSC::JSValue::operator==):
7765
(JSC::JSValue::operator!=):
7766
(JSC::JSValue::isUndefined):
7767
(JSC::JSValue::isNull):
7768
(JSC::JSValue::isUndefinedOrNull):
7769
(JSC::JSValue::isCell):
7770
(JSC::JSValue::isInt32):
7771
(JSC::JSValue::isUInt32):
7772
(JSC::JSValue::isDouble):
7773
(JSC::JSValue::isTrue):
7774
(JSC::JSValue::isFalse):
7775
(JSC::JSValue::tag):
7776
(JSC::JSValue::asInt32):
7777
(JSC::JSValue::asUInt32):
7778
(JSC::JSValue::asDouble):
7779
(JSC::JSValue::asCell):
7780
(JSC::JSValue::isNumber):
7781
(JSC::JSValue::isBoolean):
7782
(JSC::JSValue::getBoolean):
7783
(JSC::JSValue::uncheckedGetNumber):
7784
(JSC::JSValue::toJSNumber):
7785
(JSC::JSValue::getNumber):
7786
(JSC::JSValue::toInt32):
7787
(JSC::JSValue::toUInt32):
7788
* runtime/Operations.h:
7789
(JSC::JSValue::equal):
7790
(JSC::JSValue::equalSlowCaseInline):
7791
(JSC::JSValue::strictEqual):
7792
(JSC::JSValue::strictEqualSlowCaseInline):
7796
* runtime/PropertySlot.h:
7797
* runtime/StringPrototype.cpp:
7798
(JSC::stringProtoFuncCharAt):
7799
(JSC::stringProtoFuncCharCodeAt):
7800
(JSC::stringProtoFuncIndexOf):
7803
=== Start merge of nitro-extreme branch 2009-07-30 ===
7805
2009-07-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
7807
Reviewed by George Staikos.
7809
Resolve class/struct mixup in forward declarations
7810
https://bugs.webkit.org/show_bug.cgi?id=27708
7813
* bytecode/SamplingTool.h:
7814
* interpreter/Interpreter.h:
7816
* profiler/ProfileGenerator.h:
7817
* profiler/Profiler.h:
7818
* runtime/ClassInfo.h:
7819
* runtime/ExceptionHelpers.h:
7820
* runtime/JSByteArray.h:
7822
* runtime/JSFunction.h:
7823
* runtime/JSGlobalData.h:
7824
* runtime/JSObject.h:
7825
* runtime/JSString.h:
7827
2009-07-28 Ada Chan <adachan@apple.com>
7829
Reviewed by Darin Adler.
7831
https://bugs.webkit.org/show_bug.cgi?id=27236
7832
- Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows.
7833
- Use a background thread to periodically scavenge memory to release back to the system.
7835
* wtf/FastMalloc.cpp:
7836
(WTF::TCMalloc_PageHeap::init):
7837
(WTF::TCMalloc_PageHeap::runScavengerThread):
7838
(WTF::TCMalloc_PageHeap::scavenge):
7839
(WTF::TCMalloc_PageHeap::shouldContinueScavenging):
7840
(WTF::TCMalloc_PageHeap::New):
7841
(WTF::TCMalloc_PageHeap::AllocLarge):
7842
(WTF::TCMalloc_PageHeap::Delete):
7843
(WTF::TCMalloc_PageHeap::GrowHeap):
7845
(WTF::TCMalloc_PageHeap::scavengerThread):
7846
* wtf/TCSystemAlloc.cpp:
7847
(TCMalloc_SystemRelease):
7848
(TCMalloc_SystemCommit):
7849
* wtf/TCSystemAlloc.h:
7851
2009-07-28 Xan Lopez <xlopez@igalia.com>
7853
Add new files, fixes distcheck.
7857
2009-07-28 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
7859
Reviewed by Simon Hausmann.
7861
[Qt] Determining whether to use JIT or interpreter
7862
moved from JavaScriptCore.pri to Platform.h
7864
* JavaScriptCore.pri:
7867
2009-07-27 Brian Weinstein <bweinstein@apple.com>
7869
Fix of misuse of sort command.
7871
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7872
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7874
2009-07-27 Brian Weinstein <bweinstein@apple.com>
7876
Build fix for Windows.
7878
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7879
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7881
2009-07-27 Gavin Barraclough <barraclough@apple.com>
7883
Rubber stamped by Oliver Hunt.
7885
Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
7888
(JSC::JIT::privateCompile):
7889
(JSC::JIT::privateCompileCTIMachineTrampolines):
7891
* jit/JITInlineMethods.h:
7892
(JSC::JIT::preserveReturnAddressAfterCall):
7893
* jit/JITPropertyAccess.cpp:
7894
(JSC::JIT::privateCompilePutByIdTransition):
7896
2009-07-27 Alexey Proskuryakov <ap@webkit.org>
7900
* runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
7902
2009-07-27 Alexey Proskuryakov <ap@webkit.org>
7906
* runtime/JSLock.h: (JSC::JSLock::~JSLock):
7908
2009-07-27 Alexey Proskuryakov <ap@webkit.org>
7910
Reviewed by Darin Adler.
7912
https://bugs.webkit.org/show_bug.cgi?id=27735
7913
Give a helpful name to JSLock constructor argument
7917
* API/JSContextRef.cpp:
7918
* API/JSObjectRef.cpp:
7919
(JSPropertyNameArrayRelease):
7920
(JSPropertyNameAccumulatorAddName):
7921
* JavaScriptCore.exp:
7924
(cleanupGlobalData):
7926
* runtime/Collector.cpp:
7927
(JSC::Heap::destroy):
7928
* runtime/JSLock.cpp:
7929
(JSC::JSLock::JSLock):
7930
(JSC::JSLock::lock):
7931
(JSC::JSLock::unlock):
7932
(JSC::JSLock::DropAllLocks::DropAllLocks):
7933
(JSC::JSLock::DropAllLocks::~DropAllLocks):
7936
(JSC::JSLock::JSLock):
7937
(JSC::JSLock::~JSLock):
7939
2009-07-25 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
7941
Reviewed by Eric Seidel.
7943
Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
7944
https://bugs.webkit.org/show_bug.cgi?id=27342
7946
Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
7947
instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
7949
* API/JSObjectRef.cpp:
7951
2009-07-24 Ada Chan <adachan@apple.com>
7953
In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
7954
Remove TCMALLOC_TRACK_DECOMMITED_SPANS. We'll always track decommitted spans.
7955
We have tested this and show it has little impact on performance.
7957
Reviewed by Mark Rowe.
7959
* wtf/FastMalloc.cpp:
7960
(WTF::TCMalloc_PageHeap::New):
7961
(WTF::TCMalloc_PageHeap::AllocLarge):
7962
(WTF::propagateDecommittedState):
7963
(WTF::mergeDecommittedStates):
7964
(WTF::TCMalloc_PageHeap::Delete):
7965
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
7967
2009-07-24 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
7969
Reviewed by Darin Adler and Adam Barth.
7971
Build fix for x86 platforms.
7972
https://bugs.webkit.org/show_bug.cgi?id=27602
7976
2009-07-23 Kevin Ollivier <kevino@theolliviers.com>
7978
wx build fix, adding missing header.
7982
2009-07-22 Yong Li <yong.li@torchmobile.com>
7984
Reviewed by George Staikos.
7986
Add wince specific memory files into wtf/wince
7987
https://bugs.webkit.org/show_bug.cgi?id=27550
7989
* wtf/wince/FastMallocWince.h: Added.
7990
* wtf/wince/MemoryManager.cpp: Added.
7991
* wtf/wince/MemoryManager.h: Added.
7993
2009-07-23 Norbert Leser <norbert.leser@nokia.com>
7995
Reviewed by Simon Hausmann.
7997
Fix for missing mmap features in Symbian
7998
https://bugs.webkit.org/show_bug.cgi?id=24540
8000
Fix, conditionally for PLATFORM(SYMBIAN), as an alternative
8001
to missing support for the MAP_ANON property flag in mmap.
8002
It utilizes Symbian specific memory allocation features.
8004
* runtime/Collector.cpp
8006
2009-07-22 Gavin Barraclough <barraclough@apple.com>
8008
Reviewed by Sam Weinig.
8010
With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
8011
( https://bugs.webkit.org/show_bug.cgi?id=27564 )
8013
Currently we change permissions forwards and backwards for each instruction modified,
8014
instead we should only change permissions once per complete repatching event.
8016
2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
8017
which recoups 1/3 of the penalty of running with this mode enabled.
8019
* assembler/ARMAssembler.cpp:
8020
(JSC::ARMAssembler::linkBranch):
8021
- Replace usage of MakeWritable with cacheFlush.
8023
* assembler/ARMAssembler.h:
8024
(JSC::ARMAssembler::patchPointerInternal):
8025
(JSC::ARMAssembler::repatchLoadPtrToLEA):
8026
- Replace usage of MakeWritable with cacheFlush.
8028
* assembler/ARMv7Assembler.h:
8029
(JSC::ARMv7Assembler::relinkJump):
8030
(JSC::ARMv7Assembler::relinkCall):
8031
(JSC::ARMv7Assembler::repatchInt32):
8032
(JSC::ARMv7Assembler::repatchPointer):
8033
(JSC::ARMv7Assembler::repatchLoadPtrToLEA):
8034
(JSC::ARMv7Assembler::setInt32):
8035
- Replace usage of MakeWritable with cacheFlush.
8037
* assembler/LinkBuffer.h:
8038
(JSC::LinkBuffer::performFinalization):
8039
- Make explicit call to cacheFlush.
8041
* assembler/MacroAssemblerCodeRef.h:
8042
(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
8043
- Make size always available.
8045
* assembler/RepatchBuffer.h:
8046
(JSC::RepatchBuffer::RepatchBuffer):
8047
(JSC::RepatchBuffer::~RepatchBuffer):
8048
- Add calls to MakeWritable & makeExecutable.
8050
* assembler/X86Assembler.h:
8051
(JSC::X86Assembler::relinkJump):
8052
(JSC::X86Assembler::relinkCall):
8053
(JSC::X86Assembler::repatchInt32):
8054
(JSC::X86Assembler::repatchPointer):
8055
(JSC::X86Assembler::repatchLoadPtrToLEA):
8056
- Remove usage of MakeWritable.
8058
* bytecode/CodeBlock.h:
8059
(JSC::CodeBlock::getJITCode):
8060
- Provide access to CodeBlock's JITCode.
8062
* jit/ExecutableAllocator.h:
8063
(JSC::ExecutableAllocator::makeExecutable):
8064
(JSC::ExecutableAllocator::cacheFlush):
8065
- Remove MakeWritable, make cacheFlush public.
8068
(JSC::ctiPatchNearCallByReturnAddress):
8069
(JSC::ctiPatchCallByReturnAddress):
8070
(JSC::JIT::privateCompile):
8071
(JSC::JIT::unlinkCall):
8072
(JSC::JIT::linkCall):
8073
- Add CodeBlock argument to RepatchBuffer.
8076
- Pass CodeBlock argument for use by RepatchBuffer.
8079
(JSC::JITCode::start):
8080
(JSC::JITCode::size):
8081
- Provide access to code start & size.
8083
* jit/JITPropertyAccess.cpp:
8084
(JSC::JIT::privateCompilePutByIdTransition):
8085
(JSC::JIT::patchGetByIdSelf):
8086
(JSC::JIT::patchMethodCallProto):
8087
(JSC::JIT::patchPutByIdReplace):
8088
(JSC::JIT::privateCompilePatchGetArrayLength):
8089
(JSC::JIT::privateCompileGetByIdProto):
8090
(JSC::JIT::privateCompileGetByIdSelfList):
8091
(JSC::JIT::privateCompileGetByIdProtoList):
8092
(JSC::JIT::privateCompileGetByIdChainList):
8093
(JSC::JIT::privateCompileGetByIdChain):
8094
- Add CodeBlock argument to RepatchBuffer.
8097
(JSC::JITThunks::tryCachePutByID):
8098
(JSC::JITThunks::tryCacheGetByID):
8099
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
8100
- Pass CodeBlock argument for use by RepatchBuffer.
8102
2009-07-21 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
8104
Reviewed by Gavin Barraclough.
8106
Cache not only the structure of the method, but the
8107
structure of its prototype as well.
8108
https://bugs.webkit.org/show_bug.cgi?id=27077
8110
* bytecode/CodeBlock.cpp:
8111
(JSC::CodeBlock::~CodeBlock):
8112
* bytecode/CodeBlock.h:
8113
(JSC::MethodCallLinkInfo::MethodCallLinkInfo):
8114
* jit/JITPropertyAccess.cpp:
8115
(JSC::JIT::patchMethodCallProto):
8117
2009-07-21 Gavin Barraclough <barraclough@apple.com>
8119
Reviewed by Sam Weinig.
8121
Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
8122
( https://bugs.webkit.org/show_bug.cgi?id=27527 )
8124
This allows the implementation to be defined per architecture. Specifically this addresses the
8125
fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
8126
to register. Patching the call actually requires the pointer load to be patched, rather than
8127
the call to be patched. This is implementation detail specific to MacroAssemblerX86_64, and as
8128
such is best handled there.
8130
* assembler/AbstractMacroAssembler.h:
8131
* assembler/MacroAssemblerARM.h:
8132
(JSC::MacroAssemblerARM::linkCall):
8133
(JSC::MacroAssemblerARM::repatchCall):
8134
* assembler/MacroAssemblerARMv7.h:
8135
(JSC::MacroAssemblerARMv7::linkCall):
8136
(JSC::MacroAssemblerARMv7::repatchCall):
8137
* assembler/MacroAssemblerX86.h:
8138
(JSC::MacroAssemblerX86::linkCall):
8139
(JSC::MacroAssemblerX86::repatchCall):
8140
* assembler/MacroAssemblerX86_64.h:
8141
(JSC::MacroAssemblerX86_64::linkCall):
8142
(JSC::MacroAssemblerX86_64::repatchCall):
8144
2009-07-21 Adam Treat <adam.treat@torchmobile.com>
8146
Reviewed by George Staikos.
8148
Every wtf file includes other wtf files with <> style includes
8149
except this one. Fix the exception.
8153
2009-07-21 Gavin Barraclough <barraclough@apple.com>
8155
Reviewed by Oliver Hunt.
8157
Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
8158
( https://bugs.webkit.org/show_bug.cgi?id=27485 )
8160
This change is the first step in a process to move code that should be in
8161
the architecture-specific MacroAssembler classes up out of Assmbler and
8162
AbstractMacroAssembler.
8164
* JavaScriptCore.xcodeproj/project.pbxproj:
8167
* assembler/ARMAssembler.h:
8168
(JSC::ARMAssembler::linkPointer):
8169
- rename patchPointer to bring it in line with the current link/repatch naming scheme
8171
* assembler/ARMv7Assembler.h:
8172
(JSC::ARMv7Assembler::linkCall):
8173
(JSC::ARMv7Assembler::linkPointer):
8174
(JSC::ARMv7Assembler::relinkCall):
8175
(JSC::ARMv7Assembler::repatchInt32):
8176
(JSC::ARMv7Assembler::repatchPointer):
8177
(JSC::ARMv7Assembler::setInt32):
8178
(JSC::ARMv7Assembler::setPointer):
8179
- rename patchPointer to bring it in line with the current link/repatch naming scheme
8181
* assembler/AbstractMacroAssembler.h:
8182
(JSC::AbstractMacroAssembler::linkJump):
8183
(JSC::AbstractMacroAssembler::linkCall):
8184
(JSC::AbstractMacroAssembler::linkPointer):
8185
(JSC::AbstractMacroAssembler::getLinkerAddress):
8186
(JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
8187
(JSC::AbstractMacroAssembler::repatchJump):
8188
(JSC::AbstractMacroAssembler::repatchCall):
8189
(JSC::AbstractMacroAssembler::repatchNearCall):
8190
(JSC::AbstractMacroAssembler::repatchInt32):
8191
(JSC::AbstractMacroAssembler::repatchPointer):
8192
(JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
8193
- remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
8195
* assembler/LinkBuffer.h: Added.
8196
(JSC::LinkBuffer::LinkBuffer):
8197
(JSC::LinkBuffer::~LinkBuffer):
8198
(JSC::LinkBuffer::link):
8199
(JSC::LinkBuffer::patch):
8200
(JSC::LinkBuffer::locationOf):
8201
(JSC::LinkBuffer::locationOfNearCall):
8202
(JSC::LinkBuffer::returnAddressOffset):
8203
(JSC::LinkBuffer::finalizeCode):
8204
(JSC::LinkBuffer::finalizeCodeAddendum):
8205
(JSC::LinkBuffer::code):
8206
(JSC::LinkBuffer::performFinalization):
8207
- new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
8209
* assembler/RepatchBuffer.h: Added.
8210
(JSC::RepatchBuffer::RepatchBuffer):
8211
(JSC::RepatchBuffer::relink):
8212
(JSC::RepatchBuffer::repatch):
8213
(JSC::RepatchBuffer::repatchLoadPtrToLEA):
8214
(JSC::RepatchBuffer::relinkCallerToTrampoline):
8215
(JSC::RepatchBuffer::relinkCallerToFunction):
8216
(JSC::RepatchBuffer::relinkNearCallerToTrampoline):
8217
- new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
8219
* assembler/X86Assembler.h:
8220
(JSC::X86Assembler::linkJump):
8221
(JSC::X86Assembler::linkCall):
8222
(JSC::X86Assembler::linkPointerForCall):
8223
(JSC::X86Assembler::linkPointer):
8224
(JSC::X86Assembler::relinkJump):
8225
(JSC::X86Assembler::relinkCall):
8226
(JSC::X86Assembler::repatchInt32):
8227
(JSC::X86Assembler::repatchPointer):
8228
(JSC::X86Assembler::setPointer):
8229
(JSC::X86Assembler::setInt32):
8230
(JSC::X86Assembler::setRel32):
8231
- rename patchPointer to bring it in line with the current link/repatch naming scheme
8234
(JSC::ctiPatchNearCallByReturnAddress):
8235
(JSC::ctiPatchCallByReturnAddress):
8236
- include new headers
8237
- remove MacroAssembler:: specification from RepatchBuffer usage
8239
* jit/JITPropertyAccess.cpp:
8240
* yarr/RegexJIT.cpp:
8241
- include new headers
8243
2009-07-21 Robert Agoston <Agoston.Robert@stud.u-szeged.hu>
8245
Reviewed by David Levin.
8248
https://bugs.webkit.org/show_bug.cgi?id=27506
8250
* bytecode/Opcode.h:
8252
2009-07-21 Adam Roben <aroben@apple.com>
8254
Roll out r46153, r46154, and r46155
8256
These changes were causing build failures and assertion failures on
8259
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8260
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8261
* JavaScriptCore.xcodeproj/project.pbxproj:
8262
* runtime/JSArray.cpp:
8263
* runtime/StringPrototype.cpp:
8264
* runtime/UString.cpp:
8265
* runtime/UString.h:
8266
* wtf/FastMalloc.cpp:
8269
* wtf/PossiblyNull.h: Removed.
8271
2009-07-21 Roland Steiner <rolandsteiner@google.com>
8273
Reviewed by David Levin.
8275
Add ENABLE_RUBY to list of build options
8276
https://bugs.webkit.org/show_bug.cgi?id=27324
8278
* Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
8280
2009-07-20 Oliver Hunt <oliver@apple.com>
8282
Build fix attempt #2
8284
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8285
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8287
2009-07-20 Oliver Hunt <oliver@apple.com>
8289
Build fix attempt #1
8291
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8292
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8294
2009-07-20 Oliver Hunt <oliver@apple.com>
8296
Reviewed by Gavin Barraclough.
8298
Make it harder to misuse try* allocation routines
8299
https://bugs.webkit.org/show_bug.cgi?id=27469
8301
Jump through a few hoops to make it much harder to accidentally
8302
miss null-checking of values returned by the try-* allocation
8305
* JavaScriptCore.xcodeproj/project.pbxproj:
8306
* runtime/JSArray.cpp:
8307
(JSC::JSArray::putSlowCase):
8308
(JSC::JSArray::increaseVectorLength):
8309
* runtime/StringPrototype.cpp:
8310
(JSC::stringProtoFuncFontsize):
8311
(JSC::stringProtoFuncLink):
8312
* runtime/UString.cpp:
8314
(JSC::reallocChars):
8315
(JSC::expandCapacity):
8316
(JSC::UString::Rep::reserveCapacity):
8317
(JSC::UString::expandPreCapacity):
8320
(JSC::UString::spliceSubstringsWithSeparators):
8321
(JSC::UString::replaceRange):
8322
(JSC::UString::append):
8323
(JSC::UString::operator=):
8324
* runtime/UString.h:
8325
(JSC::UString::Rep::createEmptyBuffer):
8326
* wtf/FastMalloc.cpp:
8327
(WTF::tryFastZeroedMalloc):
8328
(WTF::tryFastMalloc):
8329
(WTF::tryFastCalloc):
8330
(WTF::tryFastRealloc):
8331
(WTF::TCMallocStats::tryFastMalloc):
8332
(WTF::TCMallocStats::tryFastCalloc):
8333
(WTF::TCMallocStats::tryFastRealloc):
8335
(WTF::TryMallocReturnValue::TryMallocReturnValue):
8336
(WTF::TryMallocReturnValue::~TryMallocReturnValue):
8337
(WTF::TryMallocReturnValue::operator Maybe<T>):
8338
(WTF::TryMallocReturnValue::getValue):
8339
* wtf/PossiblyNull.h:
8340
(WTF::PossiblyNull::PossiblyNull):
8341
(WTF::PossiblyNull::~PossiblyNull):
8342
(WTF::PossiblyNull::getValue):
8345
2009-07-20 Gavin Barraclough <barraclough@apple.com>
8349
Add ARM assembler files to xcodeproj, for convenience editing.
8351
* JavaScriptCore.xcodeproj/project.pbxproj:
8353
2009-07-20 Jessie Berlin <jberlin@apple.com>
8355
Reviewed by David Levin.
8357
Fix an incorrect assertion in Vector::remove.
8359
https://bugs.webkit.org/show_bug.cgi?id=27477
8363
Assert that the position at which to start removing elements + the
8364
length (the number of elements to remove) is less than or equal to the
8365
size of the entire Vector.
8367
2009-07-20 Peter Kasting <pkasting@google.com>
8369
Reviewed by Mark Rowe.
8371
https://bugs.webkit.org/show_bug.cgi?id=27468
8372
Back out r46060, which caused problems for some Apple developers.
8374
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
8375
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
8376
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
8377
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
8378
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
8380
2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8382
Reviewed by Oliver Hunt.
8384
Allow custom memory allocation control in NewThreadContext
8385
https://bugs.webkit.org/show_bug.cgi?id=27338
8387
Inherits NewThreadContext struct from FastAllocBase because it
8388
has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
8390
* wtf/Threading.cpp:
8392
2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8394
Reviewed by Oliver Hunt.
8396
Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
8397
https://bugs.webkit.org/show_bug.cgi?id=27340
8399
Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
8400
have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
8401
and in JavaScriptCore/API/JSClassRef.cpp:166.
8405
2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8407
Reviewed by Darin Adler.
8409
Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
8410
https://bugs.webkit.org/show_bug.cgi?id=27343
8412
Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
8414
CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
8415
PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221)
8416
PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
8418
* yarr/RegexPattern.h:
8420
2009-07-20 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8422
Reviewed by Darin Adler.
8424
Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
8425
https://bugs.webkit.org/show_bug.cgi?id=27344
8427
Inherits MatchFrame struct from FastAllocBase because it has
8428
been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
8430
* pcre/pcre_exec.cpp:
8432
2009-07-20 Laszlo Gombos <laszlo.1.gombos@nokia.com>
8434
Reviewed by Holger Freyther.
8436
Remove some outdated S60 platform specific code
8437
https://bugs.webkit.org/show_bug.cgi?id=27423
8441
2009-07-20 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
8443
Reviewed by Simon Hausmann.
8445
Qt build fix with MSVC and MinGW.
8447
* jsc.pro: Make sure jsc is a console application, and turn off
8448
exceptions and stl support to fix the build.
8450
2009-07-20 Xan Lopez <xlopez@igalia.com>
8452
Reviewed by Gustavo Noronha.
8454
Do not use C++-style comments in preprocessor directives.
8456
GCC does not like this in some configurations, using C-style
8461
2009-07-17 Peter Kasting <pkasting@google.com>
8463
Reviewed by Steve Falkenburg.
8465
https://bugs.webkit.org/show_bug.cgi?id=27323
8466
Only add Cygwin to the path when it isn't already there. This avoids
8467
causing problems for people who purposefully have non-Cygwin versions of
8468
executables like svn in front of the Cygwin ones in their paths.
8470
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
8471
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
8472
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
8473
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
8474
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
8476
2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
8478
Reviewed by Gavin Barraclough.
8480
Add YARR support for generic ARM platforms (disabled by default).
8481
https://bugs.webkit.org/show_bug.cgi?id=24986
8483
Add generic ARM port for MacroAssembler. It supports the whole
8484
MacroAssembler functionality except floating point.
8486
The class JmpSrc is extended with a flag which enables to patch
8487
the jump destination offset during execution. This feature is
8488
required for generic ARM port.
8490
Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
8491
Signed off by Gabor Loki <loki@inf.u-szeged.hu>
8493
* JavaScriptCore.pri:
8494
* assembler/ARMAssembler.cpp: Added.
8495
(JSC::ARMAssembler::getLdrImmAddress):
8496
(JSC::ARMAssembler::linkBranch):
8497
(JSC::ARMAssembler::patchConstantPoolLoad):
8498
(JSC::ARMAssembler::getOp2):
8499
(JSC::ARMAssembler::genInt):
8500
(JSC::ARMAssembler::getImm):
8501
(JSC::ARMAssembler::moveImm):
8502
(JSC::ARMAssembler::dataTransfer32):
8503
(JSC::ARMAssembler::baseIndexTransfer32):
8504
(JSC::ARMAssembler::executableCopy):
8505
* assembler/ARMAssembler.h: Added.
8507
(JSC::ARMAssembler::ARMAssembler):
8508
(JSC::ARMAssembler::):
8509
(JSC::ARMAssembler::JmpSrc::JmpSrc):
8510
(JSC::ARMAssembler::JmpSrc::enableLatePatch):
8511
(JSC::ARMAssembler::JmpDst::JmpDst):
8512
(JSC::ARMAssembler::JmpDst::isUsed):
8513
(JSC::ARMAssembler::JmpDst::used):
8514
(JSC::ARMAssembler::emitInst):
8515
(JSC::ARMAssembler::and_r):
8516
(JSC::ARMAssembler::ands_r):
8517
(JSC::ARMAssembler::eor_r):
8518
(JSC::ARMAssembler::eors_r):
8519
(JSC::ARMAssembler::sub_r):
8520
(JSC::ARMAssembler::subs_r):
8521
(JSC::ARMAssembler::rsb_r):
8522
(JSC::ARMAssembler::rsbs_r):
8523
(JSC::ARMAssembler::add_r):
8524
(JSC::ARMAssembler::adds_r):
8525
(JSC::ARMAssembler::adc_r):
8526
(JSC::ARMAssembler::adcs_r):
8527
(JSC::ARMAssembler::sbc_r):
8528
(JSC::ARMAssembler::sbcs_r):
8529
(JSC::ARMAssembler::rsc_r):
8530
(JSC::ARMAssembler::rscs_r):
8531
(JSC::ARMAssembler::tst_r):
8532
(JSC::ARMAssembler::teq_r):
8533
(JSC::ARMAssembler::cmp_r):
8534
(JSC::ARMAssembler::orr_r):
8535
(JSC::ARMAssembler::orrs_r):
8536
(JSC::ARMAssembler::mov_r):
8537
(JSC::ARMAssembler::movs_r):
8538
(JSC::ARMAssembler::bic_r):
8539
(JSC::ARMAssembler::bics_r):
8540
(JSC::ARMAssembler::mvn_r):
8541
(JSC::ARMAssembler::mvns_r):
8542
(JSC::ARMAssembler::mul_r):
8543
(JSC::ARMAssembler::muls_r):
8544
(JSC::ARMAssembler::mull_r):
8545
(JSC::ARMAssembler::ldr_imm):
8546
(JSC::ARMAssembler::ldr_un_imm):
8547
(JSC::ARMAssembler::dtr_u):
8548
(JSC::ARMAssembler::dtr_ur):
8549
(JSC::ARMAssembler::dtr_d):
8550
(JSC::ARMAssembler::dtr_dr):
8551
(JSC::ARMAssembler::ldrh_r):
8552
(JSC::ARMAssembler::ldrh_d):
8553
(JSC::ARMAssembler::ldrh_u):
8554
(JSC::ARMAssembler::strh_r):
8555
(JSC::ARMAssembler::push_r):
8556
(JSC::ARMAssembler::pop_r):
8557
(JSC::ARMAssembler::poke_r):
8558
(JSC::ARMAssembler::peek_r):
8559
(JSC::ARMAssembler::clz_r):
8560
(JSC::ARMAssembler::bkpt):
8561
(JSC::ARMAssembler::lsl):
8562
(JSC::ARMAssembler::lsr):
8563
(JSC::ARMAssembler::asr):
8564
(JSC::ARMAssembler::lsl_r):
8565
(JSC::ARMAssembler::lsr_r):
8566
(JSC::ARMAssembler::asr_r):
8567
(JSC::ARMAssembler::size):
8568
(JSC::ARMAssembler::ensureSpace):
8569
(JSC::ARMAssembler::label):
8570
(JSC::ARMAssembler::align):
8571
(JSC::ARMAssembler::jmp):
8572
(JSC::ARMAssembler::patchPointerInternal):
8573
(JSC::ARMAssembler::patchConstantPoolLoad):
8574
(JSC::ARMAssembler::patchPointer):
8575
(JSC::ARMAssembler::repatchInt32):
8576
(JSC::ARMAssembler::repatchPointer):
8577
(JSC::ARMAssembler::repatchLoadPtrToLEA):
8578
(JSC::ARMAssembler::linkJump):
8579
(JSC::ARMAssembler::relinkJump):
8580
(JSC::ARMAssembler::linkCall):
8581
(JSC::ARMAssembler::relinkCall):
8582
(JSC::ARMAssembler::getRelocatedAddress):
8583
(JSC::ARMAssembler::getDifferenceBetweenLabels):
8584
(JSC::ARMAssembler::getCallReturnOffset):
8585
(JSC::ARMAssembler::getOp2Byte):
8586
(JSC::ARMAssembler::placeConstantPoolBarrier):
8587
(JSC::ARMAssembler::RM):
8588
(JSC::ARMAssembler::RS):
8589
(JSC::ARMAssembler::RD):
8590
(JSC::ARMAssembler::RN):
8591
(JSC::ARMAssembler::getConditionalField):
8592
* assembler/ARMv7Assembler.h:
8593
(JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
8594
* assembler/AbstractMacroAssembler.h:
8595
(JSC::AbstractMacroAssembler::Call::enableLatePatch):
8596
(JSC::AbstractMacroAssembler::Jump::enableLatePatch):
8597
* assembler/MacroAssembler.h:
8598
* assembler/MacroAssemblerARM.h: Added.
8599
(JSC::MacroAssemblerARM::):
8600
(JSC::MacroAssemblerARM::add32):
8601
(JSC::MacroAssemblerARM::and32):
8602
(JSC::MacroAssemblerARM::lshift32):
8603
(JSC::MacroAssemblerARM::mul32):
8604
(JSC::MacroAssemblerARM::not32):
8605
(JSC::MacroAssemblerARM::or32):
8606
(JSC::MacroAssemblerARM::rshift32):
8607
(JSC::MacroAssemblerARM::sub32):
8608
(JSC::MacroAssemblerARM::xor32):
8609
(JSC::MacroAssemblerARM::load32):
8610
(JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
8611
(JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
8612
(JSC::MacroAssemblerARM::load16):
8613
(JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
8614
(JSC::MacroAssemblerARM::store32):
8615
(JSC::MacroAssemblerARM::pop):
8616
(JSC::MacroAssemblerARM::push):
8617
(JSC::MacroAssemblerARM::move):
8618
(JSC::MacroAssemblerARM::swap):
8619
(JSC::MacroAssemblerARM::signExtend32ToPtr):
8620
(JSC::MacroAssemblerARM::zeroExtend32ToPtr):
8621
(JSC::MacroAssemblerARM::branch32):
8622
(JSC::MacroAssemblerARM::branch16):
8623
(JSC::MacroAssemblerARM::branchTest32):
8624
(JSC::MacroAssemblerARM::jump):
8625
(JSC::MacroAssemblerARM::branchAdd32):
8626
(JSC::MacroAssemblerARM::mull32):
8627
(JSC::MacroAssemblerARM::branchMul32):
8628
(JSC::MacroAssemblerARM::branchSub32):
8629
(JSC::MacroAssemblerARM::breakpoint):
8630
(JSC::MacroAssemblerARM::nearCall):
8631
(JSC::MacroAssemblerARM::call):
8632
(JSC::MacroAssemblerARM::ret):
8633
(JSC::MacroAssemblerARM::set32):
8634
(JSC::MacroAssemblerARM::setTest32):
8635
(JSC::MacroAssemblerARM::tailRecursiveCall):
8636
(JSC::MacroAssemblerARM::makeTailRecursiveCall):
8637
(JSC::MacroAssemblerARM::moveWithPatch):
8638
(JSC::MacroAssemblerARM::branchPtrWithPatch):
8639
(JSC::MacroAssemblerARM::storePtrWithPatch):
8640
(JSC::MacroAssemblerARM::supportsFloatingPoint):
8641
(JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
8642
(JSC::MacroAssemblerARM::loadDouble):
8643
(JSC::MacroAssemblerARM::storeDouble):
8644
(JSC::MacroAssemblerARM::addDouble):
8645
(JSC::MacroAssemblerARM::subDouble):
8646
(JSC::MacroAssemblerARM::mulDouble):
8647
(JSC::MacroAssemblerARM::convertInt32ToDouble):
8648
(JSC::MacroAssemblerARM::branchDouble):
8649
(JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
8650
(JSC::MacroAssemblerARM::ARMCondition):
8651
(JSC::MacroAssemblerARM::prepareCall):
8652
(JSC::MacroAssemblerARM::call32):
8653
* assembler/X86Assembler.h:
8654
(JSC::X86Assembler::JmpSrc::enableLatePatch):
8655
* jit/ExecutableAllocator.h:
8656
(JSC::ExecutableAllocator::cacheFlush):
8658
* yarr/RegexJIT.cpp:
8659
(JSC::Yarr::RegexGenerator::generateEnter):
8660
(JSC::Yarr::RegexGenerator::generateReturn):
8662
2009-07-17 Gabor Loki <loki@inf.u-szeged.hu>
8664
Reviewed by Gavin Barraclough.
8666
Extend AssemblerBuffer with constant pool handling mechanism.
8667
https://bugs.webkit.org/show_bug.cgi?id=24986
8669
Add a platform independed constant pool framework.
8670
This pool can store 32 or 64 bits values which is enough to hold
8671
any integer, pointer or double constant.
8673
* assembler/AssemblerBuffer.h:
8674
(JSC::AssemblerBuffer::putIntUnchecked):
8675
(JSC::AssemblerBuffer::putInt64Unchecked):
8676
(JSC::AssemblerBuffer::append):
8677
(JSC::AssemblerBuffer::grow):
8678
* assembler/AssemblerBufferWithConstantPool.h: Added.
8681
2009-07-17 Eric Roman <eroman@chromium.org>
8683
Reviewed by Darin Adler.
8685
Build fix for non-Darwin.
8686
Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
8688
https://bugs.webkit.org/show_bug.cgi?id=27382
8690
* wtf/unicode/icu/CollatorICU.cpp:
8692
2009-07-17 Alexey Proskuryakov <ap@webkit.org>
8694
Reviewed by John Sullivan.
8696
Get user default collation order via a CFLocale API when available.
8698
* wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
8700
2009-07-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
8702
Reviewed by Simon Hausmann.
8704
[Qt] Fix the include path for the Symbian port
8705
https://bugs.webkit.org/show_bug.cgi?id=27358
8707
* JavaScriptCore.pri:
8709
2009-07-17 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
8711
Reviewed by David Levin.
8713
Build fix on platforms don't have MMAP.
8714
https://bugs.webkit.org/show_bug.cgi?id=27365
8716
* interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
8718
2009-07-16 Fumitoshi Ukai <ukai@chromium.org>
8720
Reviewed by David Levin.
8722
Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
8723
https://bugs.webkit.org/show_bug.cgi?id=27206
8725
Add ENABLE_WEB_SOCKETS
8727
* Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
8729
2009-07-16 Maxime Simon <simon.maxime@gmail.com>
8731
Reviewed by Eric Seidel.
8733
Added Haiku-specific files for JavaScriptCore.
8734
https://bugs.webkit.org/show_bug.cgi?id=26620
8736
* wtf/haiku/MainThreadHaiku.cpp: Added.
8737
(WTF::initializeMainThreadPlatform):
8738
(WTF::scheduleDispatchFunctionsOnMainThread):
8740
2009-07-16 Gavin Barraclough <barraclough@apple.com>
8744
Revert r45969, this fix does not appear to be valid.
8745
https://bugs.webkit.org/show_bug.cgi?id=27077
8747
* bytecode/CodeBlock.cpp:
8748
(JSC::CodeBlock::~CodeBlock):
8749
(JSC::CodeBlock::unlinkCallers):
8753
2009-07-16 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8755
Reviewed by Oliver Hunt.
8757
Allow custom memory allocation control in ExceptionInfo and RareData struct
8758
https://bugs.webkit.org/show_bug.cgi?id=27336
8760
Inherits ExceptionInfo and RareData struct from FastAllocBase because these
8761
have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
8762
in JavaScriptCore/bytecode/CodeBlock.h:453.
8764
Remove unnecessary WTF:: namespace from CodeBlock inheritance.
8766
* bytecode/CodeBlock.h:
8768
2009-07-16 Mark Rowe <mrowe@apple.com>
8770
Rubber-stamped by Geoff Garen.
8772
Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
8774
* Configurations/FeatureDefines.xcconfig:
8776
2009-07-16 Yong Li <yong.li@torchmobile.com>
8778
Reviewed by George Staikos.
8780
https://bugs.webkit.org/show_bug.cgi?id=27320
8781
_countof is only included in CE6; for CE5 we need to define it ourself
8785
2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
8787
Reviewed by Oliver Hunt.
8789
Workers + garbage collector: weird crashes
8790
https://bugs.webkit.org/show_bug.cgi?id=27077
8792
We need to unlink cached method call sites when a function is destroyed.
8794
* JavaScriptCore.xcodeproj/project.pbxproj:
8795
* bytecode/CodeBlock.cpp:
8796
(JSC::CodeBlock::~CodeBlock):
8797
(JSC::CodeBlock::unlinkCallers):
8799
(JSC::JIT::unlinkMethodCall):
8802
2009-07-15 Steve Falkenburg <sfalken@apple.com>
8806
Visual Studio reset our intermediate directory on us.
8809
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
8810
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
8812
2009-07-15 Kwang Yul Seo <skyul@company100.net>
8814
Reviewed by Eric Seidel.
8816
https://bugs.webkit.org/show_bug.cgi?id=26794
8817
Make Yacc-generated parsers to use fastMalloc/fastFree.
8819
Define YYMALLOC and YYFREE to fastMalloc and fastFree
8824
2009-07-15 Darin Adler <darin@apple.com>
8826
Fix a build for a particular Apple configuration.
8828
* wtf/FastAllocBase.h: Change include to use "" style for
8829
including another wtf header. This is the style we use for
8830
including other public headers in the same directory.
8832
2009-07-15 George Staikos <george.staikos@torchmobile.com>
8834
Reviewed by Adam Treat.
8836
https://bugs.webkit.org/show_bug.cgi?id=27303
8837
Implement createThreadInternal for WinCE.
8838
Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
8840
* wtf/ThreadingWin.cpp:
8841
(WTF::createThreadInternal):
8843
2009-07-15 Joe Mason <joe.mason@torchmobile.com>
8845
Reviewed by George Staikos.
8847
https://bugs.webkit.org/show_bug.cgi?id=27298
8848
Platform defines for WINCE.
8849
Contains changes by Yong Li <yong.li@torchmobile.com>,
8850
George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
8854
2009-07-15 Yong Li <yong.li@torchmobile.com>
8856
Reviewed by Adam Treat.
8858
https://bugs.webkit.org/show_bug.cgi?id=27306
8859
Use RegisterClass instead of RegisterClassEx on WinCE.
8861
* wtf/win/MainThreadWin.cpp:
8862
(WTF::initializeMainThreadPlatform):
8864
2009-07-15 Yong Li <yong.li@torchmobile.com>
8866
Reviewed by George Staikos.
8868
https://bugs.webkit.org/show_bug.cgi?id=27301
8869
Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
8870
Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
8871
Joe Mason <joe.mason@torchmobile.com>
8873
* wtf/Assertions.cpp: vprintf_stderr_common
8875
2009-07-15 Yong Li <yong.li@torchmobile.com>
8877
Reviewed by George Staikos.
8879
https://bugs.webkit.org/show_bug.cgi?id=27020
8880
msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
8883
(WTF::gregorianDateTimeToMS):
8885
2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
8887
Reviewed by Simon Hausmann.
8889
[Qt] Cleanup - Remove obsolete code from the make system
8890
https://bugs.webkit.org/show_bug.cgi?id=27299
8892
* JavaScriptCore.pro:
8895
2009-07-07 Norbert Leser <norbert.leser@nokia.com>
8897
Reviewed by Simon Hausmann.
8899
https://bugs.webkit.org/show_bug.cgi?id=27056
8901
Alternate bool operator for codewarrior compiler (WINSCW).
8902
Compiler (latest b482) reports error for UnspecifiedBoolType construct:
8903
"illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
8905
Same fix as in r38391.
8907
* JavaScriptCore/wtf/OwnArrayPtr.h:
8909
2009-07-15 Norbert Leser <norbert.leser@nokia.com>
8911
Reviewed by Darin Adler.
8913
Qualify include path with wtf to fix compilation
8915
https://bugs.webkit.org/show_bug.cgi?id=27055
8917
* interpreter/Interpreter.h:
8919
2009-07-15 Laszlo Gombos <laszlo.1.gombos@nokia.com>
8921
Reviewed by Dave Kilzer.
8923
Turn off non-portable date manipulations for SYMBIAN
8924
https://bugs.webkit.org/show_bug.cgi?id=27064
8926
Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards
8927
and place the rules for controlling the guards in Platform.h.
8928
Turn off these newly introduced guards for SYMBIAN.
8931
(WTF::calculateUTCOffset):
8933
(WTF::GregorianDateTime::GregorianDateTime):
8934
(WTF::GregorianDateTime::operator tm):
8937
2009-07-15 Norbert Leser <norbert.leser@nokia.com>
8939
Reviewed by Simon Hausmann.
8941
Undef ASSERT on Symbian, to avoid excessive warnings
8942
https://bugs.webkit.org/show_bug.cgi?id=27052
8946
2009-07-15 Oliver Hunt <oliver@apple.com>
8948
Reviewed by Simon Hausmann.
8950
REGRESSION: fast/js/postfix-syntax.html fails with interpreter
8951
https://bugs.webkit.org/show_bug.cgi?id=27294
8953
When postfix operators operating on locals assign to the same local
8954
the order of operations has to be to store the incremented value, then
8955
store the unmodified number. Rather than implementing this subtle
8956
semantic in the interpreter I've just made the logic explicit in the
8957
bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
8961
(JSC::emitPostIncOrDec):
8963
2009-07-15 Oliver Hunt <oliver@apple.com>
8965
Reviewed by Simon Hausmann.
8967
REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
8968
https://bugs.webkit.org/show_bug.cgi?id=27259
8970
The interpreter was incorrectly basing its need to create the arguments object
8971
based on the presence of the callframe's argument reference rather than the local
8972
arguments reference. Based on this it then overrode the local variable reference.
8974
* interpreter/Interpreter.cpp:
8975
(JSC::Interpreter::privateExecute):
8977
2009-07-14 Steve Falkenburg <sfalken@apple.com>
8979
Reorganize JavaScriptCore headers into:
8980
API: include/JavaScriptCore/
8981
Private: include/private/JavaScriptCore/
8983
Reviewed by Darin Adler.
8985
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
8986
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
8987
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
8988
* JavaScriptCore.vcproj/testapi/testapi.vcproj:
8989
* JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
8991
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
8993
Reviewed by Darin Adler.
8995
Change JSCell's superclass to NoncopyableCustomAllocated
8996
https://bugs.webkit.org/show_bug.cgi?id=27248
8998
JSCell class customizes operator new, since Noncopyable will be
8999
inherited from FastAllocBase, NoncopyableCustomAllocated has
9004
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9006
Reviewed by Darin Adler.
9008
Change all Noncopyable inheriting visibility to public.
9009
https://bugs.webkit.org/show_bug.cgi?id=27225
9011
Change all Noncopyable inheriting visibility to public because
9012
it is needed to the custom allocation framework (bug #20422).
9014
* bytecode/SamplingTool.h:
9015
* bytecompiler/RegisterID.h:
9016
* interpreter/CachedCall.h:
9017
* interpreter/RegisterFile.h:
9020
* runtime/ArgList.h:
9021
* runtime/BatchedTransitionOptimizer.h:
9022
* runtime/Collector.h:
9023
* runtime/CommonIdentifiers.h:
9025
* runtime/JSGlobalObject.h:
9027
* runtime/JSONObject.cpp:
9028
* runtime/SmallStrings.cpp:
9029
* runtime/SmallStrings.h:
9030
* wtf/CrossThreadRefCounted.h:
9033
* wtf/MessageQueue.h:
9034
* wtf/OwnArrayPtr.h:
9035
* wtf/OwnFastMallocPtr.h:
9038
* wtf/ThreadSpecific.h:
9041
* wtf/unicode/Collator.h:
9043
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9045
Reviewed by Darin Adler.
9047
Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
9048
https://bugs.webkit.org/show_bug.cgi?id=27249
9050
ParserArenaDeletable customizes operator new, to avoid double inheritance
9051
ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
9055
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9057
Reviewed by Darin Adler.
9059
Add RefCountedCustomAllocated to RefCounted.h
9060
https://bugs.webkit.org/show_bug.cgi?id=27232
9062
Some class which are inherited from RefCounted customize
9063
operator new, but RefCounted is inherited from Noncopyable
9064
which will be inherited from FastAllocBase. To avoid
9065
conflicts Noncopyable inheriting was moved down to RefCounted
9066
and to avoid double inheritance this class has been added.
9069
(WTF::RefCountedCustomAllocated::deref):
9070
(WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
9072
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9074
Reviewed by Darin Adler.
9076
Add NoncopyableCustomAllocated to Noncopyable.h.
9077
https://bugs.webkit.org/show_bug.cgi?id=27228
9079
Some classes which inherited from Noncopyable overrides operator new
9080
since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
9081
needs to be extended with this new class to support the overriding.
9083
* wtf/Noncopyable.h:
9084
(WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
9085
(WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
9087
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9089
Reviewed by Darin Adler.
9091
Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
9092
https://bugs.webkit.org/show_bug.cgi?id=27260
9094
Inherits IdentifierTable class from FastAllocBase because it has been
9095
instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
9097
* runtime/Identifier.cpp:
9099
2009-07-14 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9101
Reviewed by Darin Adler.
9103
Allow custom memory allocation control for JavaScriptCore's Profiler class
9104
https://bugs.webkit.org/show_bug.cgi?id=27253
9106
Inherits Profiler class from FastAllocBase because it has been instantiated by
9107
'new' in JavaScriptCore/profiler/Profiler.cpp:56.
9109
* profiler/Profiler.h:
9111
2009-07-06 George Staikos <george.staikos@torchmobile.com>
9113
Reviewed by Adam Treat.
9115
Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
9117
https://bugs.webkit.org/show_bug.cgi?id=27030
9118
Implement custom RNG for WinCE using Mersenne Twister
9120
* wtf/RandomNumber.cpp:
9121
(WTF::randomNumber):
9122
* wtf/RandomNumberSeed.h:
9123
(WTF::initializeRandomNumberGenerator):
9124
* wtf/wince/mt19937ar.c: Added.
9134
2009-07-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
9136
Unreviewed make dist build fix.
9140
2009-07-13 Drew Wilson <atwilson@google.com>
9142
Reviewed by David Levin.
9144
Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
9145
https://bugs.webkit.org/show_bug.cgi?id=26932
9147
Added ENABLE(SHARED_WORKERS) flag (off by default).
9149
* Configurations/FeatureDefines.xcconfig:
9151
2009-07-07 Norbert Leser <norbert.leser@nokia.com>
9153
Reviewed by Maciej Stachoviak.
9155
https://bugs.webkit.org/show_bug.cgi?id=27058
9157
Removed superfluous parenthesis around single expression.
9158
Compilers on Symbian platform fail to properly parse and compile.
9160
* JavaScriptCore/wtf/Platform.h:
9162
2009-07-13 Norbert Leser <norbert.leser@nokia.com>
9164
Reviewed by Maciej Stachoviak.
9166
https://bugs.webkit.org/show_bug.cgi?id=27054
9168
Renamed Translator to HashTranslator
9170
Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
9171
mismatch between template declaration and definition
9172
(HashTranslator / Translator)
9176
2009-07-13 Norbert Leser <norbert.leser@nokia.com>
9178
Reviewed by Eric Seidel.
9180
https://bugs.webkit.org/show_bug.cgi?id=27053
9182
Ambiguity in LabelScope initialization
9184
Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
9185
type of "0" unambiguously. Set expression explicitly to
9186
PassRefPtr<Label>::PassRefPtr()
9188
* bytecompiler/BytecodeGenerator.cpp
9190
2009-07-11 Simon Fraser <simon.fraser@apple.com>
9192
Enable support for accelerated compositing and 3d transforms on Leopard.
9193
<https://bugs.webkit.org/show_bug.cgi?id=20166>
9194
<rdar://problem/6120614>
9196
Reviewed by Oliver Hunt.
9198
* Configurations/FeatureDefines.xcconfig:
9201
2009-07-10 Mark Rowe <mrowe@apple.com>
9203
Second part of the "make Windows happier" dance.
9205
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9206
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9208
2009-07-10 Mark Rowe <mrowe@apple.com>
9210
Try and make the Windows build happy.
9212
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9213
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9215
2009-07-10 Kevin McCullough <kmccullough@apple.com>
9217
Reviewed by Geoffrey Garen.
9219
* debugger/Debugger.h: Made this function virtual for use in WebCore's
9222
2009-07-10 Kwang Yul Seo <skyul@company100.net>
9224
Reviewed by Darin Adler.
9226
ParserArenaDeletable should override delete
9227
https://bugs.webkit.org/show_bug.cgi?id=26790
9229
ParserArenaDeletable overrides new, but it does not override delete.
9230
ParserArenaDeletable must be freed by fastFree
9231
because it is allocated by fastMalloc.
9233
* parser/NodeConstructors.h:
9234
(JSC::ParserArenaDeletable::operator delete):
9237
2009-07-10 Adam Roben <aroben@apple.com>
9239
Sort all our Xcode projects
9241
Accomplished using sort-Xcode-project-file.
9243
Requested by Dave Kilzer.
9245
* JavaScriptCore.xcodeproj/project.pbxproj:
9247
2009-07-09 Maciej Stachowiak <mjs@apple.com>
9249
Not reviewed, build fix.
9251
Windows build fix for the last change.
9253
* wtf/dtoa.cpp: Forgot to include Vector.h
9255
2009-07-09 Maciej Stachowiak <mjs@apple.com>
9257
Reviewed by Darin Adler.
9259
REGRESSION: crash in edge cases of floating point parsing.
9260
https://bugs.webkit.org/show_bug.cgi?id=27110
9261
<rdar://problem/7044458>
9263
Tests: fast/css/number-parsing-crash.html
9264
fast/css/number-parsing-crash.html
9265
fast/js/number-parsing-crash.html
9268
(WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
9269
with inline capacity
9271
(WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
9272
Added an assertion to verify that invariants are maintained.
9274
All other functions are adapted fairly mechanically to the above changes.
9275
(WTF::BigInt::clear):
9276
(WTF::BigInt::size):
9277
(WTF::BigInt::resize):
9278
(WTF::BigInt::words):
9279
(WTF::BigInt::append):
9293
2009-07-09 Drew Wilson <atwilson@google.com>
9295
Reviewed by Alexey Proskuryakov.
9297
Turned on CHANNEL_MESSAGING by default because the MessageChannel API
9298
can now be implemented for Web Workers and is reasonably stable.
9300
* Configurations/FeatureDefines.xcconfig:
9302
2009-07-09 Oliver Hunt <oliver@apple.com>
9304
* interpreter/Interpreter.cpp:
9305
(JSC::Interpreter::privateExecute):
9307
2009-07-09 Oliver Hunt <oliver@apple.com>
9309
Reviewed by Darin Adler.
9311
Bug 27016 - Interpreter crashes due to invalid array indexes
9312
<https://bugs.webkit.org/show_bug.cgi?id=27016>
9314
Unsigned vs signed conversions results in incorrect behaviour in
9315
64bit interpreter builds.
9317
* interpreter/Interpreter.cpp:
9318
(JSC::Interpreter::privateExecute):
9320
2009-07-09 Dimitri Glazkov <dglazkov@chromium.org>
9322
Reviewed by Darin Fisher.
9324
[Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
9325
https://bugs.webkit.org/show_bug.cgi?id=27135
9327
* JavaScriptCore.gypi: Added.
9329
2009-07-09 Joe Mason <joe.mason@torchmobile.com>
9331
Reviewed by George Staikos.
9333
Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
9335
https://bugs.webkit.org/show_bug.cgi?id=27031
9336
Add an override for deleteOwnedPtr(HDC) on Windows
9338
* wtf/OwnPtrCommon.h:
9339
* wtf/OwnPtrWin.cpp:
9340
(WTF::deleteOwnedPtr):
9342
2009-07-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
9344
Reviewed by Darin Adler.
9346
Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
9349
https://bugs.webkit.org/show_bug.cgi?id=27026
9351
Based on Norbert Leser's work.
9354
(printUsageStatement):
9358
2009-07-07 Gavin Barraclough <barraclough@apple.com>
9360
Reviewed by Sam Weinig.
9362
Stop loading constants into the register file.
9364
Instead, use high register values (highest bit bar the sign bit set) to indicate
9365
constants in the instruction stream, and when we encounter such a value load it
9366
directly from the CodeBlock.
9368
Since constants are no longer copied into the register file, this patch renders
9369
the 'unexpected constant' mechanism redundant, and removes it.
9371
2% improvement, thanks to Sam Weinig.
9373
* bytecode/CodeBlock.cpp:
9374
(JSC::CodeBlock::dump):
9375
(JSC::CodeBlock::CodeBlock):
9376
(JSC::CodeBlock::mark):
9377
(JSC::CodeBlock::shrinkToFit):
9378
* bytecode/CodeBlock.h:
9379
(JSC::CodeBlock::isTemporaryRegisterIndex):
9380
(JSC::CodeBlock::constantRegister):
9381
(JSC::CodeBlock::isConstantRegisterIndex):
9382
(JSC::CodeBlock::getConstant):
9383
(JSC::ExecState::r):
9384
* bytecode/Opcode.h:
9385
* bytecompiler/BytecodeGenerator.cpp:
9386
(JSC::BytecodeGenerator::preserveLastVar):
9387
(JSC::BytecodeGenerator::BytecodeGenerator):
9388
(JSC::BytecodeGenerator::addConstantValue):
9389
(JSC::BytecodeGenerator::emitEqualityOp):
9390
(JSC::BytecodeGenerator::emitLoad):
9391
(JSC::BytecodeGenerator::emitResolveBase):
9392
(JSC::BytecodeGenerator::emitResolveWithBase):
9393
(JSC::BytecodeGenerator::emitNewError):
9394
* bytecompiler/BytecodeGenerator.h:
9395
(JSC::BytecodeGenerator::emitNode):
9396
* interpreter/CallFrame.h:
9397
(JSC::ExecState::noCaller):
9398
(JSC::ExecState::hasHostCallFrameFlag):
9399
(JSC::ExecState::addHostCallFrameFlag):
9400
(JSC::ExecState::removeHostCallFrameFlag):
9401
* interpreter/Interpreter.cpp:
9402
(JSC::Interpreter::resolve):
9403
(JSC::Interpreter::resolveSkip):
9404
(JSC::Interpreter::resolveGlobal):
9405
(JSC::Interpreter::resolveBase):
9406
(JSC::Interpreter::resolveBaseAndProperty):
9407
(JSC::Interpreter::resolveBaseAndFunc):
9408
(JSC::Interpreter::dumpRegisters):
9409
(JSC::Interpreter::throwException):
9410
(JSC::Interpreter::createExceptionScope):
9411
(JSC::Interpreter::privateExecute):
9412
(JSC::Interpreter::retrieveArguments):
9414
(JSC::JIT::privateCompileMainPass):
9415
* jit/JITInlineMethods.h:
9416
(JSC::JIT::emitLoadDouble):
9417
(JSC::JIT::emitLoadInt32ToDouble):
9418
* jit/JITOpcodes.cpp:
9419
(JSC::JIT::emit_op_new_error):
9420
(JSC::JIT::emit_op_enter):
9421
(JSC::JIT::emit_op_enter_with_activation):
9423
(JSC::DeleteResolveNode::emitBytecode):
9424
(JSC::DeleteValueNode::emitBytecode):
9425
(JSC::PrefixResolveNode::emitBytecode):
9426
* runtime/JSActivation.cpp:
9427
(JSC::JSActivation::JSActivation):
9430
2009-07-07 Mark Rowe <mrowe@apple.com>
9432
Reviewed by Darin Adler.
9434
Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
9435
Bug 27025: Crashes and regression test failures related to regexps in 64-bit
9437
For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
9438
neglects to save and restore it. The change in handling of the output vector in r45545
9439
altered code generation so that the RegExp::match was now storing important data in rbx,
9440
which caused crashes and bogus results when it was clobbered.
9442
* yarr/RegexJIT.cpp:
9443
(JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
9444
(JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
9446
2009-07-06 Ada Chan <adachan@apple.com>
9448
Reviewed by Darin Adler and Mark Rowe.
9450
Decommitted spans are added to the list of normal spans rather than
9451
the returned spans in TCMalloc_PageHeap::Delete().
9452
https://bugs.webkit.org/show_bug.cgi?id=26998
9454
In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
9455
the process of merging with neighboring spans that are also decommitted.
9456
The merged span needs to be placed in the list of returned spans (spans
9457
whose memory has been returned to the system). Right now it's always added
9458
to the list of the normal spans which can theoretically cause thrashing.
9460
* wtf/FastMalloc.cpp:
9461
(WTF::TCMalloc_PageHeap::Delete):
9463
2009-07-05 Lars Knoll <lars.knoll@nokia.com>
9465
Reviewed by Maciej Stachowiak.
9467
https://bugs.webkit.org/show_bug.cgi?id=26843
9469
Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
9471
The Metrowerks compiler on the Symbian platform moves the globally
9472
defined Hashtables into read-only memory, despite one of the members
9473
being mutable. This causes crashes at run-time due to write access to
9476
Avoid the use of const with this compiler by introducing the
9477
JSC_CONST_HASHTABLE macro.
9479
Based on idea by Norbert Leser.
9481
* runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
9482
* create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
9483
* runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
9485
2009-07-04 Dan Bernstein <mitz@apple.com>
9489
* runtime/RegExpConstructor.cpp:
9490
(JSC::RegExpConstructor::getLastParen):
9492
2009-07-03 Yong Li <yong.li@torchmobile.com>
9494
Reviewed by Maciej Stachowiak (and revised slightly)
9496
RegExp::match to be optimized
9497
https://bugs.webkit.org/show_bug.cgi?id=26957
9499
Allow regexp matching to use Vectors with inline capacity instead of
9500
allocating a new ovector buffer every time.
9502
~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
9504
* runtime/RegExp.cpp:
9505
(JSC::RegExp::match):
9507
* runtime/RegExpConstructor.cpp:
9508
(JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
9509
(JSC::RegExpConstructorPrivate::lastOvector):
9510
(JSC::RegExpConstructorPrivate::tempOvector):
9511
(JSC::RegExpConstructorPrivate::changeLastOvector):
9512
(JSC::RegExpConstructor::performMatch):
9513
(JSC::RegExpMatchesArray::RegExpMatchesArray):
9514
(JSC::RegExpMatchesArray::fillArrayInstance):
9515
(JSC::RegExpConstructor::getBackref):
9516
(JSC::RegExpConstructor::getLastParen):
9517
(JSC::RegExpConstructor::getLeftContext):
9518
(JSC::RegExpConstructor::getRightContext):
9519
* runtime/StringPrototype.cpp:
9520
(JSC::stringProtoFuncSplit):
9522
2009-06-30 Kwang Yul Seo <skyul@company100.net>
9524
Reviewed by Eric Seidel.
9526
Override operator new/delete with const std::nothrow_t& as the second
9528
https://bugs.webkit.org/show_bug.cgi?id=26792
9530
On Windows CE, operator new/delete, new[]/delete[] with const
9531
std::nothrow_t& must be overrided because some standard template
9532
libraries use these operators.
9534
The problem occurs when memory allocated by new(size_t s, const
9535
std::nothrow_t&) is freed by delete(void* p). This causes the umatched
9536
malloc/free problem.
9538
The patch overrides all new, delete, new[] and delete[] to use
9539
fastMaloc and fastFree consistently.
9544
2009-06-30 Gabor Loki <loki@inf.u-szeged.hu>
9546
Reviewed by Sam Weinig.
9548
<https://bugs.webkit.org/show_bug.cgi?id=24986>
9550
Remove unnecessary references to AssemblerBuffer.
9552
* interpreter/Interpreter.cpp:
9553
* interpreter/Interpreter.h:
9555
2009-06-29 David Levin <levin@chromium.org>
9557
Reviewed by Oliver Hunt.
9559
Still seeing occasional leaks from UString::sharedBuffer code
9560
https://bugs.webkit.org/show_bug.cgi?id=26420
9562
The problem is that the pointer to the memory allocation isn't visible
9563
by "leaks" due to the lower bits being used as flags. The fix is to
9564
make the pointer visible in memory (in debug only). The downside of
9565
this fix that the memory allocated by sharedBuffer will still look like
9566
a leak in non-debug builds when any flags are set.
9568
* wtf/PtrAndFlags.h:
9569
(WTF::PtrAndFlags::set):
9571
2009-06-29 Sam Weinig <sam@webkit.org>
9573
Reviewed by Mark Rowe.
9575
Remove more unused scons support.
9577
* SConstruct: Removed.
9579
2009-06-29 Oliver Hunt <oliver@apple.com>
9581
Reviewed by Gavin Barraclough.
9583
<rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
9584
<https://bugs.webkit.org/show_bug.cgi?id=26802>
9586
In the original JSON.parse patch unicode was handled correctly, however in some last
9587
minute "clean up" I oversimplified isSafeStringCharacter. This patch corrects this bug.
9589
* runtime/LiteralParser.cpp:
9590
(JSC::isSafeStringCharacter):
9591
(JSC::LiteralParser::Lexer::lexString):
9593
2009-06-26 Oliver Hunt <oliver@apple.com>
9595
Reviewed by Dan Bernstein.
9597
<rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
9598
<https://bugs.webkit.org/show_bug.cgi?id=26746>
9600
Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id. Clearly this
9601
is less than correct. This patch corrects that error.
9603
* interpreter/Interpreter.cpp:
9604
(JSC::Interpreter::tryCacheGetByID):
9606
2009-06-26 Eric Seidel <eric@webkit.org>
9608
No review, only rolling out r45259.
9610
Roll out r45259 after crash appeared on the bots:
9611
plugins/undefined-property-crash.html
9612
ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
9613
(leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
9614
void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
9616
* runtime/DateInstance.cpp:
9617
* runtime/Identifier.cpp:
9619
* runtime/RegExpConstructor.cpp:
9620
* runtime/RegExpObject.h:
9621
* runtime/ScopeChain.h:
9622
* runtime/UString.h:
9624
2009-06-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
9626
Reviewed by Simon Hausmann.
9628
Add support for QDataStream operators to Vector.
9634
2009-06-24 Sam Weinig <sam@webkit.org>
9636
Reviewed by Gavin Barraclough.
9638
Make the opcode sampler work once again.
9641
(JSC::JIT::compileGetByIdProto):
9642
(JSC::JIT::compileGetByIdSelfList):
9643
(JSC::JIT::compileGetByIdProtoList):
9644
(JSC::JIT::compileGetByIdChainList):
9645
(JSC::JIT::compileGetByIdChain):
9646
(JSC::JIT::compilePutByIdTransition):
9647
(JSC::JIT::compileCTIMachineTrampolines):
9648
(JSC::JIT::compilePatchGetArrayLength):
9649
* jit/JITStubCall.h:
9650
(JSC::JITStubCall::call):
9652
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9654
Reviewed by Maciej Stachowiak.
9656
Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
9657
unnecessary WTF:: usings.
9658
Remove existing unnecessary WTF:: usings.
9660
* interpreter/Interpreter.h:
9661
* profiler/CallIdentifier.h:
9662
* runtime/ScopeChain.h:
9663
* wtf/FastAllocBase.h:
9665
2009-06-24 David Levin <levin@chromium.org>
9669
* bytecode/CodeBlock.h:
9670
* bytecompiler/BytecodeGenerator.h:
9671
* interpreter/Register.h:
9673
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9675
Reviewed by Maciej Stachowiak.
9677
https://bugs.webkit.org/show_bug.cgi?id=26677
9679
Inherits CodeBlock class from FastAllocBase because it
9680
has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
9682
* bytecode/CodeBlock.h:
9684
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9686
Reviewed by Maciej Stachowiak.
9688
https://bugs.webkit.org/show_bug.cgi?id=26676
9690
Inherits BytecodeGenerator class from FastAllocBase because it has been
9691
instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
9693
* bytecompiler/BytecodeGenerator.h:
9695
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9697
Reviewed by Maciej Stachowiak.
9699
https://bugs.webkit.org/show_bug.cgi?id=26675
9701
Inherits Register class from FastAllocBase because it has been
9702
instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
9704
* interpreter/Register.h:
9706
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9708
Reviewed by Darin Adler.
9710
https://bugs.webkit.org/show_bug.cgi?id=26674
9712
Inherits HashMap class from FastAllocBase because it has been
9713
instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
9717
2009-06-24 Oliver Hunt <oliver@apple.com>
9719
Reviewed by Darin Adler.
9721
<rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
9723
The problem was caused by the page returned with a function using a
9724
var declaration list containing around ~3000 variables. The solution
9725
to this is to flatten the comma expression representation and make
9726
codegen comma expressions and initializer lists iterative rather than
9730
* parser/NodeConstructors.h:
9731
(JSC::CommaNode::CommaNode):
9733
(JSC::CommaNode::emitBytecode):
9735
(JSC::ExpressionNode::isCommaNode):
9736
(JSC::CommaNode::isCommaNode):
9737
(JSC::CommaNode::append):
9739
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9741
Reviewed by Maciej Stachowiak.
9743
https://bugs.webkit.org/show_bug.cgi?id=26645
9745
Inherits ScopeChainNode class from FastAllocBase because it has been
9746
instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
9750
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9752
Reviewed by Darin Adler.
9754
https://bugs.webkit.org/show_bug.cgi?id=26648
9756
Inherits Deque class from FastAllocBase because it has been
9757
instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
9758
JavaScriptCore/wtf/MainThread.cpp:62.
9762
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9764
Reviewed by Darin Adler.
9766
https://bugs.webkit.org/show_bug.cgi?id=26644
9768
Inherits RefPtr class from FastAllocBase because it has been
9769
instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
9773
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9775
Reviewed by Darin Adler.
9777
Inherits HashSet class from FastAllocBase, because it has been
9778
instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
9782
2009-06-24 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
9784
Reviewed by Darin Adler.
9786
Inherits Vector class from FastAllocBase because it has been
9787
instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
9791
2009-06-24 Norbert Leser <norbert.leser@nokia.com>
9793
Reviewed by Maciej Stachoviak.
9795
The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
9796
(each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
9797
Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
9798
the stack overflows immediately on Symbian hardware (max. 80 kB).
9799
Proposed change allocates generator objects on heap.
9800
Performance impact (if any) should be negligible and change is proposed as general fix,
9801
rather than ifdef'd for SYMBIAN.
9804
(JSC::ProgramNode::generateBytecode):
9805
(JSC::EvalNode::generateBytecode):
9806
(JSC::EvalNode::bytecodeForExceptionInfoReparse):
9807
(JSC::FunctionBodyNode::generateBytecode):
9808
(JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
9810
2009-06-23 Oliver Hunt <oliver@apple.com>
9812
Reviewed by Gavin Barraclough.
9814
<rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
9815
<https://bugs.webkit.org/show_bug.cgi?id=26593>
9817
Do not attempt to cache structure chains if they contain a dictionary at any level.
9819
* interpreter/Interpreter.cpp:
9820
(JSC::Interpreter::tryCachePutByID):
9821
(JSC::Interpreter::tryCacheGetByID):
9823
(JSC::JITThunks::tryCachePutByID):
9824
* runtime/Structure.cpp:
9825
(JSC::Structure::getEnumerablePropertyNames):
9826
(JSC::Structure::addPropertyTransition):
9827
* runtime/StructureChain.cpp:
9828
(JSC::StructureChain::isCacheable):
9829
* runtime/StructureChain.h:
9831
2009-06-23 Yong Li <yong.li@torchmobile.com>
9833
Reviewed by George Staikos.
9835
https://bugs.webkit.org/show_bug.cgi?id=26654
9836
Add the proper export define for the JavaScriptCore API when building for WINCE.
9840
2009-06-23 Joe Mason <joe.mason@torchmobile.com>
9842
Reviewed by Adam Treat.
9844
Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
9846
https://bugs.webkit.org/show_bug.cgi?id=26611
9847
Implement currentThreadStackBase on WINCE by adding a global,
9848
g_stackBase, which must be set to the address of a local variable
9849
by the caller before calling any WebKit function that invokes JSC.
9851
* runtime/Collector.cpp:
9852
(JSC::isPageWritable):
9853
(JSC::getStackBase):
9854
Starts at the top of the stack and returns the entire range of
9855
consecutive writable pages as an estimate of the actual stack.
9856
This will be much bigger than the actual stack range, so some
9857
dead objects can't be collected, but it guarantees live objects
9858
aren't collected prematurely.
9860
(JSC::currentThreadStackBase):
9861
On WinCE, returns g_stackBase if set or call getStackBase as a
9864
2009-06-23 Oliver Hunt <oliver@apple.com>
9866
Reviewed by Alexey Proskuryakov.
9868
Fix stupid performance problem in the LiteralParser
9870
The LiteralParser was making a new UString in order to use
9871
toDouble, however UString's toDouble allows a much wider range
9872
of numberic strings than the LiteralParser accepts, and requires
9873
an additional heap allocation or two for the construciton of the
9874
UString. To rectify this we just call WTF::dtoa directly using
9875
a stack allocated buffer to hold the validated numeric literal.
9877
* runtime/LiteralParser.cpp:
9878
(JSC::LiteralParser::Lexer::lexNumber):
9879
(JSC::LiteralParser::parse):
9880
* runtime/LiteralParser.h:
9882
2009-06-22 Oliver Hunt <oliver@apple.com>
9884
Reviewed by Alexey Proskuryakov.
9886
Bug 26640: JSON.stringify needs to special case Boolean objects
9887
<https://bugs.webkit.org/show_bug.cgi?id=26640>
9889
Add special case handling of the Boolean object so we match current
9892
* runtime/JSONObject.cpp:
9893
(JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
9895
(JSC::Stringifier::appendStringifiedValue):
9897
2009-06-22 Oliver Hunt <oliver@apple.com>
9899
Reviewed by Darin Adler.
9901
Bug 26591: Support revivers in JSON.parse
9902
<https://bugs.webkit.org/show_bug.cgi?id=26591>
9904
Add reviver support to JSON.parse. This completes the JSON object.
9906
* runtime/JSONObject.cpp:
9907
(JSC::Walker::Walker):
9908
(JSC::Walker::callReviver):
9909
(JSC::Walker::walk):
9910
(JSC::JSONProtoFuncParse):
9912
2009-06-21 Oliver Hunt <oliver@apple.com>
9914
Reviewed by Darin Adler.
9916
Bug 26592: Support standard toJSON functions
9917
<https://bugs.webkit.org/show_bug.cgi?id=26592>
9919
Add support for the standard Date.toJSON function.
9921
* runtime/DatePrototype.cpp:
9922
(JSC::dateProtoFuncToJSON):
9924
2009-06-21 Oliver Hunt <oliver@apple.com>
9926
Reviewed by Sam Weinig.
9928
Bug 26594: JSC needs to support Date.toISOString
9929
<https://bugs.webkit.org/show_bug.cgi?id=26594>
9931
Add support for Date.toISOString.
9933
* runtime/DatePrototype.cpp:
9934
(JSC::dateProtoFuncToISOString):
9936
2009-06-21 Oliver Hunt <oliver@apple.com>
9940
* runtime/LiteralParser.cpp:
9941
(JSC::LiteralParser::parse):
9943
2009-06-21 Oliver Hunt <oliver@apple.com>
9945
Reviewed by Darin Adler and Cameron Zwarich.
9947
Bug 26587: Support JSON.parse
9948
<https://bugs.webkit.org/show_bug.cgi?id=26587>
9950
Extend the LiteralParser to support the full strict JSON
9951
grammar, fix a few places where the grammar was incorrectly
9952
lenient. Doesn't yet support the JSON.parse reviver function
9953
but that does not block the JSON.parse functionality itself.
9955
* interpreter/Interpreter.cpp:
9956
(JSC::Interpreter::callEval):
9957
* runtime/JSGlobalObjectFunctions.cpp:
9958
(JSC::globalFuncEval):
9959
* runtime/JSONObject.cpp:
9960
(JSC::JSONProtoFuncParse):
9961
* runtime/LiteralParser.cpp:
9962
(JSC::LiteralParser::Lexer::lex):
9963
(JSC::isSafeStringCharacter):
9964
(JSC::LiteralParser::Lexer::lexString):
9965
(JSC::LiteralParser::parse):
9966
* runtime/LiteralParser.h:
9967
(JSC::LiteralParser::LiteralParser):
9968
(JSC::LiteralParser::tryJSONParse):
9969
(JSC::LiteralParser::):
9970
(JSC::LiteralParser::Lexer::Lexer):
9972
2009-06-21 David Levin <levin@chromium.org>
9974
Reviewed by NOBODY (speculative build fix for windows).
9976
Simply removed some whitespace form this file to make windows build wtf and
9977
hopefully copy the new MessageQueque.h so that WebCore picks it up.
9979
* wtf/Assertions.cpp:
9981
2009-06-21 Drew Wilson <atwilson@google.com>
9983
Reviewed by David Levin.
9985
<https://bugs.webkit.org/show_bug.cgi?id=25043>
9986
Added support for multi-threaded MessagePorts.
9988
* wtf/MessageQueue.h:
9989
(WTF::::appendAndCheckEmpty):
9990
Added API to test whether the queue was empty before adding an element.
9992
2009-06-20 David D. Kilzer <ddkilzer@webkit.org>
9994
Fix namespace comment in SegmentedVector.h
9996
* wtf/SegmentedVector.h: Updated namespace comment to reflect
9997
new namespace after r44897.
9999
2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
10001
Bug 24986: ARM JIT port
10002
<https://bugs.webkit.org/show_bug.cgi?id=24986>
10004
Reviewed by Oliver Hunt.
10006
An Iterator added for SegmentedVector. Currently
10007
only the pre ++ operator is supported.
10009
* wtf/SegmentedVector.h:
10010
(WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
10011
(WTF::SegmentedVectorIterator::operator*):
10012
(WTF::SegmentedVectorIterator::operator->):
10013
(WTF::SegmentedVectorIterator::operator++):
10014
(WTF::SegmentedVectorIterator::operator==):
10015
(WTF::SegmentedVectorIterator::operator!=):
10016
(WTF::SegmentedVectorIterator::operator=):
10017
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
10018
(WTF::SegmentedVector::alloc):
10019
(WTF::SegmentedVector::begin):
10020
(WTF::SegmentedVector::end):
10022
2009-06-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
10024
Bug 24986: ARM JIT port
10025
<https://bugs.webkit.org/show_bug.cgi?id=24986>
10027
Reviewed by Oliver Hunt.
10029
Move SegmentedVector to /wtf subdirectory
10030
and change "namespace JSC" to "namespace WTF"
10032
Additional build file updates by David Kilzer.
10034
* GNUmakefile.am: Updated path to SegmentedVector.h.
10035
* JavaScriptCore.order: Updated SegmentedVector namespace from
10036
JSC to WTF in mangled C++ method name.
10037
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
10038
Removed reference to bytecompiler\SegmentedVector.h.
10039
* JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
10040
wtf\SegmentedVector.h.
10041
* JavaScriptCore.xcodeproj/project.pbxproj: Moved
10042
SegmentedVector.h definition from bytecompiler subdirectory to
10044
* bytecompiler/BytecodeGenerator.h: Updated #include path to
10045
SegmentedVector.h and prepended WTF:: namespace to its use.
10046
* parser/Lexer.h: Ditto.
10047
* wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
10048
(WTF::SegmentedVector::SegmentedVector):
10049
(WTF::SegmentedVector::~SegmentedVector):
10050
(WTF::SegmentedVector::size):
10051
(WTF::SegmentedVector::at):
10052
(WTF::SegmentedVector::operator[]):
10053
(WTF::SegmentedVector::last):
10054
(WTF::SegmentedVector::append):
10055
(WTF::SegmentedVector::removeLast):
10056
(WTF::SegmentedVector::grow):
10057
(WTF::SegmentedVector::clear):
10058
(WTF::SegmentedVector::deleteAllSegments):
10059
(WTF::SegmentedVector::segmentExistsFor):
10060
(WTF::SegmentedVector::segmentFor):
10061
(WTF::SegmentedVector::subscriptFor):
10062
(WTF::SegmentedVector::ensureSegmentsFor):
10063
(WTF::SegmentedVector::ensureSegment):
10065
2009-06-19 Gavin Barraclough <barraclough@apple.com>
10067
Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
10070
(JSC::JIT::privateCompile):
10071
(JSC::JIT::privateCompileCTIMachineTrampolines):
10072
(JSC::JIT::emitGetVariableObjectRegister):
10073
(JSC::JIT::emitPutVariableObjectRegister):
10075
* jit/JITArithmetic.cpp:
10076
(JSC::JIT::emit_op_rshift):
10077
(JSC::JIT::emitSlow_op_jnless):
10078
(JSC::JIT::emitSlow_op_jnlesseq):
10079
(JSC::JIT::compileBinaryArithOp):
10081
(JSC::JIT::compileOpCallInitializeCallFrame):
10082
(JSC::JIT::compileOpCall):
10083
* jit/JITInlineMethods.h:
10084
(JSC::JIT::restoreArgumentReference):
10085
(JSC::JIT::checkStructure):
10086
* jit/JITOpcodes.cpp:
10087
(JSC::JIT::emit_op_instanceof):
10088
(JSC::JIT::emit_op_get_scoped_var):
10089
(JSC::JIT::emit_op_put_scoped_var):
10090
(JSC::JIT::emit_op_construct_verify):
10091
(JSC::JIT::emit_op_resolve_global):
10092
(JSC::JIT::emit_op_jeq_null):
10093
(JSC::JIT::emit_op_jneq_null):
10094
(JSC::JIT::emit_op_to_jsnumber):
10095
(JSC::JIT::emit_op_catch):
10096
(JSC::JIT::emit_op_eq_null):
10097
(JSC::JIT::emit_op_neq_null):
10098
(JSC::JIT::emit_op_convert_this):
10099
(JSC::JIT::emit_op_profile_will_call):
10100
(JSC::JIT::emit_op_profile_did_call):
10101
(JSC::JIT::emitSlow_op_get_by_val):
10102
* jit/JITPropertyAccess.cpp:
10103
(JSC::JIT::emit_op_get_by_val):
10104
(JSC::JIT::emit_op_put_by_val):
10105
(JSC::JIT::emit_op_method_check):
10106
(JSC::JIT::compileGetByIdHotPath):
10107
(JSC::JIT::emit_op_put_by_id):
10108
(JSC::JIT::compilePutDirectOffset):
10109
(JSC::JIT::compileGetDirectOffset):
10110
(JSC::JIT::privateCompilePutByIdTransition):
10111
(JSC::JIT::privateCompilePatchGetArrayLength):
10112
* jit/JITStubs.cpp:
10113
(JSC::JITThunks::JITThunks):
10115
2009-06-19 Gavin Barraclough <barraclough@apple.com>
10117
Reviewed by NOBODY (Windows build fix).
10120
* jit/JITInlineMethods.h:
10122
2009-06-19 Gabor Loki <loki@inf.u-szeged.hu>
10124
Reviewed by Gavin Barraclough.
10126
Reorganize ARM architecture specific macros.
10127
Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
10129
Bug 24986: ARM JIT port
10130
<https://bugs.webkit.org/show_bug.cgi?id=24986>
10132
* assembler/ARMv7Assembler.h:
10133
* assembler/AbstractMacroAssembler.h:
10134
(JSC::AbstractMacroAssembler::Imm32::Imm32):
10135
* assembler/MacroAssembler.h:
10136
* assembler/MacroAssemblerCodeRef.h:
10137
(JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
10138
* jit/ExecutableAllocator.h:
10139
(JSC::ExecutableAllocator::cacheFlush):
10141
* jit/JITInlineMethods.h:
10142
(JSC::JIT::restoreArgumentReferenceForTrampoline):
10143
* jit/JITStubs.cpp:
10146
* yarr/RegexJIT.cpp:
10147
(JSC::Yarr::RegexGenerator::generateEnter):
10148
(JSC::Yarr::RegexGenerator::generateReturn):
10150
2009-06-19 Gavin Barraclough <barraclough@apple.com>
10152
Reviewed by Oliver Hunt.
10154
Fix armv7 JIT build issues.
10156
Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
10157
and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
10159
* Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
10160
* Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
10164
* jit/JITInlineMethods.h:
10165
(JSC::JIT::restoreArgumentReference):
10166
* jit/JITOpcodes.cpp:
10167
(JSC::JIT::emit_op_catch):
10168
* jit/JITStubs.cpp:
10169
(JSC::JITThunks::JITThunks):
10171
2009-06-19 Adam Treat <adam.treat@torchmobile.com>
10173
Blind attempt at build fix.
10175
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10176
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10178
2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10180
Reviewed by Oliver Hunt.
10182
Inherits CallIdentifier struct from FastAllocBase because it has been
10183
instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
10185
* wtf/HashCountedSet.h:
10187
2009-06-19 Adam Treat <adam.treat@torchmobile.com>
10189
Reviewed by Oliver Hunt.
10191
https://bugs.webkit.org/show_bug.cgi?id=26540
10192
Modify the test shell to add a new function 'checkSyntax' that will
10193
only parse the source instead of executing it. In this way we can test
10194
pure parsing performance against some of the larger scripts in the wild.
10197
(GlobalObject::GlobalObject):
10198
(functionCheckSyntax):
10200
2009-06-19 Zoltan Horvath <hzoltan@inf.u-szeged.hu>
10202
Reviewed by Darin Adler.
10204
Inherits HashCountedSet class from FastAllocBase because it has been
10205
instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
10207
* wtf/HashCountedSet.h:
10209
2009-06-19 Yong Li <yong.li@torchmobile.com>
10211
Reviewed by George Staikos.
10213
https://bugs.webkit.org/show_bug.cgi?id=26558
10214
Declare these symbols extern for WINCE as they are provided by libce.
10216
* runtime/DateConstructor.cpp:
10217
* runtime/DatePrototype.cpp:
10218
(JSC::formatLocaleDate):
10220
2009-06-19 Oliver Hunt <oliver@apple.com>
10222
Reviewed by Maciej Stachowiak.
10224
<rdar://problem/6988973> ScopeChain leak in interpreter builds
10226
Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
10229
* runtime/JSFunction.cpp:
10230
(JSC::JSFunction::~JSFunction):
10233
2009-06-19 Yong Li <yong.li@torchmobile.com>
10235
Reviewed by George Staikos.
10237
https://bugs.webkit.org/show_bug.cgi?id=26543
10238
Windows CE uses 'GetLastError' instead of 'errno.'
10240
* interpreter/RegisterFile.h:
10241
(JSC::RegisterFile::RegisterFile):
10242
(JSC::RegisterFile::grow):
10244
2009-06-19 David Levin <levin@chromium.org>
10246
Reviewed by NOBODY (Windows build fix).
10248
Add export for Windows corresponding to OSX export done in r44844.
10249
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10250
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10252
2009-06-18 Oliver Hunt <oliver@apple.com>
10254
Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
10256
Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
10257
<https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
10259
We need to make sure that each native function instance correctly unlinks any references to it
10260
when it is collected. Allowing this to happen required a few changes:
10261
* Every native function needs a codeblock to track the link information
10262
* To have this codeblock, every function now also needs its own functionbodynode
10263
so we no longer get to have a single shared instance.
10264
* Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
10266
* JavaScriptCore.exp:
10267
* bytecode/CodeBlock.cpp:
10268
(JSC::CodeBlock::CodeBlock):
10269
Constructor for NativeCode CodeBlock
10270
(JSC::CodeBlock::derefStructures):
10271
(JSC::CodeBlock::refStructures):
10272
(JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
10273
(JSC::CodeBlock::handlerForBytecodeOffset):
10274
(JSC::CodeBlock::lineNumberForBytecodeOffset):
10275
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
10276
(JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
10277
(JSC::CodeBlock::functionRegisterForBytecodeOffset):
10278
(JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
10279
(JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
10280
(JSC::CodeBlock::setJITCode):
10281
Add assertions to ensure we don't try and use NativeCode CodeBlocks as
10282
a normal codeblock.
10284
* bytecode/CodeBlock.h:
10286
(JSC::CodeBlock::source):
10287
(JSC::CodeBlock::sourceOffset):
10288
(JSC::CodeBlock::evalCodeCache):
10289
(JSC::CodeBlock::createRareDataIfNecessary):
10293
(JSC::JIT::privateCompileCTIMachineTrampolines):
10294
(JSC::JIT::linkCall):
10295
Update logic to allow native function caching
10297
* jit/JITStubs.cpp:
10298
* parser/Nodes.cpp:
10299
(JSC::FunctionBodyNode::createNativeThunk):
10300
(JSC::FunctionBodyNode::isHostFunction):
10302
* runtime/JSFunction.cpp:
10303
(JSC::JSFunction::JSFunction):
10304
(JSC::JSFunction::~JSFunction):
10305
(JSC::JSFunction::mark):
10306
* runtime/JSGlobalData.cpp:
10307
(JSC::JSGlobalData::~JSGlobalData):
10308
* runtime/JSGlobalData.h:
10310
2009-06-18 Gavin Barraclough <barraclough@apple.com>
10312
Reviewed by NOBODY (Windows build fix).
10314
* wtf/DateMath.cpp:
10315
(WTF::calculateUTCOffset):
10317
2009-06-18 Gavin Barraclough <barraclough@apple.com>
10319
Reviewed by Geoff Garen.
10321
Timezone calculation incorrect in Venezuela.
10323
https://bugs.webkit.org/show_bug.cgi?id=26531
10324
<rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
10326
The problem is that we're calculating the timezone relative to 01/01/2000,
10327
but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
10328
According to the spec, section 15.9.1.9 states "the time since the beginning
10329
of the year", presumably meaning the *current* year. Change the calculation
10330
to be based on whatever the current year is, rather than a canned date.
10332
No performance impact.
10334
* wtf/DateMath.cpp:
10335
(WTF::calculateUTCOffset):
10337
2009-06-18 Gavin Barraclough <barraclough@apple.com>
10339
Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
10341
(Reintroducing patch added in r44492, and reverted in r44796.)
10343
Change the implementation of op_throw so the stub function always modifies its
10344
return address - if it doesn't find a 'catch' it will switch to a trampoline
10345
to force a return from JIT execution. This saves memory, by avoiding the need
10346
for a unique return for every op_throw.
10348
* jit/JITOpcodes.cpp:
10349
(JSC::JIT::emit_op_throw):
10350
JITStubs::cti_op_throw now always changes its return address,
10351
remove return code generated after the stub call (this is now
10352
handled by ctiOpThrowNotCaught).
10353
* jit/JITStubs.cpp:
10355
Add ctiOpThrowNotCaught definitions.
10356
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
10357
Change cti_op_throw to always change its return address.
10359
Add ctiOpThrowNotCaught declaration.
10361
2009-06-18 Kevin McCullough <kmccullough@apple.com>
10363
Reviewed by Oliver Hunt.
10365
<rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
10367
- Exposed functions now needed by WebCore.
10369
* JavaScriptCore.exp:
10371
2009-06-17 Darin Adler <darin@apple.com>
10373
Reviewed by Oliver Hunt.
10375
Bug 26429: Make JSON.stringify non-recursive so it can handle objects
10376
of arbitrary complexity
10377
https://bugs.webkit.org/show_bug.cgi?id=26429
10379
For marking I decided not to use gcProtect, because this is inside the engine
10380
so it's easy enough to just do marking. And that darned gcProtect does locking!
10381
Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
10382
for that class says "FIXME: Remove all clients of this API, then remove this API."
10384
* runtime/Collector.cpp:
10385
(JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
10387
* runtime/CommonIdentifiers.cpp:
10388
(JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
10389
* runtime/CommonIdentifiers.h: Ditto.
10391
* runtime/JSGlobalData.cpp:
10392
(JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
10393
* runtime/JSGlobalData.h: Added firstStringifierToMark.
10395
* runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
10396
(JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
10397
objects to get their number and string values.
10398
(JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
10399
to wrap an identifier or integer so we don't have to do any work unless we
10400
actually call a replacer.
10401
(JSC::ReplacerPropertyName::value): Added.
10402
(JSC::gap): Added. Helper function for the Stringifier constructor.
10403
(JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
10404
The class is used to wrap an identifier or integer so we don't have to
10405
allocate a number or string until we actually call toJSON or a replacer.
10406
(JSC::PropertyNameForFunctionCall::asJSValue): Added.
10407
(JSC::Stringifier::Stringifier): Updated and moved out of the class
10408
definition. Added code to hook this into a singly linked list for marking.
10409
(JSC::Stringifier::~Stringifier): Remove from the singly linked list.
10410
(JSC::Stringifier::mark): Mark all the objects in the holder stacks.
10411
(JSC::Stringifier::stringify): Updated.
10412
(JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
10413
(JSC::Stringifier::toJSON): Renamed from toJSONValue.
10414
(JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
10415
Added code to use the m_holderStack to do non-recursive stringify of
10416
objects and arrays. This code also uses the timeout checker since in
10417
pathological cases it could be slow even without calling into the
10418
JavaScript virtual machine.
10419
(JSC::Stringifier::willIndent): Added.
10420
(JSC::Stringifier::indent): Added.
10421
(JSC::Stringifier::unindent): Added.
10422
(JSC::Stringifier::startNewLine): Added.
10423
(JSC::Stringifier::Holder::Holder): Added.
10424
(JSC::Stringifier::Holder::appendNextProperty): Added. This is the
10425
function that handles the format of arrays and objects.
10426
(JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
10427
of the file so the JSONObject class is not interleaved with the
10429
(JSC::JSONObject::markStringifiers): Added. Calls mark.
10430
(JSC::JSONProtoFuncStringify): Streamlined the code here. The code
10431
to compute the gap string is now a separate function.
10433
* runtime/JSONObject.h: Made everything private. Added markStringifiers.
10435
2009-06-17 Oliver Hunt <oliver@apple.com>
10437
Reviewed by Gavin Barraclough.
10439
<rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
10441
Roll out r43849 as it appears that we cannot rely on the address of
10442
an objects property storage being constant even if the structure is
10446
* jit/JITPropertyAccess.cpp:
10447
(JSC::JIT::compileGetDirectOffset):
10448
(JSC::JIT::privateCompileGetByIdProto):
10449
(JSC::JIT::privateCompileGetByIdProtoList):
10450
(JSC::JIT::privateCompileGetByIdChainList):
10451
(JSC::JIT::privateCompileGetByIdChain):
10453
2009-06-17 Gavin Barraclough <barraclough@apple.com>
10455
Rubber Stamped by Mark Rowe.
10457
Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
10459
* jit/JITOpcodes.cpp:
10460
(JSC::JIT::emit_op_throw):
10461
* jit/JITStubs.cpp:
10463
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
10466
2009-06-17 Gavin Barraclough <barraclough@apple.com>
10468
Reviewed by Mark Rowe.
10470
<rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
10472
On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
10474
No performance impact.
10476
* jit/JITArithmetic.cpp:
10477
(JSC::JIT::emit_op_rshift):
10479
2009-06-17 Adam Treat <adam.treat@torchmobile.com>
10481
Reviewed by George Staikos.
10483
https://bugs.webkit.org/show_bug.cgi?id=23155
10484
Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
10489
2009-06-17 George Staikos <george.staikos@torchmobile.com>
10491
Reviewed by Adam Treat.
10493
https://bugs.webkit.org/show_bug.cgi?id=23155
10494
Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
10498
* wtf/Assertions.cpp:
10499
* wtf/Assertions.h:
10500
* wtf/CurrentTime.cpp:
10501
(WTF::lowResUTCTime):
10502
* wtf/DateMath.cpp:
10503
(WTF::getLocalTime):
10504
* wtf/MathExtras.h:
10506
* wtf/StringExtras.h:
10508
* wtf/win/MainThreadWin.cpp:
10510
2009-06-17 Gavin Barraclough <barraclough@apple.com>
10512
Reviewed by Oliver Hunt.
10514
<rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
10516
Remove PropertySlot::putValue - PropertySlots should only be used for getting,
10517
not putting. Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
10518
which is what it really was being used to ask, and remove some other getOwnPropertySlot
10519
& getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
10521
* runtime/JSGlobalObject.h:
10522
(JSC::JSGlobalObject::hasOwnPropertyForWrite):
10523
* runtime/JSObject.h:
10524
* runtime/JSStaticScopeObject.cpp:
10525
* runtime/JSStaticScopeObject.h:
10526
* runtime/PropertySlot.h:
10528
2009-06-16 Gavin Barraclough <barraclough@apple.com>
10530
Reviewed by Oliver hunt.
10532
Temporarily partially disable r44492, since this is causing some problems on internal builds.
10534
* jit/JITOpcodes.cpp:
10535
(JSC::JIT::emit_op_throw):
10536
* jit/JITStubs.cpp:
10537
(JSC::JITStubs::DEFINE_STUB_FUNCTION):
10539
2009-06-16 Sam Weinig <sam@webkit.org>
10546
2009-06-16 Sam Weinig <sam@webkit.org>
10548
Reviewed by Oliver Hunt.
10550
Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
10551
it for each type of stub using the return address to find the correct
10557
(JSC::JIT::compileGetByIdProto):
10558
(JSC::JIT::compileGetByIdSelfList):
10559
(JSC::JIT::compileGetByIdProtoList):
10560
(JSC::JIT::compileGetByIdChainList):
10561
(JSC::JIT::compileGetByIdChain):
10562
(JSC::JIT::compilePutByIdTransition):
10563
(JSC::JIT::compileCTIMachineTrampolines):
10564
(JSC::JIT::compilePatchGetArrayLength):
10565
* jit/JITStubCall.h:
10566
(JSC::JITStubCall::call):
10568
== Rolled over to ChangeLog-2009-06-16 ==