1 2011-09-15 Adam Roben <aroben@apple.com>
3 Clang build fix after r95172
5 * dfg/DFGSpeculativeJIT.h:
6 (JSC::DFG::SpeculativeJIT::shouldSpeculateFinalObject):
7 (JSC::DFG::SpeculativeJIT::shouldSpeculateArray):
8 Added parentheses to make precendence clear.
10 2011-09-14 Filip Pizlo <fpizlo@apple.com>
12 DFG does not speculate aggressively enough on comparisons
13 https://bugs.webkit.org/show_bug.cgi?id=68138
15 Reviewed by Oliver Hunt.
17 This is a 75% speed-up on Kraken/ai-astar. It's a 1% win on
18 V8 and an 8.5% win on Kraken. Neutral on SunSpider.
20 * dfg/DFGSpeculativeJIT.cpp:
21 (JSC::DFG::SpeculativeJIT::compilePeepHoleDoubleBranch):
22 (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
23 (JSC::DFG::SpeculativeJIT::compileObjectEquality):
24 (JSC::DFG::SpeculativeJIT::compare):
25 * dfg/DFGSpeculativeJIT.h:
26 (JSC::DFG::SpeculativeJIT::shouldSpeculateFinalObject):
27 (JSC::DFG::SpeculativeJIT::shouldSpeculateArray):
28 (JSC::DFG::SpeculativeJIT::shouldSpeculateObject):
29 (JSC::DFG::SpeculativeJIT::shouldSpeculateCell):
31 2011-09-14 Filip Pizlo <fpizlo@apple.com>
33 DFG JIT does not leverage integer speculations on branches
34 https://bugs.webkit.org/show_bug.cgi?id=68140
36 Reviewed by Oliver Hunt.
38 * dfg/DFGJITCodeGenerator.cpp:
39 (JSC::DFG::JITCodeGenerator::isStrictInt32):
40 * dfg/DFGJITCodeGenerator.h:
41 * dfg/DFGSpeculativeJIT.cpp:
42 (JSC::DFG::SpeculativeJIT::compile):
44 2011-09-14 Gavin Barraclough <barraclough@apple.com>
46 [n]stricteq code is bogus in JSValue32_64 JIT
47 https://bugs.webkit.org/show_bug.cgi?id=68141
49 Reviewed by Sam Weinig.
51 The code tries to check for both ints or cells, but this check also
52 catches cases where values that are undefined, null, etc (probably
53 was incorrectly assuming cell was the 2nd highest tag?).
55 Also, there is no need not to handle int on the fast path.
56 stricteq is just a case of comparing the payloads, if we:
57 * handle cases of differing tags on a slow path
58 * handle doubles a slow path
59 * handle both-are-string on a slow path
61 * jit/JITOpcodes32_64.cpp:
62 (JSC::JIT::compileOpStrictEq):
63 (JSC::JIT::emitSlow_op_stricteq):
64 (JSC::JIT::emitSlow_op_nstricteq):
66 2011-09-14 Mark Hahnenberg <mhahnenberg@apple.com>
68 Make JSCell::toBoolean non-virtual
69 https://bugs.webkit.org/show_bug.cgi?id=67727
71 Reviewed by Sam Weinig.
73 JSCell::toBoolean now manually performs the toBoolean check for objects and strings (where
74 before it was simply virtual and would crash if its implementation was called).
75 Its descendants in JSObject and JSString have also been made non-virtual. JSCell now
76 explicitly covers all cases of toBoolean, so having a virtual implementation of
77 JSCell::toBoolean is no longer necessary. This is part of a larger process of un-virtualizing JSCell.
80 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
83 * runtime/JSNotAnObject.cpp:
84 * runtime/JSNotAnObject.h:
87 (JSC::JSCell::toBoolean):
88 (JSC::JSValue::toBoolean):
89 * runtime/StringObjectThatMasqueradesAsUndefined.h:
91 2011-09-14 Alexis Menard <alexis.menard@openbossa.org>
93 [Qt] Replace QT_GCC_X as they don't exist in Qt5 anymore.
94 https://bugs.webkit.org/show_bug.cgi?id=68114
96 Reviewed by Kenneth Rohde Christiansen.
98 Use the new GCC_X variables defined in WebKit.pri to replace
99 the usage of QT_GCC_X.
101 * JavaScriptCore.pro:
103 2011-09-14 Sheriff Bot <webkit.review.bot@gmail.com>
105 Unreviewed, rolling out r95145.
106 http://trac.webkit.org/changeset/95145
107 https://bugs.webkit.org/show_bug.cgi?id=68139
109 The GTK+ build is working now, so revert this trial build fix.
110 (Requested by mrobinson on #webkit).
112 * GNUmakefile.list.am:
114 2011-09-14 Patrick Gansterer <paroga@webkit.org>
116 Port MachineStackMarker to Windows ARM and MIPS
117 https://bugs.webkit.org/show_bug.cgi?id=68068
119 Reviewed by Geoffrey Garen.
121 Use the correct memeber of the CONTEXT struct for the stackpointer for CPU(ARM) and CPU(MIPS).
122 Only query CONTEXT_INTEGER and CONTEXT_CONTROL, since CONTEXT_SEGMENTS isn't defined for
123 CPU(ARM) and CPU(MIPS) and the stackpointer is defined in the CONTEXT_CONTROL section for
124 CPU(ARM), CPU(X86) and CPU(X86_64) and in the CONTEXT_INTEGER section for CPU(MIPS).
126 * heap/MachineStackMarker.cpp:
127 (JSC::getPlatformThreadRegisters):
128 (JSC::otherThreadStackPointer):
130 2011-09-12 Filip Pizlo <fpizlo@apple.com>
132 DFG JIT always speculates that ValueAdd is a numeric addition
133 https://bugs.webkit.org/show_bug.cgi?id=67956
135 Reviewed by Geoffrey Garen.
137 * dfg/DFGJITCodeGenerator.cpp:
138 (JSC::DFG::JITCodeGenerator::isKnownNotNumber):
139 * dfg/DFGJITCodeGenerator.h:
140 * dfg/DFGNonSpeculativeJIT.cpp:
141 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
142 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
143 * dfg/DFGOperations.cpp:
144 * dfg/DFGOperations.h:
145 * dfg/DFGSpeculativeJIT.cpp:
146 (JSC::DFG::SpeculativeJIT::compile):
147 * dfg/DFGSpeculativeJIT.h:
148 (JSC::DFG::SpeculativeJIT::shouldSpeculateNumber):
150 2011-09-14 Anders Carlsson <andersca@apple.com>
152 Stop building BinarySemaphore to see if that's what's breaking the GTK+ build.
154 * GNUmakefile.list.am:
156 2011-09-14 Anders Carlsson <andersca@apple.com>
158 This is getting old. Yet another build fix attempt.
160 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
162 2011-09-14 Anders Carlsson <andersca@apple.com>
164 Yet another build fix attempt.
166 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
168 2011-09-14 Anders Carlsson <andersca@apple.com>
170 How I "love" Visual Studio...
172 Try to fix build again.
174 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
176 2011-09-14 Anders Carlsson <andersca@apple.com>
178 Try to fix Windows build.
180 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
182 2011-09-14 Anders Carlsson <andersca@apple.com>
184 Add BinarySemaphore class from WebKit2 to WTF
185 https://bugs.webkit.org/show_bug.cgi?id=68132
187 Reviewed by Sam Weinig.
189 * GNUmakefile.list.am:
190 * JavaScriptCore.gypi:
191 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
192 * JavaScriptCore.xcodeproj/project.pbxproj:
193 * wtf/CMakeLists.txt:
194 Update build systems.
196 * wtf/threads: Added.
197 * wtf/threads/BinarySemaphore.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
198 * wtf/threads/BinarySemaphore.h: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.h.
199 * wtf/threads/win: Added.
200 * wtf/threads/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/win/BinarySemaphoreWin.cpp.
202 2011-09-14 Filip Pizlo <fpizlo@apple.com>
204 Unreviewed build fix for Interpreter.
206 * interpreter/Interpreter.cpp:
207 (JSC::Interpreter::privateExecute):
209 2011-09-14 Anders Carlsson <andersca@apple.com>
211 Add wtf/threads and wtf/threads/win, so we can be sure that the EWS
212 bots can correctly build the patch in https://bugs.webkit.org/show_bug.cgi?id=68132
214 Rubber-stamped by Sam Weinig.
216 * wtf/threads: Added.
217 * wtf/threads/win: Added.
219 2011-09-14 Filip Pizlo <fpizlo@apple.com>
221 DFG JIT should not speculate integer if the value is always going to be
222 used as a double anyway
223 https://bugs.webkit.org/show_bug.cgi?id=68127
225 Reviewed by Oliver Hunt.
227 Added a ValueToDouble node, which is a variant of ValueToNumber that
228 hints that it will only be used as a double and never as an integer.
229 Thus, it turns off integer speculation even if the value profiler
230 told us that the value source is an int. The logic for converting a
231 ValueToNumber into a ValueToDouble is found in Propagator.
233 This appears to be a 22% speed-up in imaging-darkroom.
236 * dfg/DFGNonSpeculativeJIT.cpp:
237 (JSC::DFG::NonSpeculativeJIT::compile):
238 * dfg/DFGPropagator.cpp:
239 (JSC::DFG::Propagator::fixpoint):
240 (JSC::DFG::Propagator::toDouble):
241 (JSC::DFG::Propagator::fixupNode):
242 (JSC::DFG::Propagator::fixup):
243 * dfg/DFGSpeculativeJIT.cpp:
244 (JSC::DFG::SpeculativeJIT::compile):
245 (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
247 2011-09-14 Filip Pizlo <fpizlo@apple.com>
249 Tiered compilation heuristics do not account for value profile fullness
250 https://bugs.webkit.org/show_bug.cgi?id=68116
252 Reviewed by Oliver Hunt.
254 Tiered compilation avoids invoking the DFG JIT if it finds that value
255 profiles contain insufficient information. Instead, it produces a
256 prediction from the current value profile, and then clears the value
257 profile. This allows the value profile to heat up from scratch for
258 some number of additional executions. The new profiles will then be
259 merged with the previous prediction. Once the amount of information
260 in predictions is enough according to heuristics in CodeBlock.cpp,
261 DFG optimization is allowed to proceed.
264 * GNUmakefile.list.am:
265 * JavaScriptCore.pro:
266 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
267 * JavaScriptCore.xcodeproj/project.pbxproj:
268 * bytecode/CodeBlock.cpp:
269 (JSC::CodeBlock::CodeBlock):
270 (JSC::CodeBlock::~CodeBlock):
271 (JSC::CodeBlock::visitAggregate):
272 (JSC::CodeBlock::visitWeakReferences):
273 (JSC::CodeBlock::shouldOptimizeNow):
274 (JSC::CodeBlock::dumpValueProfiles):
275 * bytecode/CodeBlock.h:
276 * bytecode/PredictedType.cpp:
277 (JSC::predictionToString):
278 * bytecode/PredictedType.h:
279 * bytecode/ValueProfile.cpp: Added.
280 (JSC::ValueProfile::computeStatistics):
281 (JSC::ValueProfile::computeUpdatedPrediction):
282 * bytecode/ValueProfile.h:
283 (JSC::ValueProfile::ValueProfile):
284 (JSC::ValueProfile::classInfo):
285 (JSC::ValueProfile::numberOfSamples):
286 (JSC::ValueProfile::totalNumberOfSamples):
287 (JSC::ValueProfile::isLive):
288 (JSC::ValueProfile::numberOfInt32s):
289 (JSC::ValueProfile::numberOfDoubles):
290 (JSC::ValueProfile::numberOfBooleans):
291 (JSC::ValueProfile::dump):
292 (JSC::getValueProfileBytecodeOffset):
293 * dfg/DFGByteCodeParser.cpp:
294 (JSC::DFG::ByteCodeParser::stronglyPredict):
296 (JSC::DFG::Graph::predictArgumentTypes):
297 * dfg/DFGJITCompiler.cpp:
298 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
299 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
301 (JSC::JIT::emitOptimizationCheck):
302 * jit/JITInlineMethods.h:
303 (JSC::JIT::emitValueProfilingSite):
305 (JSC::DEFINE_STUB_FUNCTION):
307 2011-09-14 Filip Pizlo <fpizlo@apple.com>
309 DFG should not speculate that the child of LogicalNot is a boolean if
310 predictions tell us otherwise
311 https://bugs.webkit.org/show_bug.cgi?id=68118
313 Reviewed by Geoffrey Garen.
315 * dfg/DFGJITCodeGenerator.cpp:
316 (JSC::DFG::JITCodeGenerator::nonSpeculativeLogicalNot):
317 * dfg/DFGJITCodeGenerator.h:
318 * dfg/DFGNonSpeculativeJIT.cpp:
319 (JSC::DFG::NonSpeculativeJIT::compile):
320 * dfg/DFGSpeculativeJIT.cpp:
321 (JSC::DFG::SpeculativeJIT::compile):
323 2011-09-14 Filip Pizlo <fpizlo@apple.com>
325 Unreviewed build fix. Turn off tiered compilation.
329 2011-09-13 Filip Pizlo <fpizlo@apple.com>
331 Prediction tracking is not precise enough
332 https://bugs.webkit.org/show_bug.cgi?id=67993
334 Reviewed by Oliver Hunt.
336 Added a richer set of type predictions, including JSFinalObject, JSString,
337 object that is not a JSFinalObject or JSArray (ObjectOther), some object
338 but we don't or care know what kind (SomeObject), definitely an object,
339 cell that is not an object or JSString, an value that is none of the above
340 (so either Undefined or Null). Made the propagator and value profiler work
343 Performance is neutral, because the DFG JIT does not take advantage of this
346 In the process of writing predictionToString() (which is now considerably
347 more complex) I decided to finally add a BoundsCheckedPointer, which
348 should come in handy in other places, like at least the OSR scratch buffer
349 and the CompactJITCodeMap. It's great for cases where you want to
350 do pointer arithmetic, you want to have assertions about the
351 pointer not going out of bounds, but you don't want to write those
354 This also required refactoring inherits(), since the ValueProfiler may
355 want to do the equivalent of inherits() but given two ClassInfo's.
357 * GNUmakefile.list.am:
358 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
359 * JavaScriptCore.xcodeproj/project.pbxproj:
360 * bytecode/PredictedType.cpp: Added.
361 (JSC::predictionToString):
362 (JSC::makePrediction):
363 (JSC::predictionFromValue):
364 * bytecode/PredictedType.h:
365 (JSC::isCellPrediction):
366 (JSC::isObjectPrediction):
367 (JSC::isFinalObjectPrediction):
368 (JSC::isStringPrediction):
369 (JSC::mergePredictions):
370 * bytecode/ValueProfile.h:
371 (JSC::ValueProfile::numberOfObjects):
372 (JSC::ValueProfile::numberOfFinalObjects):
373 (JSC::ValueProfile::numberOfStrings):
374 (JSC::ValueProfile::probabilityOfObject):
375 (JSC::ValueProfile::probabilityOfFinalObject):
376 (JSC::ValueProfile::probabilityOfString):
377 (JSC::ValueProfile::dump):
378 (JSC::ValueProfile::Statistics::Statistics):
379 (JSC::ValueProfile::computeStatistics):
380 * dfg/DFGByteCodeParser.cpp:
381 (JSC::DFG::ByteCodeParser::stronglyPredict):
383 (JSC::DFG::Graph::dump):
384 (JSC::DFG::Graph::predictArgumentTypes):
386 (JSC::DFG::Node::predict):
387 * dfg/DFGPropagator.cpp:
388 (JSC::DFG::Propagator::propagateNode):
389 * runtime/ClassInfo.h:
390 (JSC::ClassInfo::isSubClassOf):
391 * runtime/JSObject.h:
392 (JSC::JSCell::inherits):
393 * wtf/BoundsCheckedPointer.h: Added.
394 (WTF::BoundsCheckedPointer::BoundsCheckedPointer):
395 (WTF::BoundsCheckedPointer::operator=):
396 (WTF::BoundsCheckedPointer::operator+=):
397 (WTF::BoundsCheckedPointer::operator-=):
398 (WTF::BoundsCheckedPointer::operator+):
399 (WTF::BoundsCheckedPointer::operator-):
400 (WTF::BoundsCheckedPointer::operator++):
401 (WTF::BoundsCheckedPointer::operator--):
402 (WTF::BoundsCheckedPointer::operator<):
403 (WTF::BoundsCheckedPointer::operator<=):
404 (WTF::BoundsCheckedPointer::operator>):
405 (WTF::BoundsCheckedPointer::operator>=):
406 (WTF::BoundsCheckedPointer::operator==):
407 (WTF::BoundsCheckedPointer::operator!=):
408 (WTF::BoundsCheckedPointer::operator!):
409 (WTF::BoundsCheckedPointer::get):
410 (WTF::BoundsCheckedPointer::operator*):
411 (WTF::BoundsCheckedPointer::operator[]):
412 (WTF::BoundsCheckedPointer::strcat):
413 (WTF::BoundsCheckedPointer::validate):
414 * wtf/CMakeLists.txt:
416 2011-09-14 Csaba Osztrogonác <ossy@webkit.org>
418 [Qt] Win32 builds with threads turned off
419 https://bugs.webkit.org/show_bug.cgi?id=67864
421 Reviewed by Geoffrey Garen.
423 * JavaScriptCore.pri: Link pthread library on Windows platform.
424 * wtf/Platform.h: Enable multiple threads.
426 2011-09-14 Mark Hahnenberg <mhahnenberg@apple.com>
428 Unzip initialization lists and constructors in JSCell hierarchy (6/7)
429 https://bugs.webkit.org/show_bug.cgi?id=67692
431 Reviewed by Geoffrey Garen.
433 Completed the sixth level of the refactoring to add finishCreation()
434 methods to all classes within the JSCell hierarchy with non-trivial
437 This primarily consists of pushing the calls to finishCreation() down
438 into the constructors of the subclasses of the fifth level of the hierarchy
439 as well as pulling the finishCreation() calls out into the class's corresponding
440 create() method if it has one. Doing both simultaneously allows us to
441 maintain the invariant that the finishCreation() method chain is called exactly
442 once during the creation of an object, since calling it any other number of
443 times (0, 2, or more) will cause an assertion failure.
445 * API/JSCallbackFunction.cpp:
446 (JSC::JSCallbackFunction::JSCallbackFunction):
447 * API/JSCallbackFunction.h:
448 (JSC::JSCallbackFunction::create):
450 (GlobalObject::create):
451 (GlobalObject::GlobalObject):
452 * runtime/ArrayConstructor.cpp:
453 (JSC::ArrayConstructor::ArrayConstructor):
454 * runtime/ArrayConstructor.h:
455 (JSC::ArrayConstructor::create):
456 * runtime/BooleanConstructor.cpp:
457 (JSC::BooleanConstructor::BooleanConstructor):
458 * runtime/BooleanConstructor.h:
459 (JSC::BooleanConstructor::create):
460 * runtime/BooleanPrototype.cpp:
461 (JSC::BooleanPrototype::BooleanPrototype):
462 * runtime/BooleanPrototype.h:
463 (JSC::BooleanPrototype::create):
464 * runtime/DateConstructor.cpp:
465 (JSC::DateConstructor::DateConstructor):
466 * runtime/DateConstructor.h:
467 (JSC::DateConstructor::create):
468 * runtime/DatePrototype.cpp:
469 (JSC::DatePrototype::DatePrototype):
470 * runtime/DatePrototype.h:
471 (JSC::DatePrototype::create):
473 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
474 (JSC::StrictModeTypeErrorFunction::create):
475 * runtime/ErrorConstructor.cpp:
476 (JSC::ErrorConstructor::ErrorConstructor):
477 * runtime/ErrorConstructor.h:
478 (JSC::ErrorConstructor::create):
479 * runtime/FunctionConstructor.cpp:
480 (JSC::FunctionConstructor::FunctionConstructor):
481 * runtime/FunctionConstructor.h:
482 (JSC::FunctionConstructor::create):
483 * runtime/FunctionPrototype.cpp:
484 (JSC::FunctionPrototype::FunctionPrototype):
485 * runtime/FunctionPrototype.h:
486 (JSC::FunctionPrototype::create):
487 * runtime/NativeErrorConstructor.cpp:
488 (JSC::NativeErrorConstructor::NativeErrorConstructor):
489 * runtime/NativeErrorConstructor.h:
490 (JSC::NativeErrorConstructor::create):
491 * runtime/NativeErrorPrototype.cpp:
492 (JSC::NativeErrorPrototype::NativeErrorPrototype):
493 (JSC::NativeErrorPrototype::finishCreation):
494 * runtime/NativeErrorPrototype.h:
495 (JSC::NativeErrorPrototype::create):
496 * runtime/NumberConstructor.cpp:
497 (JSC::NumberConstructor::NumberConstructor):
498 * runtime/NumberConstructor.h:
499 (JSC::NumberConstructor::create):
500 * runtime/NumberPrototype.cpp:
501 (JSC::NumberPrototype::NumberPrototype):
502 * runtime/NumberPrototype.h:
503 (JSC::NumberPrototype::create):
504 * runtime/ObjectConstructor.cpp:
505 (JSC::ObjectConstructor::ObjectConstructor):
506 * runtime/ObjectConstructor.h:
507 (JSC::ObjectConstructor::create):
508 * runtime/RegExpConstructor.cpp:
509 (JSC::RegExpConstructor::RegExpConstructor):
510 * runtime/RegExpConstructor.h:
511 (JSC::RegExpConstructor::create):
512 * runtime/RegExpPrototype.cpp:
513 (JSC::RegExpPrototype::RegExpPrototype):
514 * runtime/RegExpPrototype.h:
515 (JSC::RegExpPrototype::create):
516 * runtime/StringConstructor.cpp:
517 (JSC::StringConstructor::StringConstructor):
518 * runtime/StringConstructor.h:
519 (JSC::StringConstructor::create):
520 * runtime/StringObjectThatMasqueradesAsUndefined.h:
521 (JSC::StringObjectThatMasqueradesAsUndefined::create):
522 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
523 * runtime/StringPrototype.cpp:
524 (JSC::StringPrototype::StringPrototype):
525 * runtime/StringPrototype.h:
526 (JSC::StringPrototype::create):
528 2011-09-13 Eric Seidel <eric@webkit.org>
530 Remove ENABLE_SVG_USE as <use> is required by HTML5
531 https://bugs.webkit.org/show_bug.cgi?id=68019
533 Reviewed by Ryosuke Niwa.
535 * Configurations/FeatureDefines.xcconfig:
537 2011-09-14 Iain Merrick <husky@google.com>
539 HashTraits.h should include template specialization for WTF::String
540 https://bugs.webkit.org/show_bug.cgi?id=67851
542 Ensure that the template specialization for HashTraits<String> is always
543 picked up. (Previously it was possible to include HashSet and String but
544 not the correct HashTraits, so you would get an inefficient template
547 Reviewed by Darin Adler.
550 * wtf/text/StringHash.h:
552 2011-09-13 Filip Pizlo <fpizlo@apple.com>
554 SpeculativeJIT::shouldSpeculateInteger(NodeIndex, NodeIndex) should
555 return false if either node can be double
556 https://bugs.webkit.org/show_bug.cgi?id=67985
558 Reviewed by Geoffrey Garen.
560 This is a 17% speed-up on 3d-cube.
562 This required allowing us to check if a constant is double but not
563 integer, and making the shouldSpeculateInteger() check test for
564 any hints of doubly-ness in its operands. This also required
565 changing some terminology: previously "isDouble" often meant
566 "isDouble or isInt32". Now "isDouble" means exactly what the name
567 suggests, and "isNumber" means "isDouble or isInt32".
569 * dfg/DFGByteCodeParser.cpp:
570 (JSC::DFG::ByteCodeParser::toNumber):
571 (JSC::DFG::ByteCodeParser::parseBlock):
572 * dfg/DFGGenerationInfo.h:
573 (JSC::DFG::isJSFormat):
574 (JSC::DFG::isJSInteger):
575 (JSC::DFG::isJSDouble):
576 (JSC::DFG::isJSCell):
577 (JSC::DFG::isJSBoolean):
578 (JSC::DFG::GenerationInfo::isJSFormat):
579 (JSC::DFG::GenerationInfo::isJSInteger):
580 (JSC::DFG::GenerationInfo::isJSDouble):
581 (JSC::DFG::GenerationInfo::isJSCell):
582 (JSC::DFG::GenerationInfo::isJSBoolean):
584 (JSC::DFG::Graph::isNumberConstant):
585 (JSC::DFG::Graph::valueOfNumberConstant):
586 * dfg/DFGJITCodeGenerator.cpp:
587 (JSC::DFG::JITCodeGenerator::fillInteger):
588 (JSC::DFG::JITCodeGenerator::fillDouble):
589 (JSC::DFG::JITCodeGenerator::fillJSValue):
590 (JSC::DFG::JITCodeGenerator::isKnownInteger):
591 (JSC::DFG::JITCodeGenerator::isKnownNumeric):
592 (JSC::DFG::JITCodeGenerator::isKnownCell):
593 (JSC::DFG::JITCodeGenerator::isKnownNotInteger):
594 (JSC::DFG::JITCodeGenerator::isKnownBoolean):
595 * dfg/DFGJITCodeGenerator.h:
596 (JSC::DFG::JITCodeGenerator::silentFillFPR):
597 (JSC::DFG::JITCodeGenerator::isNumberConstant):
598 (JSC::DFG::JITCodeGenerator::valueOfNumberConstant):
599 (JSC::DFG::JITCodeGenerator::initConstantInfo):
600 * dfg/DFGJITCompiler.cpp:
601 (JSC::DFG::JITCompiler::fillNumericToDouble):
602 (JSC::DFG::JITCompiler::fillToJS):
603 * dfg/DFGJITCompiler.h:
604 (JSC::DFG::JITCompiler::isNumberConstant):
605 (JSC::DFG::JITCompiler::valueOfNumberConstant):
607 (JSC::DFG::Node::isDoubleConstant):
608 (JSC::DFG::Node::isNumberConstant):
609 (JSC::DFG::Node::valueOfNumberConstant):
610 (JSC::DFG::Node::hasNumberResult):
611 * dfg/DFGNonSpeculativeJIT.cpp:
612 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
613 (JSC::DFG::NonSpeculativeJIT::compile):
614 * dfg/DFGSpeculativeJIT.cpp:
615 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
616 * dfg/DFGSpeculativeJIT.h:
617 (JSC::DFG::SpeculativeJIT::isInteger):
618 (JSC::DFG::SpeculativeJIT::shouldSpeculateDouble):
619 (JSC::DFG::SpeculativeJIT::shouldNotSpeculateInteger):
620 (JSC::DFG::SpeculativeJIT::shouldSpeculateInteger):
622 2011-09-13 Anders Carlsson <andersca@apple.com>
624 Disable C++ exceptions when building with clang
625 https://bugs.webkit.org/show_bug.cgi?id=68031
626 <rdar://problem/9556880>
628 Reviewed by Mark Rowe.
630 * Configurations/Base.xcconfig:
632 2011-09-13 Eric Seidel <eric@webkit.org>
634 Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5
635 https://bugs.webkit.org/show_bug.cgi?id=68018
637 Reviewed by Ryosuke Niwa.
639 * Configurations/FeatureDefines.xcconfig:
641 2011-09-13 Sam Weinig <sam@webkit.org>
643 Object.getPrototypeOf should use JSValue::get()
644 https://bugs.webkit.org/show_bug.cgi?id=67973
646 Reviewed by Darin Adler.
648 * runtime/ObjectConstructor.cpp:
649 (JSC::objectConstructorGetPrototypeOf):
650 Pipe through JSValue::get() to allow overrides.
652 2011-09-12 Filip Pizlo <fpizlo@apple.com>
654 JavaScriptCore does not have baseline->speculative OSR
655 https://bugs.webkit.org/show_bug.cgi?id=67920
657 Reviewed by Oliver Hunt.
659 This adds the ability to on-stack-replace (OSR) from code that is
660 running hot in the old JIT to code compiled by the new JIT. This
661 ensures that long-running loops benefit from DFG optimization.
662 It also ensures that if code experiences a speculation failure
663 in DFG code, it has an opportunity to reenter the DFG once every
664 1,000 loop iterations or so.
666 This results in a 2.88x speed-up on Kraken/imaging-desaturate,
667 and is a pure win on the main three benchmark suites (SunSpider,
668 V8, Kraken), when tiered compilation is enabled.
670 * JavaScriptCore.xcodeproj/project.pbxproj:
671 * bytecode/CodeBlock.cpp:
672 (JSC::CodeBlock::dump):
673 (JSC::CodeBlock::CodeBlock):
674 (JSC::ProgramCodeBlock::compileOptimized):
675 (JSC::EvalCodeBlock::compileOptimized):
676 (JSC::FunctionCodeBlock::compileOptimized):
677 * bytecode/CodeBlock.h:
679 * bytecode/PredictedType.h: Added.
680 (JSC::isCellPrediction):
681 (JSC::isArrayPrediction):
682 (JSC::isInt32Prediction):
683 (JSC::isDoublePrediction):
684 (JSC::isNumberPrediction):
685 (JSC::isBooleanPrediction):
686 (JSC::isStrongPrediction):
687 (JSC::predictionToString):
688 (JSC::mergePredictions):
689 (JSC::mergePrediction):
690 (JSC::makePrediction):
691 * bytecode/PredictionTracker.h: Added.
692 (JSC::operandIsArgument):
693 (JSC::PredictionSlot::PredictionSlot):
694 (JSC::PredictionTracker::PredictionTracker):
695 (JSC::PredictionTracker::initializeSimilarTo):
696 (JSC::PredictionTracker::copyLocalsFrom):
697 (JSC::PredictionTracker::numberOfArguments):
698 (JSC::PredictionTracker::numberOfVariables):
699 (JSC::PredictionTracker::argumentIndexForOperand):
700 (JSC::PredictionTracker::predictArgument):
701 (JSC::PredictionTracker::predict):
702 (JSC::PredictionTracker::predictGlobalVar):
703 (JSC::PredictionTracker::getArgumentPrediction):
704 (JSC::PredictionTracker::getPrediction):
705 (JSC::PredictionTracker::getGlobalVarPrediction):
706 * bytecompiler/BytecodeGenerator.cpp:
707 (JSC::BytecodeGenerator::emitLoopHint):
708 * bytecompiler/BytecodeGenerator.h:
709 * bytecompiler/NodesCodegen.cpp:
710 (JSC::DoWhileNode::emitBytecode):
711 (JSC::WhileNode::emitBytecode):
712 (JSC::ForNode::emitBytecode):
713 (JSC::ForInNode::emitBytecode):
714 * dfg/DFGByteCodeParser.cpp:
715 (JSC::DFG::ByteCodeParser::parseBlock):
716 * dfg/DFGCapabilities.h:
717 (JSC::DFG::canCompileOpcode):
721 (JSC::DFG::Graph::dump):
723 (JSC::DFG::BasicBlock::BasicBlock):
724 (JSC::DFG::Graph::predict):
725 (JSC::DFG::Graph::getPrediction):
726 * dfg/DFGJITCompiler.cpp:
727 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
728 (JSC::DFG::JITCompiler::compileEntry):
729 (JSC::DFG::JITCompiler::compileBody):
730 * dfg/DFGJITCompiler.h:
731 (JSC::DFG::JITCompiler::noticeOSREntry):
733 * dfg/DFGOSREntry.cpp: Added.
734 (JSC::DFG::predictionIsValid):
735 (JSC::DFG::prepareOSREntry):
736 * dfg/DFGOSREntry.h: Added.
737 (JSC::DFG::prepareOSREntry):
738 * dfg/DFGPredictionTracker.h: Removed.
739 * dfg/DFGPropagator.cpp:
740 (JSC::DFG::Propagator::mergeUse):
741 (JSC::DFG::Propagator::mergePrediction):
742 * dfg/DFGSpeculativeJIT.cpp:
743 (JSC::DFG::SpeculativeJIT::compile):
744 * jit/CompactJITCodeMap.h:
745 (JSC::CompactJITCodeMap::numberOfEntries):
746 (JSC::CompactJITCodeMap::decode):
747 (JSC::CompactJITCodeMap::Decoder::Decoder):
748 (JSC::CompactJITCodeMap::Decoder::numberOfEntriesRemaining):
749 (JSC::CompactJITCodeMap::Decoder::read):
751 (JSC::JIT::emitOptimizationCheck):
752 (JSC::JIT::emitTimeoutCheck):
753 (JSC::JIT::privateCompileMainPass):
755 (JSC::JIT::emit_op_loop_hint):
757 (JSC::DEFINE_STUB_FUNCTION):
758 * runtime/Executable.cpp:
759 (JSC::EvalExecutable::compileInternal):
760 (JSC::ProgramExecutable::compileInternal):
761 (JSC::FunctionExecutable::compileForCallInternal):
762 (JSC::FunctionExecutable::compileForConstructInternal):
764 2011-09-12 Sam Weinig <sam@webkit.org>
766 Don't allow setting __proto__ to be a getter or setter
767 https://bugs.webkit.org/show_bug.cgi?id=67982
769 Reviewed by Gavin Barraclough.
771 * runtime/JSObject.cpp:
772 (JSC::JSObject::defineGetter):
773 (JSC::JSObject::defineSetter):
774 Disallow setting a getter or setter on __proto__.
776 2011-09-12 James Robinson <jamesr@chromium.org>
778 Unreviewed build fix for chromium.
780 Guard access to UString::latin1() with USE(JSC) since it is defined in JavaScriptCore/runtime/UString.cpp, which
781 is currently only compiled in by ports that use JavaScriptCore. This code is currently unreachable in builds so
782 no change in functionality.
784 * yarr/YarrInterpreter.cpp:
785 (JSC::Yarr::Interpreter::CharAccess::CharAccess):
787 2011-09-09 Filip Pizlo <fpizlo@apple.com>
789 JavaScriptCore does not have speculative->baseline OSR
790 https://bugs.webkit.org/show_bug.cgi?id=67826
792 Reviewed by Oliver Hunt.
794 This adds the ability to bail out of DFG speculative JIT execution by
795 performing an on-stack replacement (OSR) that results in the control
796 flow going to the equivalent code generated by the old JIT.
798 This required a number of new features, as well as taking advantage of
799 some features that happened to already be present:
801 We already had a policy of storing the bytecode index for which a DFG
802 node was generated inside the DFG::Node class. This was previously
803 called exceptionInfo. It's now renamed to codeOrigin to reflect that
804 it's used for more than just excpetions. OSR uses this to figure out
805 which bytecode index to use to look up the machine code location in
806 the code generated by the old JIT that we should be jumping to.
808 CodeBlock now stores a mapping between bytecode indices and machine
809 code offsets for code generated by the old JIT. This is implemented
810 by CompactJITCodeMap, which tries to compress this data a bit. The
811 OSR compiler decodes this and uses it to find the machine code
812 locations it should be jumping to.
814 We already had a mechanism that emitted SetLocal nodes in the DFG graph
815 that told us the time at which the old JIT would have stored something
816 into its register file, and the DFG::Node that corresponds to the value
817 that it would have stored. These SetLocal's were mostly dead-code-
818 eliminated, but our DCE leaves the nodes intact except for making them
819 have 0 as the ref count. This allows the OSR compiler to construct a
820 mapping between the state as it would have been seen by the old JIT
821 and the state as the DFG JIT sees it. The OSR compiler uses this to
822 generate code that reshapes the call frame so that it is like what the
823 old JIT would expect.
825 Finally, when DFG_OSR is enabled (the default for TIERED_COMPILATION)
826 we no longer emit the non-speculative path.
828 * JavaScriptCore.xcodeproj/project.pbxproj:
829 * bytecode/CodeBlock.h:
830 * dfg/DFGByteCodeParser.cpp:
831 (JSC::DFG::ByteCodeParser::currentCodeOrigin):
832 (JSC::DFG::ByteCodeParser::addToGraph):
834 * dfg/DFGGenerationInfo.h:
835 (JSC::DFG::GenerationInfo::alive):
837 (JSC::DFG::Graph::dump):
838 * dfg/DFGJITCodeGenerator.cpp:
839 (JSC::DFG::JITCodeGenerator::emitCall):
840 * dfg/DFGJITCodeGenerator.h:
841 (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
842 * dfg/DFGJITCompiler.cpp:
843 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
844 (JSC::DFG::JITCompiler::linkOSRExits):
845 (JSC::DFG::JITCompiler::compileBody):
846 (JSC::DFG::JITCompiler::link):
847 * dfg/DFGJITCompiler.h:
848 (JSC::DFG::CallRecord::CallRecord):
849 (JSC::DFG::JITCompiler::notifyCall):
850 (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
851 (JSC::DFG::JITCompiler::appendCallWithFastExceptionCheck):
852 (JSC::DFG::JITCompiler::addJSCall):
853 (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
855 (JSC::DFG::CodeOrigin::CodeOrigin):
856 (JSC::DFG::CodeOrigin::isSet):
857 (JSC::DFG::CodeOrigin::bytecodeIndex):
858 (JSC::DFG::Node::Node):
859 (JSC::DFG::Node::child1Unchecked):
860 * dfg/DFGNonSpeculativeJIT.cpp:
861 (JSC::DFG::NonSpeculativeJIT::compile):
862 * dfg/DFGSpeculativeJIT.cpp:
863 (JSC::DFG::ValueSource::dump):
864 (JSC::DFG::ValueRecovery::dump):
865 (JSC::DFG::OSRExit::OSRExit):
866 (JSC::DFG::SpeculativeJIT::compile):
867 (JSC::DFG::SpeculativeJIT::compileMovHint):
868 (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
869 * dfg/DFGSpeculativeJIT.h:
870 (JSC::DFG::ValueSource::ValueSource):
871 (JSC::DFG::ValueSource::isSet):
872 (JSC::DFG::ValueSource::nodeIndex):
873 (JSC::DFG::ValueRecovery::ValueRecovery):
874 (JSC::DFG::ValueRecovery::alreadyInRegisterFile):
875 (JSC::DFG::ValueRecovery::inGPR):
876 (JSC::DFG::ValueRecovery::inFPR):
877 (JSC::DFG::ValueRecovery::displacedInRegisterFile):
878 (JSC::DFG::ValueRecovery::constant):
879 (JSC::DFG::ValueRecovery::technique):
880 (JSC::DFG::ValueRecovery::gpr):
881 (JSC::DFG::ValueRecovery::fpr):
882 (JSC::DFG::ValueRecovery::virtualRegister):
883 (JSC::DFG::OSRExit::numberOfRecoveries):
884 (JSC::DFG::OSRExit::valueRecovery):
885 (JSC::DFG::OSRExit::isArgument):
886 (JSC::DFG::OSRExit::argumentForIndex):
887 (JSC::DFG::OSRExit::variableForIndex):
888 (JSC::DFG::OSRExit::operandForIndex):
889 (JSC::DFG::SpeculativeJIT::osrExits):
890 (JSC::DFG::SpeculativeJIT::speculationCheck):
891 (JSC::DFG::SpeculativeJIT::valueSourceForOperand):
892 (JSC::DFG::SpeculativeJIT::setNodeIndexForOperand):
893 (JSC::DFG::SpeculativeJIT::valueSourceReferenceForOperand):
894 (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):
895 (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
896 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
897 * jit/CompactJITCodeMap.h: Added.
898 (JSC::BytecodeAndMachineOffset::BytecodeAndMachineOffset):
899 (JSC::BytecodeAndMachineOffset::getBytecodeIndex):
900 (JSC::BytecodeAndMachineOffset::getMachineCodeOffset):
901 (JSC::CompactJITCodeMap::~CompactJITCodeMap):
902 (JSC::CompactJITCodeMap::decode):
903 (JSC::CompactJITCodeMap::CompactJITCodeMap):
904 (JSC::CompactJITCodeMap::at):
905 (JSC::CompactJITCodeMap::decodeNumber):
906 (JSC::CompactJITCodeMap::Encoder::Encoder):
907 (JSC::CompactJITCodeMap::Encoder::~Encoder):
908 (JSC::CompactJITCodeMap::Encoder::append):
909 (JSC::CompactJITCodeMap::Encoder::finish):
910 (JSC::CompactJITCodeMap::Encoder::appendByte):
911 (JSC::CompactJITCodeMap::Encoder::encodeNumber):
912 (JSC::CompactJITCodeMap::Encoder::ensureCapacityFor):
914 (JSC::JIT::privateCompileMainPass):
915 (JSC::JIT::privateCompile):
917 * runtime/JSGlobalData.cpp:
918 (JSC::JSGlobalData::JSGlobalData):
919 (JSC::JSGlobalData::~JSGlobalData):
920 * runtime/JSGlobalData.h:
921 (JSC::JSGlobalData::osrScratchBufferForSize):
922 * runtime/JSValue.cpp:
923 (JSC::JSValue::description):
925 2011-09-12 Geoffrey Garen <ggaren@apple.com>
927 Re-enabled ENABLE(LAZY_BLOCK_FREEING).
929 Reviewed by Stephanie Lewis.
931 I accidentally disabled this in r94890, causing a big performance regression.
935 2011-09-12 Michael Saboff <msaboff@apple.com>
937 Broken Build for ARM - lshift32() needs TrustedImm32 arg
938 https://bugs.webkit.org/show_bug.cgi?id=67965
940 Change lshift32(16, ARMRegisters::S1); to lshift32(TrustedImm32(16), ARMRegisters::S1);
942 Reviewed by Anders Carlsson.
944 * assembler/MacroAssemblerARM.h:
945 (JSC::MacroAssemblerARM::branch16):
947 2011-09-12 Michael Saboff <msaboff@apple.com>
949 Broken ARM build - missing semicolon in JavaScriptCore/assembler/MacroAssemblerARM.h
950 https://bugs.webkit.org/show_bug.cgi?id=67961
952 Added missing semicolon.
954 Reviewed by Ryosuke Niwa.
956 * assembler/MacroAssemblerARM.h:
957 (JSC::MacroAssemblerARM::branch16):
959 2011-09-12 Michael Saboff <msaboff@apple.com>
961 Update RegExp and related classes to use 8 bit strings when available
962 https://bugs.webkit.org/show_bug.cgi?id=67337
964 Modified both the Yarr interpreter and JIT to handle 8 bit subject strings.
965 The code paths are triggered by the UString::is8bit() method which currently
966 returns false. Implemented JIT changes for all current architectures.
967 Tested X86_64 and ARM v7.
969 This includes some code that will likely change as we complete the
970 8 bit string changes. This includes the way the raw buffer pointers
971 are accessed as well as replacing the CharAccess class with a
972 string interator returned from UString.
974 Fixed build breakage in testRegExp.cpp due to globalObject construction
977 Reviewed by Gavin Barraclough.
979 * JavaScriptCore.exp:
980 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
982 (GlobalObject::finishCreation):
983 (GlobalObject::GlobalObject):
984 * assembler/ARMAssembler.cpp:
985 (JSC::ARMAssembler::baseIndexTransfer32):
986 * assembler/ARMAssembler.h:
987 * assembler/ARMv7Assembler.h:
988 (JSC::ARMv7Assembler::ubfx):
989 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg40Imm3Reg4Imm20Imm5):
990 * assembler/MacroAssemblerARM.h:
991 (JSC::MacroAssemblerARM::load8):
992 (JSC::MacroAssemblerARM::branch8):
993 (JSC::MacroAssemblerARM::branch16):
994 * assembler/MacroAssemblerARMv7.h:
995 (JSC::MacroAssemblerARMv7::load8):
996 (JSC::MacroAssemblerARMv7::branch16):
997 (JSC::MacroAssemblerARMv7::branch8):
998 * assembler/MacroAssemblerMIPS.h:
999 (JSC::MacroAssemblerMIPS::load8):
1000 (JSC::MacroAssemblerMIPS::branch8):
1001 (JSC::MacroAssemblerMIPS::branch16):
1002 * assembler/MacroAssemblerSH4.h:
1003 (JSC::MacroAssemblerSH4::load8):
1004 (JSC::MacroAssemblerSH4::branch8):
1005 (JSC::MacroAssemblerSH4::branch16):
1006 * assembler/MacroAssemblerX86Common.h:
1007 (JSC::MacroAssemblerX86Common::load8):
1008 (JSC::MacroAssemblerX86Common::branch16):
1009 (JSC::MacroAssemblerX86Common::branch8):
1010 * assembler/SH4Assembler.h:
1011 (JSC::SH4Assembler::extub):
1012 (JSC::SH4Assembler::printInstr):
1013 * assembler/X86Assembler.h:
1014 (JSC::X86Assembler::cmpw_ir):
1015 (JSC::X86Assembler::movzbl_mr):
1016 * runtime/RegExp.cpp:
1017 (JSC::RegExp::compile):
1018 (JSC::RegExp::compileIfNecessary):
1019 (JSC::RegExp::match):
1020 (JSC::RegExp::matchCompareWithInterpreter):
1022 * runtime/UString.h:
1023 (JSC::UString::is8Bit):
1025 * yarr/YarrInterpreter.cpp:
1026 (JSC::Yarr::Interpreter::CharAccess::CharAccess):
1027 (JSC::Yarr::Interpreter::CharAccess::~CharAccess):
1028 (JSC::Yarr::Interpreter::CharAccess::operator[]):
1029 (JSC::Yarr::Interpreter::InputStream::InputStream):
1030 (JSC::Yarr::Interpreter::Interpreter):
1031 (JSC::Yarr::interpret):
1033 (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
1034 (JSC::Yarr::YarrGenerator::readCharacter):
1035 (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
1036 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
1037 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
1038 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
1039 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
1040 (JSC::Yarr::YarrGenerator::generateDotStarEnclosure):
1041 (JSC::Yarr::YarrGenerator::YarrGenerator):
1042 (JSC::Yarr::YarrGenerator::compile):
1043 (JSC::Yarr::jitCompile):
1044 (JSC::Yarr::execute):
1046 (JSC::Yarr::YarrCodeBlock::has8BitCode):
1047 (JSC::Yarr::YarrCodeBlock::has16BitCode):
1048 (JSC::Yarr::YarrCodeBlock::set8BitCode):
1049 (JSC::Yarr::YarrCodeBlock::set16BitCode):
1050 (JSC::Yarr::YarrCodeBlock::execute):
1051 * yarr/YarrParser.h:
1052 (JSC::Yarr::Parser::Parser):
1054 2011-09-12 Andras Becsi <andras.becsi@nokia.com>
1056 [Qt] Build fails after r94920 with strict compiler
1057 https://bugs.webkit.org/show_bug.cgi?id=67928
1059 Reviewed by Csaba Osztrogonác.
1061 * wtf/RedBlackTree.h:
1062 (WTF::RedBlackTree::insert): Remove dead variables updateStart and newSubTreeRoot.
1064 2011-09-12 Patrick Gansterer <paroga@webkit.org>
1066 Unreviewed build fix after r94871.
1068 * runtime/InitializeThreading.cpp:
1069 (JSC::initializeThreadingOnce):
1070 * wtf/FastMalloc.cpp:
1071 * wtf/RefCountedLeakCounter.h:
1073 2011-09-11 Filip Pizlo <fpizlo@apple.com>
1075 DFGNode.h has macros that indicate the enabling of a feature, but
1076 they do not use the ENABLE() idiom.
1077 https://bugs.webkit.org/show_bug.cgi?id=67907
1079 Reviewed by Oliver Hunt.
1081 * dfg/DFGByteCodeParser.cpp:
1082 (JSC::DFG::ByteCodeParser::stronglyPredict):
1083 (JSC::DFG::ByteCodeParser::parse):
1085 (JSC::DFG::Graph::predictArgumentTypes):
1086 * dfg/DFGJITCodeGenerator.cpp:
1087 * dfg/DFGJITCodeGenerator.h:
1088 * dfg/DFGJITCompiler.cpp:
1089 (JSC::DFG::JITCompiler::fillInt32ToInteger):
1090 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
1091 (JSC::DFG::JITCompiler::compileBody):
1092 (JSC::DFG::JITCompiler::link):
1093 * dfg/DFGJITCompiler.h:
1095 * dfg/DFGNonSpeculativeJIT.cpp:
1096 (JSC::DFG::NonSpeculativeJIT::compile):
1097 * dfg/DFGOperations.cpp:
1098 * dfg/DFGOperations.h:
1099 * dfg/DFGPropagator.cpp:
1100 (JSC::DFG::Propagator::fixpoint):
1101 (JSC::DFG::Propagator::propagateNode):
1102 (JSC::DFG::Propagator::propagateForward):
1103 (JSC::DFG::Propagator::propagateBackward):
1104 (JSC::DFG::propagate):
1105 * dfg/DFGScoreBoard.h:
1106 * dfg/DFGSpeculativeJIT.cpp:
1107 (JSC::DFG::SpeculativeJIT::compile):
1108 * dfg/DFGSpeculativeJIT.h:
1109 (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
1111 (JSC::JIT::privateCompile):
1113 2011-09-11 Fumitoshi Ukai <ukai@chromium.org>
1115 Unreviewed build fix for chromium/mac & clang.
1117 Fix the macro redefinition error by r94927, because chromium set
1118 ENABLE_JSC_MULTIPLE_THREADS=0 in WebKit/chromium/features.gypi and
1119 it is not PLATFORM(QT).
1120 ../../JavaScriptCore/wtf/Platform.h:512:9: error: 'ENABLE_JSC_MULTIPLE_THREADS' macro redefined [-Werror]
1121 #define ENABLE_JSC_MULTIPLE_THREADS 1
1122 <command line>:43:9: note: previous definition is here
1123 #define ENABLE_JSC_MULTIPLE_THREADS 0
1128 2011-09-11 Sam Weinig <sam@webkit.org>
1130 Remove JSCell::isPropertyNameIterator(), it is unused
1131 https://bugs.webkit.org/show_bug.cgi?id=67911
1133 Reviewed by Oliver Hunt.
1136 * runtime/JSPropertyNameIterator.h:
1138 2011-09-11 Sam Weinig <sam@webkit.org>
1140 De-virtualize JSCell::isAPIValueWrapper
1141 https://bugs.webkit.org/show_bug.cgi?id=67909
1143 Reviewed by Oliver Hunt.
1145 * runtime/JSAPIValueWrapper.h:
1146 (JSC::JSAPIValueWrapper::createStructure):
1147 Set the correct type on structure creation.
1150 Remove virtual keyword and default implementation.
1153 Add type for APIValueWrapper. It must come after CompoundType since
1154 the APIValueWrapper has children in need of marking.
1156 * runtime/Structure.h:
1157 (JSC::JSCell::isAPIValueWrapper):
1158 Implement predicate using type info.
1160 2011-09-10 Sam Weinig <sam@webkit.org>
1162 De-virtualize JSCell::isGetterSetter, type information is available for it
1163 https://bugs.webkit.org/show_bug.cgi?id=67902
1165 Reviewed by Dan Bernstein.
1167 * runtime/GetterSetter.cpp:
1168 * runtime/GetterSetter.h:
1169 Remove override of isGetterSetter.
1171 * runtime/JSCell.cpp:
1173 De-virtualize and remove silly base implementation.
1175 * runtime/Structure.h:
1176 (JSC::JSCell::isGetterSetter):
1177 Use type info to determine getter-setter-hood.
1179 2011-09-09 Oliver Hunt <oliver@apple.com>
1181 Remove support for anonymous storage from jsobjects
1182 https://bugs.webkit.org/show_bug.cgi?id=67881
1184 Reviewed by Sam Weinig.
1186 Remove all use of anonymous slots, essentially a mechanical change
1189 * API/JSCallbackConstructor.h:
1190 (JSC::JSCallbackConstructor::createStructure):
1191 * API/JSCallbackFunction.h:
1192 (JSC::JSCallbackFunction::createStructure):
1193 * API/JSCallbackObject.h:
1194 (JSC::JSCallbackObject::createStructure):
1195 * JavaScriptCore.exp:
1196 * debugger/DebuggerActivation.h:
1197 (JSC::DebuggerActivation::createStructure):
1198 * heap/MarkStack.cpp:
1199 (JSC::MarkStack::validateValue):
1201 * runtime/Arguments.h:
1202 (JSC::Arguments::createStructure):
1203 * runtime/ArrayConstructor.h:
1204 (JSC::ArrayConstructor::createStructure):
1205 * runtime/ArrayPrototype.cpp:
1206 (JSC::ArrayPrototype::finishCreation):
1207 * runtime/ArrayPrototype.h:
1208 (JSC::ArrayPrototype::createStructure):
1209 * runtime/BooleanObject.h:
1210 (JSC::BooleanObject::createStructure):
1211 * runtime/BooleanPrototype.cpp:
1212 (JSC::BooleanPrototype::BooleanPrototype):
1213 * runtime/BooleanPrototype.h:
1214 (JSC::BooleanPrototype::createStructure):
1215 * runtime/DateConstructor.h:
1216 (JSC::DateConstructor::createStructure):
1217 * runtime/DateInstance.h:
1218 (JSC::DateInstance::createStructure):
1219 * runtime/DatePrototype.cpp:
1220 (JSC::DatePrototype::DatePrototype):
1221 * runtime/DatePrototype.h:
1222 (JSC::DatePrototype::createStructure):
1223 * runtime/ErrorInstance.h:
1224 (JSC::ErrorInstance::createStructure):
1225 * runtime/ErrorPrototype.cpp:
1226 (JSC::ErrorPrototype::finishCreation):
1227 * runtime/ErrorPrototype.h:
1228 (JSC::ErrorPrototype::createStructure):
1229 * runtime/ExceptionHelpers.h:
1230 (JSC::InterruptedExecutionError::createStructure):
1231 (JSC::TerminatedExecutionError::createStructure):
1232 * runtime/Executable.h:
1233 (JSC::ExecutableBase::createStructure):
1234 (JSC::NativeExecutable::createStructure):
1235 (JSC::EvalExecutable::createStructure):
1236 (JSC::ProgramExecutable::createStructure):
1237 (JSC::FunctionExecutable::createStructure):
1238 * runtime/FunctionPrototype.h:
1239 (JSC::FunctionPrototype::createStructure):
1240 * runtime/GetterSetter.h:
1241 (JSC::GetterSetter::createStructure):
1242 * runtime/InternalFunction.h:
1243 (JSC::InternalFunction::createStructure):
1244 * runtime/JSAPIValueWrapper.h:
1245 (JSC::JSAPIValueWrapper::createStructure):
1246 * runtime/JSActivation.h:
1247 (JSC::JSActivation::createStructure):
1248 * runtime/JSArray.h:
1249 (JSC::JSArray::createStructure):
1250 * runtime/JSByteArray.cpp:
1251 (JSC::JSByteArray::createStructure):
1253 * runtime/JSFunction.h:
1254 (JSC::JSFunction::createStructure):
1255 * runtime/JSGlobalObject.h:
1256 (JSC::JSGlobalObject::finishCreation):
1257 (JSC::JSGlobalObject::createStructure):
1258 * runtime/JSNotAnObject.h:
1259 (JSC::JSNotAnObject::createStructure):
1260 * runtime/JSONObject.h:
1261 (JSC::JSONObject::createStructure):
1262 * runtime/JSObject.h:
1263 (JSC::JSObject::createStructure):
1264 (JSC::JSNonFinalObject::createStructure):
1265 (JSC::JSFinalObject::createStructure):
1266 * runtime/JSPropertyNameIterator.cpp:
1267 (JSC::JSPropertyNameIterator::create):
1268 * runtime/JSPropertyNameIterator.h:
1269 (JSC::JSPropertyNameIterator::createStructure):
1270 * runtime/JSStaticScopeObject.h:
1271 (JSC::JSStaticScopeObject::createStructure):
1272 * runtime/JSString.h:
1273 (JSC::RopeBuilder::createStructure):
1274 * runtime/JSVariableObject.h:
1275 (JSC::JSVariableObject::createStructure):
1276 * runtime/JSWrapperObject.h:
1277 (JSC::JSWrapperObject::createStructure):
1278 * runtime/MathObject.h:
1279 (JSC::MathObject::createStructure):
1280 * runtime/NativeErrorConstructor.h:
1281 (JSC::NativeErrorConstructor::createStructure):
1282 * runtime/NumberConstructor.h:
1283 (JSC::NumberConstructor::createStructure):
1284 * runtime/NumberObject.h:
1285 (JSC::NumberObject::createStructure):
1286 * runtime/NumberPrototype.cpp:
1287 (JSC::NumberPrototype::NumberPrototype):
1288 * runtime/NumberPrototype.h:
1289 (JSC::NumberPrototype::createStructure):
1290 * runtime/ObjectConstructor.h:
1291 (JSC::ObjectConstructor::createStructure):
1292 * runtime/ObjectPrototype.cpp:
1293 (JSC::ObjectPrototype::finishCreation):
1294 * runtime/ObjectPrototype.h:
1295 (JSC::ObjectPrototype::createStructure):
1297 (JSC::RegExp::createStructure):
1298 * runtime/RegExpConstructor.h:
1299 (JSC::RegExpConstructor::createStructure):
1300 * runtime/RegExpObject.h:
1301 (JSC::RegExpObject::createStructure):
1302 * runtime/RegExpPrototype.h:
1303 (JSC::RegExpPrototype::createStructure):
1304 * runtime/ScopeChain.h:
1305 (JSC::ScopeChainNode::createStructure):
1306 * runtime/StrictEvalActivation.h:
1307 (JSC::StrictEvalActivation::createStructure):
1308 * runtime/StringConstructor.h:
1309 (JSC::StringConstructor::createStructure):
1310 * runtime/StringObject.h:
1311 (JSC::StringObject::createStructure):
1312 * runtime/StringObjectThatMasqueradesAsUndefined.h:
1313 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1314 * runtime/StringPrototype.cpp:
1315 (JSC::StringPrototype::StringPrototype):
1316 * runtime/StringPrototype.h:
1317 (JSC::StringPrototype::createStructure):
1318 * runtime/Structure.cpp:
1319 (JSC::Structure::Structure):
1320 (JSC::Structure::materializePropertyMap):
1321 (JSC::Structure::addPropertyTransitionToExistingStructure):
1322 (JSC::Structure::addPropertyTransition):
1323 (JSC::Structure::removePropertyTransition):
1324 (JSC::Structure::changePrototypeTransition):
1325 (JSC::Structure::despecifyFunctionTransition):
1326 (JSC::Structure::getterSetterTransition):
1327 (JSC::Structure::toDictionaryTransition):
1328 (JSC::Structure::preventExtensionsTransition):
1329 (JSC::Structure::flattenDictionaryStructure):
1330 (JSC::Structure::addPropertyWithoutTransition):
1331 (JSC::Structure::removePropertyWithoutTransition):
1332 (JSC::Structure::get):
1333 (JSC::Structure::putSpecificValue):
1334 (JSC::Structure::remove):
1335 (JSC::Structure::checkConsistency):
1336 * runtime/Structure.h:
1337 (JSC::Structure::create):
1338 (JSC::Structure::propertyStorageSize):
1339 (JSC::Structure::get):
1340 * runtime/StructureChain.h:
1341 (JSC::StructureChain::createStructure):
1343 2011-09-11 Jarred Nicholls <jarred@sencha.com>
1345 [Qt] Win32 build broken due to MachineStackMarker.cpp/.o failing to link against pthreads library
1346 https://bugs.webkit.org/show_bug.cgi?id=67864
1348 Qt Win32 is not pthread compatible and cannot participate in multithreaded JSC or it fails to build.
1350 Reviewed by Csaba Osztrogonác.
1354 2011-09-11 Filip Pizlo <fpizlo@apple.com>
1356 ARM and MIPS assemblers still refer to executable pools.
1357 https://bugs.webkit.org/show_bug.cgi?id=67903
1359 Reviewed by Csaba Osztrogonác.
1361 * assembler/ARMAssembler.cpp:
1362 (JSC::ARMAssembler::executableCopy):
1363 * assembler/ARMAssembler.h:
1364 * assembler/AssemblerBufferWithConstantPool.h:
1365 * assembler/MIPSAssembler.h:
1366 (JSC::MIPSAssembler::executableCopy):
1368 2011-09-08 Filip Pizlo <fpizlo@apple.com>
1370 The executable allocator makes it difficult to free individual
1371 chunks of executable memory
1372 https://bugs.webkit.org/show_bug.cgi?id=66363
1374 Reviewed by Oliver Hunt.
1376 Introduced a best-fit, balanced-tree based allocator. The allocator
1377 required a balanced tree that does not allocate memory and that
1378 permits the removal of individual nodes directly (as opposed to by
1379 key); neither AVLTree nor WebCore's PODRedBlackTree supported this.
1380 Changed all references to executable code to use a reference counted
1383 * GNUmakefile.list.am:
1384 * JavaScriptCore.exp:
1385 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1386 * JavaScriptCore.xcodeproj/project.pbxproj:
1387 * assembler/AssemblerBuffer.h:
1388 (JSC::AssemblerBuffer::executableCopy):
1389 * assembler/LinkBuffer.h:
1390 (JSC::LinkBuffer::LinkBuffer):
1391 (JSC::LinkBuffer::finalizeCode):
1392 (JSC::LinkBuffer::linkCode):
1393 * assembler/MacroAssemblerCodeRef.h:
1394 (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
1395 (JSC::MacroAssemblerCodeRef::createSelfManagedCodeRef):
1396 (JSC::MacroAssemblerCodeRef::executableMemory):
1397 (JSC::MacroAssemblerCodeRef::code):
1398 (JSC::MacroAssemblerCodeRef::size):
1399 (JSC::MacroAssemblerCodeRef::operator!):
1400 * assembler/X86Assembler.h:
1401 (JSC::X86Assembler::executableCopy):
1402 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
1403 * bytecode/CodeBlock.h:
1404 * bytecode/Instruction.h:
1405 * bytecode/StructureStubInfo.h:
1406 * dfg/DFGJITCompiler.cpp:
1407 (JSC::DFG::JITCompiler::compile):
1408 (JSC::DFG::JITCompiler::compileFunction):
1409 * dfg/DFGRepatch.cpp:
1410 (JSC::DFG::generateProtoChainAccessStub):
1411 (JSC::DFG::tryCacheGetByID):
1412 (JSC::DFG::tryBuildGetByIDList):
1413 (JSC::DFG::tryBuildGetByIDProtoList):
1414 (JSC::DFG::tryCachePutByID):
1415 * jit/ExecutableAllocator.cpp:
1416 (JSC::ExecutableAllocator::initializeAllocator):
1417 (JSC::ExecutableAllocator::ExecutableAllocator):
1418 (JSC::ExecutableAllocator::allocate):
1419 (JSC::ExecutableAllocator::committedByteCount):
1420 (JSC::ExecutableAllocator::dumpProfile):
1421 * jit/ExecutableAllocator.h:
1422 (JSC::ExecutableAllocator::dumpProfile):
1423 * jit/ExecutableAllocatorFixedVMPool.cpp:
1424 (JSC::ExecutableAllocator::initializeAllocator):
1425 (JSC::ExecutableAllocator::ExecutableAllocator):
1426 (JSC::ExecutableAllocator::isValid):
1427 (JSC::ExecutableAllocator::underMemoryPressure):
1428 (JSC::ExecutableAllocator::allocate):
1429 (JSC::ExecutableAllocator::committedByteCount):
1430 (JSC::ExecutableAllocator::dumpProfile):
1432 (JSC::JIT::privateCompile):
1434 (JSC::JIT::compileCTIMachineTrampolines):
1435 (JSC::JIT::compileCTINativeCall):
1437 (JSC::JITCode::operator !):
1438 (JSC::JITCode::addressForCall):
1439 (JSC::JITCode::offsetOf):
1440 (JSC::JITCode::execute):
1441 (JSC::JITCode::start):
1442 (JSC::JITCode::size):
1443 (JSC::JITCode::getExecutableMemory):
1444 (JSC::JITCode::HostFunction):
1445 (JSC::JITCode::JITCode):
1446 * jit/JITOpcodes.cpp:
1447 (JSC::JIT::privateCompileCTIMachineTrampolines):
1448 (JSC::JIT::privateCompileCTINativeCall):
1449 * jit/JITOpcodes32_64.cpp:
1450 (JSC::JIT::privateCompileCTIMachineTrampolines):
1451 (JSC::JIT::privateCompileCTINativeCall):
1452 * jit/JITPropertyAccess.cpp:
1453 (JSC::JIT::stringGetByValStubGenerator):
1454 (JSC::JIT::emitSlow_op_get_by_val):
1455 (JSC::JIT::privateCompilePutByIdTransition):
1456 (JSC::JIT::privateCompilePatchGetArrayLength):
1457 (JSC::JIT::privateCompileGetByIdProto):
1458 (JSC::JIT::privateCompileGetByIdSelfList):
1459 (JSC::JIT::privateCompileGetByIdProtoList):
1460 (JSC::JIT::privateCompileGetByIdChainList):
1461 (JSC::JIT::privateCompileGetByIdChain):
1462 * jit/JITPropertyAccess32_64.cpp:
1463 (JSC::JIT::stringGetByValStubGenerator):
1464 (JSC::JIT::emitSlow_op_get_by_val):
1465 (JSC::JIT::privateCompilePutByIdTransition):
1466 (JSC::JIT::privateCompilePatchGetArrayLength):
1467 (JSC::JIT::privateCompileGetByIdProto):
1468 (JSC::JIT::privateCompileGetByIdSelfList):
1469 (JSC::JIT::privateCompileGetByIdProtoList):
1470 (JSC::JIT::privateCompileGetByIdChainList):
1471 (JSC::JIT::privateCompileGetByIdChain):
1473 (JSC::JITThunks::JITThunks):
1474 (JSC::DEFINE_STUB_FUNCTION):
1475 (JSC::getPolymorphicAccessStructureListSlot):
1476 (JSC::JITThunks::ctiStub):
1477 (JSC::JITThunks::hostFunctionStub):
1479 * jit/SpecializedThunkJIT.h:
1480 (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
1481 (JSC::SpecializedThunkJIT::finalize):
1482 * jit/ThunkGenerators.cpp:
1483 (JSC::charCodeAtThunkGenerator):
1484 (JSC::charAtThunkGenerator):
1485 (JSC::fromCharCodeThunkGenerator):
1486 (JSC::sqrtThunkGenerator):
1487 (JSC::floorThunkGenerator):
1488 (JSC::ceilThunkGenerator):
1489 (JSC::roundThunkGenerator):
1490 (JSC::expThunkGenerator):
1491 (JSC::logThunkGenerator):
1492 (JSC::absThunkGenerator):
1493 (JSC::powThunkGenerator):
1494 * jit/ThunkGenerators.h:
1495 * runtime/Executable.h:
1496 (JSC::NativeExecutable::create):
1497 * runtime/InitializeThreading.cpp:
1498 (JSC::initializeThreadingOnce):
1499 * runtime/JSGlobalData.cpp:
1500 (JSC::JSGlobalData::JSGlobalData):
1501 (JSC::JSGlobalData::dumpSampleData):
1502 * runtime/JSGlobalData.h:
1503 (JSC::JSGlobalData::getCTIStub):
1504 * wtf/CMakeLists.txt:
1505 * wtf/MetaAllocator.cpp: Added.
1506 (WTF::MetaAllocatorHandle::MetaAllocatorHandle):
1507 (WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
1508 (WTF::MetaAllocatorHandle::shrink):
1509 (WTF::MetaAllocator::MetaAllocator):
1510 (WTF::MetaAllocator::allocate):
1511 (WTF::MetaAllocator::currentStatistics):
1512 (WTF::MetaAllocator::findAndRemoveFreeSpace):
1513 (WTF::MetaAllocator::addFreeSpaceFromReleasedHandle):
1514 (WTF::MetaAllocator::addFreshFreeSpace):
1515 (WTF::MetaAllocator::debugFreeSpaceSize):
1516 (WTF::MetaAllocator::addFreeSpace):
1517 (WTF::MetaAllocator::incrementPageOccupancy):
1518 (WTF::MetaAllocator::decrementPageOccupancy):
1519 (WTF::MetaAllocator::roundUp):
1520 (WTF::MetaAllocator::allocFreeSpaceNode):
1521 (WTF::MetaAllocator::freeFreeSpaceNode):
1522 (WTF::MetaAllocator::dumpProfile):
1523 * wtf/MetaAllocator.h: Added.
1524 (WTF::MetaAllocator::bytesAllocated):
1525 (WTF::MetaAllocator::bytesReserved):
1526 (WTF::MetaAllocator::bytesCommitted):
1527 (WTF::MetaAllocator::dumpProfile):
1528 (WTF::MetaAllocator::~MetaAllocator):
1529 * wtf/MetaAllocatorHandle.h: Added.
1530 * wtf/RedBlackTree.h: Added.
1531 (WTF::RedBlackTree::Node::Node):
1532 (WTF::RedBlackTree::Node::successor):
1533 (WTF::RedBlackTree::Node::predecessor):
1534 (WTF::RedBlackTree::Node::reset):
1535 (WTF::RedBlackTree::Node::parent):
1536 (WTF::RedBlackTree::Node::setParent):
1537 (WTF::RedBlackTree::Node::left):
1538 (WTF::RedBlackTree::Node::setLeft):
1539 (WTF::RedBlackTree::Node::right):
1540 (WTF::RedBlackTree::Node::setRight):
1541 (WTF::RedBlackTree::Node::color):
1542 (WTF::RedBlackTree::Node::setColor):
1543 (WTF::RedBlackTree::RedBlackTree):
1544 (WTF::RedBlackTree::insert):
1545 (WTF::RedBlackTree::remove):
1546 (WTF::RedBlackTree::findExact):
1547 (WTF::RedBlackTree::findLeastGreaterThanOrEqual):
1548 (WTF::RedBlackTree::findGreatestLessThanOrEqual):
1549 (WTF::RedBlackTree::first):
1550 (WTF::RedBlackTree::last):
1551 (WTF::RedBlackTree::size):
1552 (WTF::RedBlackTree::isEmpty):
1553 (WTF::RedBlackTree::treeMinimum):
1554 (WTF::RedBlackTree::treeMaximum):
1555 (WTF::RedBlackTree::treeInsert):
1556 (WTF::RedBlackTree::leftRotate):
1557 (WTF::RedBlackTree::rightRotate):
1558 (WTF::RedBlackTree::removeFixup):
1561 (JSC::Yarr::YarrGenerator::compile):
1563 (JSC::Yarr::YarrCodeBlock::execute):
1564 (JSC::Yarr::YarrCodeBlock::getAddr):
1566 2011-09-10 Sam Weinig <sam@webkit.org>
1568 Remove JSC::isZombie() function, it did nothing and was called by no-one.
1569 https://bugs.webkit.org/show_bug.cgi?id=67901
1571 Reviewed by Andy Estes.
1573 * JavaScriptCore.exp:
1574 * runtime/JSCell.cpp:
1575 * runtime/JSValue.h:
1577 2011-09-10 Sam Weinig <sam@webkit.org>
1579 Add isInterruptedExecutionException and isTerminatedExecutionException predicates
1580 https://bugs.webkit.org/show_bug.cgi?id=67892
1582 Reviewed by Andy "First Time Reviewer" Estes.
1584 * JavaScriptCore.exp:
1587 * interpreter/Interpreter.cpp:
1588 (JSC::Interpreter::throwException):
1591 * runtime/ExceptionHelpers.cpp:
1592 (JSC::createInterruptedExecutionException):
1593 (JSC::isInterruptedExecutionException):
1594 (JSC::createTerminatedExecutionException):
1595 (JSC::isTerminatedExecutionException):
1596 * runtime/ExceptionHelpers.h:
1597 (JSC::InterruptedExecutionError::InterruptedExecutionError):
1600 2011-09-10 Filip Pizlo <fpizlo@apple.com>
1602 DFG JIT completely undoes speculative compilation even in the case of
1603 a partial static speculation failure
1604 https://bugs.webkit.org/show_bug.cgi?id=67798
1606 Reviewed by Geoffrey Garen.
1608 This is a regression with static speculation, so it is turned off by
1609 default. But it is a necessary prerequisite for further work on
1610 dynamic speculation.
1612 * dfg/DFGJITCodeGenerator.cpp:
1613 (JSC::DFG::JITCodeGenerator::clearGenerationInfo):
1614 * dfg/DFGJITCodeGenerator.h:
1615 * dfg/DFGSpeculativeJIT.cpp:
1616 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1617 (JSC::DFG::SpeculativeJIT::compile):
1618 * dfg/DFGSpeculativeJIT.h:
1619 (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
1621 2011-09-09 Chris Marrin <cmarrin@apple.com>
1623 requestAnimationFrame doesn't throttle on Mac
1624 https://bugs.webkit.org/show_bug.cgi?id=67171
1626 Reviewed by Simon Fraser.
1628 Added WTF_USE_REQUEST_ANIMATION_FRAME_TIMER to allow any platform to run
1629 requestAnimationFrame callbacks on a Timer defined in ScriptedAnimationController.
1630 Currently only enabled for PLATFORM(MAC)
1634 2011-09-09 Geoffrey Garen <ggaren@apple.com>
1636 Reviewed by Dan Bernstein.
1638 Removed ENABLE(SINGLE_THREADED) support, since it is always false
1639 https://bugs.webkit.org/show_bug.cgi?id=67862
1641 Next step toward making the baseline platform assumption that threads exist.
1644 * JavaScriptCore.gypi:
1645 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Removed references to
1646 ThreadingNone.cpp, which was only compiled in single-threaded mode.
1649 * wtf/ThreadSpecific.h:
1651 * wtf/qt/ThreadingQt.cpp: Removed now-dead code.
1653 * wtf/ThreadingNone.cpp: Removed.
1655 2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com>
1657 Unzip initialization lists and constructors in JSCell hierarchy (5/7)
1658 https://bugs.webkit.org/show_bug.cgi?id=67420
1660 Reviewed by Geoffrey Garen.
1662 Completed the fifth level of the refactoring to add finishCreation()
1663 methods to all classes within the JSCell hierarchy with non-trivial
1666 This primarily consists of pushing the calls to finishCreation() down
1667 into the constructors of the subclasses of the second level of the hierarchy
1668 as well as pulling the finishCreation() calls out into the class's corresponding
1669 create() method if it has one. Doing both simultaneously allows us to
1670 maintain the invariant that the finishCreation() method chain is called exactly
1671 once during the creation of an object, since calling it any other number of
1672 times (0, 2, or more) will cause an assertion failure.
1674 * API/JSCallbackConstructor.cpp:
1675 (JSC::JSCallbackConstructor::JSCallbackConstructor):
1676 * API/JSCallbackConstructor.h:
1677 (JSC::JSCallbackConstructor::create):
1678 * API/JSCallbackFunction.cpp:
1679 (JSC::JSCallbackFunction::JSCallbackFunction):
1680 (JSC::JSCallbackFunction::finishCreation):
1681 * API/JSCallbackFunction.h:
1682 * API/JSCallbackObject.h:
1683 * API/JSCallbackObjectFunctions.h:
1684 (JSC::::JSCallbackObject):
1685 (JSC::::finishCreation):
1686 * JavaScriptCore.exp:
1687 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1688 * debugger/DebuggerActivation.cpp:
1689 * debugger/DebuggerActivation.h:
1690 (JSC::DebuggerActivation::create):
1692 (GlobalObject::finishCreation):
1693 (GlobalObject::GlobalObject):
1694 * runtime/ArrayConstructor.cpp:
1695 (JSC::ArrayConstructor::ArrayConstructor):
1696 (JSC::ArrayConstructor::finishCreation):
1697 * runtime/ArrayConstructor.h:
1698 * runtime/ArrayPrototype.cpp:
1699 (JSC::ArrayPrototype::ArrayPrototype):
1700 * runtime/ArrayPrototype.h:
1701 (JSC::ArrayPrototype::create):
1702 * runtime/BooleanConstructor.cpp:
1703 (JSC::BooleanConstructor::BooleanConstructor):
1704 (JSC::BooleanConstructor::finishCreation):
1705 * runtime/BooleanConstructor.h:
1706 * runtime/BooleanObject.cpp:
1707 (JSC::BooleanObject::BooleanObject):
1708 * runtime/BooleanObject.h:
1709 (JSC::BooleanObject::create):
1710 * runtime/BooleanPrototype.cpp:
1711 (JSC::BooleanPrototype::BooleanPrototype):
1712 (JSC::BooleanPrototype::finishCreation):
1713 * runtime/BooleanPrototype.h:
1714 * runtime/DateConstructor.cpp:
1715 (JSC::DateConstructor::DateConstructor):
1716 (JSC::DateConstructor::finishCreation):
1717 * runtime/DateConstructor.h:
1718 * runtime/DateInstance.cpp:
1719 (JSC::DateInstance::DateInstance):
1720 * runtime/DateInstance.h:
1721 (JSC::DateInstance::create):
1722 * runtime/DatePrototype.cpp:
1723 (JSC::DatePrototype::DatePrototype):
1724 (JSC::DatePrototype::finishCreation):
1725 * runtime/DatePrototype.h:
1726 * runtime/Error.cpp:
1727 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
1728 * runtime/ErrorConstructor.cpp:
1729 (JSC::ErrorConstructor::ErrorConstructor):
1730 (JSC::ErrorConstructor::finishCreation):
1731 * runtime/ErrorConstructor.h:
1732 * runtime/ErrorPrototype.cpp:
1733 (JSC::ErrorPrototype::ErrorPrototype):
1734 * runtime/ErrorPrototype.h:
1735 (JSC::ErrorPrototype::create):
1736 * runtime/FunctionConstructor.cpp:
1737 (JSC::FunctionConstructor::FunctionConstructor):
1738 (JSC::FunctionConstructor::finishCreation):
1739 * runtime/FunctionConstructor.h:
1740 * runtime/FunctionPrototype.cpp:
1741 (JSC::FunctionPrototype::FunctionPrototype):
1742 (JSC::FunctionPrototype::finishCreation):
1743 * runtime/FunctionPrototype.h:
1744 * runtime/InternalFunction.cpp:
1745 (JSC::InternalFunction::InternalFunction):
1746 * runtime/InternalFunction.h:
1747 * runtime/JSActivation.cpp:
1748 (JSC::JSActivation::JSActivation):
1749 * runtime/JSActivation.h:
1750 (JSC::JSActivation::create):
1751 * runtime/JSGlobalObject.h:
1752 (JSC::JSGlobalObject::create):
1753 (JSC::JSGlobalObject::JSGlobalObject):
1754 * runtime/JSONObject.cpp:
1755 (JSC::JSONObject::JSONObject):
1756 * runtime/JSONObject.h:
1757 (JSC::JSONObject::create):
1758 * runtime/JSStaticScopeObject.h:
1759 (JSC::JSStaticScopeObject::create):
1760 (JSC::JSStaticScopeObject::JSStaticScopeObject):
1761 * runtime/JSString.cpp:
1762 (JSC::StringObject::create):
1763 * runtime/MathObject.cpp:
1764 (JSC::MathObject::MathObject):
1765 * runtime/MathObject.h:
1766 (JSC::MathObject::create):
1767 * runtime/NativeErrorConstructor.cpp:
1768 (JSC::NativeErrorConstructor::NativeErrorConstructor):
1769 * runtime/NativeErrorConstructor.h:
1770 (JSC::NativeErrorConstructor::finishCreation):
1771 * runtime/NativeErrorPrototype.cpp:
1772 (JSC::NativeErrorPrototype::NativeErrorPrototype):
1773 (JSC::NativeErrorPrototype::finishCreation):
1774 * runtime/NativeErrorPrototype.h:
1775 * runtime/NumberConstructor.cpp:
1776 (JSC::NumberConstructor::NumberConstructor):
1777 (JSC::NumberConstructor::finishCreation):
1778 * runtime/NumberConstructor.h:
1779 * runtime/NumberObject.cpp:
1780 (JSC::NumberObject::NumberObject):
1781 * runtime/NumberObject.h:
1782 (JSC::NumberObject::create):
1783 * runtime/NumberPrototype.cpp:
1784 (JSC::NumberPrototype::NumberPrototype):
1785 (JSC::NumberPrototype::finishCreation):
1786 * runtime/NumberPrototype.h:
1787 * runtime/ObjectConstructor.cpp:
1788 (JSC::ObjectConstructor::ObjectConstructor):
1789 (JSC::ObjectConstructor::finishCreation):
1790 * runtime/ObjectConstructor.h:
1791 * runtime/RegExpConstructor.cpp:
1792 (JSC::RegExpConstructor::RegExpConstructor):
1793 (JSC::RegExpConstructor::finishCreation):
1794 (JSC::RegExpMatchesArray::RegExpMatchesArray):
1795 * runtime/RegExpConstructor.h:
1796 * runtime/RegExpMatchesArray.h:
1797 (JSC::RegExpMatchesArray::create):
1798 * runtime/RegExpObject.cpp:
1799 (JSC::RegExpObject::RegExpObject):
1800 * runtime/RegExpObject.h:
1801 (JSC::RegExpObject::create):
1802 * runtime/RegExpPrototype.cpp:
1803 (JSC::RegExpPrototype::RegExpPrototype):
1804 * runtime/StringConstructor.cpp:
1805 (JSC::StringConstructor::StringConstructor):
1806 (JSC::StringConstructor::finishCreation):
1807 * runtime/StringConstructor.h:
1808 * runtime/StringObject.cpp:
1809 (JSC::StringObject::StringObject):
1810 * runtime/StringObject.h:
1811 (JSC::StringObject::create):
1812 * runtime/StringObjectThatMasqueradesAsUndefined.h:
1813 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
1814 * runtime/StringPrototype.cpp:
1815 (JSC::StringPrototype::StringPrototype):
1816 (JSC::StringPrototype::finishCreation):
1817 * runtime/StringPrototype.h:
1819 2011-09-09 Geoffrey Garen <ggaren@apple.com>
1821 Build fix: Guard against double-#define for something already #defined
1822 by the build system.
1826 2011-09-09 Geoffrey Garen <ggaren@apple.com>
1828 Reviewed by Dan Bernstein.
1830 Never #define ENABLE_SINGLE_THREADED, !ENABLE_JSC_MULTIPLE_THREADS, or
1831 !ENABLE_WTF_MULTIPLE_THREADS
1832 https://bugs.webkit.org/show_bug.cgi?id=67860
1834 First step toward making the baseline platform assumption that threads
1835 exist: Never #define ENABLE_SINGLE_THREADED, !ENABLE_JSC_MULTIPLE_THREADS,
1836 or !ENABLE_WTF_MULTIPLE_THREADS.
1840 2011-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1842 [Qt] Remove common.pri
1843 https://bugs.webkit.org/show_bug.cgi?id=67814
1845 Reviewed by Andreas Kling.
1847 * JavaScriptCore.pri:
1849 2011-09-08 Mark Hahnenberg <mhahnenberg@apple.com>
1851 REGRESSION(r94811): Assertion failure in 2 worker tests
1852 https://bugs.webkit.org/show_bug.cgi?id=67829
1854 Reviewed by Sam Weinig.
1856 Fixing a couple tests that were broken due to the wrong values being
1857 set in the parent class pointers in the ClassInfo structs for
1858 TerminatedExecutionError and InterruptedExecutionError.
1860 * runtime/ExceptionHelpers.cpp:
1862 2011-09-08 Oliver Hunt <oliver@apple.com>
1864 Use bump allocator for initial property storage
1865 https://bugs.webkit.org/show_bug.cgi?id=67494
1867 Reviewed by Geoffrey Garen.
1869 Use a bump allocator for initial allocation of property storage,
1870 and promote to fastMalloc memory only if it survives a GC pass.
1872 Comes out as a 1% win on v8, and is a useful step on the way to
1873 GC allocation of all property storage.
1875 * JavaScriptCore.exp:
1876 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1877 * JavaScriptCore.xcodeproj/project.pbxproj:
1879 (JSC::Heap::collect):
1881 (JSC::Heap::allocatePropertyStorage):
1882 (JSC::Heap::inPropertyStorageNursery):
1883 * heap/MarkedBlock.h:
1884 * heap/NewSpace.cpp:
1885 (JSC::NewSpace::NewSpace):
1887 (JSC::NewSpace::resetPropertyStorageNursery):
1888 (JSC::NewSpace::allocatePropertyStorage):
1889 (JSC::NewSpace::inPropertyStorageNursery):
1891 (JSC::DEFINE_STUB_FUNCTION):
1892 * runtime/JSObject.cpp:
1893 (JSC::JSObject::allocatePropertyStorage):
1894 * runtime/JSObject.h:
1895 (JSC::JSObject::isUsingInlineStorage):
1896 (JSC::JSObject::JSObject):
1897 (JSC::JSObject::propertyStorage):
1898 (JSC::JSObject::~JSObject):
1899 (JSC::JSObject::putDirectInternal):
1900 (JSC::JSObject::putDirectWithoutTransition):
1901 (JSC::JSObject::putDirectFunctionWithoutTransition):
1902 (JSC::JSObject::transitionTo):
1903 (JSC::JSObject::visitChildrenDirect):
1904 * runtime/StorageBarrier.h: Added.
1905 (JSC::StorageBarrier::StorageBarrier):
1906 (JSC::StorageBarrier::set):
1907 (JSC::StorageBarrier::operator->):
1908 (JSC::StorageBarrier::operator*):
1909 (JSC::StorageBarrier::operator[]):
1910 (JSC::StorageBarrier::get):
1912 2011-09-08 Sam Weinig <sam@webkit.org>
1914 Remove the Completion object from JSC, I have never liked it
1915 https://bugs.webkit.org/show_bug.cgi?id=67755
1917 Reviewed by Gavin Barraclough.
1919 - Removes the Completion object and replaces its use with out parameter exceptions.
1920 - Remove ComplType and virtual exceptionType() function on JSObject. Replace with
1921 ClassInfo for InterruptedExecutionError and TerminatedExecutionError.
1925 (JSCheckScriptSyntax):
1926 * JavaScriptCore.exp:
1927 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1928 * interpreter/Interpreter.cpp:
1929 (JSC::Interpreter::throwException):
1932 (functionCheckSyntax):
1935 * runtime/Completion.cpp:
1938 * runtime/Completion.h:
1939 * runtime/ExceptionHelpers.cpp:
1940 (JSC::InterruptedExecutionError::toString):
1941 (JSC::TerminatedExecutionError::toString):
1942 (JSC::createInterruptedExecutionException):
1943 * runtime/ExceptionHelpers.h:
1944 (JSC::InterruptedExecutionError::InterruptedExecutionError):
1945 (JSC::InterruptedExecutionError::create):
1946 (JSC::InterruptedExecutionError::createStructure):
1947 (JSC::TerminatedExecutionError::TerminatedExecutionError):
1948 (JSC::TerminatedExecutionError::create):
1949 (JSC::TerminatedExecutionError::createStructure):
1950 * runtime/JSGlobalData.cpp:
1951 (JSC::JSGlobalData::JSGlobalData):
1952 * runtime/JSObject.h:
1954 2011-09-08 Ryosuke Niwa <rniwa@webkit.org>
1958 * dfg/DFGCapabilities.cpp:
1960 2011-09-08 Filip Pizlo <fpizlo@apple.com>
1962 Value profling and execution count profiling is performed even for
1963 code that cannot be optimized
1964 https://bugs.webkit.org/show_bug.cgi?id=67694
1966 Reviewed by Gavin Barraclough.
1968 This is a 2% speed-up on V8 when tiered compilation is enabled.
1970 * JavaScriptCore.xcodeproj/project.pbxproj:
1971 * bytecode/CodeBlock.cpp:
1972 (JSC::ProgramCodeBlock::canCompileWithDFG):
1973 (JSC::EvalCodeBlock::canCompileWithDFG):
1974 (JSC::FunctionCodeBlock::canCompileWithDFG):
1975 * bytecode/CodeBlock.h:
1976 * dfg/DFGCapabilities.cpp: Added.
1977 (JSC::DFG::canCompileOpcodes):
1978 * dfg/DFGCapabilities.h: Added.
1979 (JSC::DFG::mightCompileEval):
1980 (JSC::DFG::mightCompileProgram):
1981 (JSC::DFG::mightCompileFunctionForCall):
1982 (JSC::DFG::mightCompileFunctionForConstruct):
1983 (JSC::DFG::canCompileOpcode):
1984 (JSC::DFG::canCompileEval):
1985 (JSC::DFG::canCompileProgram):
1986 (JSC::DFG::canCompileFunctionForCall):
1987 (JSC::DFG::canCompileFunctionForConstruct):
1989 (JSC::JIT::emitOptimizationCheck):
1990 (JSC::JIT::privateCompile):
1992 (JSC::JIT::shouldEmitProfiling):
1993 * jit/JITInlineMethods.h:
1994 (JSC::JIT::emitValueProfilingSite):
1996 2011-09-08 Filip Pizlo <fpizlo@apple.com>
1998 DFG speculative JIT does not initialize integer tags for PredictInt32 temporaries
1999 https://bugs.webkit.org/show_bug.cgi?id=67840
2001 Reviewed by Gavin Barraclough.
2003 * dfg/DFGSpeculativeJIT.cpp:
2004 (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
2006 2011-09-08 Thouraya ANDOLSI <thouraya.andolsi@st.com>
2008 https://bugs.webkit.org/show_bug.cgi?id=67771
2010 Fix sequenceGetByIdSlowCaseInstructionSpace, sequenceGetByIdSlowCaseConstantSpace
2011 and patchOffsetGetByIdSlowCaseCall
2012 and enables DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS flag for SH4 platforms.
2014 Reviewed by Gavin Barraclough.
2019 2011-09-08 Mark Hahnenberg <mhahnenberg@apple.com>
2021 Remove getUInt32 from JSCell
2022 https://bugs.webkit.org/show_bug.cgi?id=67691
2024 Reviewed by Oliver Hunt.
2026 We don't use JSCell::getUInt32 anymore, so it has been removed.
2028 * JavaScriptCore.exp:
2029 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2030 * runtime/JSCell.cpp:
2033 2011-09-07 Filip Pizlo <fpizlo@apple.com>
2037 * bytecode/CodeBlock.cpp:
2038 (JSC::CodeBlock::~CodeBlock):
2040 2011-09-07 Oliver Hunt <oliver@apple.com>
2042 Release mode build fix.
2044 * API/JSCallbackObject.h:
2045 (JSC::JSCallbackObject::create):
2047 2011-09-06 Oliver Hunt <oliver@apple.com>
2049 Remove JSObjectWithGlobalObject
2050 https://bugs.webkit.org/show_bug.cgi?id=67689
2052 Reviewed by Geoff Garen.
2054 Remove JSObjectWithGlobalObject, and update code to stop using anonymous
2055 storage to access the global object that a JSObject comes from. Largely
2056 mechanical change to remove the use of anonymous storage and JSObjectWithGlobalObject.
2058 * API/JSCallbackConstructor.cpp:
2059 (JSC::JSCallbackConstructor::JSCallbackConstructor):
2060 (JSC::JSCallbackConstructor::finishCreation):
2061 * API/JSCallbackConstructor.h:
2062 * API/JSCallbackObject.cpp:
2063 * API/JSCallbackObject.h:
2064 (JSC::JSCallbackObject::create):
2065 * API/JSCallbackObjectFunctions.h:
2066 (JSC::::JSCallbackObject):
2067 (JSC::::finishCreation):
2068 (JSC::::staticFunctionGetter):
2069 * API/JSClassRef.cpp:
2070 (OpaqueJSClass::prototype):
2071 * API/JSObjectRef.cpp:
2073 (JSObjectGetPrivate):
2074 (JSObjectSetPrivate):
2075 (JSObjectGetPrivateProperty):
2076 (JSObjectSetPrivateProperty):
2077 (JSObjectDeletePrivateProperty):
2078 * API/JSValueRef.cpp:
2079 (JSValueIsObjectOfClass):
2080 * API/JSWeakObjectMapRefPrivate.cpp:
2081 * JavaScriptCore.exp:
2082 * JavaScriptCore.xcodeproj/project.pbxproj:
2083 * bytecode/CodeBlock.h:
2084 * dfg/DFGRepatch.cpp:
2085 (JSC::DFG::dfgRepatchGetMethodFast):
2086 (JSC::DFG::tryCacheGetMethod):
2088 * jit/JITInlineMethods.h:
2089 (JSC::JIT::emitAllocateJSFunction):
2090 * jit/JITPropertyAccess.cpp:
2091 (JSC::JIT::patchMethodCallProto):
2093 (JSC::DEFINE_STUB_FUNCTION):
2094 * runtime/DatePrototype.cpp:
2095 * runtime/InternalFunction.cpp:
2096 (JSC::InternalFunction::InternalFunction):
2097 (JSC::InternalFunction::finishCreation):
2098 * runtime/InternalFunction.h:
2099 * runtime/JSFunction.cpp:
2100 (JSC::JSFunction::JSFunction):
2101 (JSC::JSFunction::finishCreation):
2102 * runtime/JSFunction.h:
2103 (JSC::JSFunction::create):
2104 (JSC::JSFunction::createStructure):
2105 * runtime/JSGlobalObject.cpp:
2106 (JSC::JSGlobalObject::reset):
2107 * runtime/JSONObject.cpp:
2108 (JSC::JSONObject::JSONObject):
2109 (JSC::JSONObject::finishCreation):
2110 * runtime/JSONObject.h:
2111 * runtime/JSObject.h:
2112 (JSC::JSObject::globalObject):
2113 * runtime/JSObjectWithGlobalObject.cpp: Removed.
2114 * runtime/JSObjectWithGlobalObject.h: Removed.
2115 * runtime/JSValue.cpp:
2116 (JSC::JSValue::isValidCallee):
2117 * runtime/Lookup.cpp:
2118 (JSC::setUpStaticFunctionSlot):
2120 * runtime/MathObject.cpp:
2121 (JSC::MathObject::MathObject):
2122 (JSC::MathObject::finishCreation):
2123 * runtime/MathObject.h:
2124 * runtime/NumberPrototype.cpp:
2125 * runtime/RegExpObject.cpp:
2126 (JSC::RegExpObject::RegExpObject):
2127 (JSC::RegExpObject::finishCreation):
2128 * runtime/RegExpObject.h:
2129 * runtime/Structure.cpp:
2130 (JSC::Structure::Structure):
2131 * runtime/Structure.h:
2132 (JSC::Structure::create):
2133 (JSC::Structure::globalObject):
2135 2011-09-07 Gavin Barraclough <barraclough@apple.com>
2137 Refactor JIT checks for ObjectType into helper functions.
2139 Rubber stamped by Sam Weinig.
2141 * dfg/DFGJITCompiler.h:
2142 (JSC::DFG::JITCompiler::branchIfNotObject):
2143 * dfg/DFGNonSpeculativeJIT.cpp:
2144 (JSC::DFG::NonSpeculativeJIT::compile):
2145 * dfg/DFGSpeculativeJIT.cpp:
2146 (JSC::DFG::SpeculativeJIT::compile):
2148 * jit/JITCall32_64.cpp:
2149 (JSC::JIT::emit_op_ret_object_or_this):
2150 * jit/JITInlineMethods.h:
2151 (JSC::JIT::emitJumpIfNotObject):
2152 * jit/JITOpcodes.cpp:
2153 (JSC::JIT::emit_op_instanceof):
2154 (JSC::JIT::emit_op_ret_object_or_this):
2155 (JSC::JIT::emit_op_get_pnames):
2156 (JSC::JIT::emit_op_create_this):
2157 * jit/JITOpcodes32_64.cpp:
2158 (JSC::JIT::emit_op_instanceof):
2159 (JSC::JIT::emit_op_get_pnames):
2160 (JSC::JIT::emit_op_create_this):
2162 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com>
2164 Unreviewed, rolling out r94627 and r94632.
2165 http://trac.webkit.org/changeset/94627
2166 http://trac.webkit.org/changeset/94632
2167 https://bugs.webkit.org/show_bug.cgi?id=67698
2169 It broke tests on GTK and Qt (Requested by Ossy on #webkit).
2171 * API/JSCallbackConstructor.cpp:
2172 (JSC::JSCallbackConstructor::JSCallbackConstructor):
2173 * API/JSCallbackConstructor.h:
2174 (JSC::JSCallbackConstructor::create):
2175 * API/JSCallbackFunction.cpp:
2176 (JSC::JSCallbackFunction::JSCallbackFunction):
2177 * API/JSCallbackFunction.h:
2178 * JavaScriptCore.exp:
2179 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2180 * debugger/DebuggerActivation.cpp:
2181 (JSC::DebuggerActivation::create):
2182 * debugger/DebuggerActivation.h:
2184 (GlobalObject::constructorBody):
2185 (GlobalObject::GlobalObject):
2186 * runtime/ArrayConstructor.cpp:
2187 (JSC::ArrayConstructor::ArrayConstructor):
2188 * runtime/ArrayConstructor.h:
2189 * runtime/ArrayPrototype.cpp:
2190 (JSC::ArrayPrototype::ArrayPrototype):
2191 * runtime/ArrayPrototype.h:
2192 (JSC::ArrayPrototype::create):
2193 * runtime/BooleanConstructor.cpp:
2194 (JSC::BooleanConstructor::BooleanConstructor):
2195 * runtime/BooleanConstructor.h:
2196 * runtime/BooleanObject.cpp:
2197 (JSC::BooleanObject::BooleanObject):
2198 * runtime/BooleanObject.h:
2199 (JSC::BooleanObject::create):
2200 * runtime/BooleanPrototype.cpp:
2201 (JSC::BooleanPrototype::BooleanPrototype):
2202 * runtime/BooleanPrototype.h:
2203 * runtime/DateConstructor.cpp:
2204 (JSC::DateConstructor::DateConstructor):
2205 * runtime/DateConstructor.h:
2206 * runtime/DateInstance.cpp:
2207 (JSC::DateInstance::DateInstance):
2208 * runtime/DateInstance.h:
2209 (JSC::DateInstance::create):
2210 * runtime/DatePrototype.cpp:
2211 (JSC::DatePrototype::DatePrototype):
2212 * runtime/DatePrototype.h:
2213 * runtime/Error.cpp:
2214 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
2215 * runtime/ErrorConstructor.cpp:
2216 (JSC::ErrorConstructor::ErrorConstructor):
2217 * runtime/ErrorConstructor.h:
2218 (JSC::ErrorConstructor::create):
2219 * runtime/ErrorPrototype.cpp:
2220 (JSC::ErrorPrototype::ErrorPrototype):
2221 * runtime/ErrorPrototype.h:
2222 (JSC::ErrorPrototype::create):
2223 * runtime/FunctionConstructor.cpp:
2224 (JSC::FunctionConstructor::FunctionConstructor):
2225 * runtime/FunctionConstructor.h:
2226 * runtime/FunctionPrototype.cpp:
2227 (JSC::FunctionPrototype::FunctionPrototype):
2228 * runtime/FunctionPrototype.h:
2229 * runtime/InternalFunction.cpp:
2230 (JSC::InternalFunction::InternalFunction):
2231 * runtime/InternalFunction.h:
2232 * runtime/JSActivation.cpp:
2233 (JSC::JSActivation::JSActivation):
2234 * runtime/JSActivation.h:
2235 (JSC::JSActivation::create):
2236 * runtime/JSGlobalObject.h:
2237 (JSC::JSGlobalObject::create):
2238 (JSC::JSGlobalObject::JSGlobalObject):
2239 * runtime/JSONObject.cpp:
2240 (JSC::JSONObject::JSONObject):
2241 * runtime/JSONObject.h:
2242 (JSC::JSONObject::create):
2243 * runtime/JSStaticScopeObject.h:
2244 (JSC::JSStaticScopeObject::create):
2245 (JSC::JSStaticScopeObject::JSStaticScopeObject):
2246 * runtime/JSString.cpp:
2247 (JSC::StringObject::create):
2248 * runtime/MathObject.cpp:
2249 (JSC::MathObject::MathObject):
2250 * runtime/MathObject.h:
2251 (JSC::MathObject::create):
2252 * runtime/NativeErrorConstructor.cpp:
2253 (JSC::NativeErrorConstructor::NativeErrorConstructor):
2254 * runtime/NativeErrorConstructor.h:
2255 (JSC::NativeErrorConstructor::constructorBody):
2256 * runtime/NativeErrorPrototype.cpp:
2257 (JSC::NativeErrorPrototype::NativeErrorPrototype):
2258 (JSC::NativeErrorPrototype::constructorBody):
2259 * runtime/NativeErrorPrototype.h:
2260 * runtime/NumberConstructor.cpp:
2261 (JSC::NumberConstructor::NumberConstructor):
2262 * runtime/NumberConstructor.h:
2263 * runtime/NumberObject.cpp:
2264 (JSC::NumberObject::NumberObject):
2265 * runtime/NumberObject.h:
2266 (JSC::NumberObject::create):
2267 * runtime/NumberPrototype.cpp:
2268 (JSC::NumberPrototype::NumberPrototype):
2269 * runtime/NumberPrototype.h:
2270 * runtime/ObjectConstructor.cpp:
2271 (JSC::ObjectConstructor::ObjectConstructor):
2272 * runtime/ObjectConstructor.h:
2273 * runtime/RegExpConstructor.cpp:
2274 (JSC::RegExpConstructor::RegExpConstructor):
2275 (JSC::RegExpMatchesArray::RegExpMatchesArray):
2276 * runtime/RegExpConstructor.h:
2277 * runtime/RegExpMatchesArray.h:
2278 (JSC::RegExpMatchesArray::create):
2279 * runtime/RegExpObject.cpp:
2280 (JSC::RegExpObject::RegExpObject):
2281 * runtime/RegExpObject.h:
2282 (JSC::RegExpObject::create):
2283 * runtime/RegExpPrototype.cpp:
2284 (JSC::RegExpPrototype::RegExpPrototype):
2285 * runtime/StringConstructor.cpp:
2286 (JSC::StringConstructor::StringConstructor):
2287 * runtime/StringConstructor.h:
2288 * runtime/StringObject.cpp:
2289 (JSC::StringObject::StringObject):
2290 * runtime/StringObject.h:
2291 (JSC::StringObject::create):
2292 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2293 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
2294 * runtime/StringPrototype.cpp:
2295 (JSC::StringPrototype::StringPrototype):
2296 * runtime/StringPrototype.h:
2298 2011-09-06 Xianzhu Wang <wangxianzhu@chromium.org>
2300 Replace usages of Vector<UChar> with existing StringBuilder
2301 https://bugs.webkit.org/show_bug.cgi?id=67079
2303 Reviewed by Gavin Barraclough.
2305 This is part of work to support 8-bit string buffers.
2306 Adds StringBuilder::characters() because the original Vector<UChar>::data()
2308 Sets the minimum size of buffer to 16 to prevent possible performance
2309 regression. Further performance investigation should be done in
2310 https://bugs.webkit.org/show_bug.cgi?id=67084.
2313 * wtf/text/StringBuilder.cpp:
2314 (WTF::StringBuilder::appendUninitialized): Sets minimum buffer size to 16 bytes.
2315 * wtf/text/StringBuilder.h:
2316 (WTF::StringBuilder::operator[]):
2317 (WTF::StringBuilder::characters): Added.
2319 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com>
2321 Fix broken snow leopard build
2322 https://bugs.webkit.org/show_bug.cgi?id=67693
2324 Reviewed by Daniel Bates.
2326 Removed unnecessary symbol export.
2328 * JavaScriptCore.exp:
2330 2011-09-06 Filip Pizlo <fpizlo@apple.com>
2332 DFG JIT does not optimize booleans
2333 https://bugs.webkit.org/show_bug.cgi?id=67670
2335 Reviewed by Gavin Barraclough.
2337 This adds boolean value profiling, boolean prediction in the DFG,
2338 boolean forward flow propagation in the DFGPropagator, boolean
2339 data format in DFG generation info, and comprehensive optimizations
2340 based on both boolean prediction and boolean generation info.
2341 This is brings the speed-up on v8-richards to 12%, and gives slight
2342 speed-ups elsewhere as well.
2344 Making this work right required navigating some subtleties in
2345 value profiling. Some functions get compiled with insufficient
2346 information because some important path of the function never
2347 executed. In these cases, we wish to fall back on static
2348 speculation. But to do so, we need to ensure that predictions that
2349 are inherent in the code (like that GetById almost certainly takes
2350 a cell operand) are reflected in predictions that we make in
2351 DFGPropagator. Thus, DFGPropagator now does both backward and
2352 forward flow, using a both forward and backward fixpoint.
2354 The backward flow in DFGPropagator is a separate static analysis,
2355 and needs to keep a set of backward flow abstract values for
2356 variables, arguments, and globals. To make this easy, this patch
2357 factors out DFGGraph's prediction tracking capability into
2358 DFGPredictionTracker, which now gets used by both DFGGraph (for
2359 forward flow predictions) and DFGPropagator (for backward flow
2360 predictions). Backward flow predictions eventually get merged
2361 into forward flow ones, but the two are not equivalent: a forward
2362 flow prediction is a superset of the backward flow prediction.
2364 Debugging these prediction issues required a better understanding
2365 of where we fail speculation, and what our value predictions look
2366 like. This patch also adds optional verbose speculation failure
2367 (so an informative printf fires whenever speculation failure occurs)
2368 and slight improvements to the verbosity in other places.
2370 * bytecode/ValueProfile.h:
2371 (JSC::ValueProfile::numberOfBooleans):
2372 (JSC::ValueProfile::probabilityOfBoolean):
2373 (JSC::ValueProfile::dump):
2374 (JSC::ValueProfile::computeStatistics):
2375 * dfg/DFGByteCodeParser.cpp:
2376 (JSC::DFG::ByteCodeParser::stronglyPredict):
2377 (JSC::DFG::ByteCodeParser::parseBlock):
2378 * dfg/DFGGenerationInfo.h:
2379 (JSC::DFG::dataFormatToString):
2380 (JSC::DFG::needDataFormatConversion):
2382 (JSC::DFG::Graph::dump):
2383 (JSC::DFG::Graph::predictArgumentTypes):
2385 (JSC::DFG::Graph::Graph):
2386 (JSC::DFG::Graph::predictions):
2387 (JSC::DFG::Graph::predict):
2388 (JSC::DFG::Graph::predictGlobalVar):
2389 (JSC::DFG::Graph::getPrediction):
2390 (JSC::DFG::Graph::getGlobalVarPrediction):
2391 (JSC::DFG::Graph::isBooleanConstant):
2392 (JSC::DFG::Graph::valueOfBooleanConstant):
2393 * dfg/DFGJITCodeGenerator.cpp:
2394 (JSC::DFG::JITCodeGenerator::fillInteger):
2395 (JSC::DFG::JITCodeGenerator::fillDouble):
2396 (JSC::DFG::JITCodeGenerator::fillJSValue):
2397 (JSC::DFG::JITCodeGenerator::isKnownNotInteger):
2398 (JSC::DFG::JITCodeGenerator::isKnownBoolean):
2399 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompareNull):
2400 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
2401 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
2402 (JSC::DFG::JITCodeGenerator::emitBranch):
2403 (JSC::DFG::JITCodeGenerator::speculationCheck):
2404 (JSC::DFG::GPRTemporary::GPRTemporary):
2405 * dfg/DFGJITCodeGenerator.h:
2406 (JSC::DFG::JITCodeGenerator::isBooleanConstant):
2407 (JSC::DFG::JITCodeGenerator::valueOfBooleanConstant):
2408 * dfg/DFGJITCompiler.cpp:
2409 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
2410 (JSC::DFG::JITCompiler::link):
2411 * dfg/DFGJITCompiler.h:
2412 (JSC::DFG::JITCompiler::debugCall):
2413 (JSC::DFG::JITCompiler::isBooleanConstant):
2414 (JSC::DFG::JITCompiler::valueOfBooleanConstant):
2416 (JSC::DFG::isBooleanPrediction):
2417 (JSC::DFG::predictionToString):
2418 (JSC::DFG::mergePredictions):
2419 (JSC::DFG::makePrediction):
2420 (JSC::DFG::Node::isBooleanConstant):
2421 (JSC::DFG::Node::valueOfBooleanConstant):
2422 (JSC::DFG::Node::hasBooleanResult):
2423 (JSC::DFG::Node::hasNumericResult):
2424 (JSC::DFG::Node::predict):
2425 * dfg/DFGOperations.cpp:
2426 * dfg/DFGOperations.h:
2427 * dfg/DFGPredictionTracker.h: Added.
2428 (JSC::DFG::operandIsArgument):
2429 (JSC::DFG::PredictionSlot::PredictionSlot):
2430 (JSC::DFG::PredictionTracker::PredictionTracker):
2431 (JSC::DFG::PredictionTracker::initializeSimilarTo):
2432 (JSC::DFG::PredictionTracker::numberOfArguments):
2433 (JSC::DFG::PredictionTracker::numberOfVariables):
2434 (JSC::DFG::PredictionTracker::argumentIndexForOperand):
2435 (JSC::DFG::PredictionTracker::predictArgument):
2436 (JSC::DFG::PredictionTracker::predict):
2437 (JSC::DFG::PredictionTracker::predictGlobalVar):
2438 (JSC::DFG::PredictionTracker::getArgumentPrediction):
2439 (JSC::DFG::PredictionTracker::getPrediction):
2440 (JSC::DFG::PredictionTracker::getGlobalVarPrediction):
2441 * dfg/DFGPropagator.cpp:
2442 (JSC::DFG::Propagator::Propagator):
2443 (JSC::DFG::Propagator::fixpoint):
2444 (JSC::DFG::Propagator::setPrediction):
2445 (JSC::DFG::Propagator::mergeUse):
2446 (JSC::DFG::Propagator::mergePrediction):
2447 (JSC::DFG::Propagator::propagateNode):
2448 * dfg/DFGSpeculativeJIT.cpp:
2449 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
2450 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
2451 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
2452 (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
2453 (JSC::DFG::SpeculativeJIT::compare):
2454 (JSC::DFG::SpeculativeJIT::compile):
2455 * dfg/DFGSpeculativeJIT.h:
2456 (JSC::DFG::SpeculateBooleanOperand::SpeculateBooleanOperand):
2457 (JSC::DFG::SpeculateBooleanOperand::~SpeculateBooleanOperand):
2458 (JSC::DFG::SpeculateBooleanOperand::index):
2459 (JSC::DFG::SpeculateBooleanOperand::gpr):
2460 (JSC::DFG::SpeculateBooleanOperand::use):
2461 * runtime/JSGlobalData.h:
2462 * runtime/JSValue.cpp:
2463 (JSC::JSValue::description):
2465 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com>
2467 Unzip initialization lists and constructors in JSCell hierarchy (5/7)
2468 https://bugs.webkit.org/show_bug.cgi?id=67420
2470 Reviewed by Geoffrey Garen.
2472 Completed the fifth level of the refactoring to add finishCreation()
2473 methods to all classes within the JSCell hierarchy with non-trivial
2476 This primarily consists of pushing the calls to finishCreation() down
2477 into the constructors of the subclasses of the second level of the hierarchy
2478 as well as pulling the finishCreation() calls out into the class's corresponding
2479 create() method if it has one. Doing both simultaneously allows us to
2480 maintain the invariant that the finishCreation() method chain is called exactly
2481 once during the creation of an object, since calling it any other number of
2482 times (0, 2, or more) will cause an assertion failure.
2484 * API/JSCallbackConstructor.cpp:
2485 (JSC::JSCallbackConstructor::JSCallbackConstructor):
2486 * API/JSCallbackConstructor.h:
2487 (JSC::JSCallbackConstructor::create):
2488 * API/JSCallbackFunction.cpp:
2489 (JSC::JSCallbackFunction::JSCallbackFunction):
2490 (JSC::JSCallbackFunction::finishCreation):
2491 * API/JSCallbackFunction.h:
2492 * JavaScriptCore.exp:
2493 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2494 * debugger/DebuggerActivation.cpp:
2495 * debugger/DebuggerActivation.h:
2496 (JSC::DebuggerActivation::create):
2498 (GlobalObject::finishCreation):
2499 (GlobalObject::GlobalObject):
2500 * runtime/ArrayConstructor.cpp:
2501 (JSC::ArrayConstructor::ArrayConstructor):
2502 (JSC::ArrayConstructor::finishCreation):
2503 * runtime/ArrayConstructor.h:
2504 * runtime/ArrayPrototype.cpp:
2505 (JSC::ArrayPrototype::ArrayPrototype):
2506 * runtime/ArrayPrototype.h:
2507 (JSC::ArrayPrototype::create):
2508 * runtime/BooleanConstructor.cpp:
2509 (JSC::BooleanConstructor::BooleanConstructor):
2510 (JSC::BooleanConstructor::finishCreation):
2511 * runtime/BooleanConstructor.h:
2512 * runtime/BooleanObject.cpp:
2513 (JSC::BooleanObject::BooleanObject):
2514 * runtime/BooleanObject.h:
2515 (JSC::BooleanObject::create):
2516 * runtime/BooleanPrototype.cpp:
2517 (JSC::BooleanPrototype::BooleanPrototype):
2518 (JSC::BooleanPrototype::finishCreation):
2519 * runtime/BooleanPrototype.h:
2520 * runtime/DateConstructor.cpp:
2521 (JSC::DateConstructor::DateConstructor):
2522 (JSC::DateConstructor::finishCreation):
2523 * runtime/DateConstructor.h:
2524 * runtime/DateInstance.cpp:
2525 (JSC::DateInstance::DateInstance):
2526 * runtime/DateInstance.h:
2527 (JSC::DateInstance::create):
2528 * runtime/DatePrototype.cpp:
2529 (JSC::DatePrototype::DatePrototype):
2530 (JSC::DatePrototype::finishCreation):
2531 * runtime/DatePrototype.h:
2532 * runtime/Error.cpp:
2533 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
2534 * runtime/ErrorConstructor.cpp:
2535 (JSC::ErrorConstructor::ErrorConstructor):
2536 (JSC::ErrorConstructor::finishCreation):
2537 * runtime/ErrorConstructor.h:
2538 * runtime/ErrorPrototype.cpp:
2539 (JSC::ErrorPrototype::ErrorPrototype):
2540 * runtime/ErrorPrototype.h:
2541 (JSC::ErrorPrototype::create):
2542 * runtime/FunctionConstructor.cpp:
2543 (JSC::FunctionConstructor::FunctionConstructor):
2544 (JSC::FunctionConstructor::finishCreation):
2545 * runtime/FunctionConstructor.h:
2546 * runtime/FunctionPrototype.cpp:
2547 (JSC::FunctionPrototype::FunctionPrototype):
2548 (JSC::FunctionPrototype::finishCreation):
2549 * runtime/FunctionPrototype.h:
2550 * runtime/InternalFunction.cpp:
2551 (JSC::InternalFunction::InternalFunction):
2552 * runtime/InternalFunction.h:
2553 * runtime/JSActivation.cpp:
2554 (JSC::JSActivation::JSActivation):
2555 * runtime/JSActivation.h:
2556 (JSC::JSActivation::create):
2557 * runtime/JSGlobalObject.h:
2558 (JSC::JSGlobalObject::create):
2559 (JSC::JSGlobalObject::JSGlobalObject):
2560 * runtime/JSONObject.cpp:
2561 (JSC::JSONObject::JSONObject):
2562 * runtime/JSONObject.h:
2563 (JSC::JSONObject::create):
2564 * runtime/JSStaticScopeObject.h:
2565 (JSC::JSStaticScopeObject::create):
2566 (JSC::JSStaticScopeObject::JSStaticScopeObject):
2567 * runtime/JSString.cpp:
2568 (JSC::StringObject::create):
2569 * runtime/MathObject.cpp:
2570 (JSC::MathObject::MathObject):
2571 * runtime/MathObject.h:
2572 (JSC::MathObject::create):
2573 * runtime/NativeErrorConstructor.cpp:
2574 (JSC::NativeErrorConstructor::NativeErrorConstructor):
2575 * runtime/NativeErrorConstructor.h:
2576 (JSC::NativeErrorConstructor::finishCreation):
2577 * runtime/NativeErrorPrototype.cpp:
2578 (JSC::NativeErrorPrototype::NativeErrorPrototype):
2579 (JSC::NativeErrorPrototype::finishCreation):
2580 * runtime/NativeErrorPrototype.h:
2581 * runtime/NumberConstructor.cpp:
2582 (JSC::NumberConstructor::NumberConstructor):
2583 (JSC::NumberConstructor::finishCreation):
2584 * runtime/NumberConstructor.h:
2585 * runtime/NumberObject.cpp:
2586 (JSC::NumberObject::NumberObject):
2587 * runtime/NumberObject.h:
2588 (JSC::NumberObject::create):
2589 * runtime/NumberPrototype.cpp:
2590 (JSC::NumberPrototype::NumberPrototype):
2591 (JSC::NumberPrototype::finishCreation):
2592 * runtime/NumberPrototype.h:
2593 * runtime/ObjectConstructor.cpp:
2594 (JSC::ObjectConstructor::ObjectConstructor):
2595 (JSC::ObjectConstructor::finishCreation):
2596 * runtime/ObjectConstructor.h:
2597 * runtime/RegExpConstructor.cpp:
2598 (JSC::RegExpConstructor::RegExpConstructor):
2599 (JSC::RegExpConstructor::finishCreation):
2600 (JSC::RegExpMatchesArray::RegExpMatchesArray):
2601 * runtime/RegExpConstructor.h:
2602 * runtime/RegExpMatchesArray.h:
2603 (JSC::RegExpMatchesArray::create):
2604 * runtime/RegExpObject.cpp:
2605 (JSC::RegExpObject::RegExpObject):
2606 * runtime/RegExpObject.h:
2607 (JSC::RegExpObject::create):
2608 * runtime/RegExpPrototype.cpp:
2609 (JSC::RegExpPrototype::RegExpPrototype):
2610 * runtime/StringConstructor.cpp:
2611 (JSC::StringConstructor::StringConstructor):
2612 (JSC::StringConstructor::finishCreation):
2613 * runtime/StringConstructor.h:
2614 * runtime/StringObject.cpp:
2615 (JSC::StringObject::StringObject):
2616 * runtime/StringObject.h:
2617 (JSC::StringObject::create):
2618 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2619 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
2620 * runtime/StringPrototype.cpp:
2621 (JSC::StringPrototype::StringPrototype):
2622 (JSC::StringPrototype::finishCreation):
2623 * runtime/StringPrototype.h:
2625 2011-09-06 Filip Pizlo <fpizlo@apple.com>
2627 Accessibility tests crashing in BasicRawSentinelNode code
2628 https://bugs.webkit.org/show_bug.cgi?id=67682
2630 Reviewed by Geoffrey Garen.
2632 A CodeBlock should ensure that no other CodeBlocks have references to it after
2635 * bytecode/CodeBlock.cpp:
2636 (JSC::CodeBlock::~CodeBlock):
2638 2011-09-06 Yong Li <yoli@rim.com>
2640 https://bugs.webkit.org/show_bug.cgi?id=67486
2641 This reverts r65993 which gives wrong results for rshift
2642 in some corner cases (see the test).
2644 Reviewed by Gavin Barraclough.
2646 New test: fast/js/floating-point-truncate-rshift.html
2648 * assembler/ARMAssembler.h:
2649 * assembler/MacroAssemblerARM.h:
2650 (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2651 (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
2653 2011-09-06 Filip Pizlo <fpizlo@apple.com>
2655 Unreviewed build fix for r94559.
2657 Marked the relevant parameters as unused if !ENABLE(JIT), and surrounded
2658 new out-of-line JIT-specific method definitions with !ENABLE(JIT).
2660 * bytecode/CodeBlock.cpp:
2661 * runtime/Executable.cpp:
2662 (JSC::EvalExecutable::compileInternal):
2663 (JSC::ProgramExecutable::compileInternal):
2664 (JSC::FunctionExecutable::compileForCallInternal):
2666 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com>
2668 Fix broken PPC build due to new dtoa library
2669 https://bugs.webkit.org/show_bug.cgi?id=67654
2671 Reviewed by Dan Bernstein.
2673 Added condition for PPC in the new dtoa compatibility check so that
2674 building won't fail.
2678 2011-09-05 Oliver Hunt <oliver@apple.com>
2680 An object's structure should reference the global object responsible for its creation
2681 https://bugs.webkit.org/show_bug.cgi?id=67624
2683 Reviewed by Gavin Barraclough.
2685 Add a reference to a GlobalObject to Structure, and update all calls to
2686 Structure::create() to pass the global object that is the origin for that
2687 structure. For objects where the appropriate global object isn't available
2688 at construction time (global object prototypes, etc), or objects that
2689 logically don't have a global object (strings, etc) we just pass null.
2691 This change is largely mechanical (passing a new globalObject parameter
2694 * API/JSCallbackConstructor.h:
2695 (JSC::JSCallbackConstructor::createStructure):
2696 * API/JSCallbackFunction.h:
2697 (JSC::JSCallbackFunction::createStructure):
2698 * API/JSCallbackObject.h:
2699 (JSC::JSCallbackObject::createStructure):
2700 * API/JSContextRef.cpp:
2701 * JavaScriptCore.exp:
2702 * debugger/DebuggerActivation.h:
2703 (JSC::DebuggerActivation::createStructure):
2704 * runtime/Arguments.h:
2705 (JSC::Arguments::createStructure):
2706 * runtime/ArrayConstructor.h:
2707 (JSC::ArrayConstructor::createStructure):
2708 * runtime/ArrayPrototype.h:
2709 (JSC::ArrayPrototype::createStructure):
2710 * runtime/BooleanObject.h:
2711 (JSC::BooleanObject::createStructure):
2712 * runtime/BooleanPrototype.h:
2713 (JSC::BooleanPrototype::createStructure):
2714 * runtime/DateConstructor.h:
2715 (JSC::DateConstructor::createStructure):
2716 * runtime/DateInstance.h:
2717 (JSC::DateInstance::createStructure):
2718 * runtime/DatePrototype.h:
2719 (JSC::DatePrototype::createStructure):
2720 * runtime/ErrorInstance.h:
2721 (JSC::ErrorInstance::createStructure):
2722 * runtime/ErrorPrototype.h:
2723 (JSC::ErrorPrototype::createStructure):
2724 * runtime/Executable.h:
2725 (JSC::ExecutableBase::createStructure):
2726 (JSC::NativeExecutable::createStructure):
2727 (JSC::EvalExecutable::createStructure):
2728 (JSC::ProgramExecutable::createStructure):
2729 (JSC::FunctionExecutable::createStructure):
2730 * runtime/FunctionPrototype.h:
2731 (JSC::FunctionPrototype::createStructure):
2732 * runtime/GetterSetter.h:
2733 (JSC::GetterSetter::createStructure):
2734 * runtime/InternalFunction.h:
2735 (JSC::InternalFunction::createStructure):
2736 * runtime/JSAPIValueWrapper.h:
2737 (JSC::JSAPIValueWrapper::createStructure):
2738 * runtime/JSActivation.h:
2739 (JSC::JSActivation::createStructure):
2740 * runtime/JSArray.h:
2741 (JSC::JSArray::createStructure):
2742 * runtime/JSByteArray.cpp:
2743 (JSC::JSByteArray::createStructure):
2744 * runtime/JSByteArray.h:
2745 * runtime/JSFunction.h:
2746 (JSC::JSFunction::createStructure):
2747 * runtime/JSGlobalData.cpp:
2748 (JSC::JSGlobalData::JSGlobalData):
2749 * runtime/JSGlobalObject.cpp:
2750 (JSC::JSGlobalObject::reset):
2751 * runtime/JSGlobalObject.h:
2752 (JSC::JSGlobalObject::finishCreation):
2753 (JSC::JSGlobalObject::createStructure):
2754 * runtime/JSNotAnObject.h:
2755 (JSC::JSNotAnObject::createStructure):
2756 * runtime/JSONObject.h:
2757 (JSC::JSONObject::createStructure):
2758 * runtime/JSObject.cpp:
2759 (JSC::JSObject::createInheritorID):
2760 * runtime/JSObject.h:
2761 (JSC::JSObject::createStructure):
2762 (JSC::JSNonFinalObject::createStructure):
2763 (JSC::JSFinalObject::createStructure):
2764 (JSC::createEmptyObjectStructure):
2765 * runtime/JSObjectWithGlobalObject.h:
2766 (JSC::JSObjectWithGlobalObject::createStructure):
2767 * runtime/JSPropertyNameIterator.h:
2768 (JSC::JSPropertyNameIterator::createStructure):
2769 * runtime/JSStaticScopeObject.h:
2770 (JSC::JSStaticScopeObject::createStructure):
2771 * runtime/JSString.h:
2772 (JSC::RopeBuilder::createStructure):
2773 * runtime/JSVariableObject.h:
2774 (JSC::JSVariableObject::createStructure):
2775 * runtime/JSWrapperObject.h:
2776 (JSC::JSWrapperObject::createStructure):
2777 * runtime/MathObject.h:
2778 (JSC::MathObject::createStructure):
2779 * runtime/NativeErrorConstructor.h:
2780 (JSC::NativeErrorConstructor::createStructure):
2781 (JSC::NativeErrorConstructor::constructorBody):
2782 * runtime/NumberConstructor.h:
2783 (JSC::NumberConstructor::createStructure):
2784 * runtime/NumberObject.h:
2785 (JSC::NumberObject::createStructure):
2786 * runtime/NumberPrototype.h:
2787 (JSC::NumberPrototype::createStructure):
2788 * runtime/ObjectConstructor.h:
2789 (JSC::ObjectConstructor::createStructure):
2790 * runtime/ObjectPrototype.h:
2791 (JSC::ObjectPrototype::createStructure):
2793 (JSC::RegExp::createStructure):
2794 * runtime/RegExpConstructor.h:
2795 (JSC::RegExpConstructor::createStructure):
2796 * runtime/RegExpObject.h:
2797 (JSC::RegExpObject::createStructure):
2798 * runtime/RegExpPrototype.h:
2799 (JSC::RegExpPrototype::createStructure):
2800 * runtime/ScopeChain.h:
2801 (JSC::ScopeChainNode::createStructure):
2802 * runtime/StrictEvalActivation.h:
2803 (JSC::StrictEvalActivation::createStructure):
2804 * runtime/StringConstructor.h:
2805 (JSC::StringConstructor::createStructure):
2806 * runtime/StringObject.h:
2807 (JSC::StringObject::createStructure):
2808 * runtime/StringObjectThatMasqueradesAsUndefined.h:
2809 (JSC::StringObjectThatMasqueradesAsUndefined::create):
2810 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2811 * runtime/StringPrototype.h:
2812 (JSC::StringPrototype::createStructure):
2813 * runtime/Structure.cpp:
2814 (JSC::Structure::Structure):
2815 (JSC::Structure::visitChildren):
2816 * runtime/Structure.h:
2817 (JSC::Structure::create):
2818 (JSC::Structure::globalObject):
2819 (JSC::Structure::setGlobalObject):
2820 * runtime/StructureChain.h:
2821 (JSC::StructureChain::createStructure):
2823 2011-09-06 Michael Saboff <msaboff@apple.com>
2825 Add windows changes for JSC:RegExp functional tests
2826 https://bugs.webkit.org/show_bug.cgi?id=67521
2828 Windows build changes for regular expression functional test.
2830 Rubber-stamped by Gavin Barraclough.
2832 * JavaScriptCore.vcproj/JavaScriptCore.sln:
2833 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2834 * JavaScriptCore.vcproj/testRegExp: Added.
2835 * JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj: Added.
2836 * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Added.
2837 * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Added.
2838 * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Added.
2839 * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Added.
2840 * JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd: Added.
2841 * JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd: Added.
2842 * JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd: Added.
2843 * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Added.
2844 * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Added.
2845 * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Added.
2846 * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Added.
2848 2011-09-06 Filip Pizlo <fpizlo@apple.com>
2850 JavaScriptCore does not have tiered compilation
2851 https://bugs.webkit.org/show_bug.cgi?id=67176
2853 Reviewed by Gavin Barraclough.
2855 This adds the ability to have multiple CodeBlocks associated with
2856 a particular role in an Executable. These are stored in
2857 descending order of compiler tier. CodeBlocks are optimized when
2858 a counter (m_executeCounter) that is incremented in loops and
2859 epilogues becomes positive. Optimizing means that all calls to
2860 the old CodeBlock are unlinked.
2862 The DFG can now pull in predictions from ValueProfiles, and
2863 propagate them along the graph. To support the new phase while
2864 maintaing some level of abstraction, a DFGDriver was introduced
2865 that encapsulates how to run the DFG compiler.
2867 This is turned off by default because it's not yet a performance
2868 win on all benchmarks. It speeds up crypto and richards by
2869 10% and 6% respectively, but still does not do as good of a job
2870 as it could. Notably, the DFG backend has not changed, and
2871 is largely oblivious to the new information being made available
2874 When turned off (the default), this patch is performance neutral.
2878 * GNUmakefile.list.am:
2879 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2880 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2881 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
2882 * JavaScriptCore.xcodeproj/project.pbxproj:
2883 * assembler/MacroAssemblerX86.h:
2884 (JSC::MacroAssemblerX86::branchAdd32):
2885 * assembler/MacroAssemblerX86_64.h:
2886 (JSC::MacroAssemblerX86_64::branchAdd32):
2887 * bytecode/CodeBlock.cpp:
2888 (JSC::CodeBlock::CodeBlock):
2889 (JSC::CodeBlock::~CodeBlock):
2890 (JSC::CodeBlock::visitAggregate):
2891 (JSC::CallLinkInfo::unlink):
2892 (JSC::CodeBlock::unlinkCalls):
2893 (JSC::CodeBlock::unlinkIncomingCalls):
2894 (JSC::CodeBlock::clearEvalCache):
2895 (JSC::replaceExistingEntries):
2896 (JSC::CodeBlock::copyDataFromAlternative):
2897 (JSC::ProgramCodeBlock::replacement):
2898 (JSC::EvalCodeBlock::replacement):
2899 (JSC::FunctionCodeBlock::replacement):
2900 (JSC::ProgramCodeBlock::compileOptimized):
2901 (JSC::EvalCodeBlock::compileOptimized):
2902 (JSC::FunctionCodeBlock::compileOptimized):
2903 * bytecode/CodeBlock.h:
2904 (JSC::GlobalCodeBlock::GlobalCodeBlock):
2905 (JSC::ProgramCodeBlock::ProgramCodeBlock):
2906 (JSC::EvalCodeBlock::EvalCodeBlock):
2907 (JSC::FunctionCodeBlock::FunctionCodeBlock):
2908 * bytecode/ValueProfile.h:
2909 (JSC::ValueProfile::dump):
2910 (JSC::ValueProfile::computeStatistics):
2911 * bytecompiler/BytecodeGenerator.cpp:
2912 (JSC::BytecodeGenerator::BytecodeGenerator):
2913 * bytecompiler/BytecodeGenerator.h:
2914 * dfg/DFGByteCodeParser.cpp:
2915 (JSC::DFG::ByteCodeParser::ByteCodeParser):
2916 (JSC::DFG::ByteCodeParser::addCall):
2917 (JSC::DFG::ByteCodeParser::dynamicallyPredict):
2918 (JSC::DFG::ByteCodeParser::parseBlock):
2920 * dfg/DFGDriver.cpp: Added.
2921 (JSC::DFG::compile):
2922 (JSC::DFG::tryCompile):
2923 (JSC::DFG::tryCompileFunction):
2924 * dfg/DFGDriver.h: Added.
2925 (JSC::DFG::tryCompile):
2926 (JSC::DFG::tryCompileFunction):
2928 (JSC::DFG::Graph::dump):
2929 (JSC::DFG::Graph::predictArgumentTypes):
2931 (JSC::DFG::Graph::predict):
2932 (JSC::DFG::Graph::predictGlobalVar):
2933 (JSC::DFG::Graph::isConstant):
2934 (JSC::DFG::Graph::isJSConstant):
2935 (JSC::DFG::Graph::isInt32Constant):
2936 (JSC::DFG::Graph::isDoubleConstant):
2937 (JSC::DFG::Graph::valueOfJSConstant):
2938 (JSC::DFG::Graph::valueOfInt32Constant):
2939 (JSC::DFG::Graph::valueOfDoubleConstant):
2940 * dfg/DFGJITCompiler.cpp:
2941 (JSC::DFG::JITCompiler::link):
2942 * dfg/DFGJITCompiler.h:
2943 (JSC::DFG::JITCompiler::isConstant):
2944 (JSC::DFG::JITCompiler::isJSConstant):
2945 (JSC::DFG::JITCompiler::isInt32Constant):
2946 (JSC::DFG::JITCompiler::isDoubleConstant):
2947 (JSC::DFG::JITCompiler::valueOfJSConstant):
2948 (JSC::DFG::JITCompiler::valueOfInt32Constant):
2949 (JSC::DFG::JITCompiler::valueOfDoubleConstant):
2951 (JSC::DFG::isCellPrediction):
2952 (JSC::DFG::isNumberPrediction):
2953 (JSC::DFG::predictionToString):
2954 (JSC::DFG::mergePrediction):
2955 (JSC::DFG::makePrediction):
2956 (JSC::DFG::Node::valueOfJSConstant):
2957 (JSC::DFG::Node::isInt32Constant):
2958 (JSC::DFG::Node::isDoubleConstant):
2959 (JSC::DFG::Node::valueOfInt32Constant):
2960 (JSC::DFG::Node::valueOfDoubleConstant):
2961 (JSC::DFG::Node::predict):
2962 * dfg/DFGPropagation.cpp: Added.
2963 (JSC::DFG::Propagator::Propagator):
2964 (JSC::DFG::Propagator::fixpoint):
2965 (JSC::DFG::Propagator::setPrediction):
2966 (JSC::DFG::Propagator::mergePrediction):
2967 (JSC::DFG::Propagator::propagateNode):
2968 (JSC::DFG::Propagator::propagateForward):
2969 (JSC::DFG::Propagator::propagateBackward):
2970 (JSC::DFG::propagate):
2971 * dfg/DFGPropagation.h: Added.
2972 (JSC::DFG::propagate):
2973 * dfg/DFGRepatch.cpp:
2974 (JSC::DFG::dfgLinkFor):
2975 * heap/HandleHeap.h:
2976 (JSC::HandleHeap::Node::Node):
2978 (JSC::JIT::emitOptimizationCheck):
2979 (JSC::JIT::emitTimeoutCheck):
2980 (JSC::JIT::privateCompile):
2981 (JSC::JIT::linkFor):
2983 (JSC::JIT::emitOptimizationCheck):
2984 * jit/JITCall32_64.cpp:
2985 (JSC::JIT::emit_op_ret):
2986 (JSC::JIT::emit_op_ret_object_or_this):
2988 (JSC::JITCode::JITCode):
2989 (JSC::JITCode::bottomTierJIT):
2990 (JSC::JITCode::topTierJIT):
2991 (JSC::JITCode::nextTierJIT):
2992 * jit/JITOpcodes.cpp:
2993 (JSC::JIT::emit_op_ret):
2994 (JSC::JIT::emit_op_ret_object_or_this):
2996 (JSC::DEFINE_STUB_FUNCTION):
2998 * runtime/Executable.cpp:
2999 (JSC::EvalExecutable::compileOptimized):
3000 (JSC::EvalExecutable::compileInternal):
3001 (JSC::ProgramExecutable::compileOptimized):
3002 (JSC::ProgramExecutable::compileInternal):
3003 (JSC::FunctionExecutable::compileOptimizedForCall):
3004 (JSC::FunctionExecutable::compileOptimizedForConstruct):
3005 (JSC::FunctionExecutable::compileForCallInternal):
3006 (JSC::FunctionExecutable::compileForConstructInternal):
3007 * runtime/Executable.h:
3008 (JSC::EvalExecutable::compile):
3009 (JSC::ProgramExecutable::compile):
3010 (JSC::FunctionExecutable::compileForCall):
3011 (JSC::FunctionExecutable::compileForConstruct):
3012 (JSC::FunctionExecutable::compileOptimizedFor):
3014 * wtf/SentinelLinkedList.h:
3015 (WTF::BasicRawSentinelNode::BasicRawSentinelNode):
3016 (WTF::BasicRawSentinelNode::setPrev):
3017 (WTF::BasicRawSentinelNode::setNext):
3018 (WTF::BasicRawSentinelNode::prev):
3019 (WTF::BasicRawSentinelNode::next):
3020 (WTF::BasicRawSentinelNode::isOnList):
3022 (WTF::::SentinelLinkedList):
3027 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com>
3029 Unreviewed, rolling out r94445 and r94448.
3030 http://trac.webkit.org/changeset/94445
3031 http://trac.webkit.org/changeset/94448
3032 https://bugs.webkit.org/show_bug.cgi?id=67595
3034 It broke everything (Requested by ossy on #webkit).
3036 * JavaScriptCore.exp:
3037 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3039 (JSC::Heap::collect):
3041 * heap/NewSpace.cpp:
3042 (JSC::NewSpace::NewSpace):
3045 (JSC::DEFINE_STUB_FUNCTION):
3046 * runtime/JSObject.cpp:
3047 (JSC::JSObject::allocatePropertyStorage):
3048 * runtime/JSObject.h:
3049 (JSC::JSObject::~JSObject):
3050 (JSC::JSObject::putDirectInternal):
3051 (JSC::JSObject::putDirectWithoutTransition):
3052 (JSC::JSObject::putDirectFunctionWithoutTransition):
3053 (JSC::JSObject::transitionTo):
3054 (JSC::JSObject::visitChildrenDirect):
3056 2011-09-05 Patrick Gansterer <paroga@webkit.org>
3058 Unreviewed build fix for r94452.
3060 Add config.h as the first header to the cc files as required by the coding style.
3061 Reuse macros from Assertions.h instead of adding addional #ifdefs.
3063 * wtf/dtoa/bignum-dtoa.cc:
3064 * wtf/dtoa/bignum.cc:
3065 * wtf/dtoa/cached-powers.cc:
3066 * wtf/dtoa/diy-fp.cc:
3067 * wtf/dtoa/double-conversion.cc:
3068 * wtf/dtoa/fast-dtoa.cc:
3069 * wtf/dtoa/fixed-dtoa.cc:
3070 * wtf/dtoa/strtod.cc:
3073 2011-09-05 Andras Becsi <andras.becsi@nokia.com>
3075 [Qt][WK2] Fix the build
3077 Rubber-stamped by Csaba Osztrogonác.
3079 * wtf/dtoa/double-conversion.cc: Remove dead variable in file added in r94452.
3080 The variable fractional_part is only set but never used.
3082 2011-09-04 Mark Hahnenberg <mhahnenberg@apple.com>
3084 REGRESSION (r94452): 20 http/tests tests failing on Qt Linux Release
3085 https://bugs.webkit.org/show_bug.cgi?id=67562
3087 Reviewed by Darin Adler.
3089 Fixing the build (again which was broken by the dtoa patch. Needed
3090 to make sure WTF::double_conversion::initialize() is called for Qt
3091 as well as adding a check for WinCE in dtoa/utils.h
3093 * runtime/InitializeThreading.cpp:
3094 (JSC::initializeThreadingOnce):
3095 * wtf/dtoa/cached-powers.cc:
3098 2011-09-03 Filip Pizlo <fpizlo@apple.com>
3100 ThunkGenerators does not convert positive double zero into integer zero
3101 https://bugs.webkit.org/show_bug.cgi?id=67553
3103 Reviewed by Gavin Barraclough.
3105 This is an 0.5% speed-up on V8 and neutral elsewhere.
3107 * jit/SpecializedThunkJIT.h:
3108 (JSC::SpecializedThunkJIT::returnDouble):
3110 2011-09-03 Kevin Ollivier <kevino@theolliviers.com>
3112 [wx] Unreviewed build fix. Add wtf/dtoa directory to build.
3116 2011-09-03 Filip Pizlo <fpizlo@apple.com>
3118 DFG variable predictions only work for local variables, not temporaries
3119 https://bugs.webkit.org/show_bug.cgi?id=67554
3121 Reviewed by Gavin Barraclough.
3123 This appears to be a slight speed-up in Kraken (0.3% but significant)
3124 and neutral elsewhere.
3127 (JSC::DFG::Graph::predict):
3129 2011-09-02 Filip Pizlo <fpizlo@apple.com>
3131 DFG JIT speculation failure does recovery of additions in reverse and
3133 https://bugs.webkit.org/show_bug.cgi?id=67551
3135 Reviewed by Sam Weinig.
3137 * dfg/DFGJITCompiler.cpp:
3138 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
3140 2011-09-02 Filip Pizlo <fpizlo@apple.com>
3142 ValueProfile does not make it safe to introspect cell values
3143 after garbage collection
3144 https://bugs.webkit.org/show_bug.cgi?id=67354
3146 Reviewed by Gavin Barraclough.
3148 ValueProfile buckets are now weak references, implemented using a
3149 light-weight weak reference mechanism that this patch also adds (the
3150 WeakReferenceHarvester). If a cell stored in a ValueProfile bucket
3151 is not marked, then the bucket is transformed into a Structure
3152 pointer. If the Structure is not marked either, then it is turned
3153 into a ClassInfo pointer.
3155 * JavaScriptCore.xcodeproj/project.pbxproj:
3156 * bytecode/CodeBlock.cpp:
3157 (JSC::CodeBlock::~CodeBlock):
3158 (JSC::CodeBlock::visitAggregate):
3159 (JSC::CodeBlock::visitWeakReferences):
3160 * bytecode/CodeBlock.h:
3161 * bytecode/ValueProfile.h:
3162 (JSC::ValueProfile::ValueProfile):
3163 (JSC::ValueProfile::classInfo):
3164 (JSC::ValueProfile::numberOfInt32s):
3165 (JSC::ValueProfile::numberOfDoubles):
3166 (JSC::ValueProfile::numberOfCells):
3167 (JSC::ValueProfile::numberOfArrays):
3168 (JSC::ValueProfile::probabilityOfArray):
3169 (JSC::ValueProfile::WeakBucket::WeakBucket):
3170 (JSC::ValueProfile::WeakBucket::operator!):
3171 (JSC::ValueProfile::WeakBucket::isEmpty):
3172 (JSC::ValueProfile::WeakBucket::isClassInfo):
3173 (JSC::ValueProfile::WeakBucket::isStructure):
3174 (JSC::ValueProfile::WeakBucket::asStructure):
3175 (JSC::ValueProfile::WeakBucket::asClassInfo):
3176 (JSC::ValueProfile::WeakBucket::getClassInfo):
3178 (JSC::Heap::harvestWeakReferences):
3179 (JSC::Heap::markRoots):
3181 * heap/MarkStack.cpp:
3182 (JSC::SlotVisitor::drain):
3183 (JSC::SlotVisitor::harvestWeakReferences):
3185 (JSC::MarkStack::addWeakReferenceHarvester):
3186 (JSC::MarkStack::MarkStack):
3187 (JSC::MarkStack::appendUnbarrieredPointer):
3188 * heap/SlotVisitor.h:
3189 * heap/WeakReferenceHarvester.h: Added.
3190 (JSC::WeakReferenceHarvester::WeakReferenceHarvester):
3191 (JSC::WeakReferenceHarvester::~WeakReferenceHarvester):
3193 2011-09-02 Michael Saboff <msaboff@apple.com>
3195 Replace local implementation of string equals() methods with UString versions
3196 https://bugs.webkit.org/show_bug.cgi?id=67342
3198 In preparation to allowing StringImpl to be backed by 8 bit
3199 characters when appropriate, we need to eliminate or change the
3200 usage of StringImpl::characters(). Change the uses of characters()
3201 that are used to implement redundant equals() methods.
3203 Reviewed by Gavin Barraclough.
3205 * runtime/Identifier.cpp:
3206 (JSC::Identifier::equal):
3207 * runtime/Identifier.h:
3208 (JSC::Identifier::equal):
3209 * wtf/text/AtomicString.cpp:
3210 (WTF::CStringTranslator::equal): Moved an optimized method to here.
3212 * wtf/text/StringImpl.cpp:
3214 * wtf/text/StringImpl.h:
3216 2011-09-02 Michael Saboff <msaboff@apple.com>
3218 Add JSC:RegExp functional tests
3219 https://bugs.webkit.org/show_bug.cgi?id=67339
3221 Added new test driver program (testRegExp) and corresponding data file
3222 along with build scripts changes.
3224 Reviewed by Gavin Barraclough.
3226 * JavaScriptCore.exp:
3227 * JavaScriptCore.xcodeproj/project.pbxproj:
3228 * testRegExp.cpp: Added.
3232 (StopWatch::getElapsedMS):
3233 (RegExpTest::RegExpTest):
3234 (GlobalObject::create):
3235 (GlobalObject::className):
3236 (GlobalObject::GlobalObject):
3238 (cleanupGlobalData):
3244 (printUsageStatement):
3247 * tests/regexp: Added.
3248 * tests/regexp/RegExpTest.data: Added.
3250 2011-09-02 Michael Saboff <msaboff@apple.com>
3252 Add JSC:RegExp functional test data generator
3253 https://bugs.webkit.org/show_bug.cgi?id=67519
3255 Add a data generator for regular expressions. To enable, change the
3256 #undef REGEXP_FUNC_TEST_DATA_GEN to #define. Then compile and use
3257 regular expressions. The resulting data will be in /tmp/RegExpTestsData.
3259 Reviewed by Gavin Barraclough.
3261 * runtime/RegExp.cpp:
3263 (JSC::RegExpFunctionalTestCollector::clearRegExp):
3264 (JSC::RegExpFunctionalTestCollector::get):
3265 (JSC::RegExpFunctionalTestCollector::outputOneTest):
3266 (JSC::RegExpFunctionalTestCollector::RegExpFunctionalTestCollector):
3267 (JSC::RegExpFunctionalTestCollector::~RegExpFunctionalTestCollector):
3268 (JSC::RegExpFunctionalTestCollector::outputEscapedUString):
3269 (JSC::RegExp::~RegExp):
3270 (JSC::RegExp::compile):
3271 (JSC::RegExp::match):
3272 (JSC::RegExp::matchCompareWithInterpreter):
3274 2011-09-02 Mark Hahnenberg <mhahnenberg@apple.com>
3276 Fix the broken build due to dtoa patch
3277 https://bugs.webkit.org/show_bug.cgi?id=67534
3279 Reviewed by Oliver Hunt.
3283 * GNUmakefile.list.am:
3284 * wtf/dtoa/bignum.cc:
3285 * wtf/dtoa/fast-dtoa.cc:
3288 2011-09-02 Oliver Hunt <oliver@apple.com>
3290 Remove OldSpace classes
3291 https://bugs.webkit.org/show_bug.cgi?id=67533
3293 Reviewed by Gavin Barraclough.
3295 Remove the unused OldSpace classes
3298 * GNUmakefile.list.am:
3299 * JavaScriptCore.gypi:
3300 * JavaScriptCore.pro:
3301 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3302 * JavaScriptCore.xcodeproj/project.pbxproj:
3304 (JSC::Heap::writeBarrierSlowCase):
3305 * heap/MarkedBlock.h:
3306 * heap/OldSpace.cpp: Removed.
3307 * heap/OldSpace.h: Removed.
3309 2011-09-02 James Robinson <jamesr@chromium.org>
3311 Compile fix for mac build.
3313 * wtf/CheckedArithmetic.h:
3318 2011-08-30 Matthew Delaney <mdelaney@apple.com>
3320 Read out of bounds in sUnpremultiplyData_RGBA8888 / ImageBufferData::getData
3321 https://bugs.webkit.org/show_bug.cgi?id=65352
3323 Reviewed by Simon Fraser.
3325 New test: fast/canvas/canvas-getImageData-large-crash.html
3327 This patch prevents overflows from happening in getImageData, createImageData, and canvas creation
3328 calls that specify widths and heights that end up overflowing the ints that we store those values in
3329 as well as derived values such as area and maxX / maxY of the bounding rects involved. Overflow of integer
3330 arithmetic is detected via the use of the new Checked type that was introduced in r94207. The change to JSC
3331 is just to add a new helper method described below.
3334 (isWithinIntRange): Reports if a float's value is within the range expressible by an int.
3336 2011-09-02 Mark Hahnenberg <mhahnenberg@apple.com>
3338 Incorporate newer, faster dtoa library
3339 https://bugs.webkit.org/show_bug.cgi?id=66346
3341 Reviewed by Oliver Hunt.
3343 Added new dtoa library at http://code.google.com/p/double-conversion/.
3344 Replaced old call to dtoa. The new library is much faster than the old one.
3345 We still use the old dtoa for some stuff in WebCore as well as the old strtod,
3346 but we can phase these out eventually as well.
3348 * GNUmakefile.list.am:
3349 * JavaScriptCore.exp:
3350 * JavaScriptCore.gypi:
3351 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3352 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
3353 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3354 * JavaScriptCore.xcodeproj/project.pbxproj:
3355 * runtime/InitializeThreading.cpp:
3356 * runtime/NumberPrototype.cpp:
3357 (JSC::numberProtoFuncToExponential):
3358 (JSC::numberProtoFuncToFixed):
3359 (JSC::numberProtoFuncToPrecision):
3360 * runtime/UString.cpp:
3361 (JSC::UString::number):
3362 * wtf/CMakeLists.txt:
3363 * wtf/ThreadingPthreads.cpp:
3364 (WTF::initializeThreading):
3365 * wtf/ThreadingWin.cpp:
3366 (WTF::initializeThreading):
3370 * wtf/dtoa/COPYING: Added.
3371 * wtf/dtoa/LICENSE: Added.
3372 * wtf/dtoa/README: Added.
3373 * wtf/dtoa/bignum-dtoa.cc: Added.
3374 * wtf/dtoa/bignum-dtoa.h: Added.
3375 * wtf/dtoa/bignum.cc: Added.
3376 * wtf/dtoa/bignum.h: Added.
3377 (WTF::double_conversion::Bignum::Times10):
3378 (WTF::double_conversion::Bignum::Equal):
3379 (WTF::double_conversion::Bignum::LessEqual):
3380 (WTF::double_conversion::Bignum::Less):
3381 (WTF::double_conversion::Bignum::PlusEqual):
3382 (WTF::double_conversion::Bignum::PlusLessEqual):
3383 (WTF::double_conversion::Bignum::PlusLess):
3384 (WTF::double_conversion::Bignum::EnsureCapacity):
3385 (WTF::double_conversion::Bignum::BigitLength):
3386 * wtf/dtoa/cached-powers.cc: Added.
3387 * wtf/dtoa/cached-powers.h: Added.
3388 * wtf/dtoa/diy-fp.cc: Added.
3389 * wtf/dtoa/diy-fp.h: Added.
3390 (WTF::double_conversion::DiyFp::DiyFp):
3391 (WTF::double_conversion::DiyFp::Subtract):
3392 (WTF::double_conversion::DiyFp::Minus):
3393 (WTF::double_conversion::DiyFp::Times):
3394 (WTF::double_conversion::DiyFp::Normalize):
3395 (WTF::double_conversion::DiyFp::f):
3396 (WTF::double_conversion::DiyFp::e):
3397 (WTF::double_conversion::DiyFp::set_f):
3398 (WTF::double_conversion::DiyFp::set_e):
3399 * wtf/dtoa/double-conversion.cc: Added.
3400 * wtf/dtoa/double-conversion.h: Added.
3401 (WTF::double_conversion::DoubleToStringConverter::DoubleToStringConverter):
3402 (WTF::double_conversion::StringToDoubleConverter::StringToDoubleConverter):
3403 * wtf/dtoa/double.h: Added.
3404 (WTF::double_conversion::double_to_uint64):
3405 (WTF::double_conversion::uint64_to_double):
3406 (WTF::double_conversion::Double::Double):
3407 (WTF::double_conversion::Double::AsDiyFp):
3408 (WTF::double_conversion::Double::AsNormalizedDiyFp):
3409 (WTF::double_conversion::Double::AsUint64):
3410 (WTF::double_conversion::Double::NextDouble):
3411 (WTF::double_conversion::Double::Exponent):
3412 (WTF::double_conversion::Double::Significand):
3413 (WTF::double_conversion::Double::IsDenormal):
3414 (WTF::double_conversion::Double::IsSpecial):
3415 (WTF::double_conversion::Double::IsNan):
3416 (WTF::double_conversion::Double::IsInfinite):
3417 (WTF::double_conversion::Double::Sign):
3418 (WTF::double_conversion::Double::UpperBoundary):
3419 (WTF::double_conversion::Double::NormalizedBoundaries):
3420 (WTF::double_conversion::Double::value):
3421 (WTF::double_conversion::Double::SignificandSizeForOrderOfMagnitude):
3422 (WTF::double_conversion::Double::Infinity):
3423 (WTF::double_conversion::Double::NaN):
3424 (WTF::double_conversion::Double::DiyFpToUint64):
3425 * wtf/dtoa/fast-dtoa.cc: Added.
3426 * wtf/dtoa/fast-dtoa.h: Added.
3427 * wtf/dtoa/fixed-dtoa.cc: Added.
3428 * wtf/dtoa/fixed-dtoa.h: Added.
3429 * wtf/dtoa/strtod.cc: Added.
3430 * wtf/dtoa/strtod.h: Added.
3431 * wtf/dtoa/utils.h: Added.
3432 (WTF::double_conversion::Max):
3433 (WTF::double_conversion::Min):
3434 (WTF::double_conversion::StrLength):
3435 (WTF::double_conversion::Vector::Vector):
3436 (WTF::double_conversion::Vector::SubVector):
3437 (WTF::double_conversion::Vector::length):
3438 (WTF::double_conversion::Vector::is_empty):
3439 (WTF::double_conversion::Vector::start):
3440 (WTF::double_conversion::Vector::operator[]):
3441 (WTF::double_conversion::Vector::first):
3442 (WTF::double_conversion::Vector::last):
3443 (WTF::double_conversion::StringBuilder::StringBuilder):
3444 (WTF::double_conversion::StringBuilder::~StringBuilder):
3445 (WTF::double_conversion::StringBuilder::size):
3446 (WTF::double_conversion::StringBuilder::position):
3447 (WTF::double_conversion::StringBuilder::Reset):
3448 (WTF::double_conversion::StringBuilder::AddCharacter):
3449 (WTF::double_conversion::StringBuilder::AddString):
3450 (WTF::double_conversion::StringBuilder::AddSubstring):
3451 (WTF::double_conversion::StringBuilder::AddPadding):
3452 (WTF::double_conversion::StringBuilder::Finalize):
3453 (WTF::double_conversion::StringBuilder::is_finalized):
3454 (WTF::double_conversion::BitCast):
3457 2011-09-02 Filip Pizlo <fpizlo@apple.com>
3459 DFG graph has no way of distinguishing or reconciling between static
3460 and dynamic predictions
3461 https://bugs.webkit.org/show_bug.cgi?id=67343
3463 Reviewed by Gavin Barraclough.
3465 PredictedType now stores the source of the prediction. Merging predictions,
3466 which was previously done with a bitwise or, is now done via the
3467 mergePredictions (equivalent to |) and mergePrediction (equivalent to |=)
3468 functions, which correctly handle combinations of static and dynamic.
3470 This is performance-neutral, since all predictions are currently static and
3471 so the code has no visible effects.
3473 * dfg/DFGByteCodeParser.cpp:
3474 (JSC::DFG::ByteCodeParser::set):
3475 (JSC::DFG::ByteCodeParser::staticallyPredictArray):
3476 (JSC::DFG::ByteCodeParser::staticallyPredictInt32):
3477 (JSC::DFG::ByteCodeParser::parseBlock):
3479 (JSC::DFG::Graph::predict):
3480 (JSC::DFG::Graph::predictGlobalVar):
3482 (JSC::DFG::isArrayPrediction):
3483 (JSC::DFG::isInt32Prediction):
3484 (JSC::DFG::isDoublePrediction):
3485 (JSC::DFG::isDynamicPrediction):
3486 (JSC::DFG::mergePredictions):
3487 (JSC::DFG::mergePrediction):
3488 (JSC::DFG::makePrediction):
3489 (JSC::DFG::Node::predict):
3491 2011-09-02 Oliver Hunt <oliver@apple.com>
3496 (JSC::NewSpace::allocatePropertyStorage):
3497 (JSC::NewSpace::inPropertyStorageNursery):
3499 2011-09-02 Oliver Hunt <oliver@apple.com>
3501 Use bump allocator for initial property storage
3502 https://bugs.webkit.org/show_bug.cgi?id=67494
3504 Reviewed by Gavin Barraclough.
3506 Switch to a bump allocator for the initial out of line
3507 property storage. This gives us slightly faster allocation
3508 for short lived objects that need out of line storage at
3509 the cost of an additional memcpy when the object survives
3512 No performance impact.
3514 * JavaScriptCore.exp:
3516 (JSC::Heap::collect):
3518 (JSC::Heap::allocatePropertyStorage):
3519 (JSC::Heap::inPropertyStorageNursary):
3520 * heap/NewSpace.cpp:
3521 (JSC::NewSpace::NewSpace):
3523 (JSC::NewSpace::resetPropertyStorageNursary):
3524 (JSC::NewSpace::allocatePropertyStorage):
3525 (JSC::NewSpace::inPropertyStorageNursary):
3527 (JSC::DEFINE_STUB_FUNCTION):
3528 * runtime/JSObject.cpp:
3529 (JSC::JSObject::allocatePropertyStorage):
3530 * runtime/JSObject.h:
3531 (JSC::JSObject::~JSObject):
3532 (JSC::JSObject::putDirectInternal):
3533 (JSC::JSObject::putDirectWithoutTransition):
3534 (JSC::JSObject::putDirectFunctionWithoutTransition):
3535 (JSC::JSObject::transitionTo):
3536 (JSC::JSObject::visitChildrenDirect):
3538 2011-09-01 Mark Rowe <mrowe@apple.com>
3542 * JavaScriptCore.JSVALUE32_64only.exp:
3543 * JavaScriptCore.JSVALUE64only.exp:
3544 * JavaScriptCore.exp:
3546 2011-09-01 Mark Hahnenberg <mhahnenberg@apple.com>
3548 Unzip initialization lists and constructors in JSCell hierarchy (4/7)
3549 https://bugs.webkit.org/show_bug.cgi?id=67174
3551 Reviewed by Oliver Hunt.
3553 Completed the fourth level of the refactoring to add finishCreation()
3554 methods to all classes within the JSCell hierarchy with non-trivial
3557 This primarily consists of pushing the calls to finishCreation() down
3558 into the constructors of the subclasses of the second level of the hierarchy
3559 as well as pulling the finishCreation() calls out into the class's corresponding
3560 create() method if it has one. Doing both simultaneously allows us to
3561 maintain the invariant that the finishCreation() method chain is called exactly
3562 once during the creation of an object, since calling it any other number of
3563 times (0, 2, or more) will cause an assertion failure.
3565 * API/JSCallbackConstructor.cpp:
3566 (JSC::JSCallbackConstructor::JSCallbackConstructor):
3567 (JSC::JSCallbackConstructor::finishCreation):
3568 * API/JSCallbackConstructor.h:
3569 * API/JSCallbackObject.h:
3570 (JSC::JSCallbackObject::create):
3571 * API/JSCallbackObjectFunctions.h:
3572 (JSC::::JSCallbackObject):
3573 (JSC::::finishCreation):
3574 * JavaScriptCore.JSVALUE64only.exp:
3575 * JavaScriptCore.exp:
3576 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3577 * debugger/DebuggerActivation.cpp:
3578 (JSC::DebuggerActivation::DebuggerActivation):
3579 (JSC::DebuggerActivation::create):
3580 * debugger/DebuggerActivation.h:
3581 * runtime/Arguments.h:
3582 (JSC::Arguments::create):
3583 (JSC::Arguments::createNoParameters):
3584 (JSC::Arguments::Arguments):
3585 * runtime/ArrayPrototype.cpp:
3586 (JSC::ArrayPrototype::ArrayPrototype):
3587 (JSC::ArrayPrototype::finishCreation):
3588 * runtime/ArrayPrototype.h:
3589 * runtime/BooleanObject.cpp:
3590 (JSC::BooleanObject::BooleanObject):
3591 (JSC::BooleanObject::finishCreation):
3592 * runtime/BooleanObject.h:
3593 * runtime/DateInstance.cpp:
3594 (JSC::DateInstance::DateInstance):
3595 (JSC::DateInstance::finishCreation):
3596 * runtime/DateInstance.h:
3597 * runtime/ErrorInstance.cpp:
3598 (JSC::ErrorInstance::ErrorInstance):
3599 * runtime/ErrorInstance.h:
3600 (JSC::ErrorInstance::create):
3601 * runtime/ErrorPrototype.cpp:
3602 (JSC::ErrorPrototype::ErrorPrototype):
3603 (JSC::ErrorPrototype::finishCreation):
3604 * runtime/ErrorPrototype.h:
3605 * runtime/ExceptionHelpers.cpp:
3606 (JSC::InterruptedExecutionError::InterruptedExecutionError):
3607 (JSC::InterruptedExecutionError::create):
3608 (JSC::TerminatedExecutionError::TerminatedExecutionError):
3609 (JSC::TerminatedExecutionError::create):
3610 * runtime/Executable.cpp:
3611 (JSC::EvalExecutable::EvalExecutable):
3612 (JSC::ProgramExecutable::ProgramExecutable):
3613 (JSC::FunctionExecutable::FunctionExecutable):
3614 * runtime/Executable.h:
3615 (JSC::NativeExecutable::create):
3616 (JSC::NativeExecutable::NativeExecutable):
3617 (JSC::EvalExecutable::create):
3618 (JSC::ProgramExecutable::create):
3619 (JSC::FunctionExecutable::create):
3620 * runtime/InternalFunction.cpp:
3621 (JSC::InternalFunction::InternalFunction):
3622 (JSC::InternalFunction::finishCreation):
3623 * runtime/InternalFunction.h:
3624 * runtime/JSActivation.cpp:
3625 (JSC::JSActivation::JSActivation):
3626 (JSC::JSActivation::finishCreation):
3627 * runtime/JSActivation.h:
3628 * runtime/JSArray.cpp:
3629 (JSC::JSArray::JSArray):
3630 * runtime/JSArray.h:
3631 (JSC::JSArray::create):
3632 * runtime/JSByteArray.cpp:
3633 (JSC::JSByteArray::JSByteArray):
3634 * runtime/JSByteArray.h:
3635 (JSC::JSByteArray::create):
3636 * runtime/JSFunction.cpp:
3637 (JSC::JSFunction::JSFunction):
3638 (JSC::JSFunction::finishCreation):
3639 * runtime/JSFunction.h:
3640 (JSC::JSFunction::create):
3641 * runtime/JSGlobalObject.h:
3642 (JSC::JSGlobalObject::JSGlobalObject):
3643 (JSC::JSGlobalObject::finishCreation):
3644 * runtime/JSNotAnObject.h:
3645 (JSC::JSNotAnObject::JSNotAnObject):
3646 (JSC::JSNotAnObject::create):
3647 * runtime/JSONObject.cpp:
3648 (JSC::JSONObject::JSONObject):
3649 (JSC::JSONObject::finishCreation):
3650 * runtime/JSONObject.h:
3651 * runtime/JSObjectWithGlobalObject.cpp:
3652 (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
3653 * runtime/JSObjectWithGlobalObject.h:
3654 * runtime/JSStaticScopeObject.h:
3655 (JSC::JSStaticScopeObject::create):
3656 (JSC::JSStaticScopeObject::finishCreation):
3657 (JSC::JSStaticScopeObject::JSStaticScopeObject):
3658 * runtime/JSVariableObject.h:
3659 (JSC::JSVariableObject::JSVariableObject):
3660 * runtime/JSWrapperObject.h:
3661 (JSC::JSWrapperObject::JSWrapperObject):
3662 * runtime/MathObject.cpp:
3663 (JSC::MathObject::MathObject):
3664 (JSC::MathObject::finishCreation):
3665 * runtime/MathObject.h:
3666 * runtime/NumberObject.cpp:
3667 (JSC::NumberObject::NumberObject):
3668 (JSC::NumberObject::finishCreation):
3669 * runtime/NumberObject.h:
3670 * runtime/ObjectPrototype.cpp:
3671 (JSC::ObjectPrototype::ObjectPrototype):
3672 * runtime/ObjectPrototype.h:
3673 (JSC::ObjectPrototype::create):
3674 * runtime/RegExpConstructor.cpp:
3675 (JSC::RegExpMatchesArray::RegExpMatchesArray):
3676 (JSC::RegExpMatchesArray::finishCreation):
3677 * runtime/RegExpMatchesArray.h:
3678 * runtime/RegExpObject.cpp:
3679 (JSC::RegExpObject::RegExpObject):
3680 (JSC::RegExpObject::finishCreation):
3681 * runtime/RegExpObject.h:
3682 * runtime/StrictEvalActivation.cpp:
3683 (JSC::StrictEvalActivation::StrictEvalActivation):
3684 * runtime/StrictEvalActivation.h:
3685 (JSC::StrictEvalActivation::create):
3686 * runtime/StringObject.cpp:
3687 (JSC::StringObject::StringObject):
3688 (JSC::StringObject::finishCreation):
3689 * runtime/StringObject.h:
3691 2011-09-01 Daniel Bates <dbates@rim.com>
3693 QNX GCC distribution doesn't support vasprintf()
3694 https://bugs.webkit.org/show_bug.cgi?id=67423
3696 Reviewed by Antonio Gomes.
3698 * wtf/Platform.h: Don't enable HAVE_VASPRINTF when building with GCC on QNX.
3700 2011-09-01 Michael Saboff <msaboff@apple.com>
3702 Remove simple usage of UString::characters() from JavaScriptCore
3703 https://bugs.webkit.org/show_bug.cgi?id=67340
3705 In preparation to allowing StringImpl to be backed by 8 bit
3706 characters when appropriate, we need to eliminate or change the
3707 usage of StringImpl::characters(). Most of the changes below
3708 change s->characters()[0] to s[0].
3710 Reviewed by Geoffrey Garen.
3712 * bytecompiler/BytecodeGenerator.cpp:
3713 (JSC::keyForCharacterSwitch):
3714 * bytecompiler/NodesCodegen.cpp:
3715 (JSC::processClauseList):
3716 * interpreter/Interpreter.cpp:
3717 (JSC::Interpreter::privateExecute):
3719 (JSC::DEFINE_STUB_FUNCTION):
3720 * runtime/Identifier.cpp:
3721 (JSC::Identifier::addSlowCase):
3722 * runtime/JSGlobalObjectFunctions.cpp:
3725 * runtime/JSString.cpp:
3726 (JSC::JSString::substringFromRope):
3727 * runtime/JSString.h:
3728 (JSC::jsSingleCharacterSubstring):
3731 (JSC::jsOwnedString):
3732 * runtime/RegExp.cpp:
3734 * wtf/text/StringBuilder.h:
3735 (WTF::StringBuilder::operator[]):
3737 2011-09-01 Ada Chan <adachan@apple.com>
3739 Export fastMallocStatistics and Heap::objectTypeCounts for https://bugs.webkit.org/show_bug.cgi?id=67160.
3741 Reviewed by Darin Adler.
3743 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3745 2011-09-01 Hao Zheng <zhenghao@chromium.org>
3747 Define PTHREAD_KEYS_MAX to fix Android port build.
3748 https://bugs.webkit.org/show_bug.cgi?id=67362
3750 Reviewed by Adam Barth.
3752 PTHREAD_KEYS_MAX is not defined in bionic, so explicitly define it.
3754 * wtf/ThreadIdentifierDataPthreads.cpp:
3756 2011-08-31 Oliver Hunt <oliver@apple.com>
3760 * wtf/CheckedArithmetic.h:
3761 (WTF::Checked::Checked):
3762 (WTF::Checked::operator=):
3764 2011-08-31 Oliver Hunt <oliver@apple.com>
3766 fast/regex/overflow.html asserts in debug builds
3767 https://bugs.webkit.org/show_bug.cgi?id=67326
3769 Reviewed by Gavin Barraclough.
3771 The deliberate overflows in these expressions don't interact nicely
3772 with Checked<32bit-type> so we just bump up to Checked<int64_t> for the
3773 intermediate calculations.
3776 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
3777 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
3779 2011-08-31 Jeff Miller <jeffm@apple.com>
3781 REGRESSION(92210): AVFoundation media engine is disabled on OS X
3782 https://bugs.webkit.org/show_bug.cgi?id=67316
3784 Move the definition of WTF_USE_AVFOUNDATION on the Mac back to JavaScriptCore/wtf/Platform.h,
3785 since WebKit2 doesn't have access to WebCore/config.h on this platform. This reverts the
3786 changes that were made in r92210.
3788 Reviewed by Darin Adler.
3790 * wtf/Platform.h: Added definition of WTF_USE_AVFOUNDATION on the Mac.
3792 2011-08-31 Peter Beverloo <peter@chromium.org>
3794 Add Android's platform specification and the right atomic functions.
3795 https://bugs.webkit.org/show_bug.cgi?id=66687
3797 Reviewed by Adam Barth.
3800 (WTF::atomicIncrement):
3801 (WTF::atomicDecrement):
3804 2011-08-30 Oliver Hunt <oliver@apple.com>
3806 Add support for checked arithmetic
3807 https://bugs.webkit.org/show_bug.cgi?id=67095
3809 Reviewed by Sam Weinig.
3811 Add a checked arithmetic class Checked<T> that provides overflow-safe
3812 arithmetic over all integral types. Checked<T> supports addition, subtraction
3813 and multiplication, along with "bool" conversions and equality operators.
3815 Checked<> can be used in either CRASH() on overflow or delayed failure modes,
3816 although the default is to CRASH().
3818 To ensure the code is actually in use (rather than checking in dead code) I've
3819 made a couple of properties in YARR use Checked<int> and Checked<unsigned>
3820 instead of raw value arithmetic. This has resulted in a moderate set of changes,
3821 to YARR - mostly adding .get() calls, but a couple of casts from unsigned long
3822 to unsigned for some uses of sizeof, as Checked<> currently does not support
3823 mixed signed-ness of types wider that 32 bits.
3825 Happily the increased type safety of Checked<> means that it's not possible to
3826 accidentally assign away precision, nor accidentally call integer overload of
3827 a function instead of the bool version.
3829 No measurable regression in performance, and SunSpider claims this patch to be
3830 a progression of 0.3%.
3832 * GNUmakefile.list.am:
3833 * JavaScriptCore.gypi:
3834 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3835 * JavaScriptCore.xcodeproj/project.pbxproj:
3836 * wtf/CheckedArithmetic.h: Added.
3837 (WTF::CrashOnOverflow::overflowed):
3838 (WTF::CrashOnOverflow::clearOverflow):
3839 (WTF::CrashOnOverflow::hasOverflowed):
3840 (WTF::RecordOverflow::RecordOverflow):
3841 (WTF::RecordOverflow::overflowed):
3842 (WTF::RecordOverflow::clearOverflow):
3843 (WTF::RecordOverflow::hasOverflowed):
3847 (WTF::safeMultiply):
3849 (WTF::workAroundClangBug):
3850 (WTF::Checked::Checked):
3851 (WTF::Checked::operator=):
3852 (WTF::Checked::operator++):
3853 (WTF::Checked::operator--):
3854 (WTF::Checked::operator!):
3855 (WTF::Checked::operator UnspecifiedBoolType*):
3856 (WTF::Checked::get):
3857 (WTF::Checked::operator+=):
3858 (WTF::Checked::operator-=):
3859 (WTF::Checked::operator*=):
3860 (WTF::Checked::operator==):
3861 (WTF::Checked::operator!=):
3865 * yarr/YarrInterpreter.cpp:
3866 (JSC::Yarr::ByteCompiler::atomPatternCharacter):
3867 (JSC::Yarr::ByteCompiler::atomCharacterClass):
3868 (JSC::Yarr::ByteCompiler::atomBackReference):
3869 (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
3870 (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
3871 (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
3872 (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
3873 * yarr/YarrInterpreter.h:
3874 (JSC::Yarr::ByteTerm::ByteTerm):
3875 (JSC::Yarr::ByteTerm::CheckInput):
3876 (JSC::Yarr::ByteTerm::UncheckInput):
3878 (JSC::Yarr::YarrGenerator::generateAssertionEOL):
3879 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
3880 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
3881 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
3882 (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
3883 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
3884 (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
3885 (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
3886 * yarr/YarrPattern.cpp:
3887 (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
3888 * yarr/YarrPattern.h:
3890 2011-08-31 Andrei Popescu <andreip@google.com>
3892 Investigate current uses of OS(ANDROID)
3893 https://bugs.webkit.org/show_bug.cgi?id=66761
3895 Unreviewed, build fix for ARM platforms.
3899 2011-08-31 Andrei Popescu <andreip@google.com>
3901 Investigate current uses of OS(ANDROID)
3902 https://bugs.webkit.org/show_bug.cgi?id=66761
3904 Reviewed by Darin Adler.
3906 Remove the last legacy Android code.
3908 No new tests needed as the code wasn't tested in the first place.
3912 * wtf/ThreadingPthreads.cpp:
3913 (WTF::createThreadInternal):
3915 2011-08-30 Aaron Colwell <acolwell@chromium.org>
3917 Add MediaSource API to HTMLMediaElement
3918 https://bugs.webkit.org/show_bug.cgi?id=64731
3920 Reviewed by Eric Carlson.
3922 * Configurations/FeatureDefines.xcconfig:
3924 2011-08-30 Oliver Hunt <oliver@apple.com>
3926 TypedArrays don't ensure that denormalised values are normalised
3927 https://bugs.webkit.org/show_bug.cgi?id=67178
3929 Reviewed by Gavin Barraclough.
3931 Add a couple of assertions to jsNumber() to ensure that
3932 we block signaling NaNs
3934 * runtime/JSValue.h:
3935 (JSC::jsDoubleNumber):
3938 2011-08-30 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
3940 [Qt] Do not unconditionally use pkg-config in .pro files
3941 https://bugs.webkit.org/show_bug.cgi?id=67055
3943 Reviewed by Andreas Kling.
3945 Original patch from Rohan McGovern <rohan.mcgovern@nokia.com>
3947 Using the first pkg-config in PATH is prone to errors when cross
3948 compiling inside the Qt repository (using Qt's build-system).
3950 This patch protect calls for pkg-config with
3951 !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to
3952 QT_CONFIG by Qt's 'configure' when cross-compiling on systems
3955 The respective change in Qt's configure has been submited already.
3957 No new tests as this is just a build change.
3959 * wtf/wtf.pri: protect pkg-config calls
3961 2011-08-29 Daniel Bates <dbates@webkit.org>
3963 Add HAVE(VASPRINTF) macro to test for vasprintf() support
3964 https://bugs.webkit.org/show_bug.cgi?id=67156
3966 Reviewed by Darin Adler.
3968 Encapsulate testing of vasprintf() support in a HAVE macro
3969 instead of hardcoding the list of supported/unsupported
3970 compilers at the call site.
3974 2011-08-29 Mark Hahnenberg <mhahnenberg@apple.com>
3976 Unzip initialization lists and constructors in JSCell hierarchy (3/7)
3977 https://bugs.webkit.org/show_bug.cgi?id=67064
3979 Reviewed by Darin Adler.
3981 Completed the third level of the refactoring to add finishCreation()
3982 methods to all classes within the JSCell hierarchy with non-trivial
3985 This primarily consists of pushing the calls to finishCreation() down
3986 into the constructors of the subclasses of the second level of the hierarchy
3987 as well as pulling the finishCreation() calls out into the class's corresponding
3988 create() method if it has one. Doing both simultaneously allows us to
3989 maintain the invariant that the finishCreation() method chain is called exactly
3990 once during the creation of an object, since calling it any other number of
3991 times (0, 2, or more) will cause an assertion failure.
3993 * debugger/DebuggerActivation.cpp:
3994 (JSC::DebuggerActivation::DebuggerActivation):
3995 (JSC::DebuggerActivation::finishCreation):
3996 * debugger/DebuggerActivation.h:
3997 (JSC::DebuggerActivation::create):
3998 * runtime/Arguments.h:
3999 (JSC::Arguments::create):
4000 (JSC::Arguments::createNoParameters):
4001 (JSC::Arguments::Arguments):
4002 (JSC::Arguments::finishCreation):
4003 * runtime/ErrorInstance.cpp:
4004 (JSC::ErrorInstance::ErrorInstance):
4005 * runtime/ErrorInstance.h:
4006 (JSC::ErrorInstance::finishCreation):
4007 * runtime/ExceptionHelpers.cpp:
4008 (JSC::InterruptedExecutionError::InterruptedExecutionError):
4009 (JSC::TerminatedExecutionError::TerminatedExecutionError):
4010 * runtime/Executable.cpp:
4011 (JSC::EvalExecutable::EvalExecutable):
4012 (JSC::ProgramExecutable::ProgramExecutable):
4013 (JSC::FunctionExecutable::FunctionExecutable):
4014 Moved the assignment of m_firstLine and m_lastLine into the
4015 FunctionExecutable::finishCreation() method in Executable.h
4016 * runtime/Executable.h:
4017 (JSC::ScriptExecutable::ScriptExecutable):
4018 (JSC::EvalExecutable::create):
4019 (JSC::ProgramExecutable::create):
4020 (JSC::FunctionExecutable::create):
4021 (JSC::FunctionExecutable::finishCreation):
4022 * runtime/JSArray.cpp:
4023 (JSC::JSArray::JSArray):
4024 (JSC::JSArray::finishCreation):
4025 * runtime/JSArray.h:
4026 * runtime/JSByteArray.cpp:
4027 (JSC::JSByteArray::JSByteArray):
4028 * runtime/JSByteArray.h:
4029 (JSC::JSByteArray::finishCreation):
4030 * runtime/JSNotAnObject.h:
4031 (JSC::JSNotAnObject::JSNotAnObject):
4032 * runtime/JSObject.h:
4033 (JSC::JSNonFinalObject::JSNonFinalObject):
4034 * runtime/JSObjectWithGlobalObject.cpp:
4035 (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
4036 (JSC::JSObjectWithGlobalObject::finishCreation):
4037 * runtime/JSObjectWithGlobalObject.h:
4038 * runtime/JSVariableObject.h:
4039 (JSC::JSVariableObject::JSVariableObject):
4040 (JSC::JSVariableObject::finishCreation):
4041 * runtime/JSWrapperObject.h:
4042 (JSC::JSWrapperObject::JSWrapperObject):
4043 * runtime/ObjectPrototype.cpp:
4044 (JSC::ObjectPrototype::ObjectPrototype):
4045 (JSC::ObjectPrototype::finishCreation):
4046 * runtime/ObjectPrototype.h:
4047 * runtime/StrictEvalActivation.cpp:
4048 (JSC::StrictEvalActivation::StrictEvalActivation):
4050 2011-08-29 Andreas Kling <kling@webkit.org>
4052 Unreviewed build fix after r93990.
4056 2011-08-29 Andreas Kling <kling@webkit.org>
4058 Viewing a post on reddit.com wastes a lot of memory on event listeners.
4059 https://bugs.webkit.org/show_bug.cgi?id=67133
4061 Reviewed by Darin Adler.
4063 Add a minimum table size to the HashTraits, instead of having it hard coded.
4064 The default value remains at 64, but can now be specialized.
4066 * runtime/StructureTransitionTable.h:
4068 (WTF::HashTable::shouldShrink):
4070 (WTF::::checkTableConsistencyExceptSize):
4073 2011-08-28 Jonathan Liu <net147@gmail.com>
4075 Fix build error when compiling with MinGW-w64 by disabling JIT
4077 https://bugs.webkit.org/show_bug.cgi?id=61235
4079 Reviewed by Gavin Barraclough.
4081 The fixed mmap executable allocator for JIT on x86_64 requires
4082 sys/mman.h which is not available on Windows.
4086 2011-08-27 Filip Pizlo <fpizlo@apple.com>
4088 JSC::Executable is inconsistent about using weak handle finalizers
4089 and destructors for releasing memory
4090 https://bugs.webkit.org/show_bug.cgi?id=67072
4092 Reviewed by Darin Adler.
4094 Moved more of the destruction of Executable state into the finalizer,
4095 which also resulted in an opportunity to mostly combine this with
4096 discardCode(). This also means that the finalizer is now enabled even
4097 when the JIT is turned off. This is performance neutral on SunSpider,
4100 * runtime/Executable.cpp:
4101 (JSC::ExecutableBase::clearCode):
4102 (JSC::ExecutableFinalizer::finalize):
4103 (JSC::EvalExecutable::clearCode):
4104 (JSC::ProgramExecutable::clearCode):
4105 (JSC::FunctionExecutable::discardCode):
4106 (JSC::FunctionExecutable::clearCode):
4107 * runtime/Executable.h:
4108 (JSC::ExecutableBase::finishCreation):
4110 2011-08-26 Gavin Barraclough <barraclough@apple.com>
4112 DFG JIT - ArithMod may clobber operands.
4113 https://bugs.webkit.org/show_bug.cgi?id=67085
4115 Reviewed by Sam Weinig.
4117 unboxDouble must be called on a temporary.
4119 * dfg/DFGJITCodeGenerator.cpp:
4120 (JSC::DFG::JITCodeGenerator::fillDouble):
4121 * dfg/DFGJITCodeGenerator.h:
4122 (JSC::DFG::JITCodeGenerator::boxDouble):
4123 * dfg/DFGNonSpeculativeJIT.cpp:
4124 (JSC::DFG::NonSpeculativeJIT::compile):
4125 * dfg/DFGSpeculativeJIT.cpp:
4126 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
4128 2011-08-26 Mark Hahnenberg <mhahnenberg@apple.com>
4130 Unzip initialization lists and constructors in JSCell hierarchy (2/7)
4131 https://bugs.webkit.org/show_bug.cgi?id=66957
4133 Reviewed by Darin Adler.
4135 Completed the second level of the refactoring to add finishCreation()
4136 methods to all classes within the JSCell hierarchy with non-trivial
4139 * runtime/Executable.h:
4140 (JSC::ExecutableBase::ExecutableBase):
4141 (JSC::ExecutableBase::create):
4142 (JSC::NativeExecutable::create):
4143 (JSC::NativeExecutable::finishCreation):
4144 (JSC::NativeExecutable::NativeExecutable):
4145 (JSC::ScriptExecutable::ScriptExecutable):
4146 (JSC::ScriptExecutable::finishCreation):
4147 * runtime/GetterSetter.h:
4148 (JSC::GetterSetter::GetterSetter):
4149 (JSC::GetterSetter::create):
4150 * runtime/JSAPIValueWrapper.h:
4151 (JSC::JSAPIValueWrapper::create):
4152 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
4153 * runtime/JSObject.h:
4154 (JSC::JSNonFinalObject::JSNonFinalObject):
4155 (JSC::JSNonFinalObject::finishCreation):
4156 (JSC::JSFinalObject::create):
4157 (JSC::JSFinalObject::finishCreation):
4158 (JSC::JSFinalObject::JSFinalObject):
4159 (JSC::JSObject::JSObject):
4160 * runtime/JSPropertyNameIterator.cpp:
4161 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
4162 (JSC::JSPropertyNameIterator::create):
4163 * runtime/JSPropertyNameIterator.h:
4164 (JSC::JSPropertyNameIterator::create):
4165 * runtime/RegExp.cpp:
4166 (JSC::RegExp::RegExp):
4167 (JSC::RegExp::createWithoutCaching):
4168 * runtime/ScopeChain.h:
4169 (JSC::ScopeChainNode::ScopeChainNode):
4170 (JSC::ScopeChainNode::create):
4171 * runtime/Structure.cpp:
4172 (JSC::Structure::Structure):
4173 * runtime/Structure.h:
4174 (JSC::Structure::create):
4175 (JSC::Structure::finishCreation):
4176 (JSC::Structure::createStructure):
4177 * runtime/StructureChain.cpp:
4178 (JSC::StructureChain::StructureChain):
4179 * runtime/StructureChain.h:
4180 (JSC::StructureChain::create):
4182 2011-08-26 Filip Pizlo <fpizlo@apple.com>
4184 The GC does not have a facility for profiling the kinds of objects
4185 that occupy the heap
4186 https://bugs.webkit.org/show_bug.cgi?id=66849
4188 Reviewed by Geoffrey Garen.
4190 Destructor calls and object scans are now optionally counted, per
4191 vtable. When the heap is destroyed and profiling is enabled, the
4192 counts are dumped, with care taken to print the names of classes
4193 (modulo C++ mangling) sorted in descending commonality.
4195 * GNUmakefile.list.am:
4196 * JavaScriptCore.exp:
4197 * JavaScriptCore.pro:
4198 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4199 * JavaScriptCore.xcodeproj/project.pbxproj:
4201 (JSC::Heap::destroy):
4203 * heap/MarkStack.cpp:
4204 (JSC::SlotVisitor::visitChildren):
4205 (JSC::SlotVisitor::drain):
4207 * heap/MarkedBlock.cpp:
4208 (JSC::MarkedBlock::callDestructor):
4209 * heap/MarkedBlock.h:
4210 * heap/VTableSpectrum.cpp: Added.
4211 (JSC::VTableSpectrum::VTableSpectrum):
4212 (JSC::VTableSpectrum::~VTableSpectrum):
4213 (JSC::VTableSpectrum::countVPtr):
4214 (JSC::VTableSpectrum::count):
4215 (JSC::VTableAndCount::VTableAndCount):
4216 (JSC::VTableAndCount::operator<):
4217 (JSC::VTableSpectrum::dump):
4218 * heap/VTableSpectrum.h: Added.
4221 2011-08-26 Juan C. Montemayor <jmont@apple.com>
4223 Update topCallFrame when calling host functions in the JIT
4224 https://bugs.webkit.org/show_bug.cgi?id=67010
4226 Reviewed by Oliver Hunt.
4228 The topCallFrame is not being updated when a host function is
4229 called by the JIT. This causes problems when trying to create a
4230 stack trace (https://bugs.webkit.org/show_bug.cgi?id=66994).
4232 * jit/JITOpcodes.cpp:
4233 (JSC::JIT::privateCompileCTIMachineTrampolines):
4234 (JSC::JIT::privateCompileCTINativeCall):
4236 2011-08-26 Alexey Proskuryakov <ap@apple.com>
4238 Get rid of frame life support timer
4239 https://bugs.webkit.org/show_bug.cgi?id=66874
4241 Reviewed by Geoff Garen.
4243 * runtime/JSGlobalObject.h:
4244 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4245 globalExec() no longer needs to be virtual, its only override was in JSDOMWindowBase.
4247 2011-08-26 Chao-ying Fu <fu@mips.com>
4249 Fix MIPS patchOffsetGetByIdSlowCaseCall
4250 https://bugs.webkit.org/show_bug.cgi?id=67046
4252 Reviewed by Gavin Barraclough.
4256 2011-08-25 Mark Hahnenberg <mhahnenberg@apple.com>
4258 Fixing broken build due to unused variables in release mode
4259 https://bugs.webkit.org/show_bug.cgi?id=67004
4261 Unreviewed, release build fix.
4263 Fixing broken build due to unused variables in ASSERTs in release build.
4265 * runtime/JSObject.h:
4266 (JSC::JSObject::finishCreation):
4267 * runtime/JSString.h:
4268 (JSC::RopeBuilder::finishCreation):
4269 * runtime/ScopeChain.h:
4270 (JSC::ScopeChainNode::finishCreation):
4272 2011-08-25 Mark Hahnenberg <mhahnenberg@apple.com>
4274 Unzip initialization lists and constructors in JSCell hierarchy (1/7)
4275 https://bugs.webkit.org/show_bug.cgi?id=66827
4277 Reviewed by Geoffrey Garen.
4279 Added finishCreation() methods to all immediately subclasses of JSCell with
4280 non-empty constructors. Part of a larger refactoring to "unzip" initialization
4281 lists and constructor bodies. Also renamed JSCell's constructorBody() method
4282 to finishCreation().
4284 * runtime/Executable.h:
4285 (JSC::ExecutableBase::ExecutableBase):
4286 (JSC::ExecutableBase::constructorBody):
4287 * runtime/GetterSetter.h:
4288 (JSC::GetterSetter::GetterSetter):
4289 * runtime/JSAPIValueWrapper.h:
4290 (JSC::JSAPIValueWrapper::constructorBody):
4291 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
4293 (JSC::JSCell::JSCell::JSCell):
4294 (JSC::JSCell::JSCell::constructorBody):
4295 * runtime/JSObject.h:
4296 (JSC::JSObject::constructorBody):
4297 (JSC::JSObject::JSObject):
4298 * runtime/JSPropertyNameIterator.h:
4299 (JSC::JSPropertyNameIterator::constructorBody):
4300 * runtime/JSString.h:
4301 (JSC::RopeBuilder::JSString):
4302 (JSC::RopeBuilder::constructorBody):
4303 * runtime/RegExp.cpp:
4304 (JSC::RegExp::RegExp):
4305 (JSC::RegExp::constructorBody):
4307 * runtime/ScopeChain.h:
4308 (JSC::ScopeChainNode::ScopeChainNode):
4309 (JSC::ScopeChainNode::constructorBody):
4310 * runtime/Structure.cpp:
4311 (JSC::Structure::Structure):
4312 * runtime/StructureChain.cpp:
4313 (JSC::StructureChain::StructureChain):
4314 * runtime/StructureChain.h:
4315 (JSC::StructureChain::create):
4316 (JSC::StructureChain::constructorBody):
4318 2011-08-25 Gabor Loki <loki@webkit.org>
4320 REGRESSION(r93755): It made 14 jsc test and ~500 layout test fail on Qt-ARM bot
4321 https://bugs.webkit.org/show_bug.cgi?id=66956
4323 Rebaseline constants for patching GetByIdSlowCaseCall on ARM.
4325 Reviewed by Oliver Hunt.
4329 2011-08-24 Juan C. Montemayor <jmont@apple.com>
4331 Keep track of topCallFrame for Stack traces
4332 https://bugs.webkit.org/show_bug.cgi?id=66571
4334 Reviewed by Geoffrey Garen.
4336 This patch adds a TopCallFrame to JSC in order to have that information
4337 when an error is thrown to create a stack trace. The TopCallFrame is
4338 updated throughout select points in the Interpreter and the JSC.
4340 * interpreter/Interpreter.cpp:
4341 (JSC::Interpreter::unwindCallFrame):
4342 (JSC::Interpreter::throwException):
4343 (JSC::Interpreter::execute):
4344 (JSC::Interpreter::executeCall):
4345 (JSC::Interpreter::executeConstruct):
4346 (JSC::Interpreter::privateExecute):
4347 * interpreter/Interpreter.h:
4348 (JSC::TopCallFrameSetter::TopCallFrameSetter):
4349 (JSC::TopCallFrameSetter::~TopCallFrameSetter):
4351 * jit/JITInlineMethods.h:
4352 (JSC::JIT::updateTopCallFrame):
4353 * jit/JITStubCall.h:
4354 (JSC::JITStubCall::call):
4356 (JSC::throwExceptionFromOpCall):
4357 (JSC::DEFINE_STUB_FUNCTION):
4358 (JSC::arityCheckFor):
4359 * runtime/JSGlobalData.cpp:
4360 (JSC::JSGlobalData::JSGlobalData):
4361 * runtime/JSGlobalData.h:
4363 2011-08-24 Filip Pizlo <fpizlo@apple.com>
4365 ErrorInstance::create sometimes has two heap object constructions
4367 https://bugs.webkit.org/show_bug.cgi?id=66845
4369 Reviewed by Darin Adler.
4371 The fix is simple since there is already a second create() method
4372 that takes a UString.
4374 * runtime/ErrorInstance.cpp:
4375 (JSC::ErrorInstance::create):
4377 2011-08-24 Filip Pizlo <fpizlo@apple.com>
4379 There is no facility for profiling how the write barrier is used
4380 https://bugs.webkit.org/show_bug.cgi?id=66747
4382 Reviewed by Geoffrey Garen.
4384 Added facilities for the JIT to specify the kind of write barrier
4385 being executed. Added code for profiling the number of each kind
4386 of barrier encountered.
4388 * GNUmakefile.list.am:
4389 * JavaScriptCore.exp:
4390 * JavaScriptCore.pro:
4391 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4392 * JavaScriptCore.xcodeproj/project.pbxproj:
4393 * dfg/DFGJITCodeGenerator.cpp:
4394 (JSC::DFG::JITCodeGenerator::writeBarrier):
4395 (JSC::DFG::JITCodeGenerator::cachedPutById):
4396 * dfg/DFGJITCodeGenerator.h:
4397 * dfg/DFGJITCompiler.cpp:
4398 (JSC::DFG::JITCompiler::emitCount):
4399 * dfg/DFGJITCompiler.h:
4400 (JSC::DFG::JITCompiler::emitCount):
4401 * dfg/DFGNonSpeculativeJIT.cpp:
4402 (JSC::DFG::NonSpeculativeJIT::compile):
4403 * dfg/DFGRepatch.cpp:
4404 (JSC::DFG::tryCachePutByID):
4405 * dfg/DFGSpeculativeJIT.cpp:
4406 (JSC::DFG::SpeculativeJIT::compile):
4408 (JSC::Heap::writeBarrier):
4409 * heap/WriteBarrierSupport.cpp: Added.
4410 (JSC::WriteBarrierCounters::initialize):
4411 * heap/WriteBarrierSupport.h: Added.
4412 (JSC::WriteBarrierCounters::WriteBarrierCounters):
4413 (JSC::WriteBarrierCounters::jitCounterFor):
4414 (JSC::WriteBarrierCounters::countWriteBarrier):
4416 * jit/JITPropertyAccess.cpp:
4417 (JSC::JIT::emit_op_put_by_id):
4418 (JSC::JIT::privateCompilePutByIdTransition):
4419 (JSC::JIT::emit_op_put_scoped_var):
4420 (JSC::JIT::emit_op_put_global_var):
4421 (JSC::JIT::emitWriteBarrier):
4422 * jit/JITPropertyAccess32_64.cpp:
4423 (JSC::JIT::emit_op_put_by_val):
4424 (JSC::JIT::emit_op_put_by_id):
4425 (JSC::JIT::privateCompilePutByIdTransition):
4426 (JSC::JIT::emit_op_put_scoped_var):
4427 (JSC::JIT::emit_op_put_global_var):
4428 (JSC::JIT::emitWriteBarrier):
4429 * runtime/InitializeThreading.cpp:
4430 (JSC::initializeThreadingOnce):
4431 * runtime/WriteBarrier.h:
4432 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
4434 2011-08-23 Mark Hahnenberg <mhahnenberg@apple.com>
4436 Add checks to ensure allocation does not take place during initialization of GC-managed objects
4437 https://bugs.webkit.org/show_bug.cgi?id=65288
4439 Reviewed by Darin Adler.
4441 Adding the new validation functionality. In its current state, it will performs checks,
4442 but they don't fail unless you do allocation in the arguments to the parent constructor in the
4443 initialization list of a class. The allocateCell() method turns on the global flag disallowing any new
4444 allocations, and the constructorBody() method in JSCell turns it off. This way, allocation is still
4445 allowed in constructor bodies while other refactoring efforts continue.
4448 (JSC::JSCell::JSCell::constructorBody):
4449 (JSC::JSCell::JSCell::JSCell):
4450 (JSC::JSCell::allocateCell):
4451 * runtime/JSGlobalData.cpp:
4452 (JSC::JSGlobalData::JSGlobalData):
4453 * runtime/JSGlobalData.h:
4454 (JSC::JSGlobalData::isInitializingObject):
4455 (JSC::JSGlobalData::setInitializingObject):
4456 * runtime/StringObjectThatMasqueradesAsUndefined.h:
4457 (JSC::StringObjectThatMasqueradesAsUndefined::create):
4459 2011-08-23 Gavin Barraclough <barraclough@apple.com>
4461 https://bugs.webkit.org/show_bug.cgi?id=55347
4462 "name" and "message" enumerable on *Error.prototype
4464 Reviewed by Sam Weinig.
4466 The default value of a NativeErrorPrototype's message
4467 property is "", not the name of the error.
4469 * runtime/NativeErrorConstructor.cpp:
4470 (JSC::NativeErrorConstructor::NativeErrorConstructor):
4471 * runtime/NativeErrorConstructor.h:
4472 (JSC::NativeErrorConstructor::create):
4473 (JSC::NativeErrorConstructor::constructorBody):
4474 * runtime/NativeErrorPrototype.cpp:
4475 (JSC::NativeErrorPrototype::NativeErrorPrototype):
4476 (JSC::NativeErrorPrototype::constructorBody):
4477 * runtime/NativeErrorPrototype.h:
4478 (JSC::NativeErrorPrototype::create):
4479 * runtime/StringPrototype.cpp:
4480 (JSC::StringPrototype::StringPrototype):
4481 * runtime/StringPrototype.h:
4482 (JSC::StringPrototype::create):
4484 2011-08-23 Steve Block <steveblock@google.com>
4486 Remove last occurrences of PLATFORM(ANDROID)
4487 https://bugs.webkit.org/show_bug.cgi?id=66763
4489 Reviewed by Tony Gentilcore.
4493 2011-08-23 Steve Block <steveblock@google.com>
4495 Remove all mention of removed Android files from build scripts
4496 https://bugs.webkit.org/show_bug.cgi?id=66755
4498 Reviewed by Tony Gentilcore.
4500 * JavaScriptCore.gyp/JavaScriptCore.gyp:
4501 * JavaScriptCore.gypi:
4502 * gyp/JavaScriptCore.gyp:
4504 2011-08-23 Adam Barth <abarth@webkit.org>
4506 Remove WebCore/editing/android and other Android-specific directories
4507 https://bugs.webkit.org/show_bug.cgi?id=66739
4509 Reviewed by Steve Block.
4511 Now that Android shares more code with Chromium, we don't need these
4512 Android-specific files.
4514 * wtf/android: Removed.
4515 * wtf/android/AndroidThreading.h: Removed.
4516 * wtf/android/MainThreadAndroid.cpp: Removed.
4518 2011-08-23 Ilya Tikhonovsky <loislo@chromium.org>
4520 Unreviewed build fix for compile error on Windows for r93560.
4522 * runtime/SamplingCounter.h:
4524 2011-08-22 Filip Pizlo <fpizlo@apple.com>
4526 Sampling counter support is in the bytecode directory
4527 https://bugs.webkit.org/show_bug.cgi?id=66724
4529 Reviewed by Darin Adler.
4531 Moved SamplingCounter to a separate header in runtime/.
4533 * GNUmakefile.list.am:
4534 * JavaScriptCore.pro:
4535 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4536 * JavaScriptCore.xcodeproj/project.pbxproj:
4537 * bytecode/SamplingTool.cpp:
4538 * bytecode/SamplingTool.h:
4539 * runtime/SamplingCounter.cpp: Added.
4540 (JSC::AbstractSamplingCounter::dump):
4541 * runtime/SamplingCounter.h: Added.
4542 (JSC::AbstractSamplingCounter::count):
4543 (JSC::AbstractSamplingCounter::addressOfCounter):
4544 (JSC::AbstractSamplingCounter::init):
4545 (JSC::SamplingCounter::SamplingCounter):
4546 (JSC::GlobalSamplingCounter::name):
4547 (JSC::DeletableSamplingCounter::DeletableSamplingCounter):
4548 (JSC::DeletableSamplingCounter::~DeletableSamplingCounter):
4550 2011-08-21 Martin Robinson <mrobinson@igalia.com>
4552 Fix 'make dist' for WebKitGTK+.
4554 * GNUmakefile.list.am: Add a missing header to the sources list.
4556 2011-08-20 Filip Pizlo <fpizlo@apple.com>
4558 JavaScriptCore bytecompiler does not compute scope depth correctly
4559 in the case of constant declarations
4560 https://bugs.webkit.org/show_bug.cgi?id=66572
4562 Reviewed by Oliver Hunt.
4564 Changed the handling of const to add the dynamic scope depth.
4566 * bytecompiler/NodesCodegen.cpp:
4567 (JSC::ConstDeclNode::emitCodeSingle):
4569 2011-08-19 Daniel Bates <dbates@webkit.org>
4571 Only #include <signal.h> and require SA_RESTART when building with JSC_MULTIPLE_THREADS
4572 https://bugs.webkit.org/show_bug.cgi?id=66617
4574 Both <signal.h> and SA_RESTART usage are guarded behind ENABLE(JSC_MULTIPLE_THREADS).
4575 But we cause a compile error if the platform doesn't support SA_RESTART regardless of
4576 whether JSC_MULTIPLE_THREADS is enabled for the port. Instead, we shouldn't require
4577 SA_RESTART support unless we are building with JSC_MULTIPLE_THREADS enabled.
4579 Reviewed by Antonio Gomes.
4581 * heap/MachineStackMarker.cpp:
4583 2011-08-19 Filip Pizlo <fpizlo@apple.com>
4585 The JSC JIT currently has no facility to profile and report
4587 https://bugs.webkit.org/show_bug.cgi?id=65901
4589 Reviewed by Gavin Barraclough.
4591 Added the ability to profile the values seen at function calls (both
4592 arguments and results) and heap loads. This is done with emphasis
4593 on performance. A value profiling site consists of: add, and,
4594 move, and store; no branching is necessary. Each value profiling
4595 site (called a ValueProfile) has a ring buffer of 8 recently-seen
4596 values. ValueProfiles are stored in the CodeBlock; there will be
4597 one for each argument (excluding this) and each heap load or callsite.
4598 Each time a value profiling site executes, it stores the value into
4599 a pseudo-random element in the ValueProfile buffer. The point is
4600 that for frequently executed code, we will have 8 somewhat recent
4601 values in the buffer and will be able to not only figure out what
4602 type it is, but also to be able to reason about the actual values
4603 if we wish to do so.
4605 This feature is currently disabled by default. When enabled, it
4606 results in a 3.7% slow-down on SunSpider.
4608 * JavaScriptCore.xcodeproj/project.pbxproj:
4609 * bytecode/CodeBlock.cpp:
4610 (JSC::CodeBlock::~CodeBlock):
4611 * bytecode/CodeBlock.h:
4612 (JSC::CodeBlock::addValueProfile):
4613 (JSC::CodeBlock::numberOfValueProfiles):
4614 (JSC::CodeBlock::valueProfile):
4615 (JSC::CodeBlock::valueProfileForBytecodeOffset):
4616 * bytecode/ValueProfile.h: Added.
4617 (JSC::ValueProfile::ValueProfile):
4618 (JSC::ValueProfile::numberOfSamples):
4619 (JSC::ValueProfile::computeProbability):
4620 (JSC::ValueProfile::numberOfInt32s):
4621 (JSC::ValueProfile::numberOfDoubles):
4622 (JSC::ValueProfile::numberOfCells):
4623 (JSC::ValueProfile::probabilityOfInt32):
4624 (JSC::ValueProfile::probabilityOfDouble):
4625 (JSC::ValueProfile::probabilityOfCell):
4626 (JSC::getValueProfileBytecodeOffset):
4628 (JSC::JIT::privateCompileSlowCases):
4629 (JSC::JIT::privateCompile):
4631 (JSC::JIT::emitValueProfilingSite):
4633 (JSC::JIT::emit_op_call_put_result):
4634 * jit/JITInlineMethods.h:
4635 (JSC::JIT::emitValueProfilingSite):
4636 * jit/JITPropertyAccess.cpp:
4637 (JSC::JIT::emit_op_get_by_val):
4638 (JSC::JIT::emitSlow_op_get_by_val):
4639 (JSC::JIT::emit_op_method_check):
4640 (JSC::JIT::emit_op_get_by_id):
4641 (JSC::JIT::emitSlow_op_get_by_id):
4642 * jit/JSInterfaceJIT.h:
4644 * wtf/StdLibExtras.h:
4645 (WTF::binarySearch):
4646 (WTF::genericBinarySearch):
4648 2011-08-19 Daniel Bates <dbates@webkit.org>
4650 Don't include DisallowCType.h when building on QNX
4651 https://bugs.webkit.org/show_bug.cgi?id=66616
4653 Reviewed by Antonio Gomes.
4657 2011-08-19 Daniel Bates <dbates@webkit.org>
4659 Implement ExecutableAllocator::cacheFlush() for QNX
4660 https://bugs.webkit.org/show_bug.cgi?id=66611
4662 Reviewed by Antonio Gomes.
4664 * jit/ExecutableAllocator.h:
4665 (JSC::ExecutableAllocator::cacheFlush):
4667 2011-08-19 Daniel Bates <dbates@webkit.org>
4669 Implement WTF::atomic{Increment, Decrement}() for QNX
4670 https://bugs.webkit.org/show_bug.cgi?id=66605
4672 Reviewed by Darin Adler.
4675 (WTF::atomicIncrement):
4676 (WTF::atomicDecrement):
4678 2011-08-19 Beth Dakin <bdakin@apple.com>
4680 https://bugs.webkit.org/show_bug.cgi?id=66590
4681 Re-name scrollbar painter types
4683 Reviewed by Sam Weinig.
4685 WTF_USE_WK_SCROLLBAR_PAINTER is now WTF_USE_SCROLLBAR_PAINTER since WK no longer
4689 2011-08-18 Mark Hahnenberg <mhahnenberg@apple.com>
4691 Move allocation in constructors into separate constructorBody() methods
4692 https://bugs.webkit.org/show_bug.cgi?id=66265
4694 Reviewed by Oliver Hunt.
4696 Refactoring to put all allocations that need to be done after the object's
4697 initialization list has executed but before the object is ready for use
4698 into a separate constructorBody() method. This method is still called by the constructor,
4699 so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring.
4701 * JavaScriptCore.exp:
4702 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4704 (GlobalObject::constructorBody):
4705 (GlobalObject::GlobalObject):
4706 * runtime/ErrorInstance.cpp:
4707 (JSC::ErrorInstance::ErrorInstance):
4708 * runtime/ErrorInstance.h:
4709 (JSC::ErrorInstance::constructorBody):
4710 * runtime/ErrorPrototype.cpp:
4711 (JSC::ErrorPrototype::ErrorPrototype):
4712 (JSC::ErrorPrototype::constructorBody):
4713 * runtime/ErrorPrototype.h:
4714 * runtime/Executable.cpp:
4715 (JSC::FunctionExecutable::FunctionExecutable):
4716 * runtime/Executable.h:
4717 (JSC::FunctionExecutable::constructorBody):
4718 * runtime/InternalFunction.cpp:
4719 (JSC::InternalFunction::InternalFunction):
4720 * runtime/InternalFunction.h:
4721 (JSC::InternalFunction::constructorBody):
4722 * runtime/JSByteArray.cpp:
4723 (JSC::JSByteArray::JSByteArray):
4724 * runtime/JSByteArray.h:
4725 (JSC::JSByteArray::constructorBody):
4726 * runtime/JSFunction.cpp:
4727 (JSC::JSFunction::JSFunction):
4728 (JSC::JSFunction::constructorBody):
4729 * runtime/JSFunction.h:
4730 * runtime/JSGlobalObject.h:
4731 (JSC::JSGlobalObject::JSGlobalObject):
4732 (JSC::JSGlobalObject::constructorBody):
4733 * runtime/JSPropertyNameIterator.cpp:
4734 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
4735 * runtime/JSPropertyNameIterator.h:
4736 (JSC::JSPropertyNameIterator::constructorBody):
4737 * runtime/JSString.h:
4738 (JSC::RopeBuilder::JSString):
4739 (JSC::RopeBuilder::constructorBody):
4740 * runtime/NativeErrorConstructor.cpp:
4741 (JSC::NativeErrorConstructor::NativeErrorConstructor):
4742 * runtime/NativeErrorConstructor.h:
4743 (JSC::NativeErrorConstructor::constructorBody):
4744 * runtime/NativeErrorPrototype.cpp:
4745 (JSC::NativeErrorPrototype::NativeErrorPrototype):
4746 (JSC::NativeErrorPrototype::constructorBody):
4747 * runtime/NativeErrorPrototype.h:
4748 * runtime/StringObject.cpp:
4749 * runtime/StringObject.h:
4750 (JSC::StringObject::create):
4751 * runtime/StringObjectThatMasqueradesAsUndefined.h:
4752 (JSC::StringObjectThatMasqueradesAsUndefined::create):
4753 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
4754 * runtime/StringPrototype.cpp:
4755 (JSC::StringPrototype::StringPrototype):
4756 * runtime/StringPrototype.h:
4757 (JSC::StringPrototype::create):
4759 2011-08-10 Filip Pizlo <fpizlo@apple.com>
4761 DFG non-speculative JIT does not inline the double case of ValueAdd
4762 https://bugs.webkit.org/show_bug.cgi?id=66025
4764 Reviewed by Gavin Barraclough.
4766 This is a 1.3% win on Kraken overall, with >=8% speed-ups on a few
4767 benchmarks (imaging-darkroom, stanford-crypto-pbkdf2,
4768 stanford-crypto-sha256-iterative). It looks like it might have
4769 a speed-up in SunSpider (though not statistically significant or
4770 particularly reproducible) and a slight slow-down in V8 (0.14%,
4771 not statistically significant). It does slow down v8-crypto by
4774 * dfg/DFGJITCodeGenerator.cpp:
4775 (JSC::DFG::JITCodeGenerator::isKnownInteger):
4776 (JSC::DFG::JITCodeGenerator::isKnownNumeric):
4777 * dfg/DFGNonSpeculativeJIT.cpp:
4778 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
4779 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
4780 * dfg/DFGOperations.cpp:
4782 2011-08-18 Filip Pizlo <fpizlo@apple.com>
4784 [jsfunfuzz] DFG speculative JIT does divide-by-zero checks incorrectly
4785 https://bugs.webkit.org/show_bug.cgi?id=66426
4787 Reviewed by Oliver Hunt.
4789 Changed the branchTestPtr to branchTest32.
4791 * dfg/DFGSpeculativeJIT.cpp:
4792 (JSC::DFG::SpeculativeJIT::compile):
4794 2011-08-17 Thouraya ANDOLSI <thouraya.andolsi@st.com>
4796 https://bugs.webkit.org/show_bug.cgi?id=66379
4797 implements load32WithCompactAddressOffsetPatch function
4798 and fixes store32 and moveWithPatch functions for SH4 platforms.
4800 Reviewed by Gavin Barraclough.
4802 * assembler/MacroAssemblerSH4.h:
4803 (JSC::MacroAssemblerSH4::rshift32):
4804 (JSC::MacroAssemblerSH4::store32):
4805 (JSC::MacroAssemblerSH4::load32WithCompactAddressOffsetPatch):
4806 (JSC::MacroAssemblerSH4::moveWithPatch):
4807 * assembler/SH4Assembler.h:
4808 (JSC::SH4Assembler::movlMemRegCompact):
4809 (JSC::SH4Assembler::readPointer):
4810 (JSC::SH4Assembler::repatchCompact):
4813 2011-08-17 Filip Pizlo <fpizlo@apple.com>
4815 JSC verbose debugging output sometimes doesn't work as expected.
4816 https://bugs.webkit.org/show_bug.cgi?id=66107
4818 Reviewed by Gavin Barraclough.
4820 Hardened the CodeBlock::dump() code so that it no longer crashes. Improved
4821 the DFG verbose code so that it prints slightly more useful information.
4823 * assembler/LinkBuffer.h:
4824 (JSC::LinkBuffer::debugSize):
4825 * bytecode/CodeBlock.cpp:
4826 (JSC::valueToSourceString):
4827 (JSC::CodeBlock::dump):
4828 * bytecode/CodeBlock.h:
4829 (JSC::CodeBlock::numberOfRegExps):
4830 * dfg/DFGJITCompiler.cpp:
4831 (JSC::DFG::JITCompiler::link):
4833 2011-08-16 Michael Saboff <msaboff@apple.com>
4835 Crash in Structure::visitChildren running iAd.js regression test suite under memory pressure
4836 https://bugs.webkit.org/show_bug.cgi?id=66351
4838 JIT::privateCompilePutByIdTransition expects that regT0 and regT1
4839 have the basePayload and baseTag respectively. In some cases,
4840 we may get to this generated code with one or both of these
4841 registers trash. One know case is that regT0 on ARM may be
4842 trashed as regT0 (r0) is also arg0 and can be overrun with sp due
4843 to calls to JIT::restoreReturnAddress(). This patch uses the
4844 values on the stack. A longer term solution is to work out all
4845 cases so that the register entry assumptions can assured.
4847 While fixing this, also determined that the additional stack offset
4848 of sizeof(void*) is not needed for ARM.
4850 Reviewed by Gavin Barraclough.
4852 * jit/JITPropertyAccess32_64.cpp:
4853 (JSC::JIT::privateCompilePutByIdTransition):
4855 2011-08-15 Gavin Barraclough <barraclough@apple.com>
4857 https://bugs.webkit.org/show_bug.cgi?id=66263
4858 DFG JIT does not always zero extend boolean result of DFG operations
4860 Reviewed by Sam Weinig.
4862 * dfg/DFGOperations.cpp:
4863 * dfg/DFGOperations.h:
4864 - Change bool return values to a 64-bit type.
4866 2011-08-15 Gavin Barraclough <barraclough@apple.com>
4868 Crash accessing static property on sealed object
4869 https://bugs.webkit.org/show_bug.cgi?id=66242
4871 Reviewed by Sam Weinig.
4873 * runtime/JSObject.h:
4874 (JSC::JSObject::putDirectInternal):
4875 - should only check isExtensible if checkReadOnly.
4877 2011-08-15 Sam Weinig <sam@webkit.org>
4879 Fix release build when building with Clang.
4881 Reviewed by Anders Carlsson.
4883 * runtime/Identifier.cpp:
4884 (JSC::Identifier::checkCurrentIdentifierTable):
4885 Add NO_RETURN_DUE_TO_CRASH.
4887 2011-08-15 Oliver Varga <Varga.Oliver@stud.u-szeged.hu>
4889 Reviewed by Nikolas Zimmermann.
4891 Speed up SVGSMILElement::findInstanceTime.
4892 https://bugs.webkit.org/show_bug.cgi?id=61025
4894 Add a new parameter to StdlibExtras.h::binarySerarch function
4895 to also handle cases when the array does not contain the key value.
4896 This is needed for an svg function.
4898 * wtf/StdLibExtras.h:
4899 (WTF::binarySearch):
4901 2011-08-13 Sam Weinig <sam@webkit.org>
4903 Add back 0xbbadbeef to CRASH to allow for old habits
4904 https://bugs.webkit.org/show_bug.cgi?id=66190
4906 Reviewed by David Kilzer.
4909 Add back the assignment to the memory address 0xbbadbeef in the CRASH
4910 macro, as it does not cause issue in the clang static analyzer and many
4911 people use its presence in crash reports to easily identify ASSERTs.
4913 2011-08-13 Sam Weinig <sam@webkit.org>
4915 Fix a bunch of minor bugs caught by the clang static analyzer in JavaScriptCore
4916 https://bugs.webkit.org/show_bug.cgi?id=66182
4918 Reviewed by Dan Bernstein.
4920 Fixes 10 warnings in JavaScriptCore and 2 in testapi.
4922 * API/tests/testapi.c:
4924 Remove dead variables.
4927 (JSC::DFG::Graph::dump):
4928 Initialize hasPrinted and silence an unused warning by casting to void (Ok here
4929 since it is debug code and I want to keep it clear that if other cases are added,
4930 the hasPrinted flag would be needed).
4934 The variable "de" in the else block is always zero, so there is no reason to
4937 2011-08-12 Sam Weinig <sam@webkit.org>
4939 Use __builtin_trap() for CRASH when building with clang
4940 https://bugs.webkit.org/show_bug.cgi?id=66152
4942 Reviewed by Anders Carlsson.
4945 Add Clang specific CRASH macro that calls __builtin_trap() instead
4946 of silly techniques to crash. This allows the static analyzer to understand
4947 that we are intentionally crashing. As a result, we need to mark some functions
4950 Also adds a macros that annotates a function as never returning due to ASSERT or CRASH.
4953 Add COMPILIER(CLANG) and fix some formatting and spelling mistakes.
4955 * wtf/FastMalloc.cpp:
4956 (WTF::Internal::fastMallocMatchFailed):
4957 Add NO_RETURN_DUE_TO_CRASH.
4959 * yarr/YarrParser.h:
4960 (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
4961 (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
4962 Add NO_RETURN_DUE_TO_ASSERT.
4964 2011-08-12 Filip Pizlo <fpizlo@apple.com>
4966 DFG JIT has inconsistent use of boxDouble and unboxDouble,
4967 inconsistent use of assertions regarding doubles, and those
4968 assertions are not turned on in debug builds
4969 https://bugs.webkit.org/show_bug.cgi?id=66160
4971 Reviewed by Gavin Barraclough.
4973 JIT assertions are now turned on in debug builds. JIT
4974 assertions are now used for boxing and unboxing doubles, and boxing
4975 and unboxing no longer involves code duplication.
4977 * dfg/DFGJITCodeGenerator.cpp:
4978 (JSC::DFG::JITCodeGenerator::fillDouble):
4979 * dfg/DFGJITCodeGenerator.h:
4980 (JSC::DFG::JITCodeGenerator::boxDouble):
4981 (JSC::DFG::JITCodeGenerator::unboxDouble):
4982 * dfg/DFGJITCompiler.cpp:
4983 (JSC::DFG::JITCompiler::fillNumericToDouble):
4984 (JSC::DFG::GeneralizedRegister::moveTo):
4985 (JSC::DFG::GeneralizedRegister::swapWith):
4986 * dfg/DFGJITCompiler.h:
4987 (JSC::DFG::JITCompiler::boxDouble):
4988 (JSC::DFG::JITCompiler::unboxDouble):
4990 * dfg/DFGNonSpeculativeJIT.cpp:
4991 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
4992 (JSC::DFG::NonSpeculativeJIT::compile):
4993 * dfg/DFGSpeculativeJIT.cpp:
4994 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
4995 (JSC::DFG::SpeculativeJIT::convertToDouble):
4997 2011-08-12 Mark Rowe <mrowe@apple.com>
4999 Be more forward-looking in the choice of compiler.
5001 Rubber-stamped by Jon Honeycutt.
5003 * Configurations/CompilerVersion.xcconfig:
5005 2011-08-12 Kalev Lember <kalevlember@gmail.com>
5007 [GTK] Fix non-pthreads build after r91906.
5008 https://bugs.webkit.org/show_bug.cgi?id=66151
5010 Reviewed by David Levin.
5012 r91906 broke the non-pthreads GTK+ build by including a header which
5013 doesn't exist. Fix it by including DateMath.h instead of DateMap.h.
5015 * wtf/gtk/ThreadingGtk.cpp:
5017 2011-08-12 Mark Rowe <mrowe@apple.com>
5019 Update some configuration settings that were missed back in r92432.
5021 * Configurations/CompilerVersion.xcconfig:
5023 2011-08-12 Filip Pizlo <fpizlo@apple.com>
5025 REGRESSION (r91610?): Bing Maps fail to initialize (InvalidOperation:
5027 https://bugs.webkit.org/show_bug.cgi?id=66038
5029 Reviewed by Gavin Barraclough.
5031 Simplest and lowest-impact fix for the case where the spilled format
5032 of a DFG node differs from the register format: if the format is
5033 converted then indicate that the spilled value is no longer valid
5036 * dfg/DFGGenerationInfo.h:
5037 (JSC::DFG::GenerationInfo::killSpilled):
5038 * dfg/DFGJITCodeGenerator.cpp:
5039 (JSC::DFG::JITCodeGenerator::fillDouble):
5040 * dfg/DFGSpeculativeJIT.cpp:
5041 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
5043 2011-08-12 Sam Weinig <sam@webkit.org>
5045 Move compiler specific macros to their own header
5046 https://bugs.webkit.org/show_bug.cgi?id=66119
5048 Reviewed by Anders Carlsson.
5050 * JavaScriptCore.gypi:
5051 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
5052 * JavaScriptCore.xcodeproj/project.pbxproj:
5053 * wtf/CMakeLists.txt:
5056 * wtf/AlwaysInline.h:
5057 Move the contents of this file (which no longer was just about ALWAYS_INLINE) to
5058 Compiler.h. We can remove this file in a later commit.
5060 * wtf/Compiler.h: Added.
5061 Put all compiler specific checks and features in this file.
5064 Move COMPILER macro and definitions (and the odd WARN_UNUSED_RETURN compiler feature)
5065 to Compiler.h. Include Compiler.h since it is necessary.
5067 2011-08-11 Filip Pizlo <fpizlo@apple.com>
5069 DFG JIT-specific structure stub info code offset fields are signed
5070 8-bit, but it is possible for the offsets to be greater than 127
5071 https://bugs.webkit.org/show_bug.cgi?id=66122
5073 Reviewed by Gavin Barraclough.
5075 * bytecode/StructureStubInfo.h:
5076 * dfg/DFGJITCodeGenerator.cpp:
5077 (JSC::DFG::JITCodeGenerator::cachedGetById):
5078 (JSC::DFG::JITCodeGenerator::cachedPutById):
5080 2011-08-11 Filip Pizlo <fpizlo@apple.com>
5082 DFG JIT speculation failure code sometimes picks the wrong register
5083 as a scratch register.
5084 https://bugs.webkit.org/show_bug.cgi?id=66104
5086 Reviewed by Gavin Barraclough.
5088 Hardened the code with more assertions and fixed the bug. Now a
5089 spilled register is only used for scratch if it also isn't being
5092 * dfg/DFGJITCompiler.cpp:
5093 (JSC::DFG::ShuffledRegister::handleNonCyclingPermutation):
5094 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
5096 2011-08-11 Sheriff Bot <webkit.review.bot@gmail.com>
5098 Unreviewed, rolling out r92880.
5099 http://trac.webkit.org/changeset/92880
5100 https://bugs.webkit.org/show_bug.cgi?id=66123
5102 Breaks compile in VS2010 (Requested by jamesr_ on #webkit).
5106 2011-08-11 Mark Rowe <mrowe@apple.com>
5108 Don't conditionalize the use of -fomit-frame-pointer on compiler version as
5109 all of our supported compilers are now new enough to have the same, sane behavior.
5111 Rubber-stamped by Sam Weinig.
5113 * Configurations/JavaScriptCore.xcconfig:
5115 2011-08-11 Filip Pizlo <fpizlo@apple.com>
5117 DFG JIT verbose mode does not report the generated types of nodes
5118 https://bugs.webkit.org/show_bug.cgi?id=65830
5120 Reviewed by Sam Weinig.
5122 Added code that prints the type selected for each node's result.
5124 * dfg/DFGGenerationInfo.h:
5125 (JSC::DFG::dataFormatToString):
5126 * dfg/DFGNonSpeculativeJIT.cpp:
5127 (JSC::DFG::NonSpeculativeJIT::compile):
5128 * dfg/DFGSpeculativeJIT.cpp:
5129 (JSC::DFG::SpeculativeJIT::compile):
5131 2011-08-11 James Robinson <jamesr@chromium.org>
5133 nullptr can't be used for PassRefPtr
5134 https://bugs.webkit.org/show_bug.cgi?id=66024
5136 Reviewed by Anders Carlsson.
5139 (WTF::PassRefPtr::PassRefPtr):
5141 2011-08-11 Daniel Bates <dbates@rim.com>
5143 Removed unused variable in StackBounds::initialize() to resolve
5144 compiler warning when building on QNX.
5145 https://bugs.webkit.org/show_bug.cgi?id=66072
5147 Reviewed by Antonio Gomes.
5149 * wtf/StackBounds.cpp:
5150 (WTF::StackBounds::initialize):
5152 2011-08-11 Devdatta Deshpande <pwjd73@motorola.com>
5154 Implementation of monotonically increasing clock on GTK
5155 https://bugs.webkit.org/show_bug.cgi?id=62175
5157 Reviewed by Martin Robinson.
5159 * wtf/CurrentTime.cpp:
5160 (WTF::monotonicallyIncreasingTime):
5161 The default implementation of monotonicallyIncreasingTime only
5162 guarantees the result to be non-decreasing.
5163 If the system time is changed to past then default implementation will
5164 still fail and WebCore timers will not fire.
5166 2011-08-10 Geoffrey Garen <ggaren@apple.com>
5168 Removed some incorrect code that was dead.
5170 Reviewed by Oliver Hunt.
5172 clearSingleTransition() wasn't resetting m_data. Luckily,
5173 no one cares, because its caller was unused. Removed both.
5175 * runtime/Structure.cpp:
5176 * runtime/StructureTransitionTable.h:
5177 (JSC::StructureTransitionTable::~StructureTransitionTable):
5179 2011-08-10 Filip Pizlo <fpizlo@apple.com>
5181 REGRESSION(r92670-r92744): WebKit crashes when opening Gmail
5182 https://bugs.webkit.org/show_bug.cgi?id=66010
5184 Reviewed by Oliver Hunt.
5186 Made sure that Construct calls use() on the this argument.
5188 * dfg/DFGJITCodeGenerator.cpp:
5189 (JSC::DFG::JITCodeGenerator::emitCall):
5191 2011-08-10 Mark Hahnenberg <mhahnenberg@apple.com>
5193 JSC should always throw when function arg list is too long
5194 https://bugs.webkit.org/show_bug.cgi?id=65869
5196 Reviewed by Oliver Hunt.
5198 Changed the behavior of the interpreter and JIT to throw an exception
5199 when too many arguments are passed rather than truncating the list. Added
5200 a new method to create a "Too many arguments." exception used by this
5203 * interpreter/Interpreter.cpp:
5204 (JSC::Interpreter::privateExecute):
5206 (JSC::DEFINE_STUB_FUNCTION):
5207 * runtime/ExceptionHelpers.cpp:
5208 (JSC::createTooManyParamsError):
5209 * runtime/ExceptionHelpers.h:
5211 2011-08-10 Oliver Hunt <oliver@apple.com>
5213 Make GC checks more aggressive in release builds
5214 https://bugs.webkit.org/show_bug.cgi?id=66001
5216 Reviewed by Gavin Barraclough.
5218 * heap/HandleHeap.cpp:
5219 (JSC::HandleHeap::visitStrongHandles):
5220 (JSC::HandleHeap::visitWeakHandles):
5221 (JSC::HandleHeap::finalizeWeakHandles):
5222 (JSC::HandleHeap::writeBarrier):
5223 (JSC::HandleHeap::isLiveNode):
5224 (JSC::HandleHeap::isValidWeakNode):
5225 Increase handle heap validation logic, and make some of
5226 the crashes trigger in release builds as well as debug.
5227 * heap/HandleHeap.h:
5228 (JSC::HandleHeap::allocate):
5229 (JSC::HandleHeap::makeWeak):
5231 * runtime/JSGlobalData.cpp:
5232 (WTF::Recompiler::operator()):
5233 * runtime/JSGlobalObject.cpp:
5234 (JSC::JSGlobalObject::visitChildren):
5235 Fix GC bugs found while testing this patch
5237 2011-08-10 Oliver Hunt <oliver@apple.com>
5239 JSEvaluteScript does not return the correct object when given JSONP data
5240 https://bugs.webkit.org/show_bug.cgi?id=66003
5242 Reviewed by Gavin Barraclough.
5244 Make sure we propagate the result of the function call rather than the
5247 * interpreter/Interpreter.cpp:
5248 (JSC::Interpreter::execute):
5250 2011-08-10 Filip Pizlo <fpizlo@apple.com>
5252 DFG JIT heap prediction causes regressions when combined with
5253 aggressive integer prediction
5254 https://bugs.webkit.org/show_bug.cgi?id=65954
5256 Reviewed by Gavin Barraclough.
5258 Disabled heap prediction, but did not remove the capability.
5259 This improves V8 crypto performance by 20%.
5262 (JSC::DFG::Graph::predict):
5264 2011-08-09 Filip Pizlo <fpizlo@apple.com>
5266 DFG JIT does not speculative integers as aggressively as it should
5267 https://bugs.webkit.org/show_bug.cgi?id=65949
5269 Reviewed by Gavin Barraclough.
5271 Added a tree walk to propagate integer predictions through arithmetic
5274 This is a 71% speed-up on Kraken's imaging-gaussian-blur, which
5275 translates to a 19% speed-up on Kraken overall. It's neutral on
5278 * dfg/DFGByteCodeParser.cpp:
5279 (JSC::DFG::ByteCodeParser::predictInt32):
5281 2011-08-09 Filip Pizlo <fpizlo@apple.com>
5283 DFG JIT has no way of propagating predictions to loads and calls
5284 https://bugs.webkit.org/show_bug.cgi?id=65883
5286 Reviewed by Gavin Barraclough.
5288 This introduces the capability to store predictions on graph
5289 nodes. To save space while being somewhat consistent, the
5290 prediction is always stored in the second OpInfo slot (since
5291 a GetById will use the first one for the identifier). This
5292 change is a natural extension of r92593 (global variable
5295 This is a 1.5% win on V8 in the arithmetic mean, and a 0.6%
5296 win on V8 in the geometric mean. It is neutral on SunSpider
5297 and Kraken. Interestingly, on V8 it regresses crypto by 3%
5298 while progressing deltablue and richards by 2.6% and 4.3%,
5301 * dfg/DFGByteCodeParser.cpp:
5302 (JSC::DFG::ByteCodeParser::addToGraph):
5303 (JSC::DFG::ByteCodeParser::addCall):
5304 (JSC::DFG::ByteCodeParser::parseBlock):
5306 (JSC::DFG::Graph::dump):
5308 (JSC::DFG::Graph::predict):
5309 (JSC::DFG::Graph::getPrediction):
5311 (JSC::DFG::isCellPrediction):
5312 (JSC::DFG::isArrayPrediction):
5313 (JSC::DFG::isInt32Prediction):
5314 (JSC::DFG::isDoublePrediction):
5315 (JSC::DFG::isNumberPrediction):
5316 (JSC::DFG::predictionToString):
5317 (JSC::DFG::Node::Node):
5318 (JSC::DFG::Node::hasPrediction):
5319 (JSC::DFG::Node::getPrediction):
5320 (JSC::DFG::Node::predict):
5322 2011-08-09 Filip Pizlo <fpizlo@apple.com>
5324 DFG JIT passes the this argument to constructors even though
5326 https://bugs.webkit.org/show_bug.cgi?id=65943
5328 Reviewed by Gavin Barraclough.
5330 * dfg/DFGJITCodeGenerator.cpp:
5331 (JSC::DFG::JITCodeGenerator::emitCall):
5333 2011-08-09 Chao-ying Fu <fu@mips.com>
5335 Fix one MIPS instruction to call JITStubThunked_##op
5336 https://bugs.webkit.org/show_bug.cgi?id=65942
5338 Reviewed by Gavin Barraclough.
5340 Changed "bal" to "jalr" for a possible processor mode change from
5345 2011-08-09 Filip Pizlo <fpizlo@apple.com>
5347 DFG JIT failure loading web site
5348 https://bugs.webkit.org/show_bug.cgi?id=65930
5350 Reviewed by Oliver Hunt.
5352 Put the use() call after the fpr()/gpr() calls, since doing otherwise
5353 breaks the register allocator.
5355 * dfg/DFGNonSpeculativeJIT.cpp:
5356 (JSC::DFG::NonSpeculativeJIT::compile):
5358 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com>
5360 Add ParentClass typedef in all JSC classes
5361 https://bugs.webkit.org/show_bug.cgi?id=65731
5363 Reviewed by Oliver Hunt.
5365 Just added the Base typedefs in all the classes that are a subclass of JSCell
5366 to point at their parent classes. This is a change to support future changes to the way
5367 constructors and destructors are implemented in JS objects, among other things.
5369 * API/JSCallbackConstructor.h:
5370 * API/JSCallbackFunction.h:
5371 * API/JSCallbackObject.h:
5372 (JSC::JSCallbackObject::createStructure):
5373 (JSC::JSCallbackObject::visitChildren):
5374 * API/JSCallbackObjectFunctions.h:
5375 (JSC::::asCallbackObject):
5376 (JSC::::JSCallbackObject):
5379 (JSC::::getOwnPropertySlot):
5380 (JSC::::getOwnPropertyDescriptor):
5382 (JSC::::deleteProperty):
5383 (JSC::::getConstructData):
5385 (JSC::::hasInstance):
5386 (JSC::::getCallData):
5388 (JSC::::getOwnPropertyNames):
5391 (JSC::::setPrivate):
5392 (JSC::::getPrivate):
5394 (JSC::::getStaticValue):
5395 (JSC::::staticFunctionGetter):
5396 (JSC::::callbackGetter):
5397 * debugger/DebuggerActivation.h:
5399 * runtime/Arguments.h:
5400 * runtime/ArrayConstructor.h:
5401 * runtime/ArrayPrototype.h:
5402 * runtime/BooleanConstructor.h:
5403 * runtime/BooleanObject.h:
5404 * runtime/BooleanPrototype.h:
5405 * runtime/DateConstructor.h:
5406 * runtime/DateInstance.h:
5407 * runtime/DatePrototype.h:
5408 * runtime/Error.cpp:
5409 * runtime/ErrorConstructor.h:
5410 * runtime/ErrorInstance.h:
5411 * runtime/ErrorPrototype.h:
5412 * runtime/ExceptionHelpers.cpp:
5413 * runtime/Executable.h:
5414 * runtime/FunctionConstructor.h:
5415 * runtime/FunctionPrototype.h:
5416 * runtime/GetterSetter.h:
5417 * runtime/InternalFunction.h:
5418 * runtime/JSAPIValueWrapper.h:
5419 * runtime/JSActivation.h:
5420 * runtime/JSArray.h:
5421 * runtime/JSFunction.h:
5422 * runtime/JSGlobalObject.h:
5423 * runtime/JSNotAnObject.h:
5424 * runtime/JSONObject.h:
5425 * runtime/JSObject.h:
5426 * runtime/JSPropertyNameIterator.h:
5427 * runtime/JSStaticScopeObject.h:
5428 * runtime/JSString.h:
5429 * runtime/JSVariableObject.h:
5430 * runtime/JSWrapperObject.h:
5431 * runtime/MathObject.h:
5432 * runtime/NativeErrorConstructor.h:
5433 * runtime/NativeErrorPrototype.h:
5434 * runtime/NumberConstructor.h:
5435 * runtime/NumberObject.h:
5436 * runtime/NumberPrototype.h:
5437 * runtime/ObjectConstructor.h:
5438 * runtime/ObjectPrototype.h:
5440 * runtime/RegExpConstructor.h:
5441 * runtime/RegExpMatchesArray.h:
5442 * runtime/RegExpObject.h:
5443 (JSC::RegExpObject::create):
5444 * runtime/RegExpPrototype.h:
5445 * runtime/ScopeChain.h:
5446 * runtime/StrictEvalActivation.h:
5447 * runtime/StringConstructor.h:
5448 * runtime/StringObject.h:
5449 * runtime/StringObjectThatMasqueradesAsUndefined.h:
5450 * runtime/StringPrototype.h:
5451 * runtime/Structure.h:
5452 * runtime/StructureChain.h:
5454 2011-08-08 Oliver Hunt <oliver@apple.com>
5456 Using mprotect to create guard pages breaks our use of madvise to release executable memory
5457 https://bugs.webkit.org/show_bug.cgi?id=65870
5459 Reviewed by Gavin Barraclough.
5461 Use mmap rather than mprotect to clear guard page permissions.
5463 * wtf/OSAllocatorPosix.cpp:
5464 (WTF::OSAllocator::reserveAndCommit):
5466 2011-08-08 Oliver Hunt <oliver@apple.com>
5468 Non-extensibility does not prevent mutating [[Prototype]]
5469 https://bugs.webkit.org/show_bug.cgi?id=65832
5471 Reviewed by Gavin Barraclough.
5473 Disallow mutation of __proto__ on objects that are not extensible.
5475 * runtime/JSObject.cpp:
5476 (JSC::JSObject::put):
5478 2011-08-08 Filip Pizlo <fpizlo@apple.com>
5480 DFG JIT does not track speculation decisions for global variables
5481 https://bugs.webkit.org/show_bug.cgi?id=65825
5483 Reviewed by Gavin Barraclough.
5485 Added the capability to track predictions for global variables, and
5486 ensured that code can abstract over the source of prediction (local
5487 versus global variable) wherever it is appropriate to do so. Also
5488 cleaned up the code in SpeculativeJIT that decides how to speculate
5489 based on recorded predictions (for example instead of using isInteger,
5490 which makes sense for local predictions where the GetLocal would
5491 return an integer value, we now tend to use shouldSpeculateInteger,
5492 which checks if the value is either already an integer or should be
5493 speculated to be an integer).
5495 This is an 0.8% win on SunSpider, almost entirely thanks to a 25%
5496 win on controlflow-recursive. It's also a 4.8% win on v8-crypto.
5498 * dfg/DFGByteCodeParser.cpp:
5499 (JSC::DFG::ByteCodeParser::predictArray):
5500 (JSC::DFG::ByteCodeParser::predictInt32):
5501 (JSC::DFG::ByteCodeParser::parseBlock):
5503 (JSC::DFG::Graph::dump):
5505 (JSC::DFG::Graph::predictGlobalVar):
5506 (JSC::DFG::Graph::predict):
5507 (JSC::DFG::Graph::getGlobalVarPrediction):
5508 (JSC::DFG::Graph::getPrediction):
5509 * dfg/DFGSpeculativeJIT.cpp:
5510 (JSC::DFG::SpeculativeJIT::compile):
5511 * dfg/DFGSpeculativeJIT.h:
5512 (JSC::DFG::SpeculativeJIT::shouldSpeculateInteger):
5513 (JSC::DFG::SpeculativeJIT::shouldSpeculateDouble):
5515 2011-08-07 Martin Robinson <mrobinson@igalia.com>
5517 Distribution fix for GTK+.
5519 * GNUmakefile.list.am: Strip removed files from the source list.
5521 2011-08-06 Gavin Barraclough <barraclough@apple.com>
5523 https://bugs.webkit.org/show_bug.cgi?id=65821
5524 Don't form identifiers the first time a string is used as a property name.
5526 Reviewed by Oliver Hunt.
5528 This is a 1% win on SunSpider.
5530 * dfg/DFGOperations.cpp:
5531 - Use fastGetOwnProperty.
5533 (JSC::DEFINE_STUB_FUNCTION):
5534 - Use fastGetOwnProperty.
5536 * runtime/JSObject.h:
5537 (JSC::JSCell::fastGetOwnProperty):
5538 - Fast call to get a property without creating an identifier the first time.
5539 * runtime/PropertyMapHashTable.h:
5540 (JSC::PropertyTable::find):
5541 (JSC::PropertyTable::findWithString):
5542 - Add interface to look up by either strinsg or identifiers.
5543 * runtime/Structure.h:
5544 (JSC::Structure::get):
5545 - Add a get() call that takes a UString, not an Identifier.
5546 * wtf/text/StringImpl.h:
5547 (WTF::StringImpl::hasHash):
5548 - Add a call to check if the has has been set (to detect the first use as a property name).
5550 2011-08-06 Aron Rosenberg <arosenberg@logitech.com>
5552 Reviewed by Benjamin Poulain.
5554 [Qt] Fix build with Intel compiler on Windows
5555 https://bugs.webkit.org/show_bug.cgi?id=65088
5557 Intel compiler needs .lib suffixes instead of .a
5558 Intel compiler doesn't support nullptr
5559 Intel compiler supports unsized arrays
5561 * JavaScriptCore.pri:
5566 2011-08-05 Gavin Barraclough <barraclough@apple.com>
5568 String replace with the empty string means string removal
5569 https://bugs.webkit.org/show_bug.cgi?id=65799
5571 Reviewed by Sam Weinig.
5573 Optimization for String.prototype.replace([RegExp], ""), this improves v8-regexp by ~3%.
5575 * runtime/StringPrototype.cpp:
5576 (JSC::jsSpliceSubstrings):
5577 (JSC::stringProtoFuncReplace):
5579 2011-08-05 Noel Gordon <noel.gordon@gmail.com>
5581 [Chromium] Remove JSZombie references from gyp project files.
5582 https://bugs.webkit.org/show_bug.cgi?id=65798
5584 JSC runtime/JSZombie.{cpp,h} were removed in r92046. Remove references to these
5585 file names from the gyp projects.
5587 Reviewed by Darin Adler.
5589 * JavaScriptCore.gypi: zombies be gone.
5591 2011-08-05 Mark Rowe <mrowe@apple.com>
5593 <http://webkit.org/b/65785> ThreadRestrictionVerifier needs a mode where an object
5594 is tied to a particular dispatch queue
5596 A RefCounted object can be opted in to this mode by calling setDispatchQueueForVerifier
5597 with the dispatch queue it will be tied to. This will cause ThreadRestrictionVerifier
5598 to ensure that all operations are performed on the given dispatch queue.
5600 Reviewed by Anders Carlsson.
5603 (WTF::RefCountedBase::setDispatchQueueForVerifier):
5604 * wtf/ThreadRestrictionVerifier.h:
5605 (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
5606 (WTF::ThreadRestrictionVerifier::~ThreadRestrictionVerifier):
5607 (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
5608 (WTF::ThreadRestrictionVerifier::setShared):
5609 (WTF::ThreadRestrictionVerifier::isSafeToUse):
5611 2011-08-05 Oliver Hunt <oliver@apple.com>
5613 Inline allocation of function objects
5614 https://bugs.webkit.org/show_bug.cgi?id=65779
5616 Reviewed by Gavin Barraclough.
5618 Inline allocation and initilisation of function objects
5619 in generated code. This ended up being a 60-70% improvement
5620 in function allocation performance. This improvement shows
5621 up as a ~2% improvement in 32bit sunspider and V8, but is a
5624 We currently don't inline the allocation of named function
5625 expressions, as that requires being able to gc allocate a
5629 (JSC::JIT::privateCompileSlowCases):
5631 (JSC::JIT::emitStoreCell):
5632 * jit/JITInlineMethods.h:
5633 (JSC::JIT::emitAllocateBasicJSObject):
5634 (JSC::JIT::emitAllocateJSFinalObject):
5635 (JSC::JIT::emitAllocateJSFunction):
5636 * jit/JITOpcodes.cpp:
5637 (JSC::JIT::emit_op_new_func):
5638 (JSC::JIT::emitSlow_op_new_func):
5639 (JSC::JIT::emit_op_new_func_exp):
5640 (JSC::JIT::emitSlow_op_new_func_exp):
5641 * jit/JITOpcodes32_64.cpp:
5642 Removed duplicate implementation of op_new_func and op_new_func_exp
5643 * runtime/JSFunction.h:
5644 (JSC::JSFunction::offsetOfScopeChain):
5645 (JSC::JSFunction::offsetOfExecutable):
5647 2011-08-04 David Levin <levin@chromium.org>
5649 CStringBuffer should have thread safety checks turned on.
5650 https://bugs.webkit.org/show_bug.cgi?id=58093
5652 Reviewed by Dmitry Titov.
5654 * wtf/text/CString.h:
5655 (WTF::CStringBuffer::CStringBuffer): Removed the ifdef that
5656 turned this off for Chromium.
5658 2011-08-04 Mark Rowe <mrowe@apple.com>
5660 Future-proof Xcode configuration settings.
5662 * Configurations/Base.xcconfig:
5663 * Configurations/DebugRelease.xcconfig:
5664 * Configurations/JavaScriptCore.xcconfig:
5665 * Configurations/Version.xcconfig:
5667 2011-08-04 Mark Hahnenberg <mhahnenberg@apple.com>
5669 Interpreter can potentially GC in the middle of initializing a structure chain
5670 https://bugs.webkit.org/show_bug.cgi?id=65638
5672 Reviewed by Oliver Hunt.
5674 Moved the allocation of a prototype StructureChain before the initialization of
5675 the structure chain within the interpreter that was causing intermittent GC crashes.
5677 * interpreter/Interpreter.cpp:
5678 (JSC::Interpreter::tryCachePutByID):
5681 2011-08-04 Filip Pizlo <fpizlo@apple.com>
5683 Eval handling attempts literal parsing even when the eval
5684 string is in the cache
5685 https://bugs.webkit.org/show_bug.cgi?id=65675
5687 Reviewed by Oliver Hunt.
5689 This is a 25% speed-up on date-format-tofte and a 1.5% speed-up overall
5690 in SunSpider. It's neutral on V8.
5692 * bytecode/EvalCodeCache.h:
5693 (JSC::EvalCodeCache::tryGet):
5694 (JSC::EvalCodeCache::getSlow):
5695 (JSC::EvalCodeCache::get):
5696 * interpreter/Interpreter.cpp:
5697 (JSC::Interpreter::callEval):
5699 2011-08-03 Mark Rowe <mrowe@apple.com>
5701 Bring some order to FeatureDefines.xcconfig to make it easier to follow.
5703 Reviewed by Sam Weinig.
5705 * Configurations/FeatureDefines.xcconfig:
5707 2011-08-03 Mark Rowe <mrowe@apple.com>
5709 Clean up FeatureDefines.xcconfig to remove some unnecessary conditional settings
5711 Reviewed by Dave Kilzer.
5713 * Configurations/FeatureDefines.xcconfig:
5715 2011-08-03 Filip Pizlo <fpizlo@apple.com>
5717 JSC GC heap size improvement breaks build on some platforms due to
5719 https://bugs.webkit.org/show_bug.cgi?id=65641
5721 Reviewed by Darin Adler.
5723 Fix build on non-x86 platforms, by ensuring that the relevant
5724 parameter always appears to be used even when it isn't.
5728 2011-08-03 Carlos Garcia Campos <cgarcia@igalia.com>
5730 [GTK] Reorganize pkg-config files
5731 https://bugs.webkit.org/show_bug.cgi?id=65548
5733 Reviewed by Martin Robinson.
5736 * javascriptcoregtk.pc.in: Renamed from Source/WebKit/gtk/javascriptcoregtk.pc.in.
5738 2011-08-01 David Levin <levin@chromium.org>
5740 Add asserts to RefCounted to make sure ref/deref happens on the right thread.
5741 https://bugs.webkit.org/show_bug.cgi?id=31639
5743 Reviewed by Dmitry Titov.
5745 * GNUmakefile.list.am: Added new files to the build.
5746 * JavaScriptCore.gypi: Ditto.
5747 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
5748 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
5749 * jit/ExecutableAllocator.h:
5750 (JSC::ExecutablePool::ExecutablePool): Turned off checks for this
5751 due to not being able to figure out what was guarding it (bug 58091).
5752 * parser/SourceProvider.h:
5753 (JSC::SourceProvider::SourceProvider): Ditto.
5754 * wtf/CMakeLists.txt: Added new files to the build.
5755 * wtf/ThreadRestrictionVerifier.h: Added.
5756 Everything is done in the header to avoid the issue with exports
5757 that are only useful in debug but still needing to export them.
5759 (WTF::RefCountedBase::ref): Added checks using the non thread safe verifier.
5760 and filed bug 58171 about making it stricter.
5761 (WTF::RefCountedBase::hasOneRef): Ditto.
5762 (WTF::RefCountedBase::refCount): Ditto.
5763 (WTF::RefCountedBase::setMutexForVerifier): Expose a way to change the checks to be based
5764 on a mutex. This is in the header to avoid adding more exports from JavaScriptCore.
5765 (WTF::RefCountedBase::deprecatedTurnOffVerifier): Temporary way to turn off verification.
5766 Filed bug 58174 to remove this method.
5767 (WTF::RefCountedBase::derefBase):
5768 * wtf/SizeLimits.cpp: Adjusted the debug size check for RefCounted.
5769 * wtf/text/CString.h:
5770 (WTF::CStringBuffer::CStringBuffer): Turned off checks for this while a fix is being
5771 done in Chromium (bug 58093).
5773 2011-08-02 Filip Pizlo <fpizlo@apple.com>
5775 JSC GC may not be able to reuse partially-free blocks after a
5777 https://bugs.webkit.org/show_bug.cgi?id=65585
5779 Reviewed by Darin Adler.
5781 This fixes the linked list management bug. This fix is performance
5782 neutral on SunSpider.
5784 * heap/NewSpace.cpp:
5785 (JSC::NewSpace::removeBlock):
5787 2011-07-30 Oliver Hunt <oliver@apple.com>
5789 Simplify JSFunction creation for functions written in JS
5790 https://bugs.webkit.org/show_bug.cgi?id=65422
5792 Reviewed by Gavin Barraclough.
5794 Remove hash lookups used to write name property and transition
5795 function structure by caching the resultant structure and property
5796 offset in JSGlobalObject. This doesn't impact performance, but
5797 we can use this change to make other improvements later.
5799 * runtime/Executable.cpp:
5800 (JSC::FunctionExecutable::FunctionExecutable):
5801 * runtime/Executable.h:
5802 (JSC::ScriptExecutable::ScriptExecutable):
5803 (JSC::FunctionExecutable::jsName):
5804 * runtime/JSFunction.cpp:
5805 (JSC::JSFunction::JSFunction):
5806 * runtime/JSGlobalObject.cpp:
5807 (JSC::JSGlobalObject::reset):
5808 * runtime/JSGlobalObject.h:
5809 (JSC::JSGlobalObject::namedFunctionStructure):
5810 (JSC::JSGlobalObject::functionNameOffset):
5812 2011-08-02 Filip Pizlo <fpizlo@apple.com>
5814 JSC GC uses dummy cells to avoid having to remember which cells
5815 it has already destroyed
5816 https://bugs.webkit.org/show_bug.cgi?id=65556
5818 Reviewed by Oliver Hunt.
5820 This gets rid of dummy cells, and ensures that it's not necessary
5821 to invoke a destructor on cells that have already been swept. In
5822 the common case, a block knows that either all of its free cells
5823 still need to have destructors called, or none of them do, which
5824 minimizes the amount of branching that needs to happen per cell
5825 when performing a sweep.
5827 This is performance neutral on SunSpider and V8. It is meant as
5828 a stepping stone to simplify the implementation of more
5829 sophisticated sweeping algorithms.
5832 (JSC::CountFunctor::ClearMarks::operator()):
5833 * heap/MarkedBlock.cpp:
5834 (JSC::MarkedBlock::initForCellSize):
5835 (JSC::MarkedBlock::callDestructor):
5836 (JSC::MarkedBlock::specializedReset):
5837 (JSC::MarkedBlock::reset):
5838 (JSC::MarkedBlock::specializedSweep):
5839 (JSC::MarkedBlock::sweep):
5840 (JSC::MarkedBlock::produceFreeList):
5841 (JSC::MarkedBlock::lazySweep):
5842 (JSC::MarkedBlock::blessNewBlockForFastPath):
5843 (JSC::MarkedBlock::blessNewBlockForSlowPath):
5844 (JSC::MarkedBlock::canonicalizeBlock):
5845 * heap/MarkedBlock.h:
5846 (JSC::MarkedBlock::FreeCell::setNoObject):
5847 (JSC::MarkedBlock::setDestructorState):
5848 (JSC::MarkedBlock::destructorState):
5849 (JSC::MarkedBlock::notifyMayHaveFreshFreeCells):
5850 * runtime/JSCell.cpp:
5852 (JSC::JSCell::JSCell::JSCell):
5853 * runtime/JSGlobalData.cpp:
5854 (JSC::JSGlobalData::JSGlobalData):
5855 (JSC::JSGlobalData::clearBuiltinStructures):
5856 * runtime/JSGlobalData.h:
5857 * runtime/Structure.h:
5859 2011-08-01 Michael Saboff <msaboff@apple.com>
5861 Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors
5862 https://bugs.webkit.org/show_bug.cgi?id=65502
5864 Reviewed by Anders Carlsson.
5866 With the fix of the issues causing madvise MADV_FREE_REUSABLE to fail,
5867 added an assert to the return code of madvise to catch any regressions.
5869 * wtf/TCSystemAlloc.cpp:
5870 (TCMalloc_SystemRelease):
5872 2011-08-02 Anders Carlsson <andersca@apple.com>
5876 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5878 2011-08-02 Anders Carlsson <andersca@apple.com>
5880 Fix a Windows build error.
5882 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5884 2011-08-02 Filip Pizlo <fpizlo@apple.com>
5886 JSC GC is far too conservative about growing the heap size, particularly
5887 on desktop platforms
5888 https://bugs.webkit.org/show_bug.cgi?id=65438
5890 Reviewed by Oliver Hunt.
5892 The minimum heap size is now 16MB instead of 512KB, provided all of the
5894 a) ENABLE(LARGE_HEAP) is set, which currently only happens on
5895 x86 targets, but could reasonably happen on any platform that is
5896 known to have a decent amount of RAM.
5897 b) JSGlobalData is initialized with HeapSize = LargeHeap, which
5898 currently only happens when it's the JSDOMWindowBase in WebCore or
5899 in the jsc command-line tool.
5901 This is a 4.1% speed-up on SunSpider.
5903 * JavaScriptCore.exp:
5906 (JSC::Heap::collect):
5910 * runtime/JSGlobalData.cpp:
5911 (JSC::JSGlobalData::JSGlobalData):
5912 (JSC::JSGlobalData::createContextGroup):
5913 (JSC::JSGlobalData::create):
5914 (JSC::JSGlobalData::createLeaked):
5915 (JSC::JSGlobalData::sharedInstance):
5916 * runtime/JSGlobalData.h:
5919 2011-08-02 Filip Pizlo <fpizlo@apple.com>
5921 JSC does a GC even when the heap still has free pages
5922 https://bugs.webkit.org/show_bug.cgi?id=65445
5924 Reviewed by Oliver Hunt.
5926 If the high watermark is not reached, then we allocate new blocks as
5927 before. If the current watermark does reach (or exceed) the high
5928 watermark, then we check if there is a block on the free block pool.
5929 If there is, we simply allocation from it. If there isn't, we
5930 invoke a collectin as before. This effectively couples the elastic
5931 scavenging to the collector's decision function. That is, if an
5932 application rapidly varies its heap usage (sometimes using more and
5933 sometimes less) then the collector will not thrash as it used to.
5934 But if heap usage drops and stays low then the scavenger thread and
5935 the GC will eventually reach a kind of consensus: the GC will set
5936 the watermark low because of low heap usage, and the scavenger thread
5937 will steadily eliminate pages from the free page pool, until the size
5938 of the free pool is below the high watermark.
5940 On command-line, this is neutral on SunSpider and Kraken and a 3% win
5941 on V8. In browser, this is a 1% win on V8 and neutral on the other
5945 (JSC::Heap::allocateSlowCase):
5946 (JSC::Heap::allocateBlock):
5949 2011-08-02 Jeff Miller <jeffm@apple.com>
5951 Move WTF_USE_AVFOUNDATION from JavaScriptCore/wtf/platform.h to WebCore/config.h
5952 https://bugs.webkit.org/show_bug.cgi?id=65552
5954 Since this is a WebCore feature, there's no need to define it in JavaScriptCore/wtf/platform.h.
5956 Reviewed by Adam Roben.
5958 * wtf/Platform.h: Removed WTF_USE_AVFOUNDATION.
5960 2011-08-01 Jean-luc Brouillet <jeanluc@chromium.org>
5962 Removing old source files in gyp files that slow build
5963 https://bugs.webkit.org/show_bug.cgi?id=65503
5965 Reviewed by Adam Barth.
5967 A number of stale files are listed in the gyp files. These slow the
5968 build on Visual Studio 2010. Removing them.
5970 * JavaScriptCore.gypi:
5972 2011-07-14 David Levin <levin@chromium.org>
5974 currentThread is too slow!
5975 https://bugs.webkit.org/show_bug.cgi?id=64577
5977 Reviewed by Darin Adler and Dmitry Titov.
5979 The problem is that currentThread results in a pthread_once call which always takes a lock.
5980 With this change, currentThread is 10% faster than isMainThread in release mode and only
5981 5% slower than isMainThread in debug.
5983 * wtf/ThreadIdentifierDataPthreads.cpp:
5984 (WTF::ThreadIdentifierData::initializeOnce): Remove the pthread once stuff
5985 which is no longer needed because this is called from initializeThreading().
5986 (WTF::ThreadIdentifierData::identifier): Remove the initializeKeyOnce call because
5987 intialization of the pthread key should already be done.
5988 (WTF::ThreadIdentifierData::initialize): Ditto.
5989 * wtf/ThreadIdentifierDataPthreads.h:
5990 * wtf/ThreadingPthreads.cpp:
5991 (WTF::initializeThreading): Acquire the pthread key here.
5993 2011-08-01 Filip Pizlo <fpizlo@apple.com>
5995 DFG JIT sometimes creates speculation check data structures that have
5996 invalid information about the format of a register
5997 https://bugs.webkit.org/show_bug.cgi?id=65490
5999 Reviewed by Gavin Barraclough.
6001 The code now makes sure to (1) always have correct and up-to-date
6002 information about register format at the time that a speculation
6003 check is emitted, (2) assert that speculation data is correct
6004 inside the speculation check implementation, and (3) avoid creating
6005 speculation data altogether if compilation has already failed, since
6006 at that point the format data is almost guaranteed to be bogus.
6008 * dfg/DFGNonSpeculativeJIT.cpp:
6009 (JSC::DFG::EntryLocation::EntryLocation):
6010 * dfg/DFGSpeculativeJIT.cpp:
6011 (JSC::DFG::SpeculationCheck::SpeculationCheck):
6012 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
6013 (JSC::DFG::SpeculativeJIT::compile):
6014 * dfg/DFGSpeculativeJIT.h:
6015 (JSC::DFG::SpeculativeJIT::speculationCheck):
6017 2011-08-01 Filip Pizlo <fpizlo@apple.com>
6019 REGRESSION(r92092): Build fails on 64 bit
6020 https://bugs.webkit.org/show_bug.cgi?id=65458
6022 Reviewed by Oliver Hunt.
6024 The build was broken because some compilers were smart enough to see
6025 an array index out of bounds due to the decision fuction for when to
6026 go from precise size classes to imprecise size classes being broken:
6027 it would assume that sizes in the range 97..128 belonged to a precise
6028 size class when in fact they belonged to an imprecise one.
6030 In fact, the code would have run correctly, by way of a fluke, because
6031 though the 4th precise size class (for 97..128) didn't exist, the next
6032 array over from m_preciseSizeClasses was m_impreciseSizeClasses, and
6033 its first entry would have been a size class that is appropriate for
6034 allocations in the range 97..128. However, this relies on specific
6035 ordering of fields in NewSpace, so it's still a bug.
6037 This fixes the bug by ensuring that allocations larger than 96 use
6038 the imprecise size classes.
6041 (JSC::NewSpace::sizeClassFor):
6043 2011-07-31 Gavin Barraclough <barraclough@apple.com>
6045 https://bugs.webkit.org/show_bug.cgi?id=64679
6046 Fix bugs in Array.prototype this handling.
6048 Unreviewed - rolling out r91290.
6050 Looks like the wild wild web isn't ready for this yet.
6052 This change broke http://slides.html5rocks.com/#landing-slide.
6053 Interestingly, this might only be due to our lack of bind support -
6054 it looks like this site is calling Array.prototype.slice as a part
6055 of its bind implementation.
6057 * runtime/ArrayPrototype.cpp:
6058 (JSC::arrayProtoFuncJoin):
6059 (JSC::arrayProtoFuncConcat):
6060 (JSC::arrayProtoFuncPop):
6061 (JSC::arrayProtoFuncPush):
6062 (JSC::arrayProtoFuncReverse):
6063 (JSC::arrayProtoFuncShift):
6064 (JSC::arrayProtoFuncSlice):
6065 (JSC::arrayProtoFuncSort):
6066 (JSC::arrayProtoFuncSplice):
6067 (JSC::arrayProtoFuncUnShift):
6068 (JSC::arrayProtoFuncFilter):
6069 (JSC::arrayProtoFuncMap):
6070 (JSC::arrayProtoFuncEvery):
6071 (JSC::arrayProtoFuncForEach):
6072 (JSC::arrayProtoFuncSome):
6073 (JSC::arrayProtoFuncReduce):
6074 (JSC::arrayProtoFuncReduceRight):
6075 (JSC::arrayProtoFuncIndexOf):
6076 (JSC::arrayProtoFuncLastIndexOf):
6078 2011-07-31 Filip Pizlo <fpizlo@apple.com>
6080 JSC GC lays out size classes under wrong assumptions about expected
6082 https://bugs.webkit.org/show_bug.cgi?id=65437
6084 Reviewed by Oliver Hunt.
6086 Changed the atom size - which is both the smallest allocation size and
6087 the smallest possible stepping unit for size class spacing - from
6088 8 bytes to 4 pointer-size words. This is a 1% win on SunSpider.
6090 * heap/MarkedBlock.h:
6092 2011-07-31 Filip Pizlo <fpizlo@apple.com>
6094 DFG non-speculative JIT does not optimize PutByVal
6095 https://bugs.webkit.org/show_bug.cgi?id=65424
6097 Reviewed by Gavin Barraclough.
6099 Added code to emit PutByVal inline fast path.
6101 * dfg/DFGNonSpeculativeJIT.cpp:
6102 (JSC::DFG::NonSpeculativeJIT::compile):
6104 2011-07-31 Filip Pizlo <fpizlo@apple.com>
6106 The JSC garbage collector returns memory to the operating system too
6108 https://bugs.webkit.org/show_bug.cgi?id=65382
6110 Reviewed by Oliver Hunt.
6112 This introduces a memory reuse model similar to the one in FastMalloc.
6113 A periodic scavenger thread runs in the background and returns half the
6114 free memory to the OS on each timer fire. New block allocations first
6115 attempt to get the memory from the collector's internal pool, reverting
6116 to OS allocation only when this pool is empty.
6121 (JSC::Heap::destroy):
6122 (JSC::Heap::waitForRelativeTimeWhileHoldingLock):
6123 (JSC::Heap::waitForRelativeTime):
6124 (JSC::Heap::blockFreeingThreadStartFunc):
6125 (JSC::Heap::blockFreeingThreadMain):
6126 (JSC::Heap::allocateBlock):
6127 (JSC::Heap::freeBlocks):
6128 (JSC::Heap::releaseFreeBlocks):
6130 * heap/MarkedBlock.cpp:
6131 (JSC::MarkedBlock::destroy):
6132 (JSC::MarkedBlock::MarkedBlock):
6133 (JSC::MarkedBlock::initForCellSize):
6134 (JSC::MarkedBlock::reset):
6135 * heap/MarkedBlock.h:
6138 2011-07-30 Filip Pizlo <fpizlo@apple.com>
6140 DFG JIT speculation failure pass sometimes forgets to emit code to
6141 move certain registers.
6142 https://bugs.webkit.org/show_bug.cgi?id=65421
6144 Reviewed by Oliver Hunt.
6146 Restructured the offending loops (for gprs and fprs). It's once again
6147 possible to use spreadsheets on docs.google.com.
6149 * dfg/DFGJITCompiler.cpp:
6150 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
6152 2011-07-30 Patrick Gansterer <paroga@webkit.org>
6154 Remove inclusion of MainThread.h from Threading.h
6155 https://bugs.webkit.org/show_bug.cgi?id=65081
6157 Reviewed by Darin Adler.
6159 Add missing and remove unneeded include statements for MainThread.
6161 * wtf/CryptographicallyRandomNumber.cpp:
6163 * wtf/ThreadingPthreads.cpp:
6164 * wtf/text/StringStatics.cpp:
6166 2011-07-30 Oliver Hunt <oliver@apple.com>
6168 Reduce the size of JSGlobalObject slightly
6169 https://bugs.webkit.org/show_bug.cgi?id=65417
6171 Reviewed by Dan Bernstein.
6173 Push a few members that either aren't commonly used,
6174 or aren't frequently accessed into a separate struct.
6176 * runtime/JSGlobalObject.cpp:
6177 (JSC::JSGlobalObject::init):
6178 (JSC::JSGlobalObject::WeakMapsFinalizer::finalize):
6179 * runtime/JSGlobalObject.h:
6180 (JSC::JSGlobalObject::JSGlobalObjectRareData::JSGlobalObjectRareData):
6181 (JSC::JSGlobalObject::createRareDataIfNeeded):
6182 (JSC::JSGlobalObject::setProfileGroup):
6183 (JSC::JSGlobalObject::profileGroup):
6184 (JSC::JSGlobalObject::registerWeakMap):
6185 (JSC::JSGlobalObject::deregisterWeakMap):
6187 2011-07-30 Balazs Kelemen <kbalazs@webkit.org>
6189 MessageQueue::waitForMessageFilteredWithTimeout can triggers an assertion
6190 https://bugs.webkit.org/show_bug.cgi?id=65263
6192 Reviewed by Dmitry Titov.
6195 (WTF::::operator): Don't check the validity of an iterator
6196 that will be reassigned right now.
6197 * wtf/MessageQueue.h:
6198 (WTF::::removeIf): Revert r51198 as I beleave this is the better
6199 solution for the problem that was solved by that.
6201 2011-07-29 Filip Pizlo <fpizlo@apple.com>
6203 JSC GC zombie support no longer works, and is likely no longer needed.
6204 https://bugs.webkit.org/show_bug.cgi?id=65404
6206 Reviewed by Darin Adler.
6208 This removes zombies, because they no longer work, are not tested, are
6209 probably not needed, and are getting in the way of GC optimization
6212 * JavaScriptCore.xcodeproj/project.pbxproj:
6214 (JSC::HandleConverter::operator->):
6215 (JSC::HandleConverter::operator*):
6216 * heap/HandleHeap.cpp:
6217 (JSC::HandleHeap::isValidWeakNode):
6219 (JSC::Heap::destroy):
6220 (JSC::Heap::collect):
6221 * heap/MarkedBlock.cpp:
6222 (JSC::MarkedBlock::sweep):
6223 * heap/MarkedBlock.h:
6224 (JSC::MarkedBlock::clearMarks):
6225 * interpreter/Register.h:
6226 (JSC::Register::Register):
6227 (JSC::Register::operator=):
6228 * runtime/ArgList.h:
6229 (JSC::MarkedArgumentBuffer::append):
6230 (JSC::ArgList::ArgList):
6231 * runtime/JSCell.cpp:
6234 * runtime/JSGlobalData.cpp:
6235 (JSC::JSGlobalData::JSGlobalData):
6236 (JSC::JSGlobalData::clearBuiltinStructures):
6237 * runtime/JSGlobalData.h:
6238 * runtime/JSValue.h:
6239 * runtime/JSValueInlineMethods.h:
6240 (JSC::JSValue::JSValue):
6241 * runtime/JSZombie.cpp: Removed.
6242 * runtime/JSZombie.h: Removed.
6243 * runtime/WriteBarrier.h:
6244 (JSC::WriteBarrierBase::setEarlyValue):
6245 (JSC::WriteBarrierBase::operator*):
6246 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
6249 2011-07-29 Filip Pizlo <fpizlo@apple.com>
6251 DFG JIT verbose mode provides no details about predictions
6252 https://bugs.webkit.org/show_bug.cgi?id=65389
6254 Reviewed by Darin Adler.
6256 Added a print-out of the predictions to the IR dump, with names as follows:
6257 "p-bottom" = the parser made no predictions
6258 "p-int32" = the parser predicted int32
6259 ... (same for array, cell, double, number)
6260 "p-top" = the parser made conflicting predictions which will be ignored.
6263 (JSC::DFG::Graph::dump):
6265 (JSC::DFG::predictionToString):
6267 2011-07-29 Filip Pizlo <fpizlo@apple.com>
6269 DFG JIT does not have any way of undoing double speculation.
6270 https://bugs.webkit.org/show_bug.cgi?id=65334
6272 Reviewed by Gavin Barraclough.
6274 This adds code to do a branchConvertDoubleToInt on specualtion failure.
6275 This is performance-neutral on most benchmarks but does result in
6276 a slight improvement in Kraken.
6278 * dfg/DFGJITCompiler.cpp:
6279 (JSC::DFG::GeneralizedRegister::moveTo):
6280 (JSC::DFG::GeneralizedRegister::swapWith):
6281 (JSC::DFG::ShuffledRegister::handleNonCyclingPermutation):
6282 (JSC::DFG::ShuffledRegister::handleCyclingPermutation):
6283 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
6285 2011-07-29 Filip Pizlo <fpizlo@apple.com>
6287 Crash when opening docs.google.com
6288 https://bugs.webkit.org/show_bug.cgi?id=65327
6290 Reviewed by Gavin Barraclough.
6292 The speculative JIT was only checking whether a value is an array when
6293 we had already checked that it was, rather then when we hadn't.
6295 * dfg/DFGSpeculativeJIT.cpp:
6296 (JSC::DFG::SpeculativeJIT::compile):
6298 2011-07-28 Oliver Hunt <oliver@apple.com>
6300 *_list instructions are only used in one place, where the code is wrong.
6301 https://bugs.webkit.org/show_bug.cgi?id=65348
6303 Reviewed by Darin Adler.
6305 Simply remove the instructions and all users. Speeds up the interpreter
6306 slightly due to code motion, but otherwise has no effect (because none
6307 of the _list instructions are ever used).
6309 * bytecode/CodeBlock.cpp:
6310 (JSC::isPropertyAccess):
6311 (JSC::CodeBlock::dump):
6312 (JSC::CodeBlock::visitStructures):
6313 * bytecode/Instruction.h:
6314 * bytecode/Opcode.h:
6315 * interpreter/Interpreter.cpp:
6316 (JSC::Interpreter::privateExecute):
6318 (JSC::JIT::privateCompileMainPass):
6320 2011-07-28 Gavin Barraclough <barraclough@apple.com>
6322 https://bugs.webkit.org/show_bug.cgi?id=65325
6323 Performance tweak to parseInt
6325 Reviewed by Oliver Hunt.
6327 * runtime/JSGlobalObjectFunctions.cpp:
6328 (JSC::globalFuncParseInt):
6329 - This change may an existing optimization redundant,
6330 cleanup from Darin's comments, plus fix existing bugs.
6332 2011-07-28 Gavin Barraclough <barraclough@apple.com>
6334 https://bugs.webkit.org/show_bug.cgi?id=65325
6335 Performance tweak to parseInt
6337 Reviewed by Oliver Hunt.
6339 * runtime/JSGlobalObjectFunctions.cpp:
6340 (JSC::globalFuncParseInt):
6341 - parseInt applied to small positive numbers = floor.
6343 2011-07-28 Dan Bernstein <mitz@apple.com>
6347 * runtime/Executable.cpp:
6348 (JSC::FunctionExecutable::compileForCallInternal):
6350 2011-07-28 Kent Tamura <tkent@chromium.org>
6352 Improve StringImpl::stripWhiteSpace() and simplifyWhiteSpace().
6353 https://bugs.webkit.org/show_bug.cgi?id=65300
6355 Reviewed by Darin Adler.
6357 r91837 had performance regression of StringImpl::stripWhiteSpace()
6358 and simplifyWhiteSpace(). This changes the code so that compilers
6359 generates code equivalent to r91836 or piror.
6361 * wtf/text/StringImpl.cpp:
6362 (WTF::StringImpl::stripMatchedCharacters):
6363 A template member function for stripWhiteSpace(). This function takes a functor.
6364 (WTF::UCharPredicate):
6365 A functor for generic predicate for single UChar argument.
6366 (WTF::SpaceOrNewlinePredicate):
6367 A special functor for isSpaceOrNewline().
6368 (WTF::StringImpl::stripWhiteSpace):
6369 Use stripmatchedCharacters().
6370 (WTF::StringImpl::simplifyMatchedCharactersToSpace):
6371 A template member function for simplifyWhiteSpace().
6372 (WTF::StringImpl::simplifyWhiteSpace):
6373 Use simplifyMatchedCharactersToSpace().
6374 * wtf/text/StringImpl.h:
6376 2011-07-27 Dmitry Lomov <dslomov@google.com>
6378 [chromium] Turn on WTF_MULTIPLE_THREADS.
6379 https://bugs.webkit.org/show_bug.cgi?id=61017
6380 The patch turns on WTF_MULTIPLE_THREADS in chromium and
6381 pushes some relevant initializations from JSC::initializeThreading
6382 to WTF::initializeThreading.
6384 Reviewed by David Levin.
6386 * runtime/InitializeThreading.cpp:
6387 (JSC::initializeThreadingOnce):
6388 * wtf/FastMalloc.cpp:
6390 (WTF::fastMallocForbid):
6391 (WTF::fastMallocAllow):
6393 * wtf/ThreadingPthreads.cpp:
6394 (WTF::initializeThreading):
6395 * wtf/ThreadingWin.cpp:
6396 (WTF::initializeThreading):
6397 * wtf/gtk/ThreadingGtk.cpp:
6398 (WTF::initializeThreading):
6399 * wtf/qt/ThreadingQt.cpp:
6400 (WTF::initializeThreading):
6402 2011-07-27 Mark Hahnenberg <mhahnenberg@apple.com>
6404 Remove operator new from JSCell
6405 https://bugs.webkit.org/show_bug.cgi?id=64999
6407 Reviewed by Oliver Hunt.
6409 Removed the implementation of operator new in JSCell, so any further uses
6410 will not successfully link. Also removed any remaining uses of operator new.
6412 * API/JSContextRef.cpp:
6413 * debugger/DebuggerActivation.h:
6414 (JSC::DebuggerActivation::create):
6415 * interpreter/Interpreter.cpp:
6416 (JSC::Interpreter::execute):
6417 (JSC::Interpreter::createExceptionScope):
6418 (JSC::Interpreter::privateExecute):
6420 (JSC::DEFINE_STUB_FUNCTION):
6422 * runtime/JSGlobalObject.h:
6423 (JSC::JSGlobalObject::create):
6424 * runtime/JSStaticScopeObject.h:
6425 (JSC::JSStaticScopeObject::create):
6426 (JSC::JSStaticScopeObject::JSStaticScopeObject):
6427 * runtime/StrictEvalActivation.h:
6428 (JSC::StrictEvalActivation::create):
6430 2011-07-27 Filip Pizlo <fpizlo@apple.com>
6432 DFG graph has no notion of double prediction.
6433 https://bugs.webkit.org/show_bug.cgi?id=65234
6435 Reviewed by Gavin Barraclough.
6437 Added the notion of PredictDouble, and PredictNumber, which is the least
6438 upper bound of PredictInt32 and PredictDouble. Least upper bound is
6439 defined as the bitwise-or of two predictions. Bottom is defined as 0,
6440 and Top is defined as all bits being set. Added the ability to explicitly
6441 distinguish between a node having had a prediction associated with it,
6442 and that prediction still being valid (i.e. no conflicting predictions
6443 have also been added). Used this to guard the speculative JIT from
6444 speculating Int32 in cases where the graph knows that the value is
6445 double, which currently only happens for GetLocal nodes on arguments
6446 which were double at compile-time.
6449 (JSC::DFG::Graph::predictArgumentTypes):
6451 (JSC::DFG::isCellPrediction):
6452 (JSC::DFG::isArrayPrediction):
6453 (JSC::DFG::isInt32Prediction):
6454 (JSC::DFG::isDoublePrediction):
6455 (JSC::DFG::isNumberPrediction):
6456 * dfg/DFGSpeculativeJIT.cpp:
6457 (JSC::DFG::SpeculativeJIT::compile):
6458 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
6459 (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
6460 * dfg/DFGSpeculativeJIT.h:
6461 (JSC::DFG::SpeculativeJIT::isRegisterDataFormatDouble):
6463 2011-07-27 Gavin Barraclough <barraclough@apple.com>
6465 https://bugs.webkit.org/show_bug.cgi?id=65294
6466 DFG JIT - may speculate based on wrong arguments.
6468 Reviewed by Oliver Hunt
6470 In the case of a DFG compiled function calling to and compiling a second function that
6471 also compiles through the DFG JIT (i.e. compilation triggered with DFGOperations.cpp),
6472 we call compileFor passing the caller functions exec state, rather than the callee's.
6473 This may lead to mis-optimization, since the DFG compiler will example the exec state's
6474 arguments on the assumption that these will be passed to the callee - it is wanting the
6475 callee exec state, not the caller's exec state.
6477 Fixing this for all cases of compilation is tricksy, due to the way the numeric sort
6478 function is compiled, & the structure of the calls in the Interpreter::execute methods.
6479 Only fix for compilation from the JIT, in other calls don't speculate based on arguments
6482 * dfg/DFGOperations.cpp:
6483 * runtime/Executable.cpp:
6484 (JSC::tryDFGCompile):
6485 (JSC::tryDFGCompileFunction):
6486 (JSC::FunctionExecutable::compileForCallInternal):
6487 * runtime/Executable.h:
6488 (JSC::FunctionExecutable::compileForCall):
6489 (JSC::FunctionExecutable::compileFor):
6491 2011-07-27 Oliver Hunt <oliver@apple.com>
6493 Handle callback oriented JSONP
6494 https://bugs.webkit.org/show_bug.cgi?id=65271
6496 Reviewed by Gavin Barraclough.
6498 Handle the callback oriented versions of JSONP. The Literal parser
6499 now handles <Identifier> (. <Identifier>)* (jsonData).
6501 * interpreter/Interpreter.cpp:
6502 (JSC::Interpreter::execute):
6503 * runtime/LiteralParser.cpp:
6504 (JSC::LiteralParser::tryJSONPParse):
6505 (JSC::LiteralParser::Lexer::lex):
6506 * runtime/LiteralParser.h:
6508 2011-07-27 Stephanie Lewis <slewis@apple.com>
6510 Revert http://trac.webkit.org/changeset/90415.
6511 Caused a 5% sunspider regression in-browser.
6515 * bytecode/CodeBlock.cpp:
6516 (JSC::CodeBlock::visitAggregate):
6518 (JSC::Heap::collectAllGarbage):
6520 (JSC::MarkStack::MarkStack):
6521 * runtime/JSGlobalData.cpp:
6522 (JSC::JSGlobalData::releaseExecutableMemory):
6523 * runtime/RegExp.cpp:
6524 (JSC::RegExp::compile):
6525 (JSC::RegExp::invalidateCode):
6528 2011-07-27 Shinya Kawanaka <shinyak@google.com>
6530 Added an interface to take IsWhiteSpaceFunctionPtr.
6531 https://bugs.webkit.org/show_bug.cgi?id=57746
6533 Reviewed by Kent Tamura.
6535 * wtf/text/StringImpl.cpp:
6536 (WTF::StringImpl::stripWhiteSpace):
6537 Added an interface to take IsWhiteSpaceFunctionPtr.
6538 (WTF::StringImpl::simplifyWhiteSpace): ditto.
6539 * wtf/text/StringImpl.h:
6540 * wtf/text/WTFString.cpp:
6541 (WTF::String::stripWhiteSpace): ditto.
6542 (WTF::String::simplifyWhiteSpace): ditto.
6543 * wtf/text/WTFString.h:
6545 2011-07-27 Filip Pizlo <fpizlo@apple.com>
6547 DFG JIT speculation failure code performs incorrect conversions in
6548 the case where two registers need to be swapped.
6549 https://bugs.webkit.org/show_bug.cgi?id=65233
6551 Reviewed by Gavin Barraclough.
6553 * dfg/DFGJITCompiler.cpp:
6554 (JSC::DFG::GeneralizedRegister::swapWith):
6556 2011-07-26 Mark Hahnenberg <mhahnenberg@apple.com>
6558 reduce and reduceRight bind callback's this to null rather than undefined
6559 https://bugs.webkit.org/show_bug.cgi?id=62264
6561 Reviewed by Oliver Hunt.
6563 Fixed Array.prototype.reduce and Array.prototype.reduceRight so that they behave correctly
6564 when calling the callback function without an argument for this, which means it should
6565 be undefined according to ES 15.4.4.21 and 15.4.4.22.
6567 * runtime/ArrayPrototype.cpp:
6568 (JSC::arrayProtoFuncReduce):
6569 (JSC::arrayProtoFuncReduceRight):
6571 2011-07-26 Filip Pizlo <fpizlo@apple.com>
6573 JSC command-line tool does not come with any facility for
6574 measuring time precisely.
6575 https://bugs.webkit.org/show_bug.cgi?id=65223
6577 Reviewed by Gavin Barraclough.
6579 Exposed WTF::currentTime() as currentTimePrecise().
6582 (GlobalObject::GlobalObject):
6583 (functionPreciseTime):
6585 2011-07-26 Filip Pizlo <fpizlo@apple.com>
6587 DFG speculative JIT never emits inline double comparisons, even when it
6588 would be obvious more efficient to do so.
6589 https://bugs.webkit.org/show_bug.cgi?id=65212
6591 Reviewed by Gavin Barraclough.
6593 This handles the obvious case of inlining double comparisons: it only addresses
6594 the speculative JIT, and only for fused compare/branch sequences. But it does
6595 handle the case where both operands are double (and there is no slow path),
6596 or where one operand is double and the other is unknown type (in which case it
6597 attempts to unbox the double, otherwise taking slow path). This is an 0.8%
6598 speed-up on SunSpider.
6600 * dfg/DFGSpeculativeJIT.cpp:
6601 (JSC::DFG::SpeculativeJIT::convertToDouble):
6602 (JSC::DFG::SpeculativeJIT::compilePeepHoleDoubleBranch):
6603 (JSC::DFG::SpeculativeJIT::compare):
6604 (JSC::DFG::SpeculativeJIT::compile):
6605 * dfg/DFGSpeculativeJIT.h:
6606 (JSC::DFG::SpeculativeJIT::isRegisterDataFormatDouble):
6607 (JSC::DFG::SpeculativeJIT::shouldSpeculateInteger):
6609 2011-07-26 Filip Pizlo <fpizlo@apple.com>
6611 https://bugs.webkit.org/show_bug.cgi?id=64969
6612 DFG JIT generates inefficient code for speculation failures.
6614 Reviewed by Gavin Barraclough.
6616 This implements a speculation failure strategy where (1) values spilled on
6617 non-speculative but not spilled on speculative are spilled, (2) values that
6618 are in registers on both paths are rearranged without ever touching memory,
6619 and (3) values spilled on speculative but not spilled on non-speculative are
6622 The register shuffling is the most interesting part of this patch. It
6623 constructs a permutation graph for registers. Each node represents a
6624 register, and each directed edge corresponds to the register's value having
6625 to be moved to a different register as part of the shuffling. This is a
6626 directed graph where each node may only have 0 or 1 incoming edges, and
6627 0 or 1 outgoing edges. The algorithm then first finds maximal non-cyclic
6628 subgraphs where all nodes in the subgraph are reachable from a start node.
6629 Such subgraphs always resemble linked lists, and correspond to simply
6630 moving the value in the second-to-last register into the last register, and
6631 then moving the value in the third-to-last register into the second-to-last
6632 register, and so on. Once these subgraphs are taken care of, the remaining
6633 subgraphs are cycles, and are handled using either (a) conversion or no-op
6634 if the cycle involves one node, (b) swap if it involves two nodes, or (c)
6635 a cyclic shuffle involving a scratch register if there are three or more
6638 * dfg/DFGGenerationInfo.h:
6639 (JSC::DFG::needDataFormatConversion):
6640 * dfg/DFGJITCompiler.cpp:
6641 (JSC::DFG::GeneralizedRegister::GeneralizedRegister):
6642 (JSC::DFG::GeneralizedRegister::createGPR):
6643 (JSC::DFG::GeneralizedRegister::createFPR):
6644 (JSC::DFG::GeneralizedRegister::dump):
6645 (JSC::DFG::GeneralizedRegister::findInSpeculationCheck):
6646 (JSC::DFG::GeneralizedRegister::findInEntryLocation):
6647 (JSC::DFG::GeneralizedRegister::previousDataFormat):
6648 (JSC::DFG::GeneralizedRegister::nextDataFormat):
6649 (JSC::DFG::GeneralizedRegister::convert):
6650 (JSC::DFG::GeneralizedRegister::moveTo):
6651 (JSC::DFG::GeneralizedRegister::swapWith):
6652 (JSC::DFG::ShuffledRegister::ShuffledRegister):
6653 (JSC::DFG::ShuffledRegister::isEndOfNonCyclingPermutation):
6654 (JSC::DFG::ShuffledRegister::handleNonCyclingPermutation):
6655 (JSC::DFG::ShuffledRegister::handleCyclingPermutation):
6656 (JSC::DFG::ShuffledRegister::lookup):
6657 (JSC::DFG::lookupForRegister):
6658 (JSC::DFG::NodeToRegisterMap::Tuple::Tuple):
6659 (JSC::DFG::NodeToRegisterMap::NodeToRegisterMap):
6660 (JSC::DFG::NodeToRegisterMap::set):
6661 (JSC::DFG::NodeToRegisterMap::end):
6662 (JSC::DFG::NodeToRegisterMap::find):
6663 (JSC::DFG::NodeToRegisterMap::clear):
6664 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
6665 (JSC::DFG::JITCompiler::linkSpeculationChecks):
6666 * dfg/DFGJITCompiler.h:
6667 * dfg/DFGNonSpeculativeJIT.cpp:
6668 (JSC::DFG::EntryLocation::EntryLocation):
6669 * dfg/DFGNonSpeculativeJIT.h:
6670 * dfg/DFGSpeculativeJIT.cpp:
6671 (JSC::DFG::SpeculationCheck::SpeculationCheck):
6672 * dfg/DFGSpeculativeJIT.h:
6674 2011-07-26 Oliver Hunt <oliver@apple.com>
6676 Buffer overflow creating error messages for JSON.parse
6677 https://bugs.webkit.org/show_bug.cgi?id=65211
6679 Reviewed by Darin Adler.
6681 Parse string length to the UString constructor.
6683 * runtime/LiteralParser.cpp:
6684 (JSC::LiteralParser::parse):
6686 2011-07-26 Mark Hahnenberg <mhahnenberg@apple.com>
6688 Refactor automatically generated JS DOM bindings to replace operator new with static create methods
6689 https://bugs.webkit.org/show_bug.cgi?id=64732
6691 Reviewed by Oliver Hunt.
6693 Replacing the public constructors in the automatically generated JS DOM bindings with static
6694 create methods. JSByteArray is used by several of these bindings in WebCore.
6696 * JavaScriptCore.exp:
6697 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6698 * runtime/JSByteArray.cpp:
6699 (JSC::JSByteArray::create):
6700 * runtime/JSByteArray.h:
6702 2011-07-26 Alexis Menard <alexis.menard@openbossa.org>
6704 Unreviewed build fix for Qt/Linux.
6706 On platforms with no glib and gstreamer we should not build javascriptcore
6707 with the Glib support. This is related to http://trac.webkit.org/changeset/91752.
6711 2011-07-26 Juan C. Montemayor <jmont@apple.com>
6713 JSON errors should be informative
6714 https://bugs.webkit.org/show_bug.cgi?id=63339
6716 Added error messages to the JSON Parser.
6718 Reviewed by Oliver Hunt.
6720 * runtime/JSONObject.cpp:
6721 (JSC::JSONProtoFuncParse):
6722 * runtime/LiteralParser.cpp:
6723 (JSC::LiteralParser::Lexer::lex):
6724 (JSC::LiteralParser::Lexer::lexString):
6725 (JSC::LiteralParser::Lexer::lexNumber):
6726 (JSC::LiteralParser::parse):
6727 * runtime/LiteralParser.h:
6728 (JSC::LiteralParser::getErrorMessage):
6729 (JSC::LiteralParser::Lexer::sawError):
6730 (JSC::LiteralParser::Lexer::getErrorMessage):
6732 2011-07-26 Sheriff Bot <webkit.review.bot@gmail.com>
6734 Unreviewed, rolling out r91746.
6735 http://trac.webkit.org/changeset/91746
6736 https://bugs.webkit.org/show_bug.cgi?id=65180
6738 It broke SL build (Requested by Ossy on #webkit).
6740 * wtf/text/StringImpl.cpp:
6741 (WTF::StringImpl::stripWhiteSpace):
6742 (WTF::StringImpl::simplifyWhiteSpace):
6743 * wtf/text/StringImpl.h:
6744 * wtf/text/WTFString.cpp:
6745 * wtf/text/WTFString.h:
6747 2011-07-26 Alexis Menard <alexis.menard@openbossa.org>
6749 Reviewed by Andreas Kling.
6751 [Qt] Change default backend to use GStreamer on Linux and QuickTime on Mac.
6752 https://bugs.webkit.org/show_bug.cgi?id=63472
6754 Enable the bits needed for GStreamer only when QtMultimedia is not used.
6758 2011-07-26 Shinya Kawanaka <shinyak@google.com>
6760 Added an interface to take IsWhiteSpaceFunctionPtr.
6761 https://bugs.webkit.org/show_bug.cgi?id=57746
6763 Reviewed by Kent Tamura.
6765 * wtf/text/StringImpl.cpp:
6766 (WTF::StringImpl::stripWhiteSpace):
6767 Added an interface to take IsWhiteSpaceFunctionPtr.
6768 (WTF::StringImpl::simplifyWhiteSpace): ditto.
6769 * wtf/text/StringImpl.h:
6770 * wtf/text/WTFString.cpp:
6771 (WTF::String::stripWhiteSpace): ditto.
6772 (WTF::String::simplifyWhiteSpace): ditto.
6773 * wtf/text/WTFString.h:
6775 2011-07-25 Filip Pizlo <fpizlo@apple.com>
6777 DFG non-speculative JIT emits inefficient code for arithmetic
6778 involving two registers
6779 https://bugs.webkit.org/show_bug.cgi?id=65160
6781 Reviewed by Gavin Barraclough.
6783 The non-speculative JIT now emits inline code for double arithmetic, but
6784 still attempts integer arithmetic first. This is a speed-up on SunSpider
6785 (albeit a small one), and a large speed-up on Kraken.
6787 * dfg/DFGNonSpeculativeJIT.cpp:
6788 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
6790 2011-07-25 Ryuan Choi <ryuan.choi@samsung.com>
6792 [EFL] Build break with --debug after r89153.
6793 https://bugs.webkit.org/show_bug.cgi?id=65150
6795 Unreviewed build fix.
6797 * wtf/CMakeListsEfl.txt: Add missing libraries.
6799 2011-07-25 Filip Pizlo <fpizlo@apple.com>
6801 DFG non-speculative JIT emits obviously inefficient code for arithmetic
6802 where one operand is a constant.
6803 https://bugs.webkit.org/show_bug.cgi?id=65146
6805 Reviewed by Gavin Barraclough.
6807 Changed the code to emit double arithmetic inline.
6809 * dfg/DFGNonSpeculativeJIT.cpp:
6810 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
6812 2011-07-25 Filip Pizlo <fpizlo@apple.com>
6814 DFG JIT bytecode parser misuses pointers into objects allocated as part of a
6816 https://bugs.webkit.org/show_bug.cgi?id=65128
6818 Reviewed by Gavin Barraclough.
6820 The bytecode parser code seems to be right to have a DFGNode& phiNode reference
6821 into the graph, since this makes the code greatly more readable. This patch
6822 thus makes the minimal change necessary to make the code right: it uses a
6823 pointer (to disambiguate between reloading the pointer and performing a
6824 copy from one location of the vector to another) and reloads it after the
6825 calls to addToGraph().
6827 * dfg/DFGByteCodeParser.cpp:
6828 (JSC::DFG::ByteCodeParser::processPhiStack):
6830 2011-07-25 Sheriff Bot <webkit.review.bot@gmail.com>
6832 Unreviewed, rolling out r91686.
6833 http://trac.webkit.org/changeset/91686
6834 https://bugs.webkit.org/show_bug.cgi?id=65144
6836 1.5% regression in JSC (Requested by jmontemayor on #webkit).
6838 * runtime/JSONObject.cpp:
6839 (JSC::JSONProtoFuncParse):
6840 * runtime/LiteralParser.cpp:
6841 (JSC::LiteralParser::Lexer::lex):
6842 (JSC::LiteralParser::Lexer::lexString):
6843 (JSC::LiteralParser::Lexer::lexNumber):
6844 (JSC::LiteralParser::parse):
6845 * runtime/LiteralParser.h:
6847 2011-07-25 Jon Lee <jonlee@apple.com>
6849 Assertion called in ExecutableBase::generatedJITCodeForCall() when JIT is not available
6850 https://bugs.webkit.org/show_bug.cgi?id=65132
6851 <rdar://problem/9836297>
6853 Reviewed by Oliver Hunt.
6855 Make sure the JIT is available to use before running the following calls:
6857 * bytecode/CodeBlock.cpp:
6858 (JSC::CodeBlock::unlinkCalls): Added check, return early if JIT is not available.
6859 * bytecode/CodeBlock.h:
6860 (JSC::CodeBlock::addMethodCallLinkInfos): Added assertion.
6862 2011-07-25 Juan C. Montemayor <jmont@apple.com>
6864 JSON errors should be informative
6865 https://bugs.webkit.org/show_bug.cgi?id=63339
6867 Added error messages to the JSON Parser.
6869 Reviewed by Oliver Hunt.
6871 * runtime/JSONObject.cpp:
6872 (JSC::JSONProtoFuncParse):
6873 * runtime/LiteralParser.cpp:
6874 (JSC::LiteralParser::Lexer::lex):
6875 (JSC::LiteralParser::Lexer::lexString):
6876 (JSC::LiteralParser::Lexer::lexNumber):
6877 (JSC::LiteralParser::parse):
6878 * runtime/LiteralParser.h:
6879 (JSC::LiteralParser::getErrorMessage):
6880 (JSC::LiteralParser::Lexer::sawError):
6881 (JSC::LiteralParser::Lexer::getErrorMessage):
6883 2011-07-25 Filip Pizlo <fpizlo@apple.com>
6885 X86-64 assembler emits three instructions instead of two for certain
6887 https://bugs.webkit.org/show_bug.cgi?id=65095
6889 Reviewed by Gavin Barraclough.
6891 Simply made these four methods in the assembler use the scratch register,
6892 which they were previously avoiding. It still optimizes for the case where
6893 an absolute address memory accesses is using EAX. This results in a slight
6894 performance improvement.
6896 * assembler/MacroAssemblerX86_64.h:
6897 (JSC::MacroAssemblerX86_64::load32):
6898 (JSC::MacroAssemblerX86_64::store32):
6899 (JSC::MacroAssemblerX86_64::loadPtr):
6900 (JSC::MacroAssemblerX86_64::storePtr):
6902 2011-07-25 Ryuan Choi <ryuan.choi@samsung.com>
6904 [EFL] Implement EFL-specific current time and monotonicallyIncreasingTime.
6905 https://bugs.webkit.org/show_bug.cgi?id=64354
6907 Use ecore_time_unix_get which returns unix time as double type for currentTime
6908 and ecore_time_get which uses monotonic clock for monotonicallyIncreasingTime.
6910 Reviewed by Kent Tamura.
6912 * wtf/CurrentTime.cpp:
6914 (WTF::monotonicallyIncreasingTime):
6916 2011-07-22 Sommer Panage <panage@apple.com>
6918 Reviewed by Oliver Hunt.
6920 export JSContextCreateBacktrace as SPI in JSContextRefPrivate.h
6921 https://bugs.webkit.org/show_bug.cgi?id=64981
6923 UIAutomation for iOS would like to support a Javascript backtrace in our error logs.
6924 Currently, the C API does not provide the tools to do this. However, the private API
6925 does expose the necessary functionality to get a backtrace
6926 (via Interpreter::retrieveLastCaller). We recognize this information may result in
6927 failure in the cases of programs run by 'eval', stack frames beneath host function
6928 call frames, and in programs run from other programs. Thus, we propose exporting our
6929 JSContextCreateBacktrace in JSContextRefPrivate.h. This will provide us with the tools
6930 we need while not advertising an API that isn't really ready for full use.
6932 * API/JSContextRef.cpp:
6933 * API/JSContextRefPrivate.h:
6934 * JavaScriptCore.exp:
6937 2011-07-22 Gavin Barraclough <barraclough@apple.com>
6939 https://bugs.webkit.org/show_bug.cgi?id=65051
6940 DFG JIT - Enable by default for mac platform on x86-64.
6942 Rubber Stamped by Geoff Garen.
6944 This is now a performance progression.
6947 - Removed definition of ENABLE_DFG_JIT_RESTRICTIONS.
6949 2011-07-22 Gavin Barraclough <barraclough@apple.com>
6951 https://bugs.webkit.org/show_bug.cgi?id=65047
6952 DFG JIT - Add support for op_resolve/op_resolve_base
6954 Reviewed by Sam Weinig.
6956 These are necessary for any significant eval code coverage
6957 (and as such increase LayoutTest coverage).
6959 * dfg/DFGAliasTracker.h:
6960 (JSC::DFG::AliasTracker::recordResolve):
6961 - Conservatively blow aliasing optimizations for now.
6962 * dfg/DFGByteCodeParser.cpp:
6963 (JSC::DFG::ByteCodeParser::parseBlock):
6964 - Add support for op_resolve/op_resolve_base.
6965 * dfg/DFGJITCodeGenerator.h:
6966 (JSC::DFG::JITCodeGenerator::callOperation):
6967 - Add call with exec, identifer aguments.
6969 - Add new node types.
6970 (JSC::DFG::Node::hasIdentifier):
6971 - Resolve nodes have identifiers, too!
6972 * dfg/DFGNonSpeculativeJIT.cpp:
6973 (JSC::DFG::NonSpeculativeJIT::compile):
6974 - Add generation for new Nodes.
6975 * dfg/DFGOperations.cpp:
6976 * dfg/DFGOperations.h:
6977 - Added new operations.
6978 * dfg/DFGSpeculativeJIT.cpp:
6979 (JSC::DFG::SpeculativeJIT::compile):
6980 - Add generation for new Nodes.
6982 2011-07-22 Gavin Barraclough <barraclough@apple.com>
6984 https://bugs.webkit.org/show_bug.cgi?id=65036
6985 Messing with the register allocation within flow control = badness.
6987 Reviewed by Sam Weinig.
6989 * dfg/DFGNonSpeculativeJIT.cpp:
6990 (JSC::DFG::NonSpeculativeJIT::compile):
6991 - Fix register allocation.
6993 2011-07-22 Mark Hahnenberg <mhahnenberg@apple.com>
6995 Date.prototype.toISOString doesn't handle negative years or years > 9999 correctly.
6996 https://bugs.webkit.org/show_bug.cgi?id=63986
6998 Reviewed by Geoffrey Garen.
7000 Changed the implementation of Date.prototype.toISOString() to use the extended year
7001 format (+/-yyyyyy) for years outside of [0,9999] to be in compliance with ES 15.9.1.15.1.
7003 * runtime/DatePrototype.cpp:
7004 (JSC::dateProtoFuncToISOString):
7006 2011-07-21 Gavin Barraclough <barraclough@apple.com>
7010 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7012 2011-07-21 Ryosuke Niwa <rniwa@webkit.org>
7014 Build fix after r91555.
7016 * JavaScriptCore.exp:
7018 2011-07-21 Gavin Barraclough <barraclough@apple.com>
7020 https://bugs.webkit.org/show_bug.cgi?id=19271
7021 eliminate PIC branches by changing NaN handling in JSValue::toNumber
7023 Reviewed by Sam Weinig.
7025 Moving the non-numeric cases out of line seems to be a consistent
7026 win on SunSpider for me, to the order of about 0.5%.
7029 (JSC::JSCell::JSValue::toNumber):
7030 - Changed to only handle values that are already numbers, moce non-numeric cases out of line.
7031 * runtime/JSValue.cpp:
7032 (JSC::JSValue::toNumberSlowCase):
7033 - Added toNumberSlowCase, handling non-numeric cases.
7034 * runtime/JSValue.h:
7035 - Add declaration of toNumberSlowCase.
7037 2011-07-21 Gavin Barraclough <barraclough@apple.com>
7039 https://bugs.webkit.org/show_bug.cgi?id=64875
7040 Use of `yield` keyword is broken
7042 Reviewed by Sam Weinig.
7045 (JSC::Lexer::parseIdentifier):
7046 - The bug here is that a successful match of a RESERVED_IF_STRICT token from
7047 parseKeyword is being nullified back to IDENT. The problem is that in the
7048 case of IDENT matches parseKeyword should not move the lexer's input
7049 position, but in the case of RESERVED_IF_STRICT it has done so.
7051 2011-07-21 Gavin Barraclough <barraclough@apple.com>
7053 https://bugs.webkit.org/show_bug.cgi?id=64900
7054 Function.prototype.apply should accept an array-like object as its second argument
7056 Reviewed by Sam Weinig.
7058 * interpreter/Interpreter.cpp:
7059 (JSC::Interpreter::privateExecute):
7061 (JSC::DEFINE_STUB_FUNCTION):
7062 * runtime/FunctionPrototype.cpp:
7063 (JSC::functionProtoFuncApply):
7064 - Remove the type error if object is not an array.
7066 2011-07-21 Gavin Barraclough <barraclough@apple.com>
7068 https://bugs.webkit.org/show_bug.cgi?id=64964
7069 DFG JIT - Enable support for eval code
7071 Reviewed by Sam Weinig.
7073 This is basically the same as program code, to the JIT!
7075 * bytecode/Opcode.cpp:
7076 * bytecode/Opcode.h:
7077 - Enable opcodeNames in !NDEBUG builds.
7078 * dfg/DFGOperations.cpp:
7079 - Fix a bug exposed by eval support, throw correct type error for new.
7080 * runtime/Executable.cpp:
7081 (JSC::EvalExecutable::compileInternal):
7082 - Enable DFG JIT for eval code.
7084 2011-07-20 Sheriff Bot <webkit.review.bot@gmail.com>
7086 Unreviewed, rolling out r91380.
7087 http://trac.webkit.org/changeset/91380
7088 https://bugs.webkit.org/show_bug.cgi?id=64924
7090 Caused assertion failures in Chromium's IndexedDB tests
7091 (Requested by rniwa on #webkit).
7093 * wtf/ThreadIdentifierDataPthreads.cpp:
7094 (WTF::ThreadIdentifierData::identifier):
7095 (WTF::ThreadIdentifierData::initialize):
7096 (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
7097 (WTF::ThreadIdentifierData::initializeKeyOnce):
7098 * wtf/ThreadIdentifierDataPthreads.h:
7099 * wtf/ThreadingPthreads.cpp:
7100 (WTF::initializeThreading):
7102 2011-07-20 Filip Pizlo <fpizlo@apple.com>
7104 DFG non-speculative JIT does not use() the aliased GetByVal,
7105 resulting in bloated use counts.
7106 https://bugs.webkit.org/show_bug.cgi?id=64911
7108 Reviewed by Gavin Barraclough.
7110 Inserted a call to use() for the aliased GetByVal.
7112 * dfg/DFGNonSpeculativeJIT.cpp:
7113 (JSC::DFG::NonSpeculativeJIT::compile):
7115 2011-07-20 Gavin Barraclough <barraclough@apple.com>
7117 https://bugs.webkit.org/show_bug.cgi?id=64909
7118 DFG JIT - Missing ToInt32 conversions for double constants.
7120 Reviewed by Sam Weinig.
7122 * dfg/DFGByteCodeParser.cpp:
7123 (JSC::DFG::ByteCodeParser::toInt32):
7124 - We cannot trivially omit ToInt32 conversions on double constants.
7126 2011-07-20 Filip Pizlo <fpizlo@apple.com>
7128 DFG speculative JIT sometimes claims to use compare operands twice, leading to
7129 use count corruption.
7130 https://bugs.webkit.org/show_bug.cgi?id=64903
7132 Reviewed by Gavin Barraclough.
7134 Move the calls to use() in SpeculativeJIT::compare() so that they only happen
7135 if the JITCodeGenerator's helper method (which also calls use()) is not called.
7137 * dfg/DFGSpeculativeJIT.cpp:
7138 (JSC::DFG::SpeculativeJIT::compare):
7140 2011-07-20 Oliver Hunt <oliver@apple.com>
7142 Don't throw away code when JSGarbageCollect API is called
7143 https://bugs.webkit.org/show_bug.cgi?id=64894
7145 Reviewed by Sam Weinig.
7147 Just call collectAllGarbage. That will clean up all unneeded
7148 code without causing any pathological recompilation problems.
7153 2011-07-20 Oliver Hunt <oliver@apple.com>
7155 Codeblock doesn't visit cached structures in global resolve instructions
7156 https://bugs.webkit.org/show_bug.cgi?id=64889
7158 Reviewed by Sam Weinig.
7160 Visit the global resolve instructions. This fixes a couple
7161 of random crashes seen in the jquery tests when using the
7164 * bytecode/CodeBlock.cpp:
7165 (JSC::CodeBlock::visitAggregate):
7167 2011-07-20 James Robinson <jamesr@chromium.org>
7169 Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
7170 https://bugs.webkit.org/show_bug.cgi?id=64841
7172 Reviewed by Mark Rowe.
7174 http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
7175 monotonic clock instead of WTF::currentTime(). This broke many plugin tests on WebKit2 for reasons that are
7176 unclear. This reverts everything except for WebCore::ThreadTimers back to the previous behavior.
7178 * wtf/ThreadingPthreads.cpp:
7179 (WTF::ThreadCondition::timedWait):
7180 * wtf/ThreadingWin.cpp:
7181 (WTF::absoluteTimeToWaitTimeoutInterval):
7182 * wtf/gtk/ThreadingGtk.cpp:
7183 (WTF::ThreadCondition::timedWait):
7184 * wtf/qt/ThreadingQt.cpp:
7185 (WTF::ThreadCondition::timedWait):
7187 2011-07-14 David Levin <levin@chromium.org>
7189 currentThread is too slow!
7190 https://bugs.webkit.org/show_bug.cgi?id=64577
7192 Reviewed by Darin Adler and Dmitry Titov.
7194 The problem is that currentThread results in a pthread_once call which always takes a lock.
7195 With this change, currentThread is 10% faster than isMainThread in release mode and only
7196 5% slower than isMainThread in debug.
7198 * wtf/ThreadIdentifierDataPthreads.cpp:
7199 (WTF::ThreadIdentifierData::initializeOnce): Remove the pthread once stuff
7200 which is no longer needed because this is called from initializeThreading().
7201 (WTF::ThreadIdentifierData::identifier): Remove the initializeKeyOnce call because
7202 intialization of the pthread key should already be done.
7203 (WTF::ThreadIdentifierData::initialize): Ditto.
7204 * wtf/ThreadIdentifierDataPthreads.h:
7205 * wtf/ThreadingPthreads.cpp:
7206 (WTF::initializeThreading): Acquire the pthread key here.
7208 2011-07-20 Mark Rowe <mrowe@apple.com>
7210 Fix the 32-bit build.
7212 * runtime/ObjectPrototype.cpp:
7213 (JSC::objectProtoFuncToString):
7215 2011-07-19 Gavin Barraclough <barraclough@apple.com>
7217 https://bugs.webkit.org/show_bug.cgi?id=64678
7218 Fix bugs in Object.prototype this handling.
7220 Reviewed by Darin Adler.
7222 Fix ES5.1 correctness issues identified by Mads Ager.
7224 * runtime/ObjectPrototype.cpp:
7225 (JSC::objectProtoFuncToString):
7226 - ES5.1 expects toString of undefined/null to produce "[object Undefined]"/"[object Null]".
7228 2011-07-19 Mark Hahnenberg <mhahnenberg@apple.com>
7230 [JSC] WebKit allocates gigabytes of memory when doing repeated string concatenation
7231 https://bugs.webkit.org/show_bug.cgi?id=63918
7233 Reviewed by Darin Adler.
7235 When allocating JSStrings during concatenation, we needed to call the Heap's reportExtraMemoryCost
7236 method due to additional string copying within several of the constructors when dealing with
7237 UStrings. This has been added to the UString version of the appendStringInConstruct method
7238 within the JSString class.
7240 * runtime/JSString.h:
7241 (JSC::RopeBuilder::JSString):
7242 (JSC::RopeBuilder::appendStringInConstruct):
7244 2011-07-19 Gavin Barraclough <barraclough@apple.com>
7246 https://bugs.webkit.org/show_bug.cgi?id=64679
7247 Fix bugs in Array.prototype this handling.
7249 Reviewed by Oliver Hunt.
7251 * runtime/ArrayPrototype.cpp:
7252 (JSC::arrayProtoFuncJoin):
7253 (JSC::arrayProtoFuncConcat):
7254 (JSC::arrayProtoFuncPop):
7255 (JSC::arrayProtoFuncPush):
7256 (JSC::arrayProtoFuncReverse):
7257 (JSC::arrayProtoFuncShift):
7258 (JSC::arrayProtoFuncSlice):
7259 (JSC::arrayProtoFuncSort):
7260 (JSC::arrayProtoFuncSplice):
7261 (JSC::arrayProtoFuncUnShift):
7262 (JSC::arrayProtoFuncFilter):
7263 (JSC::arrayProtoFuncMap):
7264 (JSC::arrayProtoFuncEvery):
7265 (JSC::arrayProtoFuncForEach):
7266 (JSC::arrayProtoFuncSome):
7267 (JSC::arrayProtoFuncReduce):
7268 (JSC::arrayProtoFuncReduceRight):
7269 (JSC::arrayProtoFuncIndexOf):
7270 (JSC::arrayProtoFuncLastIndexOf):
7271 - These methods should throw if this value is undefined.
7273 2011-07-19 Gavin Barraclough <barraclough@apple.com>
7275 https://bugs.webkit.org/show_bug.cgi?id=64677
7276 Fix bugs in String.prototype this handling.
7278 Reviewed by Oliver Hunt.
7280 undefined/null this values should throw TypeErrors, not convert to
7281 the global object, and primitive values should not be converted via
7284 * runtime/StringPrototype.cpp:
7285 (JSC::stringProtoFuncReplace):
7286 (JSC::stringProtoFuncCharAt):
7287 (JSC::stringProtoFuncCharCodeAt):
7288 (JSC::stringProtoFuncIndexOf):
7289 (JSC::stringProtoFuncLastIndexOf):
7290 (JSC::stringProtoFuncMatch):
7291 (JSC::stringProtoFuncSearch):
7292 (JSC::stringProtoFuncSlice):
7293 (JSC::stringProtoFuncSplit):
7294 (JSC::stringProtoFuncSubstr):
7295 (JSC::stringProtoFuncSubstring):
7296 (JSC::stringProtoFuncToLowerCase):
7297 (JSC::stringProtoFuncToUpperCase):
7298 (JSC::stringProtoFuncLocaleCompare):
7299 (JSC::stringProtoFuncBig):
7300 (JSC::stringProtoFuncSmall):
7301 (JSC::stringProtoFuncBlink):
7302 (JSC::stringProtoFuncBold):
7303 (JSC::stringProtoFuncFixed):
7304 (JSC::stringProtoFuncItalics):
7305 (JSC::stringProtoFuncStrike):
7306 (JSC::stringProtoFuncSub):
7307 (JSC::stringProtoFuncSup):
7308 (JSC::stringProtoFuncFontcolor):
7309 (JSC::stringProtoFuncFontsize):
7310 (JSC::stringProtoFuncAnchor):
7311 (JSC::stringProtoFuncLink):
7313 - These methods should throw if this value is undefined,
7314 convert ToString directly, not via ToObject.
7316 2011-07-19 Filip Pizlo <fpizlo@apple.com>
7318 DFG JIT sometimes emits spill code even when the respective values
7320 https://bugs.webkit.org/show_bug.cgi?id=64774
7322 Reviewed by Gavin Barraclough.
7324 The main high-level change is that it is now easier to call use() on a
7325 virtual register. JSValueOperand and its other-typed relatives now have
7326 a handy use() method, and jsValueResult() and friends now make it easier to
7327 pass UseChildrenCalledExplicitly.
7329 The rest of this patch hoists the call to use() as high as possible for
7330 all of those cases where either flushRegisters() or silentSpillAllRegisters()
7333 * dfg/DFGJITCodeGenerator.cpp:
7334 (JSC::DFG::JITCodeGenerator::cachedGetById):
7335 (JSC::DFG::JITCodeGenerator::cachedGetMethod):
7336 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
7337 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
7338 (JSC::DFG::JITCodeGenerator::nonSpeculativeCompare):
7339 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
7340 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
7341 (JSC::DFG::JITCodeGenerator::nonSpeculativeStrictEq):
7342 (JSC::DFG::JITCodeGenerator::emitBranch):
7343 * dfg/DFGJITCodeGenerator.h:
7344 (JSC::DFG::JITCodeGenerator::use):
7345 (JSC::DFG::JITCodeGenerator::integerResult):
7346 (JSC::DFG::JITCodeGenerator::jsValueResult):
7347 (JSC::DFG::IntegerOperand::use):
7348 (JSC::DFG::DoubleOperand::use):
7349 (JSC::DFG::JSValueOperand::use):
7350 * dfg/DFGNonSpeculativeJIT.cpp:
7351 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
7352 (JSC::DFG::NonSpeculativeJIT::valueToInt32):
7353 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
7354 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
7355 (JSC::DFG::NonSpeculativeJIT::compile):
7356 * dfg/DFGSpeculativeJIT.cpp:
7357 (JSC::DFG::SpeculativeJIT::compile):
7358 * dfg/DFGSpeculativeJIT.h:
7359 (JSC::DFG::SpeculateStrictInt32Operand::use):
7360 (JSC::DFG::SpeculateCellOperand::use):
7362 2011-07-19 Xan Lopez <xlopez@igalia.com>
7364 ARMv7 backend broken, lacks 3 parameter rshift32 method
7365 https://bugs.webkit.org/show_bug.cgi?id=64571
7367 Reviewed by Zoltan Herczeg.
7369 * assembler/MacroAssemblerARMv7.h:
7370 (JSC::MacroAssemblerARMv7::rshift32): add missing rshift32 method.
7372 2011-07-18 Filip Pizlo <fpizlo@apple.com>
7374 DFG JIT does not optimize strict equality as effectively as the old JIT does.
7375 https://bugs.webkit.org/show_bug.cgi?id=64759
7377 Reviewed by Gavin Barraclough.
7379 This adds a more complete set of strict equality optimizations. If either
7380 operand is known numeric, then the code reverts to the old style of optimizing
7381 (first try integer comparison). Otherwise it uses the old JIT's trick of
7382 first simultaneously checking if both operands are either numbers or cells;
7383 if not then a fast path is taken.
7385 * dfg/DFGJITCodeGenerator.cpp:
7386 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeStrictEq):
7387 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeStrictEq):
7388 (JSC::DFG::JITCodeGenerator::nonSpeculativeStrictEq):
7389 * dfg/DFGJITCodeGenerator.h:
7390 * dfg/DFGNonSpeculativeJIT.cpp:
7391 (JSC::DFG::NonSpeculativeJIT::compile):
7392 * dfg/DFGOperations.cpp:
7393 * dfg/DFGOperations.h:
7394 * dfg/DFGSpeculativeJIT.cpp:
7395 (JSC::DFG::SpeculativeJIT::compile):
7397 2011-07-18 Gavin Barraclough <barraclough@apple.com>
7399 https://bugs.webkit.org/show_bug.cgi?id=64760
7400 DFG JIT - Should be able to compile program code.
7402 Reviewed by Geoff Garen.
7404 Add support for op_end, hooks to compile program code in Executable.cpp.
7406 * dfg/DFGByteCodeParser.cpp:
7407 (JSC::DFG::ByteCodeParser::parseBlock):
7408 - Add support for op_end
7409 * dfg/DFGJITCompiler.cpp:
7410 (JSC::DFG::JITCompiler::compileEntry):
7411 (JSC::DFG::JITCompiler::compileBody):
7412 (JSC::DFG::JITCompiler::link):
7413 - Added, separate out steps of compileFunction.
7414 (JSC::DFG::JITCompiler::compile):
7415 - Added, compile program code.
7416 (JSC::DFG::JITCompiler::compileFunction):
7417 - Sections separated out to helper functions.
7418 * dfg/DFGJITCompiler.h:
7419 (JSC::DFG::JITCompiler::JITCompiler):
7420 - Added m_exceptionCheckCount.
7421 * runtime/Executable.cpp:
7422 (JSC::tryDFGCompile):
7423 (JSC::tryDFGCompileFunction):
7424 (JSC::ProgramExecutable::compileInternal):
7425 (JSC::FunctionExecutable::compileForCallInternal):
7426 - Renamed tryDFGCompile to tryDFGCompileFunction, added tryDFGCompile to compile program code.
7428 2011-07-18 Gavin Barraclough <barraclough@apple.com>
7430 https://bugs.webkit.org/show_bug.cgi?id=64678
7431 Fix bugs in Object.prototype this handling.
7433 Reviewed by Oliver Hunt.
7435 undefined/null this values should throw TypeErrors, not convert to the global object,
7436 also, to toLocaleString should be calling the ToObject & invoking the object's toString
7437 function, even for values that are already strings.
7439 * runtime/ObjectPrototype.cpp:
7440 (JSC::objectProtoFuncValueOf):
7441 (JSC::objectProtoFuncHasOwnProperty):
7442 (JSC::objectProtoFuncIsPrototypeOf):
7443 (JSC::objectProtoFuncPropertyIsEnumerable):
7444 (JSC::objectProtoFuncToLocaleString):
7445 (JSC::objectProtoFuncToString):
7447 2011-07-18 Filip Pizlo <fpizlo@apple.com>
7449 JSC GC lazy sweep does not inline the common cases of cell destruction.
7450 https://bugs.webkit.org/show_bug.cgi?id=64745
7452 Reviewed by Oliver Hunt.
7454 This inlines the case of JSFinalObject destruction.
7456 * heap/MarkedBlock.cpp:
7457 (JSC::MarkedBlock::lazySweep):
7459 2011-07-18 Oliver Hunt <oliver@apple.com>
7461 Interpreter build-fix
7463 * interpreter/Interpreter.cpp:
7464 (JSC::Interpreter::privateExecute):
7466 2011-07-18 Filip Pizlo <fpizlo@apple.com>
7468 DFG JIT does not optimize equal-null comparisons and branches.
7469 https://bugs.webkit.org/show_bug.cgi?id=64659
7471 Reviewed by Gavin Barraclough.
7473 Added a peephole-aware compare-to-null implementation to JITCodeGenerator,
7474 which is used by both the speculative and non-speculative JIT. Through
7475 the use of the new isNullConstant helper, the two JITs invoke the
7476 nonSpecualtiveCompareNull() helper instead of their regular comparison
7477 helpers when compiling CompareEq. Through the use of the new isKnownCell
7478 helper, the compare-null code will skip the is-a-cell check if the
7479 speculative JIT had been speculating cell.
7481 * dfg/DFGJITCodeGenerator.cpp:
7482 (JSC::DFG::JITCodeGenerator::isKnownCell):
7483 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompareNull):
7484 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranchNull):
7485 (JSC::DFG::JITCodeGenerator::nonSpeculativeCompareNull):
7486 * dfg/DFGJITCodeGenerator.h:
7487 (JSC::DFG::JITCodeGenerator::isNullConstant):
7488 * dfg/DFGNonSpeculativeJIT.cpp:
7489 (JSC::DFG::NonSpeculativeJIT::compile):
7490 * dfg/DFGOperations.cpp:
7491 * dfg/DFGSpeculativeJIT.cpp:
7492 (JSC::DFG::SpeculativeJIT::compile):
7494 2011-07-18 James Robinson <jamesr@chromium.org>
7496 Timer scheduling should be based off the monotonic clock
7497 https://bugs.webkit.org/show_bug.cgi?id=64544
7499 Reviewed by Darin Adler.
7501 Switches ThreadCondition::timedWait and related utility functions from currentTime() to
7502 monotonicallyIncreasingTime().
7504 Add WTF::monotonicallyIncreasingTime() to list of exported functions so it can be accessed from WebCore/WebKit.
7506 * JavaScriptCore.exp:
7507 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7508 * wtf/ThreadingPthreads.cpp:
7509 (WTF::ThreadCondition::timedWait):
7510 * wtf/ThreadingWin.cpp:
7511 (WTF::absoluteTimeToWaitTimeoutInterval):
7512 * wtf/gtk/ThreadingGtk.cpp:
7513 (WTF::ThreadCondition::timedWait):
7514 * wtf/qt/ThreadingQt.cpp:
7515 (WTF::ThreadCondition::timedWait):
7517 2011-07-18 Filip Pizlo <fpizlo@apple.com>
7519 JSC JIT does not inline GC allocation fast paths
7520 https://bugs.webkit.org/show_bug.cgi?id=64582
7522 Reviewed by Oliver Hunt.
7524 This addresses inlining allocation for the easiest-to-allocate cases:
7525 op_new_object and op_create_this. Inlining GC allocation fast paths
7526 required three changes. First, the JSGlobalData now saves the vtable
7527 pointer of JSFinalObject, since that's what op_new_object and
7528 op_create_this allocate. Second, the Heap exposes a reference to
7529 the appropriate SizeClass, so that the JIT may inline accesses
7530 directly to the SizeClass for JSFinalObject allocations. And third,
7531 the JIT is extended with code to emit inline fast paths for GC
7532 allocation. A stub call is emitted in the case where the inline fast
7536 (JSC::Heap::sizeClassFor):
7537 (JSC::Heap::allocate):
7539 (JSC::JIT::privateCompileSlowCases):
7541 * jit/JITInlineMethods.h:
7542 (JSC::JIT::emitAllocateJSFinalObject):
7543 * jit/JITOpcodes.cpp:
7544 (JSC::JIT::emit_op_new_object):
7545 (JSC::JIT::emitSlow_op_new_object):
7546 (JSC::JIT::emit_op_create_this):
7547 (JSC::JIT::emitSlow_op_create_this):
7548 * jit/JITOpcodes32_64.cpp:
7549 (JSC::JIT::emit_op_new_object):
7550 (JSC::JIT::emitSlow_op_new_object):
7551 (JSC::JIT::emit_op_create_this):
7552 (JSC::JIT::emitSlow_op_create_this):
7553 * runtime/JSGlobalData.cpp:
7554 (JSC::JSGlobalData::storeVPtrs):
7555 * runtime/JSGlobalData.h:
7556 * runtime/JSObject.h:
7557 (JSC::JSFinalObject::JSFinalObject):
7558 (JSC::JSObject::offsetOfInheritorID):
7560 2011-07-18 Mark Hahnenberg <mhahnenberg@apple.com>
7562 Refactor JSC to replace JSCell::operator new with static create method
7563 https://bugs.webkit.org/show_bug.cgi?id=64466
7565 Reviewed by Oliver Hunt (oliver@apple.com) and Darin Adler (darin@apple.com).
7567 First step in a longer refactoring process to remove the use of
7568 operator new overloading in order to allocate GC objects and to replace
7569 this method with static create methods for each individual type of heap-allocated
7570 JS object. This particular patch only deals with replacing uses of
7571 operator new within JSC proper. Future patches will remove it from the
7572 parts that interface with the DOM. Due to the DOM's continued dependence
7573 on it, operator new has not actually been removed from JSCell.
7575 * API/JSCallbackConstructor.h:
7576 (JSC::JSCallbackConstructor::create):
7577 * API/JSCallbackFunction.h:
7578 (JSC::JSCallbackFunction::create):
7579 * API/JSCallbackObject.h:
7580 (JSC::JSCallbackObject::operator new):
7581 (JSC::JSCallbackObject::create):
7582 * API/JSCallbackObjectFunctions.h:
7583 (JSC::::staticFunctionGetter):
7584 * API/JSClassRef.cpp:
7585 (OpaqueJSClass::prototype):
7586 * API/JSContextRef.cpp:
7587 * API/JSObjectRef.cpp:
7589 (JSObjectMakeFunctionWithCallback):
7590 (JSObjectMakeConstructor):
7591 * JavaScriptCore.exp:
7592 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7593 * bytecode/CodeBlock.cpp:
7594 (JSC::CodeBlock::createActivation):
7595 * bytecompiler/BytecodeGenerator.cpp:
7596 (JSC::BytecodeGenerator::BytecodeGenerator):
7597 * bytecompiler/BytecodeGenerator.h:
7598 (JSC::BytecodeGenerator::makeFunction):
7599 * bytecompiler/NodesCodegen.cpp:
7600 (JSC::RegExpNode::emitBytecode):
7601 * interpreter/Interpreter.cpp:
7602 (JSC::Interpreter::privateExecute):
7603 (JSC::Interpreter::retrieveArguments):
7605 (JSC::DEFINE_STUB_FUNCTION):
7607 (GlobalObject::create):
7608 (GlobalObject::GlobalObject):
7611 * runtime/Arguments.h:
7612 (JSC::Arguments::create):
7613 (JSC::Arguments::createNoParameters):
7614 * runtime/ArrayConstructor.cpp:
7615 (JSC::constructArrayWithSizeQuirk):
7616 * runtime/ArrayConstructor.h:
7617 (JSC::ArrayConstructor::create):
7618 * runtime/ArrayPrototype.cpp:
7619 (JSC::arrayProtoFuncSplice):
7620 * runtime/ArrayPrototype.h:
7621 (JSC::ArrayPrototype::create):
7622 * runtime/BooleanConstructor.cpp:
7623 (JSC::constructBoolean):
7624 (JSC::constructBooleanFromImmediateBoolean):
7625 * runtime/BooleanConstructor.h:
7626 (JSC::BooleanConstructor::create):
7627 * runtime/BooleanObject.h:
7628 (JSC::BooleanObject::create):
7629 * runtime/BooleanPrototype.h:
7630 (JSC::BooleanPrototype::create):
7631 * runtime/DateConstructor.cpp:
7632 (JSC::constructDate):
7633 * runtime/DateConstructor.h:
7634 (JSC::DateConstructor::create):
7635 * runtime/DateInstance.h:
7636 (JSC::DateInstance::create):
7637 * runtime/DatePrototype.h:
7638 (JSC::DatePrototype::create):
7639 * runtime/Error.cpp:
7641 (JSC::createEvalError):
7642 (JSC::createRangeError):
7643 (JSC::createReferenceError):
7644 (JSC::createSyntaxError):
7645 (JSC::createTypeError):
7646 (JSC::createURIError):
7647 (JSC::StrictModeTypeErrorFunction::create):
7648 (JSC::createTypeErrorFunction):
7649 * runtime/ErrorConstructor.h:
7650 (JSC::ErrorConstructor::create):
7651 * runtime/ErrorInstance.cpp:
7652 (JSC::ErrorInstance::ErrorInstance):
7653 (JSC::ErrorInstance::create):
7654 * runtime/ErrorInstance.h:
7655 * runtime/ErrorPrototype.cpp:
7656 (JSC::ErrorPrototype::ErrorPrototype):
7657 * runtime/ErrorPrototype.h:
7658 (JSC::ErrorPrototype::create):
7659 * runtime/ExceptionHelpers.cpp:
7660 (JSC::InterruptedExecutionError::InterruptedExecutionError):
7661 (JSC::InterruptedExecutionError::create):
7662 (JSC::createInterruptedExecutionException):
7663 (JSC::TerminatedExecutionError::TerminatedExecutionError):
7664 (JSC::TerminatedExecutionError::create):
7665 (JSC::createTerminatedExecutionException):
7666 * runtime/Executable.cpp:
7667 (JSC::FunctionExecutable::FunctionExecutable):
7668 (JSC::FunctionExecutable::fromGlobalCode):
7669 * runtime/Executable.h:
7670 (JSC::ExecutableBase::create):
7671 (JSC::NativeExecutable::create):
7672 (JSC::ScriptExecutable::ScriptExecutable):
7673 (JSC::EvalExecutable::create):
7674 (JSC::ProgramExecutable::create):
7675 (JSC::FunctionExecutable::create):
7676 (JSC::FunctionExecutable::make):
7677 * runtime/FunctionConstructor.cpp:
7678 (JSC::constructFunctionSkippingEvalEnabledCheck):
7679 * runtime/FunctionConstructor.h:
7680 (JSC::FunctionConstructor::create):
7681 * runtime/FunctionPrototype.cpp:
7682 (JSC::FunctionPrototype::addFunctionProperties):
7683 * runtime/FunctionPrototype.h:
7684 (JSC::FunctionPrototype::create):
7685 * runtime/GetterSetter.h:
7686 (JSC::GetterSetter::create):
7687 * runtime/JSAPIValueWrapper.h:
7688 (JSC::JSAPIValueWrapper::create):
7689 (JSC::jsAPIValueWrapper):
7690 * runtime/JSActivation.cpp:
7691 (JSC::JSActivation::argumentsGetter):
7692 * runtime/JSActivation.h:
7693 (JSC::JSActivation::create):
7694 * runtime/JSArray.h:
7695 (JSC::JSArray::create):
7697 (JSC::JSCell::allocateCell):
7698 * runtime/JSFunction.h:
7699 (JSC::JSFunction::create):
7700 * runtime/JSGlobalObject.cpp:
7701 (JSC::JSGlobalObject::init):
7702 (JSC::JSGlobalObject::reset):
7703 * runtime/JSGlobalObject.h:
7704 (JSC::constructEmptyArray):
7705 (JSC::constructArray):
7706 * runtime/JSNotAnObject.h:
7707 (JSC::JSNotAnObject::create):
7708 * runtime/JSONObject.h:
7709 (JSC::JSONObject::create):
7710 * runtime/JSObject.cpp:
7711 (JSC::JSObject::defineGetter):
7712 (JSC::JSObject::defineSetter):
7713 (JSC::putDescriptor):
7714 * runtime/JSObject.h:
7715 (JSC::JSFinalObject::create):
7716 * runtime/JSPropertyNameIterator.cpp:
7717 (JSC::JSPropertyNameIterator::create):
7718 * runtime/JSPropertyNameIterator.h:
7719 (JSC::JSPropertyNameIterator::create):
7720 * runtime/JSString.cpp:
7721 (JSC::JSString::substringFromRope):
7722 (JSC::JSString::replaceCharacter):
7723 (JSC::StringObject::create):
7724 * runtime/JSString.h:
7725 (JSC::RopeBuilder::JSString):
7726 (JSC::RopeBuilder::create):
7727 (JSC::RopeBuilder::createHasOtherOwner):
7728 (JSC::jsSingleCharacterString):
7729 (JSC::jsSingleCharacterSubstring):
7730 (JSC::jsNontrivialString):
7733 (JSC::jsOwnedString):
7734 * runtime/JSValue.cpp:
7735 (JSC::JSValue::toObjectSlowCase):
7736 (JSC::JSValue::synthesizeObject):
7737 (JSC::JSValue::synthesizePrototype):
7738 * runtime/Lookup.cpp:
7739 (JSC::setUpStaticFunctionSlot):
7740 * runtime/MathObject.h:
7741 (JSC::MathObject::create):
7742 * runtime/NativeErrorConstructor.cpp:
7743 (JSC::NativeErrorConstructor::NativeErrorConstructor):
7744 * runtime/NativeErrorConstructor.h:
7745 (JSC::NativeErrorConstructor::create):
7746 * runtime/NativeErrorPrototype.h:
7747 (JSC::NativeErrorPrototype::create):
7748 * runtime/NumberConstructor.cpp:
7749 (JSC::constructWithNumberConstructor):
7750 * runtime/NumberConstructor.h:
7751 (JSC::NumberConstructor::create):
7752 * runtime/NumberObject.cpp:
7753 (JSC::constructNumber):
7754 * runtime/NumberObject.h:
7755 (JSC::NumberObject::create):
7756 * runtime/NumberPrototype.h:
7757 (JSC::NumberPrototype::create):
7758 * runtime/ObjectConstructor.h:
7759 (JSC::ObjectConstructor::create):
7760 * runtime/ObjectPrototype.h:
7761 (JSC::ObjectPrototype::create):
7762 * runtime/Operations.h:
7764 * runtime/RegExp.cpp:
7765 (JSC::RegExp::RegExp):
7766 (JSC::RegExp::createWithoutCaching):
7767 (JSC::RegExp::create):
7769 * runtime/RegExpCache.cpp:
7770 (JSC::RegExpCache::lookupOrCreate):
7771 * runtime/RegExpConstructor.cpp:
7772 (JSC::RegExpConstructor::arrayOfMatches):
7773 (JSC::constructRegExp):
7774 * runtime/RegExpConstructor.h:
7775 (JSC::RegExpConstructor::create):
7776 * runtime/RegExpMatchesArray.h:
7777 (JSC::RegExpMatchesArray::create):
7778 * runtime/RegExpObject.h:
7779 (JSC::RegExpObject::create):
7780 * runtime/RegExpPrototype.cpp:
7781 (JSC::regExpProtoFuncCompile):
7782 * runtime/RegExpPrototype.h:
7783 (JSC::RegExpPrototype::create):
7784 * runtime/ScopeChain.h:
7785 (JSC::ScopeChainNode::create):
7786 (JSC::ScopeChainNode::push):
7787 * runtime/SmallStrings.cpp:
7788 (JSC::SmallStrings::createEmptyString):
7789 (JSC::SmallStrings::createSingleCharacterString):
7790 * runtime/StringConstructor.cpp:
7791 (JSC::constructWithStringConstructor):
7792 * runtime/StringConstructor.h:
7793 (JSC::StringConstructor::create):
7794 * runtime/StringObject.h:
7795 (JSC::StringObject::create):
7796 * runtime/StringObjectThatMasqueradesAsUndefined.h:
7797 (JSC::StringObjectThatMasqueradesAsUndefined::create):
7798 * runtime/StringPrototype.cpp:
7799 (JSC::stringProtoFuncMatch):
7800 (JSC::stringProtoFuncSearch):
7801 * runtime/StringPrototype.h:
7802 (JSC::StringPrototype::create):
7803 * runtime/Structure.h:
7804 (JSC::Structure::create):
7805 (JSC::Structure::createStructure):
7806 * runtime/StructureChain.h:
7807 (JSC::StructureChain::create):
7809 2011-07-17 Ryuan Choi <ryuan.choi@samsung.com>
7811 [EFL] Refactor scheduleDispatchFunctionsOnMainThread to fix crash.
7812 https://bugs.webkit.org/show_bug.cgi?id=64337
7814 Replace ecore_timer_add to Ecore_Pipe.
7815 This is needed because ecore_timer should not be called in a child thread,
7816 but in the main thread.
7818 Reviewed by Antonio Gomes.
7820 * wtf/efl/MainThreadEfl.cpp:
7822 (WTF::monitorDispatchFunctions):
7823 (WTF::initializeMainThreadPlatform):
7824 (WTF::scheduleDispatchFunctionsOnMainThread):
7826 2011-07-17 Filip Pizlo <fpizlo@apple.com>
7828 DFG JIT operationCompareEqual does not inline JSValue::equalSlowCaseInline.
7829 https://bugs.webkit.org/show_bug.cgi?id=64637
7831 Reviewed by Gavin Barraclough.
7833 * dfg/DFGOperations.cpp:
7835 2011-07-16 Gavin Barraclough <barraclough@apple.com>
7837 https://bugs.webkit.org/show_bug.cgi?id=64657
7838 Converted this value not preserved when accessed via direct eval.
7840 Reviewed by Oliver Hunt.
7842 Upon entry into a non-strict function, primitive this values should be boxed as Object types
7843 (or substituted with the global object) - which is done by op_convert_this. However we only
7844 do so where this is used lexically within the function (we omit the conversion op if not).
7845 The problem comes if a direct eval (running within the function's scope) accesses the this
7848 We are safe in the case of a single eval, since the this object will be converted within
7849 callEval, however the converted value is not preserved, and a new wrapper object is allocated
7850 each time eval is invoked. This is inefficient and incorrect, since any changes to the wrapper
7851 object will be lost between eval statements.
7853 * bytecompiler/BytecodeGenerator.cpp:
7854 (JSC::BytecodeGenerator::BytecodeGenerator):
7855 - If a function uses eval, we always need to convert this.
7856 * interpreter/Interpreter.cpp:
7857 (JSC::Interpreter::execute):
7858 - Don't convert primitive values here - this is too late!
7859 (JSC::Interpreter::privateExecute):
7860 - Changed op_convert_this to call new isPrimitive method.
7862 (JSC::DEFINE_STUB_FUNCTION):
7863 - Changed op_convert_this to call new isPrimitive method.
7865 (JSC::JSCell::JSValue::isPrimitive):
7866 - Added JSValue::isPrimitive.
7867 * runtime/JSValue.h:
7868 - Added JSValue::isPrimitive.
7870 2011-07-16 Filip Pizlo <fpizlo@apple.com>
7872 DFG JIT compare/branch code emits is-integer tests even when a value is
7873 definitely not an integer.
7874 https://bugs.webkit.org/show_bug.cgi?id=64654
7876 Reviewed by Gavin Barraclough.
7878 Added the isKnownNotInteger() method, which returns true if a node is
7879 definitely not an integer and will always fail any is-integer test. Then
7880 modified the compare and branch code to use this method; if it returns
7881 true then is-int tests are omitted and the compiler always emits a slow
7884 * dfg/DFGJITCodeGenerator.cpp:
7885 (JSC::DFG::JITCodeGenerator::isKnownNotInteger):
7886 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
7887 (JSC::DFG::JITCodeGenerator::nonSpeculativeNonPeepholeCompare):
7888 (JSC::DFG::JITCodeGenerator::nonSpeculativeCompare):
7889 * dfg/DFGJITCodeGenerator.h:
7890 * dfg/DFGSpeculativeJIT.cpp:
7891 (JSC::DFG::SpeculativeJIT::compare):
7893 2011-07-16 Filip Pizlo <fpizlo@apple.com>
7895 DFG speculative JIT has dead code for slow calls for branches.
7896 https://bugs.webkit.org/show_bug.cgi?id=64653
7898 Reviewed by Gavin Barraclough.
7900 Removed SpeculativeJIT::compilePeepHoleCall.
7902 * dfg/DFGSpeculativeJIT.cpp:
7903 * dfg/DFGSpeculativeJIT.h:
7905 2011-07-15 Mark Rowe <mrowe@apple.com>
7911 2011-07-15 Gavin Barraclough <barraclough@apple.com>
7913 NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
7914 https://bugs.webkit.org/show_bug.cgi?id=55346
7916 Reviewed by Sam Weinig.
7918 * runtime/ErrorPrototype.cpp:
7919 (JSC::ErrorPrototype::ErrorPrototype):
7920 - Switch to putDirect since we're not the only ones tranitioning this Structure now.
7921 * runtime/NativeErrorPrototype.cpp:
7922 (JSC::NativeErrorPrototype::NativeErrorPrototype):
7923 * runtime/NativeErrorPrototype.h:
7924 - Switch base class to ErrorPrototype.
7926 2011-07-15 Gavin Barraclough <barraclough@apple.com>
7928 DFG JIT - Where arguments passed are integers, speculate this.
7929 https://bugs.webkit.org/show_bug.cgi?id=64630
7931 Reviewed by Sam Weinig.
7933 Presently the DFG JIT is overly aggressively predicting double.
7934 Use a bit of dynamic information, and curtail this a little.
7937 (JSC::DFG::Graph::predictArgumentTypes):
7938 - Check for integer arguments.
7940 - Function declaration.
7941 * runtime/Executable.cpp:
7942 (JSC::tryDFGCompile):
7943 (JSC::FunctionExecutable::compileForCallInternal):
7944 - Add call to predictArgumentTypes.
7946 2011-07-15 Filip Pizlo <fpizlo@apple.com>
7948 DFG JIT is inconsistent about fusing branches and speculating
7949 integer comparisons for branches.
7950 https://bugs.webkit.org/show_bug.cgi?id=64573
7952 Reviewed by Gavin Barraclough.
7954 This patch moves some of NonSpeculativeJIT's functionality up into the
7955 JITCodeGenerator superclass so that it can be used from both JITs. Now,
7956 in cases where the speculative JIT doesn't want to speculate but still
7957 wants to emit good code, it can reliably emit the same code sequence as
7958 the non-speculative JIT. This patch also extends the non-speculative
7959 JIT's compare optimizations to include compare/branch fusing, and
7960 extends the speculative JIT's compare optimizations to cover StrictEqual.
7962 * dfg/DFGJITCodeGenerator.cpp:
7963 (JSC::DFG::JITCodeGenerator::isKnownInteger):
7964 (JSC::DFG::JITCodeGenerator::isKnownNumeric):
7965 (JSC::DFG::JITCodeGenerator::nonSpeculativePeepholeBranch):
7966 (JSC::DFG::JITCodeGenerator::nonSpeculativeCompare):
7967 * dfg/DFGJITCodeGenerator.h:
7968 (JSC::DFG::JITCodeGenerator::detectPeepHoleBranch):
7969 * dfg/DFGNonSpeculativeJIT.cpp:
7970 (JSC::DFG::NonSpeculativeJIT::compile):
7971 * dfg/DFGNonSpeculativeJIT.h:
7972 * dfg/DFGOperations.cpp:
7973 * dfg/DFGSpeculativeJIT.cpp:
7974 (JSC::DFG::SpeculativeJIT::compare):
7975 (JSC::DFG::SpeculativeJIT::compile):
7976 * dfg/DFGSpeculativeJIT.h:
7979 2011-07-14 Gavin Barraclough <barraclough@apple.com>
7981 https://bugs.webkit.org/show_bug.cgi?id=64250
7982 Global strict mode function leaking global object as "this".
7984 Reviewed by Oliver Hunt.
7986 The root problem here is that we pass the wrong values into
7987 calls, and then try to fix them up in the callee. Correct
7988 behaviour per the spec is to pass in the value undefined,
7989 as this unless either (1) the function call is based on an
7990 explicit property access or (2) the base of the call comes
7991 directly from a 'with'.
7993 This change does away with the need for this conversion of
7994 objects (non strict code should only box primitives), and
7995 does away with all this conversion for strict functions.
7997 This patch may have web compatibility ramifications, and may
7998 require some advocacy.
8000 * bytecode/CodeBlock.cpp:
8001 (JSC::CodeBlock::dump):
8002 - Removed op_convert_this_strict, added op_resolve_with_this.
8003 * bytecode/Opcode.h:
8004 - Removed op_convert_this_strict, added op_resolve_with_this.
8005 * bytecompiler/BytecodeGenerator.cpp:
8006 (JSC::BytecodeGenerator::BytecodeGenerator):
8007 (JSC::BytecodeGenerator::emitResolveWithThis):
8008 - Removed op_convert_this_strict, added op_resolve_with_this.
8009 * bytecompiler/BytecodeGenerator.h:
8010 - Removed op_convert_this_strict, added op_resolve_with_this.
8011 * bytecompiler/NodesCodegen.cpp:
8012 (JSC::EvalFunctionCallNode::emitBytecode):
8013 (JSC::FunctionCallResolveNode::emitBytecode):
8014 - Removed op_convert_this_strict, added op_resolve_with_this.
8015 * dfg/DFGSpeculativeJIT.cpp:
8016 (JSC::DFG::SpeculativeJIT::compile):
8017 - Change NeedsThisConversion check to test for JSString's vptr
8018 (objects no longer need conversion).
8019 * interpreter/Interpreter.cpp:
8020 (JSC::Interpreter::resolveThisAndProperty):
8021 - Based on resolveBaseAndProperty, but produce correct this value.
8022 (JSC::Interpreter::privateExecute):
8023 - Removed op_convert_this_strict, added op_resolve_with_this.
8024 * interpreter/Interpreter.h:
8026 (JSC::JIT::privateCompileMainPass):
8027 (JSC::JIT::privateCompileSlowCases):
8028 - Removed op_convert_this_strict, added op_resolve_with_this.
8030 * jit/JITOpcodes.cpp:
8031 (JSC::JIT::emit_op_resolve_with_this):
8032 - Removed op_convert_this_strict, added op_resolve_with_this.
8033 (JSC::JIT::emit_op_convert_this):
8034 (JSC::JIT::emitSlow_op_convert_this):
8035 - Change NeedsThisConversion check to test for JSString's vptr
8036 (objects no longer need conversion).
8037 * jit/JITOpcodes32_64.cpp:
8038 (JSC::JIT::emit_op_resolve_with_this):
8039 - Removed op_convert_this_strict, added op_resolve_with_this.
8040 (JSC::JIT::emit_op_convert_this):
8041 (JSC::JIT::emitSlow_op_convert_this):
8042 - Change NeedsThisConversion check to test for JSString's vptr
8043 (objects no longer need conversion).
8045 (JSC::DEFINE_STUB_FUNCTION):
8046 - Removed op_convert_this_strict, added op_resolve_with_this.
8048 - Removed op_convert_this_strict, added op_resolve_with_this.
8049 * runtime/JSActivation.h:
8050 - removed NeedsThisConversion flag, added IsEnvironmentRecord.
8051 * runtime/JSStaticScopeObject.h:
8052 - removed NeedsThisConversion flag, added IsEnvironmentRecord.
8053 * runtime/JSString.h:
8054 (JSC::RopeBuilder::createStructure):
8055 - removed NeedsThisConversion.
8056 * runtime/JSTypeInfo.h:
8057 (JSC::TypeInfo::isEnvironmentRecord):
8058 (JSC::TypeInfo::overridesHasInstance):
8059 - removed NeedsThisConversion flag, added IsEnvironmentRecord.
8060 * runtime/JSValue.h:
8061 - removed NeedsThisConversion.
8062 * runtime/JSVariableObject.h:
8063 - Corrected StructureFlags inheritance.
8064 * runtime/StrictEvalActivation.h:
8065 (JSC::StrictEvalActivation::createStructure):
8066 - Added IsEnvironmentRecord to StructureFlags, addded createStructure.
8067 * runtime/Structure.h:
8068 - removed NeedsThisConversion.
8069 * tests/mozilla/ecma/String/15.5.4.6-2.js:
8071 - Removed invalid test case.
8073 2011-07-15 Sheriff Bot <webkit.review.bot@gmail.com>
8075 Unreviewed, rolling out r91082, r91087, and r91089.
8076 http://trac.webkit.org/changeset/91082
8077 http://trac.webkit.org/changeset/91087
8078 http://trac.webkit.org/changeset/91089
8079 https://bugs.webkit.org/show_bug.cgi?id=64616
8081 gtk tests are failing a lot after this change. (Requested by
8082 dave_levin on #webkit).
8084 * wtf/ThreadIdentifierDataPthreads.cpp:
8085 (WTF::ThreadIdentifierData::identifier):
8086 (WTF::ThreadIdentifierData::initialize):
8087 (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
8088 (WTF::ThreadIdentifierData::initializeKeyOnce):
8089 * wtf/ThreadIdentifierDataPthreads.h:
8090 * wtf/ThreadingPthreads.cpp:
8091 (WTF::initializeThreading):
8093 2011-07-15 David Levin <levin@chromium.org>
8095 Another attempted build fix.
8097 * wtf/ThreadIdentifierDataPthreads.cpp: Add include to pick
8098 up the definition of PTHREAD_KEYS_MAX.
8100 2011-07-15 David Levin <levin@chromium.org>
8104 * wtf/ThreadIdentifierDataPthreads.cpp: Add include to pick
8105 up the definition of PTHREAD_KEYS_MAX.
8107 2011-07-14 David Levin <levin@chromium.org>
8109 currentThread is too slow!
8110 https://bugs.webkit.org/show_bug.cgi?id=64577
8112 Reviewed by Darin Adler and Dmitry Titov.
8114 The problem is that currentThread results in a pthread_once call which always takes a lock.
8115 With this change, currentThread is 10% faster than isMainThread in release mode and only
8116 5% slower than isMainThread in debug.
8118 * wtf/ThreadIdentifierDataPthreads.cpp:
8119 (WTF::ThreadIdentifierData::initializeOnce): Remove the pthread once stuff
8120 which is no longer needed because this is called from initializeThreading().
8121 (WTF::ThreadIdentifierData::identifier): Remove the initializeKeyOnce call because
8122 intialization of the pthread key should already be done.
8123 (WTF::ThreadIdentifierData::initialize): Ditto.
8124 * wtf/ThreadIdentifierDataPthreads.h:
8125 * wtf/ThreadingPthreads.cpp:
8126 (WTF::initializeThreading): Acquire the pthread key here.
8128 2011-07-14 Filip Pizlo <fpizlo@apple.com>
8130 DFG JIT does not optimize Branch as well as it could.
8131 https://bugs.webkit.org/show_bug.cgi?id=64574
8133 Reviewed by Gavin Barraclough.
8135 This creates a common code path for emitting unfused branches, which does
8136 no speculation, and only performs a slow call if absolutely necessary.
8138 * dfg/DFGJITCodeGenerator.cpp:
8139 (JSC::DFG::JITCodeGenerator::emitBranch):
8140 * dfg/DFGJITCodeGenerator.h:
8141 * dfg/DFGNonSpeculativeJIT.cpp:
8142 (JSC::DFG::NonSpeculativeJIT::compile):
8143 * dfg/DFGSpeculativeJIT.cpp:
8144 (JSC::DFG::SpeculativeJIT::compile):
8146 2011-07-14 Filip Pizlo <fpizlo@apple.com>
8148 GC allocation fast path has too many operations.
8149 https://bugs.webkit.org/show_bug.cgi?id=64493
8151 Reviewed by Darin Adler.
8153 Changed the timing of the lazy sweep so that it occurs when we land on
8154 a previously-unsweeped block, rather than whenever we land on an unsweeped
8155 cell. After the per-block lazy sweep occurs, the block is turned into a
8156 singly linked list of free cells. The allocation fast path is now just a
8157 load-branch-store to remove a cell from the head of the list.
8159 Additionally, this changes the way new blocks are allocated. Previously,
8160 they would be populated with dummy cells. With this patch, they are
8161 turned into a free list, which means that there will never be destructor
8162 calls for allocations in fresh blocks.
8164 These changes result in a 1.9% speed-up on V8, and a 0.6% speed-up on
8165 SunSpider. There are no observed statistically significant slow-downs
8166 on any individual benchmark.
8168 * JavaScriptCore.exp:
8170 (JSC::Heap::allocateSlowCase):
8171 (JSC::Heap::collect):
8172 (JSC::Heap::canonicalizeBlocks):
8173 (JSC::Heap::resetAllocator):
8175 (JSC::Heap::forEachProtectedCell):
8176 (JSC::Heap::forEachCell):
8177 (JSC::Heap::forEachBlock):
8178 (JSC::Heap::allocate):
8179 * heap/MarkedBlock.cpp:
8180 (JSC::MarkedBlock::MarkedBlock):
8181 (JSC::MarkedBlock::lazySweep):
8182 (JSC::MarkedBlock::blessNewBlockForFastPath):
8183 (JSC::MarkedBlock::blessNewBlockForSlowPath):
8184 (JSC::MarkedBlock::canonicalizeBlock):
8185 * heap/MarkedBlock.h:
8186 * heap/NewSpace.cpp:
8187 (JSC::NewSpace::addBlock):
8188 (JSC::NewSpace::canonicalizeBlocks):
8190 (JSC::NewSpace::allocate):
8191 (JSC::NewSpace::SizeClass::SizeClass):
8192 (JSC::NewSpace::SizeClass::canonicalizeBlock):
8193 * heap/OldSpace.cpp:
8194 (JSC::OldSpace::addBlock):
8196 2011-07-14 Filip Pizlo <fpizlo@apple.com>
8198 DFG JIT crashes on host constructor calls in debug mode.
8199 https://bugs.webkit.org/show_bug.cgi?id=64562
8201 Reviewed by Gavin Barraclough.
8203 Fixed the relevant ASSERT.
8205 * dfg/DFGOperations.cpp:
8207 2011-07-14 Filip Pizlo <fpizlo@apple.com>
8209 DFG speculative JIT contains a FIXME for rewinding speculative code generation that
8210 has already been fixed.
8211 https://bugs.webkit.org/show_bug.cgi?id=64022
8213 Reviewed by Gavin Barraclough.
8215 * dfg/DFGSpeculativeJIT.h:
8216 (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
8218 2011-07-14 Ryuan Choi <ryuan.choi@samsung.com>
8220 [EFL] Add OwnPtr specialization for Ecore_Pipe.
8221 https://bugs.webkit.org/show_bug.cgi?id=64515
8223 Add an overload for deleteOwnedPtr(Ecore_Pipe*) on EFL port.
8225 Reviewed by Xan Lopez.
8227 * wtf/OwnPtrCommon.h:
8228 * wtf/efl/OwnPtrEfl.cpp:
8229 (WTF::deleteOwnedPtr):
8231 2011-07-14 Filip Pizlo <fpizlo@apple.com>
8233 DFG JIT unnecessarily boxes and unboxes values during silent spilling.
8234 https://bugs.webkit.org/show_bug.cgi?id=64068
8236 Reviewed by Gavin Barraclough.
8238 Silent spilling and filling of registers is done during slow-path C
8239 function calls. The silent spill/fill logic does not affect register
8240 allocation on paths that don't involve the C function call.
8242 This changes the silent spilling code to spill in unboxed form. The
8243 silent fill will refill in whatever form the register was spilled in.
8244 For example, the silent spill code may choose not to spill the register
8245 because it was already spilled previously, which would imply that it
8246 was spilled in boxed form. The filling code detects this and either
8247 unboxes, or not, depending on what is appropriate.
8249 This change also results in a simplification of the silent spill/fill
8250 API: silent spilling no longer needs to know about the set of registers
8251 that cannot be trampled, since it never does boxing and hence does not
8252 need a temporary register.
8254 * dfg/DFGJITCodeGenerator.cpp:
8255 (JSC::DFG::JITCodeGenerator::cachedGetById):
8256 (JSC::DFG::JITCodeGenerator::cachedPutById):
8257 * dfg/DFGJITCodeGenerator.h:
8258 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
8259 (JSC::DFG::JITCodeGenerator::silentSpillFPR):
8260 (JSC::DFG::JITCodeGenerator::silentFillFPR):
8261 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
8262 * dfg/DFGNonSpeculativeJIT.cpp:
8263 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
8264 (JSC::DFG::NonSpeculativeJIT::valueToInt32):
8265 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
8266 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
8267 (JSC::DFG::NonSpeculativeJIT::compare):
8268 (JSC::DFG::NonSpeculativeJIT::compile):
8269 * dfg/DFGSpeculativeJIT.cpp:
8270 (JSC::DFG::SpeculativeJIT::compile):
8272 2011-07-13 Michael Saboff <msaboff@apple.com>
8274 https://bugs.webkit.org/show_bug.cgi?id=64202
8275 Enh: Improve handling of RegExp in the form of /.*blah.*/
8277 Reviewed by Gavin Barraclough.
8279 Added code to both the Yarr interpreter and JIT to handle
8280 these expressions a little differently. First off, the terms
8281 in between the leading and trailing .*'s cannot capture and
8282 also this enhancement is limited to single alternative expressions.
8283 If an expression is of the right form with the aforementioned
8284 restrictions, we process the inner terms and then look for the
8285 beginning of the string and end of the string. There is handling
8286 for multiline expressions to allow the beginning and end to be
8287 right after and right before newlines.
8289 This enhancement speeds up expressions of this type 12x on
8292 Cleaned up 'case' statement indentation.
8294 A new set of tests was added as LayoutTests/fast/regex/dotstar.html
8296 * yarr/YarrInterpreter.cpp:
8297 (JSC::Yarr::Interpreter::InputStream::end):
8298 (JSC::Yarr::Interpreter::matchDotStarEnclosure):
8299 (JSC::Yarr::Interpreter::matchDisjunction):
8300 (JSC::Yarr::ByteCompiler::assertionDotStarEnclosure):
8301 (JSC::Yarr::ByteCompiler::emitDisjunction):
8302 * yarr/YarrInterpreter.h:
8303 (JSC::Yarr::ByteTerm::DotStarEnclosure):
8305 (JSC::Yarr::YarrGenerator::generateDotStarEnclosure):
8306 (JSC::Yarr::YarrGenerator::backtrackDotStarEnclosure):
8307 (JSC::Yarr::YarrGenerator::generateTerm):
8308 (JSC::Yarr::YarrGenerator::backtrackTerm):
8309 * yarr/YarrPattern.cpp:
8310 (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
8311 (JSC::Yarr::YarrPatternConstructor::containsCapturingTerms):
8312 (JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions):
8313 (JSC::Yarr::YarrPattern::compile):
8314 * yarr/YarrPattern.h:
8315 (JSC::Yarr::PatternTerm::PatternTerm):
8317 2011-07-13 Xan Lopez <xlopez@igalia.com>
8321 Reviewed by Martin Robinson.
8323 * GNUmakefile.list.am: add missing files.
8325 2011-07-13 Filip Pizlo <fpizlo@apple.com>
8327 DFG JIT does not implement prototype chain or list caching for get_by_id.
8328 https://bugs.webkit.org/show_bug.cgi?id=64147
8330 Reviewed by Gavin Barraclough.
8332 This implements unified support for prototype caching, prototype chain
8333 caching, and polymorphic (i.e. list) prototype and prototype chain
8334 caching. This is done by creating common code for emitting prototype
8335 or chain access stubs, and having it factored out into
8336 generateProtoChainAccessStub(). This function is called by
8337 tryCacheGetByID once the latter determines that some form of prototype
8338 access caching is necessary (i.e. the slot being accessed is not on the
8339 base value but on some other object).
8341 Direct prototype list, and prototype chain list, caching is implemented by
8342 linking the slow path to operationGetByIdProtoBuildList(), which uses the
8343 same helper function (generateProtoChainAccessStub()) as tryCacheGetByID.
8345 This change required ensuring that the value in the scratchGPR field in
8346 StructureStubInfo is preserved even after the stub info is in the
8347 chain, or proto_list, states. Hence scratchGPR was moved out of the union
8348 and into the top-level of StructureStubInfo.
8350 * bytecode/StructureStubInfo.h:
8351 * dfg/DFGJITCompiler.cpp:
8352 (JSC::DFG::JITCompiler::compileFunction):
8353 * dfg/DFGOperations.cpp:
8354 * dfg/DFGOperations.h:
8355 * dfg/DFGRepatch.cpp:
8356 (JSC::DFG::emitRestoreScratch):
8357 (JSC::DFG::linkRestoreScratch):
8358 (JSC::DFG::generateProtoChainAccessStub):
8359 (JSC::DFG::tryCacheGetByID):
8360 (JSC::DFG::tryBuildGetByIDProtoList):
8361 (JSC::DFG::dfgBuildGetByIDProtoList):
8362 (JSC::DFG::tryCachePutByID):
8365 2011-07-12 Brent Fulgham <bfulgham@webkit.org>
8367 Standardize WinCairo conditionalized code under PLATFORM macro.
8368 https://bugs.webkit.org/show_bug.cgi?id=64377
8370 Reviewed by Maciej Stachowiak.
8372 * wtf/Platform.h: Update to use PLATFORM(WIN_CAIRO) for tests.
8374 2011-07-13 David Levin <levin@chromium.org>
8376 Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger.
8377 https://bugs.webkit.org/show_bug.cgi?id=64465
8379 Reviewed by Dmitry Titov.
8381 There isn't a good way to test this as it is very highly unlikely to occur.
8383 * wtf/ThreadIdentifierDataPthreads.cpp:
8384 (WTF::ThreadIdentifierData::initializeKeyOnce): Since scoped static initialization
8385 isn't thread-safe, change the initialization to be global.
8387 2011-07-12 Gavin Barraclough <barraclough@apple.com>
8389 https://bugs.webkit.org/show_bug.cgi?id=64424
8390 Our direct eval behaviour deviates slightly from the spec.
8392 Reviewed by Oliver Hunt.
8394 The ES5 spec defines a concept of 'Direct Call to Eval' (see section 15.1.2.1.1), where
8395 behaviour will differ from that of an indirect call (e.g. " { eval: window.eval }.eval();"
8396 or "var a = eval; a();" are indirect calls), particularly in non-strict scopes variables
8397 may be introduced into the caller's environment.
8399 ES5 direct calls are any call where the callee function is provided by a reference, a base
8400 of that Reference is an EnvironmentRecord (this corresponds to all productions
8401 "PrimaryExpression: Identifier", see 10.2.2.1 GetIdentifierReference), and where the name
8402 of the reference is "eval". This means any expression of the form "eval(...)", and that
8403 calls the standard built in eval method from on the Global Object, is considered to be
8406 In JavaScriptCore we are currently overly restrictive. We also check that the
8407 EnvironmentRecord that is the base of the reference is the Declaractive Environment Record
8408 at the root of the scope chain, corresponding to the Global Object - an "eval(..)" statement
8409 that hits a var eval in a nested scope is not considered to be direct. This behaviour does
8410 not emanate from the spec, and is incorrect.
8412 * interpreter/Interpreter.cpp:
8413 (JSC::Interpreter::privateExecute):
8414 - Fixed direct eval check in op_call_eval.
8416 (JSC::DEFINE_STUB_FUNCTION):
8417 - Fixed direct eval check in op_call_eval.
8418 * runtime/Executable.h:
8419 (JSC::isHostFunction):
8420 - Added check for host function with specific NativeFunction.
8422 2011-07-13 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
8424 Reviewed by Andreas Kling.
8427 https://bugs.webkit.org/show_bug.cgi?id=63717
8429 QNX doesn't support pthread's SA_RESTART (required by
8430 JSC_MULTIPLE_THREADS), JIT is broken at runtime and there a
8431 few minor compilation errors here and there.
8433 Original patch by Ritt Konstantin <ritt.ks@gmail.com>, also
8434 tested by him on QNX v6.5 (x86)
8436 * wtf/DateMath.cpp: fix usage of abs/labs
8437 * wtf/Platform.h: Disable JIT and JSC_MULTIPLE_THREADS
8438 * wtf/StackBounds.cpp: Add a couple of missing includes (and sort them)
8440 2011-07-12 Anders Carlsson <andersca@apple.com>
8442 If a compiler has nullptr support, include <cstddef> to get the nullptr_t definition
8443 https://bugs.webkit.org/show_bug.cgi?id=64429
8445 Include the cstddef which has the nullptr_t typedef according to the C++0x standard.
8449 2011-07-13 MORITA Hajime <morrita@google.com>
8451 Refactoring: Ignored ExceptionCode value should be less annoying.
8452 https://bugs.webkit.org/show_bug.cgi?id=63688
8454 Added ASSERT_AT macro.
8456 Reviewed by Darin Adler.
8460 2011-07-12 Filip Pizlo <fpizlo@apple.com>
8462 DFG JIT does not implement op_construct.
8463 https://bugs.webkit.org/show_bug.cgi?id=64066
8465 Reviewed by Gavin Barraclough.
8467 This is a fixed implementation of op_construct. Constructor calls are implemented
8468 by reusing almost all of the code for Call, with care taken to make sure that
8469 where the are differences (like selecting different code blocks), those differences
8470 are respected. The two fixes over the last patch are: (1) make sure the
8471 CodeBlock::unlinkCalls respects differences between Call and Construct, and (2)
8472 make sure that virtualFor() in DFGOperations respects the CodeSpecializationKind
8473 (either CodeForCall or CodeForConstruct) when invoking the compiler.
8475 * dfg/DFGAliasTracker.h:
8476 (JSC::DFG::AliasTracker::recordConstruct):
8477 * dfg/DFGByteCodeParser.cpp:
8478 (JSC::DFG::ByteCodeParser::addCall):
8479 (JSC::DFG::ByteCodeParser::parseBlock):
8480 * dfg/DFGJITCodeGenerator.cpp:
8481 (JSC::DFG::JITCodeGenerator::emitCall):
8483 * dfg/DFGNonSpeculativeJIT.cpp:
8484 (JSC::DFG::NonSpeculativeJIT::compile):
8485 * dfg/DFGOperations.cpp:
8486 * dfg/DFGOperations.h:
8487 * dfg/DFGRepatch.cpp:
8488 (JSC::DFG::dfgLinkFor):
8490 * dfg/DFGSpeculativeJIT.cpp:
8491 (JSC::DFG::SpeculativeJIT::compile):
8492 * runtime/CodeBlock.cpp:
8493 (JSC::CodeBlock::unlinkCalls):
8495 2011-07-12 Oliver Hunt <oliver@apple.com>
8497 Overzealous type validation in method_check
8498 https://bugs.webkit.org/show_bug.cgi?id=64415
8500 Reviewed by Gavin Barraclough.
8502 method_check is essentially just a value look up
8503 optimisation, but it internally stores the value
8504 as a JSFunction, even though it never relies on
8505 this fact. Under GC validation however we end up
8506 trying to enforce that assumption. The fix is
8507 simply to store the value as a correct supertype.
8509 * bytecode/CodeBlock.h:
8510 * dfg/DFGRepatch.cpp:
8511 (JSC::DFG::dfgRepatchGetMethodFast):
8512 (JSC::DFG::tryCacheGetMethod):
8514 * jit/JITPropertyAccess.cpp:
8515 (JSC::JIT::patchMethodCallProto):
8517 (JSC::DEFINE_STUB_FUNCTION):
8519 2011-07-12 Filip Pizlo <fpizlo@apple.com>
8521 COLLECT_ON_EVERY_ALLOCATION no longer works.
8522 https://bugs.webkit.org/show_bug.cgi?id=64388
8524 Reviewed by Oliver Hunt.
8526 Added a flag to Heap that determines if it's safe to collect (which for now means that
8527 JSGlobalObject has actually been initialized, but it should work for other things, too).
8528 This allows JSGlobalObject to allocate even if the allocator wants to GC; instead of
8529 GCing it just grows the heap, if necessary.
8531 Then changed Heap::allocate() to not recurse ad infinitum when
8532 COLLECT_ON_EVERY_ALLOCATION is set. This also makes the allocator generally more
8533 resilient against bugs; this change allowed me to put in handy assertions, such as that
8534 an allocation must succeed after either a collection or after a new block was added.
8538 (JSC::Heap::tryAllocate):
8539 (JSC::Heap::allocate):
8540 (JSC::Heap::collectAllGarbage):
8541 (JSC::Heap::collect):
8543 (JSC::Heap::notifyIsSafeToCollect):
8544 * runtime/JSGlobalData.cpp:
8545 (JSC::JSGlobalData::JSGlobalData):
8547 2011-07-12 Filip Pizlo <fpizlo@apple.com>
8549 DFG JIT put_by_id transition caching does not inform the GC about the structure and
8550 prototype chain that it is referencing.
8551 https://bugs.webkit.org/show_bug.cgi?id=64387
8553 Reviewed by Gavin Barraclough.
8555 Fixed the relevant code in DFGRepatch to call StructureStubInfo::initPutByIdTransition().
8557 * dfg/DFGRepatch.cpp:
8558 (JSC::DFG::tryCachePutByID):
8560 2011-07-12 Adam Roben <aroben@apple.com>
8562 Ensure no intermediate WTF::Strings are created when concatenating with string literals
8564 Fixes <http://webkit.org/b/63330> Concatenating string literals and WTF::Strings using
8565 operator+ is suboptimal
8567 Reviewed by Darin Adler.
8569 * wtf/text/StringConcatenate.h:
8570 (WTF::StringTypeAdapter<String>::writeTo): Added a macro that can be used for testing how
8571 many WTF::Strings get copied while evaluating an operator+ expression.
8573 * wtf/text/StringOperators.h:
8574 (WTF::operator+): Changed the overload that takes a StringAppend to take it on the left-hand
8575 side, since operator+ is left-associative. Having the StringAppend on the right-hand side
8576 was causing us to make intermediate WTF::Strings when evaluating expressions that contained
8577 multiple calls to operator+. Added some more overloads for that take a left-hand side of
8578 const char* to resolve overload ambiguity for certain expressions. Added overloads that take
8579 a left-hand side of const UChar* (matching the const char* overloads) so that wide string
8580 literals don't first have to be converted to a WTF::String in operator+ expressions.
8582 2011-07-12 Adam Roben <aroben@apple.com>
8584 Unreviewed, rolling out r90811.
8585 http://trac.webkit.org/changeset/90811
8586 https://bugs.webkit.org/show_bug.cgi?id=61025
8588 Several svg tests failing assertions beneath
8589 SVGSMILElement::findInstanceTime
8591 * wtf/StdLibExtras.h:
8592 (WTF::binarySearch):
8594 2011-07-12 Oliver Varga <Varga.Oliver@stud.u-szeged.hu>
8596 Reviewed by Nikolas Zimmermann.
8598 Speed up SVGSMILElement::findInstanceTime.
8599 https://bugs.webkit.org/show_bug.cgi?id=61025
8601 Add a new parameter to StdlibExtras.h::binarySerarch function
8602 to also handle cases when the array does not contain the key value.
8603 This is needed for an svg function.
8605 * wtf/StdLibExtras.h:
8606 (WTF::binarySearch):
8608 2011-07-11 Filip Pizlo <fpizlo@apple.com>
8610 DFG speculative JIT does not guard itself against floating point speculation
8611 failures on non-floating-point constants.
8612 https://bugs.webkit.org/show_bug.cgi?id=64330
8614 Reviewed by Gavin Barraclough.
8616 Made fillSpeculateDouble immediate invoke terminateSpeculativeExecution() as
8617 soon as it notices that it's speculating on something that is a non-numeric
8620 * dfg/DFGSpeculativeJIT.cpp:
8621 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
8623 2011-07-11 Filip Pizlo <fpizlo@apple.com>
8625 DFG Speculative JIT does not always insert speculation checks when speculating
8627 https://bugs.webkit.org/show_bug.cgi?id=64254
8629 Reviewed by Gavin Barraclough.
8631 Changed the SetLocal instruction to always validate that the value being stored
8632 into the local variable is an array, if that variable was marked PredictArray.
8633 This is necessary since uses of arrays assume that if a PredictArray value is
8634 in a local variable then the speculation check validating that the value is an
8635 array was already performed.
8637 * dfg/DFGSpeculativeJIT.cpp:
8638 (JSC::DFG::SpeculativeJIT::compile):
8640 2011-07-11 Gabor Loki <loki@webkit.org>
8642 Fix the condition of the optimized code in doubleTransfer
8643 https://bugs.webkit.org/show_bug.cgi?id=64261
8645 Reviewed by Zoltan Herczeg.
8647 The condition of the optimized code in doubleTransfer is wrong. The
8648 data transfer should be executed with four bytes aligned address.
8649 VFP cannot perform unaligned memory access.
8651 Reported by Jacob Bramley.
8653 * assembler/ARMAssembler.cpp:
8654 (JSC::ARMAssembler::doubleTransfer):
8656 2011-07-11 Gabor Loki <loki@webkit.org>
8658 Signed arithmetic bug in dataTransfer32.
8659 https://bugs.webkit.org/show_bug.cgi?id=64257
8661 Reviewed by Zoltan Herczeg.
8663 An arithmetic bug is fixed. If the offset of dataTransfer is half of the
8664 addressable memory space on a 32-bit machine (-2147483648 = 0x80000000)
8665 a load instruction is emitted with a wrong zero offset.
8667 Inspired by Jacob Bramley's patch from JaegerMonkey.
8669 * assembler/ARMAssembler.cpp:
8670 (JSC::ARMAssembler::dataTransfer32):
8672 2011-07-09 Thouraya Andolsi <thouraya.andolsi@st.com>
8674 Fix unaligned userspace access for SH4 platforms.
8675 https://bugs.webkit.org/show_bug.cgi?id=62993
8679 2011-07-09 Chao-ying Fu <fu@mips.com>
8681 Fix MIPS build due to readInt32 and readPointer
8682 https://bugs.webkit.org/show_bug.cgi?id=63962
8684 * assembler/MIPSAssembler.h:
8685 (JSC::MIPSAssembler::readInt32):
8686 (JSC::MIPSAssembler::readPointer):
8687 * assembler/MacroAssemblerMIPS.h:
8688 (JSC::MacroAssemblerMIPS::rshift32):
8690 2011-07-08 Gavin Barraclough <barraclough@apple.com>
8692 https://bugs.webkit.org/show_bug.cgi?id=64181
8693 REGRESSION (r90602): Gmail doesn't load
8695 Rolling out r90601, r90602.
8697 * dfg/DFGAliasTracker.h:
8698 * dfg/DFGByteCodeParser.cpp:
8699 (JSC::DFG::ByteCodeParser::addVarArgChild):
8700 (JSC::DFG::ByteCodeParser::parseBlock):
8701 * dfg/DFGJITCodeGenerator.cpp:
8702 (JSC::DFG::JITCodeGenerator::emitCall):
8704 * dfg/DFGNonSpeculativeJIT.cpp:
8705 (JSC::DFG::NonSpeculativeJIT::compile):
8706 * dfg/DFGOperations.cpp:
8707 * dfg/DFGOperations.h:
8708 * dfg/DFGRepatch.cpp:
8709 (JSC::DFG::tryCacheGetByID):
8710 (JSC::DFG::dfgLinkCall):
8712 * dfg/DFGSpeculativeJIT.cpp:
8713 (JSC::DFG::SpeculativeJIT::compile):
8714 * runtime/JSObject.h:
8715 (JSC::JSObject::isUsingInlineStorage):
8717 2011-07-08 Kalev Lember <kalev@smartlink.ee>
8719 Reviewed by Adam Roben.
8721 Add missing _WIN32_WINNT and WINVER definitions
8722 https://bugs.webkit.org/show_bug.cgi?id=59702
8724 Moved _WIN32_WINNT and WINVER definitions to config.h so that they are
8725 available for all source files.
8727 In particular, wtf/FastMalloc.cpp uses CreateTimerQueueTimer and
8728 DeleteTimerQueueTimer which are both guarded by
8729 #if (_WIN32_WINNT >= 0x0500)
8733 * wtf/Assertions.cpp:
8735 2011-07-08 Chang Shu <cshu@webkit.org>
8737 Rename "makeSecure" to "fill" and remove the support for displaying last character
8738 to avoid layering violatation.
8739 https://bugs.webkit.org/show_bug.cgi?id=59114
8741 Reviewed by Alexey Proskuryakov.
8743 * JavaScriptCore.exp:
8744 * JavaScriptCore.order:
8745 * wtf/text/StringImpl.cpp:
8746 (WTF::StringImpl::fill):
8747 * wtf/text/StringImpl.h:
8748 * wtf/text/WTFString.h:
8749 (WTF::String::fill):
8751 2011-07-08 Benjamin Poulain <benjamin@webkit.org>
8753 [WK2] Do not forward touch events to the web process when it does not need them
8754 https://bugs.webkit.org/show_bug.cgi?id=64164
8756 Reviewed by Kenneth Rohde Christiansen.
8758 Add a convenience function to obtain a reference to the last element of a Deque.
8763 2011-07-07 Filip Pizlo <fpizlo@apple.com>
8765 DFG JIT does not implement op_construct.
8766 https://bugs.webkit.org/show_bug.cgi?id=64066
8768 Reviewed by Gavin Barraclough.
8770 * dfg/DFGAliasTracker.h:
8771 (JSC::DFG::AliasTracker::recordConstruct):
8772 * dfg/DFGByteCodeParser.cpp:
8773 (JSC::DFG::ByteCodeParser::addCall):
8774 (JSC::DFG::ByteCodeParser::parseBlock):
8775 * dfg/DFGJITCodeGenerator.cpp:
8776 (JSC::DFG::JITCodeGenerator::emitCall):
8778 * dfg/DFGNonSpeculativeJIT.cpp:
8779 (JSC::DFG::NonSpeculativeJIT::compile):
8780 * dfg/DFGOperations.cpp:
8781 * dfg/DFGOperations.h:
8782 * dfg/DFGRepatch.cpp:
8783 (JSC::DFG::dfgLinkFor):
8785 * dfg/DFGSpeculativeJIT.cpp:
8786 (JSC::DFG::SpeculativeJIT::compile):
8788 2011-07-07 Filip Pizlo <fpizlo@apple.com>
8790 DFG JIT does not implement get_by_id prototype caching.
8791 https://bugs.webkit.org/show_bug.cgi?id=64077
8793 Reviewed by Gavin Barraclough.
8795 * dfg/DFGRepatch.cpp:
8796 (JSC::DFG::emitRestoreScratch):
8797 (JSC::DFG::linkRestoreScratch):
8798 (JSC::DFG::tryCacheGetByID):
8799 * runtime/JSObject.h:
8800 (JSC::JSObject::addressOfPropertyAtOffset):
8802 2011-07-07 Filip Pizlo <fpizlo@apple.com>
8804 DFG JIT method_check implementation does not link to optimized get_by_id
8806 https://bugs.webkit.org/show_bug.cgi?id=64073
8808 Reviewed by Gavin Barraclough.
8810 * dfg/DFGRepatch.cpp:
8811 (JSC::DFG::dfgRepatchGetMethodFast):
8813 2011-07-07 Oliver Hunt <oliver@apple.com>
8815 Encode jump and link sizes into the appropriate enums
8816 https://bugs.webkit.org/show_bug.cgi?id=64123
8818 Reviewed by Sam Weinig.
8820 Finally kill off the out of line jump and link size arrays,
8821 so we can avoid icky loads and constant fold the linking arithmetic.
8823 * assembler/ARMv7Assembler.cpp:
8824 * assembler/ARMv7Assembler.h:
8825 (JSC::ARMv7Assembler::jumpSizeDelta):
8826 (JSC::ARMv7Assembler::computeJumpType):
8828 2011-07-06 Juan C. Montemayor <jmont@apple.com>
8830 ASSERT_NOT_REACHED running test 262
8831 https://bugs.webkit.org/show_bug.cgi?id=63951
8833 Added a case to the switch statement where the code was failing. Fixed
8834 some logic as well that gave faulty error messages.
8836 Reviewed by Gavin Barraclough.
8838 * parser/JSParser.cpp:
8839 (JSC::JSParser::getTokenName):
8840 (JSC::JSParser::updateErrorMessageSpecialCase):
8841 (JSC::JSParser::updateErrorMessage):
8843 2011-07-06 Filip Pizlo <fpizlo@apple.com>
8845 DFG JIT implementation of op_call results in regressions on sunspider
8846 controlflow-recursive.
8847 https://bugs.webkit.org/show_bug.cgi?id=64039
8849 Reviewed by Gavin Barraclough.
8851 * dfg/DFGByteCodeParser.cpp:
8852 (JSC::DFG::ByteCodeParser::isSmallInt32Constant):
8853 (JSC::DFG::ByteCodeParser::parseBlock):
8854 * dfg/DFGSpeculativeJIT.h:
8855 (JSC::DFG::SpeculativeJIT::isInteger):
8857 2011-07-06 Filip Pizlo <fpizlo@apple.com>
8859 DFG JIT does not support method_check
8860 https://bugs.webkit.org/show_bug.cgi?id=63972
8862 Reviewed by Gavin Barraclough.
8864 * assembler/CodeLocation.h:
8865 (JSC::CodeLocationPossiblyNearCall::CodeLocationPossiblyNearCall):
8866 * bytecode/CodeBlock.cpp:
8867 (JSC::CodeBlock::visitAggregate):
8868 * bytecode/CodeBlock.h:
8869 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
8870 (JSC::MethodCallLinkInfo::seenOnce):
8871 (JSC::MethodCallLinkInfo::setSeen):
8872 * dfg/DFGAliasTracker.h:
8873 (JSC::DFG::AliasTracker::recordGetMethod):
8874 * dfg/DFGByteCodeParser.cpp:
8875 (JSC::DFG::ByteCodeParser::parseBlock):
8876 * dfg/DFGJITCodeGenerator.cpp:
8877 (JSC::DFG::JITCodeGenerator::cachedGetById):
8878 (JSC::DFG::JITCodeGenerator::cachedGetMethod):
8879 * dfg/DFGJITCodeGenerator.h:
8880 * dfg/DFGJITCompiler.cpp:
8881 (JSC::DFG::JITCompiler::compileFunction):
8882 * dfg/DFGJITCompiler.h:
8883 (JSC::DFG::JITCompiler::addMethodGet):
8884 (JSC::DFG::JITCompiler::MethodGetRecord::MethodGetRecord):
8886 (JSC::DFG::Node::hasIdentifier):
8887 * dfg/DFGNonSpeculativeJIT.cpp:
8888 (JSC::DFG::NonSpeculativeJIT::compile):
8889 * dfg/DFGOperations.cpp:
8890 * dfg/DFGOperations.h:
8891 * dfg/DFGRepatch.cpp:
8892 (JSC::DFG::dfgRepatchGetMethodFast):
8893 (JSC::DFG::tryCacheGetMethod):
8894 (JSC::DFG::dfgRepatchGetMethod):
8896 * dfg/DFGSpeculativeJIT.cpp:
8897 (JSC::DFG::SpeculativeJIT::compile):
8898 * jit/JITWriteBarrier.h:
8899 (JSC::JITWriteBarrier::set):
8901 2011-07-06 Filip Pizlo <fpizlo@apple.com>
8903 DFG JIT op_call implementation will flush registers even when those registers are dead
8904 https://bugs.webkit.org/show_bug.cgi?id=64023
8906 Reviewed by Gavin Barraclough.
8908 * dfg/DFGJITCodeGenerator.cpp:
8909 (JSC::DFG::JITCodeGenerator::emitCall):
8910 * dfg/DFGJITCodeGenerator.h:
8911 (JSC::DFG::JITCodeGenerator::integerResult):
8912 (JSC::DFG::JITCodeGenerator::noResult):
8913 (JSC::DFG::JITCodeGenerator::cellResult):
8914 (JSC::DFG::JITCodeGenerator::jsValueResult):
8915 (JSC::DFG::JITCodeGenerator::doubleResult):
8916 * dfg/DFGNonSpeculativeJIT.cpp:
8917 (JSC::DFG::NonSpeculativeJIT::compile):
8918 * dfg/DFGSpeculativeJIT.cpp:
8919 (JSC::DFG::SpeculativeJIT::compile):
8921 2011-07-06 Filip Pizlo <fpizlo@apple.com>
8923 DFG speculative JIT may crash when speculating int on a non-int JSConstant.
8924 https://bugs.webkit.org/show_bug.cgi?id=64017
8926 Reviewed by Gavin Barraclough.
8928 * dfg/DFGSpeculativeJIT.cpp:
8929 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
8930 (JSC::DFG::SpeculativeJIT::compile):
8932 2011-07-06 Dmitriy Vyukov <dvyukov@google.com>
8934 Reviewed by David Levin.
8936 Allow substitution of dynamic annotations and prevent identical code folding by the linker.
8937 https://bugs.webkit.org/show_bug.cgi?id=62443
8939 * wtf/DynamicAnnotations.cpp:
8940 (WTFAnnotateBenignRaceSized):
8941 (WTFAnnotateHappensBefore):
8942 (WTFAnnotateHappensAfter):
8944 2011-07-06 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
8946 Calls on 32 bit machines are failed after r90423
8947 https://bugs.webkit.org/show_bug.cgi?id=63980
8949 Reviewed by Gavin Barraclough.
8951 Copy the necessary lines from JITCall.cpp.
8953 * jit/JITCall32_64.cpp:
8954 (JSC::JIT::compileOpCall):
8956 2011-07-05 Filip Pizlo <fpizlo@apple.com>
8958 DFG JIT virtual call implementation is inefficient.
8959 https://bugs.webkit.org/show_bug.cgi?id=63974
8961 Reviewed by Gavin Barraclough.
8963 * dfg/DFGOperations.cpp:
8964 * runtime/Executable.h:
8965 (JSC::ExecutableBase::generatedJITCodeForCallWithArityCheck):
8966 (JSC::ExecutableBase::generatedJITCodeForConstructWithArityCheck):
8967 (JSC::ExecutableBase::generatedJITCodeWithArityCheckFor):
8968 (JSC::ExecutableBase::hasJITCodeForCall):
8969 (JSC::ExecutableBase::hasJITCodeForConstruct):
8970 (JSC::ExecutableBase::hasJITCodeFor):
8971 * runtime/JSFunction.h:
8972 (JSC::JSFunction::scopeUnchecked):
8974 2011-07-05 Oliver Hunt <oliver@apple.com>
8976 Force inlining of simple functions that show up as not being inlined
8977 https://bugs.webkit.org/show_bug.cgi?id=63964
8979 Reviewed by Gavin Barraclough.
8981 Looking at profile data indicates the gcc is failing to inline a
8982 number of trivial functions. This patch hits the ones that show
8983 up in profiles with the ALWAYS_INLINE hammer.
8985 We also replace the memcpy() call in linking with a manual loop.
8986 Apparently memcpy() is almost never faster than an inlined loop.
8988 * assembler/ARMv7Assembler.h:
8989 (JSC::ARMv7Assembler::add):
8990 (JSC::ARMv7Assembler::add_S):
8991 (JSC::ARMv7Assembler::ARM_and):
8992 (JSC::ARMv7Assembler::asr):
8993 (JSC::ARMv7Assembler::b):
8994 (JSC::ARMv7Assembler::blx):
8995 (JSC::ARMv7Assembler::bx):
8996 (JSC::ARMv7Assembler::clz):
8997 (JSC::ARMv7Assembler::cmn):
8998 (JSC::ARMv7Assembler::cmp):
8999 (JSC::ARMv7Assembler::eor):
9000 (JSC::ARMv7Assembler::it):
9001 (JSC::ARMv7Assembler::ldr):
9002 (JSC::ARMv7Assembler::ldrCompact):
9003 (JSC::ARMv7Assembler::ldrh):
9004 (JSC::ARMv7Assembler::ldrb):
9005 (JSC::ARMv7Assembler::lsl):
9006 (JSC::ARMv7Assembler::lsr):
9007 (JSC::ARMv7Assembler::movT3):
9008 (JSC::ARMv7Assembler::mov):
9009 (JSC::ARMv7Assembler::movt):
9010 (JSC::ARMv7Assembler::mvn):
9011 (JSC::ARMv7Assembler::neg):
9012 (JSC::ARMv7Assembler::orr):
9013 (JSC::ARMv7Assembler::orr_S):
9014 (JSC::ARMv7Assembler::ror):
9015 (JSC::ARMv7Assembler::smull):
9016 (JSC::ARMv7Assembler::str):
9017 (JSC::ARMv7Assembler::sub):
9018 (JSC::ARMv7Assembler::sub_S):
9019 (JSC::ARMv7Assembler::tst):
9020 (JSC::ARMv7Assembler::linkRecordSourceComparator):
9021 (JSC::ARMv7Assembler::link):
9022 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp5Reg3Imm8):
9023 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp5Imm5Reg3Reg3):
9024 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp7Reg3Reg3Reg3):
9025 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp8Imm8):
9026 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp8RegReg143):
9027 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp9Imm7):
9028 (JSC::ARMv7Assembler::ARMInstructionFormatter::oneWordOp10Reg3Reg3):
9029 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg4FourFours):
9030 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp16FourFours):
9031 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp16Op16):
9032 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
9033 (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp12Reg4Reg4Imm12):
9034 (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
9035 (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
9036 * assembler/LinkBuffer.h:
9037 (JSC::LinkBuffer::linkCode):
9038 * assembler/MacroAssemblerARMv7.h:
9039 (JSC::MacroAssemblerARMv7::nearCall):
9040 (JSC::MacroAssemblerARMv7::call):
9041 (JSC::MacroAssemblerARMv7::ret):
9042 (JSC::MacroAssemblerARMv7::moveWithPatch):
9043 (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
9044 (JSC::MacroAssemblerARMv7::storePtrWithPatch):
9045 (JSC::MacroAssemblerARMv7::tailRecursiveCall):
9046 (JSC::MacroAssemblerARMv7::makeTailRecursiveCall):
9047 (JSC::MacroAssemblerARMv7::jump):
9048 (JSC::MacroAssemblerARMv7::makeBranch):
9050 2011-07-05 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
9052 Make "Add optimised paths for a few maths functions" work on Qt
9053 https://bugs.webkit.org/show_bug.cgi?id=63893
9055 Reviewed by Oliver Hunt.
9057 Move the generated code to the .text section instead of .data section.
9058 Fix alignment for the 32 bit thunk code.
9060 * jit/ThunkGenerators.cpp:
9062 2011-07-05 Filip Pizlo <fpizlo@apple.com>
9064 DFG JIT does not implement op_call.
9065 https://bugs.webkit.org/show_bug.cgi?id=63858
9067 Reviewed by Gavin Barraclough.
9069 * bytecode/CodeBlock.cpp:
9070 (JSC::CodeBlock::unlinkCalls):
9071 * bytecode/CodeBlock.h:
9072 (JSC::CodeBlock::setNumberOfCallLinkInfos):
9073 (JSC::CodeBlock::numberOfCallLinkInfos):
9074 * bytecompiler/BytecodeGenerator.cpp:
9075 (JSC::BytecodeGenerator::emitCall):
9076 (JSC::BytecodeGenerator::emitConstruct):
9077 * dfg/DFGAliasTracker.h:
9078 (JSC::DFG::AliasTracker::lookupGetByVal):
9079 (JSC::DFG::AliasTracker::recordCall):
9080 (JSC::DFG::AliasTracker::equalIgnoringLaterNumericConversion):
9081 * dfg/DFGByteCodeParser.cpp:
9082 (JSC::DFG::ByteCodeParser::ByteCodeParser):
9083 (JSC::DFG::ByteCodeParser::getLocal):
9084 (JSC::DFG::ByteCodeParser::getArgument):
9085 (JSC::DFG::ByteCodeParser::toInt32):
9086 (JSC::DFG::ByteCodeParser::addToGraph):
9087 (JSC::DFG::ByteCodeParser::addVarArgChild):
9088 (JSC::DFG::ByteCodeParser::predictInt32):
9089 (JSC::DFG::ByteCodeParser::parseBlock):
9090 (JSC::DFG::ByteCodeParser::processPhiStack):
9091 (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
9093 (JSC::DFG::Graph::opName):
9094 (JSC::DFG::Graph::dump):
9095 (JSC::DFG::Graph::refChildren):
9097 * dfg/DFGJITCodeGenerator.cpp:
9098 (JSC::DFG::JITCodeGenerator::useChildren):
9099 (JSC::DFG::JITCodeGenerator::emitCall):
9100 * dfg/DFGJITCodeGenerator.h:
9101 (JSC::DFG::JITCodeGenerator::addressOfCallData):
9102 * dfg/DFGJITCompiler.cpp:
9103 (JSC::DFG::JITCompiler::compileFunction):
9104 * dfg/DFGJITCompiler.h:
9105 (JSC::DFG::CallRecord::CallRecord):
9106 (JSC::DFG::JITCompiler::notifyCall):
9107 (JSC::DFG::JITCompiler::appendCallWithFastExceptionCheck):
9108 (JSC::DFG::JITCompiler::addJSCall):
9109 (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
9110 (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
9112 (JSC::DFG::Node::Node):
9113 (JSC::DFG::Node::child1):
9114 (JSC::DFG::Node::child2):
9115 (JSC::DFG::Node::child3):
9116 (JSC::DFG::Node::firstChild):
9117 (JSC::DFG::Node::numChildren):
9118 * dfg/DFGNonSpeculativeJIT.cpp:
9119 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
9120 (JSC::DFG::NonSpeculativeJIT::compare):
9121 (JSC::DFG::NonSpeculativeJIT::compile):
9122 * dfg/DFGOperations.cpp:
9123 * dfg/DFGOperations.h:
9124 * dfg/DFGRepatch.cpp:
9125 (JSC::DFG::dfgLinkCall):
9127 * dfg/DFGSpeculativeJIT.cpp:
9128 (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
9129 (JSC::DFG::SpeculativeJIT::compilePeepHoleCall):
9130 (JSC::DFG::SpeculativeJIT::compile):
9131 * dfg/DFGSpeculativeJIT.h:
9132 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
9133 * interpreter/CallFrame.h:
9134 (JSC::ExecState::calleeAsValue):
9137 (JSC::JIT::privateCompileMainPass):
9138 (JSC::JIT::privateCompileSlowCases):
9139 (JSC::JIT::privateCompile):
9140 (JSC::JIT::linkCall):
9141 (JSC::JIT::linkConstruct):
9143 (JSC::JIT::compileOpCall):
9145 (JSC::JITCode::JITCode):
9146 (JSC::JITCode::jitType):
9147 (JSC::JITCode::HostFunction):
9148 * runtime/JSFunction.h:
9149 * runtime/JSGlobalData.h:
9151 2011-07-05 Oliver Hunt <oliver@apple.com>
9153 Initialize new MarkStack member
9156 (JSC::MarkStack::MarkStack):
9158 2011-07-05 Oliver Hunt <oliver@apple.com>
9160 Don't throw out compiled code repeatedly
9161 https://bugs.webkit.org/show_bug.cgi?id=63960
9163 Reviewed by Gavin Barraclough.
9165 Stop throwing away all compiled code every time
9166 we're told to do a full GC. Instead unlink all
9167 callsites during such GC passes to maximise the
9168 number of collectable functions, but otherwise
9169 leave compiled functions alone.
9173 * bytecode/CodeBlock.cpp:
9174 (JSC::CodeBlock::visitAggregate):
9176 (JSC::Heap::collectAllGarbage):
9178 (JSC::MarkStack::shouldUnlinkCalls):
9179 (JSC::MarkStack::setShouldUnlinkCalls):
9180 * runtime/JSGlobalData.cpp:
9181 (JSC::JSGlobalData::recompileAllJSFunctions):
9182 (JSC::JSGlobalData::releaseExecutableMemory):
9183 * runtime/RegExp.cpp:
9184 (JSC::RegExp::compile):
9185 (JSC::RegExp::invalidateCode):
9188 2011-07-05 Filip Pizlo <fpizlo@apple.com>
9190 JSC JIT has code duplication for the handling of call and construct
9191 https://bugs.webkit.org/show_bug.cgi?id=63957
9193 Reviewed by Gavin Barraclough.
9196 (JSC::JIT::linkFor):
9199 (JSC::jitCompileFor):
9200 (JSC::DEFINE_STUB_FUNCTION):
9201 (JSC::arityCheckFor):
9203 * runtime/Executable.h:
9204 (JSC::ExecutableBase::generatedJITCodeFor):
9205 (JSC::FunctionExecutable::compileFor):
9206 (JSC::FunctionExecutable::isGeneratedFor):
9207 (JSC::FunctionExecutable::generatedBytecodeFor):
9208 (JSC::FunctionExecutable::generatedJITCodeWithArityCheckFor):
9210 2011-07-05 Gavin Barraclough <barraclough@apple.com>
9212 Build fix following last patch.
9214 * runtime/JSFunction.cpp:
9215 (JSC::createPrototypeProperty):
9217 2011-07-05 Gavin Barraclough <barraclough@apple.com>
9219 https://bugs.webkit.org/show_bug.cgi?id=63947
9220 ASSERT running Object.preventExtensions(Math.sin)
9222 Reviewed by Oliver Hunt.
9224 This is due to calling scope() on a hostFunction as a part of
9225 calling createPrototypeProperty to reify the prototype property.
9226 But host functions don't have a prototype property anyway!
9228 Prevent callling createPrototypeProperty on a host function.
9230 * runtime/JSFunction.cpp:
9231 (JSC::JSFunction::createPrototypeProperty):
9232 (JSC::JSFunction::preventExtensions):
9234 2011-07-04 Gavin Barraclough <barraclough@apple.com>
9236 https://bugs.webkit.org/show_bug.cgi?id=63880
9237 Evaluation order of conversions of operands to >, >= incorrect.
9239 Reviewed by Sam Weinig.
9241 Add 'leftFirst' parameter to jsLess, jsLessEq matching that described in the ES5
9242 spec. This allows these methods to be reused to perform >, >= relational compares
9243 with correct ordering of type conversions.
9245 * dfg/DFGOperations.cpp:
9246 * interpreter/Interpreter.cpp:
9247 (JSC::Interpreter::privateExecute):
9249 (JSC::DEFINE_STUB_FUNCTION):
9250 * runtime/Operations.h:
9254 2011-07-04 Gavin Barraclough <barraclough@apple.com>
9256 Reviewed by Sam Weinig.
9258 https://bugs.webkit.org/show_bug.cgi?id=16652
9259 Firefox and JavaScriptCore differ in Number.toString(integer)
9261 Our arbitrary radix (2..36) toString conversion is inaccurate.
9262 This is partly because it uses doubles to perform math that requires
9263 higher accuracy, and partly becasue it does not attempt to correctly
9264 detect where to terminate, instead relying on a simple 'epsilon'.
9266 * runtime/NumberPrototype.cpp:
9267 (JSC::decomposeDouble):
9268 - helper function to extract sign, exponent, mantissa from IEEE doubles.
9269 (JSC::Uint16WithFraction::Uint16WithFraction):
9270 - helper class, u16int with infinite precision fraction, used to convert
9271 the fractional part of the number to a string.
9272 (JSC::Uint16WithFraction::operator*=):
9273 - Multiply by a uint16.
9274 (JSC::Uint16WithFraction::operator<):
9275 - Compare two Uint16WithFractions.
9276 (JSC::Uint16WithFraction::floorAndSubtract):
9277 - Extract the integer portion of the number, and subtract it (clears the integer portion).
9278 (JSC::Uint16WithFraction::comparePoint5):
9280 (JSC::Uint16WithFraction::sumGreaterThanOne):
9281 - Passed a second Uint16WithFraction, returns true if the result of adding
9282 the two values would be greater than one.
9283 (JSC::Uint16WithFraction::isNormalized):
9284 - Used by ASSERTs to consistency check internal representation.
9285 (JSC::BigInteger::BigInteger):
9286 - helper class, unbounded integer value, used to convert the integer part
9287 of the number to a string.
9288 (JSC::BigInteger::divide):
9289 - Divide this value through by a uint32.
9290 (JSC::BigInteger::operator!):
9292 (JSC::toStringWithRadix):
9293 - Performs number to string conversion, with the given radix (2..36).
9294 (JSC::numberProtoFuncToString):
9295 - Changed to use toStringWithRadix.
9297 2011-07-04 Gavin Barraclough <barraclough@apple.com>
9299 https://bugs.webkit.org/show_bug.cgi?id=63881
9300 Need separate bytecodes for handling >, >= comparisons.
9302 Reviewed by Oliver Hunt.
9304 This clears the way to fix Bug#63880. We currently handle greater-than comparisons
9305 as being using the corresponding op_less, etc opcodes. This is incorrect with
9306 respect to evaluation ordering of the implicit conversions performed on operands -
9307 we should be calling ToPrimitive on the LHS and RHS operands to the greater than,
9308 but instead convert RHS then LHS.
9310 This patch adds opcodes for greater-than comparisons mirroring existing ones used
9313 * bytecode/CodeBlock.cpp:
9314 (JSC::CodeBlock::dump):
9315 * bytecode/Opcode.h:
9316 * bytecompiler/BytecodeGenerator.cpp:
9317 (JSC::BytecodeGenerator::emitJumpIfTrue):
9318 (JSC::BytecodeGenerator::emitJumpIfFalse):
9319 * bytecompiler/NodesCodegen.cpp:
9320 * dfg/DFGByteCodeParser.cpp:
9321 (JSC::DFG::ByteCodeParser::parseBlock):
9323 * dfg/DFGNonSpeculativeJIT.cpp:
9324 (JSC::DFG::NonSpeculativeJIT::compare):
9325 (JSC::DFG::NonSpeculativeJIT::compile):
9326 * dfg/DFGNonSpeculativeJIT.h:
9327 * dfg/DFGOperations.cpp:
9328 * dfg/DFGOperations.h:
9329 * dfg/DFGSpeculativeJIT.cpp:
9330 (JSC::DFG::SpeculativeJIT::compare):
9331 (JSC::DFG::SpeculativeJIT::compile):
9332 * dfg/DFGSpeculativeJIT.h:
9333 * interpreter/Interpreter.cpp:
9334 (JSC::Interpreter::privateExecute):
9336 (JSC::JIT::privateCompileMainPass):
9337 (JSC::JIT::privateCompileSlowCases):
9339 (JSC::JIT::emit_op_loop_if_greater):
9340 (JSC::JIT::emitSlow_op_loop_if_greater):
9341 (JSC::JIT::emit_op_loop_if_greatereq):
9342 (JSC::JIT::emitSlow_op_loop_if_greatereq):
9343 * jit/JITArithmetic.cpp:
9344 (JSC::JIT::emit_op_jgreater):
9345 (JSC::JIT::emit_op_jgreatereq):
9346 (JSC::JIT::emit_op_jngreater):
9347 (JSC::JIT::emit_op_jngreatereq):
9348 (JSC::JIT::emitSlow_op_jgreater):
9349 (JSC::JIT::emitSlow_op_jgreatereq):
9350 (JSC::JIT::emitSlow_op_jngreater):
9351 (JSC::JIT::emitSlow_op_jngreatereq):
9352 (JSC::JIT::emit_compareAndJumpSlow):
9353 * jit/JITArithmetic32_64.cpp:
9354 (JSC::JIT::emitBinaryDoubleOp):
9356 (JSC::DEFINE_STUB_FUNCTION):
9358 * parser/NodeConstructors.h:
9359 (JSC::GreaterNode::GreaterNode):
9360 (JSC::GreaterEqNode::GreaterEqNode):
9363 2011-07-03 Gavin Barraclough <barraclough@apple.com>
9365 https://bugs.webkit.org/show_bug.cgi?id=63879
9366 Reduce code duplication for op_jless, op_jlesseq, op_jnless, op_jnlesseq.
9368 Reviewed by Sam Weinig.
9370 There is a lot of copy & paste code here; we can reduce duplication by making
9371 a shared implementation.
9373 * assembler/MacroAssembler.h:
9374 (JSC::MacroAssembler::branch32):
9375 (JSC::MacroAssembler::commute):
9376 - Make these function platform agnostic.
9377 * assembler/MacroAssemblerX86Common.h:
9378 - Moved branch32/commute up to MacroAssembler.
9380 (JSC::JIT::emit_op_loop_if_lesseq):
9381 (JSC::JIT::emitSlow_op_loop_if_lesseq):
9382 - Add an implementation matching that for op_loop_if_less, which just calls op_jless.
9383 * jit/JITArithmetic.cpp:
9384 (JSC::JIT::emit_op_jless):
9385 (JSC::JIT::emit_op_jlesseq):
9386 (JSC::JIT::emit_op_jnless):
9387 (JSC::JIT::emit_op_jnlesseq):
9388 (JSC::JIT::emitSlow_op_jless):
9389 (JSC::JIT::emitSlow_op_jlesseq):
9390 (JSC::JIT::emitSlow_op_jnless):
9391 (JSC::JIT::emitSlow_op_jnlesseq):
9392 - Common implmentations of these methods for JSVALUE64 & JSVALUE32_64.
9393 (JSC::JIT::emit_compareAndJump):
9394 (JSC::JIT::emit_compareAndJumpSlow):
9395 - Internal implmementation of jless etc for JSVALUE64.
9396 * jit/JITArithmetic32_64.cpp:
9397 (JSC::JIT::emit_compareAndJump):
9398 (JSC::JIT::emit_compareAndJumpSlow):
9399 - Internal implmementation of jless etc for JSVALUE32_64.
9400 * jit/JITOpcodes.cpp:
9401 * jit/JITOpcodes32_64.cpp:
9404 - Remove old implementation of emit_op_loop_if_lesseq.
9406 2011-07-03 Sheriff Bot <webkit.review.bot@gmail.com>
9408 Unreviewed, rolling out r90347.
9409 http://trac.webkit.org/changeset/90347
9410 https://bugs.webkit.org/show_bug.cgi?id=63886
9412 Build breaks on Leopard, Chromium-win, WinCairo, and WinCE.
9413 (Requested by tkent on #webkit).
9415 * JavaScriptCore.xcodeproj/project.pbxproj:
9416 * runtime/BigInteger.h: Removed.
9417 * runtime/NumberPrototype.cpp:
9418 (JSC::numberProtoFuncToPrecision):
9419 (JSC::numberProtoFuncToString):
9420 * runtime/Uint16WithFraction.h: Removed.
9423 2011-06-30 Gavin Barraclough <barraclough@apple.com>
9425 Reviewed by Sam Weinig.
9427 https://bugs.webkit.org/show_bug.cgi?id=16652
9428 Firefox and JavaScriptCore differ in Number.toString(integer)
9430 Our arbitrary radix (2..36) toString conversion is inaccurate.
9431 This is partly because it uses doubles to perform math that requires
9432 higher accuracy, and partly becasue it does not attempt to correctly
9433 detect where to terminate, instead relying on a simple 'epsilon'.
9435 * runtime/NumberPrototype.cpp:
9436 (JSC::decomposeDouble):
9437 - helper function to extract sign, exponent, mantissa from IEEE doubles.
9438 (JSC::Uint16WithFraction::Uint16WithFraction):
9439 - helper class, u16int with infinite precision fraction, used to convert
9440 the fractional part of the number to a string.
9441 (JSC::Uint16WithFraction::operator*=):
9442 - Multiply by a uint16.
9443 (JSC::Uint16WithFraction::operator<):
9444 - Compare two Uint16WithFractions.
9445 (JSC::Uint16WithFraction::floorAndSubtract):
9446 - Extract the integer portion of the number, and subtract it (clears the integer portion).
9447 (JSC::Uint16WithFraction::comparePoint5):
9449 (JSC::Uint16WithFraction::sumGreaterThanOne):
9450 - Passed a second Uint16WithFraction, returns true if the result of adding
9451 the two values would be greater than one.
9452 (JSC::Uint16WithFraction::isNormalized):
9453 - Used by ASSERTs to consistency check internal representation.
9454 (JSC::BigInteger::BigInteger):
9455 - helper class, unbounded integer value, used to convert the integer part
9456 of the number to a string.
9457 (JSC::BigInteger::divide):
9458 - Divide this value through by a uint32.
9459 (JSC::BigInteger::operator!):
9461 (JSC::toStringWithRadix):
9462 - Performs number to string conversion, with the given radix (2..36).
9463 (JSC::numberProtoFuncToString):
9464 - Changed to use toStringWithRadix.
9466 2011-07-02 Gavin Barraclough <barraclough@apple.com>
9468 https://bugs.webkit.org/show_bug.cgi?id=63866
9469 DFG JIT - implement instanceof
9471 Reviewed by Sam Weinig.
9473 Add ops CheckHasInstance & InstanceOf to implement bytecodes
9474 op_check_has_instance & op_instanceof. This is an initial
9475 functional implementation, performance is a wash. We can
9476 follow up with changes to fuse the InstanceOf node with
9477 a subsequant branch, as we do with other comparisons.
9479 * dfg/DFGByteCodeParser.cpp:
9480 (JSC::DFG::ByteCodeParser::parseBlock):
9481 * dfg/DFGJITCompiler.cpp:
9482 (JSC::DFG::JITCompiler::jitAssertIsCell):
9483 * dfg/DFGJITCompiler.h:
9484 (JSC::DFG::JITCompiler::jitAssertIsCell):
9486 * dfg/DFGNonSpeculativeJIT.cpp:
9487 (JSC::DFG::NonSpeculativeJIT::compile):
9488 * dfg/DFGOperations.cpp:
9489 * dfg/DFGOperations.h:
9490 * dfg/DFGSpeculativeJIT.cpp:
9491 (JSC::DFG::SpeculativeJIT::compile):
9493 2011-07-01 Oliver Hunt <oliver@apple.com>
9495 IE Web Workers demo crashes in JSC::SlotVisitor::visitChildren()
9496 https://bugs.webkit.org/show_bug.cgi?id=63732
9498 Reviewed by Gavin Barraclough.
9500 Initialise the memory at the head of the new storage so that
9501 GC is safe if triggered by reportExtraMemoryCost.
9503 * runtime/JSArray.cpp:
9504 (JSC::JSArray::increaseVectorPrefixLength):
9506 2011-07-01 Oliver Hunt <oliver@apple.com>
9508 GC sweep can occur before an object is completely initialised
9509 https://bugs.webkit.org/show_bug.cgi?id=63836
9511 Reviewed by Gavin Barraclough.
9513 In rare cases it's possible for a GC sweep to occur while a
9514 live, but not completely initialised object is on the stack.
9515 In such a case we may incorrectly choose to mark it, even
9516 though it has no children that need marking.
9518 We resolve this by always zeroing out the structure of any
9519 value returned from JSCell::operator new(), and making the
9520 markstack tolerant of a null structure.
9523 (JSC::JSCell::JSCell::~JSCell):
9524 (JSC::JSCell::JSCell::operator new):
9525 * runtime/Structure.h:
9526 (JSC::MarkStack::internalAppend):
9528 2011-07-01 Filip Pizlo <fpizlo@apple.com>
9530 Reviewed by Gavin Barraclough.
9532 DFG non-speculative JIT always performs slow C calls for div and mod.
9533 https://bugs.webkit.org/show_bug.cgi?id=63684
9535 * dfg/DFGNonSpeculativeJIT.cpp:
9536 (JSC::DFG::NonSpeculativeJIT::compile):
9538 2011-07-01 Juan C. Montemayor <jmont@apple.com>
9540 Reviewed by Oliver Hunt.
9542 Lexer error messages are currently appalling
9543 https://bugs.webkit.org/show_bug.cgi?id=63340
9545 Added error messages for the Lexer. These messages will be displayed
9546 instead of the lexer error messages from the parser that are currently
9550 (JSC::Lexer::getInvalidCharMessage):
9551 (JSC::Lexer::setCode):
9552 (JSC::Lexer::parseString):
9554 (JSC::Lexer::clear):
9556 (JSC::Lexer::getErrorMessage):
9557 (JSC::Lexer::setOffset):
9558 * parser/Parser.cpp:
9559 (JSC::Parser::parse):
9561 2011-07-01 Jungshik Shin <jshin@chromium.org>
9563 Reviewed by Alexey Proskuryakov.
9565 Add ScriptCodesFromICU.h to wtf/unicode and make necessary changes in
9566 build files for ports not using ICU.
9567 Add icu/unicode/uscript.h for ports using ICU. It's taken from
9568 ICU 3.6 (the version used on Mac OS 10.5)
9570 http://bugs.webkit.org/show_bug.cgi?id=20797
9572 * GNUmakefile.list.am:
9573 * JavaScriptCore.gypi:
9574 * icu/unicode/uscript.h: Added for UScriptCode enum.
9575 * wtf/unicode/ScriptCodesFromICU.h: UScriptCode enum added.
9576 * wtf/unicode/icu/UnicodeIcu.h:
9577 * wtf/unicode/brew/UnicodeBrew.h:
9578 * wtf/unicode/glib/UnicodeGLib.h:
9579 * wtf/unicode/qt4/UnicodeQt4.h:
9580 * wtf/unicode/wince/UnicodeWinCE.h:
9582 2011-07-01 Gavin Barraclough <barraclough@apple.com>
9584 Reviewed by Sam Weinig.
9586 https://bugs.webkit.org/show_bug.cgi?id=63819
9587 Escaping of forwardslashes in strings incorrect if multiple exist.
9589 The bug is in the parameters passed to a substring - should be
9590 start & length, but we're passing start & end indices!
9592 * runtime/RegExpObject.cpp:
9593 (JSC::regExpObjectSource):
9595 2011-07-01 Adam Roben <aroben@apple.com>
9598 http://trac.webkit.org/changeset/90194
9599 https://bugs.webkit.org/show_bug.cgi?id=63778
9601 Fixes <http://webkit.org/b/63812> REGRESSION (r90194): Multiple tests intermittently failing
9602 assertions in WriteBarrierBase<JSC::Structure>::get
9605 (JSC::JSCell::JSCell::~JSCell):
9607 2011-06-30 Oliver Hunt <oliver@apple.com>
9609 Reviewed by Gavin Barraclough.
9611 Add optimised paths for a few maths functions
9612 https://bugs.webkit.org/show_bug.cgi?id=63757
9614 Relanding as a Mac only patch.
9616 This adds specialised thunks for Math.abs, Math.round, Math.ceil,
9617 Math.floor, Math.log, and Math.exp as they are apparently more
9618 important in real web content than we thought, which is somewhat
9619 mind-boggling. On average doubles the performance of the common
9620 cases (eg. actually passing numbers in). They're not as efficient
9621 as they could be, but this way gives them the most portability.
9623 * assembler/MacroAssemblerARM.h:
9624 (JSC::MacroAssemblerARM::supportsDoubleBitops):
9625 (JSC::MacroAssemblerARM::andnotDouble):
9626 * assembler/MacroAssemblerARMv7.h:
9627 (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
9628 (JSC::MacroAssemblerARMv7::andnotDouble):
9629 * assembler/MacroAssemblerMIPS.h:
9630 (JSC::MacroAssemblerMIPS::andnotDouble):
9631 (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
9632 * assembler/MacroAssemblerSH4.h:
9633 (JSC::MacroAssemblerSH4::supportsDoubleBitops):
9634 (JSC::MacroAssemblerSH4::andnotDouble):
9635 * assembler/MacroAssemblerX86.h:
9636 (JSC::MacroAssemblerX86::supportsDoubleBitops):
9637 * assembler/MacroAssemblerX86Common.h:
9638 (JSC::MacroAssemblerX86Common::andnotDouble):
9639 * assembler/MacroAssemblerX86_64.h:
9640 (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
9641 * assembler/X86Assembler.h:
9642 (JSC::X86Assembler::andnpd_rr):
9643 * create_hash_table:
9644 * jit/SpecializedThunkJIT.h:
9645 (JSC::SpecializedThunkJIT::finalize):
9646 (JSC::SpecializedThunkJIT::callDoubleToDouble):
9647 * jit/ThunkGenerators.cpp:
9648 (JSC::floorThunkGenerator):
9649 (JSC::ceilThunkGenerator):
9650 (JSC::roundThunkGenerator):
9651 (JSC::expThunkGenerator):
9652 (JSC::logThunkGenerator):
9653 (JSC::absThunkGenerator):
9654 * jit/ThunkGenerators.h:
9656 2011-07-01 David Kilzer <ddkilzer@apple.com>
9658 <http://webkit.org/b/63814> Fix clang build error in JITOpcodes32_64.cpp
9660 Fixes the following build error in clang:
9662 JavaScriptCore/jit/JITOpcodes32_64.cpp:741:36:{741:9-741:35}: error: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wparentheses,3]
9663 map(m_bytecodeOffset + dynamic ? OPCODE_LENGTH(op_resolve_global_dynamic) : OPCODE_LENGTH(op_resolve_global), dst, regT1, regT0);
9664 ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
9665 JavaScriptCore/jit/JITOpcodes32_64.cpp:741:36: note: place parentheses around the '+' expression to silence this warning [3]
9666 map(m_bytecodeOffset + dynamic ? OPCODE_LENGTH(op_resolve_global_dynamic) : OPCODE_LENGTH(op_resolve_global), dst, regT1, regT0);
9669 fix-it:"JavaScriptCore/jit/JITOpcodes32_64.cpp":{741:9-741:9}:"("
9670 fix-it:"JavaScriptCore/jit/JITOpcodes32_64.cpp":{741:35-741:35}:")"
9671 JavaScriptCore/jit/JITOpcodes32_64.cpp:741:36:{741:28-741:94}: note: place parentheses around the '?:' expression to evaluate it first [3]
9672 map(m_bytecodeOffset + dynamic ? OPCODE_LENGTH(op_resolve_global_dynamic) : OPCODE_LENGTH(op_resolve_global), dst, regT1, regT0);
9673 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9676 * jit/JITOpcodes32_64.cpp:
9677 (JSC::JIT::emit_op_resolve_global): Add parenthesis to make the
9678 tertiary expression evaluate first.
9680 2011-07-01 Sheriff Bot <webkit.review.bot@gmail.com>
9682 Unreviewed, rolling out r90177 and r90179.
9683 http://trac.webkit.org/changeset/90177
9684 http://trac.webkit.org/changeset/90179
9685 https://bugs.webkit.org/show_bug.cgi?id=63790
9687 It caused crashes on Qt in debug mode (Requested by Ossy on
9690 * assembler/MacroAssemblerARM.h:
9691 (JSC::MacroAssemblerARM::rshift32):
9692 (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
9693 (JSC::MacroAssemblerARM::sqrtDouble):
9694 * assembler/MacroAssemblerARMv7.h:
9695 (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
9696 (JSC::MacroAssemblerARMv7::sqrtDouble):
9697 * assembler/MacroAssemblerMIPS.h:
9698 (JSC::MacroAssemblerMIPS::sqrtDouble):
9699 (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
9700 * assembler/MacroAssemblerSH4.h:
9701 (JSC::MacroAssemblerSH4::sqrtDouble):
9702 * assembler/MacroAssemblerX86.h:
9703 * assembler/MacroAssemblerX86Common.h:
9704 * assembler/MacroAssemblerX86_64.h:
9705 * assembler/X86Assembler.h:
9706 * create_hash_table:
9707 * jit/JSInterfaceJIT.h:
9708 (JSC::JSInterfaceJIT::emitLoadDouble):
9709 * jit/SpecializedThunkJIT.h:
9710 (JSC::SpecializedThunkJIT::finalize):
9711 * jit/ThunkGenerators.cpp:
9712 * jit/ThunkGenerators.h:
9714 2011-06-30 Oliver Hunt <oliver@apple.com>
9716 Reviewed by Beth Dakin.
9718 Make GC validation clear cell structure on destruction
9719 https://bugs.webkit.org/show_bug.cgi?id=63778
9722 (JSC::JSCell::JSCell::~JSCell):
9724 2011-06-30 Geoffrey Garen <ggaren@apple.com>
9726 Reviewed by Gavin Barraclough.
9728 Added write barrier that was missing from put_by_id_transition
9729 https://bugs.webkit.org/show_bug.cgi?id=63775
9731 * dfg/DFGJITCodeGenerator.cpp:
9732 (JSC::DFG::JITCodeGenerator::writeBarrier): Made this static with a
9733 MacroAssembler& argument so our patching functions could use it.
9735 (JSC::DFG::JITCodeGenerator::cachedPutById):
9736 * dfg/DFGJITCodeGenerator.h:
9737 * dfg/DFGNonSpeculativeJIT.cpp:
9738 (JSC::DFG::NonSpeculativeJIT::compile): Updated for signature change.
9740 * dfg/DFGRepatch.cpp:
9741 (JSC::DFG::tryCachePutByID): Missing barrier!
9743 * dfg/DFGSpeculativeJIT.cpp:
9744 (JSC::DFG::SpeculativeJIT::compile): Updated for signature change.
9746 * jit/JITPropertyAccess.cpp:
9747 (JSC::JIT::privateCompilePutByIdTransition):
9748 * jit/JITPropertyAccess32_64.cpp:
9749 (JSC::JIT::privateCompilePutByIdTransition):
9750 * jit/JSInterfaceJIT.h: Same game here. Removed storePtrWithWriteBarrier
9751 because its meaning isn't clear -- maybe in the future we'll have a
9752 clear way to pass all stores through a common function that guarantees
9753 a write barrier, but that's not the case right now.
9755 2011-06-30 Filip Pizlo <fpizlo@apple.com>
9757 Reviewed by Gavin Barraclough.
9759 DFG non-speculative JIT does not reuse registers when compiling comparisons.
9760 https://bugs.webkit.org/show_bug.cgi?id=63565
9762 * dfg/DFGNonSpeculativeJIT.cpp:
9763 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
9764 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
9765 (JSC::DFG::NonSpeculativeJIT::compare):
9767 2011-06-30 Geoffrey Garen <ggaren@apple.com>
9769 Reviewed by Gavin Barraclough.
9771 Added empty write barrier stubs in all the right places in the DFG JIT
9772 https://bugs.webkit.org/show_bug.cgi?id=63764
9774 SunSpider thinks this might be a 0.5% speedup. Meh.
9776 * dfg/DFGJITCodeGenerator.cpp:
9777 (JSC::DFG::JITCodeGenerator::writeBarrier): Le stub.
9779 (JSC::DFG::JITCodeGenerator::cachedPutById): Don't do anything special
9780 for the case where base == scratch, since we now require base and scratch
9781 to be not equal, for the sake of the write barrier.
9783 * dfg/DFGJITCodeGenerator.h: Le stub.
9785 * dfg/DFGNonSpeculativeJIT.cpp:
9786 (JSC::DFG::NonSpeculativeJIT::compile): Don't reuse the base register
9787 as the scratch register, since that's incompatible with the write barrier,
9788 which needs a distinct base and scratch.
9790 Do put the global object into a register before loading its var storage,
9791 since it needs to be in a register for the write barrier to operate on it.
9793 * dfg/DFGSpeculativeJIT.cpp:
9794 (JSC::DFG::SpeculativeJIT::compile):
9795 * jit/JITPropertyAccess.cpp:
9796 (JSC::JIT::emitWriteBarrier): Second verse, same as the first.
9798 * jit/JITPropertyAccess.cpp:
9799 (JSC::JIT::emit_op_get_scoped_var):
9800 (JSC::JIT::emit_op_put_scoped_var):
9801 (JSC::JIT::emit_op_put_global_var): Deployed offsetOfRegisters() to more
9804 (JSC::JIT::emitWriteBarrier): Added a teeny tiny ASSERT so this function
9805 is a little more than meaningless.
9807 * jit/JITPropertyAccess32_64.cpp:
9808 (JSC::JIT::emit_op_get_scoped_var):
9809 (JSC::JIT::emit_op_put_scoped_var):
9810 (JSC::JIT::emit_op_put_global_var): Deployed offsetOfRegisters() to more
9813 (JSC::JIT::emitWriteBarrier): Added a teeny tiny ASSERT so this function
9814 is a little more than meaningless.
9816 * runtime/JSVariableObject.h:
9817 (JSC::JSVariableObject::offsetOfRegisters): Now used by the JIT, since
9818 we put the global object in a register and only then load its var storage
9821 (JSC::JIT::emitWriteBarrier):
9823 2011-06-30 Oliver Hunt <oliver@apple.com>
9827 * assembler/MacroAssemblerARM.h:
9828 (JSC::MacroAssemblerARM::rshift32):
9830 2011-06-30 Oliver Hunt <oliver@apple.com>
9832 Reviewed by Gavin Barraclough.
9834 Add optimised paths for a few maths functions
9835 https://bugs.webkit.org/show_bug.cgi?id=63757
9837 This adds specialised thunks for Math.abs, Math.round, Math.ceil,
9838 Math.floor, Math.log, and Math.exp as they are apparently more
9839 important in real web content than we thought, which is somewhat
9840 mind-boggling. On average doubles the performance of the common
9841 cases (eg. actually passing numbers in). They're not as efficient
9842 as they could be, but this way gives them the most portability.
9844 * assembler/MacroAssemblerARM.h:
9845 (JSC::MacroAssemblerARM::supportsDoubleBitops):
9846 (JSC::MacroAssemblerARM::andnotDouble):
9847 * assembler/MacroAssemblerARMv7.h:
9848 (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
9849 (JSC::MacroAssemblerARMv7::andnotDouble):
9850 * assembler/MacroAssemblerMIPS.h:
9851 (JSC::MacroAssemblerMIPS::andnotDouble):
9852 (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
9853 * assembler/MacroAssemblerSH4.h:
9854 (JSC::MacroAssemblerSH4::supportsDoubleBitops):
9855 (JSC::MacroAssemblerSH4::andnotDouble):
9856 * assembler/MacroAssemblerX86.h:
9857 (JSC::MacroAssemblerX86::supportsDoubleBitops):
9858 * assembler/MacroAssemblerX86Common.h:
9859 (JSC::MacroAssemblerX86Common::andnotDouble):
9860 * assembler/MacroAssemblerX86_64.h:
9861 (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
9862 * assembler/X86Assembler.h:
9863 (JSC::X86Assembler::andnpd_rr):
9864 * create_hash_table:
9865 * jit/SpecializedThunkJIT.h:
9866 (JSC::SpecializedThunkJIT::finalize):
9867 (JSC::SpecializedThunkJIT::callDoubleToDouble):
9868 * jit/ThunkGenerators.cpp:
9869 (JSC::floorThunkGenerator):
9870 (JSC::ceilThunkGenerator):
9871 (JSC::roundThunkGenerator):
9872 (JSC::expThunkGenerator):
9873 (JSC::logThunkGenerator):
9874 (JSC::absThunkGenerator):
9875 * jit/ThunkGenerators.h:
9877 2011-06-30 Cary Clark <caryclark@google.com>
9879 Reviewed by James Robinson.
9881 Use Skia if Skia on Mac Chrome is enabled
9882 https://bugs.webkit.org/show_bug.cgi?id=62999
9885 Add switch to use Skia if, externally,
9886 Skia has been enabled by a gyp define.
9888 2011-06-30 Juan C. Montemayor <jmont@apple.com>
9890 Reviewed by Geoffrey Garen.
9892 Web Inspector fails to display source for eval with syntax error
9893 https://bugs.webkit.org/show_bug.cgi?id=63583
9895 Web Inspector now displays a link to an eval statement that contains
9901 (JSC::Parser::parse):
9903 2011-06-30 Filip Pizlo <fpizlo@apple.com>
9905 Reviewed by Gavin Barraclough.
9907 X86Assembler does not encode byte registers in 64-bit mode correctly.
9908 https://bugs.webkit.org/show_bug.cgi?id=63665
9910 * assembler/X86Assembler.h:
9911 (JSC::X86Assembler::testb_rr):
9912 (JSC::X86Assembler::X86InstructionFormatter::oneByteOp8):
9914 2011-06-30 Sheriff Bot <webkit.review.bot@gmail.com>
9916 Unreviewed, rolling out r90102.
9917 http://trac.webkit.org/changeset/90102
9918 https://bugs.webkit.org/show_bug.cgi?id=63714
9920 Lots of tests asserting beneath
9921 SVGSMILElement::findInstanceTime (Requested by aroben on
9924 * wtf/StdLibExtras.h:
9925 (WTF::binarySearch):
9927 2011-06-30 Oliver Varga <Varga.Oliver@stud.u-szeged.hu>
9929 Reviewed by Nikolas Zimmermann.
9931 Speed up SVGSMILElement::findInstanceTime.
9932 https://bugs.webkit.org/show_bug.cgi?id=61025
9934 Add a new parameter to StdlibExtras.h::binarySerarch function
9935 to also handle cases when the array does not contain the key value.
9936 This is needed for an svg function.
9938 * wtf/StdLibExtras.h:
9939 (WTF::binarySearch):
9941 2011-06-29 Gavin Barraclough <barraclough@apple.com>
9943 Reviewed by Geoff Garen.
9945 https://bugs.webkit.org/show_bug.cgi?id=63669
9946 DFG JIT - fix spectral-norm regression
9948 The problem is a mis-speculation leading to us falling off the speculative path.
9949 Make the speculation logic slightly smarter, don't predict int if one of the
9950 operands is already loaded as a double (we use this logic already for compares).
9952 * dfg/DFGSpeculativeJIT.cpp:
9953 (JSC::DFG::SpeculativeJIT::compile):
9954 * dfg/DFGSpeculativeJIT.h:
9955 (JSC::DFG::SpeculativeJIT::shouldSpeculateInteger):
9957 2011-06-29 Filip Pizlo <fpizlo@apple.com>
9959 Reviewed by Gavin Barraclough.
9961 DFG JIT does not do put_by_id transition caching.
9962 https://bugs.webkit.org/show_bug.cgi?id=63662
9964 * dfg/DFGJITCodeGenerator.cpp:
9965 (JSC::DFG::JITCodeGenerator::cachedPutById):
9966 * dfg/DFGJITCompiler.h:
9967 (JSC::DFG::JITCompiler::addPropertyAccess):
9968 * dfg/DFGRepatch.cpp:
9969 (JSC::DFG::testPrototype):
9970 (JSC::DFG::tryCachePutByID):
9972 2011-06-29 Geoffrey Garen <ggaren@apple.com>
9974 Reviewed by Oliver Hunt.
9976 Added a dummy write barrier emitting function in all the right places in the old JIT
9977 https://bugs.webkit.org/show_bug.cgi?id=63667
9979 SunSpider reports no change.
9982 * jit/JITPropertyAccess.cpp:
9983 (JSC::JIT::emit_op_put_by_id):
9984 (JSC::JIT::emit_op_put_scoped_var): Do it.
9986 (JSC::JIT::emit_op_put_global_var): Global object needs to be in a register
9987 for the sake of the write barrier.
9989 (JSC::JIT::emitWriteBarrier): Empty for now. Not for long!
9991 * jit/JITPropertyAccess32_64.cpp:
9992 (JSC::JIT::emit_op_put_by_val):
9993 (JSC::JIT::emit_op_put_by_id):
9994 (JSC::JIT::emit_op_put_scoped_var): Do it.
9996 (JSC::JIT::emit_op_put_global_var): Global object needs to be in a register
9997 for the sake of the write barrier.
9999 (JSC::JIT::emitWriteBarrier): Empty for now. Not for long!
10001 2011-06-29 Filip Pizlo <fpizlo@apple.com>
10003 Reviewed by Gavin Barraclough.
10005 DFG JIT does not perform get_by_id self list caching.
10006 https://bugs.webkit.org/show_bug.cgi?id=63605
10008 * bytecode/StructureStubInfo.h:
10009 * dfg/DFGJITCompiler.cpp:
10010 (JSC::DFG::JITCompiler::compileFunction):
10011 * dfg/DFGOperations.cpp:
10012 * dfg/DFGOperations.h:
10013 * dfg/DFGRepatch.cpp:
10014 (JSC::DFG::tryCacheGetByID):
10015 (JSC::DFG::tryBuildGetByIDList):
10016 (JSC::DFG::dfgBuildGetByIDList):
10017 * dfg/DFGRepatch.h:
10019 2011-06-28 Filip Pizlo <fpizlo@apple.com>
10021 Reviewed by Gavin Barraclough.
10023 DFG JIT lacks array.length caching.
10024 https://bugs.webkit.org/show_bug.cgi?id=63505
10026 * bytecode/StructureStubInfo.h:
10027 * dfg/DFGJITCodeGenerator.cpp:
10028 (JSC::DFG::JITCodeGenerator::cachedGetById):
10029 (JSC::DFG::JITCodeGenerator::cachedPutById):
10030 * dfg/DFGJITCodeGenerator.h:
10031 (JSC::DFG::JITCodeGenerator::tryAllocate):
10032 (JSC::DFG::JITCodeGenerator::selectScratchGPR):
10033 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
10034 * dfg/DFGJITCompiler.cpp:
10035 (JSC::DFG::JITCompiler::compileFunction):
10036 * dfg/DFGJITCompiler.h:
10037 (JSC::DFG::JITCompiler::addPropertyAccess):
10038 (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
10039 * dfg/DFGRegisterBank.h:
10040 (JSC::DFG::RegisterBank::tryAllocate):
10041 * dfg/DFGRepatch.cpp:
10042 (JSC::DFG::tryCacheGetByID):
10044 2011-06-28 Pierre Rossi <pierre.rossi@gmail.com>
10046 Reviewed by Eric Seidel.
10048 Warnings in JSC's JIT on 32 bit
10049 https://bugs.webkit.org/show_bug.cgi?id=63259
10051 Fairly straightforward, just use ASSERT_JIT_OFFSET_UNUSED when it applies.
10053 * jit/JITPropertyAccess32_64.cpp:
10054 (JSC::JIT::emit_op_method_check):
10055 (JSC::JIT::compileGetByIdHotPath):
10056 (JSC::JIT::emit_op_put_by_id):
10058 2011-06-28 Sheriff Bot <webkit.review.bot@gmail.com>
10060 Unreviewed, rolling out r89968.
10061 http://trac.webkit.org/changeset/89968
10062 https://bugs.webkit.org/show_bug.cgi?id=63581
10064 Broke chromium windows compile (Requested by jamesr on
10069 2011-06-28 Oliver Hunt <oliver@apple.com>
10071 Reviewed by Gavin Barraclough.
10074 https://bugs.webkit.org/show_bug.cgi?id=63579
10076 Gets opcode sampling building again, doesn't seem to work alas
10078 * bytecode/SamplingTool.cpp:
10079 (JSC::SamplingTool::notifyOfScope):
10080 * bytecode/SamplingTool.h:
10081 (JSC::SamplingTool::SamplingTool):
10082 * interpreter/Interpreter.cpp:
10083 (JSC::Interpreter::enableSampler):
10084 * runtime/Executable.h:
10085 (JSC::ScriptExecutable::ScriptExecutable):
10087 2011-06-28 Cary Clark <caryclark@google.com>
10089 Reviewed by James Robinson.
10091 Use Skia if Skia on Mac Chrome is enabled
10092 https://bugs.webkit.org/show_bug.cgi?id=62999
10095 Add switch to use Skia if, externally,
10096 Skia has been enabled by a gyp define.
10098 2011-06-28 Oliver Hunt <oliver@apple.com>
10100 Reviewed by Gavin Barraclough.
10102 ASSERT when launching debug builds with interpreter and jit enabled
10103 https://bugs.webkit.org/show_bug.cgi?id=63566
10105 Add appropriate guards to the various Executable's memory reporting
10108 * runtime/Executable.cpp:
10109 (JSC::EvalExecutable::compileInternal):
10110 (JSC::ProgramExecutable::compileInternal):
10111 (JSC::FunctionExecutable::compileForCallInternal):
10112 (JSC::FunctionExecutable::compileForConstructInternal):
10114 2011-06-28 Gavin Barraclough <barraclough@apple.com>
10116 Reviewed by Oliver Hunt.
10118 https://bugs.webkit.org/show_bug.cgi?id=63563
10119 DFG JIT - add support for double arith to speculative path
10121 Add integer support for div & mod, add double support for div, mod,
10122 add, sub & mul, dynamically selecting based on operand types.
10124 * dfg/DFGJITCodeGenerator.cpp:
10125 (JSC::DFG::FPRTemporary::FPRTemporary):
10126 * dfg/DFGJITCodeGenerator.h:
10127 * dfg/DFGJITCompiler.h:
10128 (JSC::DFG::JITCompiler::assembler):
10129 * dfg/DFGSpeculativeJIT.cpp:
10130 (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
10131 (JSC::DFG::SpeculativeJIT::compile):
10132 * dfg/DFGSpeculativeJIT.h:
10133 (JSC::DFG::SpeculateDoubleOperand::SpeculateDoubleOperand):
10134 (JSC::DFG::SpeculateDoubleOperand::~SpeculateDoubleOperand):
10135 (JSC::DFG::SpeculateDoubleOperand::index):
10136 (JSC::DFG::SpeculateDoubleOperand::fpr):
10138 2011-06-28 Oliver Hunt <oliver@apple.com>
10140 Fix interpreter build.
10142 * interpreter/Interpreter.cpp:
10143 (JSC::Interpreter::privateExecute):
10145 2011-06-28 Gavin Barraclough <barraclough@apple.com>
10147 Reviewed by Oliver Hunt.
10149 https://bugs.webkit.org/show_bug.cgi?id=63561
10150 DFG JIT - don't always assume integer in relational compare
10152 If neither operand is known integer, or either is in double representation,
10153 then at least use a function call (don't bail off the speculative path).
10155 * dfg/DFGSpeculativeJIT.cpp:
10156 (JSC::DFG::SpeculativeJIT::compilePeepHoleCall):
10157 (JSC::DFG::SpeculativeJIT::compile):
10158 * dfg/DFGSpeculativeJIT.h:
10159 (JSC::DFG::SpeculativeJIT::isDataFormatDouble):
10160 (JSC::DFG::SpeculativeJIT::compareIsInteger):
10162 2011-06-28 Oliver Hunt <oliver@apple.com>
10164 Reviewed by Gavin Barraclough.
10166 Make constant array optimisation less strict about what constitutes a constant
10167 https://bugs.webkit.org/show_bug.cgi?id=63554
10169 Now allow string constants in array literals to actually be considered constant,
10170 and so avoid codegen in array literals with strings in them.
10172 * bytecode/CodeBlock.h:
10173 (JSC::CodeBlock::addConstantBuffer):
10174 (JSC::CodeBlock::constantBuffer):
10175 * bytecompiler/BytecodeGenerator.cpp:
10176 (JSC::BytecodeGenerator::addConstantBuffer):
10177 (JSC::BytecodeGenerator::addStringConstant):
10178 (JSC::BytecodeGenerator::emitNewArray):
10179 * bytecompiler/BytecodeGenerator.h:
10180 * interpreter/Interpreter.cpp:
10181 (JSC::Interpreter::privateExecute):
10182 * jit/JITStubs.cpp:
10183 (JSC::DEFINE_STUB_FUNCTION):
10185 2011-06-28 Gavin Barraclough <barraclough@apple.com>
10187 Reviewed by Oliver Hunt.
10189 https://bugs.webkit.org/show_bug.cgi?id=63560
10190 DFG_JIT allow allocation of specific machine registers
10192 This allow us to allocate the registers necessary to perform x86
10193 idiv instructions for div/mod, and may be useful for shifts, too.
10195 * dfg/DFGJITCodeGenerator.cpp:
10196 (JSC::DFG::GPRTemporary::GPRTemporary):
10197 * dfg/DFGJITCodeGenerator.h:
10198 (JSC::DFG::JITCodeGenerator::allocate):
10199 (JSC::DFG::GPRResult::GPRResult):
10200 * dfg/DFGRegisterBank.h:
10201 (JSC::DFG::RegisterBank::allocateSpecific):
10202 * dfg/DFGSpeculativeJIT.h:
10203 (JSC::DFG::SpeculativeJIT::isInteger):
10205 2011-06-28 Gavin Barraclough <barraclough@apple.com>
10207 Reviewed by Oliver Hunt.
10209 https://bugs.webkit.org/show_bug.cgi?id=55040
10210 RegExp constructor returns the argument regexp instead of a new object
10212 Per 15.10.3.1, our current behaviour is correct if called as a function,
10213 but incorrect when called as a constructor.
10215 * runtime/RegExpConstructor.cpp:
10216 (JSC::constructRegExp):
10217 (JSC::constructWithRegExpConstructor):
10218 * runtime/RegExpConstructor.h:
10220 2011-06-28 Luke Macpherson <macpherson@chromium.org>
10222 Reviewed by Darin Adler.
10224 Clean up integer clamping functions in MathExtras.h and support arbitrary numeric types and limits.
10225 https://bugs.webkit.org/show_bug.cgi?id=63469
10227 * wtf/MathExtras.h:
10228 (defaultMinimumForClamp):
10229 Version of std::numeric_limits::min() that returns the largest negative value for floating point types.
10230 (defaultMaximumForClamp):
10231 Symmetric alias for std::numeric_limits::max()
10233 New templated clamping function that supports arbitrary output types.
10235 Use new clampTo template.
10237 Use new clampTo template.
10238 (clampToPositiveInteger):
10239 Use new clampTo template.
10241 2011-06-28 Adam Roben <aroben@apple.com>
10243 Windows Debug build fix after r89885
10245 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Exported
10246 JSGlobalData::releaseExecutableMemory for jsc.exe's benefit.
10248 2011-06-28 Shinya Kawanaka <shinyak@google.com>
10250 Reviewed by Kent Tamura.
10252 Add const to show() method in WTFString and AtomicString.
10253 https://bugs.webkit.org/show_bug.cgi?id=63515
10255 The lack of const in show() method is painful when
10256 doing something like printf-debug.
10258 * wtf/text/AtomicString.cpp:
10259 (WTF::AtomicString::show):
10260 * wtf/text/AtomicString.h:
10261 * wtf/text/WTFString.cpp:
10263 * wtf/text/WTFString.h:
10265 2011-06-27 Ryosuke Niwa <rniwa@webkit.org>
10267 Build fix attempt after r89885.
10269 * JavaScriptCore.exp:
10272 2011-06-27 Oliver Hunt <oliver@apple.com>
10274 Reviewed by Geoffrey Garen.
10276 Support throwing away non-running code even while other code is running
10277 https://bugs.webkit.org/show_bug.cgi?id=63485
10279 Add a function to CodeBlock to support unlinking direct linked callsites,
10280 and then with that in place add logic to discard code from any function
10281 that is not currently on the stack.
10283 The unlinking completely reverts any optimized call sites, such that they
10284 may be relinked again in future.
10286 * JavaScriptCore.exp:
10287 * bytecode/CodeBlock.cpp:
10288 (JSC::CodeBlock::unlinkCalls):
10289 (JSC::CodeBlock::clearEvalCache):
10290 * bytecode/CodeBlock.h:
10291 (JSC::CallLinkInfo::CallLinkInfo):
10292 (JSC::CallLinkInfo::unlink):
10293 * bytecode/EvalCodeCache.h:
10294 (JSC::EvalCodeCache::clear):
10296 (JSC::Heap::getConservativeRegisterRoots):
10299 (JSC::JIT::privateCompile):
10302 (JSC::JIT::compileOpCall):
10303 * jit/JITWriteBarrier.h:
10304 (JSC::JITWriteBarrierBase::clear):
10306 (GlobalObject::GlobalObject):
10307 (functionReleaseExecutableMemory):
10308 * runtime/Executable.cpp:
10309 (JSC::EvalExecutable::unlinkCalls):
10310 (JSC::ProgramExecutable::unlinkCalls):
10311 (JSC::FunctionExecutable::discardCode):
10312 (JSC::FunctionExecutable::unlinkCalls):
10313 * runtime/Executable.h:
10314 * runtime/JSGlobalData.cpp:
10315 (JSC::SafeRecompiler::returnValue):
10316 (JSC::SafeRecompiler::operator()):
10317 (JSC::JSGlobalData::releaseExecutableMemory):
10319 2011-06-27 Gavin Barraclough <barraclough@apple.com>
10321 Reviewed by Darin Adler & Oliver Hunt.
10323 https://bugs.webkit.org/show_bug.cgi?id=50554
10324 RegExp.prototype.toString does not escape slashes
10326 The problem here is that we don't escape forwards slashes when converting
10327 a RegExp to a string. This means that RegExp("/").toString() is "///",
10328 which is not a valid RegExp literal. Also, we return an invalid literal
10329 for RegExp.prototype.toString() ("//", which is an empty single-line comment).
10332 "NOTE: The returned String has the form of a RegularExpressionLiteral that
10333 evaluates to another RegExp object with the same behaviour as this object."
10335 * runtime/RegExpObject.cpp:
10336 (JSC::regExpObjectSource):
10337 - Escape forward slashes when getting the source of a RegExp.
10338 * runtime/RegExpPrototype.cpp:
10339 (JSC::regExpProtoFuncToString):
10340 - Remove unnecessary and erroneous hack to return "//" as the string
10341 representation of RegExp.prototype. This is not a valid RegExp literal
10342 (it is an empty single-line comment).
10344 2011-06-27 Gavin Barraclough <barraclough@apple.com>
10346 Reviewed by Oliver Hunt.
10348 https://bugs.webkit.org/show_bug.cgi?id=63497
10349 Add DEBUG_WITH_BREAKPOINT support to the DFG JIT.
10351 * dfg/DFGByteCodeParser.cpp:
10352 (JSC::DFG::ByteCodeParser::parseBlock):
10354 * dfg/DFGNonSpeculativeJIT.cpp:
10355 (JSC::DFG::NonSpeculativeJIT::compile):
10356 * dfg/DFGSpeculativeJIT.cpp:
10357 (JSC::DFG::SpeculativeJIT::compile):
10359 2011-06-27 Juan C. Montemayor <jmont@apple.com>
10361 Reviewed by Mark Rowe.
10363 Indirectly including TextPosition.h and XPathGrammar.h causes compile errors
10364 https://bugs.webkit.org/show_bug.cgi?id=63392
10366 When both TextPosition.h and XPathGrammar.h are included a compile-error
10367 is caused, since XPathGrammar.h defines a macro called NUMBER and
10368 TextPosition has a typedef named NUMBER.
10370 * wtf/text/TextPosition.h:
10371 (WTF::TextPosition::TextPosition):
10372 (WTF::TextPosition::minimumPosition):
10373 (WTF::TextPosition::belowRangePosition):
10375 2011-06-27 Filip Pizlo <fpizlo@apple.com>
10377 Reviewed by Gavin Barraclough.
10379 DFG JIT does not perform put_by_id caching.
10380 https://bugs.webkit.org/show_bug.cgi?id=63409
10382 * bytecode/StructureStubInfo.h:
10383 * dfg/DFGJITCodeGenerator.cpp:
10384 (JSC::DFG::JITCodeGenerator::cachedPutById):
10385 * dfg/DFGJITCodeGenerator.h:
10386 * dfg/DFGJITCompiler.cpp:
10387 (JSC::DFG::JITCompiler::compileFunction):
10388 * dfg/DFGJITCompiler.h:
10389 (JSC::DFG::JITCompiler::addPropertyAccess):
10390 (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
10391 * dfg/DFGNonSpeculativeJIT.cpp:
10392 (JSC::DFG::NonSpeculativeJIT::compile):
10393 * dfg/DFGOperations.cpp:
10394 * dfg/DFGOperations.h:
10395 * dfg/DFGRepatch.cpp:
10396 (JSC::DFG::dfgRepatchByIdSelfAccess):
10397 (JSC::DFG::tryCacheGetByID):
10398 (JSC::DFG::appropriatePutByIdFunction):
10399 (JSC::DFG::tryCachePutByID):
10400 (JSC::DFG::dfgRepatchPutByID):
10401 * dfg/DFGRepatch.h:
10402 * dfg/DFGSpeculativeJIT.cpp:
10403 (JSC::DFG::SpeculativeJIT::compile):
10405 2011-06-27 Gustavo Noronha Silva <gns@gnome.org>
10407 Unreviewed build fix. One more filed missing during distcheck, for
10410 * GNUmakefile.list.am:
10412 2011-06-26 Filip Pizlo <fpizlo@apple.com>
10414 Reviewed by Gavin Barraclough.
10416 DFG non-speculative JIT has potentially harmful speculations with respect to arithmetic operations.
10417 https://bugs.webkit.org/show_bug.cgi?id=63347
10419 * dfg/DFGNonSpeculativeJIT.cpp:
10420 - Changed arithmetic operations to speculate in favor of integers.
10421 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
10422 (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
10423 (JSC::DFG::NonSpeculativeJIT::basicArithOp):
10424 (JSC::DFG::NonSpeculativeJIT::compile):
10425 * dfg/DFGNonSpeculativeJIT.h:
10426 * dfg/DFGOperations.cpp:
10427 - Added slow-path routines for arithmetic that perform no speculation; the
10428 non-speculative JIT will generate calls to these in cases where its
10430 * dfg/DFGOperations.h:
10432 2011-06-24 Nikolas Zimmermann <nzimmermann@rim.com>
10434 Reviewed by Rob Buis.
10436 Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
10437 https://bugs.webkit.org/show_bug.cgi?id=59085
10439 * wtf/Platform.h: Force Qt-EWS into a full rebuild, otherwhise this patch breaks the EWS.
10441 2011-06-24 Michael Saboff <msaboff@apple.com>
10443 Reviewed by Gavin Barraclough.
10445 Arm Assembler, Immediate stack offset values truncated to 8 bits for add & sub
10446 https://bugs.webkit.org/show_bug.cgi?id=63345
10448 The methods ARMThumbImmediate::getUInt9 and ARMThumbImmediate::getUInt10
10449 return 9 and 10 bit quantities, therefore changed their return type from
10450 uint8_t to uint16_t. Also casted the places where they are used as they
10451 are currently shifted and used as 7 or 8 bit values.
10453 These methods are currently used for literals for stack offsets,
10454 including creating and destroying stack frames. The prior truncation of
10455 the upper bits caused stack frames to be too small, thus allowing a
10456 JIT'ed function to access and overwrite stack space outside of the
10457 incorrectly sized stack frame.
10459 * assembler/ARMv7Assembler.h:
10460 (JSC::ARMThumbImmediate::getUInt9):
10461 (JSC::ARMThumbImmediate::getUInt10):
10462 (JSC::ARMv7Assembler::add):
10463 (JSC::ARMv7Assembler::ldr):
10464 (JSC::ARMv7Assembler::str):
10465 (JSC::ARMv7Assembler::sub):
10466 (JSC::ARMv7Assembler::sub_S):
10468 2011-06-24 Michael Saboff <msaboff@apple.com>
10470 Reviewed by Geoffrey Garen.
10472 releaseFastMallocFreeMemory doesn't adjust free counts for scavenger
10473 https://bugs.webkit.org/show_bug.cgi?id=63015
10475 Added code to adjust class TCMalloc_PageHeap variables free_committed_pages_ and
10476 min_free_committed_pages_since_last_scavenge_ in ReleaseFreeList(). These
10477 adjustments are a bug. These need to reflect the pages that are released
10478 in ReleaseFreeLsit so that scavenge doesn't try to free that many pages as well.
10479 Made ReleaseFreeList a member of TCMalloc_PageHeap in the process. Updated
10480 Check() and helper method CheckList() to check the number of actual free pages
10481 with free_committed_pages_.
10483 The symptom of the problem of the existing code is that the scavenger may
10484 run unneccesarily without any real work to do, i.e. pages on the free lists.
10485 The scanvenger would also end up freeing too many pages, that is going below
10486 the current 528 target free pages.
10488 Note that the style of the changes was kept consistent with the
10491 * wtf/FastMalloc.cpp:
10492 (WTF::TCMalloc_PageHeap::Check):
10493 (WTF::TCMalloc_PageHeap::CheckList):
10494 (WTF::TCMalloc_PageHeap::ReleaseFreeList):
10496 2011-06-24 Abhishek Arya <inferno@chromium.org>
10498 Reviewed by Darin Adler.
10500 Match other clampTo* functions in style with clampToInteger(float)
10502 https://bugs.webkit.org/show_bug.cgi?id=53449
10504 * wtf/MathExtras.h:
10507 (clampToPositiveInteger):
10509 2011-06-24 Sheriff Bot <webkit.review.bot@gmail.com>
10511 Unreviewed, rolling out r89594.
10512 http://trac.webkit.org/changeset/89594
10513 https://bugs.webkit.org/show_bug.cgi?id=63316
10515 It broke 5 tests on the Qt bot (Requested by Ossy_DC on
10518 * GNUmakefile.list.am:
10519 * JavaScriptCore.gypi:
10520 * icu/unicode/uscript.h: Removed.
10521 * wtf/unicode/ScriptCodesFromICU.h: Removed.
10522 * wtf/unicode/brew/UnicodeBrew.h:
10523 * wtf/unicode/glib/UnicodeGLib.h:
10524 * wtf/unicode/icu/UnicodeIcu.h:
10525 * wtf/unicode/qt4/UnicodeQt4.h:
10526 * wtf/unicode/wince/UnicodeWinCE.h:
10528 2011-06-23 Filip Pizlo <fpizlo@apple.com>
10530 Reviewed by Gavin Barraclough.
10532 DFG non-speculative JIT should have obvious optimizations for GetById and GetByVal
10533 https://bugs.webkit.org/show_bug.cgi?id=63173
10535 * dfg/DFGJITCodeGenerator.cpp:
10536 (JSC::DFG::JITCodeGenerator::cachedGetById):
10537 * dfg/DFGJITCodeGenerator.h:
10538 * dfg/DFGNonSpeculativeJIT.cpp:
10539 (JSC::DFG::NonSpeculativeJIT::compile):
10540 * dfg/DFGSpeculativeJIT.cpp:
10541 (JSC::DFG::SpeculativeJIT::compile):
10543 2011-06-23 Oliver Hunt <oliver@apple.com>
10547 * assembler/ARMAssembler.h:
10548 (JSC::ARMAssembler::readPointer):
10550 2011-06-23 Oliver Hunt <oliver@apple.com>
10554 * assembler/ARMAssembler.h:
10555 (JSC::ARMAssembler::readPointer):
10557 2011-06-23 Stephanie Lewis <slewis@apple.com>
10559 Reviewed by Darin Adler.
10561 https://bugs.webkit.org/show_bug.cgi?id=63298
10562 Replace Malloc with FastMalloc to match the rest of wtf.
10564 * wtf/BlockStack.h:
10565 (WTF::::~BlockStack):
10569 2011-06-23 Oliver Hunt <oliver@apple.com>
10571 Reviewed by Gavin Barraclough.
10573 Add the ability to dynamically modify linked call sites
10574 https://bugs.webkit.org/show_bug.cgi?id=63291
10576 Add JITWriteBarrier as a writebarrier class that allows
10577 reading and writing directly into the code stream.
10579 This required adding logic to all the assemblers to allow
10580 us to read values back out of the instruction stream.
10582 * JavaScriptCore.xcodeproj/project.pbxproj:
10583 * assembler/ARMAssembler.h:
10584 (JSC::ARMAssembler::readPointer):
10585 * assembler/ARMv7Assembler.h:
10586 (JSC::ARMv7Assembler::readPointer):
10587 (JSC::ARMv7Assembler::readInt32):
10588 (JSC::ARMv7Assembler::decodeTwoWordOp5i6Imm4Reg4EncodedImmFirst):
10589 (JSC::ARMv7Assembler::decodeTwoWordOp5i6Imm4Reg4EncodedImmSecond):
10590 * assembler/AbstractMacroAssembler.h:
10591 (JSC::AbstractMacroAssembler::readPointer):
10592 * assembler/MIPSAssembler.h:
10593 (JSC::MIPSAssembler::readInt32):
10594 (JSC::MIPSAssembler::readPointer):
10595 * assembler/MacroAssemblerCodeRef.h:
10596 (JSC::MacroAssemblerCodePtr::operator!):
10597 * assembler/SH4Assembler.h:
10598 (JSC::SH4Assembler::readPCrelativeAddress):
10599 (JSC::SH4Assembler::readPointer):
10600 (JSC::SH4Assembler::readInt32):
10601 * assembler/X86Assembler.h:
10602 (JSC::X86Assembler::readPointer):
10603 * bytecode/CodeBlock.cpp:
10604 (JSC::CodeBlock::visitAggregate):
10605 * bytecode/CodeBlock.h:
10606 (JSC::MethodCallLinkInfo::seenOnce):
10607 (JSC::MethodCallLinkInfo::setSeen):
10608 * heap/MarkStack.h:
10610 (JSC::JIT::privateCompile):
10611 (JSC::JIT::linkCall):
10612 (JSC::JIT::linkConstruct):
10613 * jit/JITPropertyAccess.cpp:
10614 (JSC::JIT::patchMethodCallProto):
10615 * jit/JITPropertyAccess32_64.cpp:
10616 * jit/JITWriteBarrier.h: Added.
10617 (JSC::JITWriteBarrierBase::operator UnspecifiedBoolType*):
10618 (JSC::JITWriteBarrierBase::operator!):
10619 (JSC::JITWriteBarrierBase::setFlagOnBarrier):
10620 (JSC::JITWriteBarrierBase::isFlagged):
10621 (JSC::JITWriteBarrierBase::setLocation):
10622 (JSC::JITWriteBarrierBase::location):
10623 (JSC::JITWriteBarrierBase::JITWriteBarrierBase):
10624 (JSC::JITWriteBarrierBase::set):
10625 (JSC::JITWriteBarrierBase::get):
10626 (JSC::JITWriteBarrier::JITWriteBarrier):
10627 (JSC::JITWriteBarrier::set):
10628 (JSC::JITWriteBarrier::get):
10629 (JSC::MarkStack::append):
10631 2011-06-23 Gavin Barraclough <barraclough@apple.com>
10633 Reviewed by Oliver Hunt.
10635 https://bugs.webkit.org/show_bug.cgi?id=61585
10636 Crash running regexp /(?:(?=g))|(?:m).{2147483648,}/
10638 This is due to use of int instead of unsigned, bad math around
10641 * yarr/YarrInterpreter.cpp:
10642 (JSC::Yarr::ByteCompiler::emitDisjunction):
10643 - Change some uses of int to unsigned, refactor compare logic to
10644 restrict to the range 0..2^32-1 (rather than -2^32-1..2^32-1).
10645 * yarr/YarrJIT.cpp:
10646 (JSC::Yarr::YarrGenerator::generate):
10647 (JSC::Yarr::YarrGenerator::backtrack):
10650 2011-06-22 Gavin Barraclough <barraclough@apple.com>
10652 Reviewed by Sam Weinig.
10654 https://bugs.webkit.org/show_bug.cgi?id=63218
10655 DFG JIT - remove machine type guarantees from graph
10657 The DFG JIT currently makes assumptions about the types of machine registers
10658 that certain nodes will be loaded into. This will be broken as we generate
10659 nodes to produce both integer and double code paths. Remove int<->double
10660 conversions nodes. This design decision also gave rise to multiple types of
10661 constant nodes, requiring separate handling for each type. Merge these back
10664 * dfg/DFGAliasTracker.h:
10665 (JSC::DFG::AliasTracker::equalIgnoringLaterNumericConversion):
10666 * dfg/DFGByteCodeParser.cpp:
10667 (JSC::DFG::ByteCodeParser::getToInt32):
10668 (JSC::DFG::ByteCodeParser::getToNumber):
10669 (JSC::DFG::ByteCodeParser::toInt32):
10670 (JSC::DFG::ByteCodeParser::toNumber):
10671 (JSC::DFG::ByteCodeParser::isInt32Constant):
10672 (JSC::DFG::ByteCodeParser::isDoubleConstant):
10673 (JSC::DFG::ByteCodeParser::valueOfInt32Constant):
10674 (JSC::DFG::ByteCodeParser::valueOfDoubleConstant):
10675 (JSC::DFG::ByteCodeParser::one):
10676 (JSC::DFG::ByteCodeParser::predictInt32):
10677 * dfg/DFGGraph.cpp:
10678 (JSC::DFG::Graph::dump):
10679 * dfg/DFGJITCodeGenerator.h:
10680 (JSC::DFG::JITCodeGenerator::silentFillGPR):
10681 (JSC::DFG::JITCodeGenerator::silentFillFPR):
10682 (JSC::DFG::JITCodeGenerator::isJSConstant):
10683 (JSC::DFG::JITCodeGenerator::isDoubleConstant):
10684 (JSC::DFG::JITCodeGenerator::valueOfJSConstantAsImmPtr):
10685 * dfg/DFGJITCompiler.cpp:
10686 (JSC::DFG::JITCompiler::fillNumericToDouble):
10687 (JSC::DFG::JITCompiler::fillInt32ToInteger):
10688 * dfg/DFGJITCompiler.h:
10689 (JSC::DFG::JITCompiler::isJSConstant):
10690 (JSC::DFG::JITCompiler::isInt32Constant):
10691 (JSC::DFG::JITCompiler::isDoubleConstant):
10692 (JSC::DFG::JITCompiler::valueOfJSConstant):
10693 (JSC::DFG::JITCompiler::valueOfInt32Constant):
10694 (JSC::DFG::JITCompiler::valueOfDoubleConstant):
10696 (JSC::DFG::Node::Node):
10697 (JSC::DFG::Node::isConstant):
10698 (JSC::DFG::Node::notTakenBytecodeOffset):
10699 * dfg/DFGNonSpeculativeJIT.cpp:
10700 (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
10701 (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
10702 (JSC::DFG::NonSpeculativeJIT::compile):
10703 * dfg/DFGSpeculativeJIT.cpp:
10704 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
10705 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
10706 (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
10707 (JSC::DFG::SpeculativeJIT::compile):
10709 2011-06-23 Jungshik Shin <jshin@chromium.org>
10711 Reviewed by Alexey Proskuryakov.
10713 Add ScriptCodesFromICU.h to wtf/unicode and make necessary changes in
10714 build files for ports not using ICU.
10715 Add icu/unicode/uscript.h for ports using ICU. It's taken from
10716 ICU 3.6 (the version used on Mac OS 10.5)
10718 http://bugs.webkit.org/show_bug.cgi?id=20797
10720 * GNUmakefile.list.am:
10721 * JavaScriptCore.gypi:
10722 * icu/unicode/uscript.h: Added for UScriptCode enum.
10723 * wtf/unicode/ScriptCodesFromICU.h: UScriptCode enum added.
10724 * wtf/unicode/icu/UnicodeIcu.h:
10725 * wtf/unicode/brew/UnicodeBrew.h:
10726 * wtf/unicode/glib/UnicodeGLib.h:
10727 * wtf/unicode/qt4/UnicodeQt4.h:
10728 * wtf/unicode/wince/UnicodeWinCE.h:
10730 2011-06-23 Ryuan Choi <ryuan.choi@samsung.com>
10732 Reviewed by Andreas Kling.
10734 [EFL][WK2] Add PLATFORM(EFL) to use UNIX_DOMAIN_SOCKETS.
10735 https://bugs.webkit.org/show_bug.cgi?id=63228
10737 * wtf/Platform.h: Add PLATFORM(EFL) guard.
10739 2011-06-23 Sheriff Bot <webkit.review.bot@gmail.com>
10741 Unreviewed, rolling out r89547.
10742 http://trac.webkit.org/changeset/89547
10743 https://bugs.webkit.org/show_bug.cgi?id=63252
10745 "Chrmium crash on start" (Requested by yurys on #webkit).
10747 * wtf/DynamicAnnotations.cpp:
10748 (WTFAnnotateBenignRaceSized):
10749 (WTFAnnotateHappensBefore):
10750 (WTFAnnotateHappensAfter):
10751 * wtf/DynamicAnnotations.h:
10753 2011-06-23 Timur Iskhodzhanov <timurrrr@google.com>
10755 Reviewed by David Levin.
10757 Make dynamic annotations weak symbols and prevent identical code folding by the linker
10758 https://bugs.webkit.org/show_bug.cgi?id=62443
10760 * wtf/DynamicAnnotations.cpp:
10761 (WTFAnnotateBenignRaceSized):
10762 (WTFAnnotateHappensBefore):
10763 (WTFAnnotateHappensAfter):
10764 * wtf/DynamicAnnotations.h:
10766 2011-06-22 Yael Aharon <yael.aharon@nokia.com>
10768 Reviewed by Andreas Kling.
10770 [Qt] Add a build flag for building with libxml2 and libxslt.
10771 https://bugs.webkit.org/show_bug.cgi?id=63113
10775 2011-06-22 Sheriff Bot <webkit.review.bot@gmail.com>
10777 Unreviewed, rolling out r89489.
10778 http://trac.webkit.org/changeset/89489
10779 https://bugs.webkit.org/show_bug.cgi?id=63203
10781 Broke chromium mac build on build.webkit.org (Requested by
10782 abarth on #webkit).
10786 2011-06-22 Cary Clark <caryclark@google.com>
10788 Reviewed by Darin Fisher.
10790 Use Skia if Skia on Mac Chrome is enabled
10791 https://bugs.webkit.org/show_bug.cgi?id=62999
10794 Add switch to use Skia if, externally,
10795 Skia has been enabled by a gyp define.
10797 2011-06-22 Geoffrey Garen <ggaren@apple.com>
10799 Reviewed by Oliver Hunt.
10801 * interpreter/RegisterFile.h: Removed unnecessary #include <stdio.h>.
10803 2011-06-22 Geoffrey Garen <ggaren@apple.com>
10805 Reviewed by Oliver Hunt.
10807 Removed the conceit that global variables are local variables when running global code
10808 https://bugs.webkit.org/show_bug.cgi?id=63106
10810 This is required for write barrier correctness.
10812 SunSpider reports about a 0.5% regression, mostly from bitops-bitwise-and.js.
10813 I was able to reduce the regression with a tiny peephole optimization in
10814 the bytecompiler, but not eliminate it. I'm committing this assuming
10815 that turning on generational GC will win back at least 0.5%.
10817 (FWIW, the DFG JIT can easily eliminate any regression by sharing loads of
10818 the global object's var storage. I considered doing the same kind of
10819 optimization in the existing JIT, but it seemed like moving in the wrong
10822 * bytecompiler/BytecodeGenerator.cpp:
10823 (JSC::BytecodeGenerator::addGlobalVar):
10824 (JSC::BytecodeGenerator::BytecodeGenerator): Don't give global variables
10825 negative indices, since they're no longer negatively offset from the
10826 current stack frame.
10828 Do give global variables monotonically increasing positive indices, since
10829 that's much easier to work with.
10831 Don't limit the number of optimizable global variables, since it's no
10832 longer limited by the register file, since they're no longer stored in
10835 (JSC::BytecodeGenerator::registerFor): Global code never has any local
10836 registers because a var in global code is actually a property of the
10839 (JSC::BytecodeGenerator::constRegisterFor): Ditto.
10841 (JSC::BytecodeGenerator::emitResolve): Did a tiny bit of constant
10842 propagation and dead code elimination to speed up our compiles and
10843 reduce WTFs / minute.
10845 * bytecompiler/BytecodeGenerator.h:
10846 (JSC::BytecodeGenerator::registerFor): Removed special handling of globals.
10848 (JSC::BytecodeGenerator::shouldOptimizeLocals): Don't optimize locals in
10849 global code, since there are none.
10851 (JSC::BytecodeGenerator::canOptimizeNonLocals): Do optimize non-locals
10852 in global code (i.e., global vars), since there are some.
10854 * interpreter/Interpreter.cpp:
10855 (JSC::Interpreter::callEval):
10856 (JSC::Interpreter::Interpreter):
10857 (JSC::Interpreter::dumpRegisters):
10858 (JSC::Interpreter::execute):
10859 * interpreter/Interpreter.h: Updated for deleted / renamed code.
10861 * interpreter/RegisterFile.cpp:
10862 (JSC::RegisterFile::gatherConservativeRoots):
10863 (JSC::RegisterFile::releaseExcessCapacity): Updated for deleted / renamed
10866 * interpreter/RegisterFile.h:
10867 (JSC::RegisterFile::begin):
10868 (JSC::RegisterFile::size):
10869 (JSC::RegisterFile::RegisterFile):
10870 (JSC::RegisterFile::shrink): Removed all code and comments dealing with
10871 global variables stored in the register file.
10873 (JSC::RegisterFile::grow): Updated for same.
10875 Also, a slight correctness fix: Test the VM commit end, and not just the
10876 in-use end, when checking for stack overflow. In theory, it's invalid to
10877 commit past the end of your allocation, even if you never touch that
10878 memory. This makes the usable size of the stack slightly smaller. No test
10879 because we don't know of any case in practice where this crashes.
10881 * runtime/JSGlobalData.cpp:
10882 (JSC::JSGlobalData::JSGlobalData): Updated for changes above.
10884 * runtime/JSGlobalObject.cpp:
10885 (JSC::JSGlobalObject::resizeRegisters):
10886 (JSC::JSGlobalObject::addStaticGlobals):
10887 * runtime/JSGlobalObject.h: Simplified globals to have monotonically
10888 increasing indexes, always located in our external storage.
10890 2011-06-21 MORITA Hajime <morrita@google.com>
10892 Unreviewed, rolling out r89401 and r89403.
10893 http://trac.webkit.org/changeset/89401
10894 http://trac.webkit.org/changeset/89403
10895 https://bugs.webkit.org/show_bug.cgi?id=62970
10897 Breaks mac build and mistakenly enables the spellcheck API
10899 * Configurations/FeatureDefines.xcconfig:
10900 * JavaScriptCore.xcodeproj/project.pbxproj:
10902 2011-06-21 Kent Tamura <tkent@chromium.org>
10904 [Mac] Sort Xcode project files.
10906 * JavaScriptCore.xcodeproj/project.pbxproj:
10908 2011-06-20 MORITA Hajime <morrita@google.com>
10910 Reviewed by Kent Tamura.
10912 Spellcheck API should be build-able.
10913 https://bugs.webkit.org/show_bug.cgi?id=62970
10915 No new tests, changing only build related files
10917 * Configurations/FeatureDefines.xcconfig:
10919 2011-06-21 Geoffrey Garen <ggaren@apple.com>
10921 Reviewed by Oliver Hunt.
10923 Moved 'const' off the global-variable-as-local-variable crack pipe
10924 https://bugs.webkit.org/show_bug.cgi?id=63105
10926 This is necessary for moving the rest of the code off of same.
10928 Many problems remain in our handling of const. I have fixed none of them.
10930 * bytecompiler/BytecodeGenerator.h:
10931 (JSC::BytecodeGenerator::scopeChain): New accessor, needed to enable
10932 const to directly implement its unique scoping rules.
10934 * bytecompiler/NodesCodegen.cpp:
10935 (JSC::PrefixResolveNode::emitBytecode): Do specify that our resolve is
10936 for writing, so we don't overwrite const variables.
10938 (JSC::ConstDeclNode::emitCodeSingle): Don't assume that all declared const
10939 variables are available as local variables, since this won't be the case
10940 once global variables are not available as local variables. Instead, use
10941 put_scoped_var in the case where there is no local variable. Like a local
10942 variable, put_scoped_var succeeds even though const properties are
10943 read-only, since put_scoped_var skips read-only checks. (Yay?)
10945 2011-06-21 Oliver Hunt <oliver@apple.com>
10947 Reviewed by Alexey Proskuryakov.
10949 REGRESSION(r89257): It broke 2 jscore tests (Requested by Ossy_away on #webkit).
10950 https://bugs.webkit.org/show_bug.cgi?id=63052
10952 Release mode only failure, the stack overflow guards were getting there error
10953 handling inlined, so that they were essentially causing their own demise.
10955 * parser/JSParser.cpp:
10956 (JSC::JSParser::updateErrorMessage):
10957 (JSC::JSParser::updateErrorWithNameAndMessage):
10959 2011-06-20 Kenneth Russell <kbr@google.com>
10963 Rolled out r89233 and r89235 because of crashes in http/tests/misc/acid3.html on Snow Leopard and other platforms
10964 https://bugs.webkit.org/show_bug.cgi?id=63022
10968 2011-06-18 Anders Carlsson <andersca@apple.com>
10970 Reviewed by Darin Adler.
10972 Disallow assigning into PassOwnArrayPtr, PassOwnPtr and PassRefPtr
10973 https://bugs.webkit.org/show_bug.cgi?id=62940
10975 Remove clear() and all assignment operators except one which now has a COMPILE_ASSERT.
10977 * wtf/PassOwnArrayPtr.h:
10978 (WTF::PassOwnArrayPtr::operator=):
10979 * wtf/PassOwnPtr.h:
10980 (WTF::PassOwnPtr::operator=):
10981 * wtf/PassRefPtr.h:
10982 (WTF::PassRefPtr::operator=):
10983 (WTF::NonNullPassRefPtr::operator=):
10985 2011-06-20 Oliver Hunt <oliver@apple.com>
10987 Reviewed by Darin Adler.
10989 REGRESSION (r79060): Searching for a flight at united.com fails
10990 https://bugs.webkit.org/show_bug.cgi?id=63003
10992 This original change also broke Twitter, and we attempted to refine the fix to
10993 address that problem (http://trac.webkit.org/changeset/80542), but since it still breaks United,
10994 we need to revert the change until we understand the problem better.
10996 * wtf/DateMath.cpp:
10997 (WTF::parseDateFromNullTerminatedCharacters):
10999 2011-06-20 Juan C. Montemayor <jmont@apple.com>
11001 Reviewed by Oliver Hunt.
11003 No context for javascript parse errors.
11004 https://bugs.webkit.org/show_bug.cgi?id=62613
11006 Parse errors now show more details like:
11007 "Unexpected token: ]"
11009 "Expected token: while"
11011 For reserved names, numbers, indentifiers, strings, lexer errors,
11012 and EOFs, the following error messages are printed:
11014 "Use of reserved word: super"
11015 "Unexpected number: 42"
11016 "Unexpected identifier: "
11017 "Unexpected string: "foobar""
11018 "Invalid token character sequence: \u4023"
11021 * parser/JSParser.cpp:
11022 (JSC::JSParser::consume):
11023 (JSC::JSParser::getToken):
11024 (JSC::JSParser::getTokenName):
11025 (JSC::JSParser::updateErrorMessageSpecialCase):
11026 (JSC::JSParser::updateErrorMessage):
11027 (JSC::JSParser::updateErrorWithNameAndMessage):
11029 (JSC::JSParser::JSParser):
11030 (JSC::JSParser::parseProgram):
11031 (JSC::JSParser::parseVarDeclarationList):
11032 (JSC::JSParser::parseForStatement):
11033 (JSC::JSParser::parseBreakStatement):
11034 (JSC::JSParser::parseContinueStatement):
11035 (JSC::JSParser::parseWithStatement):
11036 (JSC::JSParser::parseTryStatement):
11037 (JSC::JSParser::parseStatement):
11038 (JSC::JSParser::parseFormalParameters):
11039 (JSC::JSParser::parseFunctionInfo):
11040 (JSC::JSParser::parseAssignmentExpression):
11041 (JSC::JSParser::parsePrimaryExpression):
11042 (JSC::JSParser::parseMemberExpression):
11043 (JSC::JSParser::parseUnaryExpression):
11044 * parser/JSParser.h:
11045 * parser/Lexer.cpp:
11047 * parser/Parser.cpp:
11048 (JSC::Parser::parse):
11050 2011-06-20 Nikolas Zimmermann <nzimmermann@rim.com>
11052 Reviewed by Rob Buis.
11054 Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
11055 https://bugs.webkit.org/show_bug.cgi?id=59085
11057 * wtf/Platform.h: Force Qt-EWS into a full rebuild, otherwhise this patch breaks the EWS.
11059 2011-06-19 Oliver Hunt <oliver@apple.com>
11061 Reviewed by Sam Weinig.
11063 Correct logic for putting errors on the correct line when handling JSONP
11064 https://bugs.webkit.org/show_bug.cgi?id=62962
11066 Minor fix for the minor fix. *sigh*
11068 * interpreter/Interpreter.cpp:
11069 (JSC::Interpreter::execute):
11071 2011-06-19 Oliver Hunt <oliver@apple.com>
11073 Minor fix to correct layout test results.
11075 * interpreter/Interpreter.cpp:
11076 (JSC::Interpreter::execute):
11078 2011-06-17 Oliver Hunt <oliver@apple.com>
11080 Reviewed by Gavin Barraclough.
11082 JSONP is unnecessarily slow
11083 https://bugs.webkit.org/show_bug.cgi?id=62920
11085 JSONP has unfortunately become a fairly common idiom online, yet
11086 it triggers very poor performance in JSC as we end up doing codegen
11087 for a large number of property accesses that will
11088 * only be run once, so the vast amount of logic we dump to handle
11089 caching of accesses is unnecessary.
11090 * We are doing codegen that is directly proportional to just
11091 creating the object in the first place.
11093 This patch extends the use of the literal parser to JSONP-like structures
11094 in global code, handling a number of different forms I have seen online.
11095 In an extreme case this improves performance of JSONP by more than 2x
11096 due to removal of code generation and execution time, and a few optimisations
11097 that I made to the parser itself.
11099 * API/JSValueRef.cpp:
11100 (JSValueMakeFromJSONString):
11101 * interpreter/Interpreter.cpp:
11102 (JSC::Interpreter::callEval):
11103 (JSC::Interpreter::execute):
11104 * parser/Lexer.cpp:
11105 (JSC::Lexer::isKeyword):
11107 * runtime/JSGlobalObjectFunctions.cpp:
11108 (JSC::globalFuncEval):
11109 * runtime/JSONObject.cpp:
11110 (JSC::JSONProtoFuncParse):
11111 * runtime/LiteralParser.cpp:
11112 (JSC::LiteralParser::tryJSONPParse):
11113 (JSC::LiteralParser::makeIdentifier):
11114 (JSC::LiteralParser::Lexer::lex):
11115 (JSC::LiteralParser::Lexer::next):
11116 (JSC::isSafeStringCharacter):
11117 (JSC::LiteralParser::Lexer::lexString):
11118 (JSC::LiteralParser::Lexer::lexNumber):
11119 (JSC::LiteralParser::parse):
11120 * runtime/LiteralParser.h:
11121 (JSC::LiteralParser::LiteralParser):
11122 (JSC::LiteralParser::tryLiteralParse):
11123 (JSC::LiteralParser::Lexer::Lexer):
11125 2011-06-18 Sheriff Bot <webkit.review.bot@gmail.com>
11127 Unreviewed, rolling out r89184.
11128 http://trac.webkit.org/changeset/89184
11129 https://bugs.webkit.org/show_bug.cgi?id=62927
11131 It broke 22 tests on all bot (Requested by Ossy_weekend on
11134 * API/JSValueRef.cpp:
11135 (JSValueMakeFromJSONString):
11136 * interpreter/Interpreter.cpp:
11137 (JSC::Interpreter::callEval):
11138 (JSC::Interpreter::execute):
11139 * parser/Lexer.cpp:
11141 * runtime/JSGlobalObjectFunctions.cpp:
11142 (JSC::globalFuncEval):
11143 * runtime/JSONObject.cpp:
11144 (JSC::JSONProtoFuncParse):
11145 * runtime/LiteralParser.cpp:
11146 (JSC::LiteralParser::Lexer::lex):
11147 (JSC::isSafeStringCharacter):
11148 (JSC::LiteralParser::Lexer::lexString):
11149 (JSC::LiteralParser::Lexer::lexNumber):
11150 (JSC::LiteralParser::parse):
11151 * runtime/LiteralParser.h:
11152 (JSC::LiteralParser::LiteralParser):
11153 (JSC::LiteralParser::tryLiteralParse):
11154 (JSC::LiteralParser::Lexer::Lexer):
11155 (JSC::LiteralParser::Lexer::next):
11157 2011-06-17 Oliver Hunt <oliver@apple.com>
11159 Reviewed by Gavin Barraclough.
11161 JSONP is unnecessarily slow
11162 https://bugs.webkit.org/show_bug.cgi?id=62920
11164 JSONP has unfortunately become a fairly common idiom online, yet
11165 it triggers very poor performance in JSC as we end up doing codegen
11166 for a large number of property accesses that will
11167 * only be run once, so the vast amount of logic we dump to handle
11168 caching of accesses is unnecessary.
11169 * We are doing codegen that is directly proportional to just
11170 creating the object in the first place.
11172 This patch extends the use of the literal parser to JSONP-like structures
11173 in global code, handling a number of different forms I have seen online.
11174 In an extreme case this improves performance of JSONP by more than 2x
11175 due to removal of code generation and execution time, and a few optimisations
11176 that I made to the parser itself.
11178 * API/JSValueRef.cpp:
11179 (JSValueMakeFromJSONString):
11180 * interpreter/Interpreter.cpp:
11181 (JSC::Interpreter::callEval):
11182 (JSC::Interpreter::execute):
11183 * parser/Lexer.cpp:
11184 (JSC::Lexer::isKeyword):
11186 * runtime/JSGlobalObjectFunctions.cpp:
11187 (JSC::globalFuncEval):
11188 * runtime/JSONObject.cpp:
11189 (JSC::JSONProtoFuncParse):
11190 * runtime/LiteralParser.cpp:
11191 (JSC::LiteralParser::tryJSONPParse):
11192 (JSC::LiteralParser::makeIdentifier):
11193 (JSC::LiteralParser::Lexer::lex):
11194 (JSC::LiteralParser::Lexer::next):
11195 (JSC::isSafeStringCharacter):
11196 (JSC::LiteralParser::Lexer::lexString):
11197 (JSC::LiteralParser::Lexer::lexNumber):
11198 (JSC::LiteralParser::parse):
11199 * runtime/LiteralParser.h:
11200 (JSC::LiteralParser::LiteralParser):
11201 (JSC::LiteralParser::tryLiteralParse):
11202 (JSC::LiteralParser::Lexer::Lexer):
11204 2011-06-17 Geoffrey Garen <ggaren@apple.com>
11206 Reviewed by Oliver Hunt.
11208 Moved some property access JIT code into property access JIT files
11209 https://bugs.webkit.org/show_bug.cgi?id=62906
11211 * jit/JITOpcodes.cpp:
11212 * jit/JITOpcodes32_64.cpp:
11213 * jit/JITPropertyAccess.cpp:
11214 (JSC::JIT::emitSlow_op_put_by_val):
11215 (JSC::JIT::emit_op_get_scoped_var):
11216 (JSC::JIT::emit_op_put_scoped_var):
11217 (JSC::JIT::emit_op_get_global_var):
11218 (JSC::JIT::emit_op_put_global_var):
11219 * jit/JITPropertyAccess32_64.cpp:
11220 (JSC::JIT::emit_op_get_scoped_var):
11221 (JSC::JIT::emit_op_put_scoped_var):
11222 (JSC::JIT::emit_op_get_global_var):
11223 (JSC::JIT::emit_op_put_global_var):
11225 2011-06-17 Anders Carlsson <andersca@apple.com>
11229 * JavaScriptCore.xcodeproj/project.pbxproj:
11231 2011-06-17 Geoffrey Garen <ggaren@apple.com>
11233 Try to fix the Leopard build?
11235 * JavaScriptCore.xcodeproj/project.pbxproj:
11237 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11239 Reviewed by Oliver Hunt.
11241 Added some write barrier action, compiled out by default
11242 https://bugs.webkit.org/show_bug.cgi?id=62844
11244 * JavaScriptCore.exp: Build!
11246 * JavaScriptCore.xcodeproj/project.pbxproj: Fixed an incremental build
11247 issue with Heap.cpp.
11250 (JSC::Heap::writeBarrierSlowCase):
11252 (JSC::Heap::writeBarrier):
11253 * heap/MarkedBlock.h:
11254 (JSC::MarkedBlock::isAtomAligned):
11255 (JSC::MarkedBlock::blockFor):
11256 (JSC::MarkedBlock::atomNumber):
11257 (JSC::MarkedBlock::ownerSetNumber):
11258 (JSC::MarkedBlock::addOldSpaceOwner):
11259 (JSC::MarkedBlock::OwnerSet::OwnerSet):
11260 (JSC::MarkedBlock::OwnerSet::add):
11261 (JSC::MarkedBlock::OwnerSet::clear):
11262 (JSC::MarkedBlock::OwnerSet::size):
11263 (JSC::MarkedBlock::OwnerSet::didOverflow):
11264 (JSC::MarkedBlock::OwnerSet::owners): Added a basic write barrier that
11265 tracks owners for regions within blocks. Currently unused.
11267 2011-06-17 Raphael Kubo da Costa <kubo@profusion.mobi>
11269 Reviewed by Eric Seidel.
11271 [EFL] Add some OwnPtr specializations for EFL types.
11272 For now there are specializations for Ecore_Evas and Evas_Object.
11273 https://bugs.webkit.org/show_bug.cgi?id=62877
11275 * wtf/CMakeListsEfl.txt:
11276 * wtf/OwnPtrCommon.h:
11277 * wtf/efl/OwnPtrEfl.cpp: Added.
11278 (WTF::deleteOwnedPtr):
11280 2011-06-17 Joone Hur <joone.hur@collabora.co.uk>
11282 Reviewed by Martin Robinson.
11284 [GTK] Replace GdkRectangle by cairo_rectangle_int_t
11285 https://bugs.webkit.org/show_bug.cgi?id=60687
11287 Replace GdkRectangle by cairo_rectangle_int_t.
11289 * wtf/gobject/GTypedefs.h: Replace GdkRectangle by cairo_rectangle_int_t.
11291 2011-06-16 Gavin Barraclough <barraclough@apple.com>
11293 Reviewed by Oliver Hunt.
11295 https://bugs.webkit.org/show_bug.cgi?id=53014
11296 ES5 strict mode keyword restrictions aren't implemented
11298 The following are future restricted words is strict mode code:
11299 implements, interface, let, package, private, protected, public, static, yield
11301 * parser/JSParser.h:
11302 - Add RESERVED_IF_STRICT token.
11303 * parser/Keywords.table:
11304 - Add new future restricted words.
11305 * parser/Lexer.cpp:
11306 (JSC::Lexer::parseIdentifier):
11307 - Check for RESERVED_IF_STRICT; in nonstrict code this is converted to IDENT.
11309 - Pass strictMode flag to parseIdentifier.
11311 - parseIdentifier needs a strictMode flag.
11312 * runtime/CommonIdentifiers.h:
11313 - Add identifiers for new reserved words.
11315 2011-06-16 Gavin Barraclough <barraclough@apple.com>
11317 Reviewed by Oliver Hunt.
11319 https://bugs.webkit.org/show_bug.cgi?id=23611
11320 Multiline Javascript comments cause incorrect parsing of following script.
11323 "A MultiLineComment [is] simply discarded if it contains no line terminator,
11324 but if a MultiLineComment contains one or more line terminators, then it is
11325 replaced with a single line terminator, which becomes part of the stream of
11326 inputs for the syntactic grammar."
11328 This may result in behavioural changes, due to automatic semicolon insertion.
11330 * parser/Lexer.cpp:
11331 (JSC::Lexer::parseMultilineComment):
11332 - Set m_terminator is we see a line terminator in a multiline comment.
11334 2011-06-16 Gavin Barraclough <barraclough@apple.com>
11336 Reviewed by Sam Weinig.
11338 https://bugs.webkit.org/show_bug.cgi?id=62824
11339 DFG JIT - add support for branch-fusion of compareEq, JSValue comparisons in SpeculativeJIT
11341 CompareEq of non-integer values is the most common cause of speculation failure.
11343 * dfg/DFGSpeculativeJIT.cpp:
11344 (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
11346 (JSC::DFG::SpeculativeJIT::compilePeepHoleEq):
11347 - new! - peephole optimized Eq of JSValues.
11348 (JSC::DFG::SpeculativeJIT::compile):
11349 - Add peephole optimization for CompareEq.
11350 * dfg/DFGSpeculativeJIT.h:
11351 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
11352 - Add support for dead nodes between compare & branch.
11353 (JSC::DFG::SpeculativeJIT::isInteger):
11354 - Added to determine which form of peephole to do in CompareEq.
11356 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11358 Try to fix the Windows build.
11360 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export another
11363 * bytecode/EvalCodeCache.h:
11364 * heap/HandleHeap.h:
11365 * heap/HeapRootVisitor.h:
11367 * runtime/ArgList.h:
11368 * runtime/ScopeChain.h:
11369 * runtime/SmallStrings.h:
11370 * runtime/Structure.h: Stop forward-declaring things that don't really
11373 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11375 Try to fix the Mac build: Removed and re-added SlotVisitor.h to the Xcode
11376 project while crossing my fingers and facing west.
11378 * JavaScriptCore.xcodeproj/project.pbxproj:
11380 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11382 Build fix: Removed an incorrect symbol on Windows.
11384 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11386 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11388 Build fix: Removed an accidental commit from the future.
11392 2011-06-16 Geoffrey Garen <ggaren@apple.com>
11394 Reviewed by Oliver Hunt.
11396 Introduced SlotVisitor into the project
11397 https://bugs.webkit.org/show_bug.cgi?id=62820
11399 This resolves a class vs typedef forward declaration issue, and gives all
11400 exported symbols the correct names.
11403 * GNUmakefile.list.am:
11404 * JavaScriptCore.exp:
11405 * JavaScriptCore.gypi:
11406 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11407 * JavaScriptCore.xcodeproj/project.pbxproj: Build!
11409 * bytecode/EvalCodeCache.h:
11410 * heap/HandleHeap.h:
11413 (JSC::Heap::markRoots):
11415 * heap/HeapRootVisitor.h: Replaced MarkStack with SlotVisitor. Now no
11416 clients operate on a MarkStack.
11418 * heap/MarkStack.cpp:
11419 (JSC::SlotVisitor::visitChildren):
11420 (JSC::SlotVisitor::drain):
11421 * heap/SlotVisitor.h: Added.
11422 (JSC::SlotVisitor::SlotVisitor): Used 'protected' and a little cheesy
11423 inheritance to give SlotVisitor all the attributes of MarkStack without
11424 making this change giant. Over time, we will move more behavior into
11425 SlotVisitor and its subclasses.
11427 * heap/MarkStack.h:
11428 * heap/NewSpace.h: Replaced MarkStack with SlotVisitor. Now no
11429 clients operate on a MarkStack.
11431 * runtime/ArgList.h:
11432 * runtime/JSCell.h:
11433 * runtime/JSObject.h:
11434 * runtime/ScopeChain.h:
11435 * runtime/SmallStrings.h:
11436 * runtime/Structure.h: Replaced MarkStack with SlotVisitor. Now no
11437 clients operate on a MarkStack.
11439 2011-06-15 Oliver Hunt <oliver@apple.com>
11441 Reviewed by Geoffrey Garen.
11443 Reduce memory usage of resolve_global
11444 https://bugs.webkit.org/show_bug.cgi?id=62765
11446 If we have a large number of resolve_globals in a single
11447 block start planting plain resolve instructions instead
11448 whenever we aren't in a loop. This allows us to reduce
11449 the code size for extremely large functions without
11450 losing the performance benefits of op_resolve_global.
11452 * bytecode/CodeBlock.h:
11453 (JSC::CodeBlock::globalResolveInfoCount):
11454 * bytecompiler/BytecodeGenerator.cpp:
11455 (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
11456 (JSC::BytecodeGenerator::emitResolve):
11457 (JSC::BytecodeGenerator::emitResolveWithBase):
11458 * bytecompiler/BytecodeGenerator.h:
11460 2011-06-16 Qi Zhang <qi.2.zhang@nokia.com>
11462 Reviewed by Laszlo Gombos.
11464 [Qt] Fix building with CONFIG(use_system_icu)
11465 https://bugs.webkit.org/show_bug.cgi?id=62744
11467 Do not define WTF_USE_QT4_UNICODE if WTF_USE_ICU_UNICODE is set.
11471 2011-06-15 Darin Adler <darin@apple.com>
11473 Reviewed by Adam Barth.
11475 Remove obsolete LOOSE_OWN_PTR code
11476 https://bugs.webkit.org/show_bug.cgi?id=59909
11478 The internal Apple dependency on this is gone now.
11480 * wtf/OwnArrayPtr.h: Removed constructor that takes a raw pointer,
11481 set function that takes a raw pointer.
11483 * wtf/OwnPtr.h: Removed constructor that takes a raw pointer,
11484 set functino that takes a raw pointer.
11486 * wtf/PassOwnArrayPtr.h: Made constructor that takes a nullptr
11487 and assignment operator that takes a nullptr unconditional.
11488 Made constructor that takes a raw pointer private and explicit,
11489 and removed assignment operator that takes a raw pointer.
11491 * wtf/PassOwnPtr.h: Made assignment operator that takes a nullptr
11492 unconditional. Made constructor that takes a raw pointer private
11493 and explicit, and removed assignment operator that takes a raw pointer.
11495 2011-06-15 Sam Weinig <sam@webkit.org>
11497 Reviewed by Geoffrey Garen and Gavin Barraclough.
11499 Make access-nseive ~9x faster on the non-speculative path by
11500 adding special casing for doubles that can lossless-ly be converted
11501 to a uint32_t in getByVal and putByVal. This avoids calls to stringification
11502 and the hash lookup. Long term, we should try and get property of a getByVal
11503 and putByVal to be an integer immediate even in the non-speculative path.
11505 * dfg/DFGOperations.cpp:
11506 (JSC::DFG::putByVal):
11507 (JSC::DFG::operationPutByValInternal):
11509 2011-06-15 Oliver Hunt <oliver@apple.com>
11511 Reviewed by Darin Adler.
11513 REGRESSION (r88719): 5by5.tv schedule is not visible
11514 https://bugs.webkit.org/show_bug.cgi?id=62720
11516 Problem here is that the lexer wasn't considering '$' to be
11517 a valid character in an identifier.
11520 (JSC::Lexer::lexExpectIdentifier):
11522 2011-06-15 Oliver Hunt <oliver@apple.com>
11524 Reviewed by Sam Weinig.
11526 Reduce the size of global_resolve
11527 https://bugs.webkit.org/show_bug.cgi?id=62738
11529 Reduce the code size of global_resolve in the JIT by replacing
11530 multiple pointer loads with a single pointer move + two offset
11533 * jit/JITOpcodes.cpp:
11534 (JSC::JIT::emit_op_resolve_global):
11535 * jit/JITOpcodes32_64.cpp:
11536 (JSC::JIT::emit_op_resolve_global):
11538 2011-06-14 Geoffrey Garen <ggaren@apple.com>
11540 Reviewed by Dan Bernstein.
11542 Fixed an inavlid ASSERT I found while investigating
11543 <rdar://problem/9580254> Crash in JSC::HandleHeap::finalizeWeakHandles + 92
11544 https://bugs.webkit.org/show_bug.cgi?id=62699
11546 No test since we don't know of a way to get WebCore to deallocate the
11547 next-to-finalize handle, which is also the last handle in the list,
11548 while finalizing the second-to-last handle in the list.
11550 * heap/HandleHeap.h:
11551 (JSC::HandleHeap::deallocate): Don't ASSERT that m_nextToFinalize has a
11552 non-0 next() after updating it, since it is valid to update m_nextToFinalize
11553 to point to the tail sentinel.
11555 Do ASSERT that m_nextToFinalize has a non-0 next() before updating it,
11556 since it is not valid to update m_nextToFinalize to point past the tail
11559 Also, use m_nextToFinalize consistently for clarity.
11561 2011-06-14 Gavin Barraclough <barraclough@apple.com>
11563 Reviewed by Sam Weinig.
11565 https://bugs.webkit.org/show_bug.cgi?id=43841
11566 SegmentedVector::operator== typo
11568 * wtf/SegmentedVector.h:
11569 (WTF::SegmentedVectorIterator::operator==):
11570 (WTF::SegmentedVectorIterator::operator!=):
11572 2011-06-14 Oliver Hunt <oliver@apple.com>
11574 Reviewed by Gavin Barraclough.
11576 Constant array literals result in unnecessarily large amounts of code
11577 https://bugs.webkit.org/show_bug.cgi?id=62658
11579 Add a new version of op_new_array that simply copies values from a buffer
11580 we hang off of the CodeBlock, rather than generating code to place each
11581 entry into the registerfile, and then copying it from the registerfile into
11582 the array. This is a slight improvement on some sunspider tests, but no
11583 measurable overall change. That's okay though as our goal was to reduce
11584 code size without hurting performance.
11586 * bytecode/CodeBlock.cpp:
11587 (JSC::CodeBlock::dump):
11588 * bytecode/CodeBlock.h:
11589 (JSC::CodeBlock::addImmediateBuffer):
11590 (JSC::CodeBlock::immediateBuffer):
11591 * bytecode/Opcode.h:
11592 * bytecompiler/BytecodeGenerator.cpp:
11593 (JSC::BytecodeGenerator::addImmediateBuffer):
11594 (JSC::BytecodeGenerator::emitNewArray):
11595 * bytecompiler/BytecodeGenerator.h:
11596 * bytecompiler/NodesCodegen.cpp:
11597 (JSC::ArrayNode::emitBytecode):
11598 * interpreter/Interpreter.cpp:
11599 (JSC::Interpreter::privateExecute):
11601 (JSC::JIT::privateCompileMainPass):
11603 * jit/JITOpcodes.cpp:
11604 (JSC::JIT::emit_op_new_array):
11605 (JSC::JIT::emit_op_new_array_buffer):
11606 * jit/JITOpcodes32_64.cpp:
11607 * jit/JITStubs.cpp:
11608 (JSC::DEFINE_STUB_FUNCTION):
11611 2011-06-14 Sheriff Bot <webkit.review.bot@gmail.com>
11613 Unreviewed, rolling out r88841.
11614 http://trac.webkit.org/changeset/88841
11615 https://bugs.webkit.org/show_bug.cgi?id=62672
11617 Caused many tests to crash (Requested by rniwa on #webkit).
11619 * bytecode/CodeBlock.cpp:
11620 (JSC::CodeBlock::dump):
11621 * bytecode/CodeBlock.h:
11622 * bytecode/Opcode.h:
11623 * bytecompiler/BytecodeGenerator.cpp:
11624 (JSC::BytecodeGenerator::emitNewArray):
11625 * bytecompiler/BytecodeGenerator.h:
11626 * bytecompiler/NodesCodegen.cpp:
11627 (JSC::ArrayNode::emitBytecode):
11628 * interpreter/Interpreter.cpp:
11629 (JSC::Interpreter::privateExecute):
11631 (JSC::JIT::privateCompileMainPass):
11633 * jit/JITOpcodes.cpp:
11634 (JSC::JIT::emit_op_new_array):
11635 * jit/JITOpcodes32_64.cpp:
11636 (JSC::JIT::emit_op_new_array):
11637 * jit/JITStubs.cpp:
11640 2011-06-14 Oliver Hunt <oliver@apple.com>
11642 Reviewed by Gavin Barraclough.
11644 Constant array literals result in unnecessarily large amounts of code
11645 https://bugs.webkit.org/show_bug.cgi?id=62658
11647 Add a new version of op_new_array that simply copies values from a buffer
11648 we hang off of the CodeBlock, rather than generating code to place each
11649 entry into the registerfile, and then copying it from the registerfile into
11650 the array. This is a slight improvement on some sunspider tests, but no
11651 measurable overall change. That's okay though as our goal was to reduce
11652 code size without hurting performance.
11654 * bytecode/CodeBlock.cpp:
11655 (JSC::CodeBlock::dump):
11656 * bytecode/CodeBlock.h:
11657 (JSC::CodeBlock::addImmediateBuffer):
11658 (JSC::CodeBlock::immediateBuffer):
11659 * bytecode/Opcode.h:
11660 * bytecompiler/BytecodeGenerator.cpp:
11661 (JSC::BytecodeGenerator::addImmediateBuffer):
11662 (JSC::BytecodeGenerator::emitNewArray):
11663 * bytecompiler/BytecodeGenerator.h:
11664 * bytecompiler/NodesCodegen.cpp:
11665 (JSC::ArrayNode::emitBytecode):
11666 * interpreter/Interpreter.cpp:
11667 (JSC::Interpreter::privateExecute):
11669 (JSC::JIT::privateCompileMainPass):
11671 * jit/JITOpcodes.cpp:
11672 (JSC::JIT::emit_op_new_array):
11673 (JSC::JIT::emit_op_new_array_buffer):
11674 * jit/JITOpcodes32_64.cpp:
11675 * jit/JITStubs.cpp:
11676 (JSC::DEFINE_STUB_FUNCTION):
11679 2011-06-14 Stephanie Lewis <slewis@apple.com>
11681 Rubber stamped by Oliver Hunt.
11683 <rdar://problem/9511169>
11684 Update order files.
11686 * JavaScriptCore.order:
11688 2011-06-14 Sam Weinig <sam@webkit.org>
11690 Reviewed by Geoffrey Garen.
11692 Fix dumping of constants to have the correct constant number.
11694 * bytecode/CodeBlock.cpp:
11695 (JSC::CodeBlock::dump):
11697 2011-06-14 Benjamin Poulain <benjamin@webkit.org>
11699 Reviewed by Eric Seidel.
11701 KeywordLookupGenerator's Trie does not work with Python 3
11702 https://bugs.webkit.org/show_bug.cgi?id=62635
11704 With Python 3, dict.items() return an iterator. Since the iterator
11705 protocol changed between Python 2 and 3, the easiest way to get the
11706 values is to have something that use the iterator implicitely, like a
11709 * KeywordLookupGenerator.py:
11711 2011-06-13 Oliver Hunt <oliver@apple.com>
11713 Reviewed by Gavin Barraclough.
11715 Fix llocp and lvalp names in the lexer to something more meaningful
11716 https://bugs.webkit.org/show_bug.cgi?id=62605
11720 * parser/Lexer.cpp:
11721 (JSC::Lexer::parseIdentifier):
11722 (JSC::Lexer::parseString):
11725 (JSC::Lexer::lexExpectIdentifier):
11727 2011-06-13 Oliver Hunt <oliver@apple.com>
11729 Reviewed by Gavin Barraclough.
11731 Make it possible to inline the common case of identifier lexing
11732 https://bugs.webkit.org/show_bug.cgi?id=62600
11734 Add a lexing function that expects to lex an "normal" alpha numeric
11735 identifier (that ignores keywords) so it's possible to inline the
11736 common parsing cases. This comes out as a reasonable parsing speed
11739 * parser/JSParser.cpp:
11740 (JSC::JSParser::nextExpectIdentifier):
11741 (JSC::JSParser::parseProperty):
11742 (JSC::JSParser::parseMemberExpression):
11743 * parser/Lexer.cpp:
11745 (JSC::Lexer::makeIdentifier):
11746 (JSC::Lexer::lexExpectIdentifier):
11748 2011-06-13 Xan Lopez <xlopez@igalia.com>
11750 Reviewed by Martin Robinson.
11755 * GNUmakefile.list.am:
11757 2011-06-13 Oliver Hunt <oliver@apple.com>
11759 Reviewed by Simon Fraser.
11761 Make it possible to inline Identifier::equal
11762 https://bugs.webkit.org/show_bug.cgi?id=62584
11764 Move Identifier::equal to the Identifier header file.
11766 * runtime/Identifier.cpp:
11767 * runtime/Identifier.h:
11768 (JSC::Identifier::equal):
11770 2011-06-13 Tony Chang <tony@chromium.org>
11772 Reviewed by Dimitri Glazkov.
11774 rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX
11775 https://bugs.webkit.org/show_bug.cgi?id=62578
11777 * Configurations/FeatureDefines.xcconfig:
11779 2011-06-13 Tony Chang <tony@chromium.org>
11781 Reviewed by Adam Barth.
11783 rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX
11784 https://bugs.webkit.org/show_bug.cgi?id=62545
11786 * Configurations/FeatureDefines.xcconfig:
11788 2011-06-12 Patrick Gansterer <paroga@webkit.org>
11790 Unreviewed. Build fix for !ENABLE(JIT) after r88604.
11792 * bytecode/CodeBlock.cpp:
11793 (JSC::CodeBlock::visitAggregate):
11795 2011-06-11 Gavin Barraclough <barraclough@apple.com>
11797 Reviewed by Darin Adler.
11799 https://bugs.webkit.org/show_bug.cgi?id=16777
11801 Remove #define NaN per Darin's comments.
11803 * runtime/JSGlobalObjectFunctions.cpp:
11804 (JSC::parseIntOverflow):
11806 (JSC::jsStrDecimalLiteral):
11809 * wtf/DateMath.cpp:
11810 (WTF::equivalentYearForDST):
11811 (WTF::parseES5DateFromNullTerminatedCharacters):
11812 (WTF::parseDateFromNullTerminatedCharacters):
11814 (JSC::parseDateFromNullTerminatedCharacters):
11816 2011-06-11 Gavin Barraclough <barraclough@apple.com>
11818 Rubber stamped by Geoff Garen.
11820 https://bugs.webkit.org/show_bug.cgi?id=62503
11821 Remove JIT_OPTIMIZE_* switches
11823 The alternative code paths are untested, and not well maintained.
11824 These were useful when there was more churn in the JIT, but now
11825 are a maintenance overhead. Time to move on, removing.
11827 * bytecode/CodeBlock.cpp:
11828 (JSC::CodeBlock::visitAggregate):
11830 (JSC::JIT::privateCompileSlowCases):
11831 (JSC::JIT::privateCompile):
11832 (JSC::JIT::linkConstruct):
11835 * jit/JITCall32_64.cpp:
11836 * jit/JITOpcodes.cpp:
11837 (JSC::JIT::privateCompileCTIMachineTrampolines):
11838 (JSC::JIT::privateCompileCTINativeCall):
11839 * jit/JITOpcodes32_64.cpp:
11840 (JSC::JIT::privateCompileCTIMachineTrampolines):
11841 (JSC::JIT::privateCompileCTINativeCall):
11842 (JSC::JIT::softModulo):
11843 * jit/JITPropertyAccess.cpp:
11844 * jit/JITPropertyAccess32_64.cpp:
11845 * jit/JITStubs.cpp:
11846 (JSC::DEFINE_STUB_FUNCTION):
11847 * runtime/Lookup.cpp:
11848 (JSC::setUpStaticFunctionSlot):
11849 * runtime/Lookup.h:
11852 2011-06-10 Gavin Barraclough <barraclough@apple.com>
11854 Reviewed by Sam Weinig.
11856 https://bugs.webkit.org/show_bug.cgi?id=16777
11857 Eliminate JSC::NaN and JSC::Inf
11859 There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants.
11860 The ones in std::numeric_limits are perfectly good.
11861 Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite.
11863 * API/JSCallbackObjectFunctions.h:
11865 * API/JSValueRef.cpp:
11866 (JSValueMakeNumber):
11868 * JavaScriptCore.exp:
11869 * runtime/CachedTranscendentalFunction.h:
11870 (JSC::CachedTranscendentalFunction::initialize):
11871 * runtime/DateConstructor.cpp:
11872 (JSC::constructDate):
11873 * runtime/DateInstanceCache.h:
11874 (JSC::DateInstanceData::DateInstanceData):
11875 (JSC::DateInstanceCache::reset):
11876 * runtime/JSCell.cpp:
11877 * runtime/JSCell.h:
11878 (JSC::JSCell::JSValue::getPrimitiveNumber):
11879 (JSC::JSCell::JSValue::toNumber):
11880 * runtime/JSGlobalData.cpp:
11881 (JSC::JSGlobalData::JSGlobalData):
11882 (JSC::JSGlobalData::resetDateCache):
11883 * runtime/JSGlobalObject.cpp:
11884 (JSC::JSGlobalObject::reset):
11885 * runtime/JSGlobalObjectFunctions.cpp:
11886 (JSC::globalFuncParseInt):
11887 (JSC::globalFuncIsFinite):
11888 * runtime/JSNotAnObject.cpp:
11889 (JSC::JSNotAnObject::toNumber):
11890 * runtime/JSValue.cpp:
11891 * runtime/JSValue.h:
11892 * runtime/JSValueInlineMethods.h:
11894 * runtime/MathObject.cpp:
11895 (JSC::mathProtoFuncMax):
11896 (JSC::mathProtoFuncMin):
11897 * runtime/NumberConstructor.cpp:
11898 (JSC::numberConstructorNegInfinity):
11899 (JSC::numberConstructorPosInfinity):
11900 * runtime/NumberPrototype.cpp:
11901 (JSC::numberProtoFuncToExponential):
11902 (JSC::numberProtoFuncToFixed):
11903 (JSC::numberProtoFuncToPrecision):
11904 (JSC::numberProtoFuncToString):
11905 * runtime/UString.cpp:
11906 * wtf/DecimalNumber.h:
11907 (WTF::DecimalNumber::DecimalNumber):
11911 2011-06-10 Tony Chang <tony@chromium.org>
11913 Reviewed by Ojan Vafai.
11915 add a compile guard ENABLE(FLEXBOX)
11916 https://bugs.webkit.org/show_bug.cgi?id=62049
11918 * Configurations/FeatureDefines.xcconfig:
11920 2011-06-10 Gavin Barraclough <barraclough@apple.com>
11922 Reviewed by Sam Weinig.
11924 https://bugs.webkit.org/show_bug.cgi?id=55347
11925 "name" and "message" enumerable on *Error.prototype
11927 This arises from chapter 15 of the spec:
11928 "Every other property described in this clause has the attributes
11929 { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
11930 unless otherwise specified."
11931 Standardized properties are not enumerable.
11933 * runtime/ErrorInstance.cpp:
11934 (JSC::ErrorInstance::ErrorInstance):
11935 * runtime/NativeErrorPrototype.cpp:
11936 (JSC::NativeErrorPrototype::NativeErrorPrototype):
11938 2011-06-09 Geoffrey Garen <ggaren@apple.com>
11940 Build fix: Corrected header spelling.
11944 2011-06-09 Geoffrey Garen <ggaren@apple.com>
11946 Reviewed by Oliver Hunt.
11948 Added OldSpace to the project
11949 https://bugs.webkit.org/show_bug.cgi?id=62417
11953 Added OldSpace, the ability to iterate NewSpace vs OldSpace, and a
11954 per-block flag for testing whether you're in NewSpace vs OldSpace.
11957 * GNUmakefile.list.am:
11958 * JavaScriptCore.gypi:
11959 * JavaScriptCore.pro:
11960 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
11961 * JavaScriptCore.xcodeproj/project.pbxproj: Build!
11963 * heap/MarkedBlock.cpp:
11964 (JSC::MarkedBlock::MarkedBlock):
11965 * heap/MarkedBlock.h:
11966 (JSC::MarkedBlock::inNewSpace):
11967 (JSC::MarkedBlock::setInNewSpace): Added inNewSpace flag, for use in
11970 * heap/NewSpace.cpp:
11971 (JSC::NewSpace::addBlock):
11972 (JSC::NewSpace::removeBlock):
11974 (JSC::NewSpace::forEachBlock): Added forEachBlock, to use for
11975 NewSpace-specific operations.
11977 * heap/OldSpace.cpp: Added.
11978 (JSC::OldSpace::OldSpace):
11979 (JSC::OldSpace::addBlock):
11980 (JSC::OldSpace::removeBlock):
11981 * heap/OldSpace.h: Added.
11982 (JSC::OldSpace::forEachBlock): New class for holding promoted blocks.
11985 2011-06-09 Hyowon Kim <hw1008.kim@samsung.com>
11987 Reviewed by Antonio Gomes.
11989 [EFL] Make accelerated compositing build in Webkit-EFL
11990 https://bugs.webkit.org/show_bug.cgi?id=62361
11992 Add PLATFORM(EFL) to enable ACCELERATED_COMPOSITING on EFL port.
11996 2011-06-09 Gavin Barraclough <barraclough@apple.com>
11998 Reviewed by Geoff Garen.
12000 Bug 62405 - Fix integer overflow in Array.prototype.push
12002 Fix geoff's review comments re static_cast.
12004 * runtime/ArrayPrototype.cpp:
12005 (JSC::arrayProtoFuncPush):
12007 2011-06-09 Geoffrey Garen <ggaren@apple.com>
12009 Reviewed by Oliver Hunt.
12011 Factored MarkedBlock set management into a helper class with a fast case Bloom filter
12012 https://bugs.webkit.org/show_bug.cgi?id=62413
12014 SunSpider reports a small speedup.
12016 This is in preparation for having ConservativeSet operate on arbitrary
12017 sets of MarkedBlocks, and in preparation for conservative scanning
12018 becoming proportionally more important than other GC activities.
12020 * GNUmakefile.list.am:
12021 * JavaScriptCore.gypi:
12022 * JavaScriptCore.xcodeproj/project.pbxproj: Build-o.
12024 * heap/ConservativeRoots.cpp:
12025 (JSC::ConservativeRoots::add):
12026 * heap/ConservativeRoots.h:
12027 (JSC::ConservativeRoots::ConservativeRoots): Operate on a MarkedBlockSet
12028 directly, instead of a Heap, so we can operate on subsets of the Heap
12031 Use a TinyBloomFilter for single-cycle exclusion of most pointers. This
12032 is particularly important since we expect not to find our subject pointer
12033 in the MarkedBlock hash, and hash misses are more expensive than typical
12034 hash lookups because they have high collision rates.
12036 No need for single-pointer add() to be public anymore, since nobody uses it.
12039 (JSC::Heap::markRoots):
12041 (JSC::Heap::forEachCell):
12042 (JSC::Heap::forEachBlock): Use MarkedBlockSet since that's what
12043 ConservativeRoots relies on.
12045 Nixed contains(), since nobody uses it anymore.
12047 * heap/MarkedBlock.h:
12048 (WTF::MarkedBlockHash::hash): Added a faster hash taking advantage of
12049 the VM layout properties of MarkedBlocks.
12051 * heap/MarkedBlockSet.h: Added.
12052 (JSC::MarkedBlockSet::add):
12053 (JSC::MarkedBlockSet::remove):
12054 (JSC::MarkedBlockSet::recomputeFilter):
12055 (JSC::MarkedBlockSet::filter):
12056 (JSC::MarkedBlockSet::set):
12057 * heap/TinyBloomFilter.h: Added.
12058 (JSC::TinyBloomFilter::TinyBloomFilter):
12059 (JSC::TinyBloomFilter::add):
12060 (JSC::TinyBloomFilter::ruleOut): New helper class, used above.
12062 * interpreter/RegisterFile.cpp:
12063 (JSC::RegisterFile::gatherConservativeRoots): No need to specifically
12064 exclude values by tag -- the tiny bloom filter is already a register-register
12065 compare, so adding another "rule out" factor just slows things down.
12067 2011-06-09 Gavin Barraclough <barraclough@apple.com>
12069 Reviewed by Oliver Hunt.
12071 Bug 62405 - Fix integer overflow in Array.prototype.push
12073 There are three integer overflows here, leading to safe (not a security risk)
12074 but incorrect (non-spec-compliant) behaviour.
12076 Two overflows occur when calculating the new length after pushing (one in the
12077 fast version of push in JSArray, one in the generic version in ArrayPrototype).
12078 The other occurs calculating indices to write to when multiple items are pushed.
12080 These errors result in three test-262 failures.
12082 * runtime/ArrayPrototype.cpp:
12083 (JSC::arrayProtoFuncPush):
12084 * runtime/JSArray.cpp:
12085 (JSC::JSArray::put):
12086 (JSC::JSArray::push):
12088 2011-06-09 Dan Bernstein <mitz@apple.com>
12090 Reviewed by Anders Carlsson.
12092 Add Vector::reverse()
12093 https://bugs.webkit.org/show_bug.cgi?id=62393
12096 (WTF::Vector::reverse): Added
12098 2011-06-08 Geoffrey Garen <ggaren@apple.com>
12100 Reviewed by Oliver Hunt.
12102 Factored a bunch of Heap functionality into stand-alone functors
12103 https://bugs.webkit.org/show_bug.cgi?id=62337
12105 This is in preparation for making these functors operate on arbitrary
12106 sets of MarkedBlocks.
12108 * JavaScriptCore.exp: This file is a small tragedy.
12110 * debugger/Debugger.cpp:
12111 (JSC::Debugger::recompileAllJSFunctions): Updated for type change and rename.
12113 * heap/HandleHeap.h:
12114 (JSC::HandleHeap::forEachStrongHandle): New function for iterating all
12115 strong handles, so we can play along in the functor game.
12118 (JSC::CountFunctor::CountFunctor::CountFunctor):
12119 (JSC::CountFunctor::CountFunctor::count):
12120 (JSC::CountFunctor::CountFunctor::returnValue):
12121 (JSC::CountFunctor::ClearMarks::operator()):
12122 (JSC::CountFunctor::ResetAllocator::operator()):
12123 (JSC::CountFunctor::Sweep::operator()):
12124 (JSC::CountFunctor::MarkCount::operator()):
12125 (JSC::CountFunctor::Size::operator()):
12126 (JSC::CountFunctor::Capacity::operator()):
12127 (JSC::CountFunctor::Count::operator()):
12128 (JSC::CountFunctor::CountIfGlobalObject::operator()):
12129 (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
12130 (JSC::CountFunctor::TakeIfEmpty::operator()):
12131 (JSC::CountFunctor::TakeIfEmpty::returnValue):
12132 (JSC::CountFunctor::RecordType::RecordType):
12133 (JSC::CountFunctor::RecordType::typeName):
12134 (JSC::CountFunctor::RecordType::operator()):
12135 (JSC::CountFunctor::RecordType::returnValue): These functors factor out
12136 behavior that used to be in the functions below.
12138 (JSC::Heap::clearMarks):
12139 (JSC::Heap::sweep):
12140 (JSC::Heap::objectCount):
12142 (JSC::Heap::capacity):
12143 (JSC::Heap::protectedGlobalObjectCount):
12144 (JSC::Heap::protectedObjectCount):
12145 (JSC::Heap::protectedObjectTypeCounts):
12146 (JSC::Heap::objectTypeCounts):
12147 (JSC::Heap::resetAllocator):
12148 (JSC::Heap::freeBlocks):
12149 (JSC::Heap::shrink): Factored out behavior into the functors above.
12152 (JSC::Heap::forEachProtectedCell):
12153 (JSC::Heap::forEachCell):
12154 (JSC::Heap::forEachBlock): Added forEach* iteration templates. I chose
12155 functor-based templates instead of plain iterators because they're simpler
12156 to implement in this case and they require a lot less code at the call site.
12158 * heap/MarkedBlock.h:
12159 (JSC::MarkedBlock::VoidFunctor::returnValue): Default parent class for
12162 (JSC::MarkedBlock::forEachCell): Renamed forEach to forEachCell because
12163 we have a few different kind of "for each" now.
12165 * runtime/JSGlobalData.cpp:
12166 (WTF::Recompile::operator()):
12167 (JSC::JSGlobalData::JSGlobalData):
12168 (JSC::JSGlobalData::recompileAllJSFunctions): Updated for type change and rename.
12170 * runtime/JSGlobalData.h: Removed globalObjectCount because it was unused.
12172 2011-06-08 Mikołaj Małecki <m.malecki@samsung.com>
12174 Reviewed by Pavel Feldman.
12176 Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
12177 https://bugs.webkit.org/show_bug.cgi?id=52791
12179 No new tests. The problem can be reproduced by trying to create InspectorValue
12180 from 1.0e-100 and call ->toJSONString() on this.
12182 * JavaScriptCore.exp:
12183 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12184 export 2 functions DecimalNumber::bufferLengthForStringExponential and
12185 DecimalNumber::toStringExponential.
12187 2011-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
12189 Unreviewed, rolling out r88404.
12190 http://trac.webkit.org/changeset/88404
12191 https://bugs.webkit.org/show_bug.cgi?id=62342
12193 broke win and mac build (Requested by tony^work on #webkit).
12195 * JavaScriptCore.gyp/JavaScriptCore.gyp:
12197 2011-06-08 Evan Martin <evan@chromium.org>
12199 Reviewed by Adam Barth.
12201 [chromium] use gyp 'settings' type for settings target
12202 https://bugs.webkit.org/show_bug.cgi?id=62323
12204 The 'settings' gyp target type is for targets that exist solely
12205 for their settings (no build rules). The comment above this target
12206 says it's for this, but it incorrectly uses 'none'.
12208 * JavaScriptCore.gyp/JavaScriptCore.gyp:
12210 2011-06-08 Sailesh Agrawal <sail@chromium.org>
12212 Reviewed by Mihai Parparita.
12214 Chromium Mac: Enable overlay scrollbars
12215 https://bugs.webkit.org/show_bug.cgi?id=59756
12217 Enable WTF_USE_WK_SCROLLBAR_PAINTER for Chromium Mac. This allows us to use overlay scrollbars on future versions of Mac OS X.
12221 2011-06-08 Oliver Hunt <oliver@apple.com>
12223 Reviewed by Geoffrey Garen.
12225 Add faster lookup cache for multi character identifiers
12226 https://bugs.webkit.org/show_bug.cgi?id=62327
12228 Add a non-hash lookup for mutiple character identifiers. This saves us from
12229 adding repeated identifiers to the ParserArena's identifier list as people
12230 tend to not start all their variables and properties with the same character
12231 and happily identifier locality works in our favour.
12233 * parser/ParserArena.h:
12234 (JSC::IdentifierArena::isEmpty):
12235 (JSC::IdentifierArena::clear):
12236 (JSC::IdentifierArena::makeIdentifier):
12238 2011-06-08 Geoffrey Garen <ggaren@apple.com>
12240 Reviewed by Oliver Hunt.
12242 Took some responsibilities away from NewSpace
12243 https://bugs.webkit.org/show_bug.cgi?id=62325
12245 NewSpace is basically just an allocator now.
12247 Heap acts as a controller, responsible for managing the set of all
12250 This is in preparation for moving parts of the controller logic into
12251 separate helper classes that can act on arbitrary sets of MarkedBlocks
12252 that may or may not be in NewSpace.
12256 (JSC::Heap::destroy):
12257 (JSC::Heap::allocate):
12258 (JSC::Heap::markRoots):
12259 (JSC::Heap::clearMarks):
12260 (JSC::Heap::sweep):
12261 (JSC::Heap::objectCount):
12263 (JSC::Heap::capacity):
12264 (JSC::Heap::collect):
12265 (JSC::Heap::resetAllocator):
12266 (JSC::Heap::allocateBlock):
12267 (JSC::Heap::freeBlocks):
12268 (JSC::Heap::shrink): Moved the set of MarkedBlocks from NewSpace to Heap,
12269 along with all functions that operate on the set of MarkedBlocks. Also
12270 moved responsibility for deciding whether to allocate a new MarkedBlock,
12271 and for allocating it.
12274 (JSC::Heap::contains):
12275 (JSC::Heap::forEach): Ditto.
12277 * heap/NewSpace.cpp:
12278 (JSC::NewSpace::addBlock):
12279 (JSC::NewSpace::removeBlock):
12280 (JSC::NewSpace::resetAllocator):
12282 (JSC::NewSpace::waterMark):
12283 (JSC::NewSpace::allocate): Ditto.
12285 2011-06-08 Geoffrey Garen <ggaren@apple.com>
12287 Reviewed by Oliver Hunt.
12289 Some more MarkedSpace => NewSpace renaming
12290 https://bugs.webkit.org/show_bug.cgi?id=62305
12292 * JavaScriptCore.exp:
12293 * JavaScriptCore.order:
12294 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12297 (JSC::Heap::destroy):
12298 (JSC::Heap::reportExtraMemoryCostSlowCase):
12299 (JSC::Heap::allocate):
12300 (JSC::Heap::markRoots):
12301 (JSC::Heap::objectCount):
12303 (JSC::Heap::capacity):
12304 (JSC::Heap::collect):
12305 (JSC::Heap::isValidAllocation):
12307 (JSC::Heap::markedSpace):
12308 (JSC::Heap::contains):
12309 (JSC::Heap::forEach):
12310 (JSC::Heap::allocate):
12311 * runtime/JSCell.h:
12313 2011-06-08 Kevin Ollivier <kevino@theolliviers.com>
12315 Reviewed by Eric Seidel.
12317 Add export macros to profiler headers.
12318 https://bugs.webkit.org/show_bug.cgi?id=27551
12320 * profiler/Profiler.h:
12322 2011-06-08 Kevin Ollivier <kevino@theolliviers.com>
12324 Reviewed by Eric Seidel.
12326 Add export symbols to parser headers.
12327 https://bugs.webkit.org/show_bug.cgi?id=27551
12329 * parser/SourceProviderCache.h:
12331 2011-06-08 Kevin Ollivier <kevino@theolliviers.com>
12333 Reviewed by Eric Seidel.
12335 Add export symbols to interpreter headers.
12336 https://bugs.webkit.org/show_bug.cgi?id=27551
12338 * interpreter/Interpreter.h:
12340 2011-06-08 Kevin Ollivier <kevino@theolliviers.com>
12342 Reviewed by Eric Seidel.
12344 Add export symbols to debugger headers.
12345 https://bugs.webkit.org/show_bug.cgi?id=27551
12347 * debugger/Debugger.h:
12348 * debugger/DebuggerCallFrame.h:
12350 2011-06-08 Geoffrey Garen <ggaren@apple.com>
12352 Reviewed by Darin Adler.
12354 Moved MarkedSpace.* to NewSpace.* in preparation for more renaming
12355 https://bugs.webkit.org/show_bug.cgi?id=62268
12358 * GNUmakefile.list.am:
12359 * JavaScriptCore.gypi:
12360 * JavaScriptCore.pro:
12361 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
12362 * JavaScriptCore.xcodeproj/project.pbxproj:
12364 * heap/MarkedBlock.h:
12365 * heap/MarkedSpace.cpp: Removed.
12366 * heap/MarkedSpace.h: Removed.
12367 * heap/NewSpace.cpp: Copied from Source/JavaScriptCore/heap/MarkedSpace.cpp.
12368 * heap/NewSpace.h: Copied from Source/JavaScriptCore/heap/MarkedSpace.h.
12370 2011-06-08 Sheriff Bot <webkit.review.bot@gmail.com>
12372 Unreviewed, rolling out r88365.
12373 http://trac.webkit.org/changeset/88365
12374 https://bugs.webkit.org/show_bug.cgi?id=62301
12376 windows bots broken (Requested by loislo_ on #webkit).
12378 * JavaScriptCore.exp:
12380 2011-06-08 Ryan Sleevi <rsleevi@chromium.org>
12382 Reviewed by Tony Chang.
12384 Suppress C++0x compat warnings when compiling Chromium port with GCC 4.6
12386 Compiling Chromium port under GCC 4.6 produces warnings about nullptr
12387 https://bugs.webkit.org/show_bug.cgi?id=62242
12389 * JavaScriptCore.gyp/JavaScriptCore.gyp:
12391 2011-06-08 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org>
12393 Reviewed by Andreas Kling.
12395 Webkit on SPARC Solaris has wrong endian
12396 https://bugs.webkit.org/show_bug.cgi?id=29407
12398 Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
12399 there are more ocurrences of the same code pattern in webkit.
12401 This patch includes the check on these other parts of the code.
12403 This is a speculative fix, I don't have a sparc machine to test and
12404 don't know which kind of test would trigger a crash (but it's quite
12405 obvious that it's the same code duplicated in different files).
12407 * runtime/UString.h:
12408 (JSC::UStringHash::equal):
12409 * wtf/text/StringHash.h:
12410 (WTF::StringHash::equal):
12412 2011-06-08 Yael Aharon <yael.aharon@nokia.com>
12414 Reviewed by Andreas Kling.
12416 [Qt] Build fix for building QtWebKit inside of Qt.
12417 https://bugs.webkit.org/show_bug.cgi?id=62280
12419 Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
12422 No new tests, as this is just a build fix.
12424 * JavaScriptCore.pri:
12426 2011-06-07 Geoffrey Garen <ggaren@apple.com>
12428 Reviewed by Oliver Hunt.
12430 Split 'reset' into 'collect' and 'resetAllocator'
12431 https://bugs.webkit.org/show_bug.cgi?id=62267
12434 (JSC::Heap::allocate):
12435 (JSC::Heap::collectAllGarbage):
12436 (JSC::Heap::collect):
12438 * heap/MarkedBlock.h:
12439 (JSC::MarkedBlock::resetAllocator):
12440 * heap/MarkedSpace.cpp:
12441 (JSC::MarkedSpace::resetAllocator):
12442 * heap/MarkedSpace.h:
12443 (JSC::MarkedSpace::SizeClass::resetAllocator):
12445 2011-06-07 Geoffrey Garen <ggaren@apple.com>
12447 Reviewed by Sam Weinig.
12449 Renamed some more marks to visits
12450 https://bugs.webkit.org/show_bug.cgi?id=62254
12452 * heap/HandleHeap.cpp:
12453 (JSC::HandleHeap::visitStrongHandles):
12454 (JSC::HandleHeap::visitWeakHandles):
12455 * heap/HandleHeap.h:
12456 * heap/HandleStack.cpp:
12457 (JSC::HandleStack::visit):
12458 * heap/HandleStack.h:
12460 (JSC::Heap::markProtectedObjects):
12461 (JSC::Heap::markTempSortVectors):
12462 (JSC::Heap::markRoots):
12463 * heap/HeapRootVisitor.h:
12464 (JSC::HeapRootVisitor::visit):
12465 * runtime/ArgList.cpp:
12466 (JSC::MarkedArgumentBuffer::markLists):
12468 2011-06-07 Gavin Barraclough <barraclough@apple.com>
12470 Reviewed by Sam Weinig
12472 https://bugs.webkit.org/show_bug.cgi?id=55537
12473 Functions claim to have 'callee' which they actually don't (and shouldn't)
12475 * JavaScriptCore.xcodeproj/project.pbxproj:
12476 * runtime/JSFunction.cpp:
12477 (JSC::JSFunction::getOwnPropertyNames):
12479 2011-06-07 Juan C. Montemayor <jmont@apple.com>
12481 Reviewed by Darin Adler.
12483 Make JSStaticFunction and JSStaticValue less "const"
12484 https://bugs.webkit.org/show_bug.cgi?id=62222
12486 * API/JSObjectRef.h:
12487 * API/tests/testapi.c:
12488 (checkConstnessInJSObjectNames):
12490 * JavaScriptCore.xcodeproj/project.pbxproj:
12492 2011-06-07 Gavin Barraclough <barraclough@apple.com>
12494 Reviewed by Sam Weinig.
12496 https://bugs.webkit.org/show_bug.cgi?id=62240
12497 DFG JIT - add support for for-loop array initialization.
12499 Support put by val beyond vector length.
12500 Add a operationPutByValBeyondArrayBounds operation, make
12501 PutValVal call this if the vector length check fails.
12503 * dfg/DFGJITCodeGenerator.h:
12504 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
12505 (JSC::DFG::JITCodeGenerator::silentFillGPR):
12506 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
12507 (JSC::DFG::JITCodeGenerator::isDoubleConstantWithInt32Value):
12508 (JSC::DFG::JITCodeGenerator::isJSConstantWithInt32Value):
12509 (JSC::DFG::JITCodeGenerator::isIntegerConstant):
12510 (JSC::DFG::JITCodeGenerator::valueOfIntegerConstant):
12511 * dfg/DFGOperations.cpp:
12512 (JSC::DFG::operationPutByValInternal):
12513 * dfg/DFGOperations.h:
12514 * dfg/DFGSpeculativeJIT.cpp:
12515 (JSC::DFG::SpeculativeJIT::compile):
12516 * dfg/DFGSpeculativeJIT.h:
12518 2011-06-06 James Simonsen <simonjam@chromium.org>
12520 Reviewed by James Robinson.
12522 Add monotonicallyIncreasingTime() to get monotonically increasing time
12523 https://bugs.webkit.org/show_bug.cgi?id=37743
12525 * wtf/CurrentTime.cpp: Add monotonicallyIncreasingTime() for mac and a fallback implementation that just wraps currentTime().
12526 (WTF::monotonicallyIncreasingTime):
12527 * wtf/CurrentTime.h: Add monotonicallyIncreasingTime().
12529 2011-06-06 Alexandru Chiculita <achicu@adobe.com>
12531 Reviewed by Kent Tamura.
12533 Add ENABLE_CSS_EXCLUSIONS support for build-webkit script
12534 https://bugs.webkit.org/show_bug.cgi?id=61628
12536 * Configurations/FeatureDefines.xcconfig:
12538 2011-06-06 Mihnea Ovidenie <mihnea@adobe.com>
12540 Reviewed by Kent Tamura.
12542 Add ENABLE(CSS_REGIONS) guard for CSS Regions support
12543 https://bugs.webkit.org/show_bug.cgi?id=61631
12545 * Configurations/FeatureDefines.xcconfig:
12547 2011-06-06 Carlos Garcia Campos <cgarcia@igalia.com>
12549 Unreviewed. Fix the GTK+ build.
12551 * GNUmakefile.am: Add javascriptcore_cflags variable.
12553 2011-06-04 Kevin Ollivier <kevino@theolliviers.com>
12555 [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
12560 2011-06-04 Gustavo Noronha Silva <gns@gnome.org>
12562 Unreviewed, MIPS build fix.
12564 WebKitGTK+ tarball fails to build on MIPS.
12565 https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
12567 * GNUmakefile.list.am: Add missing MIPS-related file to the list
12568 of files that are added to the tarball on make dist, and fix
12571 2011-06-04 Sam Weinig <sam@webkit.org>
12573 Reviewed by Darin Adler.
12575 Fix formatting of the output generated by KeywordLookupGenerator.py
12576 https://bugs.webkit.org/show_bug.cgi?id=62083
12578 - Uses correct year for copyright.
12579 - Puts ending brace on same line as "else if"
12580 - Puts starting brace of function on its own line.
12581 - Adds some tasteful whitespace.
12582 - Adds comments to make clear that scopes are ending
12583 - Make macros actually split on two lines.
12585 * KeywordLookupGenerator.py:
12587 2011-06-04 Adam Barth <abarth@webkit.org>
12589 Reviewed by Eric Seidel.
12591 KeywordLookupGenerator.py spams stdout in Chromium Linux build
12592 https://bugs.webkit.org/show_bug.cgi?id=62087
12594 This action does not appear to be needed.
12596 * JavaScriptCore.gyp/JavaScriptCore.gyp:
12598 2011-06-03 Oliver Hunt <oliver@apple.com>
12600 Reviewed by Maciej Stachowiak.
12602 Lexer needs to provide Identifier for reserved words
12603 https://bugs.webkit.org/show_bug.cgi?id=62086
12605 Alas it is necessary to provide an Identifier reference for keywords
12606 so that we can do the right thing when they're used in object literals.
12607 We now keep Identifiers for all reserved words in the CommonIdentifiers
12608 structure so that we can access them without a hash lookup.
12610 * KeywordLookupGenerator.py:
12611 * parser/Lexer.cpp:
12612 (JSC::Lexer::parseIdentifier):
12614 * runtime/CommonIdentifiers.cpp:
12615 (JSC::CommonIdentifiers::CommonIdentifiers):
12616 * runtime/CommonIdentifiers.h:
12618 2011-06-03 Gavin Barraclough <barraclough@apple.com>
12620 Reviewed by Sam Weinig.
12622 Add debug code to break on speculation failures.
12624 * dfg/DFGJITCompiler.cpp:
12625 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
12626 (JSC::DFG::JITCompiler::compileFunction):
12629 2011-06-03 Gavin Barraclough <barraclough@apple.com>
12631 Reviewed by Sam Weinig.
12633 https://bugs.webkit.org/show_bug.cgi?id=62082
12634 DFG JIT - bug passing arguments that need swap
12636 This is really just a typo.
12637 When setting up the arguments for a call out to a C operation, we'll
12638 fail to swap arguments where this is necessary. For example, in the
12639 case of 2 arg calls, where the first argument is in %rdx & the second
12640 is in %rsi we should swap (exec will be passed in %rdi), but we don't.
12642 This can also affect function calls passing three arguments.
12644 * dfg/DFGJITCodeGenerator.h:
12645 (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
12646 - Call swap with the correct arguments.
12648 2011-06-03 Oliver Hunt <oliver@apple.com>
12650 Reviewed by Gavin Barraclough.
12652 Force inlining of some hot lexer functions
12653 https://bugs.webkit.org/show_bug.cgi?id=62079
12655 Fix more GCC stupidity
12658 (JSC::Lexer::isWhiteSpace):
12659 (JSC::Lexer::isLineTerminator):
12661 2011-06-03 Oliver Hunt <oliver@apple.com>
12663 Reviewed by Gavin Barraclough.
12665 GCC not inlining some functions that it really should be
12666 https://bugs.webkit.org/show_bug.cgi?id=62075
12668 Add ALWAYS_INLINE to a number of parsing and lexing functions
12669 that should always be inlined. This gets us ~1.4% on my ad hoc
12672 * KeywordLookupGenerator.py:
12673 * parser/JSParser.cpp:
12674 (JSC::JSParser::next):
12675 (JSC::JSParser::nextTokenIsColon):
12676 (JSC::JSParser::consume):
12677 (JSC::JSParser::match):
12678 (JSC::JSParser::tokenStart):
12679 (JSC::JSParser::tokenLine):
12680 (JSC::JSParser::tokenEnd):
12681 * parser/Lexer.cpp:
12682 (JSC::isIdentPart):
12684 2011-06-03 Oliver Hunt <oliver@apple.com>
12686 Whoops, fix last minute bug.
12688 * parser/Lexer.cpp:
12689 (JSC::Lexer::parseIdentifier):
12691 2011-06-03 Martin Robinson <mrobinson@igalia.com>
12693 Try to fix the GTK+ build.
12695 * GNUmakefile.am: Clean up some spaces that should be tabs.
12696 * GNUmakefile.list.am: Add KeywordLookup.h to the source list
12697 and clean up some spaces that should be tabs.
12699 2011-06-03 Oliver Hunt <oliver@apple.com>
12701 Reviewed by Geoffrey Garen.
12703 Improve keyword lookup
12704 https://bugs.webkit.org/show_bug.cgi?id=61913
12706 Rather than doing multiple hash lookups as we currently
12707 do when trying to identify keywords we now use an
12708 automatically generated decision tree (essentially it's
12709 a hard coded patricia trie). We still use the regular
12710 lookup table for the last few characters of an input as
12711 this allows us to completely skip all bounds checks.
12714 * DerivedSources.make:
12715 * DerivedSources.pro:
12717 * JavaScriptCore.gyp/JavaScriptCore.gyp:
12718 * JavaScriptCore.xcodeproj/project.pbxproj:
12719 * KeywordLookupGenerator.py: Added.
12720 * make-generated-sources.sh:
12721 * parser/Lexer.cpp:
12722 (JSC::Lexer::internalShift):
12723 (JSC::Lexer::shift):
12724 (JSC::Lexer::parseIdentifier):
12727 2011-06-03 Siddharth Mathur <siddharth.mathur@nokia.com>
12729 Reviewed by Benjamin Poulain.
12731 [Qt] Build flag for experimental ICU library support
12732 https://bugs.webkit.org/show_bug.cgi?id=60786
12734 Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
12735 ICU powered Unicode support.
12737 * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
12738 * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE).
12740 2011-06-03 Alexis Menard <alexis.menard@openbossa.org>
12742 Reviewed by Benjamin Poulain.
12744 [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
12745 https://bugs.webkit.org/show_bug.cgi?id=61957
12747 When building inside the Qt source tree, qmake always append the mkspecs
12748 defines after ours. We have to workaround and make sure that we append
12749 our flags after the qmake variable used inside Qt. This workaround was provided
12750 by our qmake folks. We need to append in both case because qmake behave differently
12751 when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
12753 * JavaScriptCore.pro:
12755 2011-06-02 Jay Civelli <jcivelli@chromium.org>
12757 Reviewed by Adam Barth.
12759 Added a method to generate RFC 2822 compliant date strings.
12760 https://bugs.webkit.org/show_bug.cgi?id=7169
12762 * wtf/DateMath.cpp:
12763 (WTF::twoDigitStringFromNumber):
12764 (WTF::makeRFC2822DateString):
12767 2011-06-02 Alexis Menard <alexis.menard@openbossa.org>
12769 Reviewed by Andreas Kling.
12771 [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
12772 https://bugs.webkit.org/show_bug.cgi?id=61957
12774 When building inside the Qt source tree, qmake always append the mkspecs
12775 defines after ours. We have to workaround and make sure that we append
12776 our flags after the qmake variable used inside Qt. This workaround was provided
12777 by our qmake folks.
12779 * JavaScriptCore.pro:
12781 2011-06-01 Oliver Hunt <oliver@apple.com>
12783 Reviewed by Geoffrey Garen.
12785 Add single character lookup cache to IdentifierArena
12786 https://bugs.webkit.org/show_bug.cgi?id=61879
12788 Add a simple lookup cache for single ascii character
12789 identifiers. Produces around a 2% improvement in parse
12790 time for my adhoc parser test.
12792 * parser/ParserArena.h:
12793 (JSC::IdentifierArena::IdentifierArena):
12794 (JSC::IdentifierArena::clear):
12795 (JSC::IdentifierArena::makeIdentifier):
12797 2011-05-31 Oliver Hunt <oliver@apple.com>
12799 Reviewed by Geoffrey Garen.
12801 Freezing a function and its prototype causes browser to crash.
12802 https://bugs.webkit.org/show_bug.cgi?id=61758
12804 Make JSObject::preventExtensions virtual so that we can override it
12805 and instantiate all lazy
12807 * JavaScriptCore.exp:
12808 * runtime/JSFunction.cpp:
12809 (JSC::createPrototypeProperty):
12810 (JSC::JSFunction::preventExtensions):
12811 (JSC::JSFunction::getOwnPropertySlot):
12812 * runtime/JSFunction.h:
12813 * runtime/JSObject.h:
12814 * runtime/JSObject.cpp:
12815 (JSC::JSObject::seal):
12816 (JSC::JSObject::seal):
12818 2011-06-01 Sheriff Bot <webkit.review.bot@gmail.com>
12820 Unreviewed, rolling out r87788.
12821 http://trac.webkit.org/changeset/87788
12822 https://bugs.webkit.org/show_bug.cgi?id=61856
12824 breaks windows chromium canary (Requested by jknotten on
12827 * wtf/DateMath.cpp:
12831 2011-06-01 Jay Civelli <jcivelli@chromium.org>
12833 Reviewed by Adam Barth.
12835 Added a method to generate RFC 2822 compliant date strings.
12836 https://bugs.webkit.org/show_bug.cgi?id=7169
12838 * wtf/DateMath.cpp:
12839 (WTF::twoDigitStringFromNumber):
12840 (WTF::makeRFC2822DateString):
12843 2011-05-31 Yong Li <yoli@rim.com>
12845 Reviewed by Eric Seidel.
12847 https://bugs.webkit.org/show_bug.cgi?id=54807
12848 We have been assuming plain bitfields (like "int a : 31") are always signed integers.
12849 However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
12850 bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
12851 http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
12852 Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
12853 always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
12854 rule we should have in order to make our code independent from compilers and compiler flags.
12856 No new test added because this change is not known to fix any issue.
12858 * bytecode/StructureStubInfo.h:
12860 2011-05-30 Hojong Han <hojong.han@samsung.com>
12862 Reviewed by Geoffrey Garen.
12864 [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
12865 https://bugs.webkit.org/show_bug.cgi?id=61416
12867 * assembler/MacroAssemblerARM.h:
12868 (JSC::MacroAssemblerARM::branch32):
12869 * tests/mozilla/ecma/Expressions/11.12-1.js:
12872 2011-05-29 Geoffrey Garen <ggaren@apple.com>
12874 Reviewed by Sam Weinig.
12876 Some heap refactoring
12877 https://bugs.webkit.org/show_bug.cgi?id=61704
12879 SunSpider says no change.
12881 * JavaScriptCore.exp: Export!
12883 * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
12885 (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
12887 (JSC::Heap::allocate): Changed inline allocation code to only select the
12888 size class, since this can be optimized out at compile time -- everything
12889 else is now inlined into this out-of-line function.
12891 No need to duplicate ASSERTs made in our caller.
12895 (JSC::Heap::isMarked):
12896 (JSC::Heap::testAndSetMarked):
12897 (JSC::Heap::testAndClearMarked):
12898 (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
12899 a layer of indirection through MarkedSpace.
12901 (JSC::Heap::allocate): See above.
12903 * heap/MarkedBlock.cpp:
12904 (JSC::MarkedBlock::create):
12905 (JSC::MarkedBlock::MarkedBlock):
12906 * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
12908 * heap/MarkedSpace.cpp:
12909 (JSC::MarkedSpace::MarkedSpace):
12910 (JSC::MarkedSpace::allocateBlock):
12911 * heap/MarkedSpace.h:
12912 (JSC::MarkedSpace::allocate): Updated to match changes above.
12914 2011-05-28 David Kilzer <ddkilzer@apple.com>
12916 BUILD FIX when building only the interpreter
12918 Fixes the following compiler warning:
12920 JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
12921 void releaseExecutableMemory(JSGlobalData& globalData)
12924 * jit/ExecutableAllocator.h: Moved declaration of
12925 JSC::releaseExecutableMemory().
12927 2011-05-28 David Kilzer <ddkilzer@apple.com>
12929 BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
12931 * assembler/LinkBuffer.h:
12932 (JSC::LinkBuffer::linkCode): Added missing argument.
12934 2011-05-27 Geoffrey Garen <ggaren@apple.com>
12936 Reviewed by Oliver Hunt.
12938 JS API is too aggressive about throwing exceptions for NULL get or set operations
12939 https://bugs.webkit.org/show_bug.cgi?id=61678
12941 * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
12942 function that returns a JSValue, so it can fail and still forward to
12943 normal property lookup.
12945 * API/JSCallbackObjectFunctions.h:
12946 (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
12947 access a static property -- just forward the access. This allows objects
12948 to observe get/set operations but still let the JS object manage lifetime.
12950 (JSC::::put): Ditto.
12952 (JSC::::getStaticValue): Same as JSCallbackObject.h.
12954 * API/tests/testapi.c:
12955 (MyObject_set_nullGetForwardSet):
12956 * API/tests/testapi.js: Updated tests to reflect slightly less strict
12957 behavior, which matches headerdoc claims.
12959 2011-05-27 Geoffrey Garen <ggaren@apple.com>
12961 Reviewed by Oliver Hunt.
12963 Property caching is too aggressive for API objects
12964 https://bugs.webkit.org/show_bug.cgi?id=61677
12966 * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
12967 callback APIs allow the client to change its mind about our propertis at
12970 * API/tests/testapi.c:
12971 (PropertyCatchalls_getProperty):
12972 (PropertyCatchalls_setProperty):
12973 (PropertyCatchalls_getPropertyNames):
12974 (PropertyCatchalls_class):
12976 * API/tests/testapi.js: Some tests for dynamic API objects.
12978 * interpreter/Interpreter.cpp:
12979 (JSC::Interpreter::tryCachePutByID):
12980 (JSC::Interpreter::tryCacheGetByID):
12981 * jit/JITStubs.cpp:
12982 (JSC::JITThunks::tryCachePutByID):
12983 (JSC::JITThunks::tryCacheGetByID):
12984 (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
12987 * runtime/JSTypeInfo.h:
12988 (JSC::TypeInfo::TypeInfo):
12989 (JSC::TypeInfo::isFinal):
12990 (JSC::TypeInfo::prohibitsPropertyCaching):
12991 (JSC::TypeInfo::flags): Added a flag to track opting out of property
12992 caching. Fixed an "&&" vs "&" typo that was previously harmless, but
12993 is now harmful since m_flags2 can have more than one bit set.
12995 2011-05-27 Stephanie Lewis <slewis@apple.com>
12999 Fix a typo in the order_file flag.
13001 * Configurations/Base.xcconfig:
13003 2011-05-27 Patrick Gansterer <paroga@webkit.org>
13005 Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
13007 * runtime/JSGlobalData.cpp:
13008 (JSGlobalData::JSGlobalData):
13010 2011-05-27 Oliver Hunt <oliver@apple.com>
13012 Reviewed by Geoffrey Garen.
13014 Add a few validity assertions to JSCallbackObject
13015 https://bugs.webkit.org/show_bug.cgi?id=61659
13017 * API/JSCallbackObject.h:
13018 (JSC::JSCallbackObject::visitChildren):
13020 2011-05-27 Oliver Hunt <oliver@apple.com>
13024 * runtime/RegExpCache.cpp:
13025 (JSC::RegExpCache::invalidateCode):
13027 2011-05-27 Oliver Hunt <oliver@apple.com>
13029 Reviewed by Geoffrey Garen.
13031 Try to release unused executable memory when the FixedVMPool allocator is under pressure
13032 https://bugs.webkit.org/show_bug.cgi?id=61651
13034 Rather than crashing when full the FixedVMPool allocator now returns a null
13035 allocation. We replace the code that used to CRASH() on null allocations
13036 with logic that asks the provided globalData to release any executable memory
13037 that it can. Currently this just means throwing away all regexp code, but
13038 in future we'll try to be more aggressive.
13040 * assembler/ARMAssembler.cpp:
13041 (JSC::ARMAssembler::executableCopy):
13042 * assembler/ARMAssembler.h:
13043 * assembler/AssemblerBuffer.h:
13044 (JSC::AssemblerBuffer::executableCopy):
13045 * assembler/AssemblerBufferWithConstantPool.h:
13046 * assembler/LinkBuffer.h:
13047 (JSC::LinkBuffer::LinkBuffer):
13048 (JSC::LinkBuffer::linkCode):
13049 * assembler/MIPSAssembler.h:
13050 (JSC::MIPSAssembler::executableCopy):
13051 * assembler/SH4Assembler.h:
13052 (JSC::SH4Assembler::executableCopy):
13053 * assembler/X86Assembler.h:
13054 (JSC::X86Assembler::executableCopy):
13055 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
13056 * dfg/DFGJITCompiler.cpp:
13057 (JSC::DFG::JITCompiler::compileFunction):
13058 * jit/ExecutableAllocator.h:
13059 (JSC::ExecutablePool::create):
13060 (JSC::ExecutablePool::alloc):
13061 (JSC::ExecutableAllocator::ExecutableAllocator):
13062 (JSC::ExecutableAllocator::poolForSize):
13063 (JSC::ExecutablePool::ExecutablePool):
13064 (JSC::ExecutablePool::poolAllocate):
13065 * jit/ExecutableAllocatorFixedVMPool.cpp:
13066 (JSC::FixedVMPoolAllocator::alloc):
13068 (JSC::JIT::privateCompile):
13069 * jit/JITOpcodes.cpp:
13070 (JSC::JIT::privateCompileCTIMachineTrampolines):
13071 * jit/JITOpcodes32_64.cpp:
13072 (JSC::JIT::privateCompileCTIMachineTrampolines):
13073 (JSC::JIT::privateCompileCTINativeCall):
13074 * jit/JITPropertyAccess.cpp:
13075 (JSC::JIT::stringGetByValStubGenerator):
13076 (JSC::JIT::privateCompilePutByIdTransition):
13077 (JSC::JIT::privateCompilePatchGetArrayLength):
13078 (JSC::JIT::privateCompileGetByIdProto):
13079 (JSC::JIT::privateCompileGetByIdSelfList):
13080 (JSC::JIT::privateCompileGetByIdProtoList):
13081 (JSC::JIT::privateCompileGetByIdChainList):
13082 (JSC::JIT::privateCompileGetByIdChain):
13083 * jit/JITPropertyAccess32_64.cpp:
13084 (JSC::JIT::stringGetByValStubGenerator):
13085 (JSC::JIT::privateCompilePutByIdTransition):
13086 (JSC::JIT::privateCompilePatchGetArrayLength):
13087 (JSC::JIT::privateCompileGetByIdProto):
13088 (JSC::JIT::privateCompileGetByIdSelfList):
13089 (JSC::JIT::privateCompileGetByIdProtoList):
13090 (JSC::JIT::privateCompileGetByIdChainList):
13091 (JSC::JIT::privateCompileGetByIdChain):
13092 * jit/SpecializedThunkJIT.h:
13093 (JSC::SpecializedThunkJIT::finalize):
13094 * jit/ThunkGenerators.cpp:
13095 (JSC::charCodeAtThunkGenerator):
13096 (JSC::charAtThunkGenerator):
13097 (JSC::fromCharCodeThunkGenerator):
13098 (JSC::sqrtThunkGenerator):
13099 (JSC::powThunkGenerator):
13100 * runtime/JSGlobalData.cpp:
13101 (JSC::JSGlobalData::JSGlobalData):
13102 (JSC::JSGlobalData::releaseExecutableMemory):
13103 (JSC::releaseExecutableMemory):
13104 * runtime/JSGlobalData.h:
13105 * runtime/RegExpCache.cpp:
13106 (JSC::RegExpCache::invalidateCode):
13107 * runtime/RegExpCache.h:
13108 * yarr/YarrJIT.cpp:
13109 (JSC::Yarr::YarrGenerator::compile):
13111 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13113 Reviewed by Oliver Hunt.
13115 Optimized ConservativeSet to avoid double-visiting objects
13116 https://bugs.webkit.org/show_bug.cgi?id=61592
13118 SunSpider thinks this might be a 1% speedup
13120 * heap/ConservativeRoots.h:
13121 (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
13125 (JSC::Heap::isMarked):
13126 (JSC::Heap::testAndSetMarked):
13127 (JSC::Heap::testAndClearMarked):
13128 (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
13129 to void*, since clients want to ask questions about arbitrary pointers
13130 into the heap, even when they aren't known to be JSCells.
13132 * heap/MarkedBlock.h:
13133 (JSC::MarkedBlock::testAndClearMarked):
13134 * heap/MarkedSpace.h:
13135 (JSC::MarkedSpace::isMarked):
13136 (JSC::MarkedSpace::testAndSetMarked):
13137 (JSC::MarkedSpace::testAndClearMarked):
13138 (JSC::MarkedSpace::setMarked):
13139 (JSC::MarkedSpace::contains): Ditto.
13142 (WTF::::testAndClear): New function for ConservativeRoots's inverted
13145 2011-05-27 Stephanie Lewis <slewis@apple.com>
13147 Rubber Stamped by Adam Roben.
13149 Update Order Files. Use -order_file flag since it can order more of the binary.
13151 * Configurations/Base.xcconfig:
13152 * JavaScriptCore.order:
13154 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13156 Reviewed by Oliver Hunt.
13158 Renamed heapRootMarker to heapRootVisitor to match its class name
13159 https://bugs.webkit.org/show_bug.cgi?id=61584
13162 (JSC::Heap::markProtectedObjects):
13163 (JSC::Heap::markTempSortVectors):
13164 (JSC::Heap::markRoots):
13166 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13168 Reviewed by Oliver Hunt.
13170 Removed some interdependency between Heap and SmallStrings by simplifying
13171 the SmallStrings lifetime model
13172 https://bugs.webkit.org/show_bug.cgi?id=61579
13174 SunSpider reports no change.
13176 Using Weak<T> could accomplish this too, but we're not sure it will give
13177 us the performance we need. This is a first step, and it accomplishes
13178 most of the value of using Weak<T>.
13181 (JSC::Heap::destroy):
13182 (JSC::Heap::markRoots):
13183 (JSC::Heap::reset): Finalize small strings just like other weak handles.
13185 * runtime/SmallStrings.cpp:
13187 (JSC::SmallStrings::finalizeSmallStrings):
13188 * runtime/SmallStrings.h: Make all small strings trivially weak, instead
13189 of having an "all for one, one for all" memory model.
13191 2011-05-26 Oliver Hunt <oliver@apple.com>
13193 Reviewed by Geoffrey Garen.
13195 Make RegExpCache a weak map
13196 https://bugs.webkit.org/show_bug.cgi?id=61554
13198 Switch to a weak map for the regexp cache, and hide that
13199 behaviour behind RegExp::create.
13201 When a RegExp is compiled it attempts to add itself to
13202 the "strong" cache. This cache is a simple round-robin
13203 buffer as was the old strong cache. Happily this can
13204 be smaller than the old strong cache as RegExps are only
13205 added when they're compiled so it is under less pressure
13208 * bytecompiler/NodesCodegen.cpp:
13209 (JSC::RegExpNode::emitBytecode):
13210 * runtime/RegExp.cpp:
13211 (JSC::RegExp::RegExp):
13212 (JSC::RegExp::create):
13213 (JSC::RegExp::match):
13214 * runtime/RegExp.h:
13215 (JSC::RegExp::gcShouldInvalidateCode):
13216 (JSC::RegExp::hasCode):
13217 (JSC::RegExp::key):
13218 * runtime/RegExpCache.cpp:
13219 (JSC::RegExpCache::lookupOrCreate):
13220 (JSC::RegExpCache::RegExpCache):
13221 (JSC::RegExpCache::isReachableFromOpaqueRoots):
13222 (JSC::RegExpCache::finalize):
13223 * runtime/RegExpCache.h:
13224 * runtime/RegExpConstructor.cpp:
13225 (JSC::constructRegExp):
13226 * runtime/RegExpPrototype.cpp:
13227 (JSC::regExpProtoFuncCompile):
13228 * runtime/StringPrototype.cpp:
13229 (JSC::stringProtoFuncMatch):
13230 (JSC::stringProtoFuncSearch):
13232 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13234 Reviewed by Oliver Hunt.
13236 Moved Heap-related functions out of JSCell.h and into respective header files
13237 https://bugs.webkit.org/show_bug.cgi?id=61567
13240 (JSC::Heap::allocate):
13242 * heap/MarkedBlock.h:
13243 (JSC::MarkedBlock::allocate):
13244 * heap/MarkedSpace.h:
13245 (JSC::MarkedSpace::sizeClassFor):
13246 (JSC::MarkedSpace::allocate):
13247 * runtime/JSCell.h:
13248 (JSC::JSCell::destructor):
13250 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13252 Try to fix Windows build.
13254 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13256 2011-05-26 Ryosuke Niwa <rniwa@webkit.org>
13258 Reviewed by Eric Seidel.
13260 [debug feature] WTFString should have show() method
13261 https://bugs.webkit.org/show_bug.cgi?id=61149
13263 Added String::show and AtomicString::show in NDEBUG.
13265 * wtf/text/AtomicString.cpp:
13266 (WTF::AtomicString::show):
13267 * wtf/text/AtomicString.h:
13268 * wtf/text/WTFString.cpp:
13270 * wtf/text/WTFString.h:
13272 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13274 Reviewed by Geoffrey Garen.
13276 Factored out some Heap ASSERTs
13277 https://bugs.webkit.org/show_bug.cgi?id=61565
13279 * JavaScriptCore.exp:
13281 (JSC::isValidSharedInstanceThreadState):
13282 (JSC::isValidThreadState):
13283 (JSC::Heap::markRoots):
13284 (JSC::Heap::isValidAllocation):
13286 * runtime/JSCell.h:
13287 (JSC::JSCell::Heap::allocate):
13289 2011-05-26 Gavin Barraclough <barraclough@apple.com>
13291 Reviewed by Geoff Garen.
13293 https://bugs.webkit.org/show_bug.cgi?id=61508
13294 DFG JIT - Add support for get by id self caching.
13296 Change the call out to be an unexpected call (using silent spill/fill functions),
13297 add a structure check & compact load to the JIT code, and add repatching mechanisms.
13298 Since DFGOperations may want to be be implemented in asm, make these symbols be extern
13299 "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
13300 so that it can look up its StructureStubInfo.
13302 * JavaScriptCore.xcodeproj/project.pbxproj:
13304 * bytecode/StructureStubInfo.h:
13305 - Added 'unset' entries to union.
13306 * dfg/DFGJITCodeGenerator.h:
13307 (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
13308 - Return the call, we need this to populate the StructureStubInfo.
13309 * dfg/DFGJITCompiler.cpp:
13310 (JSC::DFG::JITCompiler::compileFunction):
13311 - Populate the CodebBlock's StructureStubInfo Vector.
13312 * dfg/DFGJITCompiler.h:
13313 (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
13314 - Return the call, we need this to populate the StructureStubInfo.
13315 (JSC::DFG::JITCompiler::addPropertyAccess):
13316 (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
13317 - Add structures to record property access info during compilation.
13318 * dfg/DFGOperations.cpp:
13319 - Made all external methods extern "C".
13320 (JSC::DFG::operationPutByValInternal):
13321 - Moved outside of the extern "C" block.
13322 * dfg/DFGOperations.h:
13323 - Made all external methods extern "C".
13324 * dfg/DFGRepatch.cpp: Added.
13325 (JSC::DFG::dfgRepatchCall):
13326 - repatch a call to link to a new callee function.
13327 (JSC::DFG::dfgRepatchGetByIdSelf):
13328 - Modify the JIT code to optimize self accesses.
13329 (JSC::DFG::tryCacheGetByID):
13330 - Internal implementation of dfgRepatchGetByID (factor out failing cases).
13331 (JSC::DFG::dfgRepatchGetByID):
13332 - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
13333 * dfg/DFGRepatch.h: Added.
13334 - Expose dfgRepatchGetByID.
13335 * dfg/DFGSpeculativeJIT.cpp:
13336 (JSC::DFG::SpeculativeJIT::compile):
13337 - Changed implementation of GetById ops.
13339 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13341 Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
13343 * heap/MarkedBlock.cpp:
13344 (JSC::MarkedBlock::MarkedBlock):
13345 * heap/MarkedBlock.h:
13346 * wtf/DoublyLinkedList.h:
13347 (WTF::::DoublyLinkedListNode):
13352 (WTF::::DoublyLinkedList):
13359 (WTF::::removeHead):
13361 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13363 Rolled out http://trac.webkit.org/changeset/87408 because it broke the
13366 * heap/MarkedBlock.cpp:
13367 (JSC::MarkedBlock::MarkedBlock):
13368 * heap/MarkedBlock.h:
13369 (JSC::MarkedBlock::setPrev):
13370 (JSC::MarkedBlock::setNext):
13371 (JSC::MarkedBlock::prev):
13372 (JSC::MarkedBlock::next):
13373 * wtf/DoublyLinkedList.h:
13374 (WTF::::DoublyLinkedList):
13380 2011-05-26 Geoffrey Garen <ggaren@apple.com>
13382 Reviewed by Oliver Hunt.
13384 Provide a real owner when copying a property table, for the sake of
13386 https://bugs.webkit.org/show_bug.cgi?id=61547
13388 No test because we can't enable the writeBarrier() ASSERT just yet.
13390 * runtime/Structure.cpp:
13391 (JSC::Structure::addPropertyTransition):
13393 2011-05-26 Adam Roben <aroben@apple.com>
13395 Windows build fix after r87346
13397 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
13400 2011-05-26 Patrick Gansterer <paroga@webkit.org>
13402 Reviewed by Adam Barth.
13404 ASSERT(isMainThread()) when using single threaded jsc executable
13405 https://bugs.webkit.org/show_bug.cgi?id=60846
13407 Remove the ASSERT since we do not have the concept of MainThread in JSC.
13409 * wtf/CryptographicallyRandomNumber.cpp:
13410 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
13411 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
13413 2011-05-25 Gavin Barraclough <barraclough@apple.com>
13415 Reviewed by Sam Weinig.
13417 https://bugs.webkit.org/show_bug.cgi?id=61506
13419 Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
13420 so that they are available to the SpeculativeJIT.
13422 * dfg/DFGJITCodeGenerator.h:
13423 (JSC::DFG::JITCodeGenerator::silentSpillGPR):
13424 (JSC::DFG::JITCodeGenerator::silentSpillFPR):
13425 (JSC::DFG::JITCodeGenerator::silentFillGPR):
13426 (JSC::DFG::JITCodeGenerator::silentFillFPR):
13427 (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
13428 (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
13429 * dfg/DFGNonSpeculativeJIT.h:
13431 2011-05-25 Ryosuke Niwa <rniwa@webkit.org>
13433 An attempt to revive Windows bots.
13435 * runtime/RegExp.cpp:
13436 * runtime/RegExp.h:
13438 2011-05-25 Gavin Barraclough <barraclough@apple.com>
13440 Reviewed by Sam Weinig.
13442 Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
13444 This data structure, used at runtime by the JIT, is currently unnecessarily populated
13445 with default entries during byte compilation.
13447 Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
13448 us to one entry per corresponding bytecode op, which may be undesirable. Instead,
13449 populate this array from the JIT.
13451 The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
13452 these, so that the class can have a default constructor (and to simply switch statements
13453 in code walking over the table).
13455 This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
13456 to check for functions containing property access. Instead do so in the DFGByteCodeParser.
13458 * bytecode/CodeBlock.cpp:
13459 (JSC::printStructureStubInfo):
13460 * bytecode/CodeBlock.h:
13461 (JSC::CodeBlock::setNumberOfStructureStubInfos):
13462 (JSC::CodeBlock::numberOfStructureStubInfos):
13463 * bytecode/StructureStubInfo.cpp:
13464 (JSC::StructureStubInfo::deref):
13465 (JSC::StructureStubInfo::visitAggregate):
13466 * bytecode/StructureStubInfo.h:
13467 (JSC::StructureStubInfo::StructureStubInfo):
13468 * bytecompiler/BytecodeGenerator.cpp:
13469 (JSC::BytecodeGenerator::emitGetById):
13470 (JSC::BytecodeGenerator::emitPutById):
13471 (JSC::BytecodeGenerator::emitDirectPutById):
13472 * dfg/DFGByteCodeParser.cpp:
13473 (JSC::DFG::ByteCodeParser::parseBlock):
13476 (JSC::JIT::privateCompileMainPass):
13477 (JSC::JIT::privateCompileSlowCases):
13478 (JSC::JIT::privateCompile):
13480 * jit/JITPropertyAccess.cpp:
13481 (JSC::JIT::emit_op_get_by_id):
13482 (JSC::JIT::emit_op_put_by_id):
13483 (JSC::JIT::emit_op_method_check):
13484 (JSC::JIT::compileGetByIdHotPath):
13485 (JSC::JIT::compileGetByIdSlowCase):
13486 (JSC::JIT::emitSlow_op_put_by_id):
13487 * jit/JITPropertyAccess32_64.cpp:
13488 (JSC::JIT::emit_op_get_by_id):
13489 (JSC::JIT::emitSlow_op_get_by_id):
13490 (JSC::JIT::emit_op_put_by_id):
13491 (JSC::JIT::emitSlow_op_put_by_id):
13492 (JSC::JIT::emit_op_method_check):
13493 (JSC::JIT::compileGetByIdHotPath):
13494 (JSC::JIT::compileGetByIdSlowCase):
13495 * runtime/Executable.cpp:
13496 (JSC::tryDFGCompile):
13498 2011-05-25 Gavin Barraclough <barraclough@apple.com>
13500 Reviewed by Sam Weinig.
13502 Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
13504 * assembler/AbstractMacroAssembler.h:
13505 (JSC::AbstractMacroAssembler::Call::Call):
13506 (JSC::AbstractMacroAssembler::Call::fromTailJump):
13507 (JSC::AbstractMacroAssembler::Jump::Jump):
13508 (JSC::AbstractMacroAssembler::Jump::link):
13509 (JSC::AbstractMacroAssembler::Jump::linkTo):
13510 (JSC::AbstractMacroAssembler::Jump::isSet):
13511 (JSC::AbstractMacroAssembler::differenceBetween):
13512 (JSC::AbstractMacroAssembler::linkJump):
13513 (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
13514 * assembler/LinkBuffer.h:
13515 (JSC::LinkBuffer::link):
13516 (JSC::LinkBuffer::locationOf):
13517 (JSC::LinkBuffer::locationOfNearCall):
13518 (JSC::LinkBuffer::returnAddressOffset):
13519 * assembler/MacroAssemblerARM.h:
13520 (JSC::MacroAssemblerARM::linkCall):
13521 * assembler/MacroAssemblerARMv7.h:
13522 (JSC::MacroAssemblerARMv7::linkCall):
13523 * assembler/MacroAssemblerMIPS.h:
13524 (JSC::MacroAssemblerMIPS::linkCall):
13525 * assembler/MacroAssemblerSH4.cpp:
13526 (JSC::MacroAssemblerSH4::linkCall):
13527 * assembler/MacroAssemblerX86.h:
13528 (JSC::MacroAssemblerX86::linkCall):
13529 * assembler/MacroAssemblerX86_64.h:
13530 (JSC::MacroAssemblerX86_64::linkCall):
13532 2011-05-25 Gavin Barraclough <barraclough@apple.com>
13534 Reviewed by Sam Weinig.
13536 https://bugs.webkit.org/show_bug.cgi?id=61500
13537 Add JSObject::offsetOfPropertyStorage
13539 * jit/JITPropertyAccess.cpp:
13540 (JSC::JIT::compileGetDirectOffset):
13541 (JSC::JIT::compileGetByIdHotPath):
13542 (JSC::JIT::emit_op_put_by_id):
13543 (JSC::JIT::compilePutDirectOffset):
13544 * jit/JITPropertyAccess32_64.cpp:
13545 (JSC::JIT::compileGetByIdHotPath):
13546 (JSC::JIT::emit_op_put_by_id):
13547 (JSC::JIT::compilePutDirectOffset):
13548 (JSC::JIT::compileGetDirectOffset):
13549 * runtime/JSObject.h:
13550 (JSC::JSObject::offsetOfPropertyStorage):
13552 2011-05-25 Oliver Hunt <oliver@apple.com>
13554 Reviewed by Geoffrey Garen.
13556 Make RegExp GC allocated
13557 https://bugs.webkit.org/show_bug.cgi?id=61490
13559 Make RegExp GC allocated. Basically mechanical change to replace
13560 most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
13561 where actual ownership happens.
13563 Made the RegExpCache use Strong<> references currently to avoid any
13564 changes in behaviour.
13566 * JavaScriptCore.exp:
13567 * bytecode/CodeBlock.cpp:
13568 (JSC::CodeBlock::visitAggregate):
13569 * bytecode/CodeBlock.h:
13570 (JSC::CodeBlock::addRegExp):
13571 * bytecompiler/BytecodeGenerator.cpp:
13572 (JSC::BytecodeGenerator::addRegExp):
13573 (JSC::BytecodeGenerator::emitNewRegExp):
13574 * bytecompiler/BytecodeGenerator.h:
13575 * runtime/JSCell.h:
13576 * runtime/JSGlobalData.cpp:
13577 (JSC::JSGlobalData::JSGlobalData):
13578 (JSC::JSGlobalData::clearBuiltinStructures):
13579 (JSC::JSGlobalData::addRegExpToTrace):
13580 * runtime/JSGlobalData.h:
13581 * runtime/JSGlobalObject.cpp:
13582 (JSC::JSGlobalObject::reset):
13583 * runtime/RegExp.cpp:
13584 (JSC::RegExp::RegExp):
13585 (JSC::RegExp::create):
13586 (JSC::RegExp::invalidateCode):
13587 * runtime/RegExp.h:
13588 (JSC::RegExp::createStructure):
13589 * runtime/RegExpCache.cpp:
13590 (JSC::RegExpCache::lookupOrCreate):
13591 (JSC::RegExpCache::create):
13592 * runtime/RegExpCache.h:
13593 * runtime/RegExpConstructor.cpp:
13594 (JSC::constructRegExp):
13595 * runtime/RegExpObject.cpp:
13596 (JSC::RegExpObject::RegExpObject):
13597 (JSC::RegExpObject::visitChildren):
13598 * runtime/RegExpObject.h:
13599 (JSC::RegExpObject::setRegExp):
13600 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
13601 * runtime/RegExpPrototype.cpp:
13602 (JSC::RegExpPrototype::RegExpPrototype):
13603 (JSC::regExpProtoFuncCompile):
13604 * runtime/RegExpPrototype.h:
13605 * runtime/StringPrototype.cpp:
13606 (JSC::stringProtoFuncMatch):
13607 (JSC::stringProtoFuncSearch):
13609 2011-05-25 Oliver Hunt <oliver@apple.com>
13611 Reviewed by Geoffrey Garen.
13613 Generate regexp code lazily
13614 https://bugs.webkit.org/show_bug.cgi?id=61476
13616 RegExp construction now simply validates the RegExp, it does
13617 not perform actual codegen.
13619 * runtime/RegExp.cpp:
13620 (JSC::RegExp::RegExp):
13621 (JSC::RegExp::recompile):
13622 (JSC::RegExp::compile):
13623 (JSC::RegExp::match):
13624 * runtime/RegExp.h:
13625 (JSC::RegExp::recompileIfNecessary):
13626 * runtime/RegExpConstructor.h:
13627 (JSC::RegExpConstructor::performMatch):
13628 * runtime/RegExpObject.cpp:
13629 (JSC::RegExpObject::match):
13630 * runtime/StringPrototype.cpp:
13631 (JSC::stringProtoFuncReplace):
13632 (JSC::stringProtoFuncMatch):
13633 (JSC::stringProtoFuncSearch):
13634 (JSC::stringProtoFuncSplit):
13636 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13638 Reviewed by Geoffrey Garen.
13640 Removed MarkSetProperties because it was unused
13641 https://bugs.webkit.org/show_bug.cgi?id=61418
13643 * heap/MarkStack.h:
13644 (JSC::MarkSet::MarkSet):
13645 (JSC::MarkStack::append):
13646 * runtime/JSActivation.cpp:
13647 (JSC::JSActivation::visitChildren):
13648 * runtime/JSArray.h:
13649 (JSC::JSArray::visitChildrenDirect):
13650 * runtime/JSPropertyNameIterator.cpp:
13651 (JSC::JSPropertyNameIterator::visitChildren):
13652 * runtime/WriteBarrier.h:
13653 (JSC::MarkStack::appendValues):
13655 2011-05-25 Oliver Hunt <oliver@apple.com>
13657 Reviewed by Geoffrey Garen.
13659 Make allocations with guard pages ensure that the allocation succeeded
13660 https://bugs.webkit.org/show_bug.cgi?id=61453
13662 Add null checks, and make PageBlock's operator bool() use
13663 the realbase, rather than the start of usable memory.
13665 * wtf/OSAllocatorPosix.cpp:
13666 (WTF::OSAllocator::reserveAndCommit):
13668 (WTF::PageBlock::operator bool):
13669 (WTF::PageBlock::PageBlock):
13671 2011-04-10 Kevin Ollivier <kevino@theolliviers.com>
13673 Reviewed by Eric Seidel.
13675 Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
13677 https://bugs.webkit.org/show_bug.cgi?id=27551
13679 * bytecompiler/BytecodeGenerator.h:
13681 2011-05-24 Keishi Hattori <keishi@webkit.org>
13683 Reviewed by Kent Tamura.
13685 Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
13686 https://bugs.webkit.org/show_bug.cgi?id=61273
13688 * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
13690 2011-05-24 Kevin Ollivier <kevino@theolliviers.com>
13692 Reviewed by Eric Seidel.
13694 Add export macros to WTFString.h.
13696 https://bugs.webkit.org/show_bug.cgi?id=27551
13698 * wtf/text/WTFString.h:
13699 (WTF::String::String):
13700 (WTF::String::findIgnoringCase):
13701 (WTF::String::isHashTableDeletedValue):
13703 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13705 Maybe fix the Mac build now?
13707 * JavaScriptCore.xcodeproj/project.pbxproj:
13709 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13711 Maybe fix the Mac build?
13713 * JavaScriptCore.xcodeproj/project.pbxproj:
13715 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13717 Reviewed by Oliver Hunt.
13719 Split HeapRootVisitor into its own class
13720 https://bugs.webkit.org/show_bug.cgi?id=61399
13722 * GNUmakefile.list.am:
13723 * JavaScriptCore.gypi:
13724 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
13725 * JavaScriptCore.xcodeproj/project.pbxproj:
13726 * heap/HandleHeap.cpp:
13727 * heap/HandleStack.cpp:
13729 * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
13730 * heap/MarkStack.h:
13731 * runtime/ArgList.cpp:
13732 * runtime/SmallStrings.cpp:
13734 2011-05-24 Jay Civelli <jcivelli@chromium.org>
13736 Rubberstamped by David Kilzer.
13738 Updated some files that I forgot in my previous MHTML CL.
13740 * Configurations/FeatureDefines.xcconfig:
13742 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13744 Fix the Mac build: Yes, please do remove these files, svn.
13746 * JavaScriptCore.xcodeproj/project.pbxproj:
13748 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13750 Reviewed by Oliver Hunt.
13752 Let's just have one way to get the system page size, bokay?
13753 https://bugs.webkit.org/show_bug.cgi?id=61384
13755 * CMakeListsEfl.txt:
13756 * CMakeListsWinCE.txt:
13757 * GNUmakefile.list.am:
13758 * JavaScriptCore.exp:
13759 * JavaScriptCore.gypi:
13760 * JavaScriptCore.pro:
13761 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
13762 is gone completely now, since it only existed to provide a duplicate way
13763 to access the system page size.
13765 * heap/MarkStack.cpp:
13766 (JSC::MarkStack::reset):
13767 * heap/MarkStack.h:
13768 (JSC::::MarkStackArray):
13769 (JSC::::shrinkAllocation): Use WTF::pageSize.
13771 * heap/MarkStackPosix.cpp:
13772 * heap/MarkStackSymbian.cpp:
13773 * heap/MarkStackWin.cpp: Removed now-empty files.
13775 * jit/ExecutableAllocator.cpp:
13776 (JSC::ExecutableAllocator::reprotectRegion):
13777 * jit/ExecutableAllocator.h:
13778 (JSC::ExecutableAllocator::ExecutableAllocator):
13779 (JSC::ExecutablePool::ExecutablePool):
13780 (JSC::ExecutablePool::poolAllocate):
13781 * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
13783 * wscript: Removed now-empty files.
13785 * wtf/PageBlock.cpp:
13786 (WTF::systemPageSize): Integrated questionable Symbian page size rule
13787 from ExecutableAllocator, because that seems like what the original
13788 author should have done.
13790 2011-05-24 Oliver Hunt <oliver@apple.com>
13792 Reviewed by Gavin Barraclough.
13794 Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
13795 https://bugs.webkit.org/show_bug.cgi?id=61385
13797 The interpreter uses the structure slot of get_by_id and put_by_id to hold
13798 the initial structure it encountered so that it can identify whether a
13799 given access is stable.
13801 When marking though we only visit the slot when we've decided to cache, and
13802 so this value could die. This was "safe" as the value was only used for a
13803 pointer compare, but it was incorrect. We now just mark the slot like we
13804 should have been doing already.
13806 * bytecode/CodeBlock.cpp:
13807 (JSC::CodeBlock::visitStructures):
13809 2011-05-24 Adam Roben <aroben@apple.com>
13813 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
13815 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13817 Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
13819 * heap/MarkStack.h:
13820 (JSC::::shrinkAllocation):
13822 2011-05-24 Geoffrey Garen <ggaren@apple.com>
13824 Rubber-stamped by Oliver Hunt.
13826 Split out function definitions and class definitions from class
13827 declarations in MarkStack.h, for readability.
13829 * heap/MarkStack.h:
13830 (JSC::MarkStack::MarkStack):
13831 (JSC::MarkStack::~MarkStack):
13832 (JSC::MarkStack::addOpaqueRoot):
13833 (JSC::MarkStack::containsOpaqueRoot):
13834 (JSC::MarkStack::opaqueRootCount):
13835 (JSC::MarkSet::MarkSet):
13836 (JSC::MarkStack::allocateStack):
13837 (JSC::MarkStack::releaseStack):
13838 (JSC::MarkStack::pageSize):
13839 (JSC::::MarkStackArray):
13840 (JSC::::~MarkStackArray):
13843 (JSC::::removeLast):
13847 (JSC::::shrinkAllocation):
13849 2011-05-24 Oliver Hunt <oliver@apple.com>
13851 Reviewed by Geoffrey Garen.
13853 Avoid creating unnecessary identifiers and strings in the syntax checker
13854 https://bugs.webkit.org/show_bug.cgi?id=61378
13856 Selectively tell the lexer that there are some places it does not need to
13857 do the real work of creating Identifiers for IDENT and STRING tokens.
13859 Make parseString and parseIdentifier templatized on whether they should
13860 do real work, or merely validate the tokens.
13862 SunSpider --parse-only reports ~5-8% win depending on hardware.
13864 * parser/ASTBuilder.h:
13865 (JSC::ASTBuilder::createDotAccess):
13866 * parser/JSParser.cpp:
13867 (JSC::JSParser::next):
13868 (JSC::JSParser::consume):
13869 (JSC::JSParser::parseVarDeclarationList):
13870 (JSC::JSParser::parseConstDeclarationList):
13871 (JSC::JSParser::parseExpression):
13872 (JSC::JSParser::parseAssignmentExpression):
13873 (JSC::JSParser::parseConditionalExpression):
13874 (JSC::JSParser::parseBinaryExpression):
13875 (JSC::JSParser::parseProperty):
13876 (JSC::JSParser::parseObjectLiteral):
13877 (JSC::JSParser::parseArrayLiteral):
13878 (JSC::JSParser::parseArguments):
13879 (JSC::JSParser::parseMemberExpression):
13880 * parser/Lexer.cpp:
13881 (JSC::Lexer::parseIdentifier):
13882 (JSC::Lexer::parseString):
13885 * parser/SyntaxChecker.h:
13886 (JSC::SyntaxChecker::createDotAccess):
13887 (JSC::SyntaxChecker::createProperty):
13889 2011-05-23 Michael Saboff <msaboff@apple.com>
13891 Reviewed by Mark Rowe.
13893 Safari often freezes when clicking "Return free memory" in Caches dialog
13894 https://bugs.webkit.org/show_bug.cgi?id=61325
13896 There are two fixes and improvement in instrumentation code used to find
13897 one of the problems.
13898 Changed ReleaseFreeList() to set the "decommitted" bit when releasing
13899 pages to the system and moving Spans from the normal list to the returned
13901 Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
13902 to eliminate an infinite loop if we can't meet the pagesToRelease target.
13903 Added a check for the decommitted bit being set properly in
13904 TCMalloc_PageHeap::CheckList.
13906 * wtf/FastMalloc.cpp:
13907 (WTF::TCMalloc_PageHeap::scavenge):
13908 (WTF::TCMalloc_PageHeap::Check):
13909 (WTF::TCMalloc_PageHeap::CheckList):
13910 (WTF::ReleaseFreeList):
13912 2011-05-23 Gavin Barraclough <barraclough@apple.com>
13914 Reviewed by Geoff Garen.
13916 https://bugs.webkit.org/show_bug.cgi?id=61306
13918 The begin characters optimization currently has issues (#61129),
13919 and does not appear to still be a performance win. The prudent
13920 next step seems to be to disable while we ascertain whether this
13921 is still a useful performance optimization.
13923 * yarr/YarrInterpreter.cpp:
13924 (JSC::Yarr::Interpreter::matchDisjunction):
13925 (JSC::Yarr::Interpreter::interpret):
13926 * yarr/YarrInterpreter.h:
13927 (JSC::Yarr::BytecodePattern::BytecodePattern):
13928 * yarr/YarrPattern.cpp:
13929 (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
13930 (JSC::Yarr::YarrPattern::compile):
13931 (JSC::Yarr::YarrPattern::YarrPattern):
13932 * yarr/YarrPattern.h:
13933 (JSC::Yarr::YarrPattern::reset):
13935 2011-05-23 Matthew Delaney <mdelaney@apple.com>
13937 Reviewed by Simon Fraser.
13939 Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
13940 https://bugs.webkit.org/show_bug.cgi?id=58216
13942 * wtf/MathExtras.h:
13944 (clampToPositiveInteger):
13946 2011-05-23 Ruben <chromium@hybridsource.org>
13948 Reviewed by Tony Chang.
13950 Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
13951 https://bugs.webkit.org/show_bug.cgi?id=61219
13953 * JavaScriptCore.gyp/JavaScriptCore.gyp:
13955 2011-05-23 Thouraya ANDOLSI <thouraya.andolsi@st.com>
13957 Reviewed by Gavin Barraclough.
13959 [SH4] AssemblerLabel does not name a type
13960 https://bugs.webkit.org/show_bug.cgi?id=59927
13962 SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
13964 * assembler/MacroAssemblerSH4.h:
13966 2011-05-23 Ryuan Choi <ryuan.choi@samsung.com>
13968 Rubber stamped by Eric Seidel.
13970 [CMAKE] Refactoring wtf related code.
13971 https://bugs.webkit.org/show_bug.cgi?id=60146
13973 Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
13976 * CMakeListsEfl.txt:
13977 * wtf/CMakeLists.txt:
13978 * wtf/CMakeListsEfl.txt:
13980 2011-05-22 Adam Barth <abarth@webkit.org>
13982 Enable strict PassOwnPtr for everyone. I expect this patch will need
13983 some followups to make the GTK and EFL bots green again.
13985 * wtf/PassOwnPtr.h:
13987 2011-05-20 Oliver Hunt <oliver@apple.com>
13989 Reviewed by Gavin Barraclough.
13991 Reduce size of inline cache path of get_by_id on ARMv7
13992 https://bugs.webkit.org/show_bug.cgi?id=61221
13994 This reduces the code size of get_by_id by 20 bytes
13996 * assembler/ARMv7Assembler.h:
13997 (JSC::ARMv7Assembler::ldrCompact):
13998 (JSC::ARMv7Assembler::repatchCompact):
13999 (JSC::ARMv7Assembler::setUInt7ForLoad):
14000 * assembler/MacroAssemblerARMv7.h:
14001 (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
14004 2011-05-20 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
14006 Reviewed by Oliver Hunt.
14008 Zombies should "live" forever
14009 https://bugs.webkit.org/show_bug.cgi?id=61170
14011 Reusing zombie cells could still hide garbage
14012 collected cell related bugs.
14014 * JavaScriptCore.pro:
14015 * heap/MarkedBlock.cpp:
14016 (JSC::MarkedBlock::clearMarks):
14017 * heap/MarkedBlock.h:
14018 * heap/MarkedSpace.cpp:
14019 (JSC::MarkedSpace::destroy):
14020 * runtime/JSCell.h:
14021 (JSC::JSCell::JSValue::isZombie):
14022 * runtime/JSZombie.h:
14023 (JSC::JSZombie::~JSZombie):
14024 * runtime/WriteBarrier.h:
14025 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
14027 2011-05-20 Brady Eidson <beidson@apple.com>
14029 Reviewed by Sam Weinig.
14031 <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
14032 Horrendous bug in callOnMainThreadAndWait
14034 * wtf/MainThread.cpp:
14035 (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
14036 syncFlag condition, reacquire the mutex first.
14038 2011-05-20 Oliver Hunt <oliver@apple.com>
14040 Reviewed by Sam Weinig.
14042 Remove unnecessary double->int conversion at the end of op_div
14043 https://bugs.webkit.org/show_bug.cgi?id=61198
14045 We don't attempt this conversion on 64bit, removing it actually speeds
14046 up sunspider and v8 slightly, and it reduces code size.
14048 * jit/JITArithmetic32_64.cpp:
14049 (JSC::JIT::emit_op_div):
14051 2011-05-19 Evan Martin <evan@chromium.org>
14053 Reviewed by Tony Chang.
14055 [chromium] remove <(library) variable
14056 https://bugs.webkit.org/show_bug.cgi?id=61158
14058 This was for a build experiment; we can just use the correct value now.
14060 * JavaScriptCore.gyp/JavaScriptCore.gyp:
14062 2011-05-20 Oliver Hunt <oliver@apple.com>
14064 Reviewed by Sam Weinig.
14066 Interpreter uses wrong bytecode offset for determining exception handler
14067 https://bugs.webkit.org/show_bug.cgi?id=61191
14069 The bytecode offset given for the returnPC from the JIT is
14070 actually the offset for the start of the instruction triggering
14071 the call, whereas in the interpreter it is the actual return
14072 VPC. This means if the next instruction following a call was
14073 in an exception region we would incorrectly redirect to its
14074 handler. Long term we want to completely redo how exceptions
14075 are handled anyway so the simplest and lowest risk fix here is
14076 to simply subtract one from the return vPC so that we have an
14077 offset in the triggering instruction.
14079 It turns out this is caught by a couple of tests already.
14081 * interpreter/Interpreter.cpp:
14082 (JSC::Interpreter::unwindCallFrame):
14084 2011-05-20 Xan Lopez <xlopez@igalia.com>
14086 Reviewed by Oliver Hunt.
14088 JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
14089 https://bugs.webkit.org/show_bug.cgi?id=42756
14091 Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
14092 check of the available memory. This should give us an
14093 overcommit-like behavior in most systems, which is what we want.
14095 * wtf/OSAllocatorPosix.cpp:
14096 (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
14098 2011-05-19 Gabor Loki <loki@webkit.org>
14100 Fix ARM build after r86919
14102 * assembler/ARMAssembler.h:
14103 (JSC::ARMAssembler::nop):
14105 2011-05-19 Oliver Hunt <oliver@apple.com>
14107 Reviewed by Gavin Barraclough.
14109 Randomise code starting location a little
14110 https://bugs.webkit.org/show_bug.cgi?id=61161
14112 Add a nop() function to the Assemblers so that we
14113 can randomise code offsets slightly at no real cost.
14115 * assembler/ARMAssembler.h:
14116 (JSC::ARMAssembler::nop):
14117 * assembler/ARMv7Assembler.h:
14118 (JSC::ARMv7Assembler::nop):
14119 * assembler/MacroAssemblerARM.h:
14120 (JSC::MacroAssemblerARM::nop):
14121 * assembler/MacroAssemblerARMv7.h:
14122 (JSC::MacroAssemblerARMv7::nop):
14123 * assembler/MacroAssemblerMIPS.h:
14124 (JSC::MacroAssemblerMIPS::nop):
14125 * assembler/MacroAssemblerSH4.h:
14126 (JSC::MacroAssemblerSH4::nop):
14127 * assembler/MacroAssemblerX86Common.h:
14128 (JSC::MacroAssemblerX86Common::nop):
14129 * assembler/X86Assembler.h:
14130 (JSC::X86Assembler::nop):
14133 (JSC::JIT::privateCompile):
14135 * runtime/WeakRandom.h:
14136 (JSC::WeakRandom::getUint32):
14138 2011-05-19 Oliver Hunt <oliver@apple.com>
14142 * wtf/OSAllocatorWin.cpp:
14143 (WTF::OSAllocator::reserveUncommitted):
14144 (WTF::OSAllocator::reserveAndCommit):
14146 2011-05-19 Oliver Hunt <oliver@apple.com>
14148 Reviewed by Gavin Barraclough.
14150 Add guard pages to each end of the memory region used by the fixedvm allocator
14151 https://bugs.webkit.org/show_bug.cgi?id=61150
14153 Add mechanism to notify the OSAllocator that pages at either end of an
14154 allocation should be considered guard pages. Update PageReservation,
14155 PageAllocation, etc to handle this.
14157 * JavaScriptCore.exp:
14158 * jit/ExecutableAllocatorFixedVMPool.cpp:
14159 (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
14160 * wtf/OSAllocator.h:
14161 * wtf/OSAllocatorPosix.cpp:
14162 (WTF::OSAllocator::reserveUncommitted):
14163 (WTF::OSAllocator::reserveAndCommit):
14164 * wtf/PageAllocation.h:
14165 (WTF::PageAllocation::PageAllocation):
14166 * wtf/PageAllocationAligned.h:
14167 (WTF::PageAllocationAligned::PageAllocationAligned):
14169 (WTF::PageBlock::PageBlock):
14170 * wtf/PageReservation.h:
14171 (WTF::PageReservation::reserve):
14172 (WTF::PageReservation::reserveWithGuardPages):
14173 Add a new function to make a reservation that will add guard
14174 pages to the ends of an allocation.
14175 (WTF::PageReservation::PageReservation):
14177 2011-05-19 Oliver Hunt <oliver@apple.com>
14179 Reviewed by Geoffrey Garen.
14181 Make Executables release their JIT code as soon as they become dead
14182 https://bugs.webkit.org/show_bug.cgi?id=61134
14184 Add an ability to clear an Executable's jit code without requiring
14185 it to be destroyed, and then call that from a finalizer.
14191 (JSC::JITCode::clear):
14192 * runtime/Executable.cpp:
14193 (JSC::ExecutableFinalizer::finalize):
14194 (JSC::ExecutableBase::executableFinalizer):
14195 * runtime/Executable.h:
14196 (JSC::ExecutableBase::ExecutableBase):
14197 (JSC::ExecutableBase::clearExecutableCode):
14199 2011-05-19 Adam Roben <aroben@apple.com>
14201 Remove a redundant and broken data export
14203 Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
14204 JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
14205 to a linker warning about multiple definitions.)
14207 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
14209 2011-05-18 Oliver Hunt <oliver@apple.com>
14211 Reviewed by Gavin Barraclough.
14213 Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
14214 https://bugs.webkit.org/show_bug.cgi?id=61064
14216 Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
14217 for its inline storage. This resolves the problem of GC occurring before
14218 a subclass has initialised its anonymous storage.
14220 * runtime/JSObject.h:
14222 2011-05-18 Adam Barth <abarth@webkit.org>
14224 Reviewed by Sam Weinig.
14227 https://bugs.webkit.org/show_bug.cgi?id=61084
14229 It's been a year and we've failed to complete this project. It's time
14230 to throw in the towel.
14232 * JavaScriptCore.xcodeproj/project.pbxproj:
14233 * wtf/url: Removed.
14234 * wtf/url/api: Removed.
14235 * wtf/url/api/ParsedURL.cpp: Removed.
14236 * wtf/url/api/ParsedURL.h: Removed.
14237 * wtf/url/api/URLString.h: Removed.
14238 * wtf/url/src: Removed.
14239 * wtf/url/src/RawURLBuffer.h: Removed.
14240 * wtf/url/src/URLBuffer.h: Removed.
14241 * wtf/url/src/URLCharacterTypes.cpp: Removed.
14242 * wtf/url/src/URLCharacterTypes.h: Removed.
14243 * wtf/url/src/URLComponent.h: Removed.
14244 * wtf/url/src/URLEscape.cpp: Removed.
14245 * wtf/url/src/URLEscape.h: Removed.
14246 * wtf/url/src/URLParser.h: Removed.
14247 * wtf/url/src/URLQueryCanonicalizer.h: Removed.
14248 * wtf/url/src/URLSegments.cpp: Removed.
14249 * wtf/url/src/URLSegments.h: Removed.
14250 * wtf/url/wtfurl.gyp: Removed.
14252 2011-05-18 Oliver Hunt <oliver@apple.com>
14254 Reviewed by Sam Weinig.
14256 JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
14257 https://bugs.webkit.org/show_bug.cgi?id=61090
14259 Remove the Structure-free JSGlobalObject constructor and instead always
14260 pass the structure into the JSGlobalObject constructor.
14261 Stop DebuggerActivation creating a new structure every time, and simply
14262 use a single shared structure held by the GlobalData.
14264 * API/JSContextRef.cpp:
14265 * debugger/DebuggerActivation.cpp:
14266 (JSC::DebuggerActivation::DebuggerActivation):
14268 (GlobalObject::GlobalObject):
14271 * runtime/JSGlobalData.cpp:
14272 (JSC::JSGlobalData::JSGlobalData):
14273 (JSC::JSGlobalData::clearBuiltinStructures):
14274 * runtime/JSGlobalData.h:
14275 * runtime/JSGlobalObject.h:
14277 2011-05-18 Oliver Hunt <oliver@apple.com>
14279 Reviewed by Adam Roben.
14281 Disable gc validation in release builds
14282 https://bugs.webkit.org/show_bug.cgi?id=60680
14284 Add back the NDEBUG check
14288 2011-05-17 Geoffrey Garen <ggaren@apple.com>
14290 Rolled out attempts to fix EFL build because they're not enough -- the
14291 build script needs to be fixed.
14293 * runtime/BooleanPrototype.cpp:
14294 * runtime/DateConstructor.cpp:
14295 * runtime/ErrorPrototype.cpp:
14297 2011-05-17 Geoffrey Garen <ggaren@apple.com>
14299 More attempts to work around the EFL build system being borken.
14301 * runtime/DateConstructor.cpp:
14302 * runtime/ErrorPrototype.cpp:
14304 2011-05-17 Geoffrey Garen <ggaren@apple.com>
14306 Try to fix the EFL build.
14308 * runtime/BooleanPrototype.cpp:
14310 2011-05-16 Geoffrey Garen <ggaren@apple.com>
14312 Rolling back in r86653 with build fixed.
14314 Reviewed by Gavin Barraclough and Oliver Hunt.
14316 Global object initialization is expensive
14317 https://bugs.webkit.org/show_bug.cgi?id=60933
14319 Changed a bunch of globals to allocate their properties lazily, and changed
14320 the global object to allocate a bunch of its globals lazily.
14322 This reduces the footprint of a global object from 287 objects with 58
14323 functions for 24K to 173 objects with 20 functions for 15K.
14325 Large patch, but it's all mechanical.
14327 * DerivedSources.make:
14328 * JavaScriptCore.exp: Build!
14330 * create_hash_table: Added a special case for fromCharCode, since it uses
14331 a custom "thunk generator".
14334 (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
14335 overcount objects that were owned through more than one mechanism because
14336 it was getting in the way of counting the results for this patch.
14338 * interpreter/CallFrame.h:
14339 (JSC::ExecState::arrayConstructorTable):
14340 (JSC::ExecState::arrayPrototypeTable):
14341 (JSC::ExecState::booleanPrototypeTable):
14342 (JSC::ExecState::dateConstructorTable):
14343 (JSC::ExecState::errorPrototypeTable):
14344 (JSC::ExecState::globalObjectTable):
14345 (JSC::ExecState::numberConstructorTable):
14346 (JSC::ExecState::numberPrototypeTable):
14347 (JSC::ExecState::objectPrototypeTable):
14348 (JSC::ExecState::regExpPrototypeTable):
14349 (JSC::ExecState::stringConstructorTable): Added new tables.
14351 * runtime/ArrayConstructor.cpp:
14352 (JSC::ArrayConstructor::ArrayConstructor):
14353 (JSC::ArrayConstructor::getOwnPropertySlot):
14354 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
14355 * runtime/ArrayConstructor.h:
14356 (JSC::ArrayConstructor::createStructure):
14357 * runtime/ArrayPrototype.cpp:
14358 (JSC::ArrayPrototype::getOwnPropertySlot):
14359 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
14360 * runtime/ArrayPrototype.h:
14361 * runtime/BooleanPrototype.cpp:
14362 (JSC::BooleanPrototype::BooleanPrototype):
14363 (JSC::BooleanPrototype::getOwnPropertySlot):
14364 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
14365 * runtime/BooleanPrototype.h:
14366 (JSC::BooleanPrototype::createStructure):
14367 * runtime/DateConstructor.cpp:
14368 (JSC::DateConstructor::DateConstructor):
14369 (JSC::DateConstructor::getOwnPropertySlot):
14370 (JSC::DateConstructor::getOwnPropertyDescriptor):
14371 * runtime/DateConstructor.h:
14372 (JSC::DateConstructor::createStructure):
14373 * runtime/ErrorPrototype.cpp:
14374 (JSC::ErrorPrototype::ErrorPrototype):
14375 (JSC::ErrorPrototype::getOwnPropertySlot):
14376 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
14377 * runtime/ErrorPrototype.h:
14378 (JSC::ErrorPrototype::createStructure): Standardized these objects
14379 to use static tables for function properties.
14381 * runtime/JSGlobalData.cpp:
14382 (JSC::JSGlobalData::JSGlobalData):
14383 (JSC::JSGlobalData::~JSGlobalData):
14384 * runtime/JSGlobalData.h: Added new tables.
14386 * runtime/JSGlobalObject.cpp:
14387 (JSC::JSGlobalObject::reset):
14388 (JSC::JSGlobalObject::addStaticGlobals):
14389 (JSC::JSGlobalObject::getOwnPropertySlot):
14390 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
14391 * runtime/JSGlobalObject.h:
14392 * runtime/JSGlobalObjectFunctions.cpp:
14393 * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
14394 static table for its global functions. This required uninlining some
14395 things to avoid a circular header dependency. However, those things
14396 probably shouldn't have been inlined in the first place.
14398 Even more global object properties can be made lazy, but that requires
14399 more in-depth changes.
14401 * runtime/MathObject.cpp:
14402 * runtime/NumberConstructor.cpp:
14403 (JSC::NumberConstructor::getOwnPropertySlot):
14404 (JSC::NumberConstructor::getOwnPropertyDescriptor):
14405 * runtime/NumberPrototype.cpp:
14406 (JSC::NumberPrototype::NumberPrototype):
14407 (JSC::NumberPrototype::getOwnPropertySlot):
14408 (JSC::NumberPrototype::getOwnPropertyDescriptor):
14409 * runtime/NumberPrototype.h:
14410 (JSC::NumberPrototype::createStructure):
14411 * runtime/ObjectPrototype.cpp:
14412 (JSC::ObjectPrototype::ObjectPrototype):
14413 (JSC::ObjectPrototype::put):
14414 (JSC::ObjectPrototype::getOwnPropertySlot):
14415 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
14416 * runtime/ObjectPrototype.h:
14417 (JSC::ObjectPrototype::createStructure):
14418 * runtime/RegExpPrototype.cpp:
14419 (JSC::RegExpPrototype::RegExpPrototype):
14420 (JSC::RegExpPrototype::getOwnPropertySlot):
14421 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
14422 * runtime/RegExpPrototype.h:
14423 (JSC::RegExpPrototype::createStructure):
14424 * runtime/StringConstructor.cpp:
14425 (JSC::StringConstructor::StringConstructor):
14426 (JSC::StringConstructor::getOwnPropertySlot):
14427 (JSC::StringConstructor::getOwnPropertyDescriptor):
14428 * runtime/StringConstructor.h:
14429 (JSC::StringConstructor::createStructure): Standardized these objects
14430 to use static tables for function properties.
14432 2011-05-17 Sam Weinig <sam@webkit.org>
14434 Reviewed by Oliver Hunt.
14436 JSGlobalContextRelease should not trigger a synchronous garbage collection
14437 https://bugs.webkit.org/show_bug.cgi?id=60990
14439 * API/JSContextRef.cpp:
14440 Change synchronous call to collectAllGarbage to a call to trigger the
14443 2011-05-16 Oliver Hunt <oliver@apple.com>
14445 Reviewed by Gavin Barraclough.
14447 Reduce code size for inline cache
14448 https://bugs.webkit.org/show_bug.cgi?id=60942
14450 This patch introduces the concept of a "compact" address that
14451 allows individual architectures to control the maximum offset
14452 used for the inline path of get_by_id. This reduces the code
14453 size of get_by_id by 3 bytes on x86 and x86_64 and slightly
14454 improves performance on v8 tests.
14456 * assembler/ARMAssembler.h:
14457 (JSC::ARMAssembler::repatchCompact):
14458 * assembler/ARMv7Assembler.h:
14459 (JSC::ARMv7Assembler::repatchCompact):
14460 * assembler/AbstractMacroAssembler.h:
14461 (JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
14462 (JSC::AbstractMacroAssembler::differenceBetween):
14463 (JSC::AbstractMacroAssembler::repatchCompact):
14464 * assembler/CodeLocation.h:
14465 (JSC::CodeLocationDataLabelCompact::CodeLocationDataLabelCompact):
14466 (JSC::CodeLocationCommon::dataLabelCompactAtOffset):
14467 * assembler/LinkBuffer.h:
14468 (JSC::LinkBuffer::locationOf):
14469 * assembler/MIPSAssembler.h:
14470 (JSC::MIPSAssembler::repatchCompact):
14471 * assembler/MacroAssembler.h:
14472 (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
14473 * assembler/MacroAssemblerARM.h:
14474 (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
14475 * assembler/MacroAssemblerARMv7.h:
14476 (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
14477 * assembler/MacroAssemblerMIPS.h:
14478 (JSC::MacroAssemblerMIPS::load32WithCompactAddressOffsetPatch):
14479 * assembler/MacroAssemblerSH4.h:
14480 (JSC::MacroAssemblerSH4::load32WithAddressOffsetPatch):
14481 * assembler/MacroAssemblerX86.h:
14482 (JSC::MacroAssemblerX86::repatchCompact):
14483 * assembler/MacroAssemblerX86Common.h:
14484 (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
14485 * assembler/MacroAssemblerX86_64.h:
14486 (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
14487 * assembler/RepatchBuffer.h:
14488 (JSC::RepatchBuffer::repatch):
14489 * assembler/SH4Assembler.h:
14490 (JSC::SH4Assembler::repatchCompact):
14491 * assembler/X86Assembler.h:
14492 (JSC::X86Assembler::movl_mr_disp8):
14493 (JSC::X86Assembler::movq_mr_disp8):
14494 (JSC::X86Assembler::repatchCompact):
14495 (JSC::X86Assembler::setInt8):
14496 (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8):
14497 (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8):
14498 (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
14500 * jit/JITPropertyAccess.cpp:
14501 (JSC::JIT::compileGetByIdHotPath):
14502 (JSC::JIT::emit_op_put_by_id):
14503 (JSC::JIT::patchGetByIdSelf):
14504 * jit/JITPropertyAccess32_64.cpp:
14505 (JSC::JIT::compileGetByIdHotPath):
14506 (JSC::JIT::emit_op_put_by_id):
14507 (JSC::JIT::patchGetByIdSelf):
14508 * jit/JITStubs.cpp:
14509 (JSC::JITThunks::tryCacheGetByID):
14511 2011-05-16 Sheriff Bot <webkit.review.bot@gmail.com>
14513 Unreviewed, rolling out r86653.
14514 http://trac.webkit.org/changeset/86653
14515 https://bugs.webkit.org/show_bug.cgi?id=60944
14517 "Caused regressions on Windows, OSX and EFL" (Requested by
14520 * DerivedSources.make:
14521 * DerivedSources.pro:
14523 * GNUmakefile.list.am:
14524 * JavaScriptCore.exp:
14525 * JavaScriptCore.gypi:
14526 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14527 * create_hash_table:
14529 (JSC::TypeCounter::operator()):
14530 * interpreter/CallFrame.h:
14531 (JSC::ExecState::arrayTable):
14532 (JSC::ExecState::numberTable):
14533 * runtime/ArrayConstructor.cpp:
14534 (JSC::ArrayConstructor::ArrayConstructor):
14535 * runtime/ArrayConstructor.h:
14536 * runtime/ArrayPrototype.cpp:
14537 (JSC::ArrayPrototype::getOwnPropertySlot):
14538 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
14539 * runtime/ArrayPrototype.h:
14540 * runtime/BooleanPrototype.cpp:
14541 (JSC::BooleanPrototype::BooleanPrototype):
14542 * runtime/BooleanPrototype.h:
14543 * runtime/DateConstructor.cpp:
14544 (JSC::DateConstructor::DateConstructor):
14545 * runtime/DateConstructor.h:
14546 * runtime/ErrorPrototype.cpp:
14547 (JSC::ErrorPrototype::ErrorPrototype):
14548 * runtime/ErrorPrototype.h:
14549 * runtime/JSGlobalData.cpp:
14550 (JSC::JSGlobalData::JSGlobalData):
14551 (JSC::JSGlobalData::~JSGlobalData):
14552 * runtime/JSGlobalData.h:
14553 * runtime/JSGlobalObject.cpp:
14554 (JSC::JSGlobalObject::reset):
14555 * runtime/JSGlobalObject.h:
14556 (JSC::JSGlobalObject::addStaticGlobals):
14557 (JSC::JSGlobalObject::getOwnPropertySlot):
14558 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
14559 * runtime/JSGlobalObjectFunctions.cpp:
14560 (JSC::globalFuncJSCPrint):
14561 * runtime/JSGlobalObjectFunctions.h:
14562 * runtime/MathObject.cpp:
14563 * runtime/NumberConstructor.cpp:
14564 (JSC::NumberConstructor::getOwnPropertySlot):
14565 (JSC::NumberConstructor::getOwnPropertyDescriptor):
14566 * runtime/NumberPrototype.cpp:
14567 (JSC::NumberPrototype::NumberPrototype):
14568 * runtime/NumberPrototype.h:
14569 * runtime/ObjectPrototype.cpp:
14570 (JSC::ObjectPrototype::ObjectPrototype):
14571 (JSC::ObjectPrototype::put):
14572 (JSC::ObjectPrototype::getOwnPropertySlot):
14573 * runtime/ObjectPrototype.h:
14574 * runtime/RegExpPrototype.cpp:
14575 (JSC::RegExpPrototype::RegExpPrototype):
14576 * runtime/RegExpPrototype.h:
14577 * runtime/StringConstructor.cpp:
14578 (JSC::StringConstructor::StringConstructor):
14579 * runtime/StringConstructor.h:
14581 2011-05-16 Geoffrey Garen <ggaren@apple.com>
14583 Reviewed by Geoffrey Garen.
14585 Global object initialization is expensive
14586 https://bugs.webkit.org/show_bug.cgi?id=60933
14588 Changed a bunch of globals to allocate their properties lazily, and changed
14589 the global object to allocate a bunch of its globals lazily.
14591 This reduces the footprint of a global object from 287 objects with 58
14592 functions for 24K to 173 objects with 20 functions for 15K.
14594 Large patch, but it's all mechanical.
14596 * DerivedSources.make:
14597 * JavaScriptCore.exp: Build!
14599 * create_hash_table: Added a special case for fromCharCode, since it uses
14600 a custom "thunk generator".
14603 (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
14604 overcount objects that were owned through more than one mechanism because
14605 it was getting in the way of counting the results for this patch.
14607 * interpreter/CallFrame.h:
14608 (JSC::ExecState::arrayConstructorTable):
14609 (JSC::ExecState::arrayPrototypeTable):
14610 (JSC::ExecState::booleanPrototypeTable):
14611 (JSC::ExecState::dateConstructorTable):
14612 (JSC::ExecState::errorPrototypeTable):
14613 (JSC::ExecState::globalObjectTable):
14614 (JSC::ExecState::numberConstructorTable):
14615 (JSC::ExecState::numberPrototypeTable):
14616 (JSC::ExecState::objectPrototypeTable):
14617 (JSC::ExecState::regExpPrototypeTable):
14618 (JSC::ExecState::stringConstructorTable): Added new tables.
14620 * runtime/ArrayConstructor.cpp:
14621 (JSC::ArrayConstructor::ArrayConstructor):
14622 (JSC::ArrayConstructor::getOwnPropertySlot):
14623 (JSC::ArrayConstructor::getOwnPropertyDescriptor):
14624 * runtime/ArrayConstructor.h:
14625 (JSC::ArrayConstructor::createStructure):
14626 * runtime/ArrayPrototype.cpp:
14627 (JSC::ArrayPrototype::getOwnPropertySlot):
14628 (JSC::ArrayPrototype::getOwnPropertyDescriptor):
14629 * runtime/ArrayPrototype.h:
14630 * runtime/BooleanPrototype.cpp:
14631 (JSC::BooleanPrototype::BooleanPrototype):
14632 (JSC::BooleanPrototype::getOwnPropertySlot):
14633 (JSC::BooleanPrototype::getOwnPropertyDescriptor):
14634 * runtime/BooleanPrototype.h:
14635 (JSC::BooleanPrototype::createStructure):
14636 * runtime/DateConstructor.cpp:
14637 (JSC::DateConstructor::DateConstructor):
14638 (JSC::DateConstructor::getOwnPropertySlot):
14639 (JSC::DateConstructor::getOwnPropertyDescriptor):
14640 * runtime/DateConstructor.h:
14641 (JSC::DateConstructor::createStructure):
14642 * runtime/ErrorPrototype.cpp:
14643 (JSC::ErrorPrototype::ErrorPrototype):
14644 (JSC::ErrorPrototype::getOwnPropertySlot):
14645 (JSC::ErrorPrototype::getOwnPropertyDescriptor):
14646 * runtime/ErrorPrototype.h:
14647 (JSC::ErrorPrototype::createStructure): Standardized these objects
14648 to use static tables for function properties.
14650 * runtime/JSGlobalData.cpp:
14651 (JSC::JSGlobalData::JSGlobalData):
14652 (JSC::JSGlobalData::~JSGlobalData):
14653 * runtime/JSGlobalData.h: Added new tables.
14655 * runtime/JSGlobalObject.cpp:
14656 (JSC::JSGlobalObject::reset):
14657 (JSC::JSGlobalObject::addStaticGlobals):
14658 (JSC::JSGlobalObject::getOwnPropertySlot):
14659 (JSC::JSGlobalObject::getOwnPropertyDescriptor):
14660 * runtime/JSGlobalObject.h:
14661 * runtime/JSGlobalObjectFunctions.cpp:
14662 * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
14663 static table for its global functions. This required uninlining some
14664 things to avoid a circular header dependency. However, those things
14665 probably shouldn't have been inlined in the first place.
14667 Even more global object properties can be made lazy, but that requires
14668 more in-depth changes.
14670 * runtime/MathObject.cpp:
14671 * runtime/NumberConstructor.cpp:
14672 (JSC::NumberConstructor::getOwnPropertySlot):
14673 (JSC::NumberConstructor::getOwnPropertyDescriptor):
14674 * runtime/NumberPrototype.cpp:
14675 (JSC::NumberPrototype::NumberPrototype):
14676 (JSC::NumberPrototype::getOwnPropertySlot):
14677 (JSC::NumberPrototype::getOwnPropertyDescriptor):
14678 * runtime/NumberPrototype.h:
14679 (JSC::NumberPrototype::createStructure):
14680 * runtime/ObjectPrototype.cpp:
14681 (JSC::ObjectPrototype::ObjectPrototype):
14682 (JSC::ObjectPrototype::put):
14683 (JSC::ObjectPrototype::getOwnPropertySlot):
14684 (JSC::ObjectPrototype::getOwnPropertyDescriptor):
14685 * runtime/ObjectPrototype.h:
14686 (JSC::ObjectPrototype::createStructure):
14687 * runtime/RegExpPrototype.cpp:
14688 (JSC::RegExpPrototype::RegExpPrototype):
14689 (JSC::RegExpPrototype::getOwnPropertySlot):
14690 (JSC::RegExpPrototype::getOwnPropertyDescriptor):
14691 * runtime/RegExpPrototype.h:
14692 (JSC::RegExpPrototype::createStructure):
14693 * runtime/StringConstructor.cpp:
14694 (JSC::StringConstructor::StringConstructor):
14695 (JSC::StringConstructor::getOwnPropertySlot):
14696 (JSC::StringConstructor::getOwnPropertyDescriptor):
14697 * runtime/StringConstructor.h:
14698 (JSC::StringConstructor::createStructure): Standardized these objects
14699 to use static tables for function properties.
14701 2011-05-16 David Kilzer <ddkilzer@apple.com>
14703 <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
14704 <rdar://problem/9446430>
14706 Reviewed by Mark Rowe.
14708 * Configurations/Base.xcconfig: Fixed typo.
14710 2011-05-16 Oliver Hunt <oliver@apple.com>
14712 Reviewed by Geoffrey Garen.
14714 JSWeakObjectMap finalisation may occur while gc is in inconsistent state
14715 https://bugs.webkit.org/show_bug.cgi?id=60908
14716 <rdar://problem/9409491>
14718 We need to ensure that we have called all the weak map finalizers while
14719 the global object (and hence global context) is still in a consistent
14720 state. The best way to achieve this is to simply use a weak handle and
14721 finalizer on the global object.
14723 * JavaScriptCore.exp:
14724 * runtime/JSGlobalObject.cpp:
14725 (JSC::JSGlobalObject::WeakMapFinalizer::finalize):
14726 * runtime/JSGlobalObject.h:
14727 (JSC::JSGlobalObject::registerWeakMap):
14729 2011-05-16 Siddharth Mathur <siddharth.mathur@nokia.com>
14731 Reviewed by Laszlo Gombos.
14733 [Qt][WK2][Symbian] Shared memory implementation for Symbian
14734 https://bugs.webkit.org/show_bug.cgi?id=55875
14736 * wtf/Platform.h: Exclude Symbian OS from USE(UNIX_DOMAIN_SOCKETS) users
14738 2011-05-16 Gavin Barraclough <barraclough@apple.com>
14740 Rubber stamped by Geoff Garen.
14742 https://bugs.webkit.org/show_bug.cgi?id=60866
14743 Evaluation order broken for empty alternatives in subpatterns
14745 Reverting https://bugs.webkit.org/show_bug.cgi?id=51395
14747 * yarr/YarrPattern.cpp:
14748 (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
14750 2011-05-15 Gavin Barraclough <barraclough@apple.com>
14752 Reviewed by Geoff Garen & Michael Saboff.
14754 https://bugs.webkit.org/show_bug.cgi?id=60860
14755 Simplify backtracking in YARR JIT
14757 YARR JIT currently performs a single pass of code generation over the pattern,
14758 with special handling to allow the code generation for some backtracking code
14759 out of line. We can simplify things by moving to a common mechanism whereby all
14760 forwards matching code is generated in one pass, and all backtracking code is
14761 generated in another. Backtracking code can be generated in reverse order, to
14762 optimized the common fall-through case.
14764 To make it easier to walk over the pattern, we can first convert to a more
14765 byte-code like format before JIT generating. In time we should unify this with
14766 the YARR interpreter to more closely unify the two.
14768 * yarr/YarrJIT.cpp:
14769 (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
14770 (JSC::Yarr::YarrGenerator::YarrOp::YarrOp):
14771 (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState):
14772 (JSC::Yarr::YarrGenerator::BacktrackingState::append):
14773 (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough):
14774 (JSC::Yarr::YarrGenerator::BacktrackingState::link):
14775 (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo):
14776 (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList):
14777 (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty):
14778 (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
14779 (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord):
14780 (JSC::Yarr::YarrGenerator::generateAssertionBOL):
14781 (JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
14782 (JSC::Yarr::YarrGenerator::generateAssertionEOL):
14783 (JSC::Yarr::YarrGenerator::backtrackAssertionEOL):
14784 (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
14785 (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
14786 (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary):
14787 (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
14788 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce):
14789 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
14790 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed):
14791 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
14792 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
14793 (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
14794 (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
14795 (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
14796 (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce):
14797 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
14798 (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed):
14799 (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
14800 (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy):
14801 (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
14802 (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
14803 (JSC::Yarr::YarrGenerator::generateTerm):
14804 (JSC::Yarr::YarrGenerator::backtrackTerm):
14805 (JSC::Yarr::YarrGenerator::generate):
14806 (JSC::Yarr::YarrGenerator::backtrack):
14807 (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
14808 (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
14809 (JSC::Yarr::YarrGenerator::opCompileAlternative):
14810 (JSC::Yarr::YarrGenerator::opCompileBody):
14811 (JSC::Yarr::YarrGenerator::YarrGenerator):
14812 (JSC::Yarr::YarrGenerator::compile):
14814 2011-05-15 Adam Barth <abarth@webkit.org>
14816 Enable strict PassOwnPtr on Qt. (Build fixes to follow.)
14818 * wtf/PassOwnPtr.h:
14820 2011-05-15 Geoffrey Garen <ggaren@apple.com>
14822 Reviewed by Maciej Stachowiak.
14824 Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
14825 in browser than on command line
14827 This patch fixes a few issues in generated code that could unreasonably
14828 prolong object lifetimes.
14831 (JSC::Heap::collectAllGarbage): Throw away all function code before doing
14832 a major collection. We want to clear polymorphic caches, since they can
14833 keep alive large object graphs that have gone "stale". For the same reason,
14834 but to a lesser extent, we also want to clear linked functions and other
14837 This has the side-benefit of reducing memory footprint from run-once
14838 functions, and of allowing predictions and caches that have failed to
14841 Eventually, if compilation costs rise far enough, we may want a more
14842 limited strategy for de-specializing code without throwing it away
14843 completely, but this works for now, and it's the simplest solution.
14845 * jit/JITStubs.cpp:
14846 (JSC::JITThunks::hostFunctionStub):
14848 * runtime/JSFunction.cpp: Made the host function stub cache weak --
14849 otherwise it's effectively a memory leak that can seriously fragment the
14852 (JSC::JSFunction::JSFunction):
14853 (JSC::JSFunction::visitChildren): Cleared up some comments that confused
14854 me when working with this code.
14856 2011-05-13 Oliver Hunt <oliver@apple.com>
14858 Reviewed by Geoffrey Garen.
14860 Make GC validation more aggressive
14861 https://bugs.webkit.org/show_bug.cgi?id=60802
14863 This patch makes the checks performed under GC_VALIDATION
14864 much more aggressive, and adds the checks to more places
14865 in order to allow us to catch GC bugs much closer to the
14868 * JavaScriptCore.exp:
14869 * JavaScriptCore.xcodeproj/project.pbxproj:
14870 * debugger/DebuggerActivation.cpp:
14871 (JSC::DebuggerActivation::visitChildren):
14872 * heap/MarkedBlock.cpp:
14873 (JSC::MarkedBlock::MarkedBlock):
14874 * heap/MarkedSpace.cpp:
14875 * runtime/Arguments.cpp:
14876 (JSC::Arguments::visitChildren):
14877 * runtime/Executable.cpp:
14878 (JSC::EvalExecutable::visitChildren):
14879 (JSC::ProgramExecutable::visitChildren):
14880 (JSC::FunctionExecutable::visitChildren):
14881 * runtime/Executable.h:
14882 * runtime/GetterSetter.cpp:
14883 (JSC::GetterSetter::visitChildren):
14884 * runtime/GetterSetter.h:
14885 * runtime/JSAPIValueWrapper.h:
14886 (JSC::JSAPIValueWrapper::createStructure):
14887 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
14888 * runtime/JSActivation.cpp:
14889 (JSC::JSActivation::visitChildren):
14890 * runtime/JSArray.cpp:
14891 (JSC::JSArray::visitChildren):
14892 * runtime/JSCell.cpp:
14893 (JSC::slowValidateCell):
14894 * runtime/JSCell.h:
14895 (JSC::JSCell::JSCell::unvalidatedStructure):
14896 (JSC::JSCell::JSCell::JSCell):
14897 * runtime/JSFunction.cpp:
14898 (JSC::JSFunction::visitChildren):
14899 * runtime/JSGlobalObject.cpp:
14900 (JSC::JSGlobalObject::visitChildren):
14901 (JSC::slowValidateCell):
14902 * runtime/JSONObject.h:
14903 * runtime/JSObject.cpp:
14904 (JSC::JSObject::visitChildren):
14905 * runtime/JSPropertyNameIterator.cpp:
14906 (JSC::JSPropertyNameIterator::visitChildren):
14907 * runtime/JSPropertyNameIterator.h:
14908 * runtime/JSStaticScopeObject.cpp:
14909 (JSC::JSStaticScopeObject::visitChildren):
14910 * runtime/JSString.h:
14911 (JSC::RopeBuilder::JSString):
14912 * runtime/JSWrapperObject.cpp:
14913 (JSC::JSWrapperObject::visitChildren):
14914 * runtime/NativeErrorConstructor.cpp:
14915 (JSC::NativeErrorConstructor::visitChildren):
14916 * runtime/PropertyMapHashTable.h:
14917 (JSC::PropertyMapEntry::PropertyMapEntry):
14918 * runtime/RegExpObject.cpp:
14919 (JSC::RegExpObject::visitChildren):
14920 * runtime/ScopeChain.cpp:
14921 (JSC::ScopeChainNode::visitChildren):
14922 * runtime/ScopeChain.h:
14923 (JSC::ScopeChainNode::ScopeChainNode):
14924 * runtime/Structure.cpp:
14925 (JSC::Structure::Structure):
14926 (JSC::Structure::addPropertyTransition):
14927 (JSC::Structure::visitChildren):
14928 * runtime/Structure.h:
14929 (JSC::JSCell::classInfo):
14930 * runtime/StructureChain.cpp:
14931 (JSC::StructureChain::visitChildren):
14932 * runtime/StructureChain.h:
14933 * runtime/WriteBarrier.h:
14934 (JSC::validateCell):
14936 (JSC::JSGlobalObject):
14937 (JSC::WriteBarrierBase::set):
14938 (JSC::WriteBarrierBase::setMayBeNull):
14939 (JSC::WriteBarrierBase::setEarlyValue):
14940 (JSC::WriteBarrierBase::get):
14941 (JSC::WriteBarrierBase::operator*):
14942 (JSC::WriteBarrierBase::operator->):
14943 (JSC::WriteBarrierBase::unvalidatedGet):
14944 (JSC::WriteBarrier::WriteBarrier):
14945 * wtf/Assertions.h:
14947 2011-05-13 Oliver Hunt <oliver@apple.com>
14949 Reviewed by Geoffrey Garen.
14951 Make GC validation more aggressive
14952 https://bugs.webkit.org/show_bug.cgi?id=60802
14954 This patch makes the checks performed under GC_VALIDATION
14955 much more aggressive, and adds the checks to more places
14956 in order to allow us to catch GC bugs much closer to the
14959 * JavaScriptCore.exp:
14960 * JavaScriptCore.xcodeproj/project.pbxproj:
14961 * debugger/DebuggerActivation.cpp:
14962 (JSC::DebuggerActivation::visitChildren):
14963 * heap/MarkedBlock.cpp:
14964 (JSC::MarkedBlock::MarkedBlock):
14965 * heap/MarkedSpace.cpp:
14966 * runtime/Arguments.cpp:
14967 (JSC::Arguments::visitChildren):
14968 * runtime/Executable.cpp:
14969 (JSC::EvalExecutable::visitChildren):
14970 (JSC::ProgramExecutable::visitChildren):
14971 (JSC::FunctionExecutable::visitChildren):
14972 * runtime/Executable.h:
14973 * runtime/GetterSetter.cpp:
14974 (JSC::GetterSetter::visitChildren):
14975 * runtime/GetterSetter.h:
14976 * runtime/JSAPIValueWrapper.h:
14977 (JSC::JSAPIValueWrapper::createStructure):
14978 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
14979 * runtime/JSActivation.cpp:
14980 (JSC::JSActivation::visitChildren):
14981 * runtime/JSArray.cpp:
14982 (JSC::JSArray::visitChildren):
14983 * runtime/JSCell.cpp:
14984 (JSC::slowValidateCell):
14985 * runtime/JSCell.h:
14986 (JSC::JSCell::JSCell::unvalidatedStructure):
14987 (JSC::JSCell::JSCell::JSCell):
14988 * runtime/JSFunction.cpp:
14989 (JSC::JSFunction::visitChildren):
14990 * runtime/JSGlobalObject.cpp:
14991 (JSC::JSGlobalObject::visitChildren):
14992 (JSC::slowValidateCell):
14993 * runtime/JSONObject.h:
14994 * runtime/JSObject.cpp:
14995 (JSC::JSObject::visitChildren):
14996 * runtime/JSPropertyNameIterator.cpp:
14997 (JSC::JSPropertyNameIterator::visitChildren):
14998 * runtime/JSPropertyNameIterator.h:
14999 * runtime/JSStaticScopeObject.cpp:
15000 (JSC::JSStaticScopeObject::visitChildren):
15001 * runtime/JSString.h:
15002 (JSC::RopeBuilder::JSString):
15003 * runtime/JSWrapperObject.cpp:
15004 (JSC::JSWrapperObject::visitChildren):
15005 * runtime/NativeErrorConstructor.cpp:
15006 (JSC::NativeErrorConstructor::visitChildren):
15007 * runtime/PropertyMapHashTable.h:
15008 (JSC::PropertyMapEntry::PropertyMapEntry):
15009 * runtime/RegExpObject.cpp:
15010 (JSC::RegExpObject::visitChildren):
15011 * runtime/ScopeChain.cpp:
15012 (JSC::ScopeChainNode::visitChildren):
15013 * runtime/ScopeChain.h:
15014 (JSC::ScopeChainNode::ScopeChainNode):
15015 * runtime/Structure.cpp:
15016 (JSC::Structure::Structure):
15017 (JSC::Structure::addPropertyTransition):
15018 (JSC::Structure::visitChildren):
15019 * runtime/Structure.h:
15020 (JSC::JSCell::classInfo):
15021 * runtime/StructureChain.cpp:
15022 (JSC::StructureChain::visitChildren):
15023 * runtime/StructureChain.h:
15024 * runtime/WriteBarrier.h:
15025 (JSC::validateCell):
15027 (JSC::JSGlobalObject):
15028 (JSC::WriteBarrierBase::set):
15029 (JSC::WriteBarrierBase::setMayBeNull):
15030 (JSC::WriteBarrierBase::setEarlyValue):
15031 (JSC::WriteBarrierBase::get):
15032 (JSC::WriteBarrierBase::operator*):
15033 (JSC::WriteBarrierBase::operator->):
15034 (JSC::WriteBarrierBase::unvalidatedGet):
15035 (JSC::WriteBarrier::WriteBarrier):
15036 * wtf/Assertions.h:
15038 2011-05-14 Csaba Osztrogonác <ossy@webkit.org>
15040 Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
15042 Make GC validation more aggressive
15043 https://bugs.webkit.org/show_bug.cgi?id=60802
15045 * JavaScriptCore.exp:
15046 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15047 * JavaScriptCore.xcodeproj/project.pbxproj:
15048 * debugger/DebuggerActivation.cpp:
15049 (JSC::DebuggerActivation::visitChildren):
15050 * heap/MarkedBlock.cpp:
15051 (JSC::MarkedBlock::MarkedBlock):
15052 * heap/MarkedSpace.cpp:
15053 * runtime/Arguments.cpp:
15054 (JSC::Arguments::visitChildren):
15055 * runtime/Executable.cpp:
15056 (JSC::EvalExecutable::visitChildren):
15057 (JSC::ProgramExecutable::visitChildren):
15058 (JSC::FunctionExecutable::visitChildren):
15059 * runtime/Executable.h:
15060 (JSC::ProgramExecutable::createStructure):
15061 (JSC::FunctionExecutable::createStructure):
15062 * runtime/GetterSetter.cpp:
15063 (JSC::GetterSetter::visitChildren):
15064 * runtime/GetterSetter.h:
15065 (JSC::GetterSetter::createStructure):
15066 * runtime/JSAPIValueWrapper.h:
15067 (JSC::JSAPIValueWrapper::createStructure):
15068 * runtime/JSActivation.cpp:
15069 (JSC::JSActivation::visitChildren):
15070 * runtime/JSArray.cpp:
15071 (JSC::JSArray::visitChildren):
15072 * runtime/JSCell.cpp:
15073 * runtime/JSCell.h:
15074 (JSC::JSCell::JSCell::JSCell):
15075 * runtime/JSFunction.cpp:
15076 (JSC::JSFunction::visitChildren):
15077 * runtime/JSGlobalObject.cpp:
15078 (JSC::JSGlobalObject::visitChildren):
15079 * runtime/JSONObject.h:
15080 (JSC::JSONObject::createStructure):
15081 * runtime/JSObject.cpp:
15082 (JSC::JSObject::visitChildren):
15083 * runtime/JSPropertyNameIterator.cpp:
15084 (JSC::JSPropertyNameIterator::visitChildren):
15085 * runtime/JSPropertyNameIterator.h:
15086 * runtime/JSStaticScopeObject.cpp:
15087 (JSC::JSStaticScopeObject::visitChildren):
15088 * runtime/JSString.h:
15089 (JSC::RopeBuilder::createStructure):
15090 * runtime/JSWrapperObject.cpp:
15091 (JSC::JSWrapperObject::visitChildren):
15092 * runtime/NativeErrorConstructor.cpp:
15093 (JSC::NativeErrorConstructor::visitChildren):
15094 * runtime/PropertyMapHashTable.h:
15095 (JSC::PropertyMapEntry::PropertyMapEntry):
15096 * runtime/RegExpObject.cpp:
15097 (JSC::RegExpObject::visitChildren):
15098 * runtime/ScopeChain.cpp:
15099 (JSC::ScopeChainNode::visitChildren):
15100 * runtime/ScopeChain.h:
15101 (JSC::ScopeChainNode::ScopeChainNode):
15102 * runtime/Structure.cpp:
15103 (JSC::Structure::Structure):
15104 (JSC::Structure::addPropertyTransition):
15105 (JSC::Structure::visitChildren):
15106 * runtime/Structure.h:
15107 (JSC::Structure::createStructure):
15108 (JSC::JSCell::classInfo):
15109 * runtime/StructureChain.cpp:
15110 (JSC::StructureChain::visitChildren):
15111 * runtime/StructureChain.h:
15112 * runtime/WriteBarrier.h:
15113 (JSC::WriteBarrierBase::set):
15114 (JSC::WriteBarrierBase::get):
15115 (JSC::WriteBarrierBase::operator*):
15116 (JSC::WriteBarrierBase::operator->):
15117 (JSC::WriteBarrier::WriteBarrier):
15118 * wtf/Assertions.h:
15120 2011-05-13 Oliver Hunt <oliver@apple.com>
15122 Reviewed by Geoffrey Garen.
15124 Make GC validation more aggressive
15125 https://bugs.webkit.org/show_bug.cgi?id=60802
15127 This patch makes the checks performed under GC_VALIDATION
15128 much more aggressive, and adds the checks to more places
15129 in order to allow us to catch GC bugs much closer to the
15132 * JavaScriptCore.exp:
15133 * JavaScriptCore.xcodeproj/project.pbxproj:
15134 * debugger/DebuggerActivation.cpp:
15135 (JSC::DebuggerActivation::visitChildren):
15136 * heap/MarkedBlock.cpp:
15137 (JSC::MarkedBlock::MarkedBlock):
15138 * heap/MarkedSpace.cpp:
15139 * runtime/Arguments.cpp:
15140 (JSC::Arguments::visitChildren):
15141 * runtime/Executable.cpp:
15142 (JSC::EvalExecutable::visitChildren):
15143 (JSC::ProgramExecutable::visitChildren):
15144 (JSC::FunctionExecutable::visitChildren):
15145 * runtime/Executable.h:
15146 * runtime/GetterSetter.cpp:
15147 (JSC::GetterSetter::visitChildren):
15148 * runtime/GetterSetter.h:
15149 * runtime/JSAPIValueWrapper.h:
15150 (JSC::JSAPIValueWrapper::createStructure):
15151 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
15152 * runtime/JSActivation.cpp:
15153 (JSC::JSActivation::visitChildren):
15154 * runtime/JSArray.cpp:
15155 (JSC::JSArray::visitChildren):
15156 * runtime/JSCell.cpp:
15157 (JSC::slowValidateCell):
15158 * runtime/JSCell.h:
15159 (JSC::JSCell::JSCell::unvalidatedStructure):
15160 (JSC::JSCell::JSCell::JSCell):
15161 * runtime/JSFunction.cpp:
15162 (JSC::JSFunction::visitChildren):
15163 * runtime/JSGlobalObject.cpp:
15164 (JSC::JSGlobalObject::visitChildren):
15165 (JSC::slowValidateCell):
15166 * runtime/JSONObject.h:
15167 * runtime/JSObject.cpp:
15168 (JSC::JSObject::visitChildren):
15169 * runtime/JSPropertyNameIterator.cpp:
15170 (JSC::JSPropertyNameIterator::visitChildren):
15171 * runtime/JSPropertyNameIterator.h:
15172 * runtime/JSStaticScopeObject.cpp:
15173 (JSC::JSStaticScopeObject::visitChildren):
15174 * runtime/JSString.h:
15175 (JSC::RopeBuilder::JSString):
15176 * runtime/JSWrapperObject.cpp:
15177 (JSC::JSWrapperObject::visitChildren):
15178 * runtime/NativeErrorConstructor.cpp:
15179 (JSC::NativeErrorConstructor::visitChildren):
15180 * runtime/PropertyMapHashTable.h:
15181 (JSC::PropertyMapEntry::PropertyMapEntry):
15182 * runtime/RegExpObject.cpp:
15183 (JSC::RegExpObject::visitChildren):
15184 * runtime/ScopeChain.cpp:
15185 (JSC::ScopeChainNode::visitChildren):
15186 * runtime/ScopeChain.h:
15187 (JSC::ScopeChainNode::ScopeChainNode):
15188 * runtime/Structure.cpp:
15189 (JSC::Structure::Structure):
15190 (JSC::Structure::addPropertyTransition):
15191 (JSC::Structure::visitChildren):
15192 * runtime/Structure.h:
15193 (JSC::JSCell::classInfo):
15194 * runtime/StructureChain.cpp:
15195 (JSC::StructureChain::visitChildren):
15196 * runtime/StructureChain.h:
15197 * runtime/WriteBarrier.h:
15198 (JSC::validateCell):
15200 (JSC::JSGlobalObject):
15201 (JSC::WriteBarrierBase::set):
15202 (JSC::WriteBarrierBase::setMayBeNull):
15203 (JSC::WriteBarrierBase::setEarlyValue):
15204 (JSC::WriteBarrierBase::get):
15205 (JSC::WriteBarrierBase::operator*):
15206 (JSC::WriteBarrierBase::operator->):
15207 (JSC::WriteBarrierBase::unvalidatedGet):
15208 (JSC::WriteBarrier::WriteBarrier):
15209 * wtf/Assertions.h:
15211 2011-05-01 Holger Hans Peter Freyther <holger@moiji-mobile.com>
15213 Reviewed by Steve Block.
15215 [android] OS(ANDROID) does not imply PLATFORM(ANDROID)
15216 https://bugs.webkit.org/show_bug.cgi?id=59888
15218 It is possible to build QtWebKit and others for OS(ANDROID). Let
15219 the buildsystem decide which platform is to be build.
15223 2011-05-12 Maciej Stachowiak <mjs@apple.com>
15225 Reviewed by Darin Adler.
15227 XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
15228 https://bugs.webkit.org/show_bug.cgi?id=59394
15230 This portion of the change introduces a PassTraits template, which
15231 is used to enable takeFirst() to work for a Deque holding OwnPtrs,
15232 and optimize it for a Deque holding RefPtrs. In the future it can
15233 be deployed elsewhere to make our data structures work better with
15234 our smart pointers.
15236 * GNUmakefile.list.am:
15237 * JavaScriptCore.gypi:
15238 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
15239 * JavaScriptCore.xcodeproj/project.pbxproj:
15240 * wtf/CMakeLists.txt:
15242 (WTF::::takeFirst):
15243 * wtf/PassTraits.h: Added.
15244 (WTF::PassTraits::transfer):
15246 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
15250 Revert r86334, it broke the win build. WinCE build is fixed even without this patch. WinCairo remains broken atm, everything else works.
15252 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15254 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
15258 String operator+ reallocates unnecessarily when concatting > 2 strings
15259 https://bugs.webkit.org/show_bug.cgi?id=58420
15261 Try to fix WinCE/WinCairo linking by exporting three symbols, not sure whether it's correct though. Win worked just fine before.
15263 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15265 2011-05-12 Nikolas Zimmermann <nzimmermann@rim.com>
15267 Reviewed by Darin Adler.
15269 String operator+ reallocates unnecessarily when concatting > 2 strings
15270 https://bugs.webkit.org/show_bug.cgi?id=58420
15272 Provide a faster String append operator.
15273 Up until now, "String operator+(const String& a, const String& b)" copied String a into a temporary
15274 object, and used a.append(b), which reallocates a new buffer of aLength+bLength. When concatting
15275 N strings using operator+, this leads to N-1 reallocations.
15277 Replace this with a flexible operator+ implementation, that avoids these reallocations.
15278 When concatting a 'String' with any string type (char*, UChar, Vector<char>, String, AtomicString, etc..)
15279 a StringAppend<String, T> object is created, which holds the intermediate string objects, and delays
15280 creation of the final string, until operator String() is invoked.
15282 template<typename T>
15283 StringAppend<String, T> operator+(const String& string1, T string2)
15285 return StringAppend<String, T>(string1, string2);
15288 template<typename U, typename V, typename W>
15289 StringAppend<U, StringAppend<V, W> > operator+(U string1, const StringAppend<V, W>& string2)
15291 return StringAppend<U, StringAppend<V, W> >(string1, string2);
15294 When concatting three strings - "String a, b, c; String result = a + b + c;" following happens:
15295 first a StringAppend<String, String> object is created by operator+(const String& string1, String string2).
15296 Then operator+(String string1, const StringAppend<String, String>& string2) is invoked, which returns
15297 a StringAppend<String, StringAppend<String, String> > object.
15298 Then operator String() is invoked, which allocates a StringImpl object, once, large enough to hold the
15299 final string - it uses tryMakeString provided by StringConcatenate.h under the hoods, which guards us
15300 against too big string allocations, etc.
15302 Note that the second template, defines a recursive way to concat an arbitary number of strings
15303 into a single String with just one allocation.
15305 * GNUmakefile.list.am: Add StringOperators.h to build.
15306 * JavaScriptCore.exp: Export WTF::emptyString(). Remove no longer needed symbols.
15307 * JavaScriptCore.gypi: Add StringOperators.h to build.
15308 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
15309 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
15310 * wtf/text/AtomicString.h: Pull in StringConcatenate.h at the end of the file.
15311 * wtf/text/StringConcatenate.h: Conditionally include AtomicString.h to avoid a cyclic dependency. Pull in StringOperators.h at the end of the file.
15312 * wtf/text/StringOperators.h: Added. This is never meant to be included directly, including either WTFString.h or AtomicString.h automatically pulls in this file.
15313 (WTF::StringAppend::StringAppend):
15314 (WTF::StringAppend::operator String):
15315 (WTF::StringAppend::operator AtomicString):
15316 (WTF::StringAppend::writeTo):
15317 (WTF::StringAppend::length):
15319 * wtf/text/WTFString.cpp: Remove operator+ implementations that use String::append().
15320 (WTF::emptyString): Add new shared empty string free function.
15321 * wtf/text/WTFString.h: Replace operator+ implementations by StringAppend template solution. Pull in AtomicString.h at the end of the file.
15323 2011-05-12 Philippe Normand <pnormand@igalia.com>
15325 Unreviewed, GTK build fix.
15329 2011-05-12 Keith Kyzivat <keith.kyzivat@nokia.com>
15331 Reviewed by Csaba Osztrogonác.
15333 [Qt] Arm debug build failing on ARMAssembler::debugOffset()
15334 https://bugs.webkit.org/show_bug.cgi?id=60688
15336 Related to svn rev 85523
15338 * assembler/ARMAssembler.h:
15339 (JSC::ARMAssembler::debugOffset):
15341 2011-05-11 Igor Oliveira <igor.oliveira@openbossa.org>
15343 Reviewed by Eric Seidel.
15345 WebKit does not build with GCCE
15346 https://bugs.webkit.org/show_bug.cgi?id=60667
15348 Allow compile WebKit with GCCE
15353 2011-05-11 Adam Barth <abarth@webkit.org>
15355 Reviewed by Eric Seidel.
15357 Enable strict PassOwnPtr on Mac
15358 https://bugs.webkit.org/show_bug.cgi?id=60684
15360 This should build cleanly now.
15362 * wtf/PassOwnPtr.h:
15364 2011-05-11 Oliver Hunt <oliver@apple.com>
15366 Reviewed by Darin Adler.
15368 Protect JSC from WebCore executing JS during JS wrapper finalization
15369 https://bugs.webkit.org/show_bug.cgi?id=60672
15370 <rdar://problem/9350997>
15372 Detect when we're trying to execute JS during GC and prevent the
15373 execution from happening. We also assert that this isn't happening
15374 as it implies incorrect behaviour of an object's destructor.
15376 * JavaScriptCore.exp:
15379 (JSC::Heap::isBusy):
15380 * interpreter/Interpreter.cpp:
15381 (JSC::Interpreter::execute):
15382 (JSC::Interpreter::executeCall):
15383 (JSC::Interpreter::executeConstruct):
15384 * runtime/JSGlobalData.h:
15385 (JSC::JSGlobalData::isCollectorBusy):
15387 2011-05-11 Oliver Hunt <oliver@apple.com>
15389 Reviewed by Gavin Barraclough.
15391 Enable gc mark validation in temporarily in release builds
15392 https://bugs.webkit.org/show_bug.cgi?id=60678
15394 Make it easier to turn the gc mark validation on and off, and
15395 temporarily turn it on for all builds.
15397 * heap/MarkStack.cpp:
15398 * heap/MarkStack.h:
15399 (JSC::MarkStack::append):
15400 (JSC::MarkStack::internalAppend):
15401 * runtime/WriteBarrier.h:
15402 (JSC::MarkStack::appendValues):
15405 2011-05-11 Geoffrey Garen <ggaren@apple.com>
15407 Reviewed by Oliver Hunt.
15409 <rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
15411 SunSpider reports no change.
15413 This bug was caused by changing Structure and Executable to being GC
15414 objects, and by a long-standing bug that would thrash the global object
15415 between dictionary and non-dictionary states.
15417 * runtime/BatchedTransitionOptimizer.h:
15418 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
15419 eagerly transition to dictionary -- this can cause pathological dictionary
15420 churn, and it's not necessary, since objects know how to automatically
15421 transition to dictionary when necessary.
15423 * runtime/Executable.cpp:
15424 (JSC::EvalExecutable::compileInternal):
15425 (JSC::ProgramExecutable::compileInternal):
15426 (JSC::FunctionExecutable::compileForCallInternal):
15427 (JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
15428 extra cost from compilation, because it can be quite high. This is especially
15429 important for program code, since DOM timers can repeatedly allocate
15430 program code without allocating any other objects.
15432 * runtime/JSObject.cpp:
15433 (JSC::JSObject::removeDirect): Don't transition to the uncacheable state
15434 if the thing we're trying to remove doesn't exist. This can happen during
15435 compilation, since the compiler needs to ensure that no pre-existing
15436 conflicting definitions exist for certain declarations.
15438 2011-05-11 Oliver Hunt <oliver@apple.com>
15440 Reviewed by Gavin Barraclough.
15442 Make mark stack validation functions do something useful in a release build
15443 https://bugs.webkit.org/show_bug.cgi?id=60645
15445 Turn ASSERTs into actual if(...) CRASH(); statements.
15447 * heap/MarkStack.cpp:
15448 (JSC::MarkStack::validateValue):
15450 2011-05-11 Xan Lopez <xlopez@igalia.com>
15452 Reviewed by Martin Robinson.
15454 Fix copy&paste error in comment.
15456 * jit/JITPropertyAccess.cpp:
15457 (JSC::JIT::stringGetByValStubGenerator): the value is stored in
15460 2011-05-11 Adam Roben <aroben@apple.com>
15462 WinCE build fixes for strict PassOwnPtr
15464 * wtf/unicode/CollatorDefault.cpp:
15465 (WTF::Collator::userDefault): Use adoptPtr.
15467 2011-05-11 Holger Hans Peter Freyther <holger@moiji-mobile.com>
15469 Unreviewed build fix.
15471 [MIPS] Fix compilation of the MIPS JIT
15473 Include the MIPSAssembler.h first to indirectly include
15474 AssemblerBuffer.h before the AbstractMacroAssembler.h. This
15475 order is used for the ARM and X86 MacroAssembler*.h
15477 * assembler/MacroAssemblerMIPS.h:
15479 2011-05-11 Adam Roben <aroben@apple.com>
15481 Turn on strict PassOwnPtr on Windows
15483 Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
15485 Reviewed by Adam Barth.
15487 * wtf/PassOwnPtr.h:
15489 2011-05-10 Stephanie Lewis <slewis@apple.com>
15493 Revert accidental JavaScriptCore change in http://trac.webkit.org/changeset/86130
15495 * Configurations/JavaScriptCore.xcconfig:
15497 2011-05-10 Adam Barth <abarth@webkit.org>
15499 Reviewed by David Levin.
15501 Enable strict PassOwnPtr on Chromium
15502 https://bugs.webkit.org/show_bug.cgi?id=60502
15504 Other platforms to follow.
15506 * wtf/PassOwnPtr.h:
15508 2011-05-10 Geoffrey Garen <ggaren@apple.com>
15510 Reviewed by Darin Adler.
15512 Fixed up some #include dependencies so the WriteBarrier class can actually call Heap::writeBarrier
15513 https://bugs.webkit.org/show_bug.cgi?id=60532
15515 * GNUmakefile.list.am:
15516 * JavaScriptCore.gypi:
15517 * JavaScriptCore.xcodeproj/project.pbxproj: Build!
15519 * heap/Handle.h: Moved HandleTypes to its own header because that's the
15520 WebKit style, and it was necessary to resolve a circular dependency
15521 between Handle.h and WriteBarrier.h.
15524 (JSC::Heap::writeBarrier): Added an inline no-op writeBarrier(), to
15525 verify that all the code is in the right place.
15527 * heap/MarkStack.h: Moved WriteBarrier operations to WriteBarrier.h to
15528 resolve a circular dependency.
15530 * runtime/ArgList.h:
15531 * runtime/JSCell.h: #include WriteBarrier.h since we don't get it for
15534 * runtime/PropertyMapHashTable.h:
15535 (JSC::PropertyTable::PropertyTable): Call the real writeBarrier()
15536 function, now that it exists.
15538 * runtime/SmallStrings.h: Removed a stray #include to resolve a circular
15541 * runtime/WriteBarrier.h:
15542 (JSC::WriteBarrierBase::set):
15543 (JSC::MarkStack::append):
15544 (JSC::MarkStack::appendValues): Updated to match the changes above.
15546 2011-05-10 Oliver Hunt <oliver@apple.com>
15550 * heap/MarkStack.cpp:
15551 (JSC::MarkStack::validateValue):
15553 2011-05-10 Oliver Hunt <oliver@apple.com>
15555 Reviewed by Gavin Barraclough.
15557 Add some aggressive GC validation to debug builds.
15558 https://bugs.webkit.org/show_bug.cgi?id=60601
15560 When assertions are enabled we now do some validity checking
15561 of objects being added to the mark stack.
15563 * bytecode/Instruction.h:
15564 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo):
15565 (JSC::PolymorphicAccessStructureList::visitAggregate):
15566 * heap/MarkStack.cpp:
15567 (JSC::MarkStack::validateSet):
15568 (JSC::MarkStack::validateValue):
15569 * heap/MarkStack.h:
15570 (JSC::MarkStack::appendValues):
15571 (JSC::MarkStack::append):
15572 (JSC::MarkStack::internalAppend):
15574 2011-05-09 Darin Adler <darin@apple.com>
15576 Reviewed by Oliver Hunt.
15578 http://bugs.webkit.org/show_bug.cgi?id=60509
15579 Wrong type used for return value from strlen
15581 * wtf/FastMalloc.cpp:
15582 (WTF::fastStrDup): Use size_t. Also don't bother checking for failure since
15583 fastMalloc won't return if it fails.
15585 2011-05-09 Adam Barth <abarth@webkit.org>
15587 Reviewed by Eric Seidel.
15589 CSP should block Function constructor
15590 https://bugs.webkit.org/show_bug.cgi?id=60240
15592 When eval is disabled, we need to block the use of the function
15593 constructor. However, the WebCore JSC bindings call the function
15594 constructor directly to create inline event listeners. To support that
15595 use, this patch adds an entrypoint that bypasses the check for whether
15598 * JavaScriptCore.exp:
15599 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15600 * runtime/FunctionConstructor.cpp:
15601 (JSC::constructFunction):
15602 (JSC::constructFunctionSkippingEvalEnabledCheck):
15603 * runtime/FunctionConstructor.h:
15605 2011-05-09 Adam Roben <aroben@apple.com>
15607 Automatically touch WebKit.idl whenever any other WebKit1 IDL file changes
15609 Fixes <http://webkit.org/b/60468> WebKit.idl needs to be manually touched whenever any other
15610 WebKit1 IDL file changes to avoid build errors
15612 Reviewed by Tim Hatcher.
15614 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
15615 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
15616 Updated for script rename.
15618 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Removed.
15619 * JavaScriptCore.vcproj/JavaScriptCore/work-around-vs-dependency-tracking-bugs.py: Renamed
15620 from react-to-vsprops-changes.py.
15621 (top level): Moved a constant here from main.
15622 (main): Moved most code from here to react_to_vsprops_changes. Added a call to the new
15623 react_to_webkit1_interface_changes function.
15624 (react_to_vsprops_changes): Moved code here from main. Updated to use the
15625 TOP_LEVEL_DIRECTORY global. Moved some code from here to mtime_of_newest_file_matching_globa
15626 and touch_if_older_than.
15627 (react_to_webkit1_interface_changes): Added. Touches WebKit.idl if any other WebKit1 IDL
15629 (mtime_of_newest_file_matching_glob): Added. Code came from main.
15630 (touch_if_older_than): Added. Code came from main.
15632 2011-05-08 Jessie Berlin <jberlin@apple.com>
15634 Reviewed by Dan Bernstein.
15636 Make JSRetainPtr work with JSGlobalContextRefs.
15637 https://bugs.webkit.org/show_bug.cgi?id=60452
15639 Add specialized functions for JSRetain and JSRelease when dealing with JSGlobalContextRefs.
15641 * API/JSRetainPtr.h:
15645 2011-05-07 Dawit Alemayehu <adawit@kde.org>
15647 Reviewed by Daniel Bates.
15649 Fix compile with GCC 4.6.0
15650 https://bugs.webkit.org/show_bug.cgi?id=60380
15652 Remove unused local variable from code.
15654 * runtime/StringPrototype.cpp:
15655 (JSC::stringProtoFuncMatch):
15657 2011-05-06 Alexis Menard <alexis.menard@openbossa.org>
15659 Unreviewed build fix with gcc 4.6.0 on linux and c++0x support.
15661 std::tr1::has_trivial_constructor is in <tr1/memory>.
15663 * wtf/TypeTraits.h:
15665 2011-05-05 Jay Civelli <jcivelli@chromium.org>
15667 Reviewed by Adam Barth.
15669 Added convenience methods to convert from a byte to hex ASCII digit
15670 characters and vice-versa.
15671 https://bugs.webkit.org/show_bug.cgi?id=59834
15673 * wtf/ASCIICType.h:
15674 (WTF::toASCIIHexValue):
15675 (WTF::lowerNibbleToASCIIHexDigit):
15676 (WTF::upperNibbleToASCIIHexDigit):
15678 2011-05-05 Alexis Menard <alexis.menard@openbossa.org>
15680 Reviewed by Benjamin Poulain.
15682 [Qt] Make QtWebKit build when using gcc 4.6.0
15683 https://bugs.webkit.org/show_bug.cgi?id=60265
15685 If QtWebKit is compiled with gcc 4.6.0 or later we don't want to deactivate
15686 the c++0x support because it works.
15688 * JavaScriptCore.pro:
15690 2011-05-04 Fridrich Strba <fridrich.strba@bluewin.ch>
15692 Reviewed by Geoffrey Garen.
15694 Port MachineStackMarker.cpp to Windows x64
15695 https://bugs.webkit.org/show_bug.cgi?id=60216
15697 * heap/MachineStackMarker.cpp:
15698 (JSC::getPlatformThreadRegisters): the CONTEXT struct is usable also
15700 (JSC::otherThreadStackPointer): return the Rsp register on Windows x64.
15702 2011-05-04 Fridrich Strba <fridrich.strba@bluewin.ch>
15704 Reviewed by Martin Robinson.
15706 Link libjavascriptcoregtk on Windows with winmm.dll
15707 https://bugs.webkit.org/show_bug.cgi?id=60215
15711 2011-05-04 Tao Bai <michaelbai@chromium.org>
15713 Reviewed by David Kilzer.
15715 Populate touch-icon url to FrameLoaderClient
15716 https://bugs.webkit.org/show_bug.cgi?id=59143
15718 * Configurations/FeatureDefines.xcconfig:
15720 2011-05-03 Geoffrey Garen <ggaren@apple.com>
15722 Reviewed by Darin Adler.
15724 <rdar://problem/9366557> Various crashes due to bad DFG codegen at canalplus.fr
15726 * dfg/DFGSpeculativeJIT.cpp:
15727 (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Removed a stray line of
15728 code that accidentally survived the conversion to a switch statement,
15729 causing a lot of important code not to run most of the time.
15731 Since this is not a trivial finger-picking mistake, I will not call it a
15734 2011-05-04 Adam Roben <aroben@apple.com>
15736 Another attempted build fix
15739 (WTF::OwnPtr::operator==):
15740 (WTF::OwnPtr::operator!=):
15741 * wtf/PassOwnPtr.h:
15742 (WTF::PassOwnPtr::operator==):
15743 (WTF::PassOwnPtr::operator!=):
15744 Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
15746 2011-05-04 Adam Roben <aroben@apple.com>
15748 Try to fix Leopard, Qt, and probably others
15751 (WTF::OwnPtr::operator==):
15752 (WTF::OwnPtr::operator!=):
15753 * wtf/PassOwnPtr.h:
15754 (WTF::PassOwnPtr::operator==):
15755 (WTF::PassOwnPtr::operator!=):
15756 Try to get the compiler not to instantiate these function templates unnecessarily.
15758 2011-05-03 Adam Roben <aroben@apple.com>
15760 Disallow equality comparisons between [Pass]OwnPtrs
15762 If you have two OwnPtrs that are equal, you've already lost. (Unless you're doing something
15763 really sneaky, in which case you should stop!)
15765 Fixes <http://webkit.org/b/60053> Testing OwnPtrs for equality should cause a compiler error
15767 Reviewed by Anders Carlsson and Antti Koivisto.
15770 (WTF::OwnPtr::operator==):
15771 (WTF::OwnPtr::operator!=):
15772 * wtf/PassOwnPtr.h:
15773 (WTF::PassOwnPtr::operator==):
15774 (WTF::PassOwnPtr::operator!=):
15775 Added private equality operators that fail to compile when used. (When not used, the
15776 compiler will skip over them because they are function templates.)
15778 2011-05-04 Alexis Menard <alexis.menard@openbossa.org>
15780 Reviewed by Gavin Barraclough.
15782 JITArithmetic.cpp produces a warning on a unused variable.
15783 https://bugs.webkit.org/show_bug.cgi?id=60060
15785 Just properly use what we already have converted.
15787 * jit/JITArithmetic.cpp:
15788 (JSC::JIT::emitSlow_op_add):
15789 (JSC::JIT::emitSlow_op_mul):
15791 2011-05-04 Alexis Menard <alexis.menard@openbossa.org>
15793 Reviewed by Geoffrey Garen.
15795 JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0.
15796 https://bugs.webkit.org/show_bug.cgi?id=60050
15798 This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable
15799 in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated
15800 as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED
15801 which copy the idea of ASSERT_UNUSED.
15804 * jit/JITPropertyAccess.cpp:
15805 (JSC::JIT::emit_op_method_check):
15806 (JSC::JIT::compileGetByIdHotPath):
15807 (JSC::JIT::emit_op_put_by_id):
15808 * wtf/Assertions.h:
15809 (assertWithMessageUnused):
15811 2011-04-29 Jer Noble <jer.noble@apple.com>
15813 Reviewed by Eric Seidel.
15815 Implement FULLSCREEN_API on Windows, Part 4: Enable it
15816 https://bugs.webkit.org/show_bug.cgi?id=59798
15818 * wtf/Platform.h: Set ENABLE_FULLSCREEN_API on win.
15820 2011-05-03 Alexis Menard <alexis.menard@openbossa.org>
15822 Reviewed by Eric Seidel.
15824 Unused but set variable warning in MacroAssemberX86_64
15825 https://bugs.webkit.org/show_bug.cgi?id=59482
15827 * assembler/MacroAssemblerX86_64.h:
15828 (JSC::MacroAssemblerX86_64::call):
15829 (JSC::MacroAssemblerX86_64::tailRecursiveCall):
15830 (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
15832 2011-05-03 Oliver Hunt <oliver@apple.com>
15834 Reviewed by Geoffrey Garen.
15836 Make malloc validation useful
15837 https://bugs.webkit.org/show_bug.cgi?id=57502
15839 Reland this patch (rolled out in 82905) without
15840 turning it on by default.
15842 * JavaScriptCore.exp:
15843 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15844 * wtf/FastMalloc.cpp:
15845 (WTF::tryFastMalloc):
15847 (WTF::tryFastCalloc):
15850 (WTF::tryFastRealloc):
15851 (WTF::fastRealloc):
15852 (WTF::fastMallocSize):
15853 (WTF::TCMalloc_PageHeap::isScavengerSuspended):
15854 (WTF::TCMalloc_PageHeap::scheduleScavenger):
15855 (WTF::TCMalloc_PageHeap::suspendScavenger):
15856 (WTF::TCMalloc_PageHeap::signalScavenger):
15857 (WTF::TCMallocStats::malloc):
15858 (WTF::TCMallocStats::free):
15859 (WTF::TCMallocStats::fastCalloc):
15860 (WTF::TCMallocStats::tryFastCalloc):
15861 (WTF::TCMallocStats::calloc):
15862 (WTF::TCMallocStats::fastRealloc):
15863 (WTF::TCMallocStats::tryFastRealloc):
15864 (WTF::TCMallocStats::realloc):
15865 (WTF::TCMallocStats::fastMallocSize):
15866 * wtf/FastMalloc.h:
15867 (WTF::Internal::fastMallocValidationHeader):
15868 (WTF::Internal::fastMallocValidationSuffix):
15869 (WTF::Internal::fastMallocMatchValidationType):
15870 (WTF::Internal::setFastMallocMatchValidationType):
15871 (WTF::fastMallocMatchValidateFree):
15872 (WTF::fastMallocValidate):
15874 2011-05-03 Xan Lopez <xlopez@igalia.com>
15876 Reviewed by Anders Carlsson.
15878 Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
15879 https://bugs.webkit.org/show_bug.cgi?id=59261
15881 Use unary '+' to force proper type detection in template arguments
15882 with GCC 4.6.0. See bug report for more details.
15884 * runtime/Structure.cpp:
15885 (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection.
15886 (JSC::StructureTransitionTable::add): ditto.
15887 * runtime/Structure.h:
15888 (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto.
15890 2011-05-03 Jessie Berlin <jberlin@apple.com>
15892 Rubber-stamped by Adam Roben.
15894 Revert r85550 and r85575.
15896 Variables cannot be exported via the .def file. Instead, they should be annotated with
15899 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15900 * runtime/Structure.cpp:
15901 (JSC::Structure::materializePropertyMap):
15902 * runtime/Structure.h:
15903 (JSC::Structure::typeInfo):
15904 (JSC::Structure::previousID):
15905 (JSC::Structure::propertyStorageCapacity):
15906 (JSC::Structure::propertyStorageSize):
15907 (JSC::Structure::get):
15908 (JSC::Structure::materializePropertyMapIfNecessary):
15910 2011-05-02 Adam Roben <aroben@apple.com>
15912 Allow implicit conversion from nullptr_t to PassOwnPtr
15914 This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
15915 strict PassOwnPtr mode.
15917 Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
15918 doesn't work, but should
15920 Reviewed by Adam Barth.
15922 * wtf/PassOwnPtr.h:
15923 (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
15925 * wtf/MessageQueue.h:
15926 (WTF::::waitForMessageFilteredWithTimeout):
15927 (WTF::::tryGetMessage):
15928 Use the new implicit conversion.
15930 2011-05-02 Jessie Berlin <jberlin@apple.com>
15932 Rubber-stamped by Oliver Hunt.
15934 Remove an assertion that Windows was hitting on launch.
15936 * runtime/Structure.cpp:
15937 (JSC::Structure::materializePropertyMap):
15938 * runtime/Structure.h:
15939 (JSC::Structure::typeInfo):
15940 (JSC::Structure::previousID):
15941 (JSC::Structure::propertyStorageCapacity):
15942 (JSC::Structure::propertyStorageSize):
15943 (JSC::Structure::get):
15944 (JSC::Structure::materializePropertyMapIfNecessary):
15946 2011-05-02 Mark Rowe <mrowe@apple.com>
15948 Reviewed by Geoff Garen.
15950 <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
15952 * Configurations/CompilerVersion.xcconfig:
15954 2011-05-02 Gavin Barraclough <barraclough@apple.com>
15958 * assembler/AbstractMacroAssembler.h:
15959 (JSC::AbstractMacroAssembler::Jump::link):
15960 (JSC::AbstractMacroAssembler::Jump::linkTo):
15962 2011-05-02 Oliver Hunt <oliver@apple.com>
15966 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15968 2011-05-02 Michael Saboff <msaboff@apple.com>
15970 Reviewed by Geoffrey Garen.
15972 crash in JSC::RegExp::match
15973 https://bugs.webkit.org/show_bug.cgi?id=58922
15975 Cleared chained backtrack data label when linking label even if that
15976 label doesn't chain itself. This is needed so that subsequent
15977 backtrack data labels point to the next outer paren and not within
15980 * yarr/YarrJIT.cpp:
15981 (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
15983 2011-05-02 Geoffrey Garen <ggaren@apple.com>
15985 Reviewed by Oliver Hunt.
15987 Tiny bit of heap cleanup.
15989 * heap/MarkedBlock.h:
15990 (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
15992 * heap/MarkedSpace.h:
15993 (JSC::MarkedSpace::globalData):
15994 (JSC::MarkedSpace::highWaterMark):
15995 (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
15996 definition, for better clarity.
15998 2011-05-02 Oliver Hunt <oliver@apple.com>
16000 Reviewed by Gavin Barraclough.
16002 Correct marking of interpreter data in mixed mode builds
16003 https://bugs.webkit.org/show_bug.cgi?id=59962
16005 We had a few places in mixed mode builds where we would not
16006 track data used by the interpreter for marking. This patch
16007 corrects the problem and adds a number of assertions to catch
16008 live Structures being collected.
16010 * JavaScriptCore.exp:
16011 * assembler/ARMv7Assembler.h:
16012 (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
16013 * bytecode/CodeBlock.cpp:
16014 (JSC::CodeBlock::dump):
16015 * bytecode/CodeBlock.h:
16016 (JSC::CodeBlock::addPropertyAccessInstruction):
16017 (JSC::CodeBlock::addGlobalResolveInstruction):
16018 (JSC::CodeBlock::addStructureStubInfo):
16019 (JSC::CodeBlock::addGlobalResolveInfo):
16020 * bytecompiler/BytecodeGenerator.cpp:
16021 (JSC::BytecodeGenerator::emitResolve):
16022 (JSC::BytecodeGenerator::emitResolveWithBase):
16023 (JSC::BytecodeGenerator::emitGetById):
16024 (JSC::BytecodeGenerator::emitPutById):
16025 (JSC::BytecodeGenerator::emitDirectPutById):
16026 * runtime/Structure.cpp:
16027 (JSC::Structure::materializePropertyMap):
16028 * runtime/Structure.h:
16029 (JSC::Structure::typeInfo):
16030 (JSC::Structure::previousID):
16031 (JSC::Structure::propertyStorageCapacity):
16032 (JSC::Structure::propertyStorageSize):
16033 (JSC::Structure::get):
16034 (JSC::Structure::materializePropertyMapIfNecessary):
16036 2011-05-02 Xan Lopez <xlopez@igalia.com>
16038 Reviewed by Alexey Proskuryakov.
16040 Use native NullPtr when using GCC 4.6.0 and C++0x
16041 https://bugs.webkit.org/show_bug.cgi?id=59252
16043 GCC 4.6.0 has nullptr support, use it when possible.
16045 * wtf/NullPtr.cpp: include config.h to pull in Platform.h before
16046 NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
16047 * wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to
16048 use native nullptr.
16050 2011-05-02 Gavin Barraclough <barraclough@apple.com>
16052 Reviewed by Oliver Hunt.
16054 https://bugs.webkit.org/show_bug.cgi?id=59950
16055 Clean up AssemblerBuffer to use a Vector internally.
16057 AssemblerBuffer handles reallocing a byte array itself - stop that.
16059 * assembler/ARMAssembler.cpp:
16060 (JSC::ARMAssembler::executableCopy):
16061 * assembler/AssemblerBuffer.h:
16062 (JSC::AssemblerLabel::AssemblerLabel):
16063 (JSC::AssemblerLabel::labelAtOffset):
16064 (JSC::AssemblerBuffer::AssemblerBuffer):
16065 (JSC::AssemblerBuffer::~AssemblerBuffer):
16066 (JSC::AssemblerBuffer::isAvailable):
16067 (JSC::AssemblerBuffer::ensureSpace):
16068 (JSC::AssemblerBuffer::isAligned):
16069 (JSC::AssemblerBuffer::putIntegral):
16070 (JSC::AssemblerBuffer::putIntegralUnchecked):
16071 (JSC::AssemblerBuffer::putByteUnchecked):
16072 (JSC::AssemblerBuffer::putByte):
16073 (JSC::AssemblerBuffer::putShortUnchecked):
16074 (JSC::AssemblerBuffer::putShort):
16075 (JSC::AssemblerBuffer::putIntUnchecked):
16076 (JSC::AssemblerBuffer::putInt):
16077 (JSC::AssemblerBuffer::putInt64Unchecked):
16078 (JSC::AssemblerBuffer::putInt64):
16079 (JSC::AssemblerBuffer::codeSize):
16080 (JSC::AssemblerBuffer::label):
16081 (JSC::AssemblerBuffer::executableCopy):
16082 (JSC::AssemblerBuffer::rewindToLabel):
16083 (JSC::AssemblerBuffer::debugOffset):
16084 (JSC::AssemblerBuffer::append):
16085 (JSC::AssemblerBuffer::grow):
16086 * assembler/AssemblerBufferWithConstantPool.h:
16087 * assembler/MacroAssemblerX86_64.h:
16088 (JSC::MacroAssemblerX86_64::linkCall):
16089 * assembler/X86Assembler.h:
16090 (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
16092 2011-05-02 Jeff Miller <jeffm@apple.com>
16094 Reviewed by Alexy Proskuryakov.
16096 Avoid potential buffer overflow in WTFLog() and WTFLogVerbose()
16097 https://bugs.webkit.org/show_bug.cgi?id=59949
16099 * wtf/Assertions.cpp: Check for 0 or empty format string in WTFLog() and WTFLogVerbose().
16101 2011-05-02 Adam Barth <abarth@webkit.org>
16103 Reviewed by Alexey Proskuryakov.
16105 StringImpl::endsWith has some insane code
16106 https://bugs.webkit.org/show_bug.cgi?id=59900
16108 * wtf/text/StringImpl.cpp:
16109 (WTF::StringImpl::endsWith):
16110 - m_data shadows a member variable of the same name.
16112 2011-05-02 Gabor Loki <loki@webkit.org>
16114 Buildfix for ARM after r85448
16116 * assembler/ARMAssembler.h:
16117 (JSC::ARMAssembler::loadBranchTarget):
16119 2011-05-01 Oliver Hunt <oliver@apple.com>
16121 Reviewed by Gavin Barraclough.
16123 Strict-mode only reserved words not reserved
16124 https://bugs.webkit.org/show_bug.cgi?id=55342
16126 Fix line number tracking when we rollback the lexer.
16128 * parser/JSParser.cpp:
16129 (JSC::JSParser::parseSourceElements):
16131 2011-05-01 Oliver Hunt <oliver@apple.com>
16133 Reviewed by Gavin Barraclough.
16135 ES5 Strict mode does not allow getter and setter for same propId
16136 https://bugs.webkit.org/show_bug.cgi?id=57295
16138 Simplify and correct the logic for strict mode object literals.
16140 * parser/JSParser.cpp:
16141 (JSC::JSParser::parseStrictObjectLiteral):
16143 2011-05-01 Oliver Hunt <oliver@apple.com>
16145 Reviewed by Gavin Barraclough.
16147 Assigning to function identifier under strict should throw
16148 https://bugs.webkit.org/show_bug.cgi?id=59289
16150 Add logic to StaticScopeObject to ensure we don't silently consume
16151 writes to constant properties.
16153 * runtime/JSStaticScopeObject.cpp:
16154 (JSC::JSStaticScopeObject::put):
16156 2011-05-01 Gavin Barraclough <barraclough@apple.com>
16158 Reviewed by Sam Weinig.
16160 https://bugs.webkit.org/show_bug.cgi?id=59903
16161 Use AssemblerLabel throughout Assembler classes, AssemblerBuffer
16163 Creating a lable() into the AssemblerBuffer should return an AssemblerLabel,
16164 not an unsigned int.
16166 * assembler/ARMAssembler.cpp:
16167 (JSC::ARMAssembler::executableCopy):
16168 * assembler/ARMAssembler.h:
16169 (JSC::ARMAssembler::blx):
16170 (JSC::ARMAssembler::label):
16171 (JSC::ARMAssembler::loadBranchTarget):
16172 * assembler/ARMv7Assembler.h:
16173 (JSC::ARMv7Assembler::b):
16174 (JSC::ARMv7Assembler::blx):
16175 (JSC::ARMv7Assembler::bx):
16176 (JSC::ARMv7Assembler::label):
16177 (JSC::ARMv7Assembler::ARMInstructionFormatter::label):
16178 * assembler/AssemblerBuffer.h:
16179 (JSC::AssemblerBuffer::label):
16180 * assembler/AssemblerBufferWithConstantPool.h:
16181 * assembler/MIPSAssembler.h:
16182 (JSC::MIPSAssembler::label):
16183 (JSC::MIPSAssembler::relocateJumps):
16184 * assembler/SH4Assembler.h:
16185 (JSC::SH4Assembler::loadConstant):
16186 (JSC::SH4Assembler::loadConstantUnReusable):
16187 (JSC::SH4Assembler::call):
16188 (JSC::SH4Assembler::jmp):
16189 (JSC::SH4Assembler::jne):
16190 (JSC::SH4Assembler::je):
16191 (JSC::SH4Assembler::label):
16192 (JSC::SH4Assembler::oneShortOp):
16193 * assembler/X86Assembler.h:
16194 (JSC::X86Assembler::call):
16195 (JSC::X86Assembler::jmp_r):
16196 (JSC::X86Assembler::label):
16197 (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
16198 (JSC::X86Assembler::X86InstructionFormatter::label):
16200 2011-05-01 Adam Barth <abarth@webkit.org>
16202 Reviewed by David Levin.
16204 Enable strict mode for OwnPtr and PassOwnPtr
16205 https://bugs.webkit.org/show_bug.cgi?id=59428
16209 2011-05-01 Patrick Gansterer <paroga@webkit.org>
16211 Reviewed by Adam Barth.
16213 Enable strict OwnPtr for PLATFORM(WIN)
16214 https://bugs.webkit.org/show_bug.cgi?id=59881
16218 2011-05-01 Gavin Barraclough <barraclough@apple.com>
16220 Reviewed by Sam Weinig.
16222 https://bugs.webkit.org/show_bug.cgi?id=59896
16223 Remove JmpSrc/JmpDst types.
16225 The JmpSrc/JmpDst classes predate the MacroAssembler interface. Having these
16226 object be per-assembler in unhelpful, causes unnecessary code duplication,
16227 and prevents the AssemblerBuffer from providing a richer type for labels.
16228 The limited semantic meaning that they did convey is undermined by the manner
16229 in which their meanings have been overloaded (use of JmpSrc for Call, JmpDst
16232 Jumps on ARMv7 have had additional information added to the object via the
16233 ARMv7 JmpSrc. This data should probably be in the instruction stream. This
16234 patch does not fix the problem, and moves the data (ifdefed) to
16235 AbstractMacroAssembler::Jump (which is effectively where it was before!).
16236 This at least closes the hole such that no further data may be added to JmpSrc,
16237 but this is unfortunate, and should be cleaned up.
16239 * assembler/ARMAssembler.h:
16240 (JSC::ARMAssembler::blx):
16241 (JSC::ARMAssembler::label):
16242 (JSC::ARMAssembler::align):
16243 (JSC::ARMAssembler::loadBranchTarget):
16244 (JSC::ARMAssembler::jmp):
16245 (JSC::ARMAssembler::linkPointer):
16246 (JSC::ARMAssembler::linkJump):
16247 (JSC::ARMAssembler::linkCall):
16248 (JSC::ARMAssembler::getRelocatedAddress):
16249 (JSC::ARMAssembler::getDifferenceBetweenLabels):
16250 (JSC::ARMAssembler::getCallReturnOffset):
16251 * assembler/ARMv7Assembler.h:
16252 (JSC::ARMv7Assembler::b):
16253 (JSC::ARMv7Assembler::blx):
16254 (JSC::ARMv7Assembler::bx):
16255 (JSC::ARMv7Assembler::label):
16256 (JSC::ARMv7Assembler::align):
16257 (JSC::ARMv7Assembler::getRelocatedAddress):
16258 (JSC::ARMv7Assembler::getDifferenceBetweenLabels):
16259 (JSC::ARMv7Assembler::getCallReturnOffset):
16260 (JSC::ARMv7Assembler::linkJump):
16261 (JSC::ARMv7Assembler::linkCall):
16262 (JSC::ARMv7Assembler::linkPointer):
16263 * assembler/AbstractMacroAssembler.h:
16264 (JSC::AbstractMacroAssembler::Label::isSet):
16265 (JSC::AbstractMacroAssembler::Call::Call):
16266 (JSC::AbstractMacroAssembler::Jump::Jump):
16267 (JSC::AbstractMacroAssembler::Jump::link):
16268 (JSC::AbstractMacroAssembler::Jump::linkTo):
16269 (JSC::AbstractMacroAssembler::linkPointer):
16270 (JSC::AbstractMacroAssembler::getLinkerAddress):
16271 * assembler/AssemblerBuffer.h:
16272 (JSC::AssemblerLabel::AssemblerLabel):
16273 (JSC::AssemblerLabel::isSet):
16274 * assembler/LinkBuffer.h:
16275 (JSC::LinkBuffer::patch):
16276 * assembler/MIPSAssembler.h:
16277 (JSC::MIPSAssembler::label):
16278 (JSC::MIPSAssembler::align):
16279 (JSC::MIPSAssembler::getRelocatedAddress):
16280 (JSC::MIPSAssembler::getDifferenceBetweenLabels):
16281 (JSC::MIPSAssembler::getCallReturnOffset):
16282 (JSC::MIPSAssembler::linkJump):
16283 (JSC::MIPSAssembler::linkCall):
16284 (JSC::MIPSAssembler::linkPointer):
16285 * assembler/MacroAssemblerARMv7.h:
16286 (JSC::MacroAssemblerARMv7::branchDouble):
16287 (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
16288 (JSC::MacroAssemblerARMv7::jump):
16289 (JSC::MacroAssemblerARMv7::nearCall):
16290 (JSC::MacroAssemblerARMv7::call):
16291 (JSC::MacroAssemblerARMv7::ret):
16292 (JSC::MacroAssemblerARMv7::tailRecursiveCall):
16293 (JSC::MacroAssemblerARMv7::makeBranch):
16294 * assembler/MacroAssemblerMIPS.h:
16295 (JSC::MacroAssemblerMIPS::nearCall):
16296 (JSC::MacroAssemblerMIPS::call):
16297 (JSC::MacroAssemblerMIPS::tailRecursiveCall):
16298 (JSC::MacroAssemblerMIPS::branchTrue):
16299 (JSC::MacroAssemblerMIPS::branchFalse):
16300 (JSC::MacroAssemblerMIPS::branchEqual):
16301 (JSC::MacroAssemblerMIPS::branchNotEqual):
16302 * assembler/SH4Assembler.h:
16303 (JSC::SH4Assembler::call):
16304 (JSC::SH4Assembler::jmp):
16305 (JSC::SH4Assembler::jne):
16306 (JSC::SH4Assembler::je):
16307 (JSC::SH4Assembler::label):
16308 (JSC::SH4Assembler::align):
16309 (JSC::SH4Assembler::linkJump):
16310 (JSC::SH4Assembler::linkCall):
16311 (JSC::SH4Assembler::linkPointer):
16312 (JSC::SH4Assembler::getCallReturnOffset):
16313 (JSC::SH4Assembler::getRelocatedAddress):
16314 (JSC::SH4Assembler::getDifferenceBetweenLabels):
16315 (JSC::SH4Assembler::patchPointer):
16316 * assembler/X86Assembler.h:
16317 (JSC::X86Assembler::call):
16318 (JSC::X86Assembler::jmp):
16319 (JSC::X86Assembler::jmp_r):
16320 (JSC::X86Assembler::jne):
16321 (JSC::X86Assembler::jnz):
16322 (JSC::X86Assembler::je):
16323 (JSC::X86Assembler::jz):
16324 (JSC::X86Assembler::jl):
16325 (JSC::X86Assembler::jb):
16326 (JSC::X86Assembler::jle):
16327 (JSC::X86Assembler::jbe):
16328 (JSC::X86Assembler::jge):
16329 (JSC::X86Assembler::jg):
16330 (JSC::X86Assembler::ja):
16331 (JSC::X86Assembler::jae):
16332 (JSC::X86Assembler::jo):
16333 (JSC::X86Assembler::jp):
16334 (JSC::X86Assembler::js):
16335 (JSC::X86Assembler::jCC):
16336 (JSC::X86Assembler::label):
16337 (JSC::X86Assembler::labelFor):
16338 (JSC::X86Assembler::align):
16339 (JSC::X86Assembler::linkJump):
16340 (JSC::X86Assembler::linkCall):
16341 (JSC::X86Assembler::linkPointer):
16342 (JSC::X86Assembler::getCallReturnOffset):
16343 (JSC::X86Assembler::getRelocatedAddress):
16344 (JSC::X86Assembler::getDifferenceBetweenLabels):
16345 (JSC::X86Assembler::rewindToLabel):
16346 (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
16347 (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
16349 (JSC::JIT::privateCompileMainPass):
16351 * jit/JITInlineMethods.h:
16352 (JSC::JIT::atJumpTarget):
16353 (JSC::JIT::emitGetVirtualRegister):
16354 * jit/JITOpcodes.cpp:
16355 (JSC::JIT::emit_op_jmp):
16356 (JSC::JIT::emit_op_jfalse):
16357 (JSC::JIT::emit_op_jeq_null):
16358 (JSC::JIT::emit_op_jneq_null):
16359 (JSC::JIT::emit_op_jneq_ptr):
16360 (JSC::JIT::emit_op_jsr):
16361 (JSC::JIT::emit_op_jtrue):
16362 (JSC::JIT::emit_op_jmp_scopes):
16364 2011-05-01 Chao-ying Fu <fu@mips.com>
16366 Reviewed by Eric Seidel.
16368 Fix MIPS build due to the split of "Condition" enum
16369 https://bugs.webkit.org/show_bug.cgi?id=59407
16371 * assembler/MIPSAssembler.h:
16372 (JSC::MIPSAssembler::debugOffset):
16373 * assembler/MacroAssemblerMIPS.h:
16374 (JSC::MacroAssemblerMIPS::branch32):
16375 (JSC::MacroAssemblerMIPS::compare32):
16377 2011-04-30 Adam Barth <abarth@webkit.org>
16379 Reviewed by Adam Barth.
16381 Enable strict OwnPtr for GTK
16382 https://bugs.webkit.org/show_bug.cgi?id=59861
16386 2011-04-30 Gavin Barraclough <barraclough@apple.com>
16390 * assembler/AssemblerBufferWithConstantPool.h:
16392 2011-04-30 Gavin Barraclough <barraclough@apple.com>
16394 Reviewed by Oliver Hunt.
16396 Bug 59869 - AssemblerBuffer cleanup - disambiguate size()
16398 The method size() is called on the AssemblerBuffer both to acquire
16399 the complete size of the code, and to get a position to use as a
16400 label into the code. Instead, add an explicit 'label' method.
16402 * assembler/ARMAssembler.cpp:
16403 (JSC::ARMAssembler::executableCopy):
16404 * assembler/ARMAssembler.h:
16405 (JSC::ARMAssembler::blx):
16406 (JSC::ARMAssembler::codeSize):
16407 (JSC::ARMAssembler::label):
16408 (JSC::ARMAssembler::loadBranchTarget):
16409 * assembler/ARMv7Assembler.h:
16410 (JSC::ARMv7Assembler::b):
16411 (JSC::ARMv7Assembler::blx):
16412 (JSC::ARMv7Assembler::bx):
16413 (JSC::ARMv7Assembler::label):
16414 (JSC::ARMv7Assembler::codeSize):
16415 (JSC::ARMv7Assembler::ARMInstructionFormatter::codeSize):
16416 (JSC::ARMv7Assembler::ARMInstructionFormatter::data):
16417 * assembler/AbstractMacroAssembler.h:
16418 * assembler/AssemblerBuffer.h:
16419 (JSC::AssemblerBuffer::codeSize):
16420 (JSC::AssemblerBuffer::label):
16421 * assembler/AssemblerBufferWithConstantPool.h:
16422 * assembler/LinkBuffer.h:
16423 (JSC::LinkBuffer::LinkBuffer):
16424 (JSC::LinkBuffer::linkCode):
16425 * assembler/MIPSAssembler.h:
16426 (JSC::MIPSAssembler::newJmpSrc):
16427 (JSC::MIPSAssembler::appendJump):
16428 (JSC::MIPSAssembler::label):
16429 (JSC::MIPSAssembler::codeSize):
16430 (JSC::MIPSAssembler::relocateJumps):
16431 * assembler/SH4Assembler.h:
16432 (JSC::SH4Assembler::loadConstant):
16433 (JSC::SH4Assembler::loadConstantUnReusable):
16434 (JSC::SH4Assembler::call):
16435 (JSC::SH4Assembler::jmp):
16436 (JSC::SH4Assembler::jne):
16437 (JSC::SH4Assembler::je):
16438 (JSC::SH4Assembler::label):
16439 (JSC::SH4Assembler::executableCopy):
16440 (JSC::SH4Assembler::oneShortOp):
16441 (JSC::SH4Assembler::codeSize):
16442 * assembler/X86Assembler.h:
16443 (JSC::X86Assembler::call):
16444 (JSC::X86Assembler::jmp_r):
16445 (JSC::X86Assembler::codeSize):
16446 (JSC::X86Assembler::label):
16447 (JSC::X86Assembler::executableCopy):
16448 (JSC::X86Assembler::X86InstructionFormatter::immediateRel32):
16449 (JSC::X86Assembler::X86InstructionFormatter::codeSize):
16450 (JSC::X86Assembler::X86InstructionFormatter::label):
16451 (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
16452 * dfg/DFGJITCompiler.cpp:
16453 (JSC::DFG::JITCompiler::compileFunction):
16455 (JSC::JIT::privateCompile):
16456 * jit/JITOpcodes.cpp:
16457 (JSC::JIT::privateCompileCTIMachineTrampolines):
16458 * jit/JITOpcodes32_64.cpp:
16459 (JSC::JIT::privateCompileCTIMachineTrampolines):
16460 * yarr/YarrJIT.cpp:
16461 (JSC::Yarr::YarrGenerator::compile):
16463 2011-04-29 Adam Barth <abarth@webkit.org>
16465 Attempt to fix the Windows build.
16467 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16469 2011-04-29 Adam Barth <abarth@webkit.org>
16471 Reviewed by Eric Seidel.
16473 CSP script-src should block eval
16474 https://bugs.webkit.org/show_bug.cgi?id=59850
16476 ggaren recommend a different approach to this patch, essentially
16477 installing a new function for function-eval and changing the AST
16478 representation of operator-eval to call function-eval. However, I'm
16479 not sure that approach is workable because the ASTBuilder doesn't know
16480 about global objects, and there is added complication due to the cache.
16482 This approach is more dynamic, adding a branch in EvalExecutable to
16483 detect whether eval is current disabled in the lexical scope. The spec
16484 is slightly unclear about whether we should return undefined or throw
16485 an exception. I've asked Brandon to clarify the spec, but throwing an
16486 exception seems natural.
16488 * JavaScriptCore.exp:
16489 * runtime/Executable.cpp:
16490 (JSC::EvalExecutable::compileInternal):
16491 * runtime/JSGlobalObject.cpp:
16492 (JSC::JSGlobalObject::disableEval):
16493 * runtime/JSGlobalObject.h:
16494 (JSC::JSGlobalObject::JSGlobalObject):
16495 (JSC::JSGlobalObject::isEvalEnabled):
16497 2011-04-29 Gavin Barraclough <barraclough@apple.com>
16499 Reviewed by Oliver Hunt.
16501 https://bugs.webkit.org/show_bug.cgi?id=59847
16502 Remove linkOffset from LinkBuffer
16504 This is redundant since removal of recompilation for exception info.
16506 * assembler/LinkBuffer.h:
16507 (JSC::LinkBuffer::LinkBuffer):
16508 (JSC::LinkBuffer::linkCode):
16509 * dfg/DFGJITCompiler.cpp:
16510 (JSC::DFG::JITCompiler::compileFunction):
16513 (JSC::JIT::privateCompile):
16515 (JSC::JIT::compile):
16516 (JSC::JIT::compileCTIMachineTrampolines):
16517 (JSC::JIT::compileCTINativeCall):
16518 * jit/JITOpcodes.cpp:
16519 (JSC::JIT::privateCompileCTIMachineTrampolines):
16520 * jit/JITOpcodes32_64.cpp:
16521 (JSC::JIT::privateCompileCTIMachineTrampolines):
16522 (JSC::JIT::privateCompileCTINativeCall):
16523 * jit/JITPropertyAccess.cpp:
16524 (JSC::JIT::stringGetByValStubGenerator):
16525 (JSC::JIT::privateCompilePutByIdTransition):
16526 (JSC::JIT::privateCompilePatchGetArrayLength):
16527 (JSC::JIT::privateCompileGetByIdProto):
16528 (JSC::JIT::privateCompileGetByIdSelfList):
16529 (JSC::JIT::privateCompileGetByIdProtoList):
16530 (JSC::JIT::privateCompileGetByIdChainList):
16531 (JSC::JIT::privateCompileGetByIdChain):
16532 * jit/JITPropertyAccess32_64.cpp:
16533 (JSC::JIT::stringGetByValStubGenerator):
16534 (JSC::JIT::privateCompilePutByIdTransition):
16535 (JSC::JIT::privateCompilePatchGetArrayLength):
16536 (JSC::JIT::privateCompileGetByIdProto):
16537 (JSC::JIT::privateCompileGetByIdSelfList):
16538 (JSC::JIT::privateCompileGetByIdProtoList):
16539 (JSC::JIT::privateCompileGetByIdChainList):
16540 (JSC::JIT::privateCompileGetByIdChain):
16541 * jit/SpecializedThunkJIT.h:
16542 (JSC::SpecializedThunkJIT::finalize):
16543 * yarr/YarrJIT.cpp:
16544 (JSC::Yarr::YarrGenerator::compile):
16546 2011-04-29 Gavin Barraclough <barraclough@apple.com>
16548 Reviewed by Oliver Hunt & Geoff Garen.
16550 https://bugs.webkit.org/show_bug.cgi?id=59221
16551 [RegexFuzz] Regression blocking testing
16553 Okay, so the bug here is that when, in the case of a TypeParentheticalAssertion
16554 node, emitDisjunction recursively calls to itself to emit the nested disjunction
16555 the value of parenthesesInputCountAlreadyChecked is bogus (doesn't take into
16556 account the uncheck that has just taken place).
16558 Also, the special handling given to countToCheck in the case of parenthetical
16559 assertions is nonsense, delete it, along with the isParentheticalAssertion argument.
16561 * yarr/YarrInterpreter.cpp:
16562 (JSC::Yarr::ByteCompiler::emitDisjunction):
16564 2011-04-29 Csaba Osztrogonác <ossy@webkit.org>
16566 Reviewed by Adam Barth.
16568 Enable strict OwnPtr for Qt
16569 https://bugs.webkit.org/show_bug.cgi?id=59667
16573 2011-04-29 Dean Jackson <dino@apple.com>
16575 Reviewed by Simon Fraser.
16577 Add ENABLE macro for WebKitAnimation
16578 https://bugs.webkit.org/show_bug.cgi?id=59729
16580 Add new feature to toggle WebKit Animation API.
16582 * Configurations/FeatureDefines.xcconfig:
16584 2011-04-28 Sam Weinig <sam@webkit.org>
16586 Reviewed by Mark Rowe.
16588 Install testapi.js along side testapi
16589 https://bugs.webkit.org/show_bug.cgi?id=59773
16591 * JavaScriptCore.xcodeproj/project.pbxproj:
16592 Add new build phase to copy testapi.js to install path of testapi
16595 2011-04-28 David Levin <levin@chromium.org>
16597 Reviewed by Adam Barth.
16599 Remove IMAGE_RESIZER related code.
16600 https://bugs.webkit.org/show_bug.cgi?id=59735
16602 * Configurations/FeatureDefines.xcconfig:
16604 2011-04-28 Gavin Barraclough <barraclough@apple.com>
16606 Reviewed by Oliver Hunt.
16608 https://bugs.webkit.org/show_bug.cgi?id=59763
16609 DFG JIT - Unify FPRReg & FPRegisterID
16611 (Following on from GPRReg/RegisterID unification).
16613 * dfg/DFGFPRInfo.h:
16614 (JSC::DFG::FPRInfo::toRegister):
16615 (JSC::DFG::FPRInfo::debugName):
16616 * dfg/DFGGPRInfo.h:
16617 * dfg/DFGJITCodeGenerator.cpp:
16618 (JSC::DFG::JITCodeGenerator::fillDouble):
16619 (JSC::DFG::JITCodeGenerator::checkConsistency):
16620 * dfg/DFGJITCodeGenerator.h:
16621 (JSC::DFG::JITCodeGenerator::boxDouble):
16622 (JSC::DFG::JITCodeGenerator::unboxDouble):
16623 (JSC::DFG::JITCodeGenerator::flushRegisters):
16624 (JSC::DFG::JITCodeGenerator::isFlushed):
16625 (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
16626 (JSC::DFG::JITCodeGenerator::setupStubArguments):
16627 (JSC::DFG::JITCodeGenerator::callOperation):
16628 (JSC::DFG::GPRResult::lockedResult):
16629 (JSC::DFG::FPRResult::lockedResult):
16630 * dfg/DFGJITCompiler.cpp:
16631 (JSC::DFG::JITCompiler::fillNumericToDouble):
16632 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
16633 (JSC::DFG::JITCompiler::compileFunction):
16634 * dfg/DFGJITCompiler.h:
16636 * dfg/DFGNonSpeculativeJIT.cpp:
16637 (JSC::DFG::EntryLocation::EntryLocation):
16638 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
16639 (JSC::DFG::NonSpeculativeJIT::valueToInt32):
16640 (JSC::DFG::NonSpeculativeJIT::numberToInt32):
16641 (JSC::DFG::NonSpeculativeJIT::compile):
16642 * dfg/DFGNonSpeculativeJIT.h:
16643 (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
16644 (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
16645 * dfg/DFGRegisterBank.h:
16646 (JSC::DFG::RegisterBank::iterator::regID):
16647 (JSC::DFG::RegisterBank::iterator::debugName):
16648 * dfg/DFGSpeculativeJIT.cpp:
16649 (JSC::DFG::SpeculationCheck::SpeculationCheck):
16650 (JSC::DFG::SpeculativeJIT::compile):
16651 * dfg/DFGSpeculativeJIT.h:
16653 2011-04-28 David Kilzer <ddkilzer@apple.com>
16655 Revert "<http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called"
16657 This reverts commit r85195. It was crashing DumpRenderTree on Lion.
16659 * wtf/mac/MainThreadMac.mm:
16662 2011-04-28 Adam Barth <abarth@webkit.org>
16664 Reviewed by Eric Seidel.
16667 https://bugs.webkit.org/show_bug.cgi?id=59678
16669 Remove the WML configuration option from the Mac build system.
16671 * Configurations/FeatureDefines.xcconfig:
16673 2011-04-28 Sheriff Bot <webkit.review.bot@gmail.com>
16675 Unreviewed, rolling out r85233 and r85235.
16676 http://trac.webkit.org/changeset/85233
16677 http://trac.webkit.org/changeset/85235
16678 https://bugs.webkit.org/show_bug.cgi?id=59754
16680 Causes issues with jsc. (Requested by dave_levin on #webkit).
16682 * GNUmakefile.list.am:
16683 * JavaScriptCore.gypi:
16684 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
16685 * JavaScriptCore.xcodeproj/project.pbxproj:
16686 * jit/ExecutableAllocator.h:
16687 (JSC::ExecutablePool::ExecutablePool):
16688 * parser/SourceProvider.h:
16689 (JSC::SourceProvider::SourceProvider):
16690 * runtime/RegExp.cpp:
16691 (JSC::RegExp::RegExp):
16692 * wtf/CMakeLists.txt:
16693 * wtf/RefCounted.h:
16694 (WTF::RefCountedBase::ref):
16695 (WTF::RefCountedBase::hasOneRef):
16696 (WTF::RefCountedBase::refCount):
16697 (WTF::RefCountedBase::derefBase):
16698 * wtf/SizeLimits.cpp:
16699 * wtf/ThreadRestrictionVerifier.h: Removed.
16700 * wtf/text/CString.h:
16701 (WTF::CStringBuffer::CStringBuffer):
16703 2011-04-28 Gavin Barraclough <barraclough@apple.com>
16705 Reviewed by Oliver Hunt.
16707 Bug 59740 - DFG JIT - Unify GPRReg & RegisterID
16709 Currently we use a mix of enum values throughout the DFG JIT to represent
16710 gpr registers - the RegisterID provided by the MacroAssembler, and the
16711 GPRReg enum giving the sequential register set over which the RegisterBank
16712 allocates. Unify the two.
16714 Patch to unify FPRReg in a similar fashion will follow.
16716 * JavaScriptCore.xcodeproj/project.pbxproj:
16717 * dfg/DFGFPRInfo.h: Added.
16719 (JSC::DFG::FPRBankInfo::toRegister):
16720 (JSC::DFG::FPRBankInfo::toIndex):
16721 * dfg/DFGGPRInfo.h: Added.
16722 (JSC::DFG::GPRInfo::toRegister):
16723 (JSC::DFG::GPRInfo::toIndex):
16724 (JSC::DFG::GPRInfo::debugName):
16725 * dfg/DFGJITCodeGenerator.cpp:
16726 (JSC::DFG::JITCodeGenerator::fillInteger):
16727 (JSC::DFG::JITCodeGenerator::fillDouble):
16728 (JSC::DFG::JITCodeGenerator::fillJSValue):
16729 (JSC::DFG::JITCodeGenerator::dump):
16730 (JSC::DFG::JITCodeGenerator::checkConsistency):
16731 (JSC::DFG::GPRTemporary::GPRTemporary):
16732 (JSC::DFG::FPRTemporary::FPRTemporary):
16733 * dfg/DFGJITCodeGenerator.h:
16734 (JSC::DFG::JITCodeGenerator::boxDouble):
16735 (JSC::DFG::JITCodeGenerator::unboxDouble):
16736 (JSC::DFG::JITCodeGenerator::spill):
16737 (JSC::DFG::JITCodeGenerator::flushRegisters):
16738 (JSC::DFG::JITCodeGenerator::isFlushed):
16739 (JSC::DFG::JITCodeGenerator::bitOp):
16740 (JSC::DFG::JITCodeGenerator::shiftOp):
16741 (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
16742 (JSC::DFG::JITCodeGenerator::setupStubArguments):
16743 (JSC::DFG::JITCodeGenerator::callOperation):
16744 (JSC::DFG::IntegerOperand::gpr):
16745 (JSC::DFG::DoubleOperand::gpr):
16746 (JSC::DFG::GPRTemporary::gpr):
16747 (JSC::DFG::FPRTemporary::gpr):
16748 (JSC::DFG::GPRResult::lockedResult):
16749 * dfg/DFGJITCompiler.cpp:
16750 (JSC::DFG::JITCompiler::fillNumericToDouble):
16751 (JSC::DFG::JITCompiler::fillInt32ToInteger):
16752 (JSC::DFG::JITCompiler::fillToJS):
16753 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
16754 (JSC::DFG::JITCompiler::compileFunction):
16755 (JSC::DFG::JITCompiler::jitAssertIsInt32):
16756 (JSC::DFG::JITCompiler::jitAssertIsJSInt32):
16757 (JSC::DFG::JITCompiler::jitAssertIsJSNumber):
16758 (JSC::DFG::JITCompiler::jitAssertIsJSDouble):
16759 * dfg/DFGJITCompiler.h:
16760 (JSC::DFG::JITCompiler::preserveReturnAddressAfterCall):
16761 (JSC::DFG::JITCompiler::restoreReturnAddressBeforeReturn):
16762 (JSC::DFG::JITCompiler::emitGetFromCallFrameHeaderPtr):
16763 (JSC::DFG::JITCompiler::emitPutToCallFrameHeader):
16764 (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
16765 (JSC::DFG::JITCompiler::addressForGlobalVar):
16766 (JSC::DFG::JITCompiler::addressFor):
16767 (JSC::DFG::JITCompiler::tagFor):
16768 (JSC::DFG::JITCompiler::payloadFor):
16769 * dfg/DFGNonSpeculativeJIT.cpp:
16770 (JSC::DFG::EntryLocation::EntryLocation):
16771 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
16772 (JSC::DFG::NonSpeculativeJIT::valueToInt32):
16773 (JSC::DFG::NonSpeculativeJIT::numberToInt32):
16774 (JSC::DFG::NonSpeculativeJIT::compile):
16775 * dfg/DFGNonSpeculativeJIT.h:
16776 (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
16777 (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
16778 (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
16779 (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
16780 (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
16781 (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
16782 * dfg/DFGRegisterBank.h:
16783 (JSC::DFG::RegisterBank::allocate):
16784 (JSC::DFG::RegisterBank::retain):
16785 (JSC::DFG::RegisterBank::release):
16786 (JSC::DFG::RegisterBank::lock):
16787 (JSC::DFG::RegisterBank::unlock):
16788 (JSC::DFG::RegisterBank::isLocked):
16789 (JSC::DFG::RegisterBank::name):
16790 (JSC::DFG::RegisterBank::iterator::name):
16791 (JSC::DFG::RegisterBank::iterator::isLocked):
16792 (JSC::DFG::RegisterBank::iterator::release):
16793 (JSC::DFG::RegisterBank::iterator::gpr):
16794 (JSC::DFG::RegisterBank::iterator::debugName):
16795 (JSC::DFG::RegisterBank::iterator::operator++):
16796 (JSC::DFG::RegisterBank::iterator::operator!=):
16797 (JSC::DFG::RegisterBank::iterator::index):
16798 (JSC::DFG::RegisterBank::iterator::iterator):
16799 (JSC::DFG::RegisterBank::begin):
16800 (JSC::DFG::RegisterBank::end):
16801 (JSC::DFG::RegisterBank::isLockedAtIndex):
16802 (JSC::DFG::RegisterBank::nameAtIndex):
16803 (JSC::DFG::RegisterBank::releaseAtIndex):
16804 (JSC::DFG::RegisterBank::allocateInternal):
16805 (JSC::DFG::RegisterBank::MapEntry::MapEntry):
16806 * dfg/DFGScoreBoard.h:
16807 (JSC::DFG::ScoreBoard::~ScoreBoard):
16808 * dfg/DFGSpeculativeJIT.cpp:
16809 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
16810 (JSC::DFG::SpeculationCheck::SpeculationCheck):
16811 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
16812 (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
16813 (JSC::DFG::SpeculativeJIT::compile):
16814 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
16815 (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
16816 * dfg/DFGSpeculativeJIT.h:
16817 (JSC::DFG::SpeculateIntegerOperand::gpr):
16819 2011-04-28 Oliver Hunt <oliver@apple.com>
16821 Reviewed by Gavin Barraclough.
16823 Remove evil addressOfStructure() function
16824 https://bugs.webkit.org/show_bug.cgi?id=59739
16826 Remove the addressOfStructure function from JSCell, and update
16827 callsites to use the same logic as testPrototype()
16829 * jit/JITPropertyAccess.cpp:
16830 (JSC::JIT::privateCompileGetByIdProto):
16831 (JSC::JIT::privateCompileGetByIdProtoList):
16832 * jit/JITPropertyAccess32_64.cpp:
16833 (JSC::JIT::privateCompileGetByIdProto):
16834 (JSC::JIT::privateCompileGetByIdProtoList):
16835 * runtime/JSCell.h:
16837 2011-04-28 Oliver Hunt <oliver@apple.com>
16839 Reviewed by Gavin Barraclough.
16841 Clean up testPrototype()
16842 https://bugs.webkit.org/show_bug.cgi?id=59734
16844 Remove direct pointer to the inside of a GC object and just do
16845 the indirect load manually. Doesn't effect sunspider but does
16846 clean up the code quite a bit, and simplifies the handling of
16849 * jit/JITPropertyAccess.cpp:
16850 (JSC::JIT::testPrototype):
16852 2011-04-28 David Levin <levin@chromium.org>
16856 * wtf/RefCounted.h: Fix inverted ifdef.
16858 2011-04-07 David Levin <levin@chromium.org>
16860 Reviewed by Darin Adler.
16862 Add asserts to RefCounted to make sure ref/deref happens on the right thread.
16863 https://bugs.webkit.org/show_bug.cgi?id=31639
16865 * GNUmakefile.list.am: Added new files to the build.
16866 * JavaScriptCore.gypi: Ditto.
16867 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
16868 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
16869 * jit/ExecutableAllocator.h:
16870 (JSC::ExecutablePool::ExecutablePool): Turned off checks for this
16871 due to not being able to figure out what was guarding it (bug 58091).
16872 * parser/SourceProvider.h:
16873 (JSC::SourceProvider::SourceProvider): Ditto.
16874 * runtime/RegExp.cpp:
16875 (JSC::RegExp::RegExp): Ditto.
16876 * wtf/CMakeLists.txt: Added new files to the build.
16877 * wtf/ThreadRestrictionVerifier.h: Added.
16878 Everything is done in the header to avoid the issue with exports
16879 that are only useful in debug but still needing to export them.
16880 * wtf/RefCounted.h:
16881 (WTF::RefCountedBase::ref): Added checks using the non thread safe verifier.
16882 and filed bug 58171 about making it stricter.
16883 (WTF::RefCountedBase::hasOneRef): Ditto.
16884 (WTF::RefCountedBase::refCount): Ditto.
16885 (WTF::RefCountedBase::setMutexForVerifier): Expose a way to change the checks to be based
16886 on a mutex. This is in the header to avoid adding more exports from JavaScriptCore.
16887 (WTF::RefCountedBase::deprecatedTurnOffVerifier): Temporary way to turn off verification.
16888 Filed bug 58174 to remove this method.
16889 (WTF::RefCountedBase::derefBase):
16890 * wtf/SizeLimits.cpp: Adjusted the debug size check for RefCounted.
16891 * wtf/text/CString.h:
16892 (WTF::CStringBuffer::CStringBuffer): Turned off checks for this while a fix is being
16893 done in Chromium's test_shell (bug 58093).
16895 2011-04-28 Xan Lopez <xlopez@igalia.com>
16897 Unreviewed attempt to fix the build.
16899 * GNUmakefile.am: add -lpthread.
16901 2011-04-28 Oliver Hunt <oliver@apple.com>
16903 Reviewed by Gavin Barraclough.
16905 Only need a single implementation of testPrototype
16906 https://bugs.webkit.org/show_bug.cgi?id=59724
16908 Remove excess copy of identical testPrototype() code
16910 * jit/JITPropertyAccess.cpp:
16911 (JSC::JIT::testPrototype):
16912 * jit/JITPropertyAccess32_64.cpp:
16914 2011-04-28 Xan Lopez <xlopez@igalia.com>
16916 Reviewed by Martin Robinson.
16918 [Gtk] Split JSC and WebCore builds
16919 https://bugs.webkit.org/show_bug.cgi?id=19428
16921 Build JavaScriptCore as a libtool shared library instead of a
16922 private convenience library.
16924 * GNUmakefile.am: define new jsc library and adapt to new name for
16925 javascriptcore target.
16926 * GNUmakefile.list.am: ditto.
16928 2011-04-28 David Kilzer <ddkilzer@apple.com>
16930 <http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
16932 Reviewed by Simon Fraser.
16934 * wtf/mac/MainThreadMac.mm:
16935 (WTF::postTimer): Use RetainPtr to plug the leak.
16937 2011-04-27 Sam Weinig <sam@webkit.org>
16939 Reviewed by David Kilzer.
16941 Add way to install testapi in production builds
16942 https://bugs.webkit.org/show_bug.cgi?id=59674
16944 * Configurations/TestAPI.xcconfig: Copied from Configurations/JavaScriptCore.xcconfig.
16945 Add configuration file for TestAPI. In addition to name, we now specify an install path
16946 and allow SKIP_INSTALL to be overridden by setting FORCE_TOOL_INSTALL.
16948 * JavaScriptCore.xcodeproj/project.pbxproj:
16949 Remove in-project build settings and add missing configuration files. Added missing CompilerVersion.xcconfig
16952 2011-04-27 Adam Barth <abarth@webkit.org>
16954 Reviewed by David Levin.
16956 Enable strict OwnPtrs for Chromium
16957 https://bugs.webkit.org/show_bug.cgi?id=59666
16961 2011-04-27 Oliver Hunt <oliver@apple.com>
16963 Reviewed by Geoffrey Garen.
16965 Add ability to remove keys from weakmap API
16966 https://bugs.webkit.org/show_bug.cgi?id=59645
16968 Add JSWeakObjectMapRemove API
16970 * API/JSWeakObjectMapRefPrivate.cpp:
16971 * API/JSWeakObjectMapRefPrivate.h:
16972 * JavaScriptCore.exp:
16974 2011-04-27 Adam Barth <abarth@webkit.org>
16976 Reviewed by David Levin.
16978 Enable strict mode for OwnPtr
16979 https://bugs.webkit.org/show_bug.cgi?id=59428
16981 This patch enables strict mode for OwnPtr on PLATFORM(MAC) only.
16985 2011-04-27 Steve Block <steveblock@google.com>
16987 Reviewed by David Levin.
16989 Remove Android build system
16990 https://bugs.webkit.org/show_bug.cgi?id=48111
16992 This is to avoid the maintenance burden until the Android port is
16995 * Android.mk: Removed.
16996 * Android.v8.wtf.mk: Removed.
16998 2011-04-27 Mark Rowe <mrowe@apple.com>
17000 Fix 32-bit build after r85036.
17002 * wtf/Platform.h: USE(PLUGIN_HOST_PROCESS) is only true for 64-bit.
17004 2011-04-27 Csaba Osztrogonác <ossy@webkit.org>
17006 Unreviewed buildfix after r85036.
17008 Readd non-dead code.
17010 * wtf/OSAllocatorPosix.cpp:
17011 (WTF::OSAllocator::reserveAndCommit):
17013 2011-04-27 Adam Barth <abarth@webkit.org>
17015 Reviewed by Kenneth Russell.
17017 OwnPtr assignment operator should be private
17018 https://bugs.webkit.org/show_bug.cgi?id=59487
17020 Unfortunately we can't remove the copy constructor because of some
17021 detail about gcc. (The issue is documented in a comment already.)
17025 2011-04-26 Sheriff Bot <webkit.review.bot@gmail.com>
17027 Unreviewed, rolling out r84977.
17028 http://trac.webkit.org/changeset/84977
17029 https://bugs.webkit.org/show_bug.cgi?id=59568
17031 caused crashes on the SL WK2 bots (Requested by jessieberlin
17034 * assembler/MacroAssemblerX86_64.h:
17035 (JSC::MacroAssemblerX86_64::call):
17036 (JSC::MacroAssemblerX86_64::tailRecursiveCall):
17037 (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
17039 2011-04-26 Kevin Ollivier <kevino@theolliviers.com>
17041 Rubberstamped by Eric Seidel.
17043 Enable waf to be used to build other ports
17044 https://bugs.webkit.org/show_bug.cgi?id=58213
17048 2011-04-26 Sam Weinig <sam@webkit.org>
17050 Reviewed by David Hyatt.
17052 Remove Datagrid from the tree
17053 https://bugs.webkit.org/show_bug.cgi?id=59543
17055 * Configurations/FeatureDefines.xcconfig:
17058 2011-04-26 Adrienne Walker <enne@google.com>
17060 Reviewed by Geoffrey Garen.
17062 Fix incorrect use of OwnPtr<T*> in GCActivityCallback
17063 https://bugs.webkit.org/show_bug.cgi?id=59559
17065 * runtime/GCActivityCallback.h:
17067 2011-04-26 Xan Lopez <xlopez@igalia.com>
17069 Reviewed by Daniel Bates.
17071 Unused but set variable warning in MacroAssembelX86_64
17072 https://bugs.webkit.org/show_bug.cgi?id=59482
17074 * assembler/MacroAssemblerX86_64.h:
17075 (JSC::MacroAssemblerX86_64::call): do not declare the label
17076 variable if we are not going to use it.
17077 (JSC::MacroAssemblerX86_64::tailRecursiveCall): ditto.
17078 (JSC::MacroAssemblerX86_64::makeTailRecursiveCall): ditto.
17080 2011-04-26 Dan Bernstein <mitz@apple.com>
17082 Reviewed by Mark Rowe.
17084 Choose the compiler based on the Xcode version for Snow Leopard debug builds.
17086 * Configurations/Base.xcconfig:
17087 * Configurations/CompilerVersion.xcconfig: Added.
17089 2011-04-25 Geoffrey Garen <ggaren@apple.com>
17091 Reviewed by Oliver Hunt.
17093 Nixed special finalizer handling for WebCore strings
17094 https://bugs.webkit.org/show_bug.cgi?id=59425
17096 SunSpider reports no change.
17098 Not needed anymore, since weak handles have finalizers.
17100 * runtime/JSString.cpp:
17101 (JSC::JSString::resolveRope):
17102 (JSC::JSString::resolveRopeSlowCase):
17103 (JSC::JSString::outOfMemory):
17104 (JSC::JSString::substringFromRope):
17105 (JSC::JSString::replaceCharacter): Updated for removal of union.
17107 * runtime/JSString.h:
17108 (JSC::RopeBuilder::JSString):
17109 (JSC::RopeBuilder::~JSString):
17110 (JSC::RopeBuilder::appendStringInConstruct):
17111 (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): No need for
17112 union or special constructor anymore.
17114 2011-04-26 Gabor Loki <loki@webkit.org>
17116 Reviewed by Csaba Osztrogonác.
17118 Speeding up SVG filters with multicore (SMP) support
17119 https://bugs.webkit.org/show_bug.cgi?id=43903
17121 Some SVG filters execute a huge number of pixel manipulations, which
17122 cannot be sped up by graphics accelerators, since their algorithm is
17123 too complex. Using the power of Symmetric Multi Processing (SMP) we
17124 can split up a task to smaller (data independent) tasks, which can be
17125 executed independently.
17127 The ParallelJobs framework provides a simple way for distributed
17128 programming. The framework is based on WebKit's threading infrastructure,
17129 Open Multi-Processing's (OpenMP) API, and libdispatch API.
17131 * GNUmakefile.list.am:
17132 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
17133 * JavaScriptCore.xcodeproj/project.pbxproj:
17134 * wtf/CMakeLists.txt:
17135 * wtf/ParallelJobs.h: Added.
17136 (WTF::ParallelJobs::ParallelJobs):
17137 (WTF::ParallelJobs::numberOfJobs):
17138 (WTF::ParallelJobs::parameterForJob):
17139 (WTF::ParallelJobs::executeJobs):
17140 * wtf/ParallelJobsGeneric.cpp: Added.
17141 (WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
17142 (WTF::ParallelEnvironment::ThreadPrivate::executeJob):
17143 (WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
17144 (WTF::ParallelEnvironment::ThreadPrivate::workerThread):
17145 * wtf/ParallelJobsGeneric.h: Added.
17146 (WTF::ParallelEnvironment::ParallelEnvironment):
17147 (WTF::ParallelEnvironment::numberOfJobs):
17148 (WTF::ParallelEnvironment::parameterForJob):
17149 (WTF::ParallelEnvironment::executeJobs):
17150 (WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate):
17151 (WTF::ParallelEnvironment::ThreadPrivate::create):
17152 * wtf/ParallelJobsLibdispatch.h: Added.
17153 (WTF::ParallelEnvironment::ParallelEnvironment):
17154 (WTF::ParallelEnvironment::numberOfJobs):
17155 (WTF::ParallelEnvironment::parameterForJob):
17156 (WTF::ParallelEnvironment::executeJobs):
17157 * wtf/ParallelJobsOpenMP.h: Added.
17158 (WTF::ParallelEnvironment::ParallelEnvironment):
17159 (WTF::ParallelEnvironment::numberOfJobs):
17160 (WTF::ParallelEnvironment::parameterForJob):
17161 (WTF::ParallelEnvironment::executeJobs):
17165 2011-04-26 Mihai Parparita <mihaip@chromium.org>
17167 Reviewed by Adam Barth.
17169 Turn off make built-in implicit rules for derived sources makefile
17170 https://bugs.webkit.org/show_bug.cgi?id=59418
17172 We don't use any of make's built-in implicit rules, turning them off
17173 speeds up parsing of the makefile.
17175 * JavaScriptCore.xcodeproj/project.pbxproj:
17176 * gyp/generate-derived-sources.sh:
17178 2011-04-25 Geoffrey Garen <ggaren@apple.com>
17180 Reviewed by Oliver Hunt.
17182 Custom prototypes on DOM objects don't persist after garbage collection
17183 https://bugs.webkit.org/show_bug.cgi?id=59412
17185 SunSpider reports no change.
17187 The hasCustomProperties() check didn't check for a custom prototype.
17189 * runtime/JSObject.h:
17190 (JSC::JSObject::hasCustomProperties): Changed to delegate to Structure
17191 because it is the "truth" about an object's pedigree.
17193 * runtime/Structure.cpp:
17194 (JSC::Structure::Structure):
17195 * runtime/Structure.h:
17196 (JSC::Structure::didTransition): Track whether a Structure has ever
17197 transitioned for any reason. If so, we have to assume that the object
17198 holding it is custom in some way.
17200 2011-04-25 Gavin Barraclough <barraclough@apple.com>
17202 Reviewed by Geoff Garen.
17204 https://bugs.webkit.org/show_bug.cgi?id=59405
17205 DFG JIT - add type speculation for integer & array types, for vars & args.
17207 If a var or argument is used as the base for a GetByVal or PutByVal access
17208 we are speculating that it is of type Array (we only generate code on the
17209 speculative path to perform array accesses). By typing the var or args slot
17210 as Array, and checking on entry to the function (in the case of args), and
17211 each time the local is written to, we can avoid a type check at each point
17212 the array is accessed. This will typically hoist type checks out of loops.
17214 Similarly, any local that is incremented or decremented, or is the input or
17215 output or a bitwise operator, is likely to be an integer. By typing the
17216 local as int32 we can avoid speculation checks on access, and tagging when
17217 writing to the slot. All accesses can become 32bit instead of 64.
17219 * dfg/DFGByteCodeParser.cpp:
17220 (JSC::DFG::ByteCodeParser::set):
17221 (JSC::DFG::ByteCodeParser::predictArray):
17222 (JSC::DFG::ByteCodeParser::predictInt32):
17223 (JSC::DFG::ByteCodeParser::parseBlock):
17225 (JSC::DFG::PredictionSlot::PredictionSlot):
17226 (JSC::DFG::Graph::Graph):
17227 (JSC::DFG::Graph::predict):
17228 (JSC::DFG::Graph::getPrediction):
17229 * dfg/DFGJITCompiler.cpp:
17230 (JSC::DFG::JITCompiler::compileFunction):
17231 * dfg/DFGJITCompiler.h:
17232 (JSC::DFG::JITCompiler::tagFor):
17233 (JSC::DFG::JITCompiler::payloadFor):
17235 * dfg/DFGNonSpeculativeJIT.cpp:
17236 (JSC::DFG::NonSpeculativeJIT::compile):
17237 * dfg/DFGSpeculativeJIT.cpp:
17238 (JSC::DFG::SpeculativeJIT::compile):
17239 (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
17240 (JSC::DFG::SpeculativeJIT::initializeVariableTypes):
17241 * dfg/DFGSpeculativeJIT.h:
17242 * runtime/Executable.cpp:
17243 (JSC::tryDFGCompile):
17245 2011-04-25 David Levin <levin@chromium.org>
17247 Reviewed by James Robinson.
17249 Fix OwnPtr strict mode violation in MessageQueue.h
17250 https://bugs.webkit.org/show_bug.cgi?id=59400
17252 * wtf/MessageQueue.h:
17253 (WTF::::waitForMessage):
17254 (WTF::::waitForMessageFilteredWithTimeout):
17255 (WTF::::tryGetMessage):
17257 2011-04-25 Adam Barth <abarth@webkit.org>
17259 Reviewed by Darin Adler.
17261 JavaScriptCore should play nice strict OwnPtrs
17262 https://bugs.webkit.org/show_bug.cgi?id=59401
17264 * dfg/DFGByteCodeParser.cpp:
17265 (JSC::DFG::ByteCodeParser::parse):
17267 (JSC::TypeCounter::TypeCounter):
17268 * jit/JITStubs.cpp:
17269 (JSC::JITThunks::JITThunks):
17270 * parser/JSParser.cpp:
17271 (JSC::JSParser::Scope::Scope):
17272 * yarr/YarrJIT.cpp:
17273 (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
17275 2011-04-25 Mark Rowe <mrowe@apple.com>
17279 * wtf/ListHashSet.h:
17281 2011-04-25 Gavin Barraclough <barraclough@apple.com>
17283 Reviewed by Oliver Hunt.
17285 Bug 59370 - DFG JIT - fix leak of BlocksBlocks
17286 (put the blocks immediately into an OwnPtr).
17288 * dfg/DFGByteCodeParser.cpp:
17289 (JSC::DFG::ByteCodeParser::parse):
17291 2011-04-25 James Robinson <jamesr@chromium.org>
17293 Reviewed by David Levin.
17295 Fix strict OwnPtr violations in ListHashSet and RenderLayerCompositor
17296 https://bugs.webkit.org/show_bug.cgi?id=59353
17298 * wtf/ListHashSet.h:
17299 (WTF::::ListHashSet):
17301 2011-04-25 David Levin <levin@chromium.org>
17303 Reviewed by Adam Barth.
17305 Fix PassOwnPtr issues in Structure and JSGlobalData.cpp
17306 https://bugs.webkit.org/show_bug.cgi?id=59347
17308 * runtime/JSGlobalData.cpp:
17309 (JSC::JSGlobalData::JSGlobalData):
17310 * runtime/Structure.cpp:
17311 (JSC::Structure::copyPropertyTable):
17312 (JSC::Structure::createPropertyMap):
17313 * runtime/Structure.h:
17315 2011-04-25 Oliver Hunt <oliver@apple.com>
17317 Reviewed by Geoffrey Garen.
17319 Make ClassInfo required when creating a Structure
17320 https://bugs.webkit.org/show_bug.cgi?id=59340
17322 Add ClassInfo to all those types which currently don't
17323 have it, and add an assertion to Structure::create to
17324 ensure that the provided classInfo is not null.
17326 * runtime/Executable.h:
17327 (JSC::EvalExecutable::createStructure):
17328 (JSC::ProgramExecutable::createStructure):
17329 (JSC::FunctionExecutable::createStructure):
17330 * runtime/GetterSetter.cpp:
17331 * runtime/GetterSetter.h:
17332 (JSC::GetterSetter::createStructure):
17333 * runtime/JSAPIValueWrapper.cpp:
17334 * runtime/JSAPIValueWrapper.h:
17335 (JSC::JSAPIValueWrapper::createStructure):
17336 * runtime/JSCell.cpp:
17337 * runtime/JSCell.h:
17338 * runtime/JSString.cpp:
17339 * runtime/JSString.h:
17340 (JSC::RopeBuilder::createStructure):
17341 * runtime/Structure.h:
17342 (JSC::Structure::create):
17343 (JSC::JSCell::createDummyStructure):
17345 2011-04-25 David Levin <levin@chromium.org>
17347 Reviewed by Adam Barth.
17349 PropertyMapHashTable.h should use adoptPtr instead of implicit conversions to PassRefPtr.
17350 https://bugs.webkit.org/show_bug.cgi?id=59342
17352 This patch is to prepare for the strict OwnPtr hack-a-thon.
17354 * runtime/PropertyMapHashTable.h:
17355 (JSC::PropertyTable::copy):
17357 2011-04-25 Thouraya ANDOLSI <thouraya.andolsi@st.com>
17359 Reviewed by Gavin Barraclough.
17361 Rationalize MacroAssembler branch methods
17362 https://bugs.webkit.org/show_bug.cgi?id=58950
17364 split out the 'Condition' enum into 'RelationalCondition' and 'ResultCondition'
17365 and apply related changes (only for SH4 platforms).
17367 * assembler/MacroAssemblerSH4.cpp:
17368 * assembler/MacroAssemblerSH4.h:
17369 (JSC::MacroAssemblerSH4::compare32):
17370 (JSC::MacroAssemblerSH4::branch32WithUnalignedHalfWords):
17371 (JSC::MacroAssemblerSH4::branchDouble):
17372 (JSC::MacroAssemblerSH4::branch32):
17373 (JSC::MacroAssemblerSH4::branchTest8):
17374 (JSC::MacroAssemblerSH4::branch8):
17375 (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):
17376 (JSC::MacroAssemblerSH4::test8):
17377 (JSC::MacroAssemblerSH4::branch16):
17378 (JSC::MacroAssemblerSH4::branchTest32):
17379 (JSC::MacroAssemblerSH4::branchAdd32):
17380 (JSC::MacroAssemblerSH4::branchMul32):
17381 (JSC::MacroAssemblerSH4::branchSub32):
17382 (JSC::MacroAssemblerSH4::branchOr32):
17383 (JSC::MacroAssemblerSH4::branchConvertDoubleToInt32):
17384 (JSC::MacroAssemblerSH4::branchPtrWithPatch):
17385 (JSC::MacroAssemblerSH4::SH4Condition):
17386 * assembler/SH4Assembler.h:
17387 (JSC::SH4Assembler::cmpEqImmR0):
17389 2011-04-25 Adam Barth <abarth@webkit.org>
17391 Reviewed by Eric Seidel.
17393 PropertyMapHashTable should work with strict OwnPtr
17394 https://bugs.webkit.org/show_bug.cgi?id=59337
17396 This patch is in preparation for the strict OwnPtr hack-a-thon.
17398 * runtime/PropertyMapHashTable.h:
17399 (JSC::PropertyTable::PropertyTable):
17400 (JSC::PropertyTable::addDeletedOffset):
17402 2011-04-25 Geoffrey Garen <ggaren@apple.com>
17404 Reviewed by Sam Weinig.
17406 Nixed MarkStack::deprecatedAppend, since it has no clients left.
17408 * heap/MarkStack.h:
17410 2011-04-23 Gavin Barraclough <barraclough@apple.com>
17412 Reviewed by Oliver Hunt.
17414 Bug 59287 - DFG JIT - Handle temporaries as vars, allowing support for ?:
17416 SetLocals to temporaries will only be generated if they are used within other
17417 blocks, due to the SSA based DCE.
17419 * dfg/DFGByteCodeParser.cpp:
17420 (JSC::DFG::ByteCodeParser::ByteCodeParser):
17421 (JSC::DFG::ByteCodeParser::get):
17422 (JSC::DFG::ByteCodeParser::set):
17423 (JSC::DFG::ByteCodeParser::getLocal):
17424 (JSC::DFG::ByteCodeParser::setLocal):
17425 (JSC::DFG::ByteCodeParser::parseBlock):
17426 (JSC::DFG::ByteCodeParser::processPhiStack):
17427 (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
17428 (JSC::DFG::ByteCodeParser::parse):
17430 (JSC::DFG::BasicBlock::BasicBlock):
17432 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17434 Reviewed by Sam Weinig & Geoff Garen.
17436 Bug 59266 - DFG JIT - Add SSA style DCE
17438 This works by making GetLocal nodes reference SetLocal nodes from prior blocks,
17439 via intermediate Phi nodes. Whenever we add a GetLocal to the graph, also add a
17440 matching child Phi, and add the Phi to a work queue to add references to prior
17441 definitions once we have the full CFG & can determine predecessors. This process
17442 is iterative, inserting new phis into predecessors as necessary.
17444 * dfg/DFGByteCodeParser.cpp:
17445 (JSC::DFG::ByteCodeParser::getVariable):
17446 (JSC::DFG::ByteCodeParser::setVariable):
17447 (JSC::DFG::ByteCodeParser::getArgument):
17448 (JSC::DFG::ByteCodeParser::setArgument):
17449 (JSC::DFG::ByteCodeParser::parseBlock):
17450 (JSC::DFG::ByteCodeParser::processWorkQueue):
17451 (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
17452 (JSC::DFG::ByteCodeParser::parse):
17453 * dfg/DFGGraph.cpp:
17454 (JSC::DFG::Graph::dump):
17455 (JSC::DFG::Graph::refChildren):
17457 (JSC::DFG::Graph::ref):
17459 (JSC::DFG::Node::ref):
17460 * dfg/DFGNonSpeculativeJIT.cpp:
17461 (JSC::DFG::NonSpeculativeJIT::compile):
17462 * dfg/DFGScoreBoard.h:
17463 (JSC::DFG::ScoreBoard::~ScoreBoard):
17464 (JSC::DFG::ScoreBoard::dump):
17465 * dfg/DFGSpeculativeJIT.cpp:
17466 (JSC::DFG::SpeculativeJIT::compile):
17468 2011-04-22 Vitaly Repeshko <vitalyr@chromium.org>
17470 Reviewed by Adam Barth.
17472 Add missing default constructors for HashMap iterator specializations.
17473 https://bugs.webkit.org/show_bug.cgi?id=59250
17475 * wtf/HashIterators.h:
17477 (WTF::HashTableConstIterator::HashTableConstIterator): Added cast
17478 to help compiler find the function template.
17480 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17482 Reviewed by Sam Weinig.
17484 Bug 59262 - DFG JIT - reduce size of VariableRecord
17486 We never need both the get & set node, only the most recent
17487 (which is always a set, if both exist).
17489 * dfg/DFGByteCodeParser.cpp:
17490 (JSC::DFG::ByteCodeParser::getVariable):
17491 (JSC::DFG::ByteCodeParser::setVariable):
17492 (JSC::DFG::ByteCodeParser::getArgument):
17493 (JSC::DFG::ByteCodeParser::setArgument):
17494 (JSC::DFG::ByteCodeParser::parseBlock):
17496 (JSC::DFG::VariableRecord::VariableRecord):
17498 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17500 Reviewed by Geoffrey Garen.
17502 Bug 59254 - DFG JIT - retain VariableRecords for args/var in all basic blocks,
17503 such that this information is available for DCE. Also, since this enlarges the
17504 size of BasicBlock, make Graph hold a vector of pointers to basic blocks, not a
17507 * dfg/DFGByteCodeParser.cpp:
17508 (JSC::DFG::ByteCodeParser::ByteCodeParser):
17509 (JSC::DFG::ByteCodeParser::get):
17510 (JSC::DFG::ByteCodeParser::set):
17511 (JSC::DFG::ByteCodeParser::getVariable):
17512 (JSC::DFG::ByteCodeParser::setVariable):
17513 (JSC::DFG::ByteCodeParser::getArgument):
17514 (JSC::DFG::ByteCodeParser::setArgument):
17515 (JSC::DFG::ByteCodeParser::parseBlock):
17516 (JSC::DFG::ByteCodeParser::setupPredecessors):
17517 (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
17518 (JSC::DFG::ByteCodeParser::parse):
17519 * dfg/DFGGraph.cpp:
17520 (JSC::DFG::Graph::dump):
17522 (JSC::DFG::VariableRecord::VariableRecord):
17523 (JSC::DFG::BasicBlock::BasicBlock):
17524 (JSC::DFG::BasicBlock::getBytecodeBegin):
17525 (JSC::DFG::Graph::blockIndexForBytecodeOffset):
17526 (JSC::DFG::Graph::blockForBytecodeOffset):
17527 * dfg/DFGNonSpeculativeJIT.cpp:
17528 (JSC::DFG::NonSpeculativeJIT::compile):
17529 * dfg/DFGSpeculativeJIT.cpp:
17530 (JSC::DFG::SpeculativeJIT::compile):
17531 * dfg/DFGSpeculativeJIT.h:
17532 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
17534 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17538 * dfg/DFGSpeculativeJIT.cpp:
17539 (JSC::DFG::SpeculativeJIT::compile):
17541 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17543 Reviewed by Sam Weinig.
17545 Quick cleanup to SpeculativeJIT/NonSpeculativeJIT compile loop,
17546 move out the call to checkConsistency().
17548 * dfg/DFGNonSpeculativeJIT.cpp:
17549 (JSC::DFG::NonSpeculativeJIT::compile):
17550 * dfg/DFGSpeculativeJIT.cpp:
17551 (JSC::DFG::SpeculativeJIT::compile):
17552 * dfg/DFGSpeculativeJIT.h:
17553 (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
17554 (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
17556 2011-04-21 Vitaly Repeshko <vitalyr@chromium.org>
17558 Reviewed by Adam Barth.
17560 Provide default constructors for HashMap iterators.
17561 https://bugs.webkit.org/show_bug.cgi?id=59151
17563 These will be used to implement an iterator over EventTarget's
17567 (WTF::HashTableConstIteratorAdapter::HashTableConstIteratorAdapter):
17568 (WTF::HashTableIteratorAdapter::HashTableIteratorAdapter):
17570 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17572 Reviewed by Geoff Garen.
17574 Bug 59232 - DFG JIT - Add predecessor links to BasicBlocks
17576 These will be necessary for DCE support.
17577 Also factor allocateVirtualRegisters out into its own method.
17579 * dfg/DFGByteCodeParser.cpp:
17580 (JSC::DFG::ByteCodeParser::setupPredecessors):
17581 (JSC::DFG::ByteCodeParser::allocateVirtualRegisters):
17582 (JSC::DFG::ByteCodeParser::parse):
17584 (JSC::DFG::Graph::blockForBytecodeOffset):
17586 (JSC::DFG::Node::isTerminal):
17588 2011-04-22 Oliver Hunt <oliver@apple.com>
17590 Reviewed by Geoffrey Garen.
17592 Object.create creates uncachable objects
17593 https://bugs.webkit.org/show_bug.cgi?id=59164
17595 Use the prototype object's inheritorID, as we
17596 should always have done
17598 * runtime/JSGlobalObject.cpp:
17599 (JSC::JSGlobalObject::reset):
17600 (JSC::JSGlobalObject::visitChildren):
17601 * runtime/JSGlobalObject.h:
17602 (JSC::JSGlobalObject::nullPrototypeObjectStructure):
17603 * runtime/ObjectConstructor.cpp:
17604 (JSC::objectConstructorCreate):
17606 2011-04-22 Gavin Barraclough <barraclough@apple.com>
17608 Reviewed by Sam Weinig.
17610 Bug 59222 - DFG JIT - don't allocate virtual registers to nodes with no result
17612 We currently allocate virtual registers to nodes which have no result - these are
17613 clearly unused, and may result in us allocating a larger than necessary stack frame.
17615 Encapsulate Node::virtualRegister such that we can ASSERT this is only called on
17616 nodes that have results, and improve the quality of output from the consistency check.
17618 * dfg/DFGByteCodeParser.cpp:
17619 (JSC::DFG::ByteCodeParser::parse):
17620 * dfg/DFGGraph.cpp:
17621 (JSC::DFG::Graph::dump):
17623 (JSC::DFG::Graph::ref):
17624 (JSC::DFG::Graph::deref):
17625 * dfg/DFGJITCodeGenerator.cpp:
17626 (JSC::DFG::JITCodeGenerator::fillInteger):
17627 (JSC::DFG::JITCodeGenerator::fillDouble):
17628 (JSC::DFG::JITCodeGenerator::fillJSValue):
17629 (JSC::DFG::JITCodeGenerator::dump):
17630 (JSC::DFG::JITCodeGenerator::checkConsistency):
17631 * dfg/DFGJITCodeGenerator.h:
17632 (JSC::DFG::JITCodeGenerator::canReuse):
17633 (JSC::DFG::JITCodeGenerator::isFilled):
17634 (JSC::DFG::JITCodeGenerator::isFilledDouble):
17635 (JSC::DFG::JITCodeGenerator::use):
17636 (JSC::DFG::JITCodeGenerator::integerResult):
17637 (JSC::DFG::JITCodeGenerator::noResult):
17638 (JSC::DFG::JITCodeGenerator::cellResult):
17639 (JSC::DFG::JITCodeGenerator::jsValueResult):
17640 (JSC::DFG::JITCodeGenerator::doubleResult):
17641 (JSC::DFG::JITCodeGenerator::initConstantInfo):
17642 * dfg/DFGJITCompiler.cpp:
17643 (JSC::DFG::JITCompiler::fillNumericToDouble):
17644 (JSC::DFG::JITCompiler::fillInt32ToInteger):
17645 (JSC::DFG::JITCompiler::fillToJS):
17646 (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
17648 (JSC::DFG::Node::Node):
17649 (JSC::DFG::Node::hasResult):
17650 (JSC::DFG::Node::virtualRegister):
17651 (JSC::DFG::Node::setVirtualRegister):
17652 (JSC::DFG::Node::refCount):
17653 (JSC::DFG::Node::ref):
17654 (JSC::DFG::Node::deref):
17655 (JSC::DFG::Node::adjustedRefCount):
17656 * dfg/DFGNonSpeculativeJIT.cpp:
17657 (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
17658 (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
17659 (JSC::DFG::NonSpeculativeJIT::compile):
17660 * dfg/DFGScoreBoard.h:
17661 (JSC::DFG::ScoreBoard::use):
17662 * dfg/DFGSpeculativeJIT.cpp:
17663 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
17664 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
17665 (JSC::DFG::SpeculativeJIT::compile):
17667 2011-04-22 Sam Weinig <sam@webkit.org>
17669 Reviewed by Gavin Barraclough and Oliver Hunt.
17671 Arrays should participate in global object forwarding fun
17672 https://bugs.webkit.org/show_bug.cgi?id=59215
17674 * runtime/JSGlobalObject.h:
17675 (JSC::constructEmptyArray):
17676 (JSC::constructArray):
17677 Add variants of constructArray that take a global object.
17679 2011-04-22 Sheriff Bot <webkit.review.bot@gmail.com>
17681 Unreviewed, rolling out r84650 and r84654.
17682 http://trac.webkit.org/changeset/84650
17683 http://trac.webkit.org/changeset/84654
17684 https://bugs.webkit.org/show_bug.cgi?id=59218
17686 Broke Windows build (Requested by bweinstein on #webkit).
17688 * API/JSCallbackObjectFunctions.h:
17690 * JavaScriptCore.exp:
17691 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17693 (JSC::HandleBase::operator!):
17694 (JSC::HandleBase::operator UnspecifiedBoolType*):
17695 (JSC::HandleTypes::getFromSlot):
17696 * heap/HandleHeap.cpp:
17697 (JSC::HandleHeap::markStrongHandles):
17698 (JSC::HandleHeap::markWeakHandles):
17699 (JSC::HandleHeap::finalizeWeakHandles):
17700 (JSC::HandleHeap::writeBarrier):
17701 (JSC::HandleHeap::protectedGlobalObjectCount):
17702 (JSC::HandleHeap::isValidWeakNode):
17703 * heap/HandleHeap.h:
17704 (JSC::HandleHeap::copyWeak):
17705 (JSC::HandleHeap::makeWeak):
17706 (JSC::HandleHeap::Node::slot):
17707 * heap/HandleStack.cpp:
17708 (JSC::HandleStack::mark):
17709 (JSC::HandleStack::grow):
17710 * heap/HandleStack.h:
17711 (JSC::HandleStack::zapTo):
17712 (JSC::HandleStack::push):
17714 (JSC::HandleHeap::protectedObjectTypeCounts):
17718 (JSC::Strong::set):
17721 * runtime/StructureTransitionTable.h:
17722 (JSC::StructureTransitionTable::singleTransition):
17723 (JSC::StructureTransitionTable::setSingleTransition):
17724 * runtime/WeakGCMap.h:
17725 (JSC::WeakGCMap::add):
17726 (JSC::WeakGCMap::set):
17727 * runtime/WriteBarrier.h:
17729 2011-04-22 Brian Weinstein <bweinstein@apple.com>
17731 Part of Windows build fix from r84650.
17733 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17735 2011-04-22 Oliver Hunt <oliver@apple.com>
17737 Reviewed by Geoffrey Garen.
17739 Make it harder to use HandleSlot incorrectly
17740 https://bugs.webkit.org/show_bug.cgi?id=59205
17742 Just add a little type fudging to make it harder to
17743 incorrectly assign through a HandleSlot.
17745 * API/JSCallbackObjectFunctions.h:
17747 * JavaScriptCore.exp:
17749 (JSC::HandleBase::operator!):
17750 (JSC::HandleBase::operator UnspecifiedBoolType*):
17751 (JSC::HandleTypes::getFromSlot):
17752 * heap/HandleHeap.cpp:
17753 (JSC::HandleHeap::markStrongHandles):
17754 (JSC::HandleHeap::markWeakHandles):
17755 (JSC::HandleHeap::finalizeWeakHandles):
17756 (JSC::HandleHeap::writeBarrier):
17757 (JSC::HandleHeap::protectedGlobalObjectCount):
17758 (JSC::HandleHeap::isValidWeakNode):
17759 * heap/HandleHeap.h:
17760 (JSC::HandleHeap::copyWeak):
17761 (JSC::HandleHeap::makeWeak):
17762 (JSC::HandleHeap::Node::slot):
17763 * heap/HandleStack.cpp:
17764 (JSC::HandleStack::mark):
17765 (JSC::HandleStack::grow):
17766 * heap/HandleStack.h:
17767 (JSC::HandleStack::zapTo):
17768 (JSC::HandleStack::push):
17770 (JSC::HandleHeap::protectedObjectTypeCounts):
17774 (JSC::Strong::set):
17777 * runtime/StructureTransitionTable.h:
17778 (JSC::StructureTransitionTable::singleTransition):
17779 (JSC::StructureTransitionTable::setSingleTransition):
17780 * runtime/WeakGCMap.h:
17781 (JSC::WeakGCMap::add):
17782 (JSC::WeakGCMap::set):
17783 * runtime/WriteBarrier.h:
17784 (JSC::OpaqueJSValue::toJSValue):
17785 (JSC::OpaqueJSValue::toJSValueRef):
17786 (JSC::OpaqueJSValue::fromJSValue):
17788 2011-04-22 Patrick Gansterer <paroga@webkit.org>
17790 Unreviewed. Build fix for ENABLE(INTERPRETER) after r84556.
17792 * bytecode/CodeBlock.cpp:
17793 (JSC::CodeBlock::visitAggregate):
17795 2011-04-21 Sheriff Bot <webkit.review.bot@gmail.com>
17797 Unreviewed, rolling out r84583.
17798 http://trac.webkit.org/changeset/84583
17799 https://bugs.webkit.org/show_bug.cgi?id=59173
17802 http://trac.webkit.org/export/84593/trunk/LayoutTests/fast/js
17803 /Object-create.html" (Requested by ggaren on #webkit).
17805 * runtime/ObjectConstructor.cpp:
17806 (JSC::objectConstructorCreate):
17808 2011-04-21 Maciej Stachowiak <mjs@apple.com>
17810 Reviewed by Adam Roben.
17812 Add a feature define to allow <details> and <summary> to be disabled
17813 https://bugs.webkit.org/show_bug.cgi?id=59118
17814 <rdar://problem/9257045>
17816 * Configurations/FeatureDefines.xcconfig:
17818 2011-04-21 Oliver Hunt <oliver@apple.com>
17820 Reviewed by Geoffrey Garen.
17822 Object.create creates uncachable objects
17823 https://bugs.webkit.org/show_bug.cgi?id=59164
17825 Use the prototype object's inheritorID, as we
17826 should always have done
17828 * runtime/ObjectConstructor.cpp:
17829 (JSC::objectConstructorCreate):
17831 2011-04-21 Oliver Hunt <oliver@apple.com>
17833 Reviewed by Geoffrey Garen.
17835 Start moving to a general visitor pattern for GC traversal
17836 https://bugs.webkit.org/show_bug.cgi?id=59141
17838 This is just a rename:
17839 markChildren -> visitChildren
17840 markAggregate -> visitAggregate
17841 markStack -> visitor
17842 MarkStack -> typedef'd to SlotVisitor
17844 * API/JSCallbackObject.h:
17845 (JSC::JSCallbackObjectData::visitChildren):
17846 (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
17847 (JSC::JSCallbackObject::visitChildren):
17848 * JavaScriptCore.exp:
17849 * bytecode/CodeBlock.cpp:
17850 (JSC::CodeBlock::visitStructures):
17851 (JSC::EvalCodeCache::visitAggregate):
17852 (JSC::CodeBlock::visitAggregate):
17853 * bytecode/CodeBlock.h:
17854 * bytecode/EvalCodeCache.h:
17855 * bytecode/Instruction.h:
17856 (JSC::PolymorphicAccessStructureList::visitAggregate):
17857 * bytecode/StructureStubInfo.cpp:
17858 (JSC::StructureStubInfo::visitAggregate):
17859 * bytecode/StructureStubInfo.h:
17860 * debugger/DebuggerActivation.cpp:
17861 (JSC::DebuggerActivation::visitChildren):
17862 * debugger/DebuggerActivation.h:
17863 * heap/HandleHeap.cpp:
17864 (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
17865 (JSC::HandleHeap::markStrongHandles):
17866 (JSC::HandleHeap::markWeakHandles):
17867 * heap/HandleHeap.h:
17868 * heap/HandleStack.cpp:
17869 (JSC::HandleStack::mark):
17870 * heap/HandleStack.h:
17872 (JSC::Heap::markProtectedObjects):
17873 (JSC::Heap::markTempSortVectors):
17874 (JSC::Heap::markRoots):
17876 * heap/MarkStack.cpp:
17877 (JSC::MarkStack::visitChildren):
17878 (JSC::MarkStack::drain):
17879 * heap/MarkStack.h:
17880 (JSC::HeapRootVisitor::HeapRootVisitor):
17881 (JSC::HeapRootVisitor::mark):
17882 (JSC::HeapRootVisitor::visitor):
17883 * heap/MarkedSpace.h:
17884 * runtime/ArgList.cpp:
17885 (JSC::MarkedArgumentBuffer::markLists):
17886 * runtime/ArgList.h:
17887 * runtime/Arguments.cpp:
17888 (JSC::Arguments::visitChildren):
17889 * runtime/Arguments.h:
17890 * runtime/Executable.cpp:
17891 (JSC::EvalExecutable::visitChildren):
17892 (JSC::ProgramExecutable::visitChildren):
17893 (JSC::FunctionExecutable::visitChildren):
17894 * runtime/Executable.h:
17895 * runtime/GetterSetter.cpp:
17896 (JSC::GetterSetter::visitChildren):
17897 * runtime/GetterSetter.h:
17898 (JSC::GetterSetter::createStructure):
17899 * runtime/JSAPIValueWrapper.h:
17900 (JSC::JSAPIValueWrapper::createStructure):
17901 * runtime/JSActivation.cpp:
17902 (JSC::JSActivation::visitChildren):
17903 * runtime/JSActivation.h:
17904 * runtime/JSArray.cpp:
17905 (JSC::JSArray::visitChildren):
17906 * runtime/JSArray.h:
17907 (JSC::JSArray::visitDirect):
17908 * runtime/JSCell.h:
17909 (JSC::JSCell::JSCell::visitChildren):
17910 * runtime/JSFunction.cpp:
17911 (JSC::JSFunction::visitChildren):
17912 * runtime/JSFunction.h:
17913 * runtime/JSGlobalObject.cpp:
17914 (JSC::visitIfNeeded):
17915 (JSC::JSGlobalObject::visitChildren):
17916 * runtime/JSGlobalObject.h:
17917 * runtime/JSONObject.cpp:
17918 * runtime/JSObject.cpp:
17919 (JSC::JSObject::visitChildren):
17920 * runtime/JSObject.h:
17921 (JSC::JSObject::visitDirect):
17922 * runtime/JSPropertyNameIterator.cpp:
17923 (JSC::JSPropertyNameIterator::visitChildren):
17924 * runtime/JSPropertyNameIterator.h:
17925 (JSC::JSPropertyNameIterator::createStructure):
17926 * runtime/JSStaticScopeObject.cpp:
17927 (JSC::JSStaticScopeObject::visitChildren):
17928 * runtime/JSStaticScopeObject.h:
17929 * runtime/JSTypeInfo.h:
17930 (JSC::TypeInfo::TypeInfo):
17931 (JSC::TypeInfo::overridesVisitChildren):
17932 * runtime/JSWrapperObject.cpp:
17933 (JSC::JSWrapperObject::visitChildren):
17934 * runtime/JSWrapperObject.h:
17935 * runtime/JSZombie.h:
17936 (JSC::JSZombie::visitChildren):
17937 * runtime/NativeErrorConstructor.cpp:
17938 (JSC::NativeErrorConstructor::visitChildren):
17939 * runtime/NativeErrorConstructor.h:
17940 * runtime/RegExpObject.cpp:
17941 (JSC::RegExpObject::visitChildren):
17942 * runtime/RegExpObject.h:
17943 * runtime/ScopeChain.cpp:
17944 (JSC::ScopeChainNode::visitChildren):
17945 * runtime/ScopeChain.h:
17946 * runtime/SmallStrings.cpp:
17947 (JSC::SmallStrings::visitChildren):
17948 * runtime/SmallStrings.h:
17949 * runtime/Structure.cpp:
17950 (JSC::Structure::Structure):
17951 (JSC::Structure::visitChildren):
17952 * runtime/Structure.h:
17953 * runtime/StructureChain.cpp:
17954 (JSC::StructureChain::visitChildren):
17955 * runtime/StructureChain.h:
17956 (JSC::StructureChain::createStructure):
17958 2011-04-21 Sheriff Bot <webkit.review.bot@gmail.com>
17960 Unreviewed, rolling out r84548.
17961 http://trac.webkit.org/changeset/84548
17962 https://bugs.webkit.org/show_bug.cgi?id=59144
17964 Broke chromium-win build (Requested by aklein on #webkit).
17968 2011-04-21 Adam Klein <adamk@chromium.org>
17970 Reviewed by David Levin.
17972 [fileapi] Worker File API calls that create Blobs fail in debug builds due to random number generator thread assertion
17973 https://bugs.webkit.org/show_bug.cgi?id=55728
17975 Enable WTF_MULTIPLE_THREADS for Chromium.
17979 2011-04-20 Michael Saboff <msaboff@apple.com>
17981 Reviewed by Geoff Garen.
17983 JSString::resolveRope inefficient for common 2 fiber case
17984 https://bugs.webkit.org/show_bug.cgi?id=58994
17986 Split JSString::resolveRope into three routines.
17987 resolveRope allocates the new buffer and handles the 1 or 2
17988 fiber case with single level fibers.
17989 resolveRopeSlowCase handles the general case.
17990 outOfMemory handles the rare out of memory exception case.
17992 * runtime/JSString.cpp:
17993 (JSC::JSString::resolveRope):
17994 (JSC::JSString::resolveRopeSlowCase):
17995 (JSC::JSString::outOfMemory):
17996 * runtime/JSString.h:
17998 2011-04-20 Adam Klein <adamk@chromium.org>
18000 Reviewed by David Levin.
18002 Rename all uses of JSC_MULTIPLE_THREADS under wtf/... to WTF_MULTIPLE_THREADS
18003 https://bugs.webkit.org/show_bug.cgi?id=59040
18005 This will be used to fix https://bugs.webkit.org/show_bug.cgi?id=55728
18006 by enabling WTF_MULTIPLE_THREADS for Chromium.
18008 * wtf/CryptographicallyRandomNumber.cpp:
18009 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
18010 (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
18011 * wtf/FastMalloc.cpp:
18013 Enable WTF_MULTIPLE_THREADS whenever JSC_MULTIPLE_THREADS is enabled.
18014 * wtf/RandomNumber.cpp:
18015 (WTF::randomNumber):
18016 * wtf/RefCountedLeakCounter.cpp:
18017 (WTF::RefCountedLeakCounter::increment):
18018 (WTF::RefCountedLeakCounter::decrement):
18022 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18024 Rubber stamped by Geoff Garen
18026 Bug 59069 - DFG JIT - register allocate r8, r9, r10
18028 * dfg/DFGJITCompiler.h:
18029 (JSC::DFG::JITCompiler::gprToRegisterID):
18031 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18033 Build fix - revert accidental change.
18037 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18039 Reviewed by Sam Weinig.
18041 Add SAMPLING_FLAGS tool to DFG JIT.
18043 * bytecode/SamplingTool.h:
18044 (JSC::SamplingFlags::addressOfFlags):
18045 * dfg/DFGJITCompiler.cpp:
18046 (JSC::DFG::JITCompiler::setSamplingFlag):
18047 (JSC::DFG::JITCompiler::clearSamplingFlag):
18048 * dfg/DFGJITCompiler.h:
18049 * jit/JITInlineMethods.h:
18050 (JSC::JIT::setSamplingFlag):
18051 (JSC::JIT::clearSamplingFlag):
18054 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18056 Reviewed by Oliver Hunt.
18058 Bug 59022 - DFG JIT - Optimize branch-on-relational-compare
18060 If a relational compare (< or <=) is immediately followed by a branch,
18061 we can combine the two, avoiding generation of a boolean into a register.
18063 * assembler/MacroAssemblerX86Common.h:
18064 (JSC::MacroAssemblerX86Common::branch32):
18065 (JSC::MacroAssemblerX86Common::invert):
18066 (JSC::MacroAssemblerX86Common::commute):
18068 (JSC::DFG::Node::adjustedRefCount):
18069 * dfg/DFGSpeculativeJIT.cpp:
18070 (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
18071 (JSC::DFG::SpeculativeJIT::compile):
18072 * dfg/DFGSpeculativeJIT.h:
18073 (JSC::DFG::SpeculativeJIT::isJSConstantWithInt32Value):
18074 (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
18076 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18078 ARMv7 build fix II.
18080 * jit/JITOpcodes32_64.cpp:
18081 (JSC::JIT::softModulo):
18083 2011-04-20 Gavin Barraclough <barraclough@apple.com>
18087 * assembler/MacroAssemblerARM.h:
18088 (JSC::MacroAssemblerARM::test8):
18090 2011-04-19 Gavin Barraclough <barraclough@apple.com>
18092 Reviewed by Oliver Hunt.
18094 Rationalize MacroAssembler branch methods
18095 https://bugs.webkit.org/show_bug.cgi?id=58950
18097 The MacroAssembler currently exposes x86's weird behaviour that the 'setcc'
18098 instruction only sets the low 8 bits of a register. Stop that.
18100 Having done so, to clarify remove the 'set32' prefix from test & compare
18101 instructions - these methods all now set a full 32/64 bit register (Ptr size).
18102 The size in the function name should indicate the amount of data being compared.
18104 Also split out the 'Condition' enum into 'RelationalCondition' and
18105 'ResultCondition'. The former is used in binary comparison, the latter is a unary
18106 condition check on the result of an operation.
18108 * JavaScriptCore.xcodeproj/project.pbxproj:
18109 * assembler/MacroAssembler.h:
18110 (JSC::MacroAssembler::branchPtr):
18111 (JSC::MacroAssembler::branch32):
18112 (JSC::MacroAssembler::branch16):
18113 (JSC::MacroAssembler::branchTestPtr):
18114 (JSC::MacroAssembler::comparePtr):
18115 (JSC::MacroAssembler::branchAddPtr):
18116 (JSC::MacroAssembler::branchSubPtr):
18117 (JSC::MacroAssembler::branchTest8):
18118 * assembler/MacroAssemblerARM.h:
18119 (JSC::MacroAssemblerARM::branch8):
18120 (JSC::MacroAssemblerARM::branch32):
18121 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
18122 (JSC::MacroAssemblerARM::branch16):
18123 (JSC::MacroAssemblerARM::branchTest8):
18124 (JSC::MacroAssemblerARM::branchTest32):
18125 (JSC::MacroAssemblerARM::branchAdd32):
18126 (JSC::MacroAssemblerARM::branchMul32):
18127 (JSC::MacroAssemblerARM::branchSub32):
18128 (JSC::MacroAssemblerARM::branchNeg32):
18129 (JSC::MacroAssemblerARM::branchOr32):
18130 (JSC::MacroAssemblerARM::compare32):
18131 (JSC::MacroAssemblerARM::test32):
18132 (JSC::MacroAssemblerARM::test8):
18133 (JSC::MacroAssemblerARM::branchPtrWithPatch):
18134 (JSC::MacroAssemblerARM::ARMCondition):
18135 * assembler/MacroAssemblerARMv7.h:
18136 (JSC::MacroAssemblerARMv7::branch32):
18137 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
18138 (JSC::MacroAssemblerARMv7::branch16):
18139 (JSC::MacroAssemblerARMv7::branch8):
18140 (JSC::MacroAssemblerARMv7::branchTest32):
18141 (JSC::MacroAssemblerARMv7::branchTest8):
18142 (JSC::MacroAssemblerARMv7::branchAdd32):
18143 (JSC::MacroAssemblerARMv7::branchMul32):
18144 (JSC::MacroAssemblerARMv7::branchOr32):
18145 (JSC::MacroAssemblerARMv7::branchSub32):
18146 (JSC::MacroAssemblerARMv7::compare32):
18147 (JSC::MacroAssemblerARMv7::test32):
18148 (JSC::MacroAssemblerARMv7::test8):
18149 (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
18150 (JSC::MacroAssemblerARMv7::makeBranch):
18151 (JSC::MacroAssemblerARMv7::armV7Condition):
18152 * assembler/MacroAssemblerMIPS.h:
18153 (JSC::MacroAssemblerMIPS::branch8):
18154 (JSC::MacroAssemblerMIPS::branch32):
18155 (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
18156 (JSC::MacroAssemblerMIPS::branch16):
18157 (JSC::MacroAssemblerMIPS::branchTest32):
18158 (JSC::MacroAssemblerMIPS::branchTest8):
18159 (JSC::MacroAssemblerMIPS::branchAdd32):
18160 (JSC::MacroAssemblerMIPS::branchMul32):
18161 (JSC::MacroAssemblerMIPS::branchSub32):
18162 (JSC::MacroAssemblerMIPS::branchOr32):
18163 (JSC::MacroAssemblerMIPS::compare32):
18164 (JSC::MacroAssemblerMIPS::test8):
18165 (JSC::MacroAssemblerMIPS::test32):
18166 (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
18167 * assembler/MacroAssemblerX86.h:
18168 (JSC::MacroAssemblerX86::branch32):
18169 (JSC::MacroAssemblerX86::branchPtrWithPatch):
18170 * assembler/MacroAssemblerX86Common.h:
18171 (JSC::MacroAssemblerX86Common::branch8):
18172 (JSC::MacroAssemblerX86Common::branch32):
18173 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
18174 (JSC::MacroAssemblerX86Common::branch16):
18175 (JSC::MacroAssemblerX86Common::branchTest32):
18176 (JSC::MacroAssemblerX86Common::branchTest8):
18177 (JSC::MacroAssemblerX86Common::branchAdd32):
18178 (JSC::MacroAssemblerX86Common::branchMul32):
18179 (JSC::MacroAssemblerX86Common::branchSub32):
18180 (JSC::MacroAssemblerX86Common::branchNeg32):
18181 (JSC::MacroAssemblerX86Common::branchOr32):
18182 (JSC::MacroAssemblerX86Common::compare32):
18183 (JSC::MacroAssemblerX86Common::test8):
18184 (JSC::MacroAssemblerX86Common::test32):
18185 (JSC::MacroAssemblerX86Common::x86Condition):
18186 * assembler/MacroAssemblerX86_64.h:
18187 (JSC::MacroAssemblerX86_64::comparePtr):
18188 (JSC::MacroAssemblerX86_64::branchPtr):
18189 (JSC::MacroAssemblerX86_64::branchTestPtr):
18190 (JSC::MacroAssemblerX86_64::branchAddPtr):
18191 (JSC::MacroAssemblerX86_64::branchSubPtr):
18192 (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
18193 (JSC::MacroAssemblerX86_64::branchTest8):
18194 * dfg/DFGSpeculativeJIT.cpp:
18195 (JSC::DFG::SpeculativeJIT::compile):
18196 * jit/JITOpcodes.cpp:
18197 (JSC::JIT::emit_op_eq):
18198 (JSC::JIT::emit_op_neq):
18199 (JSC::JIT::compileOpStrictEq):
18200 (JSC::JIT::emit_op_eq_null):
18201 (JSC::JIT::emit_op_neq_null):
18202 * jit/JITOpcodes32_64.cpp:
18203 (JSC::JIT::emit_op_eq):
18204 (JSC::JIT::emit_op_neq):
18205 (JSC::JIT::compileOpStrictEq):
18206 (JSC::JIT::emit_op_eq_null):
18207 (JSC::JIT::emit_op_neq_null):
18209 2011-04-20 Balazs Kelemen <kbalazs@webkit.org>
18211 Reviewed by Csaba Osztrogonác.
18213 [Qt] Cleanup includepath adjustment for generated files
18214 https://bugs.webkit.org/show_bug.cgi?id=58869
18216 * JavaScriptCore.pri: Add the directory of generated files to the include
18217 path with absolute path to make it valid in the final build step.
18219 2011-04-19 Oliver Hunt <oliver@apple.com>
18221 Reviewed by Gavin Barraclough.
18223 Remove unneeded deprecated methods from MarkStack
18224 https://bugs.webkit.org/show_bug.cgi?id=58853
18226 Remove deprecated methods
18228 * heap/MarkStack.h:
18230 2011-04-19 Mark Rowe <mrowe@apple.com>
18232 Things work best when the Xcode project refers to the file at a path that exists.
18234 * JavaScriptCore.xcodeproj/project.pbxproj:
18236 2011-04-19 Renata Hodovan <reni@webkit.org>
18238 Reviewed by Eric Seidel.
18240 Move the alignment related macros in Vector.h to new Alignment.h.
18241 https://bugs.webkit.org/show_bug.cgi?id=56000
18243 * JavaScriptCore.gypi:
18244 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
18245 * JavaScriptCore.xcodeproj/project.pbxproj:
18246 * wtf/Alignment.h: Added.
18247 * wtf/CMakeLists.txt:
18250 2011-04-19 Oliver Hunt <oliver@apple.com>
18252 Reviewed by Gavin Barraclough.
18254 Remove DeprecatedPtr
18255 https://bugs.webkit.org/show_bug.cgi?id=58718
18257 Remove the class an all functions that still exist to support it.
18259 * heap/MarkStack.h:
18260 (JSC::MarkStack::append):
18261 * runtime/JSValue.h:
18262 * runtime/WriteBarrier.h:
18264 2011-04-19 Jungshik Shin <jshin@chromium.org>
18266 Reviewed by David Levin
18268 Add U+FEFF (Zero width no-break space) to CharacterNames.h.
18269 It's added to the list of characters to treat as zero-width
18272 https://bugs.webkit.org/show_bug.cgi?id=48860
18274 * wtf/unicode/CharacterNames.h:
18276 2011-04-19 Csaba Osztrogonác <ossy@webkit.org>
18278 [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
18279 https://bugs.webkit.org/show_bug.cgi?id=58871
18281 Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
18282 http://trac.webkit.org/changeset/84176 (original patch)
18283 http://trac.webkit.org/changeset/84178 (original patch - part 2)
18284 http://trac.webkit.org/changeset/84186 (build fix)
18285 http://trac.webkit.org/changeset/84212
18286 http://trac.webkit.org/changeset/84231 (skip failing test)
18289 - https://bugs.webkit.org/show_bug.cgi?id=58718
18290 - https://bugs.webkit.org/show_bug.cgi?id=58853
18292 * heap/MarkStack.h:
18293 (JSC::MarkStack::deprecatedAppendValues):
18294 (JSC::MarkStack::append):
18295 (JSC::MarkStack::deprecatedAppend):
18296 * runtime/JSValue.h:
18297 * runtime/WriteBarrier.h:
18298 (JSC::DeprecatedPtr::DeprecatedPtr):
18299 (JSC::DeprecatedPtr::get):
18300 (JSC::DeprecatedPtr::operator*):
18301 (JSC::DeprecatedPtr::operator->):
18302 (JSC::DeprecatedPtr::slot):
18303 (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
18304 (JSC::DeprecatedPtr::operator!):
18307 2011-04-18 Oliver Hunt <oliver@apple.com>
18309 Reviewed by Gavin Barraclough.
18311 Remove unneeded deprecated methods from MarkStack
18312 https://bugs.webkit.org/show_bug.cgi?id=58853
18314 Remove deprecated methods
18316 * heap/MarkStack.h:
18318 2011-04-18 Oliver Hunt <oliver@apple.com>
18320 Reviewed by Adam Roben.
18322 Off by one initialising repeat callframe
18323 https://bugs.webkit.org/show_bug.cgi?id=58838
18324 <rdar://problem/8756810>
18326 If the end of a callframe made for a repeat call landed on
18327 a page boundary the following page may not have been committed
18328 which means that the off by one could lead to a crash. However
18329 it could only happen in this case and only on windows which is
18330 why it was so hard to repro. Alas given the steps needed to
18331 reproduce are such that it's not really possible to make a
18334 This fix makes the code a little less squirrely by not trying
18335 to avoid the unnecessary initialisation of |this|.
18337 * interpreter/Interpreter.cpp:
18338 (JSC::Interpreter::prepareForRepeatCall):
18340 2011-04-18 Gavin Barraclough <barraclough@apple.com>
18342 Reviewed by Geoff Garen.
18344 Bug 58829 - DFG JIT - Optimize add/sub immediate, multiply.
18346 Add code generation for add/subtract instruction with immediate operands
18347 (where a child is a constant), and don't bail to non-speculative if an
18348 integer multiple results in a +0 result (only if it should be generating -0).
18350 * dfg/DFGSpeculativeJIT.cpp:
18351 (JSC::DFG::SpeculativeJIT::compile):
18352 * dfg/DFGSpeculativeJIT.h:
18353 (JSC::DFG::SpeculativeJIT::isDoubleConstantWithInt32Value):
18355 2011-04-18 Gavin Barraclough <barraclough@apple.com>
18357 Reviewed by Geoff Garen.
18359 Bug 58817 - DFG JIT - if speculative compilation fails, throw away code.
18361 If we detect a logical conflict, throw away generated code,
18362 and only compile through the NonSpeculativeJIT.
18364 * assembler/AbstractMacroAssembler.h:
18365 (JSC::AbstractMacroAssembler::rewindToLabel):
18366 * assembler/AssemblerBuffer.h:
18367 (JSC::AssemblerBuffer::rewindToOffset):
18368 * assembler/MacroAssemblerX86Common.h:
18369 (JSC::MacroAssemblerX86Common::branchAdd32):
18370 (JSC::MacroAssemblerX86Common::branchSub32):
18371 * assembler/X86Assembler.h:
18372 (JSC::X86Assembler::rewindToLabel):
18373 (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
18374 * dfg/DFGJITCompiler.cpp:
18375 (JSC::DFG::JITCompiler::linkSpeculationChecks):
18376 (JSC::DFG::JITCompiler::compileFunction):
18378 * dfg/DFGNonSpeculativeJIT.cpp:
18379 (JSC::DFG::NonSpeculativeJIT::compile):
18380 * dfg/DFGSpeculativeJIT.cpp:
18381 (JSC::DFG::SpeculativeJIT::compile):
18382 * dfg/DFGSpeculativeJIT.h:
18383 (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
18385 2011-04-18 Oliver Hunt <oliver@apple.com>
18387 Reviewed by Gavin Barraclough.
18389 Remove DeprecatedPtr
18390 https://bugs.webkit.org/show_bug.cgi?id=58718
18392 As simple as it sounds.
18394 * runtime/JSValue.h:
18395 * runtime/WriteBarrier.h:
18397 2011-04-17 Cameron Zwarich <zwarich@apple.com>
18399 Reviewed by Dan Bernstein.
18401 JSC no longer builds with Clang due to -Woverloaded-virtual warning
18402 https://bugs.webkit.org/show_bug.cgi?id=58760
18404 Rename Structure's specificValue overload of put to putSpecificValue to avoid
18405 Clang's warning for overloading a virtual function.
18407 * runtime/Structure.cpp:
18408 (JSC::Structure::addPropertyTransition):
18409 (JSC::Structure::addPropertyWithoutTransition):
18410 (JSC::Structure::putSpecificValue):
18411 * runtime/Structure.h:
18413 2011-04-17 Patrick Gansterer <paroga@webkit.org>
18415 Reviewed by Adam Barth.
18417 Remove WTF_PLATFORM_SGL
18418 https://bugs.webkit.org/show_bug.cgi?id=58743
18420 WTF_PLATFORM_SGL and PLATFORM(SGL) are not used in the code anywhere.
18424 2011-04-17 Patrick Gansterer <paroga@webkit.org>
18426 Reviewed by Adam Barth.
18428 Rename PLATFORM(CA) to USE(CA)
18429 https://bugs.webkit.org/show_bug.cgi?id=58742
18433 2011-04-17 Patrick Gansterer <paroga@webkit.org>
18435 Reviewed by Adam Barth.
18437 Rename PLATFORM(CG) to USE(CG)
18438 https://bugs.webkit.org/show_bug.cgi?id=58729
18442 2011-04-16 Patrick Gansterer <paroga@webkit.org>
18444 Reviewed by Eric Seidel.
18446 Rename PLATFORM(CAIRO) to USE(CAIRO)
18447 https://bugs.webkit.org/show_bug.cgi?id=55192
18450 * wtf/gobject/GTypedefs.h:
18452 2011-04-15 Sheriff Bot <webkit.review.bot@gmail.com>
18454 Unreviewed, rolling out r84067.
18455 http://trac.webkit.org/changeset/84067
18456 https://bugs.webkit.org/show_bug.cgi?id=58724
18458 qt build are failing. (Requested by loislo2 on #webkit).
18460 * heap/MarkStack.h:
18461 (JSC::MarkStack::append):
18462 * runtime/JSValue.h:
18463 * runtime/WriteBarrier.h:
18464 (JSC::DeprecatedPtr::DeprecatedPtr):
18465 (JSC::DeprecatedPtr::get):
18466 (JSC::DeprecatedPtr::operator*):
18467 (JSC::DeprecatedPtr::operator->):
18468 (JSC::DeprecatedPtr::slot):
18469 (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
18470 (JSC::DeprecatedPtr::operator!):
18473 2011-04-15 Shishir Agrawal <shishir@chromium.org>
18475 Reviewed by James Robinson.
18477 Add a flag to guard Page Visibility API changes.
18478 https://bugs.webkit.org/show_bug.cgi?id=58464
18480 * Configurations/FeatureDefines.xcconfig:
18482 2011-04-15 Gavin Barraclough <barraclough@apple.com>
18484 Errrk! - build fix from !x86-64.
18488 2011-04-15 David Levin <levin@chromium.org>
18492 JavaScriptCore shouldn't depend on ../ThirdParty/gtest/xcode/gtest.xcodeproj
18493 https://bugs.webkit.org/show_bug.cgi?id=58716
18495 * JavaScriptCore.xcodeproj/project.pbxproj:
18496 * wtf/tests/RunAllWtfTests.cpp: Removed.
18497 * wtf/tests/StringTests.cpp: Removed.
18499 2011-04-15 Oliver Hunt <oliver@apple.com>
18501 Reviewed by Gavin Barraclough.
18503 Remove DeprecatedPtr
18504 https://bugs.webkit.org/show_bug.cgi?id=58718
18506 As simple as it sounds.
18508 * heap/MarkStack.h:
18509 (JSC::MarkStack::append):
18510 * runtime/JSValue.h:
18511 * runtime/WriteBarrier.h:
18513 2011-04-15 Gavin Barraclough <barraclough@apple.com>
18515 Reviewed by Oliver Hunt.
18517 Add a simple tool to gather statistics on whether functions
18518 are completed through the new or old JIT.
18521 * dfg/DFGNonSpeculativeJIT.cpp:
18522 (JSC::DFG::NonSpeculativeJIT::compile):
18523 * dfg/DFGSpeculativeJIT.cpp:
18524 (JSC::DFG::SpeculativeJIT::compile):
18526 (JSC::JIT::privateCompile):
18528 2011-04-15 Oliver Hunt <oliver@apple.com>
18530 GC allocate Structure
18531 https://bugs.webkit.org/show_bug.cgi?id=58483
18533 Rolling r83894 r83827 r83810 r83809 r83808 back in with
18534 a workaround for the gcc bug seen by the gtk bots
18536 * API/JSCallbackConstructor.cpp:
18537 (JSC::JSCallbackConstructor::JSCallbackConstructor):
18538 * API/JSCallbackConstructor.h:
18539 (JSC::JSCallbackConstructor::createStructure):
18540 * API/JSCallbackFunction.h:
18541 (JSC::JSCallbackFunction::createStructure):
18542 * API/JSCallbackObject.h:
18543 (JSC::JSCallbackObject::createStructure):
18544 * API/JSCallbackObjectFunctions.h:
18545 (JSC::::JSCallbackObject):
18546 * API/JSContextRef.cpp:
18547 * JavaScriptCore.JSVALUE32_64only.exp:
18548 * JavaScriptCore.JSVALUE64only.exp:
18549 * JavaScriptCore.exp:
18550 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18551 * bytecode/CodeBlock.cpp:
18552 (JSC::CodeBlock::~CodeBlock):
18553 (JSC::CodeBlock::markStructures):
18554 (JSC::CodeBlock::markAggregate):
18555 * bytecode/CodeBlock.h:
18556 (JSC::MethodCallLinkInfo::setSeen):
18557 (JSC::GlobalResolveInfo::GlobalResolveInfo):
18558 * bytecode/Instruction.h:
18559 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
18560 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
18561 (JSC::PolymorphicAccessStructureList::markAggregate):
18562 (JSC::Instruction::Instruction):
18563 * bytecode/StructureStubInfo.cpp:
18564 (JSC::StructureStubInfo::deref):
18565 (JSC::StructureStubInfo::markAggregate):
18566 * bytecode/StructureStubInfo.h:
18567 (JSC::StructureStubInfo::initGetByIdSelf):
18568 (JSC::StructureStubInfo::initGetByIdProto):
18569 (JSC::StructureStubInfo::initGetByIdChain):
18570 (JSC::StructureStubInfo::initPutByIdTransition):
18571 (JSC::StructureStubInfo::initPutByIdReplace):
18572 * debugger/DebuggerActivation.cpp:
18573 (JSC::DebuggerActivation::DebuggerActivation):
18574 * debugger/DebuggerActivation.h:
18575 (JSC::DebuggerActivation::createStructure):
18577 * heap/MarkStack.cpp:
18578 (JSC::MarkStack::markChildren):
18579 (JSC::MarkStack::drain):
18580 * heap/MarkedBlock.cpp:
18581 (JSC::MarkedBlock::MarkedBlock):
18582 (JSC::MarkedBlock::sweep):
18584 (JSC::Strong::Strong):
18585 (JSC::Strong::set):
18586 * interpreter/Interpreter.cpp:
18587 (JSC::Interpreter::resolveGlobal):
18588 (JSC::Interpreter::resolveGlobalDynamic):
18589 (JSC::Interpreter::tryCachePutByID):
18590 (JSC::Interpreter::uncachePutByID):
18591 (JSC::Interpreter::tryCacheGetByID):
18592 (JSC::Interpreter::uncacheGetByID):
18593 (JSC::Interpreter::privateExecute):
18595 * jit/JITPropertyAccess.cpp:
18596 (JSC::JIT::privateCompilePutByIdTransition):
18597 (JSC::JIT::patchMethodCallProto):
18598 (JSC::JIT::privateCompileGetByIdProto):
18599 (JSC::JIT::privateCompileGetByIdSelfList):
18600 (JSC::JIT::privateCompileGetByIdProtoList):
18601 (JSC::JIT::privateCompileGetByIdChainList):
18602 (JSC::JIT::privateCompileGetByIdChain):
18603 * jit/JITPropertyAccess32_64.cpp:
18604 (JSC::JIT::privateCompilePutByIdTransition):
18605 (JSC::JIT::patchMethodCallProto):
18606 (JSC::JIT::privateCompileGetByIdProto):
18607 (JSC::JIT::privateCompileGetByIdSelfList):
18608 (JSC::JIT::privateCompileGetByIdProtoList):
18609 (JSC::JIT::privateCompileGetByIdChainList):
18610 (JSC::JIT::privateCompileGetByIdChain):
18611 * jit/JITStubs.cpp:
18612 (JSC::JITThunks::tryCachePutByID):
18613 (JSC::JITThunks::tryCacheGetByID):
18614 (JSC::DEFINE_STUB_FUNCTION):
18615 (JSC::getPolymorphicAccessStructureListSlot):
18616 * jit/JSInterfaceJIT.h:
18617 (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
18619 (cleanupGlobalData):
18620 * runtime/Arguments.h:
18621 (JSC::Arguments::createStructure):
18622 (JSC::Arguments::Arguments):
18623 (JSC::JSActivation::copyRegisters):
18624 * runtime/ArrayConstructor.cpp:
18625 (JSC::ArrayConstructor::ArrayConstructor):
18626 (JSC::constructArrayWithSizeQuirk):
18627 * runtime/ArrayConstructor.h:
18628 * runtime/ArrayPrototype.cpp:
18629 (JSC::ArrayPrototype::ArrayPrototype):
18630 (JSC::arrayProtoFuncSplice):
18631 * runtime/ArrayPrototype.h:
18632 (JSC::ArrayPrototype::createStructure):
18633 * runtime/BatchedTransitionOptimizer.h:
18634 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
18635 * runtime/BooleanConstructor.cpp:
18636 (JSC::BooleanConstructor::BooleanConstructor):
18637 * runtime/BooleanConstructor.h:
18638 * runtime/BooleanObject.cpp:
18639 (JSC::BooleanObject::BooleanObject):
18640 * runtime/BooleanObject.h:
18641 (JSC::BooleanObject::createStructure):
18642 * runtime/BooleanPrototype.cpp:
18643 (JSC::BooleanPrototype::BooleanPrototype):
18644 * runtime/BooleanPrototype.h:
18645 * runtime/DateConstructor.cpp:
18646 (JSC::DateConstructor::DateConstructor):
18647 * runtime/DateConstructor.h:
18648 * runtime/DateInstance.cpp:
18649 (JSC::DateInstance::DateInstance):
18650 * runtime/DateInstance.h:
18651 (JSC::DateInstance::createStructure):
18652 * runtime/DatePrototype.cpp:
18653 (JSC::DatePrototype::DatePrototype):
18654 * runtime/DatePrototype.h:
18655 (JSC::DatePrototype::createStructure):
18656 * runtime/Error.cpp:
18657 (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
18658 * runtime/ErrorConstructor.cpp:
18659 (JSC::ErrorConstructor::ErrorConstructor):
18660 * runtime/ErrorConstructor.h:
18661 * runtime/ErrorInstance.cpp:
18662 (JSC::ErrorInstance::ErrorInstance):
18663 (JSC::ErrorInstance::create):
18664 * runtime/ErrorInstance.h:
18665 (JSC::ErrorInstance::createStructure):
18666 * runtime/ErrorPrototype.cpp:
18667 (JSC::ErrorPrototype::ErrorPrototype):
18668 * runtime/ErrorPrototype.h:
18669 * runtime/ExceptionHelpers.cpp:
18670 (JSC::InterruptedExecutionError::InterruptedExecutionError):
18671 (JSC::TerminatedExecutionError::TerminatedExecutionError):
18672 * runtime/Executable.cpp:
18673 * runtime/Executable.h:
18674 (JSC::ExecutableBase::ExecutableBase):
18675 (JSC::ExecutableBase::createStructure):
18676 (JSC::NativeExecutable::createStructure):
18677 (JSC::NativeExecutable::NativeExecutable):
18678 (JSC::ScriptExecutable::ScriptExecutable):
18679 (JSC::EvalExecutable::createStructure):
18680 (JSC::ProgramExecutable::createStructure):
18681 (JSC::FunctionExecutable::createStructure):
18682 * runtime/FunctionConstructor.cpp:
18683 (JSC::FunctionConstructor::FunctionConstructor):
18684 * runtime/FunctionConstructor.h:
18685 * runtime/FunctionPrototype.cpp:
18686 (JSC::FunctionPrototype::FunctionPrototype):
18687 * runtime/FunctionPrototype.h:
18688 (JSC::FunctionPrototype::createStructure):
18689 * runtime/GetterSetter.h:
18690 (JSC::GetterSetter::GetterSetter):
18691 (JSC::GetterSetter::createStructure):
18692 * runtime/InitializeThreading.cpp:
18693 (JSC::initializeThreadingOnce):
18694 * runtime/InternalFunction.cpp:
18695 (JSC::InternalFunction::InternalFunction):
18696 * runtime/InternalFunction.h:
18697 (JSC::InternalFunction::createStructure):
18698 * runtime/JSAPIValueWrapper.h:
18699 (JSC::JSAPIValueWrapper::createStructure):
18700 (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
18701 * runtime/JSActivation.cpp:
18702 (JSC::JSActivation::JSActivation):
18703 * runtime/JSActivation.h:
18704 (JSC::JSActivation::createStructure):
18705 * runtime/JSArray.cpp:
18706 (JSC::JSArray::JSArray):
18707 * runtime/JSArray.h:
18708 (JSC::JSArray::createStructure):
18709 * runtime/JSByteArray.cpp:
18710 (JSC::JSByteArray::JSByteArray):
18711 (JSC::JSByteArray::createStructure):
18712 * runtime/JSByteArray.h:
18713 (JSC::JSByteArray::JSByteArray):
18714 * runtime/JSCell.cpp:
18716 * runtime/JSCell.h:
18717 (JSC::JSCell::JSCell::JSCell):
18718 (JSC::JSCell::JSCell::addressOfStructure):
18719 (JSC::JSCell::JSCell::structure):
18720 (JSC::JSCell::JSCell::markChildren):
18721 (JSC::JSCell::JSValue::isZombie):
18722 * runtime/JSFunction.cpp:
18723 (JSC::JSFunction::JSFunction):
18724 * runtime/JSFunction.h:
18725 (JSC::JSFunction::createStructure):
18726 * runtime/JSGlobalData.cpp:
18727 (JSC::JSGlobalData::storeVPtrs):
18728 (JSC::JSGlobalData::JSGlobalData):
18729 (JSC::JSGlobalData::clearBuiltinStructures):
18730 (JSC::JSGlobalData::createLeaked):
18731 * runtime/JSGlobalData.h:
18732 (JSC::allocateGlobalHandle):
18733 * runtime/JSGlobalObject.cpp:
18734 (JSC::JSGlobalObject::reset):
18735 (JSC::JSGlobalObject::markChildren):
18736 (JSC::JSGlobalObject::copyGlobalsFrom):
18737 * runtime/JSGlobalObject.h:
18738 (JSC::JSGlobalObject::JSGlobalObject):
18739 (JSC::JSGlobalObject::createStructure):
18740 (JSC::Structure::prototypeChain):
18741 (JSC::Structure::isValid):
18742 (JSC::constructEmptyArray):
18743 * runtime/JSNotAnObject.h:
18744 (JSC::JSNotAnObject::JSNotAnObject):
18745 (JSC::JSNotAnObject::createStructure):
18746 * runtime/JSONObject.cpp:
18747 (JSC::JSONObject::JSONObject):
18748 * runtime/JSONObject.h:
18749 (JSC::JSONObject::createStructure):
18750 * runtime/JSObject.cpp:
18751 (JSC::JSObject::defineGetter):
18752 (JSC::JSObject::defineSetter):
18753 (JSC::JSObject::seal):
18754 (JSC::JSObject::freeze):
18755 (JSC::JSObject::preventExtensions):
18756 (JSC::JSObject::removeDirect):
18757 (JSC::JSObject::createInheritorID):
18758 * runtime/JSObject.h:
18759 (JSC::JSObject::createStructure):
18760 (JSC::JSObject::JSObject):
18761 (JSC::JSNonFinalObject::createStructure):
18762 (JSC::JSNonFinalObject::JSNonFinalObject):
18763 (JSC::JSFinalObject::create):
18764 (JSC::JSFinalObject::createStructure):
18765 (JSC::JSFinalObject::JSFinalObject):
18766 (JSC::constructEmptyObject):
18767 (JSC::createEmptyObjectStructure):
18768 (JSC::JSObject::~JSObject):
18769 (JSC::JSObject::setPrototype):
18770 (JSC::JSObject::setStructure):
18771 (JSC::JSObject::inheritorID):
18772 (JSC::JSObject::putDirectInternal):
18773 (JSC::JSObject::transitionTo):
18774 (JSC::JSObject::markChildrenDirect):
18775 * runtime/JSObjectWithGlobalObject.cpp:
18776 (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
18777 * runtime/JSObjectWithGlobalObject.h:
18778 (JSC::JSObjectWithGlobalObject::createStructure):
18779 (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
18780 * runtime/JSPropertyNameIterator.cpp:
18781 (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
18782 (JSC::JSPropertyNameIterator::create):
18783 (JSC::JSPropertyNameIterator::get):
18784 * runtime/JSPropertyNameIterator.h:
18785 (JSC::JSPropertyNameIterator::createStructure):
18786 (JSC::JSPropertyNameIterator::setCachedStructure):
18787 (JSC::Structure::setEnumerationCache):
18788 * runtime/JSStaticScopeObject.h:
18789 (JSC::JSStaticScopeObject::JSStaticScopeObject):
18790 (JSC::JSStaticScopeObject::createStructure):
18791 * runtime/JSString.h:
18792 (JSC::RopeBuilder::JSString):
18793 (JSC::RopeBuilder::createStructure):
18794 * runtime/JSType.h:
18795 * runtime/JSTypeInfo.h:
18796 (JSC::TypeInfo::TypeInfo):
18797 * runtime/JSValue.h:
18798 * runtime/JSVariableObject.h:
18799 (JSC::JSVariableObject::createStructure):
18800 (JSC::JSVariableObject::JSVariableObject):
18801 (JSC::JSVariableObject::copyRegisterArray):
18802 * runtime/JSWrapperObject.h:
18803 (JSC::JSWrapperObject::createStructure):
18804 (JSC::JSWrapperObject::JSWrapperObject):
18805 * runtime/JSZombie.cpp:
18806 * runtime/JSZombie.h:
18807 (JSC::JSZombie::JSZombie):
18808 (JSC::JSZombie::createStructure):
18809 * runtime/MathObject.cpp:
18810 (JSC::MathObject::MathObject):
18811 * runtime/MathObject.h:
18812 (JSC::MathObject::createStructure):
18813 * runtime/NativeErrorConstructor.cpp:
18814 (JSC::NativeErrorConstructor::NativeErrorConstructor):
18815 (JSC::NativeErrorConstructor::markChildren):
18816 (JSC::constructWithNativeErrorConstructor):
18817 * runtime/NativeErrorConstructor.h:
18818 (JSC::NativeErrorConstructor::createStructure):
18819 * runtime/NativeErrorPrototype.cpp:
18820 (JSC::NativeErrorPrototype::NativeErrorPrototype):
18821 * runtime/NativeErrorPrototype.h:
18822 * runtime/NumberConstructor.cpp:
18823 (JSC::NumberConstructor::NumberConstructor):
18824 * runtime/NumberConstructor.h:
18825 (JSC::NumberConstructor::createStructure):
18826 * runtime/NumberObject.cpp:
18827 (JSC::NumberObject::NumberObject):
18828 * runtime/NumberObject.h:
18829 (JSC::NumberObject::createStructure):
18830 * runtime/NumberPrototype.cpp:
18831 (JSC::NumberPrototype::NumberPrototype):
18832 * runtime/NumberPrototype.h:
18833 * runtime/ObjectConstructor.cpp:
18834 (JSC::ObjectConstructor::ObjectConstructor):
18835 * runtime/ObjectConstructor.h:
18836 (JSC::ObjectConstructor::createStructure):
18837 * runtime/ObjectPrototype.cpp:
18838 (JSC::ObjectPrototype::ObjectPrototype):
18839 * runtime/ObjectPrototype.h:
18840 * runtime/PropertyMapHashTable.h:
18841 (JSC::PropertyTable::PropertyTable):
18842 * runtime/RegExpConstructor.cpp:
18843 (JSC::RegExpConstructor::RegExpConstructor):
18844 (JSC::RegExpMatchesArray::RegExpMatchesArray):
18845 * runtime/RegExpConstructor.h:
18846 (JSC::RegExpConstructor::createStructure):
18847 * runtime/RegExpObject.cpp:
18848 (JSC::RegExpObject::RegExpObject):
18849 * runtime/RegExpObject.h:
18850 (JSC::RegExpObject::createStructure):
18851 * runtime/RegExpPrototype.cpp:
18852 (JSC::RegExpPrototype::RegExpPrototype):
18853 * runtime/RegExpPrototype.h:
18854 * runtime/ScopeChain.h:
18855 (JSC::ScopeChainNode::ScopeChainNode):
18856 (JSC::ScopeChainNode::createStructure):
18857 * runtime/StrictEvalActivation.cpp:
18858 (JSC::StrictEvalActivation::StrictEvalActivation):
18859 * runtime/StringConstructor.cpp:
18860 (JSC::StringConstructor::StringConstructor):
18861 * runtime/StringConstructor.h:
18862 * runtime/StringObject.cpp:
18863 (JSC::StringObject::StringObject):
18864 * runtime/StringObject.h:
18865 (JSC::StringObject::createStructure):
18866 * runtime/StringObjectThatMasqueradesAsUndefined.h:
18867 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
18868 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
18869 * runtime/StringPrototype.cpp:
18870 (JSC::StringPrototype::StringPrototype):
18871 * runtime/StringPrototype.h:
18872 (JSC::StringPrototype::createStructure):
18873 * runtime/Structure.cpp:
18874 (JSC::StructureTransitionTable::remove):
18875 (JSC::StructureTransitionTable::add):
18876 (JSC::Structure::Structure):
18877 (JSC::Structure::~Structure):
18878 (JSC::Structure::materializePropertyMap):
18879 (JSC::Structure::addPropertyTransitionToExistingStructure):
18880 (JSC::Structure::addPropertyTransition):
18881 (JSC::Structure::removePropertyTransition):
18882 (JSC::Structure::changePrototypeTransition):
18883 (JSC::Structure::despecifyFunctionTransition):
18884 (JSC::Structure::getterSetterTransition):
18885 (JSC::Structure::toDictionaryTransition):
18886 (JSC::Structure::toCacheableDictionaryTransition):
18887 (JSC::Structure::toUncacheableDictionaryTransition):
18888 (JSC::Structure::sealTransition):
18889 (JSC::Structure::freezeTransition):
18890 (JSC::Structure::preventExtensionsTransition):
18891 (JSC::Structure::flattenDictionaryStructure):
18892 (JSC::Structure::copyPropertyTable):
18893 (JSC::Structure::put):
18894 (JSC::Structure::markChildren):
18895 * runtime/Structure.h:
18896 (JSC::Structure::create):
18897 (JSC::Structure::setPrototypeWithoutTransition):
18898 (JSC::Structure::createStructure):
18899 (JSC::JSCell::createDummyStructure):
18900 (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer):
18901 * runtime/StructureChain.cpp:
18902 (JSC::StructureChain::StructureChain):
18903 (JSC::StructureChain::markChildren):
18904 * runtime/StructureChain.h:
18905 (JSC::StructureChain::create):
18906 (JSC::StructureChain::head):
18907 (JSC::StructureChain::createStructure):
18908 * runtime/StructureTransitionTable.h:
18909 (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
18910 (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
18911 (JSC::StructureTransitionTable::~StructureTransitionTable):
18912 (JSC::StructureTransitionTable::slot):
18913 (JSC::StructureTransitionTable::setMap):
18914 (JSC::StructureTransitionTable::singleTransition):
18915 (JSC::StructureTransitionTable::clearSingleTransition):
18916 (JSC::StructureTransitionTable::setSingleTransition):
18917 * runtime/WeakGCMap.h:
18918 (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
18919 (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
18920 (JSC::WeakGCMap::contains):
18921 (JSC::WeakGCMap::find):
18922 (JSC::WeakGCMap::remove):
18923 (JSC::WeakGCMap::add):
18924 (JSC::WeakGCMap::set):
18925 (JSC::WeakGCMap::finalize):
18926 * runtime/WriteBarrier.h:
18927 (JSC::writeBarrier):
18928 (JSC::WriteBarrierBase::set):
18929 (JSC::WriteBarrierBase::operator*):
18930 (JSC::WriteBarrierBase::operator->):
18931 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
18933 2011-04-15 Fridrich Strba <fridrich.strba@bluewin.ch>
18935 Reviewed by Gavin Barraclough.
18937 Correctly prefix symbols. Since gcc 4.5.0, Windows x64 symbols
18938 are not prefixed by underscore anymore. This is consistent with
18940 https://bugs.webkit.org/show_bug.cgi?id=58573
18942 * jit/JITStubs.cpp:
18944 2011-04-15 Gavin Barraclough <barraclough@apple.com>
18946 Reviewed by Geoff Garen.
18948 Bug 58705 - DFG JIT Add support for flow control (branch, jump).
18950 Add support for control flow by breaking the CodeBlock up into multiple
18951 basic blocks, generating code for each basic block in turn through the
18952 speculative JIT & then the non-speculative JIT.
18954 * dfg/DFGByteCodeParser.cpp:
18955 (JSC::DFG::ByteCodeParser::setTemporary):
18956 (JSC::DFG::ByteCodeParser::addToGraph):
18957 (JSC::DFG::ByteCodeParser::parseBlock):
18958 (JSC::DFG::ByteCodeParser::parse):
18959 * dfg/DFGGraph.cpp:
18960 (JSC::DFG::Graph::dump):
18962 (JSC::DFG::BasicBlock::BasicBlock):
18963 (JSC::DFG::BasicBlock::getBytecodeOffset):
18964 (JSC::DFG::Graph::blockIndexForBytecodeOffset):
18965 * dfg/DFGJITCodeGenerator.h:
18966 (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
18967 (JSC::DFG::JITCodeGenerator::addBranch):
18968 (JSC::DFG::JITCodeGenerator::linkBranches):
18969 (JSC::DFG::JITCodeGenerator::BranchRecord::BranchRecord):
18971 (JSC::DFG::Node::Node):
18972 (JSC::DFG::Node::isJump):
18973 (JSC::DFG::Node::isBranch):
18974 (JSC::DFG::Node::takenBytecodeOffset):
18975 (JSC::DFG::Node::notTakenBytecodeOffset):
18976 * dfg/DFGNonSpeculativeJIT.cpp:
18977 (JSC::DFG::NonSpeculativeJIT::compile):
18978 * dfg/DFGNonSpeculativeJIT.h:
18979 * dfg/DFGSpeculativeJIT.cpp:
18980 (JSC::DFG::SpeculativeJIT::compile):
18981 * dfg/DFGSpeculativeJIT.h:
18983 2011-04-15 Gavin Barraclough <barraclough@apple.com>
18985 Reviewed by Geoff Garen.
18987 Bug 58701 - DFG JIT - add GetLocal/SetLocal nodes
18989 Use these for both access to arguments & local variables, adds ability
18990 to set locals, such that values will persist between basic blocks.
18992 * dfg/DFGByteCodeParser.cpp:
18993 (JSC::DFG::ByteCodeParser::ByteCodeParser):
18994 (JSC::DFG::ByteCodeParser::get):
18995 (JSC::DFG::ByteCodeParser::set):
18996 (JSC::DFG::ByteCodeParser::getVariable):
18997 (JSC::DFG::ByteCodeParser::setVariable):
18998 (JSC::DFG::ByteCodeParser::getArgument):
18999 (JSC::DFG::ByteCodeParser::setArgument):
19000 (JSC::DFG::ByteCodeParser::getThis):
19001 (JSC::DFG::ByteCodeParser::setThis):
19002 (JSC::DFG::ByteCodeParser::VariableRecord::VariableRecord):
19003 (JSC::DFG::ByteCodeParser::parseBlock):
19004 * dfg/DFGGraph.cpp:
19005 (JSC::DFG::Graph::dump):
19006 (JSC::DFG::Graph::derefChildren):
19008 (JSC::DFG::Graph::ref):
19009 (JSC::DFG::Graph::deref):
19011 (JSC::DFG::Node::hasLocal):
19012 (JSC::DFG::Node::local):
19013 * dfg/DFGNonSpeculativeJIT.cpp:
19014 (JSC::DFG::NonSpeculativeJIT::compile):
19015 * dfg/DFGSpeculativeJIT.cpp:
19016 (JSC::DFG::SpeculativeJIT::compile):
19018 2011-04-15 Gavin Barraclough <barraclough@apple.com>
19020 Reviewed by Sam Weinig.
19022 Bug 58696 - DFG JIT split handling of vars/temporaries
19024 Presently all callee registers are treated as having single block scope,
19025 since the DFG JIT can only compile single block functions. In order to
19026 expand the JIT to support control flow we will need to change to retaining
19027 locals (but not temporaries) across basic block boundaries.
19029 * dfg/DFGByteCodeParser.cpp:
19030 (JSC::DFG::ByteCodeParser::ByteCodeParser):
19031 (JSC::DFG::ByteCodeParser::get):
19032 (JSC::DFG::ByteCodeParser::set):
19033 (JSC::DFG::ByteCodeParser::getVariable):
19034 (JSC::DFG::ByteCodeParser::setVariable):
19035 (JSC::DFG::ByteCodeParser::getTemporary):
19036 (JSC::DFG::ByteCodeParser::setTemporary):
19037 (JSC::DFG::ByteCodeParser::getArgument):
19038 (JSC::DFG::ByteCodeParser::getInt32Constant):
19039 (JSC::DFG::ByteCodeParser::getDoubleConstant):
19040 (JSC::DFG::ByteCodeParser::getJSConstant):
19041 (JSC::DFG::ByteCodeParser::constantUndefined):
19042 (JSC::DFG::ByteCodeParser::constantNull):
19043 (JSC::DFG::ByteCodeParser::one):
19044 (JSC::DFG::ByteCodeParser::parseBlock):
19045 (JSC::DFG::ByteCodeParser::parse):
19048 * dfg/DFGScoreBoard.h:
19049 (JSC::DFG::ScoreBoard::ScoreBoard):
19050 (JSC::DFG::ScoreBoard::~ScoreBoard):
19051 (JSC::DFG::ScoreBoard::allocate):
19052 (JSC::DFG::ScoreBoard::use):
19054 2011-04-15 Michael Saboff <msaboff@apple.com>
19056 Reviewed by Oliver Hunt.
19058 globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining
19059 https://bugs.webkit.org/show_bug.cgi?id=58677
19061 Moved JSObjectWithGlobalObject::globalObject() to
19062 runtime/JSObjectWithGlobalObject.h to allow the compiler to inline
19063 it for a performance benefit. An equivalent instance had been in
19064 a header file before r60057.
19066 * JavaScriptCore.exp:
19067 * runtime/JSObjectWithGlobalObject.cpp:
19068 * runtime/JSObjectWithGlobalObject.h:
19069 (JSC::JSObjectWithGlobalObject::globalObject):
19071 2011-04-14 Oliver Hunt <oliver@apple.com>
19073 Reviewed by Geoffrey Garen.
19075 Make JSNodeFilterCondition handle its lifetime correctly
19076 https://bugs.webkit.org/show_bug.cgi?id=58622
19080 * JavaScriptCore.exp:
19082 2011-04-14 Alexey Proskuryakov <ap@apple.com>
19084 Reviewed by Dan Bernstein.
19086 WebKit2: Password field input does not switch to ASCII-compatible source
19087 https://bugs.webkit.org/show_bug.cgi?id=58583
19088 <rdar://problem/9059651>
19090 * wtf/Platform.h: Removed WTF_USE_CARBON_SECURE_INPUT_MODE. It's now only used by Chromium,
19091 and shouldn't be enabled on any other platforms, so there is no reason to make it
19092 configurable via Platform.h.
19094 2011-04-15 Dmitry Lomov <dslomov@google.com>
19096 Reviewed by David Levin.
19098 Add a sample test case for GTest framework
19099 https://bugs.webkit.org/show_bug.cgi?id=58509
19101 Add an example of GTest testcase, complete with a runner, to JavaScriptCore.
19103 * JavaScriptCore.xcodeproj/project.pbxproj:
19104 * wtf/tests/RunAllWtfTests.cpp: Added.
19106 * wtf/tests/StringTests.cpp: Added.
19108 2011-04-15 Anna Cavender <annacc@chromium.org>
19110 Reviewed by Eric Carlson.
19112 Renaming TRACK feature define to VIDEO_TRACK
19113 https://bugs.webkit.org/show_bug.cgi?id=53556
19115 * Configurations/FeatureDefines.xcconfig:
19117 2011-04-14 Gavin Barraclough <barraclough@apple.com>
19119 Rubber stamped by Geoffrey Garen.
19121 Hide DFG_JIT_RESTRICTIONS behind ARITHMETIC_OP() macro, and rename
19122 m_regressionGuard to m_parseFailed, such that it can be reused for
19123 other failure cases.
19125 * dfg/DFGByteCodeParser.cpp:
19126 (JSC::DFG::ByteCodeParser::ByteCodeParser):
19127 (JSC::DFG::ByteCodeParser::parse):
19129 2011-04-14 Gavin Barraclough <barraclough@apple.com>
19131 Reviewed by Geoffrey Garen.
19133 Bug 58620 - DFG JIT - loading of arguments should not be lazy
19135 This optimization is overly simplistic. It only works because we never
19136 write out definitions to arguments (since we currently only compile
19137 single block functions). Revert this for now, we may want to reintroduce
19138 something like this again in the future, but it will need to be aware
19139 how to schedule definitions to arguments versus lazy loads that have not
19140 yet been performed.
19142 * dfg/DFGGenerationInfo.h:
19143 (JSC::DFG::GenerationInfo::needsSpill):
19144 * dfg/DFGGraph.cpp:
19145 (JSC::DFG::Graph::dump):
19147 * dfg/DFGJITCodeGenerator.cpp:
19148 (JSC::DFG::JITCodeGenerator::fillInteger):
19149 (JSC::DFG::JITCodeGenerator::fillDouble):
19150 (JSC::DFG::JITCodeGenerator::fillJSValue):
19151 * dfg/DFGJITCodeGenerator.h:
19152 (JSC::DFG::JITCodeGenerator::initConstantInfo):
19153 * dfg/DFGJITCompiler.cpp:
19154 (JSC::DFG::JITCompiler::fillNumericToDouble):
19155 (JSC::DFG::JITCompiler::fillInt32ToInteger):
19156 (JSC::DFG::JITCompiler::fillToJS):
19157 * dfg/DFGNonSpeculativeJIT.cpp:
19158 (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
19159 (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
19160 (JSC::DFG::NonSpeculativeJIT::compile):
19161 * dfg/DFGSpeculativeJIT.cpp:
19162 (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
19163 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
19164 (JSC::DFG::SpeculativeJIT::compile):
19166 2011-04-14 Gavin Barraclough <barraclough@apple.com>
19168 Reviewed by Geoffrey Garen.
19170 Bug 58600 - DFG JIT bugs in ValueToInt, PutByVal
19172 The bug in PutByVal is that an operand is in JSValueOperand - when this
19173 locks an integer into a register it will always retag the value without
19174 checking if the register is already locked. This is a problem where the
19175 value being stored by a PutByVal is the same as the subscript.
19176 The subscript is locked into a register first, as a strict integer.
19177 Locking the value results in the subscript being modified.
19179 The bug in ValueToInt related to the function of sillentFillAllRegisters.
19180 The problem is that this method will restore all register values from
19181 prior to the call, overwriting the result of the call out. Allow a
19182 register to be passed to specifically be excluded from being preserved.
19184 * assembler/ARMAssembler.h:
19185 (JSC::ARMAssembler::debugOffset):
19186 * assembler/ARMv7Assembler.h:
19187 (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
19188 * assembler/AbstractMacroAssembler.h:
19189 (JSC::AbstractMacroAssembler::debugOffset):
19190 * assembler/AssemblerBuffer.h:
19191 (JSC::AssemblerBuffer::debugOffset):
19192 * assembler/LinkBuffer.h:
19193 (JSC::LinkBuffer::debugAddress):
19194 * assembler/MIPSAssembler.h:
19195 (JSC::MIPSAssembler::debugOffset):
19196 * assembler/MacroAssemblerX86_64.h:
19197 (JSC::MacroAssemblerX86_64::orPtr):
19198 * assembler/X86Assembler.h:
19199 (JSC::X86Assembler::debugOffset):
19200 (JSC::X86Assembler::X86InstructionFormatter::debugOffset):
19201 * dfg/DFGByteCodeParser.cpp:
19202 (JSC::DFG::ByteCodeParser::parse):
19203 * dfg/DFGGenerationInfo.h:
19204 * dfg/DFGJITCodeGenerator.cpp:
19205 (JSC::DFG::JITCodeGenerator::fillJSValue):
19206 * dfg/DFGJITCodeGenerator.h:
19207 (JSC::DFG::JITCodeGenerator::isConstant):
19208 * dfg/DFGJITCompiler.cpp:
19209 (JSC::DFG::JITCompiler::compileFunction):
19210 * dfg/DFGJITCompiler.h:
19211 (JSC::DFG::JITCompiler::isConstant):
19212 * dfg/DFGNonSpeculativeJIT.cpp:
19213 (JSC::DFG::NonSpeculativeJIT::valueToNumber):
19214 (JSC::DFG::NonSpeculativeJIT::valueToInt32):
19215 (JSC::DFG::NonSpeculativeJIT::numberToInt32):
19216 (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
19217 (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
19218 (JSC::DFG::NonSpeculativeJIT::compile):
19219 * dfg/DFGNonSpeculativeJIT.h:
19220 (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
19221 (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
19222 (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
19223 (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
19224 (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
19225 (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
19226 * dfg/DFGSpeculativeJIT.cpp:
19227 (JSC::DFG::SpeculativeJIT::compile):
19229 2011-04-14 Geoffrey Garen <ggaren@apple.com>
19231 Reviewed by Oliver Hunt.
19233 Drain the mark stack while marking weak handles, not after.
19234 https://bugs.webkit.org/show_bug.cgi?id=58574
19236 Otherwise, items that would have caused more weak handle marking are
19237 processed after all weak handle marking has finished, and referenced
19238 weak handles get recycled.
19240 * heap/HandleHeap.cpp:
19241 (JSC::HandleHeap::markWeakHandles): Removed looping from here, since we
19242 want Heap::markRoots to be responsible for draining the mark stack.
19245 (JSC::Heap::markRoots): Moved looping to here, as explained above.
19247 For efficiency's sake, drain the mark stack before starting to mark weak
19248 handles. Otherwise, items drained while marking weak handles may force
19249 an extra trip through the weak handle list.
19251 For correctness's sake, drain the mark stack each time through the weak
19252 handle list. Otherwise, opaque roots that would make weak handles reachable
19253 are not discovered until after weak handle marking is over.
19255 2011-04-14 Oliver Hunt <oliver@apple.com>
19257 Reviewed by Geoffrey Garen.
19259 Make protected object list in caches window reflect reality
19260 https://bugs.webkit.org/show_bug.cgi?id=58565
19262 Make sure the heap includes objects protected by Strong handles
19263 in its list of protected objects.
19265 * heap/HandleHeap.h:
19267 (JSC::HandleHeap::protectedObjectTypeCounts):
19269 2011-04-14 Satish Sampath <satish@chromium.org>
19271 Reviewed by Anders Carlsson.
19273 Don't emit RegExp tables for chromium where they are not used
19274 https://bugs.webkit.org/show_bug.cgi?id=58544
19276 * JavaScriptCore.gyp/JavaScriptCore.gyp:
19277 * create_regex_tables: Added the "--notables" command line argument.
19279 2011-04-13 Geoffrey Garen <ggaren@apple.com>
19281 Try to fix ASSERTs seen on Windows bots.
19284 (WTF::hashTableSwap): Force MSVC to use the right version of swap.
19286 2011-04-13 Ryuan Choi <ryuan.choi@samsung.com>
19288 Reviewed by Kenneth Rohde Christiansen.
19290 [CMAKE] Separate DerivedSources.
19291 https://bugs.webkit.org/show_bug.cgi?id=58427
19293 * CMakeLists.txt: Change DERIVED_SOURCES_DIR to DERIVED_SOURCES_JAVASCRIPTCORE_DIR.
19295 2011-04-13 Geoffrey Garen <ggaren@apple.com>
19297 Reviewed by Oliver Hunt.
19299 Switched DOM wrappers to use HashMap of Weak<T> instead of WeakGCMap<T>
19300 https://bugs.webkit.org/show_bug.cgi?id=58482
19302 This will allow wrappers to make individual decisions about their lifetimes.
19304 * heap/HandleHeap.h:
19305 (JSC::HandleHeap::copyWeak): New function for copying a weak handle.
19306 It's wasn't previously possible to perform this operation using HandleHeap
19307 API because the HandleHeap doesn't expose its underlying Node structure.
19312 (JSC::Strong::set): Added ASSERTs to verify that dead objects are not
19313 resurrected by placement into handles.
19315 (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
19319 (JSC::Weak::Weak): Fixed a bug where copying a weak pointer would not
19320 copy its weak callback and context.
19322 (JSC::Weak::operator=): Added an assignment operator, since the default
19323 C++ assignment operator did the wrong thing.
19325 (JSC::Weak::set): Added ASSERTs to verify that dead objects are not
19326 resurrected by placement into handles.
19328 (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
19329 is efficient, and can be done without copying, which is illegal during
19330 the handle finalization phase.
19332 2011-04-13 Oliver Hunt <oliver@apple.com>
19334 Reviewed by Gavin Barraclough.
19336 Make PropertyMapEntry use a WriteBarrier for specificValue
19337 https://bugs.webkit.org/show_bug.cgi?id=58407
19339 Make PropertyMapEntry use a WriteBarrier for specificValue, and then
19340 propagate the required JSGlobalData through all the methods it ends
19343 * API/JSClassRef.cpp:
19344 (OpaqueJSClass::prototype):
19345 * API/JSContextRef.cpp:
19346 * API/JSObjectRef.cpp:
19348 (JSObjectSetPrototype):
19349 * JavaScriptCore.exp:
19350 * bytecompiler/BytecodeGenerator.cpp:
19351 (JSC::BytecodeGenerator::BytecodeGenerator):
19352 * interpreter/Interpreter.cpp:
19353 (JSC::appendSourceToError):
19354 (JSC::Interpreter::tryCacheGetByID):
19355 (JSC::Interpreter::privateExecute):
19356 * jit/JITStubs.cpp:
19357 (JSC::JITThunks::tryCacheGetByID):
19358 (JSC::DEFINE_STUB_FUNCTION):
19359 * runtime/BatchedTransitionOptimizer.h:
19360 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
19361 * runtime/InternalFunction.cpp:
19362 (JSC::InternalFunction::name):
19363 (JSC::InternalFunction::displayName):
19364 * runtime/JSActivation.cpp:
19365 (JSC::JSActivation::getOwnPropertySlot):
19366 * runtime/JSFunction.cpp:
19367 (JSC::JSFunction::name):
19368 (JSC::JSFunction::displayName):
19369 (JSC::JSFunction::getOwnPropertySlot):
19370 * runtime/JSGlobalObject.cpp:
19371 (JSC::JSGlobalObject::putWithAttributes):
19372 (JSC::JSGlobalObject::reset):
19373 (JSC::JSGlobalObject::resetPrototype):
19374 * runtime/JSGlobalObject.h:
19375 * runtime/JSObject.cpp:
19376 (JSC::JSObject::put):
19377 (JSC::JSObject::deleteProperty):
19378 (JSC::JSObject::defineGetter):
19379 (JSC::JSObject::defineSetter):
19380 (JSC::JSObject::lookupGetter):
19381 (JSC::JSObject::lookupSetter):
19382 (JSC::JSObject::getPropertySpecificValue):
19383 (JSC::JSObject::getOwnPropertyNames):
19384 (JSC::JSObject::seal):
19385 (JSC::JSObject::freeze):
19386 (JSC::JSObject::preventExtensions):
19387 (JSC::JSObject::removeDirect):
19388 (JSC::JSObject::getOwnPropertyDescriptor):
19389 (JSC::JSObject::defineOwnProperty):
19390 * runtime/JSObject.h:
19391 (JSC::JSObject::getDirect):
19392 (JSC::JSObject::getDirectLocation):
19393 (JSC::JSObject::isSealed):
19394 (JSC::JSObject::isFrozen):
19395 (JSC::JSObject::setPrototypeWithCycleCheck):
19396 (JSC::JSObject::setPrototype):
19397 (JSC::JSObject::inlineGetOwnPropertySlot):
19398 (JSC::JSObject::putDirectInternal):
19399 (JSC::JSObject::putDirectWithoutTransition):
19400 (JSC::JSObject::putDirectFunctionWithoutTransition):
19401 * runtime/Lookup.cpp:
19402 (JSC::setUpStaticFunctionSlot):
19403 * runtime/ObjectConstructor.cpp:
19404 (JSC::objectConstructorCreate):
19405 (JSC::objectConstructorSeal):
19406 (JSC::objectConstructorFreeze):
19407 (JSC::objectConstructorPreventExtensions):
19408 (JSC::objectConstructorIsSealed):
19409 (JSC::objectConstructorIsFrozen):
19410 * runtime/Operations.h:
19411 (JSC::normalizePrototypeChain):
19412 * runtime/PropertyMapHashTable.h:
19413 (JSC::PropertyMapEntry::PropertyMapEntry):
19414 (JSC::PropertyTable::PropertyTable):
19415 (JSC::PropertyTable::copy):
19416 * runtime/Structure.cpp:
19417 (JSC::Structure::materializePropertyMap):
19418 (JSC::Structure::despecifyDictionaryFunction):
19419 (JSC::Structure::addPropertyTransition):
19420 (JSC::Structure::removePropertyTransition):
19421 (JSC::Structure::changePrototypeTransition):
19422 (JSC::Structure::despecifyFunctionTransition):
19423 (JSC::Structure::getterSetterTransition):
19424 (JSC::Structure::toDictionaryTransition):
19425 (JSC::Structure::toCacheableDictionaryTransition):
19426 (JSC::Structure::toUncacheableDictionaryTransition):
19427 (JSC::Structure::sealTransition):
19428 (JSC::Structure::freezeTransition):
19429 (JSC::Structure::preventExtensionsTransition):
19430 (JSC::Structure::isSealed):
19431 (JSC::Structure::isFrozen):
19432 (JSC::Structure::addPropertyWithoutTransition):
19433 (JSC::Structure::removePropertyWithoutTransition):
19434 (JSC::Structure::copyPropertyTable):
19435 (JSC::Structure::get):
19436 (JSC::Structure::despecifyFunction):
19437 (JSC::Structure::despecifyAllFunctions):
19438 (JSC::Structure::put):
19439 (JSC::Structure::getPropertyNames):
19440 * runtime/Structure.h:
19441 (JSC::Structure::get):
19442 (JSC::Structure::materializePropertyMapIfNecessary):
19444 2011-04-13 Paul Knight <pknight@apple.com>
19446 Reviewed by Gavin Barraclough.
19448 BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
19449 https://bugs.webkit.org/show_bug.cgi?id=58405
19451 The BACKTRACE() macro requires JavaScriptCore be built with a Debug
19452 configuration in order for it to be enabled. Move the NDEBUG check to
19453 the header so it will be enabled when the calling framework or
19454 application is built with a Debug configuration, similar to how
19455 ASSERT() and friends work.
19457 * wtf/Assertions.cpp:
19458 * wtf/Assertions.h:
19460 2011-04-12 Ben Taylor <bentaylor.solx86@gmail.com>
19462 Reviewed by Alexey Proskuryakov.
19464 https://bugs.webkit.org/show_bug.cgi?id=58131
19466 Provide a workaround for an obscure Studio 12 compiler bug, which
19467 couldn't call src->~T() on a const T *src.
19471 2011-04-12 Gavin Barraclough <barraclough@apple.com>
19473 Reviewed by Oliver Hunt.
19475 https://bugs.webkit.org/show_bug.cgi?id=58395
19476 Exceptions thrown from property getters called from Array prototype functions can be missed
19478 This is caught by an ASSERT in the top of Interpreter::executeCall.
19479 Check for exceptions after accessing properties that could be getters.
19481 * runtime/ArrayPrototype.cpp:
19482 (JSC::arrayProtoFuncSort):
19483 (JSC::arrayProtoFuncFilter):
19484 (JSC::arrayProtoFuncMap):
19485 (JSC::arrayProtoFuncEvery):
19486 (JSC::arrayProtoFuncForEach):
19487 (JSC::arrayProtoFuncSome):
19488 (JSC::arrayProtoFuncReduce):
19489 (JSC::arrayProtoFuncReduceRight):
19490 - Add exception checks.
19492 2011-04-12 Oliver Hunt <oliver@apple.com>
19494 Reviewed by Geoffrey Garen.
19496 Make API callback objects use weak handles to run their finalizers
19497 https://bugs.webkit.org/show_bug.cgi?id=58389
19499 Make the API object's private data struct act as a finalizer for
19500 an api object if the callback object has a API defined finalizer.
19502 * API/JSCallbackObject.cpp:
19503 (JSC::JSCallbackObjectData::finalize):
19504 * API/JSCallbackObject.h:
19505 * API/JSCallbackObjectFunctions.h:
19509 2011-04-12 Geoffrey Garen <ggaren@apple.com>
19511 Reviewed by Geoffrey Garen.
19513 Cleaned up hash traits, and added hash traits for handles
19514 https://bugs.webkit.org/show_bug.cgi?id=58381
19517 (JSC::HandleBase::swap):
19518 (JSC::Handle::Handle):
19519 (JSC::Handle::swap): Implemented swap, so we can rehash efficiently, and
19520 without creating new handles (which is not allowed during handle finalization).
19523 (JSC::Strong::swap): Use new SimpleClassHashTraits to avoid duplication.
19526 (JSC::Weak::isHashTableDeletedValue):
19529 (JSC::Weak::hashTableDeletedValue): Ditto.
19531 * wtf/HashTraits.h:
19532 (WTF::SimpleClassHashTraits::constructDeletedValue):
19533 (WTF::SimpleClassHashTraits::isDeletedValue): Added SimpleClassHashTraits,
19534 which are analogous to SimpleClassVectorTraits, since they are used in a
19537 * wtf/RetainPtr.h: Use new SimpleClassHashTraits to avoid duplication.
19539 * wtf/text/StringHash.h: Use new SimpleClassHashTraits to avoid duplication.
19541 2011-04-12 Geoffrey Garen <ggaren@apple.com>
19543 Reviewed by Sam Weinig.
19545 Cleaned up some Vector traits, and added missing Vector traits for handles
19546 https://bugs.webkit.org/show_bug.cgi?id=58372
19548 * heap/Local.h: Inherit from SimpleClassVectorTraits to avoid duplication.
19550 * heap/Strong.h: Ditto.
19552 * heap/Weak.h: Ditto.
19554 * parser/JSParser.cpp: Fixed a traits error. No test case because this
19555 particular trait is not currently exercised by the parser.
19557 * runtime/UString.h: No need to override canInitializeWithMemset, since
19558 our base class sets it to true.
19560 * wtf/VectorTraits.h: Inherit from VectorTraitsBase to avoid duplication.
19562 * wtf/text/WTFString.h: No need to override canInitializeWithMemset, since
19563 our base class sets it to true.
19565 2011-04-12 Thouraya ANDOLSI <thouraya.andolsi@st.com>
19567 Reviewed by Eric Seidel.
19569 [Qt] Enable JIT build for SH4 platforms.
19570 https://bugs.webkit.org/show_bug.cgi?id=58317
19571 enable JIT build for QT backend for SH4 platforms.
19573 * JavaScriptCore.pro:
19576 2011-04-11 Ben Taylor <bentaylor.solx86@gmail.com>
19578 Reviewed by Alexey Proskuryakov.
19580 https://bugs.webkit.org/show_bug.cgi?id=58289
19582 Fix compilation on Solaris/Studio 12 C++ in wtf/FastMalloc.cpp,
19583 WTF::TCMalloc_PageHeap::runScavengerThread(void*) expected to return a value.
19585 * wtf/FastMalloc.cpp:
19586 (WTF::TCMalloc_PageHeap::runScavengerThread):
19588 2011-04-11 Mark Rowe <mrowe@apple.com>
19592 * JavaScriptCore.xcodeproj/project.pbxproj: Headers used outside of JavaScriptCore need to be marked as private.
19594 2011-04-11 Anna Cavender <annacc@chromium.org>
19596 Reviewed by Eric Carlson.
19598 Setup ENABLE(TRACK) feature define
19599 https://bugs.webkit.org/show_bug.cgi?id=53556
19602 * Configurations/FeatureDefines.xcconfig:
19604 2011-04-11 Geoffrey Garen <ggaren@apple.com>
19606 Try to fix a few builds.
19608 Updated a few more build configurations for file moves.
19610 * CMakeListsWinCE.txt:
19612 2011-04-11 Gavin Barraclough <barraclough@apple.com>
19614 Reviewed by Sam Weinig.
19616 Bug 58263 - Use EncodedValueDescriptor on both JSVALUE32_64, JSVALUE64
19618 The JSJITInterface already uses EncodedValueDescriptor to access the tag/payload
19619 separately on JSVALUE64, even though EncodedValueDescriptor is not used in
19620 JSVALUE64's implementation of JSValue. Remove the separate definition for m_ptr
19621 on X86_64. Using the union allows us to remove a layer of makeImmediate()/
19622 immedaiteValue() methods.
19624 * dfg/DFGNonSpeculativeJIT.cpp:
19625 (JSC::DFG::NonSpeculativeJIT::compile):
19626 * dfg/DFGSpeculativeJIT.cpp:
19627 (JSC::DFG::SpeculativeJIT::compile):
19628 * jit/JITInlineMethods.h:
19629 (JSC::JIT::emitTagAsBoolImmediate):
19630 * jit/JITOpcodes.cpp:
19631 (JSC::JIT::emit_op_not):
19632 (JSC::JIT::emit_op_jeq_null):
19633 (JSC::JIT::emit_op_jneq_null):
19634 (JSC::JIT::emit_op_get_pnames):
19635 (JSC::JIT::emit_op_eq_null):
19636 (JSC::JIT::emit_op_neq_null):
19637 (JSC::JIT::emitSlow_op_not):
19638 * runtime/JSCell.h:
19639 * runtime/JSValue.h:
19640 * runtime/JSValueInlineMethods.h:
19641 (JSC::JSValue::encode):
19642 (JSC::JSValue::decode):
19643 (JSC::JSValue::operator==):
19644 (JSC::JSValue::operator!=):
19645 (JSC::JSValue::JSValue):
19646 (JSC::JSValue::operator bool):
19647 (JSC::JSValue::asInt32):
19648 (JSC::JSValue::isUndefinedOrNull):
19649 (JSC::JSValue::isBoolean):
19650 (JSC::JSValue::isCell):
19651 (JSC::JSValue::isInt32):
19652 (JSC::JSValue::asDouble):
19653 (JSC::JSValue::isNumber):
19654 (JSC::JSValue::asCell):
19656 2011-04-11 Geoffrey Garen <ggaren@apple.com>
19658 Try to fix a few builds.
19660 Updated a few more build configurations for file moves.
19662 * CMakeListsEfl.txt:
19665 2011-04-11 Geoffrey Garen <ggaren@apple.com>
19667 Build fix: Updated a file name.
19671 2011-04-11 Geoffrey Garen <ggaren@apple.com>
19673 Rubber-stamped by Sam Weinig.
19675 Moved remaining heap implementation files to the heap folder.
19679 * GNUmakefile.list.am:
19680 * JavaScriptCore.gypi:
19681 * JavaScriptCore.pro:
19682 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19683 * JavaScriptCore.xcodeproj/project.pbxproj:
19684 * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
19685 * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
19688 * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
19689 * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
19690 * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
19691 * heap/MarkStack.h: Copied from runtime/MarkStack.h.
19692 * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
19693 * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
19694 * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
19695 * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
19696 * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
19697 * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
19698 * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
19699 * interpreter/RegisterFile.cpp:
19700 * runtime/ConservativeSet.cpp: Removed.
19701 * runtime/ConservativeSet.h: Removed.
19702 * runtime/MachineStackMarker.cpp: Removed.
19703 * runtime/MachineStackMarker.h: Removed.
19704 * runtime/MarkStack.cpp: Removed.
19705 * runtime/MarkStack.h: Removed.
19706 * runtime/MarkStackPosix.cpp: Removed.
19707 * runtime/MarkStackSymbian.cpp: Removed.
19708 * runtime/MarkStackWin.cpp: Removed.
19709 * runtime/MarkedBlock.cpp: Removed.
19710 * runtime/MarkedBlock.h: Removed.
19711 * runtime/MarkedSpace.cpp: Removed.
19712 * runtime/MarkedSpace.h: Removed.
19714 2011-04-11 Gavin Barraclough <barraclough@apple.com>
19718 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
19720 2011-04-09 Gavin Barraclough <barraclough@apple.com>
19722 Reviewed by Sam Weinig.
19724 Bug 58198 - Clean up JSValue implementation for JSVALUE64
19726 Remove JSNumberCell, JSImmediate, unify some methods between JSVALUE32_64/JSVALUE64
19728 JSNumberCell.h largely just contained the constructors for JSValue on JSVALUE64,
19729 which should not have been here. JSImmediate mostly contained uncalled methods,
19730 along with the internal implementation of the JSValue constructors split unnecessarily
19731 across a number of layers of function calls. These could largely be merged back
19732 together. Many methods and constructors from JSVALUE32_64 and JSVALUE64 can by unified.
19734 The .cpp files were empty.
19736 Moving all these methods into JSValue.h seems to be a repro measurable regression, so
19737 I have kept these methods in a separate JSValueInlineMethods.h. Adding the 64-bit tag
19738 values as static const members of JSValue also measures as a repro regression, so I
19739 have made these #defines.
19743 * GNUmakefile.list.am:
19744 * JavaScriptCore.exp:
19745 * JavaScriptCore.gypi:
19746 * JavaScriptCore.pro:
19747 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19748 * JavaScriptCore.xcodeproj/project.pbxproj:
19749 - Removed JSImmediate.h, JSNumberCell.h.
19750 * bytecompiler/BytecodeGenerator.cpp:
19751 (JSC::BytecodeGenerator::emitLoad):
19752 - Removed class JSImmediate.
19753 * dfg/DFGNonSpeculativeJIT.cpp:
19754 (JSC::DFG::NonSpeculativeJIT::compile):
19755 - Removed class JSImmediate.
19756 * dfg/DFGSpeculativeJIT.cpp:
19757 (JSC::DFG::SpeculativeJIT::compile):
19758 - Removed class JSImmediate.
19759 * jit/JITArithmetic.cpp:
19760 (JSC::JIT::compileBinaryArithOpSlowCase):
19761 - Removed class JSImmediate.
19762 * jit/JITInlineMethods.h:
19763 (JSC::JIT::emitJumpIfJSCell):
19764 (JSC::JIT::emitJumpIfNotJSCell):
19765 (JSC::JIT::emitJumpIfImmediateInteger):
19766 (JSC::JIT::emitJumpIfNotImmediateInteger):
19767 (JSC::JIT::emitFastArithDeTagImmediate):
19768 (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
19769 (JSC::JIT::emitFastArithReTagImmediate):
19770 (JSC::JIT::emitTagAsBoolImmediate):
19771 - Removed class JSImmediate.
19772 * jit/JITOpcodes.cpp:
19773 (JSC::JIT::emit_op_not):
19774 (JSC::JIT::emit_op_jeq_null):
19775 (JSC::JIT::emit_op_jneq_null):
19776 (JSC::JIT::emit_op_get_pnames):
19777 (JSC::JIT::emit_op_eq_null):
19778 (JSC::JIT::emit_op_neq_null):
19779 (JSC::JIT::emitSlow_op_not):
19780 - Removed class JSImmediate.
19781 * jit/JSInterfaceJIT.h:
19782 - Removed class JSImmediate.
19783 * runtime/JSCell.h:
19784 - Removed JSImmediate.h, JSNumberCell.h.
19785 * runtime/JSImmediate.cpp: Removed.
19786 * runtime/JSImmediate.h: Removed.
19787 * runtime/JSNumberCell.cpp: Removed.
19788 * runtime/JSNumberCell.h: Removed.
19790 * runtime/JSObject.h:
19791 - Removed JSImmediate.h, JSNumberCell.h.
19792 * runtime/JSString.h:
19793 - Removed JSImmediate.h, JSNumberCell.h.
19794 * runtime/JSValue.h:
19795 - Added tags for JSVALUE64, moved out some JSVALUE32_64 methods, unified with JSVALUE64.
19796 * runtime/JSValueInlineMethods.h: Added.
19797 (JSC::JSValue::toInt32):
19798 (JSC::JSValue::toUInt32):
19799 (JSC::JSValue::isUInt32):
19800 (JSC::JSValue::asUInt32):
19801 (JSC::JSValue::uncheckedGetNumber):
19802 (JSC::JSValue::toJSNumber):
19804 (JSC::JSValue::getNumber):
19805 (JSC::JSValue::getBoolean):
19806 (JSC::JSValue::JSValue):
19807 (JSC::JSValue::encode):
19808 (JSC::JSValue::decode):
19809 (JSC::JSValue::operator bool):
19810 (JSC::JSValue::operator==):
19811 (JSC::JSValue::operator!=):
19812 (JSC::JSValue::isUndefined):
19813 (JSC::JSValue::isNull):
19814 (JSC::JSValue::isUndefinedOrNull):
19815 (JSC::JSValue::isCell):
19816 (JSC::JSValue::isInt32):
19817 (JSC::JSValue::isDouble):
19818 (JSC::JSValue::isTrue):
19819 (JSC::JSValue::isFalse):
19820 (JSC::JSValue::tag):
19821 (JSC::JSValue::payload):
19822 (JSC::JSValue::asInt32):
19823 (JSC::JSValue::asDouble):
19824 (JSC::JSValue::asCell):
19825 (JSC::JSValue::isNumber):
19826 (JSC::JSValue::isBoolean):
19827 (JSC::JSValue::makeImmediate):
19828 (JSC::JSValue::immediateValue):
19829 (JSC::reinterpretDoubleToIntptr):
19830 (JSC::reinterpretIntptrToDouble):
19831 - Methods moved here from JSImmediate.h/JSNumberCell.h/JSValue.h.
19832 * runtime/Operations.h:
19833 - Removed JSImmediate.h, JSNumberCell.h.
19834 * wtf/StdLibExtras.h:
19835 - Export bitwise_cast.
19837 2011-04-11 Thouraya ANDOLSI <thouraya.andolsi@st.com>
19839 Reviewed by Oliver Hunt.
19842 https://bugs.webkit.org/show_bug.cgi?id=44329
19844 Add JIT remaining part for SH4 platforms.
19846 * assembler/MacroAssemblerSH4.h:
19848 * jit/JITInlineMethods.h:
19849 * jit/JITOpcodes32_64.cpp:
19850 * jit/JITPropertyAccess32_64.cpp:
19851 * jit/JITStubs.cpp:
19853 * jit/JSInterfaceJIT.h:
19855 2011-04-10 Geoffrey Garen <ggaren@apple.com>
19857 Rubber-stamped by Beth Dakin.
19859 Moved Heap.h and Heap.cpp to the heap folder, because anything less
19860 would be uncivilized.
19864 * GNUmakefile.list.am:
19865 * JavaScriptCore.gypi:
19866 * JavaScriptCore.pro:
19867 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19868 * JavaScriptCore.xcodeproj/project.pbxproj:
19869 * heap/Heap.cpp: Copied from JavaScriptCore/runtime/Heap.cpp.
19870 * heap/Heap.h: Copied from JavaScriptCore/runtime/Heap.h.
19871 * runtime/Heap.cpp: Removed.
19872 * runtime/Heap.h: Removed.
19874 2011-04-10 Patrick Gansterer <paroga@webkit.org>
19876 Reviewed by Darin Adler.
19878 Remove duplicated code from AtomicString::fromUTF8()
19879 https://bugs.webkit.org/show_bug.cgi?id=53711
19881 * JavaScriptCore.exp:
19882 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
19883 * wtf/text/AtomicString.cpp:
19884 (WTF::AtomicString::fromUTF8Internal):
19885 * wtf/text/AtomicString.h:
19886 (WTF::AtomicString::fromUTF8):
19887 * wtf/unicode/UTF8.cpp:
19888 (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
19889 * wtf/unicode/UTF8.h:
19891 2011-04-10 Maciej Stachowiak <mjs@apple.com>
19895 Fix build (at least on Lion) by adding some newish header files to
19898 * JavaScriptCore.xcodeproj/project.pbxproj:
19900 2011-04-09 Geoffrey Garen <ggaren@apple.com>
19904 Try recommitting some things svn left out of its last commit.
19907 (JSC::HandleBase::operator!):
19908 (JSC::HandleBase::HandleBase):
19909 (JSC::HandleBase::slot):
19910 (JSC::HandleBase::setSlot):
19911 (JSC::Handle::Handle):
19912 * heap/HandleHeap.cpp:
19913 (JSC::HandleHeap::markWeakHandles):
19914 (JSC::HandleHeap::finalizeWeakHandles):
19915 (JSC::HandleHeap::isValidWeakNode):
19916 * heap/HandleHeap.h:
19917 (JSC::HandleHeap::globalData):
19919 2011-04-08 Geoffrey Garen <ggaren@apple.com>
19921 Reviewed by Oliver Hunt.
19923 A few heap-related renames and file moves.
19925 WeakGCPtr<T> => Weak<T>
19926 Global<T> => Strong<T>
19927 collector/ => heap/
19928 collector/* => heap/*
19929 runtime/WeakGCPtr.h => heap/Weak.h
19931 (Eventually, even more files should move into the heap directory. Like
19932 Heap.h and Heap.cpp, for example.)
19934 * API/JSClassRef.h:
19937 * GNUmakefile.list.am:
19938 * JavaScriptCore.gypi:
19939 * JavaScriptCore.pri:
19940 * JavaScriptCore.pro:
19941 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19942 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
19943 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
19944 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
19945 * JavaScriptCore.xcodeproj/project.pbxproj:
19946 * bytecode/SamplingTool.h:
19947 * bytecompiler/BytecodeGenerator.h:
19948 * collector: Removed.
19949 * collector/handles: Removed.
19950 * collector/handles/Global.h: Removed.
19951 * collector/handles/Handle.h: Removed.
19952 * collector/handles/HandleHeap.cpp: Removed.
19953 * collector/handles/HandleHeap.h: Removed.
19954 * collector/handles/HandleStack.cpp: Removed.
19955 * collector/handles/HandleStack.h: Removed.
19956 * collector/handles/Local.h: Removed.
19957 * collector/handles/LocalScope.h: Removed.
19958 * heap: Copied from collector.
19959 * heap/Handle.h: Copied from collector/handles/Handle.h.
19960 * heap/HandleHeap.cpp: Copied from collector/handles/HandleHeap.cpp.
19961 * heap/HandleHeap.h: Copied from collector/handles/HandleHeap.h.
19962 * heap/HandleStack.cpp: Copied from collector/handles/HandleStack.cpp.
19963 * heap/HandleStack.h: Copied from collector/handles/HandleStack.h.
19964 * heap/Local.h: Copied from collector/handles/Local.h.
19965 * heap/LocalScope.h: Copied from collector/handles/LocalScope.h.
19966 * heap/Strong.h: Copied from collector/handles/Global.h.
19967 (JSC::Strong::Strong):
19968 (JSC::Strong::~Strong):
19969 (JSC::Strong::operator=):
19970 * heap/Weak.h: Copied from runtime/WeakGCPtr.h.
19972 (JSC::Weak::~Weak):
19973 * heap/handles: Removed.
19974 * interpreter/RegisterFile.h:
19975 * jit/JITStubs.cpp:
19976 (JSC::JITThunks::hostFunctionStub):
19978 * runtime/Structure.h:
19979 * runtime/WeakGCPtr.h: Removed.
19981 2011-04-08 Alpha Lam <hclam@chromium.org>
19983 Unreviewed, rolling out r83335.
19984 http://trac.webkit.org/changeset/83335
19985 https://bugs.webkit.org/show_bug.cgi?id=53556
19987 GTK and QT bots are broken
19989 * Configurations/FeatureDefines.xcconfig:
19991 2011-04-08 Gavin Barraclough <barraclough@apple.com>
19993 Ooops, typo, build fix.
19995 * dfg/DFGByteCodeParser.cpp:
19996 (JSC::DFG::ByteCodeParser::parse):
19998 2011-04-08 Gavin Barraclough <barraclough@apple.com>
20000 Reviewed by Oliver Hunt.
20002 Bug 58154 - Add support for comparison operators to the DFG JIT.
20004 Add support for <, <=, ==, ===, and also !. Add support for all corresponding
20005 bytecode ops, including the not- and -null forms. Initially add functionally
20006 correct support, we'll revisit the performance.
20008 * dfg/DFGByteCodeParser.cpp:
20009 (JSC::DFG::ByteCodeParser::ByteCodeParser):
20010 (JSC::DFG::ByteCodeParser::constantNull):
20011 (JSC::DFG::ByteCodeParser::parse):
20012 - Add support for parsing of bytecode opcodes,
20013 * dfg/DFGJITCodeGenerator.h:
20014 (JSC::DFG::JITCodeGenerator::callOperation):
20015 - Add new operation call types, return bool values.
20017 - Add new node types.
20018 * dfg/DFGNonSpeculativeJIT.cpp:
20019 (JSC::DFG::NonSpeculativeJIT::compile):
20020 - Add code generation for new nodes.
20021 * dfg/DFGOperations.cpp:
20022 (JSC::DFG::operationCompareLess):
20023 (JSC::DFG::operationCompareLessEq):
20024 (JSC::DFG::operationCompareEq):
20025 (JSC::DFG::operationCompareStrictEq):
20026 (JSC::DFG::dfgConvertJSValueToBoolean):
20027 * dfg/DFGOperations.h:
20028 - Add operation callbacks to implement new ops.
20029 * dfg/DFGSpeculativeJIT.cpp:
20030 (JSC::DFG::SpeculativeJIT::compile):
20031 - Add code generation for new nodes.
20032 * jit/JITOpcodes.cpp:
20033 (JSC::JIT::privateCompileCTIMachineTrampolines):
20034 - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
20035 * jit/JITPropertyAccess.cpp:
20036 (JSC::JIT::privateCompilePatchGetArrayLength):
20037 - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
20038 * runtime/JSImmediate.h:
20039 - Make tag values public, rather than relying on a friend - this matches JSVALUE32_64.
20041 2011-04-07 Anna Cavender <annacc@chromium.org>
20043 Reviewed by Eric Carlson.
20045 Setup ENABLE(TRACK) feature define
20046 https://bugs.webkit.org/show_bug.cgi?id=53556
20049 * Configurations/FeatureDefines.xcconfig:
20051 2011-04-07 Balazs Kelemen <kbalazs@webkit.org>
20053 Reviewed by Kenneth Rohde Christiansen.
20055 [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
20056 https://bugs.webkit.org/show_bug.cgi?id=58030
20058 * wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
20060 2011-04-08 Adam Roben <aroben@apple.com>
20064 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Don't try to delete directories that
20065 don't exist. Also switched from del /s to rmdir /s, which has the benefit of deleting the
20066 directory itself in addition to the files it contains.
20068 2011-04-07 Geoffrey Garen <ggaren@apple.com>
20070 Reviewed by Maciej Stachowiak.
20072 Some Handle<T> cleanup
20073 https://bugs.webkit.org/show_bug.cgi?id=58109
20075 * bytecode/SamplingTool.h: Sorted alphabetically because that's the
20076 WebKit style. Added a Global.h #include that was previously missing
20079 * collector/handles/Global.h:
20080 (JSC::Global::Global): Added a null constructor. No need for a special
20081 tag, and the tag is incompatible with some data structures.
20083 (JSC::Global::isHashTableDeletedValue):
20084 (JSC::Global::~Global):
20085 (JSC::Global::set):
20086 (JSC::Global::operator=):
20087 (JSC::Global::clear):
20088 (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
20091 (JSC::Global::setWithWriteBarrier): Renamed internalSet to
20092 setWithWriteBarrier for clarity, and funneled more code into using set
20093 and setWithWriteBarrier to reduce duplication.
20095 * collector/handles/Handle.h:
20096 (JSC::HandleBase::operator!):
20097 (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
20098 boolean and ! operators.
20100 (JSC::HandleBase::slot):
20101 (JSC::HandleBase::setSlot):
20102 (JSC::Handle::Handle): Added general support for null Handles. This was
20103 previously outlawed by ASSERTs, but our code has grown to support and
20104 rely on null Handles.
20106 * collector/handles/HandleHeap.cpp:
20107 (JSC::HandleHeap::markWeakHandles):
20108 (JSC::HandleHeap::finalizeWeakHandles):
20109 (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
20110 and beefed this up a bit.
20112 * collector/handles/HandleHeap.h:
20113 (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
20115 * collector/handles/Local.h: Moved hash traits to the bottom of the file,
20116 since this file is about the Local class, not the traits.
20118 (JSC::::Local): Updated for removal of invalidate().
20120 (JSC::::operator): Deployed "using" to avoid a lot of this->
20121 template funny business.
20123 (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
20125 * interpreter/RegisterFile.h:
20126 (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
20128 * jit/JITStubs.cpp:
20129 (JSC::JITThunks::hostFunctionStub):
20131 * runtime/JSPropertyNameIterator.h:
20132 (JSC::Structure::setEnumerationCache):
20133 * runtime/Structure.h: Removed clearEnumerationCache
20134 because it was an unused holdover from when the enumeration cache was
20137 * runtime/WeakGCMap.h:
20138 (JSC::WeakGCMap::set): Finish initializing our handle before putting it
20139 in the table. This seemed more logical, and at one point was required
20140 to avoid triggering an ASSERT.
20142 * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
20143 handle-like behavior, to avoid duplication.
20145 (JSC::WeakGCPtr::WeakGCPtr):
20146 (JSC::WeakGCPtr::~WeakGCPtr):
20147 (JSC::WeakGCPtr::get):
20148 (JSC::WeakGCPtr::clear):
20149 (JSC::WeakGCPtr::set):
20150 (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
20151 standardized on Handle idioms.
20153 2011-04-07 Adam Barth <abarth@webkit.org>
20155 Reviewed by Martin Robinson.
20157 Refactor Gtk build system to separate list of files
20158 https://bugs.webkit.org/show_bug.cgi?id=58090
20160 This is the first step towards generating part of the GTK build system
20161 using GYP. In the first iteration, our plan is to just generate the
20162 list of files. This patch is the first step, which is to separate out
20163 the part of JavaScriptCore build system that we intend to generate from
20164 the rest of the build system.
20167 * GNUmakefile.list.am: Added.
20169 2011-04-07 Zoltan Herczeg <zherczeg@webkit.org>
20171 Reviewed by Gavin Barraclough.
20173 Mapping booleans the same way as integers
20174 https://bugs.webkit.org/show_bug.cgi?id=56913
20176 Instead of having a seperate tag field for booleans,
20177 the logical values are stored in the payload field
20178 (for JSValue32_64 representation).
20180 1.007x speedup on SunSpider.
20183 * jit/JITInlineMethods.h:
20184 (JSC::JIT::emitStoreBool):
20185 * jit/JITOpcodes32_64.cpp:
20186 (JSC::JIT::emit_op_instanceof):
20187 (JSC::JIT::emit_op_not):
20188 (JSC::JIT::emit_op_jfalse):
20189 (JSC::JIT::emitSlow_op_jfalse):
20190 (JSC::JIT::emit_op_jtrue):
20191 (JSC::JIT::emitSlow_op_jtrue):
20192 (JSC::JIT::emit_op_jeq_null):
20193 (JSC::JIT::emit_op_jneq_null):
20194 (JSC::JIT::emit_op_eq):
20195 (JSC::JIT::emitSlow_op_eq):
20196 (JSC::JIT::emit_op_neq):
20197 (JSC::JIT::emitSlow_op_neq):
20198 (JSC::JIT::compileOpStrictEq):
20199 (JSC::JIT::emit_op_eq_null):
20200 (JSC::JIT::emit_op_neq_null):
20201 * jit/JSInterfaceJIT.h:
20202 * runtime/JSValue.h:
20203 (JSC::JSValue::JSValue):
20204 (JSC::JSValue::isTrue):
20205 (JSC::JSValue::isFalse):
20206 (JSC::JSValue::getBoolean):
20208 2011-04-07 Eric Seidel <eric@webkit.org>
20210 Reviewed by Adam Barth.
20212 Add stub support for generating Gtk build system from gyp
20213 https://bugs.webkit.org/show_bug.cgi?id=58086
20215 This does not produce a buildable JavaScriptCore, but it
20216 does allow running gyp/configure --port=gtk and having
20217 it generate a gtk.Makefile which we can use for testing
20218 the rest of the plumbing.
20220 * gyp/gtk.gyp: Added.
20222 2011-04-07 Andrew Scherkus <scherkus@chromium.org>
20224 Revert ENABLE_TRACK patch due to compile failures.
20226 * Configurations/FeatureDefines.xcconfig:
20228 2011-04-07 Adam Barth <abarth@webkit.org>
20230 Fix whitespace in GNUmakefile.am.
20234 2011-04-07 Gavin Barraclough <barraclough@apple.com>
20236 Fix a couple of typos in comments that Darin spotted.
20238 * jit/JITOpcodes.cpp:
20239 (JSC::JIT::emit_op_not):
20240 * runtime/JSImmediate.h:
20242 2011-04-06 Gavin Barraclough <barraclough@apple.com>
20244 Reviewed by Geoff Garen.
20245 Bug 58057 - Store boolean payload in low bit of JSImmediate
20247 And remove some uncalled functions from JSImmediate.h
20249 * jit/JITInlineMethods.h:
20250 (JSC::JIT::emitTagAsBoolImmediate):
20251 * jit/JITOpcodes.cpp:
20252 (JSC::JIT::emit_op_not):
20253 * runtime/JSImmediate.h:
20254 (JSC::JSImmediate::makeInt):
20255 (JSC::JSImmediate::makeBool):
20256 (JSC::JSImmediate::intValue):
20257 (JSC::JSImmediate::boolValue):
20258 (JSC::JSImmediate::asInt32):
20259 (JSC::JSImmediate::toDouble):
20260 (JSC::JSValue::asInt32):
20261 (JSC::JSValue::isUInt32):
20262 (JSC::JSValue::asUInt32):
20264 2011-04-07 Liang Qi <liang.qi@nokia.com>
20266 Reviewed by Laszlo Gombos.
20268 [Qt][Symbian] Enable webkit build with GCCE on Symbian.
20269 https://bugs.webkit.org/show_bug.cgi?id=57841
20271 * wtf/MathExtras.h: GCCE compiler doesn't support those std static functions.
20273 2011-04-06 Dai Mikurube <dmikurube@chromium.org>
20275 Reviewed by David Levin.
20277 Add QUOTA build flag for unified quota API
20278 https://bugs.webkit.org/show_bug.cgi?id=57918
20280 * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
20282 2011-04-06 Kevin Ollivier <kevino@theolliviers.com>
20284 Reviewed by Darin Adler.
20286 Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
20288 https://bugs.webkit.org/show_bug.cgi?id=27551
20292 2011-04-06 Oliver Hunt <oliver@apple.com>
20294 Reviewed by Gavin Barraclough.
20296 Stop JSObject::isUsingInlineStorage() from using the structure
20297 https://bugs.webkit.org/show_bug.cgi?id=57986
20299 Make the isUsingInlineStorage() implementation just look at
20300 whether the property storage is inside the object.
20302 * runtime/JSObject.h:
20303 (JSC::JSObject::isUsingInlineStorage):
20304 (JSC::JSObject::JSObject):
20306 2011-04-06 Gavin Barraclough <barraclough@apple.com>
20308 Rubber stamped by Geoff Garen.
20310 Update comments documenting JSVALUE64/JSVALUE32_64 JSValue representations.
20312 * runtime/JSImmediate.h:
20313 * runtime/JSValue.h:
20315 2011-04-06 Lucas De Marchi <lucas.demarchi@profusion.mobi>
20317 cmake: Fix build for ARMv7
20319 * CMakeLists.txt: add missing file.
20321 2011-04-06 Liang Qi <liang.qi@nokia.com>
20323 Reviewed by Benjamin Poulain.
20325 Correct a include file name.
20326 https://bugs.webkit.org/show_bug.cgi?id=57839
20328 * wtf/PageAllocatorSymbian.h: It should be case sensitive. This fix
20329 builds on Unix hosts.
20331 2011-04-06 Adam Roben <aroben@apple.com>
20333 Build fix after r83056
20335 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Added property svn:executable.
20337 2011-04-06 Adam Roben <aroben@apple.com>
20339 Move JavaScriptCoreGenerated's file-copying logic out to a new script
20341 Hopefully this will make it easier to modify this logic in the future. I also made the
20342 script much quieter than the old logic, since it didn't seem helpful to see long lists of
20343 filenames during the copying phase.
20345 If we like this new style, we could copy it for our other projects.
20347 Fixes <http://webkit.org/b/57950> JavaScriptCoreGenerated's file-copying logic is hard to
20350 Reviewed by Steve Falkenburg.
20352 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Moved logic to copy
20354 * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: ...to here. (Added.)
20356 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added copy-files.cmd
20359 2011-04-05 Geoffrey Garen <ggaren@apple.com>
20361 Try to fix the Windows build.
20363 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Who likes export files? I do!
20365 2011-04-05 Geoffrey Garen <ggaren@apple.com>
20367 Reviewed by Oliver Hunt.
20369 Introduced the concept of opaque roots, in preparation for marking the DOM with them
20370 https://bugs.webkit.org/show_bug.cgi?id=57903
20372 * JavaScriptCore.exp: Who likes export files? I do!
20374 * collector/handles/HandleHeap.cpp:
20375 (JSC::isValidWeakHandle): Factored out a helper function for ASSERTs.
20377 (JSC::WeakHandleOwner::~WeakHandleOwner): Moved from header to avoid
20378 weak linkage problems.
20380 (JSC::WeakHandleOwner::isReachableFromOpaqueRoots): New callback.
20383 (JSC::WeakHandleOwner::finalize): Switched from pure virtual to a
20384 default empty implementation, since not all clients necessarily want
20385 or need non-trivial finalizers.
20387 (JSC::HandleHeap::markWeakHandles): Split updateWeakHandles into two
20388 passes. The first pass marks all reachable weak handles. The second pass
20389 finalizes all unreachable weak handles. This must be two passes because
20390 we don't know the set of finalizable weak handles until we're done
20391 marking all weak handles.
20393 (JSC::HandleHeap::finalizeWeakHandles): Use new helper function.
20395 * collector/handles/HandleHeap.h: Ditto.
20397 * runtime/Heap.cpp:
20398 (JSC::Heap::destroy):
20399 (JSC::Heap::markRoots):
20400 (JSC::Heap::reset): Split out handle marking from handle finalization.
20402 * runtime/MarkStack.cpp:
20403 (JSC::MarkStack::reset):
20404 * runtime/MarkStack.h:
20405 (JSC::MarkStack::addOpaqueRoot):
20406 (JSC::MarkStack::containsOpaqueRoot):
20407 (JSC::MarkStack::opaqueRootCount):
20408 (JSC::HeapRootMarker::markStack): New helper functions for managing the
20409 set of opaque roots.
20411 * runtime/WeakGCMap.h:
20412 (JSC::WeakGCMap::finalize): Renamed to match parent class declaration.
20414 2011-04-05 Balazs Kelemen <kbalazs@webkit.org>
20416 Reviewed by Darin Adler.
20418 Build fix for YarrParser.h
20419 https://bugs.webkit.org/show_bug.cgi?id=57822
20421 * yarr/YarrParser.h:
20422 (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
20424 2011-04-05 Steve Falkenburg <sfalken@apple.com>
20426 Follow-up Windows build fix.
20427 Don't skip react-to-vsprops-changes.py for all production builds,
20428 only those initiated via JavaScriptCore.make.
20430 * JavaScriptCore.vcproj/JavaScriptCore.make:
20431 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
20433 2011-04-05 Oliver Hunt <oliver@apple.com>
20435 Reviewed by Darin Adler.
20437 REGRESSION (r82849): 85,000+ JSC-related leaks seen on SnowLeopard Intel Leaks
20438 https://bugs.webkit.org/show_bug.cgi?id=57857
20440 Whoops, accidentally removed a deref().
20442 * bytecode/StructureStubInfo.cpp:
20443 (JSC::StructureStubInfo::deref):
20445 2011-04-05 Steve Falkenburg <sfalken@apple.com>
20449 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add per-configuration vsprops files.
20450 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed inheritance from common.vsprops.
20451 Set production environment variable before calling make.
20452 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Added.
20453 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Added.
20454 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Added.
20455 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Added.
20456 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Added.
20457 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Added.
20458 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Added.
20460 2011-04-05 Oliver Hunt <oliver@apple.com>
20462 Reviewed by Gavin Barraclough.
20464 Make caches window show more info about non-jsobject GC values
20465 https://bugs.webkit.org/show_bug.cgi?id=57874
20467 Add ClassInfo to the various internal JS types that currently
20468 don't have any, and make the text for caches window show the
20469 classname for non-JSObject instances.
20471 * runtime/Executable.cpp:
20472 * runtime/Executable.h:
20473 (JSC::ExecutableBase::createStructure):
20474 (JSC::NativeExecutable::createStructure):
20475 (JSC::NativeExecutable::NativeExecutable):
20476 (JSC::EvalExecutable::createStructure):
20477 (JSC::ProgramExecutable::createStructure):
20478 (JSC::FunctionExecutable::createStructure):
20479 * runtime/Heap.cpp:
20480 (JSC::TypeCounter::typeName):
20481 * runtime/JSGlobalData.cpp:
20482 (JSC::JSGlobalData::JSGlobalData):
20483 * runtime/JSGlobalData.h:
20484 * runtime/ScopeChain.cpp:
20485 * runtime/ScopeChain.h:
20486 (JSC::ScopeChainNode::createStructure):
20487 * runtime/StructureChain.cpp:
20488 * runtime/StructureChain.h:
20489 (JSC::StructureChain::createStructure):
20491 2011-04-05 Nikolas Zimmermann <nzimmermann@rim.com>
20493 Reviewed by Andreas Kling.
20495 Cleanup StringConcatenate
20496 https://bugs.webkit.org/show_bug.cgi?id=57836
20498 Don't use PassRefPtr in local variables, properly store in RefPtrs and release on return.
20499 Add a makeString() variant taking 9 arguments, needed by a follow-up patch.
20501 * wtf/text/StringConcatenate.h:
20502 (WTF::tryMakeString):
20505 2011-04-04 Sheriff Bot <webkit.review.bot@gmail.com>
20507 Unreviewed, rolling out r82876.
20508 http://trac.webkit.org/changeset/82876
20509 https://bugs.webkit.org/show_bug.cgi?id=57816
20511 Caused a lot of test crashes (Requested by tkent on #webkit).
20513 * JavaScriptCore.exp:
20514 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
20515 * wtf/FastMalloc.cpp:
20516 (WTF::tryFastMalloc):
20518 (WTF::tryFastCalloc):
20521 (WTF::tryFastRealloc):
20522 (WTF::fastRealloc):
20523 (WTF::fastMallocSize):
20524 (WTF::TCMalloc_PageHeap::isScavengerSuspended):
20525 (WTF::TCMalloc_PageHeap::scheduleScavenger):
20526 (WTF::TCMalloc_PageHeap::suspendScavenger):
20527 (WTF::TCMalloc_PageHeap::signalScavenger):
20528 (WTF::TCMallocStats::malloc):
20529 (WTF::TCMallocStats::free):
20530 (WTF::TCMallocStats::fastCalloc):
20531 (WTF::TCMallocStats::tryFastCalloc):
20532 (WTF::TCMallocStats::calloc):
20533 (WTF::TCMallocStats::fastRealloc):
20534 (WTF::TCMallocStats::tryFastRealloc):
20535 (WTF::TCMallocStats::realloc):
20536 (WTF::TCMallocStats::fastMallocSize):
20537 * wtf/FastMalloc.h:
20538 (WTF::Internal::fastMallocMatchValidationType):
20539 (WTF::Internal::fastMallocMatchValidationValue):
20540 (WTF::Internal::setFastMallocMatchValidationType):
20541 (WTF::fastMallocMatchValidateFree):
20544 2011-04-04 Oliver Hunt <oliver@apple.com>
20546 Reviewed by Antti Koivisto.
20548 Stop JSCell.h from including Structure.h
20549 https://bugs.webkit.org/show_bug.cgi?id=57809
20551 * runtime/GetterSetter.h:
20552 * runtime/JSAPIValueWrapper.h:
20553 * runtime/JSCell.h:
20554 (JSC::JSCell::JSValue::toThisObject):
20555 * runtime/JSString.h:
20556 * runtime/ScopeChain.h:
20557 * runtime/Structure.h:
20558 (JSC::JSCell::isObject):
20559 (JSC::JSCell::isString):
20560 (JSC::JSCell::classInfo):
20561 (JSC::JSCell::createDummyStructure):
20562 (JSC::JSValue::needsThisConversion):
20563 (JSC::MarkStack::internalAppend):
20564 * runtime/StructureChain.h:
20566 2011-04-04 Oliver Hunt <oliver@apple.com>
20570 * wtf/FastMalloc.cpp:
20573 (WTF::fastRealloc):
20575 2011-04-04 Oliver Hunt <oliver@apple.com>
20577 Remove accidental change to Platform.h
20581 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20583 Reviewed by Oliver Hunt.
20585 Fixed a weak-handle-related leak in RegisterFile
20586 https://bugs.webkit.org/show_bug.cgi?id=57793
20588 * interpreter/RegisterFile.cpp: Nixed leaky GlobalObjectNotifier.
20589 * interpreter/RegisterFile.h:
20590 (JSC::RegisterFile::GlobalObjectOwner::finalize):
20591 (JSC::RegisterFile::RegisterFile): Replaced GlobalObjectNotifier with
20592 a per-RegisterFile weak handle owner, which does not leak.
20594 * runtime/WeakGCPtr.h:
20595 (JSC::WeakGCPtr::set): Allow set() to take a context argument, since
20596 RegisterFile now needs this. (Seems like it was an accidental omission
20599 2011-04-04 Oliver Hunt <oliver@apple.com>
20601 Reviewed by Geoffrey Garen.
20603 Make malloc validation useful
20604 https://bugs.webkit.org/show_bug.cgi?id=57502
20606 This patch changes FAST_MALLOC_MATCH_VALIDATION with a general
20607 corruption check that tags the beginning and end of all allocations
20608 to check for write overflows and overwrites the contents of
20609 memory on free in order to (hopefully) show up use-after-free issues
20612 We also turn it on by default for debug builds.
20614 * JavaScriptCore.exp:
20615 * wtf/FastMalloc.cpp:
20616 (WTF::tryFastMalloc):
20618 (WTF::tryFastCalloc):
20621 (WTF::tryFastRealloc):
20622 (WTF::fastRealloc):
20623 (WTF::TCMalloc_PageHeap::isScavengerSuspended):
20624 (WTF::TCMalloc_PageHeap::scheduleScavenger):
20625 (WTF::TCMalloc_PageHeap::suspendScavenger):
20626 (WTF::TCMalloc_PageHeap::signalScavenger):
20627 (WTF::TCMallocStats::malloc):
20628 (WTF::TCMallocStats::free):
20629 (WTF::TCMallocStats::fastCalloc):
20630 (WTF::TCMallocStats::tryFastCalloc):
20631 (WTF::TCMallocStats::calloc):
20632 (WTF::TCMallocStats::fastRealloc):
20633 (WTF::TCMallocStats::tryFastRealloc):
20634 (WTF::TCMallocStats::realloc):
20635 * wtf/FastMalloc.h:
20636 (WTF::Internal::fastMallocValidationHeader):
20637 (WTF::Internal::fastMallocValidationSuffix):
20638 (WTF::Internal::fastMallocMatchValidationType):
20639 (WTF::Internal::setFastMallocMatchValidationType):
20640 (WTF::fastMallocMatchValidateFree):
20641 (WTF::fastMallocValidate):
20644 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20646 Reviewed by Oliver Hunt.
20648 Renamed clearWeakPointers => updateWeakHandles and removed misleading comment
20649 https://bugs.webkit.org/show_bug.cgi?id=57790
20651 * collector/handles/HandleHeap.cpp:
20652 (JSC::HandleHeap::updateWeakHandles): Updated for rename.
20654 * collector/handles/HandleHeap.h: Removed comment claiming that this
20655 function should only be called during teardown, because it's actually
20656 called after every GC pass.
20658 * runtime/Heap.cpp:
20659 (JSC::Heap::destroy):
20660 (JSC::Heap::markRoots): Updated for rename.
20662 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20664 Reviewed by Oliver Hunt.
20666 Standardized handling of handles for immediate values
20667 https://bugs.webkit.org/show_bug.cgi?id=57788
20669 * collector/handles/HandleHeap.cpp:
20670 (JSC::HandleHeap::clearWeakPointers): Don't check for null or non-cell
20671 values here, because our write barrier guarantees that such values are
20672 not in the weak list.
20674 (JSC::HandleHeap::writeBarrier): Standardized on checking for null before
20675 checking for cell, and on using early return instead of if/else.
20677 * collector/handles/HandleHeap.h:
20678 (JSC::HandleHeap::deallocate):
20679 (JSC::HandleHeap::makeWeak): Ditto.
20681 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20685 Removed a redundant variable from HandleHeap
20686 https://bugs.webkit.org/show_bug.cgi?id=57786
20688 Forgot to commit the file that actually removes the data member!
20690 * collector/handles/HandleHeap.h:
20692 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20694 Reviewed by Oliver Hunt.
20696 Removed a redundant variable from HandleHeap
20697 https://bugs.webkit.org/show_bug.cgi?id=57786
20699 We don't need a specific variable to indicate that we're in the middle
20700 of the finalization phase, since m_nextToFinalize already does this.
20702 * collector/handles/HandleHeap.cpp:
20703 (JSC::HandleHeap::HandleHeap):
20704 (JSC::HandleHeap::clearWeakPointers):
20705 (JSC::HandleHeap::writeBarrier):
20707 2011-04-04 Geoffrey Garen <ggaren@apple.com>
20709 Reviewed by Oliver Hunt.
20711 Renamed Finalizer => WeakHandleOwner (in preparation for adding a reachability callback)
20712 https://bugs.webkit.org/show_bug.cgi?id=57775
20714 Also renamed noFinalizer => emptyWeakOwner, since this is really an
20715 optimization for a weak owner with empty callbacks.
20717 * collector/handles/HandleHeap.cpp:
20718 (JSC::HandleHeap::clearWeakPointers): Updated for renames. Removed
20719 redundant initialization of m_nextToFinalize. Moved deletion check inside
20720 weak owner check, since the weak owner can't delete the node if there is
20723 * collector/handles/HandleHeap.h:
20724 (JSC::WeakHandleOwner::~WeakHandleOwner):
20725 (JSC::HandleHeap::makeWeak): Updated for renames.
20727 (JSC::HandleHeap::hasWeakOwner): Changed getFinalizer to hasWeakOwner,
20728 to clarify this function's role in assertions.
20730 (JSC::HandleHeap::Node::Node):
20731 (JSC::HandleHeap::Node::makeWeak):
20732 (JSC::HandleHeap::Node::isWeak):
20733 (JSC::HandleHeap::Node::weakOwner):
20734 (JSC::HandleHeap::Node::weakOwnerContext):
20735 (JSC::HandleHeap::Node::emptyWeakOwner):
20736 * interpreter/RegisterFile.cpp:
20737 (JSC::RegisterFile::globalObjectCollectedNotifier):
20738 * interpreter/RegisterFile.h:
20739 * runtime/WeakGCMap.h:
20740 * runtime/WeakGCPtr.h:
20741 (JSC::WeakGCPtr::WeakGCPtr):
20742 (JSC::WeakGCPtr::set): Updated for renames.
20744 2011-04-04 Oliver Hunt <oliver@apple.com>
20748 * bytecode/Instruction.h:
20749 * interpreter/Interpreter.cpp:
20750 (JSC::Interpreter::tryCachePutByID):
20751 (JSC::Interpreter::tryCacheGetByID):
20753 2011-04-04 Adam Roben <aroben@apple.com>
20755 Delete mt.dep files when doing a clean build due to .vsprops file changes
20757 Apparently this is yet another file that Visual Studio can't figure out it needs to rebuild.
20759 Fixes <http://webkit.org/b/57777> r82850 failed to build on Windows Debug (Build)
20761 Reviewed by Brian Weinstein.
20763 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
20764 (main): Added dep to the list of extensions we look for when choosing files to delete.
20766 2011-04-01 Oliver Hunt <oliver@apple.com>
20768 Reviewed by Geoffrey Garen.
20770 Make StructureChain GC allocated
20771 https://bugs.webkit.org/show_bug.cgi?id=56695
20773 Make StructureChain GC allocated, and make the various owners
20776 * JavaScriptCore.exp:
20777 * bytecode/CodeBlock.cpp:
20778 (JSC::CodeBlock::dump):
20779 (JSC::CodeBlock::derefStructures):
20780 (JSC::CodeBlock::refStructures):
20781 (JSC::CodeBlock::markAggregate):
20782 * bytecode/Instruction.h:
20783 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
20784 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
20785 (JSC::PolymorphicAccessStructureList::derefStructures):
20786 (JSC::PolymorphicAccessStructureList::markAggregate):
20787 (JSC::Instruction::Instruction):
20788 * bytecode/StructureStubInfo.cpp:
20789 (JSC::StructureStubInfo::deref):
20790 (JSC::StructureStubInfo::markAggregate):
20791 * bytecode/StructureStubInfo.h:
20792 (JSC::StructureStubInfo::initGetByIdChain):
20793 (JSC::StructureStubInfo::initPutByIdTransition):
20794 * bytecompiler/BytecodeGenerator.cpp:
20795 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
20796 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
20797 * collector/handles/Handle.h:
20798 (JSC::HandleConverter::operator->):
20799 (JSC::HandleConverter::operator*):
20800 * interpreter/Interpreter.cpp:
20801 (JSC::Interpreter::privateExecute):
20802 * jit/JITOpcodes.cpp:
20803 (JSC::JIT::emit_op_jneq_ptr):
20804 * jit/JITOpcodes32_64.cpp:
20805 (JSC::JIT::emit_op_jneq_ptr):
20806 * jit/JITPropertyAccess.cpp:
20807 (JSC::JIT::privateCompileGetByIdChainList):
20808 * jit/JITPropertyAccess32_64.cpp:
20809 (JSC::JIT::privateCompileGetByIdChainList):
20810 * jit/JITStubs.cpp:
20811 (JSC::JITThunks::tryCachePutByID):
20812 (JSC::JITThunks::tryCacheGetByID):
20813 (JSC::getPolymorphicAccessStructureListSlot):
20814 (JSC::DEFINE_STUB_FUNCTION):
20815 * runtime/JSCell.h:
20816 * runtime/JSGlobalData.cpp:
20817 (JSC::JSGlobalData::JSGlobalData):
20818 * runtime/JSGlobalData.h:
20819 * runtime/JSGlobalObject.cpp:
20820 (JSC::markIfNeeded):
20821 * runtime/JSGlobalObject.h:
20822 (JSC::Structure::prototypeChain):
20823 * runtime/JSObject.h:
20824 (JSC::JSObject::putDirectInternal):
20825 (JSC::JSObject::markChildrenDirect):
20826 * runtime/JSPropertyNameIterator.cpp:
20827 (JSC::JSPropertyNameIterator::create):
20828 (JSC::JSPropertyNameIterator::get):
20829 (JSC::JSPropertyNameIterator::markChildren):
20830 * runtime/JSPropertyNameIterator.h:
20831 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
20832 * runtime/JSZombie.cpp:
20833 (JSC::JSZombie::leakedZombieStructure):
20834 * runtime/JSZombie.h:
20835 * runtime/MarkStack.h:
20836 (JSC::MarkStack::append):
20837 * runtime/MarkedBlock.cpp:
20838 (JSC::MarkedBlock::sweep):
20839 * runtime/Structure.cpp:
20840 (JSC::Structure::addPropertyTransition):
20841 * runtime/Structure.h:
20842 (JSC::Structure::markAggregate):
20843 * runtime/StructureChain.cpp:
20844 (JSC::StructureChain::StructureChain):
20845 (JSC::StructureChain::~StructureChain):
20846 (JSC::StructureChain::markChildren):
20847 * runtime/StructureChain.h:
20848 (JSC::StructureChain::create):
20849 (JSC::StructureChain::createStructure):
20850 * runtime/WriteBarrier.h:
20851 (JSC::WriteBarrierBase::get):
20852 (JSC::WriteBarrierBase::operator*):
20853 (JSC::WriteBarrierBase::operator->):
20855 2011-04-01 Geoffrey Garen <ggaren@apple.com>
20857 Reviewed by Oliver Hunt.
20859 Removed some complexity from HandleHeap
20860 https://bugs.webkit.org/show_bug.cgi?id=57650
20862 Eliminated pointer-tagging flags.
20864 Tied being weak to having a finalizer (or at least a finalizer sentinel).
20866 * collector/handles/HandleHeap.cpp:
20867 (JSC::HandleHeap::clearWeakPointers): Removed the special self-destroying
20868 flag. It was unused. If we bring it back, we'll probably use a shared
20869 autodeallocating finalizer instead.
20871 * collector/handles/HandleHeap.h:
20872 (JSC::HandleHeap::makeWeak): makeWeak and adding a finalizer are now
20873 a single, atomic operation -- this makes the relationship between
20874 finalizers and weak pointers clearer, and impossible to get wrong.
20876 (JSC::HandleHeap::Node::Node):
20877 (JSC::HandleHeap::Node::handleHeap): No more flags.
20879 (JSC::HandleHeap::Node::makeWeak):
20880 (JSC::HandleHeap::Node::isWeak): Ditto above. We use a special sentienl
20881 value in the finalizer slot to indicate that a handle is weak but doesn't
20882 require an external function call for finalization.
20884 2011-04-01 Geoffrey Garen <ggaren@apple.com>
20886 Reviewed by Oliver Hunt.
20888 Removed WeakGCMap::deprecatedRemove because it was deprecated and unused
20889 https://bugs.webkit.org/show_bug.cgi?id=57648
20891 * runtime/WeakGCMap.h:
20893 2011-04-01 Adam Roben <aroben@apple.com>
20895 Maintain the invariant that Lexer::m_current is set to -1 when at the end of the code buffer
20897 Covered by existing tests.
20899 Fixes <http://webkit.org/b/56699>.
20901 Reviewed by Oliver Hunt.
20904 (JSC::Lexer::setOffset): Copied code from Lexer::shift to update m_current, because
20905 supposedly the idiom that function uses is fast.
20907 2011-03-31 Thouraya ANDOLSI <thouraya.andolsi@st.com>
20909 Reviewed by Oliver Hunt.
20912 https://bugs.webkit.org/show_bug.cgi?id=44329
20914 Add YARR support for SH4 platforms (disabled by default).
20917 * assembler/MacroAssembler.h:
20918 * assembler/MacroAssemblerSH4.cpp: Added.
20919 * assembler/MacroAssemblerSH4.h: Added.
20920 * assembler/SH4Assembler.h: Added.
20921 * yarr/YarrJIT.cpp:
20923 2011-03-30 Adam Roben <aroben@apple.com>
20927 * JavaScriptCore.vcproj/JavaScriptCore.sln: Serialized project dependencies so projects
20928 don't try to build in parallel (which doesn't mesh with our buildfailed mechanism).
20930 2011-03-30 Oliver Hunt <oliver@apple.com>
20934 * bytecode/CodeBlock.cpp:
20935 (JSC::CodeBlock::dump):
20936 (JSC::CodeBlock::derefStructures):
20937 (JSC::CodeBlock::refStructures):
20938 (JSC::CodeBlock::markAggregate):
20939 * bytecode/Instruction.h:
20940 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
20941 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
20942 (JSC::PolymorphicAccessStructureList::derefStructures):
20943 (JSC::Instruction::Instruction):
20944 * bytecode/StructureStubInfo.cpp:
20945 (JSC::StructureStubInfo::deref):
20946 * bytecode/StructureStubInfo.h:
20947 (JSC::StructureStubInfo::initGetByIdChain):
20948 (JSC::StructureStubInfo::initPutByIdTransition):
20949 * bytecompiler/BytecodeGenerator.cpp:
20950 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
20951 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
20952 * interpreter/Interpreter.cpp:
20953 (JSC::Interpreter::privateExecute):
20954 * jit/JITOpcodes.cpp:
20955 (JSC::JIT::emit_op_jneq_ptr):
20956 * jit/JITOpcodes32_64.cpp:
20957 (JSC::JIT::emit_op_jneq_ptr):
20958 * jit/JITPropertyAccess.cpp:
20959 (JSC::JIT::privateCompileGetByIdChainList):
20960 * jit/JITPropertyAccess32_64.cpp:
20961 (JSC::JIT::privateCompileGetByIdChainList):
20962 * jit/JITStubs.cpp:
20963 (JSC::getPolymorphicAccessStructureListSlot):
20964 (JSC::DEFINE_STUB_FUNCTION):
20965 * runtime/JSCell.h:
20966 * runtime/JSGlobalData.cpp:
20967 (JSC::JSGlobalData::JSGlobalData):
20968 * runtime/JSGlobalData.h:
20969 * runtime/JSGlobalObject.cpp:
20970 (JSC::markIfNeeded):
20971 * runtime/JSGlobalObject.h:
20972 (JSC::Structure::prototypeChain):
20973 * runtime/JSObject.h:
20974 (JSC::JSObject::markChildrenDirect):
20975 * runtime/JSPropertyNameIterator.cpp:
20976 (JSC::JSPropertyNameIterator::create):
20977 (JSC::JSPropertyNameIterator::get):
20978 (JSC::JSPropertyNameIterator::markChildren):
20979 * runtime/JSPropertyNameIterator.h:
20980 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
20981 * runtime/MarkStack.h:
20982 (JSC::MarkStack::append):
20983 * runtime/Structure.h:
20984 * runtime/StructureChain.cpp:
20985 (JSC::StructureChain::StructureChain):
20986 * runtime/StructureChain.h:
20987 (JSC::StructureChain::create):
20989 2011-03-29 Matthew Delaney <mdelaney@apple.com>
20991 Reviewed by Simon Fraser.
20993 Use the Accelerate vImage vectorized (un)premultiplyImageData functions for ImageBufferCG
20995 https://bugs.webkit.org/show_bug.cgi?id=53134
20997 * wtf/Platform.h: Added in WTF flag for using the Accelerate framework
20999 2011-03-30 Steve Falkenburg <sfalken@apple.com>
21001 Reviewed by Adam Roben.
21003 Share most vsprops between Release and Production builds in releaseproduction.vsprops
21004 https://bugs.webkit.org/show_bug.cgi?id=57508
21006 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
21007 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops:
21008 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops:
21009 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
21010 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
21011 * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
21012 * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops:
21013 * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops:
21014 * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
21015 * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
21016 * JavaScriptCore.vcproj/jsc/jscRelease.vsprops:
21017 * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops:
21018 * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
21019 * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
21020 * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops:
21021 * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops:
21023 2011-03-30 Mark Rowe <mrowe@apple.com>
21025 Reviewed by Adam Roben.
21027 Explicitly prevent testapi and minidom from being installed rather than relying
21028 on Xcode's current behavior of not installing if INSTALL_PATH is not explicitly
21029 set at the target level.
21031 <rdar://problem/9206357>
21033 * JavaScriptCore.xcodeproj/project.pbxproj:
21035 2011-03-30 Timur Iskhodzhanov <timurrrr@google.com>
21037 Reviewed by Alexey Proskuryakov.
21039 Add some dynamic annotations to JavaScriptCore/wtf
21040 https://bugs.webkit.org/show_bug.cgi?id=53747
21042 By using these annotations we can improve the precision of finding
21043 WebKit errors using dynamic analysis tools like ThreadSanitizer and Valgrind.
21044 These annotations don't affect the compiled binaries unless USE(DYNAMIC_ANNOTATIONS) is "1".
21046 These files don't add new functionality, so don't need extra tests.
21049 * JavaScriptCore.gypi:
21050 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
21051 * JavaScriptCore.xcodeproj/project.pbxproj:
21052 * wtf/CMakeLists.txt:
21053 * wtf/DynamicAnnotations.cpp: Added.
21054 (WTFAnnotateBenignRaceSized):
21055 (WTFAnnotateHappensBefore):
21056 (WTFAnnotateHappensAfter):
21057 * wtf/DynamicAnnotations.h: Added.
21058 * wtf/ThreadSafeRefCounted.h:
21059 (WTF::ThreadSafeRefCountedBase::derefBase):
21060 * wtf/text/StringStatics.cpp:
21061 (WTF::StringImpl::empty):
21063 2011-03-30 Oliver Hunt <oliver@apple.com>
21065 Reviewed by Geoffrey Garen.
21067 Make StructureChain GC allocated
21068 https://bugs.webkit.org/show_bug.cgi?id=56695
21070 Make StructureChain GC allocated, and make the various owners
21073 * bytecode/CodeBlock.cpp:
21074 (JSC::CodeBlock::dump):
21075 (JSC::CodeBlock::derefStructures):
21076 (JSC::CodeBlock::refStructures):
21077 (JSC::CodeBlock::markAggregate):
21078 * bytecode/Instruction.h:
21079 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
21080 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
21081 (JSC::PolymorphicAccessStructureList::derefStructures):
21082 (JSC::PolymorphicAccessStructureList::markAggregate):
21083 (JSC::Instruction::Instruction):
21084 * bytecode/StructureStubInfo.cpp:
21085 (JSC::StructureStubInfo::deref):
21086 (JSC::StructureStubInfo::markAggregate):
21087 * bytecode/StructureStubInfo.h:
21088 (JSC::StructureStubInfo::initGetByIdChain):
21089 (JSC::StructureStubInfo::initPutByIdTransition):
21090 * bytecompiler/BytecodeGenerator.cpp:
21091 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
21092 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
21093 * interpreter/Interpreter.cpp:
21094 (JSC::Interpreter::privateExecute):
21095 * jit/JITOpcodes.cpp:
21096 (JSC::JIT::emit_op_jneq_ptr):
21097 * jit/JITOpcodes32_64.cpp:
21098 (JSC::JIT::emit_op_jneq_ptr):
21099 * jit/JITPropertyAccess.cpp:
21100 (JSC::JIT::privateCompileGetByIdChainList):
21101 * jit/JITPropertyAccess32_64.cpp:
21102 (JSC::JIT::privateCompileGetByIdChainList):
21103 * jit/JITStubs.cpp:
21104 (JSC::getPolymorphicAccessStructureListSlot):
21105 (JSC::DEFINE_STUB_FUNCTION):
21106 * runtime/JSCell.h:
21107 * runtime/JSGlobalData.cpp:
21108 (JSC::JSGlobalData::JSGlobalData):
21109 * runtime/JSGlobalData.h:
21110 * runtime/JSGlobalObject.cpp:
21111 (JSC::markIfNeeded):
21112 * runtime/JSGlobalObject.h:
21113 (JSC::Structure::prototypeChain):
21114 * runtime/JSObject.h:
21115 (JSC::JSObject::markChildrenDirect):
21116 * runtime/JSPropertyNameIterator.cpp:
21117 (JSC::JSPropertyNameIterator::create):
21118 (JSC::JSPropertyNameIterator::get):
21119 (JSC::JSPropertyNameIterator::markChildren):
21120 * runtime/JSPropertyNameIterator.h:
21121 (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
21122 * runtime/MarkStack.h:
21123 (JSC::MarkStack::append):
21124 * runtime/Structure.h:
21125 (JSC::Structure::cachedPrototypeChainSlot):
21126 * runtime/StructureChain.cpp:
21127 (JSC::StructureChain::StructureChain):
21128 * runtime/StructureChain.h:
21129 (JSC::StructureChain::create):
21130 (JSC::StructureChain::createStructure):
21132 2011-03-30 Steve Falkenburg <sfalken@apple.com>
21134 Reviewed by Adam Roben.
21136 Update Windows production build logic for new production configurations
21137 https://bugs.webkit.org/show_bug.cgi?id=57494
21139 * JavaScriptCore.vcproj/JavaScriptCore.make:
21140 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
21141 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
21142 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
21143 * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
21144 * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
21145 * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
21146 * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
21147 * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
21149 2011-03-30 Steve Falkenburg <sfalken@apple.com>
21151 Reviewed by Adam Roben.
21153 Rename Windows configuration Release_LTCG to Production for clarity
21154 https://bugs.webkit.org/show_bug.cgi?id=57465
21156 * JavaScriptCore.vcproj/JavaScriptCore.sln:
21157 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
21158 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
21159 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops.
21160 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Removed.
21161 * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
21162 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
21163 * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops.
21164 * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Removed.
21165 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
21166 * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops.
21167 * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Removed.
21168 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
21169 * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops.
21170 * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Removed.
21172 2011-03-30 Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
21174 Reviewed by Maciej Stachowiak.
21176 Add the NEXT_OPCODE() macro to the DFG-JIT parser
21177 https://bugs.webkit.org/show_bug.cgi?id=57322
21179 In JavaScriptCore we use macros to jump to the next opcode
21180 (both in interpreter and JIT). This macro is added to the
21181 DFG-JIT parser as well.
21183 * dfg/DFGByteCodeParser.cpp:
21184 (JSC::DFG::ByteCodeParser::parse):
21186 2011-03-29 Geoffrey Garen <ggaren@apple.com>
21188 Reviewed by Darin Adler.
21190 ~25% regression on v8-splay in the SunSpider harness
21191 https://bugs.webkit.org/show_bug.cgi?id=56128
21193 I'm not sure if this is the root cause of the regression Stephanie
21194 measured, but it seems to get us back to previous v8-splay times.
21196 SunSpider reports no change. v8-splay says 41% faster.
21198 * runtime/Heap.cpp:
21199 (JSC::Heap::reset): Make marking proportional to 1X the size of the heap,
21200 not .5X the size of the heap. When the heap is large, this makes a big
21201 difference. (Our old heap growth policy matched this. You can see by
21202 looking at resizeBlocks in revisions prior to r77699.)
21204 2011-03-29 Steve Falkenburg <sfalken@apple.com>
21206 Reviewed by Darin Adler.
21208 Use per-configuration vsprops in JavaScriptCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
21209 https://bugs.webkit.org/show_bug.cgi?id=57350
21211 Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
21212 InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
21213 the IDE. To avoid this, add a separate vsprops file for each project configuration that
21214 contains the required inherited property sheets.
21216 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
21217 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Added.
21218 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Added.
21219 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Added.
21220 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Added.
21221 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Added.
21222 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Added.
21223 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Added.
21224 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Added.
21225 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
21226 * JavaScriptCore.vcproj/WTF/WTFDebug.vsprops: Added.
21227 * JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops: Added.
21228 * JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops: Added.
21229 * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops: Added.
21230 * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops: Added.
21231 * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Added.
21232 * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: Added.
21233 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
21234 * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Added.
21235 * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Added.
21236 * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Added.
21237 * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Added.
21238 * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Added.
21239 * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Added.
21240 * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Added.
21241 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
21242 * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Added.
21243 * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Added.
21244 * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Added.
21245 * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Added.
21246 * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Added.
21247 * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Added.
21249 2011-03-29 Oliver Hunt <oliver@apple.com>
21251 Reviewed by Eric Seidel.
21253 REGRESSION(r82173): Causes assertion and test failures in run-javascriptcore-tests on Windows (Requested by aroben on #webkit).
21254 https://bugs.webkit.org/show_bug.cgi?id=57333
21256 constructDate now takes the global object explicitly as it may be called
21257 by functions other than the constructor itself.
21259 * API/JSObjectRef.cpp:
21260 (JSObjectMakeDate):
21261 * runtime/DateConstructor.cpp:
21262 (JSC::constructDate):
21263 (JSC::constructWithDateConstructor):
21264 * runtime/DateConstructor.h:
21266 2011-03-29 Ben Taylor <bentaylor.solx86@gmail.com>
21268 Reviewed by Benjamin Poulain.
21270 https://bugs.webkit.org/show_bug.cgi?id=41953
21272 Fix compile error on Solaris 10/Sun Studio 12 CC emanating from MathExtras.h
21274 * wtf/MathExtras.h:
21276 2011-03-29 Ben Taylor <bentaylor.solx86@gmail.com>
21278 Reviewed by Darin Adler.
21280 https://bugs.webkit.org/show_bug.cgi?id=57231
21281 Add conditional for SUNCC supporting alignment macros
21283 Compile fix for Solaris 10/Sun Studio 12 CC
21287 2011-03-29 Ben Taylor <bentaylor.solx86@gmail.com>
21289 Reviewed by Darin Adler.
21291 https://bugs.webkit.org/show_bug.cgi?id=57256
21293 Fix crash on misaligned reads on Solaris 10/Sparc
21295 * wtf/text/AtomicString.cpp:
21298 2011-03-28 Oliver Hunt <oliver@apple.com>
21300 Reviewed by Geoffrey Garen.
21302 instanceof Array test fails when using iframes
21303 https://bugs.webkit.org/show_bug.cgi?id=17250
21305 This is a problem with all built in constructors, the use of
21306 lexicalGlobalObject rather than the constructors own
21307 global object reference means that a builtin will always use
21308 the prototype from the lexical global object rather than that
21309 of the constructors origin.
21311 * API/JSObjectRef.cpp:
21312 (JSObjectMakeFunction):
21313 (JSObjectMakeRegExp):
21314 * JavaScriptCore.exp:
21315 * runtime/ArrayConstructor.cpp:
21316 (JSC::constructArrayWithSizeQuirk):
21317 * runtime/BooleanConstructor.cpp:
21318 (JSC::constructBoolean):
21319 (JSC::constructBooleanFromImmediateBoolean):
21320 * runtime/BooleanConstructor.h:
21321 * runtime/DateConstructor.cpp:
21322 (JSC::constructDate):
21323 * runtime/DateInstance.cpp:
21324 * runtime/DateInstance.h:
21325 * runtime/ErrorConstructor.cpp:
21326 (JSC::constructWithErrorConstructor):
21327 (JSC::callErrorConstructor):
21328 * runtime/FunctionConstructor.cpp:
21329 (JSC::constructWithFunctionConstructor):
21330 (JSC::callFunctionConstructor):
21331 (JSC::constructFunction):
21332 * runtime/FunctionConstructor.h:
21333 * runtime/JSCell.cpp:
21334 (JSC::JSCell::getOwnPropertySlot):
21335 (JSC::JSCell::put):
21336 (JSC::JSCell::deleteProperty):
21337 (JSC::JSCell::toThisObject):
21338 (JSC::JSCell::toObject):
21339 * runtime/JSCell.h:
21340 (JSC::JSCell::JSValue::toObject):
21341 * runtime/JSNotAnObject.cpp:
21342 (JSC::JSNotAnObject::toObject):
21343 * runtime/JSNotAnObject.h:
21344 * runtime/JSObject.cpp:
21345 (JSC::JSObject::toObject):
21346 * runtime/JSObject.h:
21347 * runtime/JSString.cpp:
21348 (JSC::StringObject::create):
21349 (JSC::JSString::toObject):
21350 (JSC::JSString::toThisObject):
21351 * runtime/JSString.h:
21352 * runtime/JSValue.cpp:
21353 (JSC::JSValue::toObjectSlowCase):
21354 (JSC::JSValue::toThisObjectSlowCase):
21355 (JSC::JSValue::synthesizeObject):
21356 * runtime/JSValue.h:
21357 * runtime/NumberConstructor.cpp:
21358 (JSC::constructWithNumberConstructor):
21359 * runtime/NumberObject.cpp:
21360 (JSC::constructNumber):
21361 * runtime/NumberObject.h:
21362 * runtime/ObjectConstructor.cpp:
21363 (JSC::constructObject):
21364 (JSC::constructWithObjectConstructor):
21365 (JSC::callObjectConstructor):
21366 * runtime/RegExpConstructor.cpp:
21367 (JSC::constructRegExp):
21368 (JSC::constructWithRegExpConstructor):
21369 (JSC::callRegExpConstructor):
21370 * runtime/RegExpConstructor.h:
21371 * runtime/StringConstructor.cpp:
21372 (JSC::constructWithStringConstructor):
21373 * runtime/StringObject.h:
21375 2011-03-28 Geoffrey Garen <ggaren@apple.com>
21377 Reviewed by Oliver Hunt.
21379 REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large
21380 https://bugs.webkit.org/show_bug.cgi?id=56823
21382 Partial fix for most of the problem. (TOT still shows a regression, though.)
21384 * runtime/Heap.cpp:
21385 (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of
21386 capacity(), since capacity() is O(n) relative to the size of the heap.
21388 In limited circumstances, capacity() is also worse than highWaterMark()
21389 for measuring extra cost relative to heap size, since capacity() only
21390 measures the *current* capacity of the heap, but the heap will grow if
21391 necessary to attain highWaterMark().
21393 2011-03-28 Oliver Hunt <oliver@apple.com>
21395 REGRESSION(r82130): It made all tests crash (Requested by Ossy on #webkit).
21396 https://bugs.webkit.org/show_bug.cgi?id=57251
21398 Build fix, had remnant of another patch in r82130
21400 * jit/JITPropertyAccess.cpp:
21401 (JSC::JIT::privateCompileGetByIdChainList):
21403 2011-03-27 Oliver Hunt <oliver@apple.com>
21405 Reviewed by Maciej Stachowiak.
21407 Add additional immediate types to allow us to distinguish the source of a JIT immediate
21408 https://bugs.webkit.org/show_bug.cgi?id=57190
21410 Allow us to distinguish whether a JIT immediate is a value that we
21411 control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled
21412 or influenced by code we are compiling. Currently we do nothing with this
21413 information -- this change is large and mechanical but would obscure any
21414 logic changes that we would have made.
21416 * assembler/AbstractMacroAssembler.h:
21417 (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
21418 (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
21419 (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
21420 (JSC::AbstractMacroAssembler::Imm32::Imm32):
21421 * assembler/MacroAssembler.h:
21422 (JSC::MacroAssembler::pop):
21423 (JSC::MacroAssembler::poke):
21424 (JSC::MacroAssembler::branchPtr):
21425 (JSC::MacroAssembler::branch32):
21426 (JSC::MacroAssembler::addPtr):
21427 (JSC::MacroAssembler::andPtr):
21428 (JSC::MacroAssembler::orPtr):
21429 (JSC::MacroAssembler::subPtr):
21430 (JSC::MacroAssembler::xorPtr):
21431 (JSC::MacroAssembler::setPtr):
21432 (JSC::MacroAssembler::storePtr):
21433 (JSC::MacroAssembler::branchTestPtr):
21434 (JSC::MacroAssembler::branchSubPtr):
21435 (JSC::MacroAssembler::branchTest8):
21436 * assembler/MacroAssemblerARM.h:
21437 (JSC::MacroAssemblerARM::add32):
21438 (JSC::MacroAssemblerARM::and32):
21439 (JSC::MacroAssemblerARM::lshift32):
21440 (JSC::MacroAssemblerARM::mul32):
21441 (JSC::MacroAssemblerARM::or32):
21442 (JSC::MacroAssemblerARM::rshift32):
21443 (JSC::MacroAssemblerARM::urshift32):
21444 (JSC::MacroAssemblerARM::sub32):
21445 (JSC::MacroAssemblerARM::xor32):
21446 (JSC::MacroAssemblerARM::store32):
21447 (JSC::MacroAssemblerARM::push):
21448 (JSC::MacroAssemblerARM::move):
21449 (JSC::MacroAssemblerARM::branch8):
21450 (JSC::MacroAssemblerARM::branch32):
21451 (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
21452 (JSC::MacroAssemblerARM::branch16):
21453 (JSC::MacroAssemblerARM::branchTest8):
21454 (JSC::MacroAssemblerARM::branchTest32):
21455 (JSC::MacroAssemblerARM::branchAdd32):
21456 (JSC::MacroAssemblerARM::branchMul32):
21457 (JSC::MacroAssemblerARM::branchSub32):
21458 (JSC::MacroAssemblerARM::set32Compare32):
21459 (JSC::MacroAssemblerARM::set8Compare32):
21460 (JSC::MacroAssemblerARM::set32Test32):
21461 (JSC::MacroAssemblerARM::set32Test8):
21462 (JSC::MacroAssemblerARM::moveWithPatch):
21463 (JSC::MacroAssemblerARM::branchPtrWithPatch):
21464 (JSC::MacroAssemblerARM::storePtrWithPatch):
21465 * assembler/MacroAssemblerARMv7.h:
21466 (JSC::MacroAssemblerARMv7::add32):
21467 (JSC::MacroAssemblerARMv7::and32):
21468 (JSC::MacroAssemblerARMv7::lshift32):
21469 (JSC::MacroAssemblerARMv7::mul32):
21470 (JSC::MacroAssemblerARMv7::or32):
21471 (JSC::MacroAssemblerARMv7::rshift32):
21472 (JSC::MacroAssemblerARMv7::urshift32):
21473 (JSC::MacroAssemblerARMv7::sub32):
21474 (JSC::MacroAssemblerARMv7::xor32):
21475 (JSC::MacroAssemblerARMv7::load32):
21476 (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch):
21477 (JSC::MacroAssemblerARMv7::load16):
21478 (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch):
21479 (JSC::MacroAssemblerARMv7::store32):
21480 (JSC::MacroAssemblerARMv7::loadDouble):
21481 (JSC::MacroAssemblerARMv7::storeDouble):
21482 (JSC::MacroAssemblerARMv7::push):
21483 (JSC::MacroAssemblerARMv7::move):
21484 (JSC::MacroAssemblerARMv7::compare32):
21485 (JSC::MacroAssemblerARMv7::test32):
21486 (JSC::MacroAssemblerARMv7::branch32):
21487 (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
21488 (JSC::MacroAssemblerARMv7::branch16):
21489 (JSC::MacroAssemblerARMv7::branch8):
21490 (JSC::MacroAssemblerARMv7::branchTest32):
21491 (JSC::MacroAssemblerARMv7::branchTest8):
21492 (JSC::MacroAssemblerARMv7::branchAdd32):
21493 (JSC::MacroAssemblerARMv7::branchMul32):
21494 (JSC::MacroAssemblerARMv7::branchSub32):
21495 (JSC::MacroAssemblerARMv7::nearCall):
21496 (JSC::MacroAssemblerARMv7::call):
21497 (JSC::MacroAssemblerARMv7::set32Compare32):
21498 (JSC::MacroAssemblerARMv7::set8Compare32):
21499 (JSC::MacroAssemblerARMv7::set32Test32):
21500 (JSC::MacroAssemblerARMv7::set32Test8):
21501 (JSC::MacroAssemblerARMv7::moveWithPatch):
21502 (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
21503 (JSC::MacroAssemblerARMv7::storePtrWithPatch):
21504 (JSC::MacroAssemblerARMv7::tailRecursiveCall):
21505 (JSC::MacroAssemblerARMv7::makeJump):
21506 (JSC::MacroAssemblerARMv7::makeBranch):
21507 (JSC::MacroAssemblerARMv7::setupArmAddress):
21508 (JSC::MacroAssemblerARMv7::makeBaseIndexBase):
21509 (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
21510 * assembler/MacroAssemblerMIPS.h:
21511 (JSC::MacroAssemblerMIPS::add32):
21512 (JSC::MacroAssemblerMIPS::and32):
21513 (JSC::MacroAssemblerMIPS::lshift32):
21514 (JSC::MacroAssemblerMIPS::mul32):
21515 (JSC::MacroAssemblerMIPS::or32):
21516 (JSC::MacroAssemblerMIPS::rshift32):
21517 (JSC::MacroAssemblerMIPS::urshift32):
21518 (JSC::MacroAssemblerMIPS::sub32):
21519 (JSC::MacroAssemblerMIPS::xor32):
21520 (JSC::MacroAssemblerMIPS::load32):
21521 (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
21522 (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
21523 (JSC::MacroAssemblerMIPS::store32):
21524 (JSC::MacroAssemblerMIPS::push):
21525 (JSC::MacroAssemblerMIPS::move):
21526 (JSC::MacroAssemblerMIPS::branch8):
21527 (JSC::MacroAssemblerMIPS::branch32):
21528 (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
21529 (JSC::MacroAssemblerMIPS::branch16):
21530 (JSC::MacroAssemblerMIPS::branchTest32):
21531 (JSC::MacroAssemblerMIPS::branchTest8):
21532 (JSC::MacroAssemblerMIPS::branchAdd32):
21533 (JSC::MacroAssemblerMIPS::branchMul32):
21534 (JSC::MacroAssemblerMIPS::branchSub32):
21535 (JSC::MacroAssemblerMIPS::set8Compare32):
21536 (JSC::MacroAssemblerMIPS::set32Compare32):
21537 (JSC::MacroAssemblerMIPS::set32Test8):
21538 (JSC::MacroAssemblerMIPS::set32Test32):
21539 (JSC::MacroAssemblerMIPS::moveWithPatch):
21540 (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
21541 (JSC::MacroAssemblerMIPS::storePtrWithPatch):
21542 (JSC::MacroAssemblerMIPS::tailRecursiveCall):
21543 (JSC::MacroAssemblerMIPS::loadDouble):
21544 (JSC::MacroAssemblerMIPS::storeDouble):
21545 (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
21546 * assembler/MacroAssemblerX86.h:
21547 (JSC::MacroAssemblerX86::add32):
21548 (JSC::MacroAssemblerX86::addWithCarry32):
21549 (JSC::MacroAssemblerX86::and32):
21550 (JSC::MacroAssemblerX86::or32):
21551 (JSC::MacroAssemblerX86::sub32):
21552 (JSC::MacroAssemblerX86::store32):
21553 (JSC::MacroAssemblerX86::branch32):
21554 (JSC::MacroAssemblerX86::moveWithPatch):
21555 (JSC::MacroAssemblerX86::branchPtrWithPatch):
21556 (JSC::MacroAssemblerX86::storePtrWithPatch):
21557 * assembler/MacroAssemblerX86Common.h:
21558 (JSC::MacroAssemblerX86Common::add32):
21559 (JSC::MacroAssemblerX86Common::and32):
21560 (JSC::MacroAssemblerX86Common::lshift32):
21561 (JSC::MacroAssemblerX86Common::mul32):
21562 (JSC::MacroAssemblerX86Common::or32):
21563 (JSC::MacroAssemblerX86Common::rshift32):
21564 (JSC::MacroAssemblerX86Common::urshift32):
21565 (JSC::MacroAssemblerX86Common::sub32):
21566 (JSC::MacroAssemblerX86Common::xor32):
21567 (JSC::MacroAssemblerX86Common::store32):
21568 (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
21569 (JSC::MacroAssemblerX86Common::push):
21570 (JSC::MacroAssemblerX86Common::move):
21571 (JSC::MacroAssemblerX86Common::branch8):
21572 (JSC::MacroAssemblerX86Common::branch32):
21573 (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
21574 (JSC::MacroAssemblerX86Common::branch16):
21575 (JSC::MacroAssemblerX86Common::branchTest32):
21576 (JSC::MacroAssemblerX86Common::branchTest8):
21577 (JSC::MacroAssemblerX86Common::branchAdd32):
21578 (JSC::MacroAssemblerX86Common::branchMul32):
21579 (JSC::MacroAssemblerX86Common::branchSub32):
21580 (JSC::MacroAssemblerX86Common::set8Compare32):
21581 (JSC::MacroAssemblerX86Common::set32Compare32):
21582 (JSC::MacroAssemblerX86Common::set32Test8):
21583 (JSC::MacroAssemblerX86Common::set32Test32):
21584 * assembler/MacroAssemblerX86_64.h:
21585 (JSC::MacroAssemblerX86_64::add32):
21586 (JSC::MacroAssemblerX86_64::and32):
21587 (JSC::MacroAssemblerX86_64::or32):
21588 (JSC::MacroAssemblerX86_64::sub32):
21589 (JSC::MacroAssemblerX86_64::loadDouble):
21590 (JSC::MacroAssemblerX86_64::addDouble):
21591 (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
21592 (JSC::MacroAssemblerX86_64::store32):
21593 (JSC::MacroAssemblerX86_64::call):
21594 (JSC::MacroAssemblerX86_64::tailRecursiveCall):
21595 (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
21596 (JSC::MacroAssemblerX86_64::addPtr):
21597 (JSC::MacroAssemblerX86_64::andPtr):
21598 (JSC::MacroAssemblerX86_64::orPtr):
21599 (JSC::MacroAssemblerX86_64::subPtr):
21600 (JSC::MacroAssemblerX86_64::xorPtr):
21601 (JSC::MacroAssemblerX86_64::storePtr):
21602 (JSC::MacroAssemblerX86_64::setPtr):
21603 (JSC::MacroAssemblerX86_64::branchPtr):
21604 (JSC::MacroAssemblerX86_64::branchTestPtr):
21605 (JSC::MacroAssemblerX86_64::branchSubPtr):
21606 (JSC::MacroAssemblerX86_64::moveWithPatch):
21607 (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
21608 (JSC::MacroAssemblerX86_64::storePtrWithPatch):
21609 (JSC::MacroAssemblerX86_64::branchTest8):
21610 * dfg/DFGJITCodeGenerator.h:
21611 (JSC::DFG::JITCodeGenerator::callOperation):
21612 * dfg/DFGJITCompiler.cpp:
21613 (JSC::DFG::JITCompiler::jitAssertIsInt32):
21614 (JSC::DFG::JITCompiler::emitCount):
21615 * dfg/DFGJITCompiler.h:
21616 (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
21617 * dfg/DFGNonSpeculativeJIT.cpp:
21618 (JSC::DFG::NonSpeculativeJIT::compile):
21619 * dfg/DFGSpeculativeJIT.cpp:
21620 (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
21621 (JSC::DFG::SpeculativeJIT::compile):
21623 (JSC::JIT::emitTimeoutCheck):
21624 (JSC::JIT::privateCompile):
21626 * jit/JITArithmetic.cpp:
21627 (JSC::JIT::emit_op_urshift):
21628 (JSC::JIT::emitSlow_op_urshift):
21629 (JSC::JIT::emit_op_post_inc):
21630 (JSC::JIT::emit_op_post_dec):
21631 (JSC::JIT::emit_op_pre_inc):
21632 (JSC::JIT::emit_op_pre_dec):
21633 (JSC::JIT::emit_op_mod):
21634 * jit/JITArithmetic32_64.cpp:
21635 (JSC::JIT::emit_op_negate):
21636 (JSC::JIT::emit_op_jnless):
21637 (JSC::JIT::emit_op_jless):
21638 (JSC::JIT::emit_op_jlesseq):
21639 (JSC::JIT::emit_op_lshift):
21640 (JSC::JIT::emitRightShift):
21641 (JSC::JIT::emitRightShiftSlowCase):
21642 (JSC::JIT::emit_op_bitand):
21643 (JSC::JIT::emit_op_bitor):
21644 (JSC::JIT::emit_op_bitxor):
21645 (JSC::JIT::emit_op_bitnot):
21646 (JSC::JIT::emit_op_post_inc):
21647 (JSC::JIT::emit_op_post_dec):
21648 (JSC::JIT::emitSlow_op_post_dec):
21649 (JSC::JIT::emit_op_pre_inc):
21650 (JSC::JIT::emit_op_pre_dec):
21651 (JSC::JIT::emit_op_add):
21652 (JSC::JIT::emitAdd32Constant):
21653 (JSC::JIT::emit_op_sub):
21654 (JSC::JIT::emitSub32Constant):
21655 (JSC::JIT::emitBinaryDoubleOp):
21656 (JSC::JIT::emit_op_mul):
21657 (JSC::JIT::emitSlow_op_mul):
21658 (JSC::JIT::emit_op_div):
21659 (JSC::JIT::emit_op_mod):
21661 (JSC::JIT::compileOpCallVarargs):
21662 (JSC::JIT::compileOpCall):
21663 (JSC::JIT::compileOpCallSlowCase):
21664 * jit/JITCall32_64.cpp:
21665 (JSC::JIT::compileOpCallVarargs):
21666 (JSC::JIT::emit_op_ret_object_or_this):
21667 (JSC::JIT::compileOpCall):
21668 (JSC::JIT::compileOpCallSlowCase):
21669 * jit/JITInlineMethods.h:
21670 (JSC::JIT::emitPutCellToCallFrameHeader):
21671 (JSC::JIT::emitPutIntToCallFrameHeader):
21672 (JSC::JIT::emitPutImmediateToCallFrameHeader):
21673 (JSC::JIT::emitLoadCharacterString):
21674 (JSC::JIT::restoreArgumentReferenceForTrampoline):
21675 (JSC::JIT::checkStructure):
21676 (JSC::JIT::setSamplingFlag):
21677 (JSC::JIT::clearSamplingFlag):
21678 (JSC::JIT::emitCount):
21679 (JSC::JIT::sampleInstruction):
21680 (JSC::JIT::sampleCodeBlock):
21681 (JSC::JIT::emitStoreInt32):
21682 (JSC::JIT::emitStoreCell):
21683 (JSC::JIT::emitStoreBool):
21684 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
21685 (JSC::JIT::emitInitRegister):
21686 (JSC::JIT::emitJumpIfJSCell):
21687 (JSC::JIT::emitJumpIfNotJSCell):
21688 (JSC::JIT::emitJumpIfImmediateInteger):
21689 (JSC::JIT::emitJumpIfNotImmediateInteger):
21690 (JSC::JIT::emitFastArithDeTagImmediate):
21691 (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
21692 (JSC::JIT::emitFastArithReTagImmediate):
21693 (JSC::JIT::emitTagAsBoolImmediate):
21694 * jit/JITOpcodes.cpp:
21695 (JSC::JIT::privateCompileCTIMachineTrampolines):
21696 (JSC::JIT::privateCompileCTINativeCall):
21697 (JSC::JIT::emit_op_check_has_instance):
21698 (JSC::JIT::emit_op_instanceof):
21699 (JSC::JIT::emit_op_ret_object_or_this):
21700 (JSC::JIT::emit_op_resolve):
21701 (JSC::JIT::emit_op_to_primitive):
21702 (JSC::JIT::emit_op_resolve_base):
21703 (JSC::JIT::emit_op_ensure_property_exists):
21704 (JSC::JIT::emit_op_resolve_skip):
21705 (JSC::JIT::emit_op_resolve_global):
21706 (JSC::JIT::emitSlow_op_resolve_global):
21707 (JSC::JIT::emit_op_not):
21708 (JSC::JIT::emit_op_jfalse):
21709 (JSC::JIT::emit_op_jeq_null):
21710 (JSC::JIT::emit_op_jneq_null):
21711 (JSC::JIT::emit_op_jneq_ptr):
21712 (JSC::JIT::emit_op_jsr):
21713 (JSC::JIT::emit_op_resolve_with_base):
21714 (JSC::JIT::emit_op_new_func_exp):
21715 (JSC::JIT::emit_op_jtrue):
21716 (JSC::JIT::emit_op_get_pnames):
21717 (JSC::JIT::emit_op_next_pname):
21718 (JSC::JIT::emit_op_to_jsnumber):
21719 (JSC::JIT::emit_op_push_new_scope):
21720 (JSC::JIT::emit_op_catch):
21721 (JSC::JIT::emit_op_eq_null):
21722 (JSC::JIT::emit_op_neq_null):
21723 (JSC::JIT::emit_op_init_lazy_reg):
21724 (JSC::JIT::emit_op_convert_this):
21725 (JSC::JIT::emit_op_convert_this_strict):
21726 (JSC::JIT::emitSlow_op_not):
21727 (JSC::JIT::emitSlow_op_neq):
21728 (JSC::JIT::emit_op_get_arguments_length):
21729 (JSC::JIT::emitSlow_op_get_arguments_length):
21730 (JSC::JIT::emit_op_get_argument_by_val):
21731 (JSC::JIT::emitSlow_op_resolve_global_dynamic):
21732 (JSC::JIT::emit_op_new_regexp):
21733 (JSC::JIT::emit_op_load_varargs):
21734 (JSC::JIT::emitSlow_op_load_varargs):
21735 (JSC::JIT::emit_op_new_func):
21736 * jit/JITOpcodes32_64.cpp:
21737 (JSC::JIT::privateCompileCTIMachineTrampolines):
21738 (JSC::JIT::privateCompileCTINativeCall):
21739 (JSC::JIT::emit_op_loop_if_lesseq):
21740 (JSC::JIT::emit_op_check_has_instance):
21741 (JSC::JIT::emit_op_instanceof):
21742 (JSC::JIT::emit_op_get_scoped_var):
21743 (JSC::JIT::emit_op_put_scoped_var):
21744 (JSC::JIT::emit_op_tear_off_activation):
21745 (JSC::JIT::emit_op_tear_off_arguments):
21746 (JSC::JIT::emit_op_resolve):
21747 (JSC::JIT::emit_op_to_primitive):
21748 (JSC::JIT::emit_op_resolve_base):
21749 (JSC::JIT::emit_op_ensure_property_exists):
21750 (JSC::JIT::emit_op_resolve_skip):
21751 (JSC::JIT::emit_op_resolve_global):
21752 (JSC::JIT::emitSlow_op_resolve_global):
21753 (JSC::JIT::emit_op_not):
21754 (JSC::JIT::emit_op_jfalse):
21755 (JSC::JIT::emit_op_jtrue):
21756 (JSC::JIT::emit_op_jeq_null):
21757 (JSC::JIT::emit_op_jneq_null):
21758 (JSC::JIT::emit_op_jneq_ptr):
21759 (JSC::JIT::emit_op_jsr):
21760 (JSC::JIT::emit_op_eq):
21761 (JSC::JIT::emitSlow_op_eq):
21762 (JSC::JIT::emit_op_neq):
21763 (JSC::JIT::emitSlow_op_neq):
21764 (JSC::JIT::compileOpStrictEq):
21765 (JSC::JIT::emit_op_eq_null):
21766 (JSC::JIT::emit_op_neq_null):
21767 (JSC::JIT::emit_op_resolve_with_base):
21768 (JSC::JIT::emit_op_new_func_exp):
21769 (JSC::JIT::emit_op_get_pnames):
21770 (JSC::JIT::emit_op_next_pname):
21771 (JSC::JIT::emit_op_to_jsnumber):
21772 (JSC::JIT::emit_op_push_new_scope):
21773 (JSC::JIT::emit_op_catch):
21774 (JSC::JIT::emit_op_create_activation):
21775 (JSC::JIT::emit_op_create_arguments):
21776 (JSC::JIT::emit_op_convert_this):
21777 (JSC::JIT::emit_op_convert_this_strict):
21778 (JSC::JIT::emit_op_get_arguments_length):
21779 (JSC::JIT::emitSlow_op_get_arguments_length):
21780 (JSC::JIT::emit_op_get_argument_by_val):
21781 (JSC::JIT::softModulo):
21782 * jit/JITPropertyAccess.cpp:
21783 (JSC::JIT::stringGetByValStubGenerator):
21784 (JSC::JIT::emit_op_get_by_val):
21785 (JSC::JIT::emitSlow_op_get_by_val):
21786 (JSC::JIT::emit_op_get_by_pname):
21787 (JSC::JIT::emit_op_put_by_val):
21788 (JSC::JIT::emit_op_put_by_index):
21789 (JSC::JIT::emit_op_put_getter):
21790 (JSC::JIT::emit_op_put_setter):
21791 (JSC::JIT::emit_op_del_by_id):
21792 (JSC::JIT::emit_op_get_by_id):
21793 (JSC::JIT::emit_op_put_by_id):
21794 (JSC::JIT::emit_op_method_check):
21795 (JSC::JIT::compileGetByIdHotPath):
21796 (JSC::JIT::compileGetByIdSlowCase):
21797 (JSC::JIT::emitSlow_op_put_by_id):
21798 (JSC::JIT::testPrototype):
21799 (JSC::JIT::privateCompilePutByIdTransition):
21800 (JSC::JIT::privateCompilePatchGetArrayLength):
21801 (JSC::JIT::privateCompileGetByIdProto):
21802 (JSC::JIT::privateCompileGetByIdSelfList):
21803 (JSC::JIT::privateCompileGetByIdProtoList):
21804 (JSC::JIT::privateCompileGetByIdChainList):
21805 (JSC::JIT::privateCompileGetByIdChain):
21806 * jit/JITPropertyAccess32_64.cpp:
21807 (JSC::JIT::emit_op_put_getter):
21808 (JSC::JIT::emit_op_put_setter):
21809 (JSC::JIT::emit_op_del_by_id):
21810 (JSC::JIT::emit_op_get_by_id):
21811 (JSC::JIT::emit_op_put_by_id):
21812 (JSC::JIT::emit_op_method_check):
21813 (JSC::JIT::stringGetByValStubGenerator):
21814 (JSC::JIT::emit_op_get_by_val):
21815 (JSC::JIT::emitSlow_op_get_by_val):
21816 (JSC::JIT::emit_op_put_by_val):
21817 (JSC::JIT::compileGetByIdHotPath):
21818 (JSC::JIT::compileGetByIdSlowCase):
21819 (JSC::JIT::emitSlow_op_put_by_id):
21820 (JSC::JIT::testPrototype):
21821 (JSC::JIT::privateCompilePutByIdTransition):
21822 (JSC::JIT::privateCompilePatchGetArrayLength):
21823 (JSC::JIT::privateCompileGetByIdProto):
21824 (JSC::JIT::privateCompileGetByIdSelfList):
21825 (JSC::JIT::privateCompileGetByIdProtoList):
21826 (JSC::JIT::privateCompileGetByIdChainList):
21827 (JSC::JIT::privateCompileGetByIdChain):
21828 (JSC::JIT::emit_op_get_by_pname):
21829 * jit/JITStubCall.h:
21830 (JSC::JITStubCall::addArgument):
21831 * jit/JITStubs.cpp:
21832 (JSC::getPolymorphicAccessStructureListSlot):
21833 (JSC::DEFINE_STUB_FUNCTION):
21834 * jit/JSInterfaceJIT.h:
21835 (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
21836 (JSC::JSInterfaceJIT::emitLoadInt32):
21837 (JSC::JSInterfaceJIT::emitLoadDouble):
21838 * jit/SpecializedThunkJIT.h:
21839 (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
21840 (JSC::SpecializedThunkJIT::loadJSStringArgument):
21841 (JSC::SpecializedThunkJIT::tagReturnAsInt32):
21842 (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
21843 * jit/ThunkGenerators.cpp:
21844 (JSC::charToString):
21845 (JSC::powThunkGenerator):
21846 * yarr/YarrJIT.cpp:
21847 (JSC::Yarr::YarrGenerator::matchCharacterClass):
21848 (JSC::Yarr::YarrGenerator::storeToFrame):
21849 (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
21850 (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
21851 (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
21852 (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
21853 (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
21854 (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
21855 (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
21856 (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
21857 (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
21858 (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
21859 (JSC::Yarr::YarrGenerator::generateDisjunction):
21861 2011-03-28 Andras Becsi <abecsi@webkit.org>
21863 Reviewed by Csaba Osztrogonác.
21865 [Qt] Fix the linking of jsc with MinGW after r81963.
21867 * jsc.pro: add -l and remove the lib suffix.
21869 2011-03-27 Ben Taylor <bentaylor.solx86@gmail.com>
21871 Reviewed by Alexey Proskuryakov.
21873 https://bugs.webkit.org/show_bug.cgi?id=57170 Fix last elements
21874 in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
21876 Compile fix only, no actual code change.
21878 * wtf/MessageQueue.h:
21880 2011-03-25 Oliver Hunt <oliver@apple.com>
21882 Reviewed by Darin Adler.
21884 Allow defineOwnProperty to work on DOMObjects
21885 https://bugs.webkit.org/show_bug.cgi?id=57129
21887 Fix a couple of places where we uses getter()/setter() rather
21888 than [gs]etterPresent().
21890 * runtime/JSObject.cpp:
21891 (JSC::JSObject::defineOwnProperty):
21893 2011-03-25 Geoffrey Garen <ggaren@apple.com>
21895 Reviewed by Oliver Hunt.
21897 Crash when paused at a breakpoint caused by inaccurate Activation records.
21898 https://bugs.webkit.org/show_bug.cgi?id=57120
21900 * runtime/JSActivation.cpp:
21901 (JSC::JSActivation::symbolTableGet):
21902 (JSC::JSActivation::symbolTablePut):
21903 (JSC::JSActivation::getOwnPropertyNames):
21904 (JSC::JSActivation::symbolTablePutWithAttributes):
21906 2011-03-24 Geoffrey Garen <ggaren@apple.com>
21908 Reviewed by Oliver Hunt.
21910 Crash in debugger beneath MarkStack::drain @ me.com, ibm.com
21911 https://bugs.webkit.org/show_bug.cgi?id=57080
21912 <rdar://problem/8525907>
21914 The crash was caused by changes in the executable after recompilation.
21916 The fix is for the activation to copy the data it needs instead of
21917 relying on the data in the executable.
21919 SunSpider and v8 report no change.
21921 * runtime/Arguments.h:
21922 (JSC::JSActivation::copyRegisters): Use our own data members instead of
21923 reading data out of the executable.
21925 * runtime/JSActivation.cpp:
21926 (JSC::JSActivation::JSActivation): Initialize our data members.
21928 (JSC::JSActivation::markChildren):
21929 (JSC::JSActivation::symbolTableGet):
21930 (JSC::JSActivation::symbolTablePut):
21931 (JSC::JSActivation::getOwnPropertyNames):
21932 (JSC::JSActivation::symbolTablePutWithAttributes):
21933 (JSC::JSActivation::isDynamicScope):
21934 (JSC::JSActivation::argumentsGetter): Use our own data members instead of
21935 reading data out of the executable.
21937 * runtime/JSActivation.h: Added new data members to track data previously
21938 tracked by the executable. Since I've removed the executable pointer,
21939 on a 64bit system, I've only made activations bigger by an int.
21941 2011-03-25 David Kilzer <ddkilzer@apple.com>
21943 Remove duplicate entry from JavaScriptCore.exp
21945 JSC::createStackOverflowError(JSC::ExecState*) was originally
21946 exported in r60057, then duplicated in r60392.
21948 * JavaScriptCore.exp: Removed duplicate entry.
21950 2011-03-25 Jarred Nicholls <jarred@sencha.com>
21952 Reviewed by Ariya Hidayat.
21954 [Qt] MSVC Build Error - need to link advapi32.lib for jsc.exe
21955 https://bugs.webkit.org/show_bug.cgi?id=56098
21957 Need to link advapi32.lib for jsc.exe since wtf/OSRandomSource.cpp uses the Win32 Crypto API
21961 2011-03-24 Nikolas Zimmermann <nzimmermann@rim.com>
21963 Reviewed by Darin Adler.
21965 Introduce WTF HexNumber.h
21966 https://bugs.webkit.org/show_bug.cgi?id=56099
21968 Introduce a set of functions that ease converting from a bye or a number to a hex string,
21969 replacing several of these conversions and String::format("%x") usages all over WebCore.
21971 * GNUmakefile.am: Add HexNumber.h to build.
21972 * JavaScriptCore.exp: Export StringBuilder::reserveCapacity.
21973 * JavaScriptCore.gypi: Add HexNumber.h to build.
21974 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity.
21975 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build.
21976 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
21977 * wtf/CMakeLists.txt: Ditto.
21978 * wtf/HexNumber.h: Added.
21979 (WTF::Internal::hexDigitsForMode): Internal helper.
21980 (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination.
21981 (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..'
21982 (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination.
21984 2011-03-24 Geoffrey Garen <ggaren@apple.com>
21986 Windows build fix take 2: Add new symobl.
21988 (I should have used the EWS bots for this!)
21990 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
21992 2011-03-24 Geoffrey Garen <ggaren@apple.com>
21994 Windows build fix take 1: Removed old symobl.
21996 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
21998 2011-03-24 Geoffrey Garen <ggaren@apple.com>
22000 Reviewed by Oliver Hunt.
22002 Ensure that all compilation takes place within a dynamic global object scope
22003 https://bugs.webkit.org/show_bug.cgi?id=57054
22004 <rdar://problem/9083011>
22006 Otherwise, entry to the global object scope might throw away the code
22007 we just compiled, causing a crash.
22009 * JavaScriptCore.exp: Updated for signature change.
22011 * debugger/Debugger.cpp:
22012 (JSC::evaluateInGlobalCallFrame):
22013 * debugger/DebuggerCallFrame.cpp:
22014 (JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls
22015 here because (a) they took place outside a dynamic global object scope
22016 and (b) they were redundant.
22018 * interpreter/CachedCall.h:
22019 (JSC::CachedCall::CachedCall): Updated for signature change.
22021 * interpreter/Interpreter.cpp:
22022 (JSC::Interpreter::execute):
22023 (JSC::Interpreter::executeCall):
22024 (JSC::Interpreter::executeConstruct): Declare our dynamic global object
22025 scope earlier, to ensure that compilation takes place within it.
22027 * runtime/Completion.cpp:
22028 (JSC::evaluate): Removed explicit compilation calls here because (a)
22029 they took place outside a dynamic global object scope and (b) they were
22032 * runtime/Executable.h:
22033 (JSC::EvalExecutable::compile):
22034 (JSC::ProgramExecutable::compile):
22035 (JSC::FunctionExecutable::compileForCall):
22036 (JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to
22037 verify our new invariant that all compilation takes place within a
22038 dynamic global object scope.
22040 * runtime/JSGlobalObject.cpp:
22041 (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
22042 * runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope
22043 to require a JSGlobalData instead of an ExecState* since it is often
22044 easier to provide the former, and the latter was not necessary.
22046 2011-03-24 Oliver Hunt <oliver@apple.com>
22048 Reviewed by Geoffrey Garen.
22050 REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
22051 https://bugs.webkit.org/show_bug.cgi?id=55671
22053 This is no longer necessary, and it seems that with the new weakmap
22054 model it's simply unsafe, so this reduces it to a no-op.
22056 * API/JSWeakObjectMapRefPrivate.cpp:
22058 2011-03-24 Ben Taylor <bentaylor.solx86@gmail.com>
22060 Reviewed by Darin Adler.
22062 https://bugs.webkit.org/show_bug.cgi?id=20302
22063 Correct implementation of signbit on Solaris
22065 * wtf/MathExtras.h:
22068 2011-03-23 Mark Rowe <mrowe@apple.com>
22070 Reviewed by Darin Adler.
22072 <rdar://problem/7959320> Threads that use APIs above the BSD layer must be registered with the Obj-C GC.
22074 * wtf/ThreadingPthreads.cpp:
22075 (WTF::initializeCurrentThreadInternal):
22077 2011-03-23 Mark Rowe <mrowe@apple.com>
22079 Stop setting OTHER_OPTIONS in JavaScriptCore's Makefile.
22081 It's not necessary to pass "-target All" as xcodebuild always builds the
22082 first target in the project unless otherwise specified. The presence of
22083 that option also breaks "make clean" since that results in both the
22084 -target and -alltargets options being passed to xcodebuild.
22088 2011-03-23 Pavel Feldman <pfeldman@chromium.org>
22090 Not reviewed: bring back Vector::contains that was removed as a part of roll back.
22095 2011-03-23 Sheriff Bot <webkit.review.bot@gmail.com>
22097 Unreviewed, rolling out r81686.
22098 http://trac.webkit.org/changeset/81686
22099 https://bugs.webkit.org/show_bug.cgi?id=56914
22101 Breaks webkit_tests in Chromium again. (Requested by pfeldman
22106 2011-03-23 Adam Barth <abarth@webkit.org>
22108 Reviewed by Eric Seidel.
22110 JavaScriptCore GYP build should work on a case-sensitive file system
22111 https://bugs.webkit.org/show_bug.cgi?id=56911
22113 The issue is that there are two UString.h headers, one named UString.h
22114 and one named ustring.h. This patch excludes ustring.h from the header
22115 map to avoid confusion. While I was editing this part of the GYP file,
22116 I cleaned up the exclude rules to be more modern.
22118 * gyp/JavaScriptCore.gyp:
22120 2011-03-22 Geoffrey Garen <ggaren@apple.com>
22122 Reviewed by Maciej Stachowiak.
22124 REGRESSION (r78382): No scripts appear in the Web Inspector's Scripts
22125 panel on Windows, and many inspector regression tests are failing
22126 https://bugs.webkit.org/show_bug.cgi?id=54490
22128 The bug was caused by two different classes using the same name (Recompiler).
22130 * debugger/Debugger.cpp:
22131 * runtime/JSGlobalData.cpp:
22132 (WTF::Recompiler::operator()): Put Recompiler in an anonymous namespace,
22133 so our two recompilers' inline functions don't stomp each other at
22136 2011-03-22 Sam Weinig <sam@webkit.org>
22138 Reviewed by Mark Rowe.
22140 Remove USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
22141 <rdar://problem/8944718>
22143 * DerivedSources.make:
22144 Remove generation of USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
22146 2011-03-22 Gabor Loki <loki@webkit.org>
22148 Reviewed by Csaba Osztrogonác.
22150 [Qt] Add DFG module to build system (disabled by default).
22151 https://bugs.webkit.org/show_bug.cgi?id=56845
22153 * JavaScriptCore.pri:
22154 * JavaScriptCore.pro:
22156 2011-03-22 Eric Seidel <eric@webkit.org>
22158 Reviewed by Adam Barth.
22160 Add support to build-webkit for building with gyp-generated project files
22161 https://bugs.webkit.org/show_bug.cgi?id=56877
22163 Found a couple missing Private headers while trying to make WebCore build.
22165 * JavaScriptCore.gypi:
22167 2011-03-22 Eric Seidel <eric@webkit.org>
22169 Reviewed by Adam Barth.
22171 Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source
22172 https://bugs.webkit.org/show_bug.cgi?id=56867
22174 This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj
22175 from a JavaScriptCore directory outside of Source.
22177 * gyp/JavaScriptCore.gyp:
22178 * gyp/run-if-exists.sh: Added.
22179 * gyp/update-info-plist.sh: Added.
22181 2011-03-22 Eric Seidel <eric@webkit.org>
22183 Reviewed by Adam Barth.
22185 Add Profiling Configuration to JavaScriptCore gyp build
22186 https://bugs.webkit.org/show_bug.cgi?id=56862
22188 It appears this is identical to Release, but I suspect
22189 there is someone/thing who uses the Profiling target
22190 so we're adding it for completeness.
22192 * gyp/JavaScriptCore.gyp:
22194 2011-03-22 Adam Barth <abarth@webkit.org>
22196 Reviewed by Eric Seidel.
22198 Remove os_win32_files variable from the GYP build
22199 https://bugs.webkit.org/show_bug.cgi?id=56804
22201 Now that our understanding of GYP is sufficiently advanced, we don't
22202 need os_win32_files any more. (Turns out Eric was right, as he always
22205 * JavaScriptCore.gypi:
22207 2011-03-22 Adam Barth <abarth@webkit.org>
22209 Reviewed by Eric Seidel.
22211 GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory
22212 https://bugs.webkit.org/show_bug.cgi?id=56803
22214 Previously, we thought we should generate the derived source files in
22215 the shared intermediate build products directory, but there are
22216 assumptions built into other parts of the Mac build system that the
22217 derived source files will be generated in a particular subdirectory of
22218 the build products directory.
22220 This patch is a partial revert of the change that moved the derived
22221 source files to the shared intermediate directory. After this patch,
22222 the GYP build can build JavaScriptCore without help from the main
22223 normal build system.
22225 * JavaScriptCore.gypi:
22226 * gyp/JavaScriptCore.gyp:
22227 * gyp/generate-derived-sources.sh:
22228 * gyp/generate-dtrace-header.sh:
22230 2011-03-22 Jay Civelli <jcivelli@chromium.org>
22232 Reviewed by David Levin.
22234 Adding a contains method to Vector.
22235 https://bugs.webkit.org/show_bug.cgi?id=55859
22238 (WTF::Vector::contains):
22240 2011-03-22 Gabor Loki <loki@webkit.org>
22242 Reviewed by Alexey Proskuryakov.
22244 Fix a bunch of typos in DFG.
22245 https://bugs.webkit.org/show_bug.cgi?id=56813
22247 * dfg/DFGByteCodeParser.cpp:
22249 * dfg/DFGGenerationInfo.h:
22250 (JSC::DFG::GenerationInfo::setSpilled):
22251 * dfg/DFGGraph.cpp:
22252 (JSC::DFG::Graph::dump):
22254 * dfg/DFGJITCodeGenerator.h:
22255 (JSC::DFG::JITCodeGenerator::setupStubArguments):
22256 * dfg/DFGJITCompiler.cpp:
22257 (JSC::DFG::JITCompiler::compileFunction):
22258 * dfg/DFGJITCompiler.h:
22260 * dfg/DFGNonSpeculativeJIT.h:
22261 * dfg/DFGOperations.h:
22262 * dfg/DFGRegisterBank.h:
22263 (JSC::DFG::RegisterBank::allocate):
22264 * dfg/DFGScoreBoard.h:
22265 (JSC::DFG::ScoreBoard::~ScoreBoard):
22266 (JSC::DFG::ScoreBoard::allocate):
22267 * dfg/DFGSpeculativeJIT.cpp:
22268 (JSC::DFG::SpeculativeJIT::compile):
22269 * dfg/DFGSpeculativeJIT.h:
22271 2011-03-22 Adam Barth <abarth@webkit.org>
22273 Reviewed by Eric Seidel.
22275 Production configuration in GYP isn't set up correctly
22276 https://bugs.webkit.org/show_bug.cgi?id=56786
22278 Update JavaScriptCore.gyp with information mined from
22279 JavaScriptCore.xcodeproj.
22281 * JavaScriptCore.gypi:
22282 * gyp/JavaScriptCore.gyp:
22284 2011-03-22 Kent Tamura <tkent@chromium.org>
22286 Reviewed by Eric Seidel.
22288 REGRESSION(r80096): Number type input unexpectedly rounds fractional values
22289 https://bugs.webkit.org/show_bug.cgi?id=56367
22291 Introduce clampToInteger(unsigned).
22293 * wtf/MathExtras.h:
22294 (clampToInteger): Added.
22296 2011-03-21 Adam Barth <abarth@webkit.org>
22298 Reviewed by Eric Seidel.
22300 GYP build should not have include paths that point within the source tree
22301 https://bugs.webkit.org/show_bug.cgi?id=56788
22303 Turns out we don't need these include paths anymore now that we have
22304 header maps working properly.
22306 * gyp/JavaScriptCore.gyp:
22307 - Also, remove jsc.cpp from the excluded list because it's not part
22308 of the jsc_files variable instead of the javascriptcore_files
22311 2011-03-21 Adam Barth <abarth@webkit.org>
22313 Reviewed by Eric Seidel.
22315 Solve the Assertions.cpp / -Wno-missing-format-attribute mystery
22316 https://bugs.webkit.org/show_bug.cgi?id=56780
22318 The reason we couldn't resolve this warning in the GYP build was that
22319 the normal build disables this warning specifically for this file.
22320 This patch takes the same approach as the previous patch to
22321 WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning
22322 (rather than a build system configuration).
22324 * JavaScriptCore.xcodeproj/project.pbxproj:
22325 - Remove the special-case for this file.
22326 * gyp/JavaScriptCore.gyp:
22327 - Remove the work-around for this issue.
22328 * wtf/Assertions.cpp:
22329 - Add a pragma disabling this warning for this file.
22331 2011-03-21 Adam Barth <abarth@webkit.org>
22333 Reviewed by Dimitri Glazkov.
22335 WebCore GYP build shouldn't crash on startup
22336 https://bugs.webkit.org/show_bug.cgi?id=56776
22338 Debug builds shouldn't define NDEBUG. This same logic exists in the
22339 project.pbxproj file.
22341 * gyp/JavaScriptCore.gyp:
22343 2011-03-21 Robert Kroeger <rjkroege@chromium.org>
22345 Reviewed by Antonio Gomes.
22347 Flag to enable/disable a GestureReocognizer framework
22349 https://bugs.webkit.org/show_bug.cgi?id=49345
22353 2011-03-21 Adam Barth <abarth@webkit.org>
22355 Reviewed by Dimitri Glazkov.
22357 Add new files to JavaScriptCore.gypi
22358 https://bugs.webkit.org/show_bug.cgi?id=56766
22360 * JavaScriptCore.gypi:
22362 2011-03-21 Sheriff Bot <webkit.review.bot@gmail.com>
22364 Unreviewed, rolling out r81377.
22365 http://trac.webkit.org/changeset/81377
22366 https://bugs.webkit.org/show_bug.cgi?id=56765
22368 WebPageSerializerTest.MultipleFrames is broken (Requested by
22369 simonjam on #webkit).
22373 2011-03-21 Gabor Loki <loki@webkit.org>
22375 Reviewed by Csaba Osztrogonác.
22377 Extend constant pool to be able to store 16 bit instructions with a constant
22378 https://bugs.webkit.org/show_bug.cgi?id=46796
22380 The putShortWithConstantInt function inserts a 16 bit instruction which
22381 refers a 32 bits constant or literal. This is a vital function for those
22382 target which loads a PC relative value with a 16 bit instruction (like
22383 Thumb-2 instruction set and SH4 architecture).
22385 * assembler/AssemblerBuffer.h:
22386 (JSC::AssemblerBuffer::putIntegral):
22387 (JSC::AssemblerBuffer::putIntegralUnchecked):
22388 * assembler/AssemblerBufferWithConstantPool.h:
22390 2011-03-21 Philippe Normand <pnormand@igalia.com>
22392 Unreviewed, GTK distcheck build fix.
22396 2011-03-20 Bill Budge <bbudge@chromium.org>
22398 Reviewed by Adam Barth.
22400 Rename ThreadSafeShared to ThreadSafeRefCounted
22401 https://bugs.webkit.org/show_bug.cgi?id=56714
22403 No new tests. Exposes no new functionality.
22405 * API/JSClassRef.h:
22406 * API/OpaqueJSString.h:
22408 * JavaScriptCore.gypi:
22409 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
22410 * JavaScriptCore.xcodeproj/project.pbxproj:
22412 * wtf/CMakeLists.txt:
22413 * wtf/CrossThreadRefCounted.h:
22414 (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
22415 (WTF::::crossThreadCopy):
22416 * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
22417 (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
22418 (WTF::ThreadSafeRefCountedBase::ref):
22419 (WTF::ThreadSafeRefCountedBase::refCount):
22420 (WTF::ThreadSafeRefCountedBase::derefBase):
22421 (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
22422 * wtf/ThreadSafeShared.h: Removed.
22425 2011-03-19 Patrick Gansterer <paroga@webkit.org>
22427 Reviewed by Darin Adler.
22429 Remove StringImpl::computeHash()
22430 https://bugs.webkit.org/show_bug.cgi?id=49894
22432 Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher.
22434 * wtf/text/AtomicString.cpp:
22435 (WTF::CStringTranslator::hash):
22436 (WTF::UCharBufferTranslator::hash):
22437 (WTF::HashAndCharactersTranslator::hash):
22438 * wtf/text/StringImpl.h:
22439 (WTF::StringImpl::setHash):
22440 (WTF::StringImpl::hash):
22442 2011-03-19 Patrick Gansterer <paroga@webkit.org>
22444 Reviewed by Darin Adler.
22446 Rename WTF::StringHasher methods
22447 https://bugs.webkit.org/show_bug.cgi?id=53532
22449 Rename createHash to computeHash and createBlobHash to hashMemory.
22450 Also add a using WTF::StringHasher in the header file.
22452 * profiler/CallIdentifier.h:
22453 (JSC::CallIdentifier::Hash::hash):
22454 * runtime/Identifier.cpp:
22455 (JSC::IdentifierCStringTranslator::hash):
22456 (JSC::IdentifierUCharBufferTranslator::hash):
22457 * wtf/StringHasher.h:
22458 (WTF::StringHasher::computeHash):
22459 (WTF::StringHasher::hashMemory):
22460 * wtf/text/StringHash.h:
22461 (WTF::CaseFoldingHash::hash):
22462 * wtf/text/StringImpl.h:
22463 (WTF::StringImpl::computeHash):
22464 * wtf/unicode/UTF8.cpp:
22465 (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
22467 2011-03-18 Geoffrey Garen <ggaren@apple.com>
22469 Reviewed by Oliver Hunt.
22471 [GTK] JSC crashes in 32bit Release bots after r80743
22472 https://bugs.webkit.org/show_bug.cgi?id=56180
22474 The crash was caused by referencing GC memory from a GC destructor. This
22475 is not safe because destruction time / order is not guaranteed.
22477 * profiler/ProfileGenerator.cpp:
22478 (JSC::ProfileGenerator::create):
22479 (JSC::ProfileGenerator::ProfileGenerator):
22480 (JSC::ProfileGenerator::willExecute):
22481 (JSC::ProfileGenerator::didExecute):
22482 * profiler/ProfileGenerator.h:
22483 (JSC::ProfileGenerator::origin): Made ExecState* the first argument,
22484 to match the rest of this class and JSC.
22486 Use a JSGlobalObject* instead of an ExecState* with an indirect reference
22487 to a JSGlobalObject* to track our origin. This is simpler and more
22488 efficient, and it removes the destruction order dependency that was causing
22491 * profiler/Profiler.cpp:
22492 (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
22493 (JSC::Profiler::stopProfiling): New function for stopping all profiles
22494 for a given global object. This is more straight-forward than multiplexing
22495 through the old function.
22497 (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
22498 * profiler/Profiler.h: Ditto.
22500 * runtime/JSGlobalObject.cpp:
22501 (JSC::JSGlobalObject::~JSGlobalObject): Ditto.
22503 2011-03-17 Geoffrey Garen <ggaren@apple.com>
22505 Reviewed by Oliver Hunt.
22507 1 Structure leaked beneath JSGlobalData::storeVPtrs()
22508 https://bugs.webkit.org/show_bug.cgi?id=56595
22510 * runtime/Executable.cpp:
22511 (JSC::EvalExecutable::EvalExecutable):
22512 (JSC::ProgramExecutable::ProgramExecutable):
22513 (JSC::FunctionExecutable::FunctionExecutable):
22514 * runtime/Executable.h:
22515 (JSC::ExecutableBase::ExecutableBase):
22516 (JSC::NativeExecutable::NativeExecutable):
22517 (JSC::VPtrHackExecutable::VPtrHackExecutable):
22518 (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
22519 PassRefPtr, like JSString does, since JSGlobalData owns the singleton
22520 exectuable structure.
22522 2011-03-17 Geoffrey Garen <ggaren@apple.com>
22524 Reviewed by Mark Rowe.
22526 Fixed some string leaks seen on the buildbot
22527 https://bugs.webkit.org/show_bug.cgi?id=56619
22529 * runtime/PropertyMapHashTable.h:
22530 (JSC::PropertyTable::~PropertyTable): DEref!
22532 2011-03-17 Oliver Hunt <oliver@apple.com>
22534 Reviewed by Geoffrey Garen.
22536 Crash in JSC::MarkStack::drain Under Stress
22537 https://bugs.webkit.org/show_bug.cgi?id=56470
22539 We perform a number of gc allocations while when
22540 we are setting up new globals in a piece of global
22541 code. We do this by adding new properties to the
22542 symbol table, and then expanding the storage to fit
22545 If a GC happens during this time we will report an
22546 incorrect size for the global object's symbol table
22549 This patch corrects this by growing the storage size
22550 before we starting adding entries to the symbol table.
22552 * bytecompiler/BytecodeGenerator.cpp:
22553 (JSC::BytecodeGenerator::BytecodeGenerator):
22554 * runtime/JSGlobalObject.cpp:
22555 (JSC::JSGlobalObject::resizeRegisters):
22557 2011-03-17 Geoffrey Garen <ggaren@apple.com>
22559 Reviewed by Oliver Hunt.
22561 1 Structure leaked beneath JSGlobalData::storeVPtrs()
22562 https://bugs.webkit.org/show_bug.cgi?id=56595
22564 * runtime/JSGlobalData.cpp:
22565 (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
22566 we're using, since the Executable is not designed to own the Structure.
22568 2011-03-17 Gavin Barraclough <barraclough@apple.com>
22570 Rubber Stamped by Sam Weinig.
22572 Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
22574 * assembler/MacroAssemblerX86Common.h:
22575 (JSC::MacroAssemblerX86Common::branchTest8):
22576 * assembler/X86Assembler.h:
22577 (JSC::X86Assembler::testb_rr):
22579 2011-03-17 Gavin Barraclough <barraclough@apple.com>
22581 Reviewed by Sam Weinig.
22583 Bug 56603 - DFG JIT related cleanup
22584 Move node generation out to separate function, move binarySearch algorithm out
22585 to StdLibExtras, fix Graph::dump() to print comma between non-node children,
22586 even if there are no node children.
22588 * bytecode/CodeBlock.h:
22589 (JSC::getCallReturnOffset):
22590 (JSC::CodeBlock::getStubInfo):
22591 (JSC::CodeBlock::getCallLinkInfo):
22592 (JSC::CodeBlock::getMethodCallLinkInfo):
22593 (JSC::CodeBlock::bytecodeOffset):
22594 - Move binaryChop to binarySearch in StdLibExtras
22595 * dfg/DFGByteCodeParser.cpp:
22596 (JSC::DFG::ByteCodeParser::ByteCodeParser):
22597 (JSC::DFG::ByteCodeParser::parse):
22599 - Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
22600 * dfg/DFGByteCodeParser.h:
22601 - Change parse() to not take a start index (always 0).
22602 * dfg/DFGGraph.cpp:
22603 (JSC::DFG::Graph::dump):
22604 - Fix Graph::dump() to print comma between non-node children, even if there are no node children.
22605 * dfg/DFGJITCodeGenerator.h:
22606 (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
22607 - Initialize m_compileIndex in constructor.
22608 * dfg/DFGNonSpeculativeJIT.cpp:
22609 (JSC::DFG::NonSpeculativeJIT::compile):
22610 * dfg/DFGNonSpeculativeJIT.h:
22611 - Spilt out compilation of individual node.
22612 * dfg/DFGOperations.cpp:
22613 (JSC::DFG::operationConvertThis):
22614 * dfg/DFGOperations.h:
22615 - Cleanup parameter name.
22616 * dfg/DFGSpeculativeJIT.cpp:
22617 (JSC::DFG::SpeculativeJIT::compile):
22618 * dfg/DFGSpeculativeJIT.h:
22619 - Spilt out compilation of individual node.
22620 * runtime/Executable.cpp:
22621 (JSC::tryDFGCompile):
22622 - Change parse() to not take a start index (always 0).
22623 * wtf/StdLibExtras.h:
22624 (WTF::binarySearch):
22625 - Move binaryChop to binarySearch in StdLibExtras
22627 2011-03-17 Anders Carlsson <andersca@apple.com>
22629 Reviewed by Geoffrey Garen.
22633 * runtime/JSGlobalData.cpp:
22634 (JSC::JSGlobalData::storeVPtrs):
22636 2011-03-17 Geoffrey Garen <ggaren@apple.com>
22638 Reviewed by Darin Adler.
22640 1 Structure leaked beneath JSGlobalData::storeVPtrs()
22641 https://bugs.webkit.org/show_bug.cgi?id=56595
22643 * JavaScriptCore.xcodeproj/project.pbxproj:
22644 * runtime/JSGlobalData.cpp:
22645 (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
22646 to explicitly run its destructor.
22648 2011-03-17 Jeff Miller <jeffm@apple.com>
22650 Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
22655 project.xcworkspace
22658 * JavaScriptCore.xcodeproj: Modified property svn:ignore.
22660 2011-03-17 Gavin Barraclough <barraclough@apple.com>
22662 Reverting r81197, breaks JIT + INTERPRETER build.
22664 * bytecode/CodeBlock.cpp:
22665 (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
22666 (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
22667 * bytecode/CodeBlock.h:
22668 (JSC::CodeBlock::addPropertyAccessInstruction):
22669 (JSC::CodeBlock::addGlobalResolveInstruction):
22670 (JSC::CodeBlock::addStructureStubInfo):
22671 * bytecode/Opcode.h:
22672 * bytecode/StructureStubInfo.h:
22673 * bytecompiler/BytecodeGenerator.cpp:
22674 (JSC::BytecodeGenerator::emitResolve):
22675 (JSC::BytecodeGenerator::emitResolveWithBase):
22676 (JSC::BytecodeGenerator::emitGetById):
22677 (JSC::BytecodeGenerator::emitPutById):
22678 (JSC::BytecodeGenerator::emitDirectPutById):
22679 (JSC::BytecodeGenerator::emitCall):
22680 (JSC::BytecodeGenerator::emitConstruct):
22681 (JSC::BytecodeGenerator::emitCatch):
22683 2011-03-17 Ben Taylor <bentaylor.solx86@gmail.com>
22685 Reviewed by Alexey Proskuryakov.
22687 Add a COMPILER(SUNCC) define for Sun Studio 12.
22688 https://bugs.webkit.org/show_bug.cgi?56444
22689 derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
22693 2011-03-17 Jay Civelli <jcivelli@chromium.org>
22695 Reviewed by David Levin.
22697 Adding a contains method to Vector.
22698 https://bugs.webkit.org/show_bug.cgi?id=55859
22704 2011-03-17 Patrick Gansterer <paroga@webkit.org>
22706 Fix the interpreter build.
22708 * interpreter/Interpreter.cpp:
22709 (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
22711 2011-03-16 Sam Weinig <sam@webkit.org>
22713 Fix the interpreter build.
22715 * interpreter/Interpreter.cpp:
22716 (JSC::Interpreter::resolve):
22717 (JSC::Interpreter::resolveSkip):
22718 (JSC::Interpreter::resolveGlobal):
22719 (JSC::Interpreter::resolveGlobalDynamic):
22720 (JSC::Interpreter::resolveBaseAndProperty):
22721 (JSC::Interpreter::privateExecute):
22724 2011-03-16 Adam Barth <abarth@webkit.org>
22726 Reviewed by James Robinson.
22728 Remove USE(BUILTIN_UTF8_CODEC)
22729 https://bugs.webkit.org/show_bug.cgi?id=56508
22731 We added this recently when we were unsure about the stability of the
22732 built-in UTF-8 codec. However, the codec seems to be stable, so we
22733 don't need the macro.
22737 2011-03-16 Daniel Bates <dbates@rim.com>
22739 Reviewed by Darin Adler.
22741 Make JIT build for ARM Thumb-2 with RVCT
22742 https://bugs.webkit.org/show_bug.cgi?id=56440
22744 Derived from a patch by Dave Tapuska.
22746 Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
22748 * jit/JITStubs.cpp:
22750 2011-03-16 Chao-ying Fu <fu@mips.com>
22752 Reviewed by Darin Adler.
22754 Fix MIPS build with const *void
22755 https://bugs.webkit.org/show_bug.cgi?id=56513
22757 * assembler/MacroAssemblerMIPS.h:
22758 (JSC::MacroAssemblerMIPS::load32):
22759 (JSC::MacroAssemblerMIPS::store32):
22761 2011-03-16 Oliver Hunt <oliver@apple.com>
22763 Reviewed by Darin Adler.
22765 Remove unnecessary caller tracking shenanigans from CodeBlock
22766 https://bugs.webkit.org/show_bug.cgi?id=56483
22768 This removes some leftover cruft from when we made CodeBlock
22769 mark its callees. Removing it gives us a 0.7% progression,
22770 reducing the overall regression to ~1.3%.
22772 * bytecode/CodeBlock.cpp:
22773 (JSC::CodeBlock::shrinkToFit):
22774 * bytecode/CodeBlock.h:
22775 (JSC::CallLinkInfo::CallLinkInfo):
22777 (JSC::JIT::linkCall):
22778 (JSC::JIT::linkConstruct):
22780 2011-03-15 Oliver Hunt <oliver@apple.com>
22782 Reviewed by Geoffrey Garen.
22784 Make Structure creation require a JSGlobalData
22785 https://bugs.webkit.org/show_bug.cgi?id=56438
22787 Mechanical change to make Structure::create require JSGlobalData&, and
22788 require all users to provide the globalData.
22790 * API/JSCallbackConstructor.h:
22791 (JSC::JSCallbackConstructor::createStructure):
22792 * API/JSCallbackFunction.h:
22793 (JSC::JSCallbackFunction::createStructure):
22794 * API/JSCallbackObject.h:
22795 (JSC::JSCallbackObject::createStructure):
22796 * API/JSContextRef.cpp:
22797 * JavaScriptCore.exp:
22798 * debugger/DebuggerActivation.cpp:
22799 (JSC::DebuggerActivation::DebuggerActivation):
22800 * debugger/DebuggerActivation.h:
22801 (JSC::DebuggerActivation::createStructure):
22802 * jit/JITStubs.cpp:
22803 (JSC::DEFINE_STUB_FUNCTION):
22805 (GlobalObject::GlobalObject):
22808 * runtime/Arguments.h:
22809 (JSC::Arguments::createStructure):
22810 * runtime/ArrayPrototype.h:
22811 (JSC::ArrayPrototype::createStructure):
22812 * runtime/BooleanObject.h:
22813 (JSC::BooleanObject::createStructure):
22814 * runtime/DateInstance.h:
22815 (JSC::DateInstance::createStructure):
22816 * runtime/DatePrototype.h:
22817 (JSC::DatePrototype::createStructure):
22818 * runtime/ErrorInstance.h:
22819 (JSC::ErrorInstance::createStructure):
22820 * runtime/Executable.h:
22821 (JSC::ExecutableBase::createStructure):
22822 (JSC::EvalExecutable::createStructure):
22823 (JSC::ProgramExecutable::createStructure):
22824 (JSC::FunctionExecutable::createStructure):
22825 * runtime/FunctionPrototype.h:
22826 (JSC::FunctionPrototype::createStructure):
22827 * runtime/GetterSetter.h:
22828 (JSC::GetterSetter::createStructure):
22829 * runtime/InternalFunction.h:
22830 (JSC::InternalFunction::createStructure):
22831 * runtime/JSAPIValueWrapper.h:
22832 (JSC::JSAPIValueWrapper::createStructure):
22833 * runtime/JSActivation.h:
22834 (JSC::JSActivation::createStructure):
22835 * runtime/JSArray.cpp:
22836 (JSC::JSArray::JSArray):
22837 * runtime/JSArray.h:
22838 (JSC::JSArray::createStructure):
22839 * runtime/JSByteArray.cpp:
22840 (JSC::JSByteArray::createStructure):
22841 * runtime/JSByteArray.h:
22842 (JSC::JSByteArray::JSByteArray):
22843 * runtime/JSCell.h:
22844 (JSC::JSCell::JSCell::createDummyStructure):
22845 * runtime/JSFunction.h:
22846 (JSC::JSFunction::createStructure):
22847 * runtime/JSGlobalData.cpp:
22848 (JSC::JSGlobalData::storeVPtrs):
22849 (JSC::JSGlobalData::JSGlobalData):
22850 * runtime/JSGlobalObject.cpp:
22851 (JSC::JSGlobalObject::reset):
22852 * runtime/JSGlobalObject.h:
22853 (JSC::JSGlobalObject::JSGlobalObject):
22854 (JSC::JSGlobalObject::createStructure):
22855 * runtime/JSNotAnObject.h:
22856 (JSC::JSNotAnObject::createStructure):
22857 * runtime/JSONObject.h:
22858 (JSC::JSONObject::createStructure):
22859 * runtime/JSObject.cpp:
22860 (JSC::JSObject::createInheritorID):
22861 * runtime/JSObject.h:
22862 (JSC::JSObject::createStructure):
22863 (JSC::JSNonFinalObject::createStructure):
22864 (JSC::JSFinalObject::createStructure):
22865 (JSC::createEmptyObjectStructure):
22866 (JSC::JSObject::inheritorID):
22867 * runtime/JSObjectWithGlobalObject.h:
22868 (JSC::JSObjectWithGlobalObject::createStructure):
22869 * runtime/JSPropertyNameIterator.h:
22870 (JSC::JSPropertyNameIterator::createStructure):
22871 * runtime/JSStaticScopeObject.h:
22872 (JSC::JSStaticScopeObject::createStructure):
22873 * runtime/JSString.h:
22874 (JSC::RopeBuilder::createStructure):
22875 * runtime/JSVariableObject.h:
22876 (JSC::JSVariableObject::createStructure):
22877 * runtime/JSWrapperObject.h:
22878 (JSC::JSWrapperObject::createStructure):
22879 * runtime/JSZombie.h:
22880 (JSC::JSZombie::createStructure):
22881 * runtime/MathObject.h:
22882 (JSC::MathObject::createStructure):
22883 * runtime/NativeErrorConstructor.cpp:
22884 (JSC::NativeErrorConstructor::NativeErrorConstructor):
22885 * runtime/NativeErrorConstructor.h:
22886 (JSC::NativeErrorConstructor::createStructure):
22887 * runtime/NumberConstructor.h:
22888 (JSC::NumberConstructor::createStructure):
22889 * runtime/NumberObject.h:
22890 (JSC::NumberObject::createStructure):
22891 * runtime/ObjectConstructor.h:
22892 (JSC::ObjectConstructor::createStructure):
22893 * runtime/RegExpConstructor.h:
22894 (JSC::RegExpConstructor::createStructure):
22895 * runtime/RegExpObject.h:
22896 (JSC::RegExpObject::createStructure):
22897 * runtime/ScopeChain.h:
22898 (JSC::ScopeChainNode::createStructure):
22899 * runtime/StringObject.h:
22900 (JSC::StringObject::createStructure):
22901 * runtime/StringObjectThatMasqueradesAsUndefined.h:
22902 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
22903 * runtime/StringPrototype.h:
22904 (JSC::StringPrototype::createStructure):
22905 * runtime/Structure.h:
22906 (JSC::Structure::create):
22908 2011-03-16 Geoffrey Garen <ggaren@apple.com>
22910 Reviewed by Oliver Hunt.
22912 Some conservative root gathering cleanup
22913 https://bugs.webkit.org/show_bug.cgi?id=56447
22915 SunSpider says 0.5% - 1.8% faster.
22917 * interpreter/RegisterFile.cpp:
22918 (JSC::RegisterFile::gatherConservativeRoots):
22919 * interpreter/RegisterFile.h: New helper function for doing the
22920 conservative gathering of the register file. It's still conservative,
22921 since the register file may contain uninitialized values, but it's
22922 moving-safe, because it only visits values tagged as pointers, so there's
22923 no risk of mistaking an integer for a pointer and accidentally changing it.
22925 * runtime/ConservativeSet.cpp:
22926 (JSC::ConservativeRoots::add):
22927 * runtime/ConservativeSet.h: Added a single-value add function, used above.
22929 * runtime/Heap.cpp:
22930 (JSC::Heap::markRoots): Separated machine stack conservative roots from
22931 register file conservative roots because machine stack roots must be
22932 pinned, but register file roots need not be pinned.
22934 Adopted new interface for passing the current stack extent to the machine
22935 stack root gathering routine. This allows us to exclude marking-related
22936 data structures on the stack, and thus avoid double-marking the set of
22939 * runtime/MachineStackMarker.cpp:
22940 (JSC::MachineThreads::gatherFromCurrentThread):
22941 (JSC::MachineThreads::gatherConservativeRoots):
22942 * runtime/MachineStackMarker.h: Added new interface, described above.
22944 * runtime/MarkedBlock.h:
22945 (JSC::MarkedBlock::firstAtom):
22946 * wtf/StdLibExtras.h:
22947 (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
22950 2011-03-16 Geoffrey Garen <ggaren@apple.com>
22952 Reviewed by Oliver Hunt.
22954 A little bit of MarkStack cleanup
22955 https://bugs.webkit.org/show_bug.cgi?id=56443
22957 Moved MarkStack functions into MarkStack.h/.cpp.
22959 SunSpider reports no change.
22961 * runtime/JSArray.h:
22962 * runtime/JSCell.h: Moved from here...
22963 * runtime/MarkStack.cpp:
22964 (JSC::MarkStack::markChildren):
22965 (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
22966 a huge function, and not called many times.
22968 * runtime/MarkStack.h:
22969 (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
22970 (JSC::MarkStack::append):
22971 (JSC::MarkStack::deprecatedAppend):
22972 (JSC::MarkStack::internalAppend): Moved to here.
22974 2011-03-15 Geoffrey Garen <ggaren@apple.com>
22976 Reviewed by Oliver Hunt.
22978 Removed another deprecatedAppend
22979 https://bugs.webkit.org/show_bug.cgi?id=56429
22981 * collector/handles/HandleHeap.cpp:
22982 (JSC::HandleHeap::markStrongHandles):
22983 * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
22984 marked directly by the Heap.
22986 * runtime/Heap.cpp:
22987 (JSC::Heap::markRoots): Ditto.
22989 2011-03-15 Geoffrey Garen <ggaren@apple.com>
22991 Reviewed by Oliver Hunt.
22993 Removed some more deprecated / unsafe append
22994 https://bugs.webkit.org/show_bug.cgi?id=56428
22996 * collector/handles/HandleStack.cpp:
22997 (JSC::HandleStack::mark):
22998 * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
22999 marker, since it's a heap root.
23001 * runtime/ArgList.cpp:
23002 (JSC::MarkedArgumentBuffer::markLists):
23003 (JSC::MarkedArgumentBuffer::slowAppend):
23004 * runtime/ArgList.h: Ditto.
23006 * runtime/Heap.cpp:
23007 (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
23008 It seems like Oliver forgot this in his last patch. (!)
23010 * runtime/MarkStack.h: Removed appendSlots, since it would allow an
23011 object to embed JSValues directly instead of using WriteBarrier.
23013 (JSC::MarkStack::append): Added a private append for a list of values.
23015 (JSC::HeapRootMarker::mark): Access to the above.
23017 2011-03-15 Geoffrey Garen <ggaren@apple.com>
23019 Reviewed by Oliver Hunt.
23021 Removed a few more deprecatedAppends, and removed HeapRoot<T>
23022 https://bugs.webkit.org/show_bug.cgi?id=56422
23024 Added HeapRootMarker, a privileged class for marking direct heap roots
23025 that are iterated during each garbage collection. This is easier to use
23026 and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
23028 * debugger/Debugger.cpp:
23029 (JSC::evaluateInGlobalCallFrame):
23030 * debugger/DebuggerCallFrame.cpp:
23031 (JSC::DebuggerCallFrame::evaluate):
23032 * interpreter/CallFrame.h:
23033 (JSC::ExecState::exception):
23034 * jit/JITStubs.cpp:
23035 (JSC::DEFINE_STUB_FUNCTION):
23036 * runtime/Completion.cpp:
23037 (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
23040 * runtime/Heap.cpp:
23041 (JSC::Heap::markProtectedObjects):
23042 (JSC::Heap::markTempSortVectors):
23043 (JSC::Heap::markRoots):
23044 * runtime/Heap.h: Updated to use HeapRootMarker.
23046 * runtime/JSCell.h:
23047 (JSC::JSCell::MarkStack::append): Added private functions for
23048 HeapRootMarker to use.
23050 * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
23052 * runtime/MarkStack.h:
23053 (JSC::HeapRootMarker::HeapRootMarker):
23054 (JSC::HeapRootMarker::mark): Added private functions for
23055 HeapRootMarker to use.
23057 * runtime/SmallStrings.cpp:
23058 (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
23060 * runtime/SmallStrings.h:
23061 (JSC::SmallStrings::emptyString):
23062 (JSC::SmallStrings::singleCharacterString):
23063 (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
23065 * runtime/WriteBarrier.h: Removed HeapRoot<T>.
23067 2011-03-14 Geoffrey Garen <ggaren@apple.com>
23069 Reviewed by Oliver Hunt.
23071 Made the global object moving-GC-safe
23072 https://bugs.webkit.org/show_bug.cgi?id=56348
23074 SunSpider reports no change.
23076 * runtime/JSGlobalObject.cpp:
23077 (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
23078 suggested we do not need to visit all our references during GC, since
23079 that is not true in a moving GC.
23081 Re-sorted data members by type, removed one duplicate, and added back
23082 the one missing mark I found.
23084 * runtime/JSGlobalObject.h: Re-sorted data members by type.
23086 2011-03-15 Oliver Hunt <oliver@apple.com>
23088 Reviewed by Geoffrey Garen.
23090 Introduce Local<T> to allow us to start moving to precise marking of locals
23091 https://bugs.webkit.org/show_bug.cgi?id=56394
23093 Introduce a new handle type, Local<T> and a scoping mechanism
23094 LocalScope to allow us to start moving towards precise marking
23095 of temporaries and local variables.
23097 We also start to use the new Local<> type in the JSON stringifier
23098 so that we can have some coverage of their behaviour in the initial
23102 * JavaScriptCore.gypi:
23103 * JavaScriptCore.pro:
23104 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
23105 * JavaScriptCore.xcodeproj/project.pbxproj:
23106 * collector/handles/Handle.h:
23108 * collector/handles/HandleStack.cpp: Added.
23109 (JSC::HandleStack::HandleStack):
23110 (JSC::HandleStack::mark):
23111 (JSC::HandleStack::grow):
23112 * collector/handles/HandleStack.h: Added.
23113 (JSC::HandleStack::enterScope):
23114 (JSC::HandleStack::zapTo):
23115 (JSC::HandleStack::leaveScope):
23116 (JSC::HandleStack::push):
23117 * collector/handles/Local.h: Added.
23118 (JSC::Local::internalSet):
23121 (JSC::LocalStack::LocalStack):
23122 (JSC::LocalStack::peek):
23123 (JSC::LocalStack::pop):
23124 (JSC::LocalStack::push):
23125 (JSC::LocalStack::isEmpty):
23126 (JSC::LocalStack::size):
23127 * collector/handles/LocalScope.h: Added.
23128 (JSC::LocalScope::LocalScope):
23129 (JSC::LocalScope::~LocalScope):
23130 (JSC::LocalScope::release):
23131 * runtime/Heap.cpp:
23132 (JSC::Heap::markRoots):
23134 (JSC::Heap::allocateLocalHandle):
23135 (JSC::Heap::handleStack):
23136 * runtime/JSCell.h:
23137 (JSC::JSCell::::getString):
23138 * runtime/JSGlobalData.cpp:
23139 (JSC::JSGlobalData::JSGlobalData):
23140 * runtime/JSGlobalData.h:
23141 (JSC::JSGlobalData::allocateLocalHandle):
23142 * runtime/JSONObject.cpp:
23143 (JSC::Stringifier::Stringifier):
23144 (JSC::Stringifier::stringify):
23145 (JSC::Stringifier::appendStringifiedValue):
23146 (JSC::Stringifier::Holder::Holder):
23147 (JSC::Walker::Walker):
23148 (JSC::Walker::walk):
23149 (JSC::JSONProtoFuncParse):
23150 (JSC::JSONProtoFuncStringify):
23151 (JSC::JSONStringify):
23152 * runtime/JSONObject.h:
23153 * runtime/MarkStack.h:
23154 (JSC::MarkStack::appendValues):
23155 (JSC::MarkStack::appendSlots):
23157 2011-03-15 Gavin Barraclough <barraclough@apple.com>
23159 Rubber Stamped by Sam Weinig.
23161 Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
23162 Some methods have unnecessary differences in name/arguments for interpreter/JIT.
23164 * bytecode/CodeBlock.cpp:
23165 * bytecode/CodeBlock.h:
23166 (JSC::HandlerInfo::HandlerInfo):
23167 (JSC::CodeBlock::addPropertyAccessInfo):
23168 (JSC::CodeBlock::addGlobalResolveInfo):
23169 (JSC::CodeBlock::addCallLinkInfo):
23170 (JSC::CodeBlock::globalResolveInfo):
23171 * bytecode/Opcode.h:
23172 * bytecode/StructureStubInfo.h:
23173 * bytecompiler/BytecodeGenerator.cpp:
23174 (JSC::BytecodeGenerator::emitResolve):
23175 (JSC::BytecodeGenerator::emitResolveWithBase):
23176 (JSC::BytecodeGenerator::emitGetById):
23177 (JSC::BytecodeGenerator::emitPutById):
23178 (JSC::BytecodeGenerator::emitDirectPutById):
23179 (JSC::BytecodeGenerator::emitCall):
23180 (JSC::BytecodeGenerator::emitConstruct):
23181 (JSC::BytecodeGenerator::emitCatch):
23183 2011-03-15 Gavin Barraclough <barraclough@apple.com>
23185 Reviewed by Sam Weinig.
23187 Fix broken assert in new code.
23189 * dfg/DFGAliasTracker.h:
23190 (JSC::DFG::AliasTracker::recordPutByVal):
23191 - recordPutByVal is called for both PutByVal & PutByValAlias.
23193 2011-03-15 Gavin Barraclough <barraclough@apple.com>
23195 Rubber stamped by Sam Weinig.
23197 Removed redundant code from BytecodeGenerator.
23199 * bytecompiler/BytecodeGenerator.cpp:
23200 * bytecompiler/BytecodeGenerator.h:
23201 - delete uncalled code missed when reparsing was removed.
23203 2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
23205 Reviewed by Darin Adler.
23207 Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
23208 info into the headers rather than in export symbol definition files, but disable it on
23209 all platforms initially so we can deal with port build issues one port at a time.
23211 https://bugs.webkit.org/show_bug.cgi?id=27551
23215 * wtf/Assertions.h:
23216 * wtf/ExportMacros.h: Added.
23219 2011-03-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
23221 Unreviewed build fix.
23223 Buildfix when JIT is not enabled after r81079
23224 https://bugs.webkit.org/show_bug.cgi?id=56361
23226 * runtime/Executable.cpp:
23228 2011-03-14 Geoffrey Garen <ggaren@apple.com>
23230 Reviewed by Oliver Hunt.
23232 Made the global object moving-GC-safe
23233 https://bugs.webkit.org/show_bug.cgi?id=56348
23235 SunSpider reports no change.
23237 * runtime/JSGlobalObject.cpp:
23238 (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
23239 suggested we do not need to visit all our references during GC, since
23240 that is not true in a moving GC.
23242 Re-sorted data members by type, removed one duplicate, and added back
23243 the one missing mark I found.
23245 * runtime/JSGlobalObject.h: Re-sorted data members by type.
23247 2011-03-14 Geoffrey Garen <ggaren@apple.com>
23249 Reviewed by Oliver Hunt.
23251 Made JSWrapperObject and subclasses moving-GC-safe
23252 https://bugs.webkit.org/show_bug.cgi?id=56346
23254 SunSpider reports no change.
23256 * runtime/BooleanObject.cpp:
23257 (JSC::BooleanObject::BooleanObject):
23258 * runtime/DateInstance.cpp:
23259 (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
23260 we don't initialize the wrapped value in our constructor.
23262 * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
23263 we do not in fact override markChildren.
23265 * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
23266 no longer does so for us. Also added an ASSERT to catch a latent bug,
23267 where DatePrototype stomped on its base class's anonymous slot. Hard-coded
23268 anonymous slots are a plague on our code. This doesn't cause any problems
23269 in our existing code since the base class never reads the anonymous slot
23270 it declares, but it caused crashes when I tried to start using the slot
23271 in an initial version of this patch.
23273 * runtime/JSWrapperObject.h:
23274 (JSC::JSWrapperObject::JSWrapperObject):
23275 (JSC::JSWrapperObject::internalValue):
23276 (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
23277 our internal value was stored in two places: an anonymous slot, and a
23278 data member which was not always visited during GC. Now, we only use the
23279 data member, and we always visit it. (Instead of relying on certain
23280 subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
23282 * runtime/NumberObject.cpp:
23283 (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
23284 we don't initialize the wrapped value in our constructor.
23286 * runtime/NumberObject.h: Removed meaningless declaration.
23288 * runtime/StringObject.cpp:
23289 (JSC::StringObject::StringObject): No more need for JSGlobalData, since
23290 we don't initialize the wrapped value in our constructor.
23292 * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
23293 we do not in fact override markChildren.
23295 * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
23296 no longer does so for us. Also added an ASSERT to catch a latent bug,
23297 where DatePrototype stomped on its base class's anonymous slot. Hard-coded
23298 anonymous slots are a plague on our code.
23300 2011-03-14 Michael Saboff <msaboff@apple.com>
23302 Reviewed by Gavin Barraclough.
23304 Look-ahead assertions with back references don’t work as expected
23305 https://bugs.webkit.org/show_bug.cgi?id=56082
23307 Changed parentheses assertion processing to temporarily back out the
23308 number of known characters after the assertion while processing the
23309 assertion. This was done so that assertions don't fail due to
23310 checking the number of required characters as additional to the
23311 rest of the express since assertions don't "consume" input.
23312 Added a byte code to uncheck characters to support the change.
23314 * yarr/YarrInterpreter.cpp:
23315 (JSC::Yarr::Interpreter::matchDisjunction):
23316 (JSC::Yarr::ByteCompiler::uncheckInput):
23317 (JSC::Yarr::ByteCompiler::emitDisjunction):
23318 * yarr/YarrInterpreter.h:
23319 (JSC::Yarr::ByteTerm::UncheckInput):
23321 2011-03-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
23323 Reviewed by Laszlo Gombos.
23325 [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
23326 https://bugs.webkit.org/show_bug.cgi?id=56133
23328 Add condition to not compile webkit internal math round functions on RVCT compiler versions
23329 from 3.0.0 because they are already defined in compiler math library.
23331 * wtf/MathExtras.h:
23333 2011-03-14 Gavin Barraclough <barraclough@apple.com>
23335 Reviewed by Geoffrey Garen & Oliver Hunt.
23337 Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
23339 The JSC JIT presently generates code directly from the bytecode used by the interpreter.
23340 This is not an optimal intermediate representation for JIT code generation, since it does
23341 not capture liveness information of values, and provides little opportunity to perform
23342 any static analysis for even primitive types. The JIT currently generates two code paths,
23343 a fast path handling common cases, and a slower path handling less common operand types.
23344 However the slow path jumps back into the fast path, meaning that information arising
23345 from the earlier type checks cannot be propagated to later operations.
23348 * a dataflow intermediate representation capable of describing a single basic block
23350 * a mechanism to convert a simple, single-block bytecode functions to the new IR,
23351 * and a JIT code generator capable of generating code from this representation.
23353 The JIT generates two code paths, with the slower path not reentering the fast path
23354 mid-block, allowing speculative optimizations to be made on the hot path, with type
23355 information arising from these speculative decisions able to be propagated through the
23356 dataflow. Code generation of both speculative and non-speculative paths exploits the type
23357 and liveness information represented in the dataflow graph to attempt to avoid redundant
23358 boxing and type-checking of values, and to remove unnecessary spills of temporary values
23359 to the RegisterFile.
23361 The dataflow JIT currently can only support a subset of bytecode operations, limited to
23362 arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
23363 dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
23364 expanded to include, control-flow, function calls, and then the long-tail of remaining
23365 bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
23366 this only supports x86-64.
23368 The status of the dataflow JIT is currently work-in-progress. Limitations of the present
23369 JIT code generation may cause performance regressions, particularly:
23370 * the policy to only generate arithmetic code on the speculative path using integer
23371 instructions, never using floating point.
23372 * the policy to only generate arithmetic code on the non-speculative path using
23373 floating point instructions, never using integer.
23374 * always generating JSValue adds on the non-speculative path as a call out to a
23375 C-function, never handling this in JIT code.
23376 * always assuming by-Value property accesses on the speculative path to be array
23378 * generating all by-Value property accesses from the non-speculative path as a call
23379 out to a C-function.
23380 * generating all by-Indentifer property accesses as a call out to a C-function.
23381 Due to these regressions, the code is landed in a state where it is disabled in most
23382 cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
23383 addressed, the JIT will be allowed to trigger in more cases.
23385 * JavaScriptCore.xcodeproj/project.pbxproj:
23386 - Added new files to Xcode project.
23388 - Added directory for new code.
23389 * dfg/DFGByteCodeParser.cpp: Added.
23390 * dfg/DFGByteCodeParser.h: Added.
23391 - Contruct a DFG::Graph representation from a bytecode CodeBlock.
23392 * dfg/DFGGenerationInfo.h: Added.
23393 - Track type & register information for VirtualRegisters during JIT code generation.
23394 * dfg/DFGGraph.cpp: Added.
23395 * dfg/DFGGraph.h: Added.
23396 - Dataflow graph intermediate representation for code generation.
23397 * dfg/DFGJITCodeGenerator.cpp: Added.
23398 * dfg/DFGJITCodeGenerator.h: Added.
23399 - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
23400 * dfg/DFGJITCompiler.cpp: Added.
23401 * dfg/DFGJITCompiler.h: Added.
23402 - Class responsible for driving code generation of speculativeJIT & non-speculative
23403 code paths from the dataflow graph.
23404 * dfg/DFGNonSpeculativeJIT.cpp: Added.
23405 * dfg/DFGNonSpeculativeJIT.h: Added.
23406 - Used to generate the non-speculative code path, this make no assumptions
23407 about operand types.
23408 * dfg/DFGOperations.cpp: Added.
23409 * dfg/DFGOperations.h: Added.
23410 - Helper functions called from the JIT generated code.
23411 * dfg/DFGRegisterBank.h: Added.
23412 - Used to track contents of physical registers during JIT code generation.
23413 * dfg/DFGSpeculativeJIT.cpp: Added.
23414 * dfg/DFGSpeculativeJIT.h: Added.
23415 - Used to generate the speculative code path, this make assumptions about
23416 operand types to enable optimization.
23417 * runtime/Executable.cpp:
23418 - Add code to attempt to use the DFG JIT to compile a function, with fallback
23419 to the existing JIT.
23421 - Added compile guards to enable the DFG JIT.
23423 2011-03-14 Geoffrey Garen <ggaren@apple.com>
23425 Reviewed by Oliver Hunt.
23427 Removed more cases of DeprecatedPtr (exception, SmallStrings)
23428 https://bugs.webkit.org/show_bug.cgi?id=56332
23430 * runtime/Identifier.cpp:
23431 (JSC::Identifier::add):
23432 (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
23433 constant, to make this code less brittle.
23435 * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
23436 this reference is owned and managed directly by the heap.
23438 * runtime/JSString.cpp:
23439 (JSC::JSString::substringFromRope):
23440 * runtime/JSString.h:
23441 (JSC::jsSingleCharacterString):
23442 (JSC::jsSingleCharacterSubstring):
23444 (JSC::jsStringWithFinalizer):
23445 (JSC::jsSubstring):
23446 (JSC::jsOwnedString): Use a variable instead of a hard-coded
23447 constant, to make this code less brittle.
23449 * runtime/SmallStrings.cpp:
23450 (JSC::SmallStringsStorage::rep):
23451 (JSC::SmallStringsStorage::SmallStringsStorage):
23452 (JSC::SmallStrings::SmallStrings):
23453 (JSC::SmallStrings::markChildren):
23454 (JSC::SmallStrings::clear):
23455 (JSC::SmallStrings::count): Use a variable instead of a hard-coded
23456 constant, to make this code less brittle.
23458 * runtime/SmallStrings.h:
23459 (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
23460 DeprecatedPtr because these references are owned and managed directly by
23463 Stop using FixedArray because we only want a very limited set
23464 of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
23466 * runtime/WriteBarrier.h:
23468 (JSC::WriteBarrier::WriteBarrier):
23469 (JSC::HeapRoot::HeapRoot):
23470 (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
23471 without write barrier because we assume all HeapRoots are scanned during
23474 2011-03-14 Brian Weinstein <bweinstein@apple.com>
23476 Reviewed by Adam Roben and Gavin Barraclough.
23478 FileSystemWin.cpp needs listDirectory() implementation
23479 https://bugs.webkit.org/show_bug.cgi?id=56331
23480 <rdar://problem/9126635>
23482 Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
23484 * wtf/text/StringConcatenate.h:
23486 2011-03-14 Mark Rowe <mrowe@apple.com>
23488 Reviewed by Oliver Hunt.
23490 <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
23492 * API/JSClassRef.cpp:
23493 (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
23494 the class definition contains duplicates. This also removes what look to be leaks
23495 of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
23496 which retains / releases the instances at the appropriate time, so explicitly calling
23497 ref is not necessary.
23499 2011-03-14 Oliver Hunt <oliver@apple.com>
23503 * jit/JSInterfaceJIT.h:
23504 (JSC::JSInterfaceJIT::emitLoadInt32):
23505 (JSC::JSInterfaceJIT::tagFor):
23506 (JSC::JSInterfaceJIT::payloadFor):
23507 (JSC::JSInterfaceJIT::intPayloadFor):
23508 (JSC::JSInterfaceJIT::intTagFor):
23509 (JSC::JSInterfaceJIT::addressFor):
23511 2011-03-11 Oliver Hunt <oliver@apple.com>
23513 Reviewed by Gavin Barraclough.
23515 Ensure all values are correctly tagged in the registerfile
23516 https://bugs.webkit.org/show_bug.cgi?id=56214
23518 This patch makes sure that all JSCell pointers written to
23519 the registerfile are correctly tagged as JSCells, and replaces
23520 raw int usage with the immediate representation.
23522 For performance, register pressure, and general saneness reasons
23523 I've added abstractions for reading and writing the tag
23524 and payload of integer registers directly for the JSVALUE64
23527 * interpreter/Register.h:
23528 (JSC::Register::withInt):
23529 (JSC::Register::withCallee):
23530 (JSC::Register::operator=):
23531 (JSC::Register::i):
23532 (JSC::Register::activation):
23533 (JSC::Register::function):
23534 (JSC::Register::propertyNameIterator):
23535 (JSC::Register::scopeChain):
23538 (JSC::JIT::compileOpCallInitializeCallFrame):
23539 (JSC::JIT::compileOpCallVarargs):
23540 (JSC::JIT::compileOpCall):
23541 * jit/JITCall32_64.cpp:
23542 (JSC::JIT::compileOpCallInitializeCallFrame):
23543 (JSC::JIT::compileOpCallVarargs):
23544 (JSC::JIT::compileOpCall):
23545 (JSC::JIT::compileOpCallSlowCase):
23546 * jit/JITInlineMethods.h:
23547 (JSC::JIT::emitPutToCallFrameHeader):
23548 (JSC::JIT::emitPutCellToCallFrameHeader):
23549 (JSC::JIT::emitPutIntToCallFrameHeader):
23550 * jit/JITOpcodes.cpp:
23551 (JSC::JIT::privateCompileCTINativeCall):
23552 (JSC::JIT::emit_op_get_pnames):
23553 (JSC::JIT::emit_op_next_pname):
23554 (JSC::JIT::emit_op_load_varargs):
23555 (JSC::JIT::emitSlow_op_load_varargs):
23556 * jit/JITOpcodes32_64.cpp:
23557 (JSC::JIT::privateCompileCTINativeCall):
23558 (JSC::JIT::emit_op_get_pnames):
23559 (JSC::JIT::emit_op_next_pname):
23560 * jit/JSInterfaceJIT.h:
23561 (JSC::JSInterfaceJIT::intPayloadFor):
23562 (JSC::JSInterfaceJIT::intTagFor):
23563 * jit/SpecializedThunkJIT.h:
23564 (JSC::SpecializedThunkJIT::returnJSValue):
23565 (JSC::SpecializedThunkJIT::returnDouble):
23566 (JSC::SpecializedThunkJIT::returnInt32):
23567 (JSC::SpecializedThunkJIT::returnJSCell):
23569 2011-03-13 Geoffrey Garen <ggaren@apple.com>
23571 Reviewed by Sam Weinig.
23573 A few Heap-related renames (sans file moves, which should come next)
23574 https://bugs.webkit.org/show_bug.cgi?id=56283
23576 ConservativeSet => ConservativeRoots. "Set" was misleading, since items
23577 are not uniqued. Also, "Roots" is more specific about what's in the set.
23579 MachineStackMarker => MachineThreads. "Threads" is more descriptive of
23580 the fact that this class maintains a set of all threads using JSC.
23581 "Stack" was misleading, since this class traverses stacks and registers.
23582 "Mark" was misleading, since this class doesn't mark anything anymore.
23584 registerThread => addCurrentThread. "Current" is more specific.
23585 unregisterThread => removeCurrentThread. "Current" is more specific.
23587 "currentThreadRegistrar" => threadSpecific. The only point of this data
23588 structure is to register a thread-specific destructor with a pointer to
23591 "mark...Conservatively" => "gather". "Mark" is not true, since these
23592 functions don't mark anything. "Conservatively" is redundant, since they
23593 take "ConservativeRoots" as an argument.
23596 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
23597 * JavaScriptCore.exp:
23598 * runtime/ConservativeSet.cpp:
23599 (JSC::ConservativeRoots::grow):
23600 (JSC::ConservativeRoots::add):
23601 * runtime/ConservativeSet.h:
23602 (JSC::ConservativeRoots::ConservativeRoots):
23603 (JSC::ConservativeRoots::~ConservativeRoots):
23604 (JSC::ConservativeRoots::size):
23605 (JSC::ConservativeRoots::roots):
23606 * runtime/Heap.cpp:
23608 (JSC::Heap::markRoots):
23610 (JSC::Heap::machineThreads):
23611 * runtime/JSGlobalData.h:
23612 (JSC::JSGlobalData::makeUsableFromMultipleThreads):
23613 * runtime/MachineStackMarker.cpp:
23614 (JSC::MachineThreads::MachineThreads):
23615 (JSC::MachineThreads::~MachineThreads):
23616 (JSC::MachineThreads::makeUsableFromMultipleThreads):
23617 (JSC::MachineThreads::addCurrentThread):
23618 (JSC::MachineThreads::removeThread):
23619 (JSC::MachineThreads::removeCurrentThread):
23620 (JSC::MachineThreads::gatherFromCurrentThreadInternal):
23621 (JSC::MachineThreads::gatherFromCurrentThread):
23622 (JSC::MachineThreads::gatherFromOtherThread):
23623 (JSC::MachineThreads::gatherConservativeRoots):
23624 * runtime/MachineStackMarker.h:
23625 * runtime/MarkStack.h:
23626 (JSC::MarkStack::append):
23628 2011-03-13 David Kilzer <ddkilzer@apple.com>
23630 BUILD FIX for armv7 after r80969
23632 Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
23633 <https://bugs.webkit.org/show_bug.cgi?id=56270>
23635 * assembler/MacroAssemblerARMv7.h:
23636 (JSC::MacroAssemblerARMv7::load32): Made void* address argument
23638 (JSC::MacroAssemblerARMv7::store32): Ditto.
23640 2011-03-13 Geoffrey Garen <ggaren@apple.com>
23644 Try to fix the Mac build.
23646 * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
23647 ConervativeSet.h, since it's now visible when compiling other projects.
23649 2011-03-13 Geoffrey Garen <ggaren@apple.com>
23651 Reviewed by Oliver Hunt.
23653 Removed another case of DeprecatedPtr (ConservativeSet)
23654 https://bugs.webkit.org/show_bug.cgi?id=56281
23656 The ConservativeSet is an internal data structure used during marking,
23657 so direct pointers are fine.
23659 * runtime/ConservativeSet.cpp:
23660 (JSC::ConservativeSet::grow):
23661 * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
23662 (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
23663 the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
23664 sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
23665 (JSC::ConservativeSet::size):
23666 (JSC::ConservativeSet::set): Use direct pointers, as stated above.
23668 * runtime/Heap.cpp:
23669 (JSC::Heap::markRoots):
23670 * runtime/MarkStack.h:
23671 (JSC::MarkStack::append): Created a special case of append for
23672 ConservativeSet. I didn't want to add back a generic "append JSCell*"
23673 function, since other class might start using that wrong. (In the end,
23674 this function might go away, since the Heap will want to do something
23675 slightly more interesting with the conservative set, but this is OK for
23678 2011-03-13 Geoffrey Garen <ggaren@apple.com>
23680 Reviewed by Oliver Hunt.
23682 Removed another case of DeprecatedPtr (PutPropertySlot)
23683 https://bugs.webkit.org/show_bug.cgi?id=56278
23685 * runtime/PutPropertySlot.h:
23686 (JSC::PutPropertySlot::setExistingProperty):
23687 (JSC::PutPropertySlot::setNewProperty):
23688 (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
23689 since it's a stack-allocated temporary.
23691 2011-03-13 Geoffrey Garen <ggaren@apple.com>
23693 Reviewed by Oliver Hunt.
23695 Removed one case of DeprecatedPtr (ScopeChainIterator)
23696 https://bugs.webkit.org/show_bug.cgi?id=56277
23698 * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
23699 since it's a stack-allocated temporary.
23701 2011-03-13 Gavin Barraclough <barraclough@apple.com>
23703 Reviewed by Sam Weinig.
23705 Bug 56273 - Add three operand forms to MacroAssember operations.
23707 Adding for X86(_64) for now, should be rolled out to other backends as necessary.
23708 These may allow more efficient code generation in some cases, avoiding the need
23709 for unnecessary register-register move instructions.
23711 * assembler/AbstractMacroAssembler.h:
23712 (JSC::AbstractMacroAssembler::Jump::link):
23713 (JSC::AbstractMacroAssembler::Jump::linkTo):
23714 - marked these methods const.
23715 (JSC::AbstractMacroAssembler::Jump::isSet):
23716 - add a method to check whether a Jump object has been set to
23717 reference an instruction, or is in a null, unset state.
23718 * assembler/MacroAssemblerCodeRef.h:
23719 (JSC::FunctionPtr::FunctionPtr):
23720 - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
23721 * assembler/MacroAssemblerX86Common.h:
23722 (JSC::MacroAssemblerX86Common::and32):
23723 (JSC::MacroAssemblerX86Common::lshift32):
23724 (JSC::MacroAssemblerX86Common::or32):
23725 (JSC::MacroAssemblerX86Common::rshift32):
23726 (JSC::MacroAssemblerX86Common::urshift32):
23727 (JSC::MacroAssemblerX86Common::xor32):
23728 (JSC::MacroAssemblerX86Common::moveDouble):
23729 (JSC::MacroAssemblerX86Common::addDouble):
23730 (JSC::MacroAssemblerX86Common::divDouble):
23731 (JSC::MacroAssemblerX86Common::subDouble):
23732 (JSC::MacroAssemblerX86Common::mulDouble):
23733 (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
23734 (JSC::MacroAssemblerX86Common::branchTest32):
23735 (JSC::MacroAssemblerX86Common::branchTest8):
23736 (JSC::MacroAssemblerX86Common::branchAdd32):
23737 (JSC::MacroAssemblerX86Common::branchMul32):
23738 (JSC::MacroAssemblerX86Common::branchSub32):
23739 - add three operand forms of these instructions.
23740 * assembler/MacroAssemblerX86_64.h:
23741 (JSC::MacroAssemblerX86_64::addDouble):
23742 (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
23743 (JSC::MacroAssemblerX86_64::loadPtr):
23744 (JSC::MacroAssemblerX86_64::branchTestPtr):
23745 * assembler/X86Assembler.h:
23746 (JSC::X86Assembler::JmpSrc::isSet):
23747 - add a method to check whether a JmpSrc object has been set to
23748 reference an instruction, or is in a null, unset state.
23749 (JSC::X86Assembler::movsd_rr):
23750 - added FP register-register move.
23751 (JSC::X86Assembler::linkJump):
23752 - Add an assert to check jumps aren't linked more than once.
23753 * jit/JITInlineMethods.h:
23754 (JSC::JIT::emitLoadInt32ToDouble):
23755 - load integers to the FPU via regsiters on x86-64.
23757 2011-03-13 Gavin Barraclough <barraclough@apple.com>
23761 * assembler/MacroAssemblerARM.h:
23762 (JSC::MacroAssemblerARM::load32):
23764 2011-03-13 Gavin Barraclough <barraclough@apple.com>
23766 Reviewed by Sam Weinig.
23768 Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
23770 The JIT need to 'friend' other classes in order to be able to calculate offsets
23771 of various properties, or the absolute addresses of members within specific objects,
23772 in order to JIT generate code that will access members within the class when run.
23774 Instead of using friends in these cases, switch to providing specific accessor
23775 methods to provide this information. In the case of offsets, these can be static
23776 functions, and in the case of pointers to members within a specific object these can
23777 be const methods returning pointers to const values, to prevent clients from
23778 modifying values otherwise encapsulated within classes.
23780 * bytecode/SamplingTool.h:
23781 * interpreter/Register.h:
23782 * interpreter/RegisterFile.h:
23783 * runtime/JSArray.h:
23784 * runtime/JSCell.h:
23785 * runtime/JSTypeInfo.h:
23786 * runtime/JSVariableObject.h:
23787 * runtime/Structure.h:
23788 * wtf/RefCounted.h:
23789 - Change these classes to no longer friend the JIT, add accessors for member offsets.
23791 * jit/JITCall32_64.cpp:
23792 * jit/JITInlineMethods.h:
23793 * jit/JITOpcodes.cpp:
23794 * jit/JITOpcodes32_64.cpp:
23795 * jit/JITPropertyAccess.cpp:
23796 * jit/JITPropertyAccess32_64.cpp:
23797 - Change the JIT to use class accessors, rather than taking object ofsets directly.
23798 * assembler/AbstractMacroAssembler.h:
23799 * assembler/MacroAssemblerX86_64.h:
23800 * assembler/X86Assembler.h:
23801 - Since the accessors for objects members return const pointers to retain encapsulation,
23802 methods generating code with absolute addresses must be able to handle const pointers
23803 (the JIT doesn't write to these values, do dies treat the pointer to value as const
23804 from within the C++ code of the JIT, if not at runtime!).
23806 2011-03-12 Sheriff Bot <webkit.review.bot@gmail.com>
23808 Unreviewed, rolling out r80919.
23809 http://trac.webkit.org/changeset/80919
23810 https://bugs.webkit.org/show_bug.cgi?id=56251
23812 all windows bots failed to compile this change (Requested by
23813 loislo on #webkit).
23815 * JavaScriptCore.xcodeproj/project.pbxproj:
23816 * bytecode/StructureStubInfo.cpp:
23817 * interpreter/Register.h:
23818 (JSC::Register::withInt):
23819 (JSC::Register::withCallee):
23820 (JSC::Register::operator=):
23821 (JSC::Register::i):
23822 (JSC::Register::activation):
23823 (JSC::Register::function):
23824 (JSC::Register::propertyNameIterator):
23825 (JSC::Register::scopeChain):
23828 (JSC::JIT::compileOpCallInitializeCallFrame):
23829 (JSC::JIT::compileOpCallVarargs):
23830 (JSC::JIT::compileOpCall):
23831 * jit/JITCall32_64.cpp:
23832 (JSC::JIT::compileOpCallInitializeCallFrame):
23833 (JSC::JIT::compileOpCallVarargs):
23834 (JSC::JIT::compileOpCall):
23835 (JSC::JIT::compileOpCallSlowCase):
23836 * jit/JITInlineMethods.h:
23837 (JSC::JIT::emitPutToCallFrameHeader):
23838 * jit/JITOpcodes.cpp:
23839 (JSC::JIT::privateCompileCTINativeCall):
23840 (JSC::JIT::emit_op_get_pnames):
23841 (JSC::JIT::emit_op_next_pname):
23842 (JSC::JIT::emit_op_load_varargs):
23843 (JSC::JIT::emitSlow_op_load_varargs):
23844 * jit/JITOpcodes32_64.cpp:
23845 (JSC::JIT::privateCompileCTINativeCall):
23846 (JSC::JIT::emit_op_get_pnames):
23847 (JSC::JIT::emit_op_next_pname):
23848 * jit/JSInterfaceJIT.h:
23849 (JSC::JSInterfaceJIT::payloadFor):
23850 * jit/SpecializedThunkJIT.h:
23851 (JSC::SpecializedThunkJIT::returnJSValue):
23852 (JSC::SpecializedThunkJIT::returnDouble):
23853 (JSC::SpecializedThunkJIT::returnInt32):
23854 (JSC::SpecializedThunkJIT::returnJSCell):
23855 * runtime/ArgList.cpp:
23856 * runtime/DateConversion.cpp:
23857 * runtime/GCActivityCallbackCF.cpp:
23858 * runtime/Identifier.cpp:
23859 * runtime/JSActivation.h:
23860 (JSC::asActivation):
23861 * runtime/JSLock.cpp:
23862 * runtime/JSNumberCell.cpp:
23863 * runtime/JSObject.h:
23864 * runtime/JSPropertyNameIterator.h:
23865 * runtime/JSValue.h:
23866 * runtime/JSZombie.cpp:
23867 * runtime/MarkedBlock.cpp:
23868 * runtime/MarkedSpace.cpp:
23869 * runtime/PropertyNameArray.cpp:
23870 * runtime/ScopeChain.h:
23871 (JSC::ExecState::globalThisValue):
23872 * wtf/DateMath.cpp:
23874 2011-03-11 Oliver Hunt <oliver@apple.com>
23876 Reviewed by Gavin Barraclough.
23878 Ensure all values are correctly tagged in the registerfile
23879 https://bugs.webkit.org/show_bug.cgi?id=56214
23881 This patch makes sure that all JSCell pointers written to
23882 the registerfile are correctly tagged as JSCells, and replaces
23883 raw int usage with the immediate representation.
23885 For performance, register pressure, and general saneness reasons
23886 I've added abstractions for reading and writing the tag
23887 and payload of integer registers directly for the JSVALUE64
23890 * interpreter/Register.h:
23891 (JSC::Register::withInt):
23892 (JSC::Register::withCallee):
23893 (JSC::Register::operator=):
23894 (JSC::Register::i):
23895 (JSC::Register::activation):
23896 (JSC::Register::function):
23897 (JSC::Register::propertyNameIterator):
23898 (JSC::Register::scopeChain):
23901 (JSC::JIT::compileOpCallInitializeCallFrame):
23902 (JSC::JIT::compileOpCallVarargs):
23903 (JSC::JIT::compileOpCall):
23904 * jit/JITCall32_64.cpp:
23905 (JSC::JIT::compileOpCallInitializeCallFrame):
23906 (JSC::JIT::compileOpCallVarargs):
23907 (JSC::JIT::compileOpCall):
23908 (JSC::JIT::compileOpCallSlowCase):
23909 * jit/JITInlineMethods.h:
23910 (JSC::JIT::emitPutToCallFrameHeader):
23911 (JSC::JIT::emitPutCellToCallFrameHeader):
23912 (JSC::JIT::emitPutIntToCallFrameHeader):
23913 * jit/JITOpcodes.cpp:
23914 (JSC::JIT::privateCompileCTINativeCall):
23915 (JSC::JIT::emit_op_get_pnames):
23916 (JSC::JIT::emit_op_next_pname):
23917 (JSC::JIT::emit_op_load_varargs):
23918 (JSC::JIT::emitSlow_op_load_varargs):
23919 * jit/JITOpcodes32_64.cpp:
23920 (JSC::JIT::privateCompileCTINativeCall):
23921 (JSC::JIT::emit_op_get_pnames):
23922 (JSC::JIT::emit_op_next_pname):
23923 * jit/JSInterfaceJIT.h:
23924 (JSC::JSInterfaceJIT::intPayloadFor):
23925 (JSC::JSInterfaceJIT::intTagFor):
23926 * jit/SpecializedThunkJIT.h:
23927 (JSC::SpecializedThunkJIT::returnJSValue):
23928 (JSC::SpecializedThunkJIT::returnDouble):
23929 (JSC::SpecializedThunkJIT::returnInt32):
23930 (JSC::SpecializedThunkJIT::returnJSCell):
23932 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
23934 Reviewed by Eric Seidel.
23936 Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
23937 https://bugs.webkit.org/show_bug.cgi?id=56231
23939 * JavaScriptCore.gypi: Added project_dir variable.
23940 * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
23941 * gyp/generate-dtrace-header.sh: Changed to use project_dir.
23943 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
23945 Reviewed by Adam Barth.
23947 Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
23948 https://bugs.webkit.org/show_bug.cgi?id=56217
23950 * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
23952 * gyp/generate-derived-sources.sh: Changed to use passed directory.
23953 * gyp/generate-dtrace-header.sh: Ditto.
23955 2011-03-11 Eric Carlson <eric.carlson@apple.com>
23957 Reviewed by Sam Weinig.
23959 <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
23961 No new tests, existing media tests cover this.
23963 * JavaScriptCore.exp: Export cancelCallOnMainThread
23964 * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
23966 2011-03-11 Dimitri Glazkov <dglazkov@chromium.org>
23968 Reviewed by Adam Barth.
23970 Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
23971 https://bugs.webkit.org/show_bug.cgi?id=56207
23973 * JavaScriptCore.gypi: Added Tracing.d to the sources.
23974 * gyp/generate-dtrace-header.sh: Added.
23975 * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
23976 and added DTrace header generating step.
23978 2011-03-10 Oliver Hunt <oliver@apple.com>
23980 Reviewed by Gavin Barraclough.
23982 Fix allocation of native function with a cached thunk
23983 https://bugs.webkit.org/show_bug.cgi?id=56127
23985 Fix this race condition found while fixing zombies.
23987 * collector/handles/HandleHeap.cpp:
23988 (JSC::HandleHeap::clearWeakPointers):
23989 * runtime/Heap.cpp:
23990 (JSC::Heap::reset):
23991 * runtime/JSFunction.cpp:
23992 (JSC::JSFunction::JSFunction):
23993 (JSC::JSFunction::markChildren):
23994 * runtime/JSValue.h:
23995 (JSC::JSValue::decode):
23996 * runtime/JSZombie.cpp:
23997 (JSC::JSZombie::leakedZombieStructure):
23998 * runtime/JSZombie.h:
23999 (JSC::JSZombie::createStructure):
24000 * runtime/MarkedBlock.cpp:
24002 2011-03-10 Luiz Agostini <luiz.agostini@openbossa.org>
24004 Reviewed by Andreas Kling.
24006 [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
24007 https://bugs.webkit.org/show_bug.cgi?id=33008
24009 Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
24010 Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
24011 it has its own ways to do JSC threading.
24013 Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
24015 * runtime/MachineStackMarker.cpp:
24018 2011-03-10 Gavin Barraclough <barraclough@apple.com>
24020 Reviewed by Oliver Hunt.
24022 Bug 56077 - ES5 conformance issues with RegExp.prototype
24024 There are three issues causing test failures in sputnik.
24026 (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
24027 (2) The 'length' property of the test/exec functions should be 1.
24028 (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
24030 * runtime/RegExpObject.cpp:
24031 (JSC::RegExpObject::markChildren):
24032 - Added to mark lastIndex
24033 (JSC::regExpObjectLastIndex):
24034 (JSC::setRegExpObjectLastIndex):
24035 - lastIndex is now stored as a JSValue.
24036 (JSC::RegExpObject::match):
24037 - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
24038 * runtime/RegExpObject.h:
24039 (JSC::RegExpObject::setLastIndex):
24040 (JSC::RegExpObject::setLastIndex):
24041 - Set lastIndex, either from a size_t or a JSValue.
24042 (JSC::RegExpObject::getLastIndex):
24044 (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
24045 - Initialize as a JSValue.
24046 * runtime/RegExpPrototype.cpp:
24047 (JSC::RegExpPrototype::RegExpPrototype):
24048 - Add test/exec properties with length 1.
24049 * runtime/StringPrototype.cpp:
24050 (JSC::stringProtoFuncMatch):
24051 (JSC::stringProtoFuncSearch):
24052 - Do not read RegExp.input if none is provided.
24053 * tests/mozilla/js1_2/regexp/RegExp_input.js:
24054 * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
24055 - Update these tests (they relied on non-ES5 behaviour).
24057 2011-03-10 Geoffrey Garen <ggaren@apple.com>
24059 Reviewed by Oliver Hunt.
24061 Rolled back in 80277 and 80280 with event handler layout test failures fixed.
24062 https://bugs.webkit.org/show_bug.cgi?id=55653
24064 The failures were caused by a last minute typo: assigning to currentEvent
24065 instead of m_currentEvent.
24067 * JavaScriptCore.exp:
24068 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24069 * JavaScriptCore.xcodeproj/project.pbxproj:
24070 * bytecompiler/BytecodeGenerator.cpp:
24071 * jit/JITOpcodes.cpp:
24072 * jit/JITOpcodes32_64.cpp:
24073 * runtime/Arguments.h:
24074 * runtime/JSActivation.cpp:
24075 * runtime/JSActivation.h:
24076 * runtime/JSCell.h:
24077 * runtime/JSGlobalObject.cpp:
24078 * runtime/JSGlobalObject.h:
24079 * runtime/JSObject.cpp:
24080 * runtime/JSStaticScopeObject.cpp:
24081 * runtime/JSStaticScopeObject.h:
24082 * runtime/JSVariableObject.h:
24083 * runtime/MarkedSpace.cpp:
24084 * runtime/MarkedSpace.h:
24086 2011-03-09 Oliver Hunt <oliver@apple.com>
24088 Reviewed by Gavin Barraclough.
24090 jquery/manipulation.html fails after r80598
24091 https://bugs.webkit.org/show_bug.cgi?id=56019
24093 When linking a call, codeblock now takes ownership of the linked function
24094 This removes the need for unlinking, and thus the incorrectness that was
24095 showing up in these tests.
24097 * bytecode/CodeBlock.cpp:
24098 (JSC::CodeBlock::~CodeBlock):
24099 (JSC::CodeBlock::markAggregate):
24100 * bytecode/CodeBlock.h:
24101 (JSC::CallLinkInfo::CallLinkInfo):
24102 (JSC::CallLinkInfo::setUnlinked):
24103 (JSC::CodeBlock::addCaller):
24105 (JSC::JIT::privateCompile):
24106 (JSC::JIT::linkCall):
24107 (JSC::JIT::linkConstruct):
24109 * runtime/Executable.cpp:
24110 * runtime/Executable.h:
24112 2011-03-09 Daniel Bates <dbates@rim.com>
24114 Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
24115 (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
24117 * interpreter/Interpreter.cpp:
24118 (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
24120 2011-03-09 Gavin Barraclough <barraclough@apple.com>
24122 Reviewed by Sam Weinig.
24124 Bug 56041 - RexExp constructor should only accept flags "gim"
24125 Fix for issues introduced in r80667.
24127 Invalid flags to a RegExp literal are a late syntax error!
24129 * bytecode/CodeBlock.h:
24130 (JSC::CodeBlock::addRegExp):
24131 - Pass a PassRefPtr<RegExp>
24132 * bytecompiler/BytecodeGenerator.cpp:
24133 (JSC::BytecodeGenerator::addRegExp):
24134 (JSC::BytecodeGenerator::emitNewRegExp):
24135 * bytecompiler/BytecodeGenerator.h:
24136 - Pass a PassRefPtr<RegExp>
24137 * bytecompiler/NodesCodegen.cpp:
24138 (JSC::RegExpNode::emitBytecode):
24139 - Should not be ASSERTing that the flags are valid - this is a late(er) error.
24140 * interpreter/Interpreter.cpp:
24141 (JSC::Interpreter::privateExecute):
24142 - Need to check for error from RegExp constructor.
24143 * jit/JITStubs.cpp:
24144 (JSC::DEFINE_STUB_FUNCTION):
24145 - Need to check for error from RegExp constructor.
24146 * runtime/RegExp.h:
24147 (JSC::RegExp::isValid):
24148 - Make isValid check that the regexp was created with valid flags.
24149 * runtime/RegExpKey.h:
24150 - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
24152 2011-03-09 Gavin Barraclough <barraclough@apple.com>
24154 Windows build fix part 2.
24156 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24158 2011-03-09 Gavin Barraclough <barraclough@apple.com>
24160 Windows build fix part 1.
24162 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24164 2011-03-09 Gavin Barraclough <barraclough@apple.com>
24166 Reviewed by Darin Adler.
24168 Bug 56041 - RexExp constructor should only accept flags "gim"
24169 We also should be passing the flags around as a bitfield rather than a string,
24170 and should not have redundant, incompatible code for converting the string to a bitfield!
24172 * JavaScriptCore.exp:
24173 * bytecompiler/NodesCodegen.cpp:
24174 (JSC::RegExpNode::emitBytecode):
24175 - Need to parse flags string to enum.
24176 * runtime/RegExp.cpp:
24177 (JSC::regExpFlags):
24178 (JSC::RegExp::RegExp):
24179 (JSC::RegExp::create):
24180 - Add method to parse flags string to enum, change constructor/create args to take enum.
24181 * runtime/RegExp.h:
24182 (JSC::RegExp::global):
24183 (JSC::RegExp::ignoreCase):
24184 (JSC::RegExp::multiline):
24185 - Change to use new enum values.
24186 * runtime/RegExpCache.cpp:
24187 (JSC::RegExpCache::lookupOrCreate):
24188 (JSC::RegExpCache::create):
24189 * runtime/RegExpCache.h:
24190 - Changed to use regExpFlags enum instead of int/const UString&.
24191 * runtime/RegExpConstructor.cpp:
24192 (JSC::constructRegExp):
24193 - Add use new enum parsing, check for error.
24194 * runtime/RegExpKey.h:
24195 (JSC::RegExpKey::RegExpKey):
24196 * runtime/RegExpPrototype.cpp:
24197 (JSC::RegExpPrototype::RegExpPrototype):
24198 - Pass NoFlags value instead of empty string.
24199 (JSC::regExpProtoFuncCompile):
24200 - Add use new enum parsing, check for error.
24201 * runtime/StringPrototype.cpp:
24202 (JSC::stringProtoFuncMatch):
24203 (JSC::stringProtoFuncSearch):
24204 - Pass NoFlags value instead of empty string.
24206 2011-03-08 Gavin Barraclough <barraclough@apple.com>
24208 Reviewed by Sam Weinig
24210 Bug 55994 - Functions on Array.prototype should check length first.
24211 These methods are designed to work on generic objects too, and if 'length'
24212 is a getter that throws an exception, ensure this is correctly thrown
24213 (even if other exceptions would be thrown, too).
24215 Make the length check the first thing we do.
24216 This change shows a progression on SunSpider on my machine, but this is likely bogus.
24218 * runtime/ArrayPrototype.cpp:
24219 (JSC::arrayProtoFuncToString):
24220 (JSC::arrayProtoFuncToLocaleString):
24221 (JSC::arrayProtoFuncJoin):
24222 (JSC::arrayProtoFuncPop):
24223 (JSC::arrayProtoFuncPush):
24224 (JSC::arrayProtoFuncReverse):
24225 (JSC::arrayProtoFuncShift):
24226 (JSC::arrayProtoFuncSlice):
24227 (JSC::arrayProtoFuncSort):
24228 (JSC::arrayProtoFuncSplice):
24229 (JSC::arrayProtoFuncUnShift):
24230 (JSC::arrayProtoFuncFilter):
24231 (JSC::arrayProtoFuncMap):
24232 (JSC::arrayProtoFuncEvery):
24233 (JSC::arrayProtoFuncForEach):
24234 (JSC::arrayProtoFuncSome):
24235 (JSC::arrayProtoFuncReduce):
24236 (JSC::arrayProtoFuncReduceRight):
24237 (JSC::arrayProtoFuncIndexOf):
24238 (JSC::arrayProtoFuncLastIndexOf):
24240 2011-03-07 Oliver Hunt <oliver@apple.com>
24242 Reviewed by Gavin Barraclough.
24244 Make CodeBlock GC write barrier safe
24245 https://bugs.webkit.org/show_bug.cgi?id=55910
24247 In order to make CodeBlock WriteBarrier safe it was necessary
24248 to make it have a single GC owner, and for that reason I have
24249 made ExecutableBase a GC allocated object. This required
24250 updating their creation routines as well as all sites that hold
24251 a reference to them. GC objects that held Executable's have been
24252 converted to WriteBarriers, and all other sites now use Global<>.
24254 As an added benefit this gets rid of JSGlobalData's list of
24257 Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
24258 on SunSpider. Given none of the tests that show regressions
24259 demonstrate a regression on their own, and sampling shows up nothing.
24260 I suspect we're just getting one or two additional gc passes at
24261 the end of the run.
24263 * bytecode/CodeBlock.cpp:
24264 (JSC::CodeBlock::dump):
24265 (JSC::CodeBlock::CodeBlock):
24266 (JSC::EvalCodeCache::markAggregate):
24267 (JSC::CodeBlock::markAggregate):
24268 * bytecode/CodeBlock.h:
24269 (JSC::CodeBlock::ownerExecutable):
24270 (JSC::CodeBlock::addConstant):
24271 (JSC::CodeBlock::constantRegister):
24272 (JSC::CodeBlock::getConstant):
24273 (JSC::CodeBlock::addFunctionDecl):
24274 (JSC::CodeBlock::addFunctionExpr):
24275 (JSC::GlobalCodeBlock::GlobalCodeBlock):
24276 (JSC::ExecState::r):
24277 * bytecode/EvalCodeCache.h:
24278 (JSC::EvalCodeCache::get):
24279 * bytecode/SamplingTool.h:
24280 (JSC::ScriptSampleRecord::ScriptSampleRecord):
24281 * bytecompiler/BytecodeGenerator.cpp:
24282 (JSC::BytecodeGenerator::addConstantValue):
24283 (JSC::BytecodeGenerator::emitEqualityOp):
24284 * bytecompiler/BytecodeGenerator.h:
24285 (JSC::BytecodeGenerator::makeFunction):
24286 * debugger/Debugger.cpp:
24287 (JSC::evaluateInGlobalCallFrame):
24288 * debugger/DebuggerCallFrame.cpp:
24289 (JSC::DebuggerCallFrame::evaluate):
24290 * interpreter/Interpreter.cpp:
24291 (JSC::Interpreter::callEval):
24292 * jit/JITInlineMethods.h:
24293 (JSC::JIT::emitLoadDouble):
24294 (JSC::JIT::emitLoadInt32ToDouble):
24295 * jit/JITStubs.cpp:
24296 (JSC::JITThunks::JITThunks):
24297 (JSC::JITThunks::hostFunctionStub):
24298 (JSC::JITThunks::clearHostFunctionStubs):
24300 * runtime/Completion.cpp:
24301 (JSC::checkSyntax):
24303 * runtime/Executable.cpp:
24304 (JSC::EvalExecutable::EvalExecutable):
24305 (JSC::ProgramExecutable::ProgramExecutable):
24306 (JSC::FunctionExecutable::FunctionExecutable):
24307 (JSC::FunctionExecutable::~FunctionExecutable):
24308 (JSC::EvalExecutable::markChildren):
24309 (JSC::ProgramExecutable::markChildren):
24310 (JSC::FunctionExecutable::markChildren):
24311 (JSC::FunctionExecutable::fromGlobalCode):
24312 * runtime/Executable.h:
24313 (JSC::ExecutableBase::ExecutableBase):
24314 (JSC::ExecutableBase::createStructure):
24315 (JSC::NativeExecutable::create):
24316 (JSC::NativeExecutable::NativeExecutable):
24317 (JSC::VPtrHackExecutable::VPtrHackExecutable):
24318 (JSC::ScriptExecutable::ScriptExecutable):
24319 (JSC::EvalExecutable::create):
24320 (JSC::EvalExecutable::createStructure):
24321 (JSC::ProgramExecutable::create):
24322 (JSC::ProgramExecutable::createStructure):
24323 (JSC::FunctionExecutable::create):
24324 (JSC::FunctionExecutable::createStructure):
24325 * runtime/FunctionConstructor.cpp:
24326 (JSC::constructFunction):
24327 * runtime/Heap.cpp:
24328 (JSC::Heap::destroy):
24329 (JSC::Heap::markRoots):
24331 * runtime/JSActivation.cpp:
24332 (JSC::JSActivation::JSActivation):
24333 (JSC::JSActivation::markChildren):
24334 * runtime/JSActivation.h:
24335 (JSC::JSActivation::JSActivationData::JSActivationData):
24336 * runtime/JSCell.h:
24337 * runtime/JSFunction.cpp:
24338 (JSC::JSFunction::JSFunction):
24339 (JSC::JSFunction::~JSFunction):
24340 (JSC::JSFunction::markChildren):
24341 * runtime/JSFunction.h:
24342 * runtime/JSGlobalData.cpp:
24343 (JSC::JSGlobalData::storeVPtrs):
24344 (JSC::JSGlobalData::JSGlobalData):
24345 (JSC::JSGlobalData::getHostFunction):
24346 * runtime/JSGlobalData.h:
24347 * runtime/JSGlobalObjectFunctions.cpp:
24348 (JSC::globalFuncEval):
24349 * runtime/JSObject.cpp:
24350 * runtime/JSStaticScopeObject.cpp:
24351 (JSC::JSStaticScopeObject::markChildren):
24352 * runtime/JSStaticScopeObject.h:
24353 (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
24354 (JSC::JSStaticScopeObject::JSStaticScopeObject):
24355 * runtime/JSZombie.cpp:
24356 (JSC::JSZombie::leakedZombieStructure):
24357 * runtime/JSZombie.h:
24358 (JSC::JSZombie::createStructure):
24359 * runtime/MarkedSpace.h:
24361 2011-03-07 Andy Estes <aestes@apple.com>
24363 Reviewed by Dan Bernstein.
24365 REGRESSION (r79060): Timestamp is missing from tweets in twitter.
24366 https://bugs.webkit.org/show_bug.cgi?id=55228
24368 A change to the date parser to handle the case where the year is
24369 specified before the time zone inadvertently started accepting strings
24370 such as '+0000' as valid years. Those strings actually represent time
24371 zones in an offset of hours and minutes from UTC, not years.
24373 * wtf/DateMath.cpp:
24374 (WTF::parseDateFromNullTerminatedCharacters): If the current character
24375 in dateString is '+' or '-', do not try to parse the next token as a
24378 2011-03-06 Yuta Kitamura <yutak@chromium.org>
24380 Reviewed by Kent Tamura.
24382 Add SHA-1 for new WebSocket protocol
24383 https://bugs.webkit.org/show_bug.cgi?id=55039
24385 The code is based on Chromium's portable SHA-1 implementation
24386 (src/base/sha1_portable.cc). Modifications were made in order
24387 to make the code comply with WebKit coding style.
24390 * JavaScriptCore.exp:
24391 * JavaScriptCore.gypi:
24392 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24393 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
24394 * JavaScriptCore.xcodeproj/project.pbxproj:
24395 * wtf/CMakeLists.txt:
24398 * wtf/SHA1.cpp: Added.
24399 (WTF::testSHA1): This function will be run the first time SHA1
24400 constructor is called. This function computes a few hash values
24401 and checks the results in debug builds. However, constructor is
24402 probably not a good place to run these tests, so we need to find
24403 a good place for it (bug 55853).
24409 (WTF::SHA1::addBytes):
24410 (WTF::SHA1::computeHash):
24411 (WTF::SHA1::finalize):
24412 (WTF::SHA1::processBlock):
24413 (WTF::SHA1::reset):
24414 * wtf/SHA1.h: Added.
24415 (WTF::SHA1::addBytes):
24418 2011-03-05 Adam Barth <abarth@webkit.org>
24420 Reviewed by Dimitri Glazkov.
24422 Add Derived Sources to WebCore GYP build
24423 https://bugs.webkit.org/show_bug.cgi?id=55813
24425 Rename the action to be friendlier.
24427 * gyp/JavaScriptCore.gyp:
24429 2011-03-04 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
24431 Reviewed by Laszlo Gombos.
24433 [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
24434 https://bugs.webkit.org/show_bug.cgi?id=55782
24436 Implement Symbian version of cryptographicallyRandomValuesFromOS
24438 * wtf/OSRandomSource.cpp:
24439 (WTF::cryptographicallyRandomValuesFromOS):
24441 2011-03-04 Gavin Barraclough <barraclough@apple.com>
24443 Reviewed by Cameron Zwarich.
24445 Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
24447 * runtime/JSObject.cpp:
24448 (JSC::JSObject::defineOwnProperty):
24451 2011-03-04 Gavin Barraclough <barraclough@apple.com>
24453 Rubber stamped by olliej.
24455 Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
24457 * interpreter/Interpreter.cpp:
24458 (JSC::Interpreter::privateExecute):
24459 (1) don't infinite loop.
24462 2011-03-04 Gavin Barraclough <barraclough@apple.com>
24468 2011-03-04 Adam Barth <abarth@webkit.org>
24470 Reviewed by Dimitri Glazkov.
24472 Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
24473 https://bugs.webkit.org/show_bug.cgi?id=55798
24475 * JavaScriptCore.gypi:
24476 * gyp/JavaScriptCore.gyp:
24478 2011-03-04 Adam Barth <abarth@webkit.org>
24480 Reviewed by Dimitri Glazkov.
24482 Remove unneeded round-trips through ../Source in the Chromium GYP build
24483 https://bugs.webkit.org/show_bug.cgi?id=55795
24485 * JavaScriptCore.gyp/JavaScriptCore.gyp:
24487 2011-03-04 Adam Barth <abarth@webkit.org>
24489 Reviewed by Dimitri Glazkov.
24491 Use target_defaults to reduce boilerplate in GYP build system
24492 https://bugs.webkit.org/show_bug.cgi?id=55790
24494 Instead of setting up the configuration in each target, just defer to
24495 target_defaults. Also, removed a define that was redundant with the
24498 * gyp/JavaScriptCore.gyp:
24500 2011-03-03 Gavin Barraclough <barraclough@apple.com>
24502 Reviewed by Sam Weinig.
24504 Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
24505 Provide basic functionallity from section 15.2.4 of ECMA-262.
24506 This support will need expanding to cover arrays, too.
24508 Shows a 0.5% progression on SunSpidey, this seems to be due to changing
24509 ObjectConstructor to use a static table.
24511 * DerivedSources.make:
24512 * JavaScriptCore.exp:
24513 * interpreter/CallFrame.h:
24514 (JSC::ExecState::objectConstructorTable):
24515 Add a static table for ObjectConstructor.
24516 * runtime/CommonIdentifiers.h:
24517 * runtime/JSGlobalData.cpp:
24518 (JSC::JSGlobalData::JSGlobalData):
24519 (JSC::JSGlobalData::~JSGlobalData):
24520 Add a static table for ObjectConstructor.
24521 * runtime/JSGlobalData.h:
24522 * runtime/JSGlobalObject.cpp:
24523 (JSC::JSGlobalObject::reset):
24524 Add a static table for ObjectConstructor.
24525 * runtime/JSObject.cpp:
24526 (JSC::JSObject::seal):
24527 (JSC::JSObject::freeze):
24528 (JSC::JSObject::preventExtensions):
24529 Transition the object's structure.
24530 (JSC::JSObject::defineOwnProperty):
24531 Check isExtensible.
24532 * runtime/JSObject.h:
24533 (JSC::JSObject::isSealed):
24534 (JSC::JSObject::isFrozen):
24535 (JSC::JSObject::isExtensible):
24536 These wrap method on structure.
24537 (JSC::JSObject::putDirectInternal):
24538 Check isExtensible.
24539 * runtime/ObjectConstructor.cpp:
24540 (JSC::ObjectConstructor::ObjectConstructor):
24541 (JSC::ObjectConstructor::getOwnPropertySlot):
24542 (JSC::ObjectConstructor::getOwnPropertyDescriptor):
24543 Change ObjectConstructor to use a static table.
24544 (JSC::objectConstructorSeal):
24545 (JSC::objectConstructorFreeze):
24546 (JSC::objectConstructorPreventExtensions):
24547 (JSC::objectConstructorIsSealed):
24548 (JSC::objectConstructorIsFrozen):
24549 (JSC::objectConstructorIsExtensible):
24550 Add new methods on Object.
24551 * runtime/ObjectConstructor.h:
24552 (JSC::ObjectConstructor::createStructure):
24553 * runtime/Structure.cpp:
24554 (JSC::Structure::Structure):
24555 init/propagate m_preventExtensions
24556 (JSC::Structure::sealTransition):
24557 (JSC::Structure::freezeTransition):
24558 (JSC::Structure::preventExtensionsTransition):
24559 transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
24560 (JSC::Structure::isSealed):
24561 (JSC::Structure::isFrozen):
24562 check attributes to detect if object is sealed/frozen.
24563 * runtime/Structure.h:
24564 (JSC::Structure::isExtensible):
24565 checks the m_preventExtensions flag.
24567 2011-03-04 Steve Falkenburg <sfalken@apple.com>
24569 Reviewed by Jon Honeycutt.
24571 Adopt VersionStamper tool for Windows WebKit DLLs
24572 https://bugs.webkit.org/show_bug.cgi?id=55784
24573 <rdar://problem/9021273>
24575 We now use a tool to stamp the version number onto the Apple WebKit DLLs
24576 during the post-build step.
24578 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
24579 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
24580 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
24581 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
24583 2011-03-04 Adam Barth <abarth@webkit.org>
24585 Reviewed by Dimitri Glazkov.
24587 JavaScriptCore GYP build should use a header map
24588 https://bugs.webkit.org/show_bug.cgi?id=55712
24590 This patch moves the os-win32 files into their own variable so that we
24591 can use a header map in the Apple Mac Xcode build. The problem is that
24592 the header map searches the whole project rather than just the files
24593 included in a given target. Another solution to this problem is to
24594 make GYP smarter about filtering out what files are added to the
24597 * JavaScriptCore.gypi:
24598 * gyp/JavaScriptCore.gyp:
24600 2011-03-03 Ryosuke Niwa <rniwa@webkit.org>
24602 Reviewed by Darin Adler.
24604 Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
24605 https://bugs.webkit.org/show_bug.cgi?id=55554
24607 * runtime/JSGlobalObject.cpp:
24608 (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
24609 (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
24610 * runtime/JSGlobalObject.h:
24611 (JSC::JSGlobalObject::addStaticGlobals): Ditto.
24612 * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
24613 (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
24615 2011-03-03 Adam Barth <abarth@webkit.org>
24617 Reviewed by Dimitri Glazkov.
24619 Add jsc to JavaScriptCore GYP build
24620 https://bugs.webkit.org/show_bug.cgi?id=55711
24622 * JavaScriptCore.gypi:
24623 - Move jsc.cpp into jsc_files because it's really part of the jsc
24625 * JavaScriptCore.xcodeproj/project.pbxproj:
24626 - Remove extraneous files from the normal jsc build. I probably
24627 added these by mistake at some point.
24628 * gyp/JavaScriptCore.gyp:
24629 - Add the jsc target to the GYP file.
24631 2011-03-03 Adam Barth <abarth@webkit.org>
24633 Reviewed by Dimitri Glazkov.
24635 Add testapi to JavaScriptCore GYP build
24636 https://bugs.webkit.org/show_bug.cgi?id=55707
24638 The new testapi target is slightly incomplete. There's a resource
24639 copying step that we don't quite have yet.
24641 This patch also cleans up some of the configuration issues in
24642 JavaScriptCore.xcodeproj. It seems kind of wordy to repeat these for
24643 each target. I suspect there's a more compact way of defining the
24644 configurations, but this removes the "Default" configuration, which is
24647 * JavaScriptCore.gypi:
24648 * gyp/JavaScriptCore.gyp:
24650 2011-03-03 Adam Barth <abarth@webkit.org>
24652 Reviewed by Eric Seidel.
24654 Teach JavaScriptCore GYP build about private headers
24655 https://bugs.webkit.org/show_bug.cgi?id=55532
24657 This patch distinguishes between public and private framework headers
24658 so that public headers are copied into the Headers directory and
24659 private headers are copied into the PrivateHeaders directory.
24661 * gyp/JavaScriptCore.gyp:
24663 2011-03-03 Geoffrey Garen <ggaren@apple.com>
24665 Rolled out 80277 and 80280 because they caused event handler layout test
24668 * JavaScriptCore.exp:
24669 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24670 * JavaScriptCore.xcodeproj/project.pbxproj:
24671 * bytecompiler/BytecodeGenerator.cpp:
24672 * jit/JITOpcodes.cpp:
24673 * jit/JITOpcodes32_64.cpp:
24674 * runtime/Arguments.h:
24675 * runtime/JSActivation.cpp:
24676 * runtime/JSActivation.h:
24677 * runtime/JSCell.h:
24678 * runtime/JSGlobalObject.cpp:
24679 * runtime/JSGlobalObject.h:
24680 * runtime/JSObject.cpp:
24681 * runtime/JSStaticScopeObject.cpp:
24682 * runtime/JSStaticScopeObject.h:
24683 * runtime/JSVariableObject.h:
24684 * runtime/MarkedSpace.cpp:
24685 * runtime/MarkedSpace.h:
24687 2011-03-03 Kevin Ollivier <kevino@theolliviers.com>
24689 [wx] Build fix. Alter order of headers included to make sure windows.h
24690 is configured by wx, and skip Posix implementation file we don't use on Win.
24693 * wtf/wx/StringWx.cpp:
24695 2011-03-03 Oliver Hunt <oliver@apple.com>
24697 Reviewed by Geoffrey Garen.
24699 JSVariableObject needs to use WriteBarrier for symboltable property storage
24700 https://bugs.webkit.org/show_bug.cgi?id=55698
24702 Replace the direct usage of Register in JSVariableObject (and descendents)
24703 with WriteBarrier. This requires updating the Arguments object to use
24704 WriteBarrier as well.
24706 * interpreter/Interpreter.cpp:
24707 (JSC::Interpreter::unwindCallFrame):
24708 (JSC::Interpreter::privateExecute):
24709 (JSC::Interpreter::retrieveArguments):
24710 * jit/JITStubs.cpp:
24711 (JSC::DEFINE_STUB_FUNCTION):
24712 * runtime/ArgList.h:
24713 (JSC::MarkedArgumentBuffer::initialize):
24714 * runtime/Arguments.cpp:
24715 (JSC::Arguments::markChildren):
24716 (JSC::Arguments::copyToRegisters):
24717 (JSC::Arguments::fillArgList):
24718 (JSC::Arguments::getOwnPropertySlot):
24719 (JSC::Arguments::getOwnPropertyDescriptor):
24720 (JSC::Arguments::put):
24721 * runtime/Arguments.h:
24722 (JSC::Arguments::setActivation):
24723 (JSC::Arguments::Arguments):
24724 (JSC::Arguments::copyRegisters):
24725 (JSC::JSActivation::copyRegisters):
24726 * runtime/JSActivation.cpp:
24727 (JSC::JSActivation::markChildren):
24728 (JSC::JSActivation::symbolTableGet):
24729 (JSC::JSActivation::symbolTablePut):
24730 (JSC::JSActivation::symbolTablePutWithAttributes):
24731 (JSC::JSActivation::put):
24732 (JSC::JSActivation::putWithAttributes):
24733 (JSC::JSActivation::argumentsGetter):
24734 * runtime/JSActivation.h:
24735 * runtime/JSGlobalObject.cpp:
24736 (JSC::JSGlobalObject::put):
24737 (JSC::JSGlobalObject::putWithAttributes):
24738 (JSC::JSGlobalObject::markChildren):
24739 (JSC::JSGlobalObject::copyGlobalsFrom):
24740 (JSC::JSGlobalObject::copyGlobalsTo):
24741 (JSC::JSGlobalObject::resizeRegisters):
24742 * runtime/JSGlobalObject.h:
24743 (JSC::JSGlobalObject::setRegisters):
24744 (JSC::JSGlobalObject::addStaticGlobals):
24745 * runtime/JSStaticScopeObject.cpp:
24746 (JSC::JSStaticScopeObject::put):
24747 (JSC::JSStaticScopeObject::putWithAttributes):
24748 * runtime/JSVariableObject.cpp:
24749 (JSC::JSVariableObject::symbolTableGet):
24750 * runtime/JSVariableObject.h:
24751 (JSC::JSVariableObject::registerAt):
24752 (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
24753 (JSC::JSVariableObject::symbolTableGet):
24754 (JSC::JSVariableObject::symbolTablePut):
24755 (JSC::JSVariableObject::symbolTablePutWithAttributes):
24756 (JSC::JSVariableObject::copyRegisterArray):
24757 (JSC::JSVariableObject::setRegisters):
24759 2011-03-03 Geoffrey Garen <ggaren@apple.com>
24761 Try to fix Windows build.
24763 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol.
24765 * runtime/JSStaticScopeObject.cpp:
24766 (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function
24767 inline -- it's virtual.
24769 2011-03-02 Geoffrey Garen <ggaren@apple.com>
24771 Reviewed by Darin Adler.
24773 Moved all variable object storage inline -- upping the object size limit to 1K
24774 https://bugs.webkit.org/show_bug.cgi?id=55653
24776 * JavaScriptCore.exp:
24777 * bytecompiler/BytecodeGenerator.cpp:
24778 * jit/JITOpcodes.cpp:
24779 * runtime/Arguments.h:
24780 * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
24782 * runtime/JSCell.h:
24783 (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
24784 to accomodate objects up to 1K.
24786 * runtime/JSGlobalObject.cpp:
24787 * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
24789 * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
24790 object size, since it doesn't anymore.
24792 * runtime/JSStaticScopeObject.cpp:
24793 * runtime/JSStaticScopeObject.h:
24794 * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
24796 * runtime/MarkedSpace.cpp:
24797 (JSC::MarkedSpace::MarkedSpace):
24798 (JSC::MarkedSpace::reset):
24799 * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
24801 2011-03-03 Timothy Hatcher <timothy@apple.com>
24803 Make APIShims usable from WebCore.
24805 Reviewed by Oliver Hunt.
24807 * ForwardingHeaders/JavaScriptCore/APIShims.h: Added.
24809 * JavaScriptCore.exp:
24810 * JavaScriptCore.gypi:
24811 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
24812 * JavaScriptCore.xcodeproj/project.pbxproj:
24814 2011-03-03 Peter Varga <pvarga@webkit.org>
24816 Reviewed by Oliver Hunt.
24818 Begin Characters Optimization Causes YARR Interpreter Errors
24819 https://bugs.webkit.org/show_bug.cgi?id=55479
24821 The addBeginTerm function is removed because it doesn't correctly handle those
24822 cases when an "invalid" term has been
24823 collected (e.g. CharacterClass). Move the removed function to the
24824 setupAlternativeBeginTerms method's switch-case
24825 where the non-allowed cases are correctly handled.
24827 Reenable the Beginning Character Optimization in the YARR Interpreter again.
24829 * yarr/YarrPattern.cpp:
24830 (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
24831 (JSC::Yarr::YarrPattern::compile):
24833 2011-03-02 Jessie Berlin <jberlin@apple.com>
24835 Reviewed by Adam Roben.
24837 WebKit2: Use CFNetwork Sessions API.
24838 https://bugs.webkit.org/show_bug.cgi?id=55435
24840 Add the ability to create a Private Browsing storage session.
24843 Add a new #define for using CF Storage Sessions.
24845 2011-03-02 Oliver Hunt <oliver@apple.com>
24847 Reviewed by Gavin Barraclough.
24849 Remove "register slot" concept from PropertySlot
24850 https://bugs.webkit.org/show_bug.cgi?id=55621
24852 PropertySlot had already stopped storing Register "slots"
24853 so this patch is simply removing that api entirely.
24854 This exposed a problem in the ProgramNode constructor for
24855 BytecodeGenerator where it reads from the registerfile
24856 before it has initialised it.
24858 This bug wasn't a problem before as we were merely testing
24859 for property existence rather than the actual value, and
24860 used to work because setRegisterSlot didn't check that the
24861 provided slot contained an initialised value.
24863 To get around this issue we now use symbolTableHasProperty
24864 to do the symbol table check without trying to read the
24867 * JavaScriptCore.xcodeproj/project.pbxproj:
24868 * bytecompiler/BytecodeGenerator.cpp:
24869 (JSC::BytecodeGenerator::BytecodeGenerator):
24870 * runtime/Arguments.cpp:
24871 (JSC::Arguments::getOwnPropertySlot):
24872 * runtime/JSActivation.cpp:
24873 (JSC::JSActivation::symbolTableGet):
24874 * runtime/JSGlobalObject.h:
24875 (JSC::JSGlobalObject::symbolTableHasProperty):
24876 * runtime/JSVariableObject.h:
24877 (JSC::JSVariableObject::symbolTableGet):
24878 * runtime/PropertySlot.h:
24880 2011-03-02 Daniel Cheng <dcheng@chromium.org>
24882 Reviewed by David Levin.
24884 Add feature define for data transfer items
24885 https://bugs.webkit.org/show_bug.cgi?id=55510
24887 * Configurations/FeatureDefines.xcconfig:
24890 2011-03-02 Adam Roben <aroben@apple.com>
24892 Delete old .res files whenever any .vsprops file changes
24894 Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
24897 Reviewed by Tony Chang.
24899 * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
24900 (main): Restructured code to loop over a set of file extensions, deleting any old files that
24901 have that extension. Now deletes .res files, too. (We previously deleted any file matching
24902 *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
24904 2011-03-02 Adam Barth <abarth@webkit.org>
24906 Reviewed by Dimitri Glazkov.
24908 Teach JavaScriptCore GYP build how to build minidom
24909 https://bugs.webkit.org/show_bug.cgi?id=55536
24911 * JavaScriptCore.gypi:
24912 * gyp/JavaScriptCore.gyp:
24914 2011-03-01 Adam Barth <abarth@webkit.org>
24916 Reviewed by Eric Seidel.
24918 JavaScriptCore GYP build should copy some headers into the target framework
24919 https://bugs.webkit.org/show_bug.cgi?id=55524
24921 After this patch, all the framework headers are exported as public
24922 headers. We need to teach GYP how to handle private headers.
24924 I struggled to determine how to store the information about whether a
24925 header was public, private, or project (i.e., not exported).
24926 Generally, the GYPI should just list the files, but it seemed siliy to
24927 have an almost duplicated list of files in the GYP file itself. If
24928 this design doesn't scale, we might have to revisit it in the future.
24930 * JavaScriptCore.gyp/JavaScriptCore.gyp:
24931 * JavaScriptCore.gypi:
24932 * gyp/JavaScriptCore.gyp:
24934 2011-03-01 Sheriff Bot <webkit.review.bot@gmail.com>
24936 Unreviewed, rolling out r80079.
24937 http://trac.webkit.org/changeset/80079
24938 https://bugs.webkit.org/show_bug.cgi?id=55547
24940 "Broke the Win debug build?" (Requested by dcheng on #webkit).
24944 2011-03-01 Daniel Cheng <dcheng@chromium.org>
24946 Reviewed by David Levin.
24948 Add feature define for data transfer items
24949 https://bugs.webkit.org/show_bug.cgi?id=55510
24953 2011-03-01 Oliver Hunt <oliver@apple.com>
24955 Reviewed by Joseph Pecoraro.
24957 Misaligned memory access in CloneDeserializer on all ARM arch.
24958 https://bugs.webkit.org/show_bug.cgi?id=48742
24960 Add a CPU class for architectures that need aligned addresses
24965 2011-03-01 Adam Barth <abarth@webkit.org>
24967 Reviewed by Dimitri Glazkov.
24969 Add pre- and post-build actions for JavaScriptCore GYP build
24970 https://bugs.webkit.org/show_bug.cgi?id=55507
24972 After this patch, we have all the steps for building the main
24973 JavaScriptCore framework except the "copy headers" step, which I'll do
24976 * gyp/JavaScriptCore.gyp:
24978 2011-03-01 Geoffrey Garen <ggaren@apple.com>
24980 Reviewed by Sam Weinig.
24982 Rolled back in r79627 now that the underlying cause for it crashing is fixed.
24983 https://bugs.webkit.org/show_bug.cgi?id=55159
24985 * JavaScriptCore.exp:
24986 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
24987 * JavaScriptCore.xcodeproj/project.pbxproj:
24988 * runtime/Heap.cpp:
24989 (JSC::Heap::allocateSlowCase):
24991 * runtime/JSCell.h:
24992 (JSC::JSCell::MarkedSpace::sizeClassFor):
24993 (JSC::JSCell::Heap::allocate):
24994 (JSC::JSCell::JSCell::operator new):
24995 * runtime/MarkedBlock.h:
24996 * runtime/MarkedSpace.cpp:
24997 (JSC::MarkedSpace::MarkedSpace):
24998 (JSC::MarkedSpace::allocateBlock):
24999 (JSC::MarkedSpace::reset):
25000 * runtime/MarkedSpace.h:
25001 (JSC::MarkedSpace::SizeClass::SizeClass):
25003 2011-03-01 Mark Rowe <mrowe@apple.com>
25005 Reviewed by Sam Weinig.
25007 Replace two script phases that do nothing but copy files with copy files build phases.
25009 This speeds up the build by a few seconds on high-end Mac Pros.
25011 * JavaScriptCore.xcodeproj/project.pbxproj:
25013 2011-03-01 David Kilzer <ddkilzer@apple.com>
25017 Rubber-stamped by Mark Rowe.
25019 * JavaScriptCore.xcodeproj/project.pbxproj:
25020 (Copy Into Framework): Remove "set -x" and its comment.
25022 2011-03-01 Michael Saboff <msaboff@apple.com>
25024 Reviewed by Darin Adler.
25026 TinyMCE not working in nightlies
25027 https://bugs.webkit.org/show_bug.cgi?id=54978
25029 Disabling setupBeginChars() to temporarily work arround the test
25030 failure. Filed https://bugs.webkit.org/show_bug.cgi?id=55479
25031 to track fixing the issue.
25033 * yarr/YarrPattern.cpp:
25034 (JSC::Yarr::YarrPattern::compile):
25036 2011-02-23 Joseph Pecoraro <joepeck@webkit.org>
25038 Reviewed by Kenneth Rohde Christiansen.
25040 Viewport parsing no longer accepts "1.0;" value as valid.
25041 https://bugs.webkit.org/show_bug.cgi?id=53705
25043 Include a didReadNumber parameter to String -> float / double
25044 conversion functions. This way, if the "ok" boolean out
25045 parameter is false, you can check to see if there in fact
25046 was a valid number parsed with garbage at the end. Examples
25047 of that would be parsing "123x456" would have ok = false,
25048 but didReadNumber = true.
25050 * JavaScriptCore.exp:
25051 * wtf/text/StringImpl.cpp:
25052 (WTF::StringImpl::toDouble):
25053 (WTF::StringImpl::toFloat):
25054 * wtf/text/StringImpl.h:
25055 * wtf/text/WTFString.cpp:
25056 (WTF::String::toDouble):
25057 (WTF::String::toFloat):
25058 (WTF::charactersToDouble):
25059 (WTF::charactersToFloat):
25060 * wtf/text/WTFString.h:
25062 2011-02-28 Geoffrey Garen <ggaren@apple.com>
25064 Reviewed by Gavin Barraclough.
25066 Past-the-end writes in VM exceptions (caused crashes in r79627)
25067 https://bugs.webkit.org/show_bug.cgi?id=55448
25069 Some exceptions had the wrong structures, so they misoverestimated their
25070 inline storage sizes.
25072 * runtime/JSGlobalData.cpp:
25073 (JSC::JSGlobalData::JSGlobalData): Use the right structure.
25075 * runtime/JSObject.h:
25076 (JSC::JSNonFinalObject::JSNonFinalObject):
25077 (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
25078 is correct to verify this doesn't happen again.
25080 2011-03-01 Andras Becsi <abecsi@webkit.org>
25082 Reviewed by Csaba Osztrogonác.
25084 [Qt] Clean up the project files and move common options to WebKit.pri.
25086 * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
25087 * JavaScriptCore.pro: Deduplicate options.
25090 2011-03-01 Adam Barth <abarth@webkit.org>
25092 Reviewed by Eric Seidel.
25094 Teach JavaScriptCore GYP build about DEPTH
25095 https://bugs.webkit.org/show_bug.cgi?id=55425
25097 In addition to teaching the JavaScriptCore GYP build about DEPTH, this
25098 change overrides the GCC warning configuration to disable a warning
25099 that's causing probems in Assertions.cpp. With that warning disabled,
25100 JavaScriptCore builds again.
25102 * gyp/JavaScriptCore.gyp:
25104 2011-02-28 Gavin Barraclough <barraclough@apple.com>
25108 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
25110 2011-02-28 Sheriff Bot <webkit.review.bot@gmail.com>
25112 Unreviewed, rolling out r79948.
25113 http://trac.webkit.org/changeset/79948
25114 https://bugs.webkit.org/show_bug.cgi?id=55439
25116 "caused crashes on the SL release bot" (Requested by ggaren on
25119 * runtime/JSGlobalData.h:
25120 * runtime/WriteBarrier.h:
25122 2011-02-28 Gavin Barraclough <barraclough@apple.com>
25126 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
25128 2011-02-28 Gavin Barraclough <barraclough@apple.com>
25130 Reviewed by Sam Weinig & Darin Adler.
25132 Bug 55423 - Clean up property tables in Structure
25134 Encapsulate, reduce duplication of table search code,
25135 and reduce the size of the tables (remove the index,
25136 just maintain the tables in the correct order).
25138 Shows a 0.5% - 1% progression on sunspider.
25140 * JavaScriptCore.exp:
25141 * runtime/PropertyMapHashTable.h:
25143 (JSC::nextPowerOf2):
25144 bit ops used to calculate table size.
25145 (JSC::PropertyMapEntry::PropertyMapEntry):
25146 (JSC::PropertyTable::ordered_iterator::operator++):
25147 (JSC::PropertyTable::ordered_iterator::operator==):
25148 (JSC::PropertyTable::ordered_iterator::operator!=):
25149 (JSC::PropertyTable::ordered_iterator::operator*):
25150 (JSC::PropertyTable::ordered_iterator::operator->):
25151 (JSC::PropertyTable::ordered_iterator::ordered_iterator):
25152 implementation of the iterator types
25153 (JSC::PropertyTable::PropertyTable):
25154 (JSC::PropertyTable::~PropertyTable):
25155 constructors take an initial capacity for the table,
25156 a table to copy, or both.
25157 (JSC::PropertyTable::begin):
25158 (JSC::PropertyTable::end):
25159 create in-order iterators.
25160 (JSC::PropertyTable::find):
25161 search the hash table
25162 (JSC::PropertyTable::add):
25163 add a value to the hash table
25164 (JSC::PropertyTable::remove):
25165 remove a value from the hash table
25166 (JSC::PropertyTable::size):
25167 (JSC::PropertyTable::isEmpty):
25169 (JSC::PropertyTable::propertyStorageSize):
25170 (JSC::PropertyTable::clearDeletedOffsets):
25171 (JSC::PropertyTable::hasDeletedOffset):
25172 (JSC::PropertyTable::getDeletedOffset):
25173 (JSC::PropertyTable::addDeletedOffset):
25174 cache deleted (available) offsets in the property storage array.
25175 (JSC::PropertyTable::copy):
25176 take a copy of the PropertyTable, potentially expanding the capacity.
25177 (JSC::PropertyTable::sizeInMemory):
25178 used for DEBUG build statistics
25179 (JSC::PropertyTable::reinsert):
25180 (JSC::PropertyTable::rehash):
25181 (JSC::PropertyTable::tableCapacity):
25182 (JSC::PropertyTable::deletedEntryIndex):
25183 (JSC::PropertyTable::skipDeletedEntries):
25184 (JSC::PropertyTable::table):
25185 (JSC::PropertyTable::usedCount):
25186 (JSC::PropertyTable::dataSize):
25187 (JSC::PropertyTable::sizeForCapacity):
25188 (JSC::PropertyTable::canInsert):
25189 these methods provide internal implementation.
25190 * runtime/Structure.cpp:
25191 (JSC::Structure::dumpStatistics):
25192 (JSC::Structure::~Structure):
25193 (JSC::Structure::materializePropertyMap):
25194 (JSC::Structure::despecifyDictionaryFunction):
25195 (JSC::Structure::addPropertyTransition):
25196 (JSC::Structure::flattenDictionaryStructure):
25197 (JSC::Structure::copyPropertyTable):
25198 (JSC::Structure::get):
25199 (JSC::Structure::despecifyFunction):
25200 (JSC::Structure::despecifyAllFunctions):
25201 (JSC::Structure::put):
25202 (JSC::Structure::remove):
25203 (JSC::Structure::createPropertyMap):
25204 (JSC::Structure::getPropertyNames):
25205 (JSC::PropertyTable::checkConsistency):
25206 (JSC::Structure::checkConsistency):
25207 factored out code to PropertyMapHashTable.h
25208 * runtime/Structure.h:
25209 (JSC::Structure::propertyStorageSize):
25210 (JSC::Structure::isEmpty):
25211 (JSC::Structure::get):
25212 factored out code to PropertyMapHashTable.h
25214 2011-02-28 Xan Lopez <xlopez@igalia.com>
25216 Another fix build :(
25220 * runtime/MachineStackMarker.cpp:
25221 (JSC::freePlatformThreadRegisters):
25223 2011-02-28 Xan Lopez <xlopez@igalia.com>
25225 Unreviewed build fix for Snow Leopard.
25227 * runtime/MachineStackMarker.cpp:
25228 (JSC::freePlatformThreadRegisters):
25230 2011-02-28 Alejandro G. Castro <alex@igalia.com>
25232 Unreviewed, fix SnowLeopard compilation after r79952.
25234 * runtime/MachineStackMarker.cpp:
25235 (JSC::freePlatformThreadRegisters):
25237 2011-02-28 Mark Rowe <mrowe@apple.com>
25239 Reviewed by Darin Adler.
25241 <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
25243 * wtf/OwnArrayPtr.h:
25244 (WTF::::set): Implement OwnArrayPtr::set.
25246 2011-02-28 Martin Zoubek <martin.zoubek@acision.com> and Alejandro G. Castro <alex@igalia.com>
25248 Reviewed by Martin Robinson.
25250 Multithread support for JSC on UNIX
25251 https://bugs.webkit.org/show_bug.cgi?id=26838
25253 Implement suspendThread() and resumeThread() for systems with
25254 pthread.h using thread signal handler.
25256 * runtime/MachineStackMarker.cpp:
25257 (JSC::pthreadSignalHandlerSuspendResume):
25258 (JSC::MachineStackMarker::Thread::Thread):
25259 (JSC::getCurrentPlatformThread):
25260 (JSC::suspendThread):
25261 (JSC::resumeThread):
25262 (JSC::getPlatformThreadRegisters):
25263 (JSC::otherThreadStackPointer):
25264 (JSC::freePlatformThreadRegisters):
25265 (JSC::MachineStackMarker::markOtherThreadConservatively):
25266 * wtf/Platform.h: Added Gtk port to use
25267 ENABLE_JSC_MULTIPLE_THREADS.
25269 2011-02-28 Oliver Hunt <oliver@apple.com>
25271 Reviewed by Darin Adler.
25273 Stop using DeprecatedPtr for the global exception slot
25274 https://bugs.webkit.org/show_bug.cgi?id=55424
25276 Create GCRootPtr to signify that the exception slot is
25277 a gcroot, and so is exempt from the usual writebarrier
25280 * runtime/JSGlobalData.h:
25281 * runtime/WriteBarrier.h:
25282 (JSC::GCRootPtr::GCRootPtr):
25283 (JSC::GCRootPtr::operator=):
25285 2011-02-28 Adam Barth <abarth@webkit.org>
25287 Reviewed by Dimitri Glazkov.
25289 Use more xcconfig files in JavaScriptCore gyp build
25290 https://bugs.webkit.org/show_bug.cgi?id=55391
25292 The GYP experts tell me that we have have a total of two xcconfig
25293 files: one for the xcodeproj as a whole and one for each target. This
25294 patch uses that technique to re-use the existing xcconfig files and
25295 eliminate the duplication.
25297 Technically, this patch introduces some build errors because the
25298 xcconfig files assume that the xcodeproj file is one level higher in
25299 the directory hierarchy. Specifically, the xcodeproj file can no
25300 longer find the Info.plist or the prefix header. I plan to fix that in
25301 a subsequent patch.
25303 Also, this patch introduces the Release and Production configurations,
25304 which should work correctly now.
25306 * gyp/JavaScriptCore.gyp:
25308 2011-02-28 Jon Honeycutt <jhoneycutt@apple.com>
25312 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
25313 Add symbol to export.
25315 2011-02-28 Oliver Hunt <oliver@apple.com>
25317 Reviewed by Gavin Barraclough.
25319 Make ScopeChainNode GC allocated
25320 https://bugs.webkit.org/show_bug.cgi?id=55283
25322 Simplify lifetime and other issues with the scopechain
25323 by making it gc allocated. This allows us to simplify
25324 function exit and unwinding, as well as making the
25325 current iterative refcounting go away.
25327 * JavaScriptCore.exp:
25328 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
25329 * bytecode/CodeBlock.cpp:
25330 (JSC::CodeBlock::createActivation):
25331 * bytecode/StructureStubInfo.cpp:
25332 * bytecompiler/BytecodeGenerator.cpp:
25333 (JSC::BytecodeGenerator::generate):
25334 (JSC::BytecodeGenerator::BytecodeGenerator):
25335 (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
25336 (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
25337 * bytecompiler/BytecodeGenerator.h:
25338 * debugger/Debugger.cpp:
25339 (JSC::Recompiler::operator()):
25340 * debugger/DebuggerCallFrame.h:
25341 (JSC::DebuggerCallFrame::scopeChain):
25342 * interpreter/CachedCall.h:
25343 (JSC::CachedCall::CachedCall):
25344 * interpreter/CallFrame.h:
25345 * interpreter/Interpreter.cpp:
25347 (JSC::Interpreter::unwindCallFrame):
25348 (JSC::Interpreter::throwException):
25349 (JSC::Interpreter::execute):
25350 (JSC::Interpreter::executeCall):
25351 (JSC::Interpreter::executeConstruct):
25352 (JSC::Interpreter::privateExecute):
25354 (JSC::JIT::compileOpCallInitializeCallFrame):
25355 (JSC::JIT::compileOpCall):
25356 * jit/JITCall32_64.cpp:
25357 (JSC::JIT::compileOpCallInitializeCallFrame):
25358 (JSC::JIT::emit_op_ret):
25359 (JSC::JIT::emit_op_ret_object_or_this):
25360 (JSC::JIT::compileOpCall):
25361 * jit/JITOpcodes.cpp:
25362 (JSC::JIT::emit_op_end):
25363 (JSC::JIT::emit_op_ret):
25364 (JSC::JIT::emit_op_ret_object_or_this):
25365 * jit/JITOpcodes32_64.cpp:
25366 (JSC::JIT::emit_op_end):
25367 * jit/JITStubs.cpp:
25368 (JSC::DEFINE_STUB_FUNCTION):
25370 * runtime/ArgList.cpp:
25371 * runtime/Completion.cpp:
25373 * runtime/Completion.h:
25374 * runtime/DateConversion.cpp:
25375 * runtime/Executable.cpp:
25376 (JSC::EvalExecutable::compileInternal):
25377 (JSC::ProgramExecutable::compileInternal):
25378 (JSC::FunctionExecutable::compileForCallInternal):
25379 (JSC::FunctionExecutable::compileForConstructInternal):
25380 * runtime/FunctionConstructor.cpp:
25381 (JSC::constructFunction):
25382 * runtime/GCActivityCallbackCF.cpp:
25383 * runtime/Identifier.cpp:
25384 * runtime/JSCell.h:
25385 * runtime/JSChunk.cpp: Added.
25386 * runtime/JSChunk.h: Added.
25387 * runtime/JSFunction.cpp:
25388 (JSC::JSFunction::JSFunction):
25389 (JSC::JSFunction::markChildren):
25390 (JSC::JSFunction::getCallData):
25391 (JSC::JSFunction::getOwnPropertySlot):
25392 (JSC::JSFunction::getConstructData):
25393 * runtime/JSFunction.h:
25394 (JSC::JSFunction::scope):
25395 (JSC::JSFunction::setScope):
25396 * runtime/JSGlobalData.cpp:
25397 (JSC::JSGlobalData::JSGlobalData):
25398 * runtime/JSGlobalData.h:
25399 * runtime/JSGlobalObject.cpp:
25400 (JSC::JSGlobalObject::init):
25401 (JSC::JSGlobalObject::markChildren):
25402 * runtime/JSGlobalObject.h:
25403 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
25404 (JSC::JSGlobalObject::globalScopeChain):
25405 * runtime/JSGlobalObjectFunctions.cpp:
25406 (JSC::globalFuncEval):
25407 * runtime/JSLock.cpp:
25408 * runtime/JSNumberCell.cpp:
25409 * runtime/JSZombie.cpp:
25410 * runtime/MarkedBlock.cpp:
25411 * runtime/MarkedSpace.cpp:
25412 * runtime/PropertyNameArray.cpp:
25413 * runtime/ScopeChain.cpp:
25414 (JSC::ScopeChainNode::print):
25415 (JSC::ScopeChainNode::localDepth):
25416 (JSC::ScopeChainNode::markChildren):
25417 * runtime/ScopeChain.h:
25418 (JSC::ScopeChainNode::ScopeChainNode):
25419 (JSC::ScopeChainNode::createStructure):
25420 (JSC::ScopeChainNode::push):
25421 (JSC::ScopeChainNode::pop):
25422 (JSC::ScopeChainIterator::ScopeChainIterator):
25423 (JSC::ScopeChainIterator::operator*):
25424 (JSC::ScopeChainIterator::operator->):
25425 (JSC::ScopeChainIterator::operator++):
25426 (JSC::ScopeChainNode::begin):
25427 (JSC::ScopeChainNode::end):
25428 (JSC::ExecState::globalData):
25429 (JSC::ExecState::lexicalGlobalObject):
25430 (JSC::ExecState::globalThisValue):
25431 * runtime/ScopeChainMark.h:
25432 * wtf/DateMath.cpp:
25434 2011-02-27 Adam Barth <abarth@webkit.org>
25436 Reviewed by Eric Seidel.
25438 Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
25439 https://bugs.webkit.org/show_bug.cgi?id=55326
25441 Currently, randomNumber does a bunch of platform-specific work that to
25442 get a cryptographic randomness when available. Instead, we should use
25443 cryptographicallyRandomNumber, which abstracts this work.
25444 Unfortunately, we can't remove all of the WTF::randomNumber
25445 implementation because not every port has access to cryptographically
25448 * wtf/RandomNumber.cpp:
25449 (WTF::randomNumber):
25451 2011-02-27 Benjamin Poulain <ikipou@gmail.com>
25453 Reviewed by Darin Adler.
25455 Eliminate DeprecatedPtrList from RenderBlock
25456 https://bugs.webkit.org/show_bug.cgi?id=54972
25458 Add methods find() and contains() using an adaptor to ListHashSet.
25459 Those method are like the one of HashSet, they allow to find objects
25460 based on a different key than the one used to define the set.
25462 Add convenience methods for direct access to the head and tail of the list.
25463 Those methods are providing similar API/behavior as Vector.
25465 * wtf/ListHashSet.h:
25468 (WTF::::removeLast):
25469 (WTF::ListHashSetTranslatorAdapter::hash):
25470 (WTF::ListHashSetTranslatorAdapter::equal):
25474 2011-02-26 Patrick Gansterer <paroga@webkit.org>
25476 Reviewed by Andreas Kling.
25478 Add support for DragonFly BSD
25479 https://bugs.webkit.org/show_bug.cgi?id=54407
25481 DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
25485 2011-02-26 Adam Barth <abarth@webkit.org>
25487 Reviewed by Dimitri Glazkov.
25489 JavaScriptCore should use the xcconfig file instead of importing that information into GYP
25490 https://bugs.webkit.org/show_bug.cgi?id=55282
25492 Technically, this breaks the build because I had removed one of the
25493 warnings in this config file, but this change seems like an
25496 * gyp/JavaScriptCore.gyp:
25498 2011-02-26 Thouraya ANDOLSI <thouraya.andolsi@st.com>
25500 Reviewed by Nikolas Zimmermann.
25503 https://bugs.webkit.org/show_bug.cgi?id=44329
25505 Provide an ExecutableAllocater::cacheFlush() implementation for
25508 * jit/ExecutableAllocator.h:
25509 (JSC::ExecutableAllocator::cacheFlush):
25511 2011-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
25513 Unreviewed, rolling out r79627.
25514 http://trac.webkit.org/changeset/79627
25515 https://bugs.webkit.org/show_bug.cgi?id=55274
25517 broke worker tests (Requested by olliej on #webkit).
25519 * JavaScriptCore.exp:
25520 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
25521 * runtime/Heap.cpp:
25522 (JSC::Heap::allocate):
25524 * runtime/JSCell.h:
25525 (JSC::JSCell::JSCell::operator new):
25526 (JSC::JSCell::MarkedSpace::sizeClassFor):
25527 (JSC::JSCell::MarkedSpace::allocate):
25528 * runtime/MarkedBlock.h:
25529 * runtime/MarkedSpace.cpp:
25530 (JSC::MarkedSpace::MarkedSpace):
25531 (JSC::MarkedSpace::allocateBlock):
25532 (JSC::MarkedSpace::reset):
25533 * runtime/MarkedSpace.h:
25534 (JSC::MarkedSpace::SizeClass::SizeClass):
25536 2011-02-25 Michael Saboff <msaboff@apple.com>
25538 Reviewed by Darin Adler.
25540 Leak in JSParser::Scope of ScopeLabelInfo Vector
25541 https://bugs.webkit.org/show_bug.cgi?id=55249
25543 Changed m_labels to be an OwnPtr<>. Added VectorTraits
25544 and Scope copy constructor to support this change.
25546 * parser/JSParser.cpp:
25547 (JSC::JSParser::Scope::~Scope):
25549 2011-02-25 Fumitoshi Ukai <ukai@chromium.org>
25551 Reviewed by Adam Barth.
25553 WebSocket uses insecure random numbers
25554 https://bugs.webkit.org/show_bug.cgi?id=54714
25556 * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
25558 2011-02-25 Patrick Gansterer <paroga@webkit.org>
25560 Reviewed by Adam Roben.
25562 Move timeBeginPeriod into OS(WINDOWS) section
25563 https://bugs.webkit.org/show_bug.cgi?id=55247
25566 (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
25568 2011-02-25 Patrick Gansterer <paroga@webkit.org>
25570 Unreviewed WinCE build fix for r79695.
25573 (main): SetErrorMode isn't available on WinCE.
25575 2011-02-25 Adam Roben <aroben@apple.com>
25577 Work around Cygwin's crash-suppression behavior
25579 Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
25580 inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
25581 invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
25582 when our test apps launch to work around Cygwin's behavior.
25584 Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
25585 debugger) when launched from Cygwin 1.7
25587 Reviewed by Darin Adler.
25589 * API/tests/testapi.c: Added a now-needed #include.
25593 Call ::SetErrorMode(0) to undo Cygwin's folly.
25595 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
25596 other projects do so that windows.h won't define min/max macros that interfere with
25597 std::numeric_limits<T>::min/max.
25599 2011-02-24 Adam Barth <abarth@webkit.org>
25601 Reviewed by Eric Seidel.
25603 Add GYP project for JavaScriptCore
25604 https://bugs.webkit.org/show_bug.cgi?id=55027
25606 Again, this GYP files is very rough, but it succeeds in building
25607 JavaScriptCore. There's a lot more work to do here, especially in the
25608 area of sharing with JavaScriptGlue.gyp. This patch is more of a
25609 checkpoint so that other folks can help out if they wish.
25612 * gyp/JavaScriptCore.gyp: Added.
25613 * gyp/generate-derived-sources.sh: Added.
25615 2011-02-24 Adam Barth <abarth@webkit.org>
25617 Reviewed by Eric Seidel.
25619 Add missing files to JavaScriptCore.gypi
25620 https://bugs.webkit.org/show_bug.cgi?id=55193
25622 I forgot to add mm files in my previous patch.
25624 * JavaScriptCore.gyp/JavaScriptCore.gyp:
25625 * JavaScriptCore.gypi:
25627 2011-02-24 Adam Barth <abarth@webkit.org>
25629 Reviewed by Eric Seidel.
25631 Remove unused parameter name in GCActivityCallback.cpp
25632 https://bugs.webkit.org/show_bug.cgi?id=55194
25634 This change is not strictly required for the GYP-based build system,
25635 but I noticed this error when working on the new build system.
25637 * runtime/GCActivityCallback.cpp:
25638 (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
25640 2011-02-24 James Robinson <jamesr@chromium.org>
25642 Reviewed by Darin Fisher.
25644 Add a USE() macro to control use of the built-in UTF8 codec
25645 https://bugs.webkit.org/show_bug.cgi?id=55189
25647 Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi.
25651 2011-02-24 Geoffrey Garen <ggaren@apple.com>
25653 Reviewed by Darin Adler.
25655 Variable-sized allocation (but still capped at 64 bytes)
25656 https://bugs.webkit.org/show_bug.cgi?id=55159
25658 SunSpider reports no change.
25660 * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
25662 * runtime/Heap.cpp:
25663 (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
25664 case, so the fast case can inline size class selection and turn it into
25665 a compile-time constant.
25667 Changed the collect-on-every allocation debugging switch to collect only
25668 on every slow allocation, so you can still flip the switch without
25669 recompiling the world. This may also be preferable for debugging purposes,
25670 since collecting after every single allocation can be unusably slow,
25671 and can mask problems by running destructors early.
25673 * runtime/Heap.h: Ditto.
25675 * runtime/JSCell.h:
25676 (JSC::JSCell::MarkedSpace::sizeClassFor):
25677 (JSC::JSCell::Heap::allocate):
25678 (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
25680 * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
25681 multiple size classes, allocating a full 256KB for the first allocation
25682 in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
25683 8KB Windows, would be even better, but that seems to be a peformance
25684 regression for now.)
25686 * runtime/MarkedSpace.cpp:
25687 (JSC::MarkedSpace::MarkedSpace):
25688 (JSC::MarkedSpace::allocateBlock):
25689 (JSC::MarkedSpace::reset): There's more than one size class now, and its
25690 cell size is not constant.
25692 * runtime/MarkedSpace.h:
25693 (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
25695 2011-02-23 Oliver Hunt <oliver@apple.com>
25697 Reviewed by Geoffrey Garen.
25699 Make WeakGCMap use new handle infrastructure
25700 https://bugs.webkit.org/show_bug.cgi?id=55100
25702 Remove old WeakGCMap implementation and move over to new handle
25705 This has a number of benefits, most notably it makes a WeakGCMap
25706 always reflect the true state of the world by as all entries are
25707 removed at the first gc cycle that makes them dead. This allows
25708 us to get rid of code in a wide variety of objects where the only
25709 purpose was to remove themselves from maps.
25711 It also means that we no longer need to have special "unchecked"
25712 versions of any functions on WeakGCMap. Alas in order to maintain
25713 compatibility with the JSWeakObjectMapClear API it is still
25714 necessary to have an api that resembles uncheckedRemove, this is
25715 now deprecatedRemove and will be dealt with in a later patch.
25717 In order to get correct semantics in WeakGCMap we need more
25718 contextual information in the finalizer, so we've added an
25719 abstract class based finaliser and a context parameter to the
25722 The new an improved WeakGCMap also results in sigificantly more
25723 churn in the weak handle lists so exposed some potential problems
25724 during the post mark phase which have been rectified as well.
25726 * API/JSWeakObjectMapRefPrivate.cpp:
25727 * API/JSWeakObjectMapRefPrivate.h:
25728 * runtime/Heap.cpp:
25729 (JSC::Heap::globalObjectCount):
25730 (JSC::Heap::protectedGlobalObjectCount):
25731 * runtime/JSGlobalData.cpp:
25732 (JSC::JSGlobalData::JSGlobalData):
25733 * runtime/JSGlobalData.h:
25734 * runtime/JSGlobalObject.cpp:
25735 (JSC::JSGlobalObject::~JSGlobalObject):
25736 (JSC::JSGlobalObject::init):
25737 * runtime/WeakGCMap.h:
25738 (JSC::WeakGCMap::iterator::iterator):
25739 (JSC::WeakGCMap::iterator::get):
25740 (JSC::WeakGCMap::iterator::getSlot):
25741 (JSC::WeakGCMap::iterator::operator++):
25742 (JSC::WeakGCMap::iterator::operator==):
25743 (JSC::WeakGCMap::iterator::operator!=):
25744 (JSC::WeakGCMap::WeakGCMap):
25745 (JSC::WeakGCMap::isEmpty):
25746 (JSC::WeakGCMap::clear):
25747 (JSC::WeakGCMap::get):
25748 (JSC::WeakGCMap::getSlot):
25749 (JSC::WeakGCMap::set):
25750 (JSC::WeakGCMap::take):
25751 (JSC::WeakGCMap::size):
25752 (JSC::WeakGCMap::deprecatedRemove):
25753 (JSC::WeakGCMap::begin):
25754 (JSC::WeakGCMap::end):
25755 (JSC::WeakGCMap::~WeakGCMap):
25756 (JSC::WeakGCMap::finalize):
25757 * runtime/WeakGCPtr.h:
25758 (JSC::WeakGCPtr::WeakGCPtr):
25759 (JSC::WeakGCPtr::set):
25761 2011-02-24 Oliver Hunt <oliver@apple.com>
25763 Reviewed by Gavin Barraclough.
25765 Make weaklist processing deal with weak handles being removed during the iteration
25766 https://bugs.webkit.org/show_bug.cgi?id=55105
25768 It is possible for the handle heap to end up in a broken state if
25769 a handle's finalizer removes either the current or next handle
25770 to be visited during the post-gc cleanup. This patch removes that
25771 problem by allowing the deallocate(Node*) routine to update the
25772 iterator if it is called during finalization.
25774 * collector/handles/HandleHeap.cpp:
25775 (JSC::HandleHeap::HandleHeap):
25776 (JSC::HandleHeap::updateAfterMark):
25777 (JSC::HandleHeap::clearWeakPointers):
25778 (JSC::HandleHeap::writeBarrier):
25779 (JSC::HandleHeap::protectedGlobalObjectCount):
25780 * collector/handles/HandleHeap.h:
25781 (JSC::Finalizer::~Finalizer):
25782 (JSC::HandleHeap::getFinalizer):
25783 (JSC::HandleHeap::deallocate):
25784 (JSC::HandleHeap::makeWeak):
25785 (JSC::HandleHeap::makeSelfDestroying):
25786 (JSC::HandleHeap::Node::Node):
25787 (JSC::HandleHeap::Node::setFinalizer):
25788 (JSC::HandleHeap::Node::finalizer):
25789 (JSC::HandleHeap::Node::finalizerContext):
25790 * interpreter/RegisterFile.cpp:
25791 (JSC::RegisterFile::setGlobalObject):
25792 (JSC::GlobalObjectNotifier::finalize):
25793 (JSC::RegisterFile::globalObjectCollectedNotifier):
25794 * interpreter/RegisterFile.h:
25795 (JSC::RegisterFile::RegisterFile):
25796 * runtime/Heap.cpp:
25797 (JSC::Heap::destroy):
25798 * runtime/WeakGCPtr.h:
25799 (JSC::WeakGCPtr::WeakGCPtr):
25800 (JSC::WeakGCPtr::set):
25802 2011-02-24 Michael Saboff <msaboff@apple.com>
25804 Reviewed by Oliver Hunt.
25806 PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
25807 https://bugs.webkit.org/show_bug.cgi?id=55156
25809 Added code to delete unneeded PatternAlternative after it is removed
25810 from m_alternatives Vector.
25812 * yarr/YarrPattern.cpp:
25813 (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
25815 2011-02-24 Eric Seidel <eric@webkit.org>
25817 Reviewed by Anders Carlsson.
25819 VectorBuffer should not call malloc(0)
25820 https://bugs.webkit.org/show_bug.cgi?id=55091
25822 Turns out the malloc() call which was so hot in:
25823 https://bugs.webkit.org/show_bug.cgi?id=55005
25824 was actually just malloc(0).
25826 We shouldn't be calling malloc(0) anyway, since there is no need to
25827 and it might actually do work on some systems.
25828 I believe on Mac it ends up taking the standard spinlocks (expensive)
25829 and the code on Brew actually does a malloc(1) instead. Neither is desirable.
25832 (WTF::VectorBufferBase::allocateBuffer):
25833 (WTF::VectorBufferBase::tryAllocateBuffer):
25835 2011-02-24 Patrick Gansterer <paroga@webkit.org>
25837 Reviewed by Darin Adler.
25839 Remove obsolete PLATFORM(CI)
25840 https://bugs.webkit.org/show_bug.cgi?id=55082
25844 2011-02-24 Martin Robinson <mrobinson@igalia.com>
25846 Reviewed by Xan Lopez.
25848 [GTK] Remove the GFile GOwnPtr specialization
25849 https://bugs.webkit.org/show_bug.cgi?id=55154
25851 Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr
25852 to track GFiles since they are just regular reference-counted GObjects.
25854 * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization.
25855 * wtf/gobject/GOwnPtr.h: Ditto.
25857 2011-02-24 Patrick Gansterer <paroga@webkit.org>
25859 Reviewed by Eric Seidel.
25861 Rename PLATFORM(SKIA) to USE(SKIA)
25862 https://bugs.webkit.org/show_bug.cgi?id=55090
25866 2011-02-24 Patrick Gansterer <paroga@webkit.org>
25868 Reviewed by Alexey Proskuryakov.
25870 Remove pthreads dependecy for JSLock
25871 https://bugs.webkit.org/show_bug.cgi?id=54832
25873 JSLock is only needed to support an obsolete execution model where JavaScriptCore
25874 automatically protected against concurrent access from multiple threads.
25875 So it's safe to disable it on non-mac platforms where we don't have native pthreads.
25877 * runtime/JSLock.cpp:
25879 2011-02-24 Chao-ying Fu <fu@mips.com>
25881 Reviewed by Eric Seidel.
25883 Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values
25884 https://bugs.webkit.org/show_bug.cgi?id=54997
25887 * jit/JITStubs.cpp:
25888 (JSC::JITThunks::JITThunks):
25890 2011-02-24 Andras Becsi <abecsi@webkit.org>
25892 Reviewed by Laszlo Gombos.
25894 [Qt] MinGW build fails to link
25895 https://bugs.webkit.org/show_bug.cgi?id=55050
25897 Prepend the libraries of subcomponents instead of appending them
25898 to fix the library order according to the dependency of the libraries
25900 * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore
25903 2011-02-24 Eric Seidel <eric@webkit.org>
25905 Reviewed by Adam Barth.
25907 Deque<T> should support inline capacity
25908 https://bugs.webkit.org/show_bug.cgi?id=55032
25910 The title says it all. There are currently no places
25911 which use this code yet, however it's been tested in conjunction
25912 with code for bug 55005.
25914 This also adds an ASSERT that capacity is never 1. If you were able
25915 to set the capacity equal to 1, the Deque would just get confused
25916 and happily append your item but still think it had size 0.
25919 (WTF::DequeIterator::DequeIterator):
25920 (WTF::DequeConstIterator::DequeConstIterator):
25921 (WTF::DequeReverseIterator::DequeReverseIterator):
25922 (WTF::DequeConstReverseIterator::DequeConstReverseIterator):
25923 (WTF::::checkValidity):
25924 (WTF::::checkIndexValidity):
25925 (WTF::::invalidateIterators):
25927 (WTF::deleteAllValues):
25929 (WTF::::destroyAll):
25934 (WTF::::expandCapacityIfNeeded):
25935 (WTF::::expandCapacity):
25936 (WTF::::takeFirst):
25939 (WTF::::removeFirst):
25941 (WTF::::addToIteratorsList):
25942 (WTF::::removeFromIteratorsList):
25943 (WTF::::DequeIteratorBase):
25944 (WTF::::~DequeIteratorBase):
25946 (WTF::::increment):
25947 (WTF::::decrement):
25952 2011-02-22 Adam Barth <abarth@webkit.org>
25954 Reviewed by Ojan Vafai.
25956 Add missing files to JavaScriptCore.gypi
25957 https://bugs.webkit.org/show_bug.cgi?id=55020
25959 gypi files are supposed to list every file under the sun. This patch
25960 adds some missing files and sorts the rest.
25962 * JavaScriptCore.gypi:
25964 2011-02-23 Geoffrey Garen <ggaren@apple.com>
25966 Reviewed by Darin Adler.
25968 Refactored MarkedSpace to operate in terms of size classes
25969 https://bugs.webkit.org/show_bug.cgi?id=55106
25971 SunSpider reports no change.
25973 * runtime/JSCell.h:
25974 (JSC::JSCell::MarkedSpace::sizeClassFor):
25975 (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
25976 class. Since these functions are inline, the compiler can constant fold
25979 * runtime/MarkedBlock.h:
25980 (JSC::MarkedBlock::cellSize):
25981 (JSC::MarkedBlock::size): Factored out a cellSize() helper.
25983 * runtime/MarkedSpace.cpp:
25984 (JSC::MarkedSpace::allocateBlock):
25985 (JSC::MarkedSpace::allocateFromSizeClass):
25986 (JSC::MarkedSpace::shrink):
25987 (JSC::MarkedSpace::reset):
25988 * runtime/MarkedSpace.h:
25989 (JSC::MarkedSpace::SizeClass::SizeClass):
25990 (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
25991 abstract SizeClass objects, which are independent linked lists of blocks
25992 of a certain size class, instead of a single m_heap object.
25994 2011-02-23 Adam Barth <abarth@webkit.org>
25996 Reviewed by James Robinson.
25998 [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox
25999 https://bugs.webkit.org/show_bug.cgi?id=55093
26001 Exclude OSRandomSource.cpp from the Chromium build. This function is
26002 implemented in WebKit/chromium/src instead.
26004 * JavaScriptCore.gyp/JavaScriptCore.gyp:
26006 2011-02-23 Oliver Hunt <oliver@apple.com>
26008 Roll out r64156 as it introduces incorrect behaviour.
26010 * runtime/JSByteArray.h:
26011 (JSC::JSByteArray::setIndex):
26013 2011-02-23 Geoffrey Garen <ggaren@apple.com>
26015 Reviewed by Oliver Hunt.
26017 Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
26018 https://bugs.webkit.org/show_bug.cgi?id=55079
26020 SunSpider reports no change.
26022 * runtime/Heap.cpp:
26023 (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
26024 since we want Heap to logically control MarkedSpace. MarkedSpace should
26025 never choose to sweep itself.
26027 * runtime/JSCell.h:
26028 (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
26029 member of MarkedBlock. No need to reset nextAtom to firstAtom() when
26030 we reach the end of a block, since there's now an explicit reset pass
26033 * runtime/MarkedBlock.cpp:
26034 (JSC::MarkedBlock::MarkedBlock):
26035 * runtime/MarkedBlock.h:
26036 (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
26037 some data members to improve cache locality.
26039 * runtime/MarkedSpace.cpp:
26040 (JSC::MarkedSpace::MarkedSpace):
26041 (JSC::MarkedSpace::allocate):
26042 (JSC::MarkedSpace::reset):
26043 * runtime/MarkedSpace.h:
26044 (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
26045 explicit reset pass.
26047 2011-02-23 James Robinson <jamesr@chromium.org>
26049 Unreviewed, rolling out r79428.
26050 http://trac.webkit.org/changeset/79428
26051 https://bugs.webkit.org/show_bug.cgi?id=54714
26053 Does not work in the Chromium sandbox
26055 * JavaScriptCore.exp:
26057 2011-02-23 Adam Roben <aroben@apple.com>
26059 Fix an off-by-one error in JSC::appendSourceToError
26061 Looks like this bug has been around since the code was first added in r35245.
26063 Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError
26064 when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled
26066 Reviewed by Darin Adler.
26068 * interpreter/Interpreter.cpp:
26069 (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the
26070 character at stop-1 rather than at stop. At this point in the code, stop represents the
26071 index just past the end of the characters we care about, and can even be just past the end
26072 of the entire data buffer.
26074 2011-02-23 Geoffrey Garen <ggaren@apple.com>
26076 Reviewed by Darin Adler.
26078 Rolled back in r79367 with SnowLeopard Release bot crash fixed.
26079 https://bugs.webkit.org/show_bug.cgi?id=54999
26081 The crash was caused by failure to update the "nextBlock" pointer when
26082 removing a block from the list while shrinking. The fix is to update the
26083 "nextBlock" pointer.
26085 This crash was very rare because it only happened in cases where the very
26086 first block in the heap contained no marked cells.
26088 2011-02-23 Dan Bernstein <mitz@apple.com>
26090 Reviewed by Gavin Barraclough.
26092 Include frame numbers in backtraces.
26093 https://bugs.webkit.org/show_bug.cgi?id=55060
26095 * wtf/Assertions.cpp:
26097 2011-02-23 Xan Lopez <xlopez@igalia.com>
26099 Reviewed by Gavin Barraclough.
26101 latest jsc for armv7 crashes in sunspider tests
26102 https://bugs.webkit.org/show_bug.cgi?id=54667
26104 Update JIT offset values in ARMv7 after r78732. Fixes crashes in
26105 SunSpider and JavaScript tests.
26107 * jit/JIT.h: update values.
26109 2011-02-23 Sheriff Bot <webkit.review.bot@gmail.com>
26111 Unreviewed, rolling out r79418.
26112 http://trac.webkit.org/changeset/79418
26113 https://bugs.webkit.org/show_bug.cgi?id=55043
26115 "breaks shlib linux build" (Requested by morrita on #webkit).
26117 * JavaScriptCore.gyp/JavaScriptCore.gyp:
26118 * JavaScriptCore.gypi:
26120 2011-02-23 Patrick Gansterer <paroga@webkit.org>
26122 Reviewed by Alexey Proskuryakov.
26124 Use DEFINE_STATIC_LOCAL for ignoreSetMutex in Structure.cpp
26125 https://bugs.webkit.org/show_bug.cgi?id=54831
26127 * runtime/InitializeThreading.cpp:
26128 (JSC::initializeThreadingOnce):
26129 * runtime/Structure.cpp:
26130 (JSC::ignoreSetMutex):
26131 (JSC::Structure::Structure):
26132 (JSC::Structure::~Structure):
26133 (JSC::Structure::initializeThreading):
26134 * runtime/Structure.h:
26136 2011-02-23 Patrick Gansterer <paroga@webkit.org>
26138 Reviewed by Darin Adler.
26140 Rename PLATFORM(CF) to USE(CF)
26141 https://bugs.webkit.org/show_bug.cgi?id=53540
26143 * runtime/DatePrototype.cpp:
26144 * runtime/GCActivityCallbackCF.cpp:
26145 * runtime/JSGlobalData.cpp:
26146 (JSC::JSGlobalData::JSGlobalData):
26147 * wtf/CurrentTime.cpp:
26149 * wtf/text/AtomicString.h:
26150 * wtf/text/StringImpl.h:
26151 (WTF::StringImpl::computeHash):
26152 * wtf/text/WTFString.h:
26153 * wtf/unicode/icu/CollatorICU.cpp:
26154 (WTF::Collator::userDefault):
26156 2011-02-23 Fumitoshi Ukai <ukai@chromium.org>
26158 Unreviewed build fix for Windows.
26160 WebSocket uses insecure random numbers
26161 https://bugs.webkit.org/show_bug.cgi?id=54714
26163 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export WTF::cryptographicallyRandomNumber()
26165 2011-02-23 Fumitoshi Ukai <ukai@chromium.org>
26167 Reviewed by Adam Barth.
26169 WebSocket uses insecure random numbers
26170 https://bugs.webkit.org/show_bug.cgi?id=54714
26172 * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
26174 2011-02-22 Adam Barth <abarth@webkit.org>
26176 Reviewed by Ojan Vafai.
26178 Add missing files to JavaScriptCore.gypi
26179 https://bugs.webkit.org/show_bug.cgi?id=55020
26181 gypi files are supposed to list every file under the sun. This patch
26182 adds some missing files and sorts the rest.
26184 * JavaScriptCore.gypi:
26186 2011-02-22 Sheriff Bot <webkit.review.bot@gmail.com>
26188 Unreviewed, rolling out r79367.
26189 http://trac.webkit.org/changeset/79367
26190 https://bugs.webkit.org/show_bug.cgi?id=55012
26192 all layout tests are crashing on Snow Leopard (Requested by
26196 * JavaScriptCore.gypi:
26197 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
26198 * JavaScriptCore.xcodeproj/project.pbxproj:
26199 * runtime/MarkedBlock.cpp:
26200 (JSC::MarkedBlock::MarkedBlock):
26201 * runtime/MarkedBlock.h:
26202 * runtime/MarkedSpace.cpp:
26203 (JSC::MarkedSpace::destroy):
26204 (JSC::MarkedSpace::allocateBlock):
26205 (JSC::MarkedSpace::freeBlock):
26206 (JSC::MarkedSpace::allocate):
26207 (JSC::MarkedSpace::shrink):
26208 (JSC::MarkedSpace::reset):
26209 * runtime/MarkedSpace.h:
26210 (JSC::CollectorHeap::collectorBlock):
26211 * wtf/CMakeLists.txt:
26212 * wtf/DoublyLinkedList.h: Removed.
26214 2011-02-22 Geoffrey Garen <ggaren@apple.com>
26216 Reviewed by Oliver Hunt.
26218 Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1)
26219 https://bugs.webkit.org/show_bug.cgi?id=54999
26221 SunSpider reports no change.
26224 * JavaScriptCore.gypi:
26225 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
26226 * JavaScriptCore.xcodeproj/project.pbxproj: So many build systems, so little time.
26227 * wtf/CMakeLists.txt:
26229 * runtime/MarkedBlock.cpp:
26230 (JSC::MarkedBlock::MarkedBlock):
26231 * runtime/MarkedBlock.h:
26232 (JSC::MarkedBlock::setPrev):
26233 (JSC::MarkedBlock::setNext):
26234 (JSC::MarkedBlock::prev):
26235 (JSC::MarkedBlock::next): Added linked list data members and accessors.
26237 * runtime/MarkedSpace.cpp:
26238 (JSC::MarkedSpace::destroy):
26239 (JSC::MarkedSpace::allocateBlock): Stop using vector, since it doesn't exist anymore.
26241 (JSC::MarkedSpace::freeBlocks): New helper function for updating relevant
26242 data structures when freeing blocks.
26244 (JSC::MarkedSpace::allocate): Updated for nextBlock being a pointer and
26245 not a vector index.
26247 (JSC::MarkedSpace::shrink): Construct a temporary list of empties and
26248 then free them, to avoid modifying our hash table while iterating it.
26249 This wasn't a concern before because we were using indirect array
26250 indexing, not direct pointer indexing.
26252 (JSC::MarkedSpace::reset): Updated for nextBlock being a pointer and
26253 not a vector index.
26255 * runtime/MarkedSpace.h:
26256 (JSC::CollectorHeap::CollectorHeap): Changed data type from vector to linked list.
26258 * wtf/DoublyLinkedList.h: Added. New linked list class.
26259 (WTF::::DoublyLinkedList):
26265 2011-02-22 Gavin Barraclough <barraclough@apple.com>
26269 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
26271 2011-02-22 Gavin Barraclough <barraclough@apple.com>
26273 Reviewed by Sam Weinig.
26275 Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table
26277 The Structure class keeps a table of transitions to derived Structure types. Since
26278 this table commonly contains a single entry we employ an optimization where instead
26279 of holding a map, we may hold a pointer directly to a single instance of the mapped
26280 type. We use an additional bit of data to flag whether the pointer is currently
26281 pointing to a table of transitions, or a singleton transition. Previously we had
26282 commonly used a pattern of storing data in the low bits of pointers, but had moved
26283 away from this since it causes false leaks to be reported by the leaks tool. However
26284 in this case, the entries in the map are weak links - this pointer will never be
26285 responsible for keeping an object alive. As such we can use this approach provided
26286 that the bit is set when a table is not in use (otherwise the table would appear to
26289 Additionally, the transition table currently allows two entries to exist for a given
26290 key - one specialized to a particular value, and one not specialized. This is
26291 unnecessary, wasteful, and a little inconsistent. (If you create an entry for a
26292 specialized value, then a non-specialized entry, both will exist. If you create an
26293 entry for a non-specialized value, then try to create a specialized entry, only a
26294 non-specialized form will be allowed.)
26296 This shows a small progression on v8.
26298 * JavaScriptCore.exp:
26299 * runtime/JSObject.h:
26300 (JSC::JSObject::putDirectInternal):
26301 * runtime/Structure.cpp:
26302 (JSC::StructureTransitionTable::contains):
26303 (JSC::StructureTransitionTable::get):
26304 (JSC::StructureTransitionTable::remove):
26305 (JSC::StructureTransitionTable::add):
26306 (JSC::Structure::dumpStatistics):
26307 (JSC::Structure::Structure):
26308 (JSC::Structure::~Structure):
26309 (JSC::Structure::addPropertyTransitionToExistingStructure):
26310 (JSC::Structure::addPropertyTransition):
26311 * runtime/Structure.h:
26312 (JSC::Structure::get):
26313 * runtime/StructureTransitionTable.h:
26314 (JSC::StructureTransitionTable::Hash::hash):
26315 (JSC::StructureTransitionTable::Hash::equal):
26316 (JSC::StructureTransitionTable::HashTraits::emptyValue):
26317 (JSC::StructureTransitionTable::HashTraits::constructDeletedValue):
26318 (JSC::StructureTransitionTable::HashTraits::isDeletedValue):
26319 (JSC::StructureTransitionTable::StructureTransitionTable):
26320 (JSC::StructureTransitionTable::~StructureTransitionTable):
26321 (JSC::StructureTransitionTable::isUsingSingleSlot):
26322 (JSC::StructureTransitionTable::map):
26323 (JSC::StructureTransitionTable::setMap):
26324 (JSC::StructureTransitionTable::singleTransition):
26325 (JSC::StructureTransitionTable::setSingleTransition):
26327 2011-02-22 Andras Becsi <abecsi@webkit.org>
26329 Reviewed by Laszlo Gombos.
26331 [Qt] Redesign the build system
26332 https://bugs.webkit.org/show_bug.cgi?id=51339
26336 Build WebCore as a static library, compile the WebKit API and WebKit2 API
26337 in a final step and link to WebKit2, WebCore and JSC libraries to fix
26338 linking issues resulting from stripped away symbols.
26340 * JavaScriptCore.pri: Remove the workaround.
26342 2011-02-21 Adam Roben <aroben@apple.com>
26344 Fix linker warning on Windows
26346 r79135 tried to export JSObject::s_info by adding it to JavaScriptCore.def. This is the
26347 obvious way (since it's how we export functions), but unfortunately it doesn't work correct.
26348 r79222 made us export it the right way (using the JS_EXPORTDATA macro), but forgot to remove
26349 it from JavaScriptCore.def. This caused us to get linker warnings about exporting the symbol
26352 Rubber-stamped by Anders Carlsson.
26354 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSObject::s_info.
26356 2011-02-21 Brian Weinstein <bweinstein@apple.com>
26358 Reviewed by Adam Roben.
26360 WebResourceCacheManager should be responsible for managing the CFURLCache as well
26361 as the WebCore memory cache.
26362 https://bugs.webkit.org/show_bug.cgi?id=54886
26363 Part of <rdar://problem/8971738>
26365 Add a new use flag for using the CFURLCache.
26369 2011-02-21 Xan Lopez <xlopez@igalia.com>
26371 Reviewed by Gavin Barraclough.
26373 Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp
26374 https://bugs.webkit.org/show_bug.cgi?id=54901
26376 * jit/JIT.h: swap actual and expected values in message, they were
26378 * jit/JITCall32_64.cpp:
26379 (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of
26381 * jit/JITPropertyAccess32_64.cpp:
26382 (JSC::JIT::emit_op_method_check): ditto.
26383 (JSC::JIT::compileGetByIdHotPath): ditto.
26384 (JSC::JIT::compileGetByIdSlowCase): ditto.
26385 (JSC::JIT::emit_op_put_by_id): ditto.
26387 2011-02-21 Gavin Barraclough <barraclough@apple.com>
26389 Ruber stamped by Sam Weinig
26391 Bug 54899 - Math.LOG10E should be 0.4342944819032518
26392 This value is quoted in section 15.8.1.5 of the spec.
26394 * runtime/MathObject.cpp:
26395 (JSC::MathObject::MathObject):
26397 2011-02-21 Gavin Barraclough <barraclough@apple.com>
26399 Reviewed by Sam Weinig.
26401 Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
26403 The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
26404 containing a pointer to its parent class. These links should reflect the inheritance
26405 hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
26406 entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
26407 since intervening C++ classes may not have ClassInfo - but would be a potential bug
26408 were ClassInfo were to be added.
26410 * API/JSCallbackConstructor.cpp:
26411 * API/JSCallbackFunction.cpp:
26412 * API/JSCallbackObjectFunctions.h:
26413 * runtime/Arguments.h:
26414 * runtime/ArrayPrototype.cpp:
26415 * runtime/BooleanObject.cpp:
26416 * runtime/DateInstance.cpp:
26417 * runtime/DatePrototype.cpp:
26418 * runtime/ErrorInstance.cpp:
26419 * runtime/InternalFunction.cpp:
26420 * runtime/JSActivation.cpp:
26421 * runtime/JSArray.cpp:
26422 * runtime/JSFunction.cpp:
26423 * runtime/JSONObject.cpp:
26424 * runtime/JSObject.h:
26425 * runtime/JSZombie.h:
26426 * runtime/MathObject.cpp:
26427 * runtime/NativeErrorConstructor.cpp:
26428 * runtime/NumberConstructor.cpp:
26429 * runtime/NumberObject.cpp:
26430 * runtime/RegExpConstructor.cpp:
26431 * runtime/RegExpObject.cpp:
26432 * runtime/StringObject.cpp:
26433 * runtime/StringPrototype.cpp:
26435 2011-02-21 Adam Roben <aroben@apple.com>
26437 Export JSObject::s_info from JavaScriptCore.dll
26439 This matches what we do for all other ClassInfo objects that WebCore needs access to.
26441 Fixes <http://webkit.org/b/54881> REGRESSION (r79132): Lots of tests crashing in
26442 JSCell::inherits on Windows
26444 Reviewed by Sam Weinig.
26446 * runtime/JSObject.h: Added JS_EXPORTDATA to s_info.
26448 2011-02-21 Kristian Amlie <kristian.amlie@nokia.com>
26450 Reviewed by Andreas Kling.
26452 Switched to compiler based detection, where the error actually is.
26454 It is not the platform that needs the workaround, it is the compiler.
26456 QtWebKit fails to compile on Windows XP with msvc-2008
26457 https://bugs.webkit.org/show_bug.cgi?id=54746
26459 * bytecode/CodeBlock.h:
26460 * runtime/RegExpObject.h:
26462 2011-02-20 Gavin Barraclough <barraclough@apple.com>
26464 Reviewed by Oliver Hunt.
26466 https://bugs.webkit.org/show_bug.cgi?id=54839
26467 Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
26469 Historically, Native functions used to be represented by PrototypeFunctions, however
26470 since introducing call optimizations to the JIT this has used JSFunctions for host
26471 calls too. At the point this change was made, the interpreter continued to use
26472 PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
26473 the interpreter has had to be able to run using host functions represented using
26474 JSFunctions - leading to an unnecessary and redundant divergence in behaviour between
26475 interpreter only builds, and situations where the JIT has fallen back to interpreting.
26477 NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
26478 for wrappers for host functions, and as such can also be removed.
26480 GlobalEvalFunction is a redundant wrapper that happens to be derived from
26481 PrototypeFunction. It existed to hold a reference to the global object - but since all
26482 functions how derive from JSObjectWithGlobalObject, this no longer requires an
26483 additional class to provide this functionality.
26485 * JavaScriptCore.JSVALUE32_64only.exp:
26486 * JavaScriptCore.JSVALUE64only.exp:
26487 * JavaScriptCore.xcodeproj/project.pbxproj:
26488 Removed symbols / references to files.
26490 * runtime/GlobalEvalFunction.cpp: Removed.
26491 * runtime/GlobalEvalFunction.h: Removed.
26492 * runtime/NativeFunctionWrapper.h: Removed.
26493 * runtime/PrototypeFunction.cpp: Removed.
26494 * runtime/PrototypeFunction.h: Removed.
26497 * runtime/Executable.cpp:
26498 (JSC::NativeExecutable::~NativeExecutable):
26499 * runtime/Executable.h:
26500 (JSC::NativeExecutable::create):
26501 (JSC::NativeExecutable::NativeExecutable):
26502 (JSC::JSFunction::nativeFunction):
26503 * runtime/JSFunction.cpp:
26504 (JSC::callHostFunctionAsConstructor):
26505 (JSC::JSFunction::JSFunction):
26506 (JSC::JSFunction::getCallData):
26507 * runtime/JSFunction.h:
26508 * runtime/JSGlobalData.cpp:
26509 (JSC::JSGlobalData::getHostFunction):
26510 * runtime/JSGlobalData.h:
26511 (JSC::JSGlobalData::getCTIStub):
26512 Added interpreter-friendly constructors for NativeExecutables.
26514 * bytecompiler/BytecodeGenerator.cpp:
26515 * interpreter/Interpreter.cpp:
26516 * jit/JITStubs.cpp:
26518 * runtime/ArrayConstructor.cpp:
26519 * runtime/BooleanPrototype.cpp:
26520 * runtime/BooleanPrototype.h:
26521 * runtime/CallData.h:
26522 * runtime/DateConstructor.cpp:
26523 * runtime/DateConstructor.h:
26524 * runtime/ErrorPrototype.cpp:
26525 * runtime/ErrorPrototype.h:
26526 * runtime/FunctionPrototype.cpp:
26527 * runtime/FunctionPrototype.h:
26528 * runtime/JSGlobalObject.cpp:
26529 * runtime/JSGlobalObject.h:
26530 * runtime/JSGlobalObjectFunctions.cpp:
26531 * runtime/Lookup.cpp:
26532 * runtime/NumberPrototype.cpp:
26533 * runtime/NumberPrototype.h:
26534 * runtime/ObjectConstructor.cpp:
26535 * runtime/ObjectConstructor.h:
26536 * runtime/ObjectPrototype.cpp:
26537 * runtime/ObjectPrototype.h:
26538 * runtime/RegExpPrototype.cpp:
26539 * runtime/RegExpPrototype.h:
26540 * runtime/SmallStrings.h:
26541 * runtime/StringConstructor.cpp:
26542 * runtime/StringConstructor.h:
26543 Removed use of redundant classes.
26545 2011-02-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
26547 Unreviewed build fix for Symbian.
26549 [Symbian] Revert the removal of linking
26550 against hal after r79126.
26552 Dependency on the hal library can not be removed
26553 as it is still used (e.g. in MarkStackSymbian.cpp).
26555 * JavaScriptCore.pri:
26557 2011-02-19 Gavin Barraclough <barraclough@apple.com>
26559 Interpreter build fix.
26561 * runtime/ArrayConstructor.cpp:
26562 * runtime/BooleanPrototype.cpp:
26563 * runtime/DateConstructor.cpp:
26564 * runtime/ErrorPrototype.cpp:
26565 * runtime/FunctionPrototype.cpp:
26566 * runtime/Lookup.cpp:
26567 * runtime/NumberPrototype.cpp:
26568 * runtime/ObjectConstructor.cpp:
26569 * runtime/ObjectPrototype.cpp:
26570 * runtime/RegExpPrototype.cpp:
26571 * runtime/StringConstructor.cpp:
26573 2011-02-19 Gavin Barraclough <barraclough@apple.com>
26577 * JavaScriptCore.exp:
26579 2011-02-19 Gavin Barraclough <barraclough@apple.com>
26581 Windows build fix!!
26583 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
26585 2011-02-19 Gavin Barraclough <barraclough@apple.com>
26589 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
26591 2011-02-19 Gavin Barraclough <barraclough@apple.com>
26595 * JavaScriptCore.exp:
26597 2011-02-18 Gavin Barraclough <barraclough@apple.com>
26599 Reviewed by Sam Weinig.
26601 Bug 54786 - Devirtualize JSCell::classInfo()
26603 Instead of making a virtual function call, add a pointer to the ClassInfo
26606 This removes a virtual function call, and paves the way towards removing all
26607 the createStructure methods, and StructureFlags/AnonymousSlotCount properties
26608 (these should be able to move onto ClassInfo).
26610 Calls to Structure::create must now pass a pointer to the ClassInfo for the
26611 structure. All objects now have a ClassInfo pointer, non-object cell types
26614 Changes are most mechanical, involving three steps:
26615 * Remove virtual classInfo() methods.
26616 * Add &s_info parameter to calls to Structure::create.
26617 * Rename ClassInfo static members on classes from 'info' to 's_info',
26620 * API/JSCallbackConstructor.cpp:
26621 * API/JSCallbackConstructor.h:
26622 * API/JSCallbackFunction.cpp:
26623 * API/JSCallbackFunction.h:
26624 * API/JSCallbackObject.cpp:
26625 * API/JSCallbackObject.h:
26626 * API/JSCallbackObjectFunctions.h:
26627 * API/JSObjectRef.cpp:
26628 * API/JSValueRef.cpp:
26629 * API/JSWeakObjectMapRefPrivate.cpp:
26630 * JavaScriptCore.exp:
26631 * debugger/Debugger.cpp:
26632 * debugger/DebuggerActivation.h:
26633 * debugger/DebuggerCallFrame.cpp:
26634 * interpreter/Interpreter.cpp:
26635 * jit/JITCall32_64.cpp:
26636 * jit/JITOpcodes.cpp:
26637 * jit/JITStubs.cpp:
26638 * profiler/Profiler.cpp:
26639 * runtime/Arguments.cpp:
26640 * runtime/Arguments.h:
26641 * runtime/ArrayConstructor.cpp:
26642 * runtime/ArrayPrototype.cpp:
26643 * runtime/ArrayPrototype.h:
26644 * runtime/BooleanObject.cpp:
26645 * runtime/BooleanObject.h:
26646 * runtime/BooleanPrototype.cpp:
26647 * runtime/DateConstructor.cpp:
26648 * runtime/DateInstance.cpp:
26649 * runtime/DateInstance.h:
26650 * runtime/DatePrototype.cpp:
26651 * runtime/DatePrototype.h:
26652 * runtime/ErrorInstance.cpp:
26653 * runtime/ErrorInstance.h:
26654 * runtime/ErrorPrototype.cpp:
26655 * runtime/FunctionPrototype.cpp:
26656 * runtime/FunctionPrototype.h:
26657 * runtime/GetterSetter.h:
26658 * runtime/GlobalEvalFunction.h:
26659 * runtime/InternalFunction.cpp:
26660 * runtime/InternalFunction.h:
26661 * runtime/JSAPIValueWrapper.h:
26662 * runtime/JSActivation.cpp:
26663 * runtime/JSActivation.h:
26664 * runtime/JSArray.cpp:
26665 * runtime/JSArray.h:
26666 * runtime/JSByteArray.cpp:
26667 * runtime/JSByteArray.h:
26668 * runtime/JSCell.cpp:
26669 * runtime/JSCell.h:
26670 * runtime/JSFunction.cpp:
26671 * runtime/JSFunction.h:
26672 * runtime/JSGlobalData.cpp:
26673 * runtime/JSGlobalObject.cpp:
26674 * runtime/JSGlobalObject.h:
26675 * runtime/JSNotAnObject.h:
26676 * runtime/JSONObject.cpp:
26677 * runtime/JSONObject.h:
26678 * runtime/JSObject.cpp:
26679 * runtime/JSObject.h:
26680 * runtime/JSObjectWithGlobalObject.h:
26681 * runtime/JSPropertyNameIterator.h:
26682 * runtime/JSStaticScopeObject.h:
26683 * runtime/JSString.h:
26684 * runtime/JSVariableObject.h:
26685 * runtime/JSWrapperObject.h:
26686 * runtime/JSZombie.cpp:
26687 * runtime/JSZombie.h:
26688 * runtime/Lookup.cpp:
26689 * runtime/MathObject.cpp:
26690 * runtime/MathObject.h:
26691 * runtime/NativeErrorConstructor.cpp:
26692 * runtime/NativeErrorConstructor.h:
26693 * runtime/NumberConstructor.cpp:
26694 * runtime/NumberConstructor.h:
26695 * runtime/NumberObject.cpp:
26696 * runtime/NumberObject.h:
26697 * runtime/NumberPrototype.cpp:
26698 * runtime/ObjectConstructor.cpp:
26699 * runtime/ObjectPrototype.cpp:
26700 * runtime/RegExpConstructor.cpp:
26701 * runtime/RegExpConstructor.h:
26702 * runtime/RegExpObject.cpp:
26703 * runtime/RegExpObject.h:
26704 * runtime/RegExpPrototype.cpp:
26705 * runtime/ScopeChain.cpp:
26706 * runtime/StringConstructor.cpp:
26707 * runtime/StringObject.cpp:
26708 * runtime/StringObject.h:
26709 * runtime/StringObjectThatMasqueradesAsUndefined.h:
26710 * runtime/StringPrototype.cpp:
26711 * runtime/StringPrototype.h:
26712 * runtime/Structure.cpp:
26713 * runtime/Structure.h:
26715 2011-02-19 David Kilzer <ddkilzer@apple.com>
26717 <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc
26719 Reviewed by Dan Bernstein.
26721 * Configurations/Base.xcconfig: Added
26722 JAVASCRIPTCORE_FRAMEWORKS_DIR variable.
26723 * Configurations/JavaScriptCore.xcconfig: Used
26724 JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH.
26725 * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH
26726 for Production configuration of jsc target.
26727 (Copy Into Framework): Removed old build phase.
26728 (Fix Framework Reference): Renamed build phase to "Copy Into
26729 Framework". Added "set -x" call to make the script print the
26730 commands it is running. Added code to exit early for Production
26731 builds since this was never intended for them. Added code to
26732 copy jsc into the JavaScriptCore.framework/Resources directory.
26734 2011-02-19 Siddharth Mathur <siddharth.mathur@nokia.com>
26736 Reviewed by Laszlo Gombos.
26738 [Symbian] OSAllocator implementation for Symbian OS.
26739 Manages both data and code region requests. V8 and Sunspider tested
26740 OK with interpreter. Not tested with JSC JIT yet as it has unrelated
26741 failures. Also no thread safety yet.
26742 https://bugs.webkit.org/show_bug.cgi?id=51128
26744 * JavaScriptCore.pri: removed HAL linkage
26746 (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty
26747 * wtf/OSAllocator.h:
26748 (WTF::OSAllocator::decommitAndRelease): decommit explicitly
26749 * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface
26750 (WTF::allocateCodeChunk): utility for code chunks
26751 (WTF::deallocateCodeChunk): utility for code chunks
26752 (WTF::dataAllocatorInstance): getter for data allocator instance
26753 (WTF::OSAllocator::reserveUncommitted):
26754 (WTF::OSAllocator::releaseDecommitted):
26755 (WTF::OSAllocator::commit):
26756 (WTF::OSAllocator::decommit):
26757 (WTF::OSAllocator::reserveAndCommit):
26758 (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests
26759 to one underlying Symbian chunk
26760 (WTF::PageAllocatorSymbian::~PageAllocatorSymbian):
26761 (WTF::PageAllocatorSymbian::reserve):
26762 (WTF::PageAllocatorSymbian::release):
26763 (WTF::PageAllocatorSymbian::commit):
26764 (WTF::PageAllocatorSymbian::decommit):
26765 (WTF::PageAllocatorSymbian::contains):
26766 * wtf/PageAllocatorSymbian.h: Added.
26767 (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk
26768 (WTF::SymbianChunk::~SymbianChunk):
26769 (WTF::SymbianChunk::contains):
26771 2011-02-19 Yong Li <yoli@rim.com>
26773 Reviewed by Eric Seidel.
26775 https://bugs.webkit.org/show_bug.cgi?id=54687
26776 When being built with armcc, "int" bit fields are treated as
26777 unsigned integers, which will fail the comparisons like "m_offset == -1".
26778 Using "signed" fixes the problem.
26780 * assembler/ARMAssembler.h:
26781 * assembler/ARMv7Assembler.h:
26783 2011-02-18 Geoffrey Garen <ggaren@apple.com>
26785 Reviewed by Sam Weinig.
26787 Made MarkedSpace block iteration size-class agnostic
26788 https://bugs.webkit.org/show_bug.cgi?id=54792
26790 SunSpider reports no change.
26792 * runtime/MarkedSpace.cpp:
26793 (JSC::MarkedSpace::clearMarks):
26794 (JSC::MarkedSpace::sweep):
26795 (JSC::MarkedSpace::objectCount):
26796 (JSC::MarkedSpace::size):
26797 (JSC::MarkedSpace::capacity):
26798 * runtime/MarkedSpace.h:
26799 (JSC::MarkedSpace::forEach): Iterate blocks in hashing order instead of
26800 size class list order. This is a much simpler convention in a world
26801 of many different size classes.
26803 2011-02-18 Kristian Amlie <kristian.amlie@nokia.com>
26805 Reviewed by Andreas Kling.
26807 Added friend exception to Qt platform, which also compiles Windows.
26809 QtWebKit fails to compile on Windows XP with msvc-2008
26810 https://bugs.webkit.org/show_bug.cgi?id=54746
26812 * bytecode/CodeBlock.h:
26813 * runtime/RegExpObject.h:
26815 2011-02-18 Geoffrey Garen <ggaren@apple.com>
26817 (Rolled back in r79022 with crash fixed.)
26819 Reviewed by Sam Weinig.
26821 Use hashing instead of linear search in the conservative pointer test
26822 https://bugs.webkit.org/show_bug.cgi?id=54767
26824 SunSpider reports no change.
26826 * runtime/MarkedSpace.cpp:
26827 (JSC::MarkedSpace::destroy): No need to explicitly clear the blocks array,
26828 since freeBlock removes items for us.
26830 (JSC::MarkedSpace::freeBlock): Fixed a typo that always removed the last
26831 block from the block set instead of the block being freed. Changed to
26832 remove a block from our data structures before deallocating it, since
26833 this is slightly cleaner.
26835 * runtime/MarkedSpace.h:
26836 (JSC::MarkedSpace::contains): Variable-sized objects will use more,
26837 smaller blocks, so it's important for the contains check not to be O(n)
26838 in the number of blocks.
26840 2011-02-18 chris reiss <christopher.reiss@nokia.com>
26842 Reviewed by Andreas Kling.
26844 REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
26845 https://bugs.webkit.org/show_bug.cgi?id=49989
26847 updated test fast/js/script-tests/date-parse-test.js
26849 * wtf/DateMath.cpp:
26850 (WTF::parseDateFromNullTerminatedCharacters):
26852 2011-02-18 Sheriff Bot <webkit.review.bot@gmail.com>
26854 Unreviewed, rolling out r79022.
26855 http://trac.webkit.org/changeset/79022
26856 https://bugs.webkit.org/show_bug.cgi?id=54775
26858 It broke the whole world (Requested by Ossy on #webkit).
26860 * runtime/MarkedSpace.h:
26861 (JSC::MarkedSpace::contains):
26863 2011-02-18 Yael Aharon <yael.aharon@nokia.com>
26865 Reviewed by Dave Hyatt.
26867 Add support for dir=auto
26868 https://bugs.webkit.org/show_bug.cgi?id=50916
26870 Change defaultWritingDirection() to return if the writing direction
26871 was determined from a letter with strong directionality or not.
26873 * JavaScriptCore.exp:
26874 * JavaScriptCore.order:
26875 * wtf/text/StringImpl.cpp:
26876 (WTF::StringImpl::defaultWritingDirection):
26877 * wtf/text/StringImpl.h:
26878 * wtf/text/WTFString.h:
26879 (WTF::String::defaultWritingDirection):
26881 2011-02-18 Geoffrey Garen <ggaren@apple.com>
26883 Reviewed by Sam Weinig.
26885 Use hashing instead of linear search in the conservative pointer test
26886 https://bugs.webkit.org/show_bug.cgi?id=54767
26888 SunSpider reports no change.
26890 * runtime/MarkedSpace.h:
26891 (JSC::MarkedSpace::contains): Variable-sized objects will use more,
26892 smaller blocks, so it's important for the contains check not to be O(n)
26893 in the number of blocks.
26895 2011-02-18 Geoffrey Garen <ggaren@apple.com>
26897 Reviewed by Sam Weinig.
26899 Tightened some usage accounting code in MarkedSpace
26900 https://bugs.webkit.org/show_bug.cgi?id=54761
26902 SunSpider reports no change.
26904 * runtime/Heap.cpp:
26905 (JSC::Heap::Heap): Initialize the marked space high water mark on
26906 construction, instead of relying on some implicit subtleties to make
26907 not initializing it work out OK.
26909 * runtime/Heap.h: Fixed up includes.
26911 * runtime/MarkedBlock.h: Made firstAtom() static so clients can call it
26912 even without having allocated a block.
26914 * runtime/MarkedSpace.cpp:
26915 (JSC::MarkedSpace::MarkedSpace): Don't pre-allocate a block, since this
26916 would be prohibitively expensive with multiple size classes.
26918 (JSC::MarkedSpace::allocateBlock):
26919 (JSC::MarkedSpace::freeBlock): Track allocated blocks in a hash set,
26920 since linear search in the contains check will be prohibitively
26921 expensive once we're using lots of smaller blocks.
26923 (JSC::MarkedSpace::allocate): Don't assume that we always have a block
26924 allocated, since we don't anymore. (See above.)
26926 (JSC::MarkedSpace::reset):
26927 * runtime/MarkedSpace.h: Updated for changes mentioned above.
26929 2011-02-17 Geoffrey Garen <ggaren@apple.com>
26931 Reviewed by Sam Weinig.
26933 Made object allocation secretly variable-sized (Shhhh!)
26934 https://bugs.webkit.org/show_bug.cgi?id=54721
26936 SunSpider reports no change.
26938 Internally, MarkedBlock now makes variable-sized allocations, even
26939 though MarkedSpace doesn't take advantage of this yet.
26941 * runtime/MarkedBlock.cpp:
26942 (JSC::MarkedBlock::MarkedBlock): No need to ASSERT that allocations are
26945 * runtime/MarkedBlock.h: Shrunk the atom size so we can allocate things
26946 that are not multiples of 64 bytes.
26948 2011-02-17 Geoffrey Garen <ggaren@apple.com>
26950 Reviewed by Sam Weinig.
26952 Fixed some math errors when when using variable-sized cells
26953 https://bugs.webkit.org/show_bug.cgi?id=54717
26955 SunSpider reports no change.
26957 Computer Science Barbie says, "Math is not so hard afterall!"
26959 * runtime/JSCell.h:
26960 (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
26961 minimum number of atoms required for a cell, since rounding down
26962 will get you splinched.
26964 * runtime/MarkedBlock.cpp:
26965 (JSC::MarkedBlock::MarkedBlock):
26966 (JSC::MarkedBlock::sweep):
26967 * runtime/MarkedBlock.h:
26968 (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
26969 because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
26970 may not hit m_endAtom exactly.
26972 2011-02-17 Geoffrey Garen <ggaren@apple.com>
26974 Reviewed by Sam Weinig.
26976 A little more abstraction for MarkedSpace::contains
26977 https://bugs.webkit.org/show_bug.cgi?id=54715
26979 * runtime/MarkedBlock.h:
26980 (JSC::MarkedBlock::contains): Added a contains function, so MarkedSpace
26981 doesn't have to know how MarkedBlock tracks containment internally.
26983 * runtime/MarkedSpace.h:
26984 (JSC::MarkedSpace::contains): Call through to MarkedBlock to figure out
26985 if a cell that seems to be in a block is valid.
26987 2011-02-17 Geoffrey Garen <ggaren@apple.com>
26989 Reviewed by Sam Weinig.
26991 Removed the invariant that the last cell in a block is always marked
26992 https://bugs.webkit.org/show_bug.cgi?id=54713
26994 SunSpider reports no change.
26996 This adds one branch to allocation, but simplifies the mark invariant,
26997 especially in a world of variable-sized cells. Now, it really is true
26998 that any cell whose mark bit is set is a valid, live cell whose
26999 constructor has run and whose destructor has not run.
27001 * runtime/JSCell.h:
27002 (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while
27003 since we can no longer rely on a set mark bit to break out of this loop
27004 before it reaches the end of the block.
27006 * runtime/MarkedBlock.cpp:
27007 (JSC::MarkedBlock::MarkedBlock):
27008 (JSC::MarkedBlock::sweep):
27009 * runtime/MarkedBlock.h:
27010 (JSC::MarkedBlock::isEmpty):
27011 (JSC::MarkedBlock::clearMarks):
27012 (JSC::MarkedBlock::markCount):
27013 (JSC::MarkedBlock::forEach): No need to set a special last mark bit.
27015 2011-02-17 Sheriff Bot <webkit.review.bot@gmail.com>
27017 Unreviewed, rolling out r78856 and r78907.
27018 http://trac.webkit.org/changeset/78856
27019 http://trac.webkit.org/changeset/78907
27020 https://bugs.webkit.org/show_bug.cgi?id=54705
27022 These seem to break tests on 32-bit builds. (Requested by
27023 aroben on #webkit).
27025 * JavaScriptCore.xcodeproj/project.pbxproj:
27026 * collector/handles/Global.h:
27027 (JSC::Global::internalSet):
27028 * collector/handles/Handle.h:
27029 (JSC::HandleTypes::getFromSlot):
27030 (JSC::HandleTypes::toJSValue):
27031 (JSC::HandleTypes::validateUpcast):
27032 (JSC::HandleConverter::operator->):
27033 (JSC::HandleConverter::operator*):
27034 (JSC::Handle::Handle):
27035 (JSC::Handle::get):
27036 * runtime/JSArray.cpp:
27037 (JSC::JSArray::sortNumeric):
27038 * runtime/JSObject.h:
27039 (JSC::JSObject::inlineGetOwnPropertySlot):
27040 * runtime/SlotAccessor.h: Removed.
27041 * runtime/WeakGCPtr.h:
27042 (JSC::WeakGCPtr::get):
27043 (JSC::WeakGCPtr::internalSet):
27044 * runtime/WriteBarrier.h:
27045 (JSC::DeprecatedPtr::DeprecatedPtr):
27046 (JSC::DeprecatedPtr::get):
27047 (JSC::DeprecatedPtr::operator*):
27048 (JSC::DeprecatedPtr::operator->):
27049 (JSC::DeprecatedPtr::slot):
27050 (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
27051 (JSC::DeprecatedPtr::operator!):
27052 (JSC::WriteBarrierBase::set):
27053 (JSC::WriteBarrierBase::get):
27054 (JSC::WriteBarrierBase::operator*):
27055 (JSC::WriteBarrierBase::operator->):
27056 (JSC::WriteBarrierBase::clear):
27057 (JSC::WriteBarrierBase::slot):
27058 (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
27059 (JSC::WriteBarrierBase::operator!):
27060 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
27061 (JSC::WriteBarrier::WriteBarrier):
27063 2011-02-17 Csaba Osztrogonác <ossy@webkit.org>
27069 * wtf/RetainPtr.h: Add missing PLATFORM(CF) guard.
27071 2011-02-17 Geoffrey Garen <ggaren@apple.com>
27073 Reviewed by Oliver Hunt.
27075 Made MarkedBlock variable-sized
27076 https://bugs.webkit.org/show_bug.cgi?id=54692
27078 SunSpider reports no change.
27080 Each MarkedBlock is now composed of a set of fixed-sized atoms, with one
27081 mark bit per atom. A given cell may be composed of one or more atoms.
27083 * runtime/Heap.cpp:
27084 (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace,
27085 bubbling it up from MarkedBlock, since MarkedBlock now supports variable-
27088 * runtime/JSCell.h:
27089 (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and
27090 (implicit) one constants -- these quantities are not constant anymore.
27091 Updated for switch from cell to atom.
27093 * runtime/MarkedBlock.cpp:
27094 (JSC::MarkedBlock::create):
27095 (JSC::MarkedBlock::destroy):
27096 (JSC::MarkedBlock::MarkedBlock):
27097 (JSC::MarkedBlock::sweep):
27098 * runtime/MarkedBlock.h:
27099 (JSC::MarkedBlock::firstAtom):
27100 (JSC::MarkedBlock::atoms):
27101 (JSC::MarkedBlock::isAtomAligned):
27102 (JSC::MarkedBlock::blockFor):
27103 (JSC::MarkedBlock::isEmpty):
27104 (JSC::MarkedBlock::clearMarks):
27105 (JSC::MarkedBlock::size):
27106 (JSC::MarkedBlock::capacity):
27107 (JSC::MarkedBlock::atomNumber):
27108 (JSC::MarkedBlock::isMarked):
27109 (JSC::MarkedBlock::testAndSetMarked):
27110 (JSC::MarkedBlock::setMarked):
27111 (JSC::MarkedBlock::forEach): Same as above. Also removed use of CELL_SIZE
27112 and BLOCK_SIZE, and switched away from calling arbitrary pointers cells.
27114 * runtime/MarkedSpace.cpp:
27115 (JSC::MarkedSpace::MarkedSpace):
27116 (JSC::MarkedSpace::allocateBlock):
27117 (JSC::MarkedSpace::allocate):
27118 (JSC::MarkedSpace::reset):
27119 * runtime/MarkedSpace.h:
27120 (JSC::CollectorHeap::CollectorHeap):
27121 (JSC::MarkedSpace::contains): Updated for renames. Made fixed-sizedness
27122 a property of MarkedSpace.
27124 2011-02-17 Oliver Hunt <oliver@apple.com>
27126 Attempt to fix windows build
27128 * runtime/WriteBarrier.h:
27130 2011-02-17 Oliver Hunt <oliver@apple.com>
27132 Reviewed by Geoffrey Garen.
27134 Refactor WriteBarrier and DeprecatedPtr to have less code duplication.
27135 https://bugs.webkit.org/show_bug.cgi?id=54608
27137 Make use of the tricks used for Handle, et al to avoid duplicating all
27138 of the logic for DeprecatedPtr and WriteBarrier simply to support known
27141 * JavaScriptCore.xcodeproj/project.pbxproj:
27142 * collector/handles/Global.h:
27143 (JSC::Global::internalSet):
27144 * collector/handles/Handle.h:
27145 (JSC::Handle::Handle):
27146 (JSC::Handle::get):
27147 * runtime/JSArray.cpp:
27148 (JSC::JSArray::sortNumeric):
27149 * runtime/JSObject.h:
27150 (JSC::JSObject::inlineGetOwnPropertySlot):
27151 * runtime/SlotAccessor.h: Added.
27152 (JSC::SlotTypes::getFromBaseType):
27153 (JSC::SlotTypes::convertToBaseType):
27154 (JSC::SlotTypes::getFromSlot):
27155 (JSC::SlotTypes::toJSValue):
27156 (JSC::SlotTypes::validateUpcast):
27157 (JSC::SlotAccessor::operator->):
27158 (JSC::SlotAccessor::operator*):
27159 * runtime/WeakGCPtr.h:
27160 (JSC::WeakGCPtr::get):
27161 (JSC::WeakGCPtr::internalSet):
27162 * runtime/WriteBarrier.h:
27163 (JSC::DeprecatedPtr::DeprecatedPtr):
27164 (JSC::DeprecatedPtr::get):
27165 (JSC::DeprecatedPtr::slot):
27166 (JSC::DeprecatedPtr::operator=):
27167 (JSC::WriteBarrierTranslator::convertToStorage):
27168 (JSC::WriteBarrierTranslator::convertFromStorage):
27169 (JSC::WriteBarrierBase::set):
27170 (JSC::WriteBarrierBase::get):
27171 (JSC::WriteBarrierBase::clear):
27172 (JSC::WriteBarrierBase::slot):
27173 (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
27174 (JSC::WriteBarrierBase::operator!):
27175 (JSC::WriteBarrierBase::setWithoutWriteBarrier):
27176 (JSC::WriteBarrier::WriteBarrier):
27178 2011-02-17 Kevin Ollivier <kevino@theolliviers.com>
27180 [wx] Revert incorrect blind fix and restore previous working code.
27182 * wtf/wx/StringWx.cpp:
27183 (WTF::String::String):
27185 2011-02-16 Geoffrey Garen <ggaren@apple.com>
27187 Reviewed by Maciej Stachowiak.
27189 Intermittent crashes beneath MarkStack::drain
27190 https://bugs.webkit.org/show_bug.cgi?id=54614
27191 <rdar://problem/8971070>
27193 The crashes were caused by a GC happening after the global object's
27194 property table had grown (due to compilation), but before the properties
27195 had been fully initialized by program execution.
27197 * bytecompiler/BytecodeGenerator.cpp:
27198 (JSC::BytecodeGenerator::BytecodeGenerator): Explicitly resize the global
27199 object's register storage immediately, without waiting for program
27200 execution to do it for us. This ensures that the global object's count
27201 of global variables is consistent with the size of its global variable
27202 storage at all times, and it ensures that all global variables are
27203 properly initialized from the get-go.
27205 * runtime/JSGlobalObject.cpp:
27206 (JSC::JSGlobalObject::resizeRegisters):
27207 * runtime/JSGlobalObject.h: Added a helper function for growing the
27208 global object's register storage, and initializing new registers.
27210 == Rolled over to ChangeLog-2011-02-16 ==