1 2008-12-07 Oliver Hunt <oliver@apple.com>
3 Reviewed by Cameron Zwarich and Sam Weinig
5 <rdar://problem/6309878> Need more granular control over allocation of executable memory (21783)
6 <https://bugs.webkit.org/show_bug.cgi?id=21783>
8 Add a new allocator for use by the JIT that provides executable pages, so
9 we can get rid of the current hack that makes the entire heap executable.
11 1-2% progression on SunSpider-v8, 1% on SunSpider. Reduces memory usage as well!
13 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
14 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
15 * JavaScriptCore.xcodeproj/project.pbxproj:
16 * assembler/AssemblerBuffer.h:
17 (JSC::AssemblerBuffer::size):
18 (JSC::AssemblerBuffer::executableCopy):
19 * assembler/MacroAssembler.h:
20 (JSC::MacroAssembler::size):
21 (JSC::MacroAssembler::copyCode):
22 * assembler/X86Assembler.h:
23 (JSC::X86Assembler::size):
24 (JSC::X86Assembler::executableCopy):
25 * bytecode/CodeBlock.cpp:
26 (JSC::CodeBlock::~CodeBlock):
27 * bytecode/CodeBlock.h:
28 (JSC::CodeBlock::executablePool):
29 (JSC::CodeBlock::setExecutablePool):
30 * bytecode/Instruction.h:
31 (JSC::PolymorphicAccessStructureList::derefStructures):
32 * interpreter/Interpreter.cpp:
33 (JSC::Interpreter::~Interpreter):
34 * interpreter/Interpreter.h:
35 * jit/ExecutableAllocator.cpp: Added.
36 * jit/ExecutableAllocator.h: Added.
37 (JSC::ExecutablePool::create):
38 (JSC::ExecutablePool::alloc):
39 (JSC::ExecutablePool::~ExecutablePool):
40 (JSC::ExecutablePool::available):
41 (JSC::ExecutablePool::ExecutablePool):
42 (JSC::ExecutablePool::poolAllocate):
43 (JSC::ExecutableAllocator::ExecutableAllocator):
44 (JSC::ExecutableAllocator::poolForSize):
45 (JSC::ExecutablePool::sizeForAllocation):
46 * jit/ExecutableAllocatorMMAP.cpp: Added.
47 (JSC::ExecutableAllocator::intializePageSize):
48 (JSC::ExecutablePool::systemAlloc):
49 (JSC::ExecutablePool::systemRelease):
50 * jit/ExecutableAllocatorWin.cpp: Added.
51 (JSC::ExecutableAllocator::intializePageSize):
52 (JSC::ExecutablePool::systemAlloc):
53 (JSC::ExecutablePool::systemRelease):
55 (JSC::JIT::privateCompile):
56 (JSC::JIT::privateCompileCTIMachineTrampolines):
58 (JSC::JIT::compileCTIMachineTrampolines):
59 * jit/JITPropertyAccess.cpp:
60 (JSC::JIT::privateCompilePutByIdTransition):
61 (JSC::JIT::privateCompilePatchGetArrayLength):
62 (JSC::JIT::privateCompileGetByIdSelf):
63 (JSC::JIT::privateCompileGetByIdProto):
64 (JSC::JIT::privateCompileGetByIdSelfList):
65 (JSC::JIT::privateCompileGetByIdProtoList):
66 (JSC::JIT::privateCompileGetByIdChainList):
67 (JSC::JIT::privateCompileGetByIdChain):
68 (JSC::JIT::privateCompilePutByIdReplace):
70 (JSC::RegExpNode::emitBytecode):
71 * runtime/JSGlobalData.h:
72 (JSC::JSGlobalData::poolForSize):
74 (JSC::RegExp::RegExp):
75 (JSC::RegExp::create):
76 (JSC::RegExp::~RegExp):
78 * runtime/RegExpConstructor.cpp:
79 (JSC::constructRegExp):
80 * runtime/RegExpPrototype.cpp:
81 (JSC::regExpProtoFuncCompile):
82 * runtime/StringPrototype.cpp:
83 (JSC::stringProtoFuncMatch):
84 (JSC::stringProtoFuncSearch):
86 (JSC::WREC::Generator::compileRegExp):
87 * wrec/WRECGenerator.h:
90 * wtf/TCSystemAlloc.cpp:
94 (TCMalloc_SystemRelease):
96 2008-12-06 Sam Weinig <sam@webkit.org>
100 * jit/JITPropertyAccess.cpp:
101 (JSC::JIT::compileGetByIdHotPath):
102 (JSC::JIT::compilePutByIdHotPath):
104 2008-12-06 Sam Weinig <sam@webkit.org>
106 Reviewed by Cameron Zwarich,
108 Move CodeBlock constructor into the .cpp file.
110 Sunspider reports a .7% progression, but I can only assume this
113 * bytecode/CodeBlock.cpp:
114 (JSC::CodeBlock::CodeBlock):
115 * bytecode/CodeBlock.h:
117 2008-12-06 Sam Weinig <sam@webkit.org>
119 Reviewed by Cameron Zwarich.
121 Split JumpTable code into its own file.
124 * JavaScriptCore.pri:
125 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
126 * JavaScriptCore.xcodeproj/project.pbxproj:
127 * JavaScriptCoreSources.bkl:
128 * bytecode/CodeBlock.cpp:
129 * bytecode/CodeBlock.h:
130 * bytecode/JumpTable.cpp: Copied from bytecode/CodeBlock.cpp.
131 * bytecode/JumpTable.h: Copied from bytecode/CodeBlock.h.
133 2008-12-05 Sam Weinig <sam@webkit.org>
135 Reviewed by Cameron Zwarich.
137 Fix for https://bugs.webkit.org/show_bug.cgi?id=22715
138 Encapsulate more CodeBlock members in preparation
139 of moving some of them to a rare data structure.
141 * bytecode/CodeBlock.cpp:
142 (JSC::locationForOffset):
143 (JSC::printConditionalJump):
144 (JSC::printGetByIdOp):
145 (JSC::printPutByIdOp):
146 (JSC::CodeBlock::printStructure):
147 (JSC::CodeBlock::printStructures):
148 (JSC::CodeBlock::dump):
149 (JSC::CodeBlock::~CodeBlock):
150 (JSC::CodeBlock::unlinkCallers):
151 (JSC::CodeBlock::derefStructures):
152 (JSC::CodeBlock::refStructures):
153 (JSC::CodeBlock::mark):
154 (JSC::CodeBlock::getHandlerForVPC):
155 (JSC::CodeBlock::nativeExceptionCodeForHandlerVPC):
156 (JSC::CodeBlock::lineNumberForVPC):
157 (JSC::CodeBlock::expressionRangeForVPC):
158 (JSC::CodeBlock::shrinkToFit):
159 * bytecode/CodeBlock.h:
160 (JSC::CodeBlock::CodeBlock):
161 (JSC::CodeBlock::addCaller):
162 (JSC::CodeBlock::removeCaller):
163 (JSC::CodeBlock::isKnownNotImmediate):
164 (JSC::CodeBlock::isConstantRegisterIndex):
165 (JSC::CodeBlock::getConstant):
166 (JSC::CodeBlock::isTemporaryRegisterIndex):
167 (JSC::CodeBlock::getStubInfo):
168 (JSC::CodeBlock::getCallLinkInfo):
169 (JSC::CodeBlock::instructions):
170 (JSC::CodeBlock::setJITCode):
171 (JSC::CodeBlock::jitCode):
172 (JSC::CodeBlock::ownerNode):
173 (JSC::CodeBlock::setGlobalData):
174 (JSC::CodeBlock::setThisRegister):
175 (JSC::CodeBlock::thisRegister):
176 (JSC::CodeBlock::setNeedsFullScopeChain):
177 (JSC::CodeBlock::needsFullScopeChain):
178 (JSC::CodeBlock::setUsesEval):
179 (JSC::CodeBlock::usesEval):
180 (JSC::CodeBlock::setUsesArguments):
181 (JSC::CodeBlock::usesArguments):
182 (JSC::CodeBlock::codeType):
183 (JSC::CodeBlock::source):
184 (JSC::CodeBlock::sourceOffset):
185 (JSC::CodeBlock::addGlobalResolveInstruction):
186 (JSC::CodeBlock::numberOfPropertyAccessInstructions):
187 (JSC::CodeBlock::addPropertyAccessInstruction):
188 (JSC::CodeBlock::propertyAccessInstruction):
189 (JSC::CodeBlock::numberOfCallLinkInfos):
190 (JSC::CodeBlock::addCallLinkInfo):
191 (JSC::CodeBlock::callLinkInfo):
192 (JSC::CodeBlock::numberOfJumpTargets):
193 (JSC::CodeBlock::addJumpTarget):
194 (JSC::CodeBlock::jumpTarget):
195 (JSC::CodeBlock::lastJumpTarget):
196 (JSC::CodeBlock::numberOfExceptionHandlers):
197 (JSC::CodeBlock::addExceptionHandler):
198 (JSC::CodeBlock::exceptionHandler):
199 (JSC::CodeBlock::addExpressionInfo):
200 (JSC::CodeBlock::numberOfLineInfos):
201 (JSC::CodeBlock::addLineInfo):
202 (JSC::CodeBlock::lastLineInfo):
203 (JSC::CodeBlock::jitReturnAddressVPCMap):
204 (JSC::CodeBlock::numberOfIdentifiers):
205 (JSC::CodeBlock::addIdentifier):
206 (JSC::CodeBlock::identifier):
207 (JSC::CodeBlock::numberOfConstantRegisters):
208 (JSC::CodeBlock::addConstantRegister):
209 (JSC::CodeBlock::constantRegister):
210 (JSC::CodeBlock::addFunction):
211 (JSC::CodeBlock::function):
212 (JSC::CodeBlock::addFunctionExpression):
213 (JSC::CodeBlock::functionExpression):
214 (JSC::CodeBlock::addUnexpectedConstant):
215 (JSC::CodeBlock::unexpectedConstant):
216 (JSC::CodeBlock::addRegExp):
217 (JSC::CodeBlock::regexp):
218 (JSC::CodeBlock::symbolTable):
219 (JSC::CodeBlock::evalCodeCache):
220 New inline setters/getters.
222 (JSC::ProgramCodeBlock::ProgramCodeBlock):
223 (JSC::ProgramCodeBlock::~ProgramCodeBlock):
224 (JSC::ProgramCodeBlock::clearGlobalObject):
225 * bytecode/SamplingTool.cpp:
226 (JSC::ScopeSampleRecord::sample):
227 (JSC::SamplingTool::dump):
228 * bytecompiler/BytecodeGenerator.cpp:
229 * bytecompiler/BytecodeGenerator.h:
230 * bytecompiler/Label.h:
231 * interpreter/CallFrame.cpp:
232 * interpreter/Interpreter.cpp:
235 * jit/JITInlineMethods.h:
236 * jit/JITPropertyAccess.cpp:
238 * runtime/Arguments.h:
239 * runtime/ExceptionHelpers.cpp:
240 * runtime/JSActivation.cpp:
241 * runtime/JSActivation.h:
242 * runtime/JSGlobalObject.cpp:
243 Change direct access to use new getter/setters.
245 2008-12-05 Gavin Barraclough <barraclough@apple.com>
247 Reviewed by Oliver Hunt.
249 Prevent GCC4.2 from hanging when trying to compile Interpreter.cpp.
250 Added "-fno-var-tracking" compiler flag.
252 https://bugs.webkit.org/show_bug.cgi?id=22704
254 * JavaScriptCore.xcodeproj/project.pbxproj:
256 2008-12-05 Gavin Barraclough <barraclough@apple.com>
258 Reviewed by Oliver Hunt.
260 Ordering of branch operands in MacroAssembler in unnecessarily inconsistent.
262 je, jg etc take an immediate operand as the second argument, but for the
263 equality branches (je, jne) the immediate operand was the first argument. This
264 was unnecessarily inconsistent. Change je, jne methods to take the immediate
265 as the second argument.
267 https://bugs.webkit.org/show_bug.cgi?id=22703
269 * assembler/MacroAssembler.h:
270 (JSC::MacroAssembler::je32):
271 (JSC::MacroAssembler::jne32):
273 (JSC::JIT::compileOpStrictEq):
274 * wrec/WRECGenerator.cpp:
275 (JSC::WREC::Generator::generateEnter):
276 (JSC::WREC::Generator::generateNonGreedyQuantifier):
277 (JSC::WREC::Generator::generateGreedyQuantifier):
278 (JSC::WREC::Generator::generatePatternCharacterPair):
279 (JSC::WREC::Generator::generatePatternCharacter):
280 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
281 (JSC::WREC::Generator::generateCharacterClassInverted):
282 (JSC::WREC::Generator::generateAssertionBOL):
283 (JSC::WREC::Generator::generateAssertionWordBoundary):
285 2008-12-05 Gavin Barraclough <barraclough@apple.com>
287 Reviewed by Geoff Garen.
289 Second tranche of porting JIT.cpp to MacroAssembler interface.
291 * assembler/MacroAssembler.h:
292 (JSC::MacroAssembler::mul32):
293 (JSC::MacroAssembler::jl32):
294 (JSC::MacroAssembler::jnzSub32):
295 (JSC::MacroAssembler::joAdd32):
296 (JSC::MacroAssembler::joMul32):
297 (JSC::MacroAssembler::jzSub32):
299 (JSC::JIT::emitSlowScriptCheck):
300 (JSC::JIT::privateCompileMainPass):
301 (JSC::JIT::privateCompileSlowCases):
302 (JSC::JIT::privateCompileCTIMachineTrampolines):
304 * jit/JITInlineMethods.h:
305 (JSC::JIT::emitJumpIfNotJSCell):
306 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
308 2008-12-05 David Kilzer <ddkilzer@apple.com>
310 Bug 22609: Provide a build-time choice when generating hash tables for properties of built-in DOM objects
312 <https://bugs.webkit.org/show_bug.cgi?id=22609>
313 <rdar://problem/6331749>
315 Reviewed by Darin Adler.
317 Initial patch by Yosen Lin. Adapted for ToT WebKit by David Kilzer.
319 Added back the code that generates a "compact" hash (instead of a
320 perfect hash) as a build-time option using the
321 ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h.
323 * create_hash_table: Rename variables to differentiate perfect hash
324 values from compact hash values. Added back code to compute compact
325 hash tables. Generate both hash table sizes and emit
326 conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
327 * runtime/Lookup.cpp:
328 (JSC::HashTable::createTable): Added version of createTable() for
329 use with compact hash tables.
330 (JSC::HashTable::deleteTable): Updated to work with compact hash
332 * runtime/Lookup.h: Defined ENABLE(PERFECT_HASH_SIZE) macro here.
333 (JSC::HashEntry::initialize): Set m_next to zero when using compact
335 (JSC::HashEntry::setNext): Added for compact hash tables.
336 (JSC::HashEntry::next): Added for compact hash tables.
337 (JSC::HashTable::entry): Added version of entry() for use with
339 * runtime/Structure.cpp:
340 (JSC::Structure::getEnumerablePropertyNames): Updated to work with
343 2008-12-05 Gavin Barraclough <barraclough@apple.com>
345 Reviewed by Geoff Garen.
347 Remove redundant calls to JIT::emitSlowScriptCheck.
348 This is checked in the hot path, so is not needed on the slow path - and the code
349 was being planted before the start of the slow case, so was completely unreachable!
352 (JSC::JIT::privateCompileSlowCases):
354 2008-12-05 Gavin Barraclough <barraclough@apple.com>
356 Reviewed by Geoff Garen.
358 Move JIT::compileOpStrictEq to MacroAssembler interface.
360 The rewrite also looks like a small (<1%) performance progression.
362 https://bugs.webkit.org/show_bug.cgi?id=22697
365 (JSC::JIT::compileOpStrictEq):
366 (JSC::JIT::privateCompileSlowCases):
368 * jit/JITInlineMethods.h:
369 (JSC::JIT::emitJumpIfJSCell):
370 (JSC::JIT::emitJumpSlowCaseIfJSCell):
372 2008-12-05 Gavin Barraclough <barraclough@apple.com>
374 Reviewed by Geoff Garen.
376 Remove m_assembler from MacroAssembler::Jump.
377 Keeping a pointer allowed for some syntactic sugar - "link()" looks nicer
378 than "link(this)". But maintaining this doubles the size of Jump, which
379 is even more unfortunate for the JIT, since there are many large structures
380 holding JmpSrcs. Probably best to remove it.
382 https://bugs.webkit.org/show_bug.cgi?id=22693
384 * assembler/MacroAssembler.h:
385 (JSC::MacroAssembler::Jump::Jump):
386 (JSC::MacroAssembler::Jump::link):
387 (JSC::MacroAssembler::Jump::linkTo):
388 (JSC::MacroAssembler::JumpList::link):
389 (JSC::MacroAssembler::JumpList::linkTo):
390 (JSC::MacroAssembler::jae32):
391 (JSC::MacroAssembler::je32):
392 (JSC::MacroAssembler::je16):
393 (JSC::MacroAssembler::jg32):
394 (JSC::MacroAssembler::jge32):
395 (JSC::MacroAssembler::jl32):
396 (JSC::MacroAssembler::jle32):
397 (JSC::MacroAssembler::jnePtr):
398 (JSC::MacroAssembler::jne32):
399 (JSC::MacroAssembler::jnset32):
400 (JSC::MacroAssembler::jset32):
401 (JSC::MacroAssembler::jump):
402 (JSC::MacroAssembler::jzSub32):
403 (JSC::MacroAssembler::joAdd32):
404 (JSC::MacroAssembler::call):
406 (JSC::WREC::Generator::compileRegExp):
407 * wrec/WRECGenerator.cpp:
408 (JSC::WREC::Generator::generateEnter):
409 (JSC::WREC::Generator::generateBackreferenceQuantifier):
410 (JSC::WREC::Generator::generateNonGreedyQuantifier):
411 (JSC::WREC::Generator::generateGreedyQuantifier):
412 (JSC::WREC::Generator::generatePatternCharacter):
413 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
414 (JSC::WREC::Generator::generateCharacterClassInverted):
415 (JSC::WREC::Generator::generateCharacterClass):
416 (JSC::WREC::Generator::generateParenthesesAssertion):
417 (JSC::WREC::Generator::generateParenthesesInvertedAssertion):
418 (JSC::WREC::Generator::generateParenthesesNonGreedy):
419 (JSC::WREC::Generator::generateParenthesesResetTrampoline):
420 (JSC::WREC::Generator::generateAssertionBOL):
421 (JSC::WREC::Generator::generateAssertionEOL):
422 (JSC::WREC::Generator::generateAssertionWordBoundary):
423 (JSC::WREC::Generator::generateBackreference):
424 (JSC::WREC::Generator::terminateAlternative):
425 (JSC::WREC::Generator::terminateDisjunction):
428 2008-12-05 Gavin Barraclough <barraclough@apple.com>
430 Reviewed by Geoffrey Garen.
432 Simplify JIT generated checks for timeout code, by moving more work into the C function.
433 https://bugs.webkit.org/show_bug.cgi?id=22688
435 * interpreter/Interpreter.cpp:
436 (JSC::Interpreter::cti_timeout_check):
437 * interpreter/Interpreter.h:
439 (JSC::JIT::emitSlowScriptCheck):
441 2008-12-05 Sam Weinig <sam@webkit.org>
443 Reviewed by Geoffrey Garen.
445 Encapsulate access to jump tables in the CodeBlock in preparation
446 of moving them to a rare data structure.
448 * bytecode/CodeBlock.cpp:
449 (JSC::CodeBlock::dump):
450 (JSC::CodeBlock::shrinkToFit):
451 * bytecode/CodeBlock.h:
452 (JSC::CodeBlock::numberOfImmediateSwitchJumpTables):
453 (JSC::CodeBlock::addImmediateSwitchJumpTable):
454 (JSC::CodeBlock::immediateSwitchJumpTable):
455 (JSC::CodeBlock::numberOfCharacterSwitchJumpTables):
456 (JSC::CodeBlock::addCharacterSwitchJumpTable):
457 (JSC::CodeBlock::characterSwitchJumpTable):
458 (JSC::CodeBlock::numberOfStringSwitchJumpTables):
459 (JSC::CodeBlock::addStringSwitchJumpTable):
460 (JSC::CodeBlock::stringSwitchJumpTable):
461 * bytecompiler/BytecodeGenerator.cpp:
462 (JSC::BytecodeGenerator::generate):
463 (JSC::BytecodeGenerator::endSwitch):
464 * interpreter/Interpreter.cpp:
465 (JSC::Interpreter::privateExecute):
466 (JSC::Interpreter::cti_op_switch_imm):
467 (JSC::Interpreter::cti_op_switch_char):
468 (JSC::Interpreter::cti_op_switch_string):
470 (JSC::JIT::privateCompileMainPass):
472 2008-12-05 Adam Roben <aroben@apple.com>
474 Windows build fix after r39020
476 * jit/JITInlineMethods.h:
477 (JSC::JIT::restoreArgumentReference):
478 (JSC::JIT::restoreArgumentReferenceForTrampoline):
479 Add some apparently-missing __.
481 2008-12-04 Geoffrey Garen <ggaren@apple.com>
483 Reviewed by Darin Adler.
485 https://bugs.webkit.org/show_bug.cgi?id=22673
487 Added support for the assertion (?=) and inverted assertion (?!) atoms
490 * wrec/WRECGenerator.cpp:
491 (JSC::WREC::Generator::generateParenthesesAssertion):
492 (JSC::WREC::Generator::generateParenthesesInvertedAssertion): Split the
493 old (unused) generateParentheses into these two functions, with more
494 limited capabilities.
496 * wrec/WRECGenerator.h:
497 (JSC::WREC::Generator::): Moved an enum to the top of the class definition,
498 to match the WebKit style, and removed a defunct comment.
500 * wrec/WRECParser.cpp:
501 (JSC::WREC::Parser::parseParentheses):
502 (JSC::WREC::Parser::consumeParenthesesType):
504 (JSC::WREC::Parser::): Added support for parsing (?=) and (?!).
506 2008-12-05 Simon Hausmann <simon.hausmann@nokia.com>
508 Rubber-stamped by Tor Arne Vestbø.
510 Disable the JIT for the Qt build alltogether again, after observing
511 more miscompilations in a wider range of newer gcc versions.
513 * JavaScriptCore.pri:
515 2008-12-05 Simon Hausmann <simon.hausmann@nokia.com>
517 Reviewed by Tor Arne Vestbø.
519 Disable the JIT for the Qt build on Linux unless gcc is >= 4.2,
520 due to miscompilations.
522 * JavaScriptCore.pri:
524 2008-12-04 Gavin Barraclough <barraclough@apple.com>
526 Reviewed by Geoff Garen.
528 Start porting the JIT to use the MacroAssembler.
530 https://bugs.webkit.org/show_bug.cgi?id=22671
531 No change in performance.
533 * assembler/MacroAssembler.h:
534 (JSC::MacroAssembler::Jump::operator X86Assembler::JmpSrc):
535 (JSC::MacroAssembler::add32):
536 (JSC::MacroAssembler::and32):
537 (JSC::MacroAssembler::lshift32):
538 (JSC::MacroAssembler::rshift32):
539 (JSC::MacroAssembler::storePtr):
540 (JSC::MacroAssembler::store32):
541 (JSC::MacroAssembler::poke):
542 (JSC::MacroAssembler::move):
543 (JSC::MacroAssembler::compareImm32ForBranchEquality):
544 (JSC::MacroAssembler::jnePtr):
545 (JSC::MacroAssembler::jnset32):
546 (JSC::MacroAssembler::jset32):
547 (JSC::MacroAssembler::jzeroSub32):
548 (JSC::MacroAssembler::joverAdd32):
549 (JSC::MacroAssembler::call):
550 * assembler/X86Assembler.h:
551 (JSC::X86Assembler::shll_i8r):
553 (JSC::JIT::privateCompileMainPass):
554 (JSC::JIT::privateCompile):
555 (JSC::JIT::privateCompileCTIMachineTrampolines):
557 * jit/JITArithmetic.cpp:
558 (JSC::JIT::compileBinaryArithOp):
559 * jit/JITInlineMethods.h:
560 (JSC::JIT::emitGetVirtualRegister):
561 (JSC::JIT::emitPutCTIArg):
562 (JSC::JIT::emitPutCTIArgConstant):
563 (JSC::JIT::emitGetCTIArg):
564 (JSC::JIT::emitPutCTIArgFromVirtualRegister):
565 (JSC::JIT::emitPutCTIParam):
566 (JSC::JIT::emitGetCTIParam):
567 (JSC::JIT::emitPutToCallFrameHeader):
568 (JSC::JIT::emitPutImmediateToCallFrameHeader):
569 (JSC::JIT::emitGetFromCallFrameHeader):
570 (JSC::JIT::emitPutVirtualRegister):
571 (JSC::JIT::emitInitRegister):
572 (JSC::JIT::emitNakedCall):
573 (JSC::JIT::restoreArgumentReference):
574 (JSC::JIT::restoreArgumentReferenceForTrampoline):
575 (JSC::JIT::emitCTICall):
576 (JSC::JIT::checkStructure):
577 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
578 (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
579 (JSC::JIT::emitJumpSlowCaseIfNotImmNums):
580 (JSC::JIT::emitFastArithDeTagImmediate):
581 (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
582 (JSC::JIT::emitFastArithReTagImmediate):
583 (JSC::JIT::emitFastArithPotentiallyReTagImmediate):
584 (JSC::JIT::emitFastArithImmToInt):
585 (JSC::JIT::emitFastArithIntToImmOrSlowCase):
586 (JSC::JIT::emitFastArithIntToImmNoCheck):
587 (JSC::JIT::emitTagAsBoolImmediate):
588 * jit/JITPropertyAccess.cpp:
589 (JSC::JIT::privateCompilePutByIdTransition):
591 2008-12-04 Geoffrey Garen <ggaren@apple.com>
593 Reviewed by Oliver Hunt.
595 Some refactoring for generateGreedyQuantifier.
597 SunSpider reports no change (possibly a 0.3% speedup).
599 * wrec/WRECGenerator.cpp:
600 (JSC::WREC::Generator::generateGreedyQuantifier): Clarified label
601 meanings and unified some logic to simplify things.
604 (JSC::WREC::Parser::parseAlternative): Added a version of parseAlternative
605 that can jump to a Label, instead of a JumpList, upon failure. (Eventually,
606 when we have a true Label class, this will be redundant.) This makes
607 things easier for generateGreedyQuantifier, because it can avoid
608 explicitly linking things.
610 2008-12-04 Simon Hausmann <simon.hausmann@nokia.com>
612 Reviewed by Holger Freyther.
614 Fix crashes in the Qt build on Linux/i386 with non-executable memory
615 by enabling TCSystemAlloc and the PROT_EXEC flag for mmap.
617 * JavaScriptCore.pri: Enable the use of TCSystemAlloc if the JIT is
619 * wtf/TCSystemAlloc.cpp: Extend the PROT_EXEC permissions to
622 2008-12-04 Simon Hausmann <simon.hausmann@nokia.com>
624 Reviewed by Tor Arne Vestbø.
626 Enable ENABLE_JIT_OPTIMIZE_CALL, ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
627 and ENABLE_JIT_OPTIMIZE_ARITHMETIC, as suggested by Niko.
629 * JavaScriptCore.pri:
631 2008-12-04 Kent Hansen <khansen@trolltech.com>
633 Reviewed by Simon Hausmann.
635 Enable the JSC jit for the Qt build by default for release builds on
636 linux-g++ and win32-msvc.
638 * JavaScriptCore.pri:
640 2008-12-04 Gavin Barraclough <barraclough@apple.com>
642 Reviewed by Oliver Hunt.
644 Allow JIT to function without property access repatching and arithmetic optimizations.
645 Controlled by ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS and ENABLE_JIT_OPTIMIZE_ARITHMETIC switches.
647 https://bugs.webkit.org/show_bug.cgi?id=22643
649 * JavaScriptCore.xcodeproj/project.pbxproj:
651 (JSC::JIT::privateCompileMainPass):
652 (JSC::JIT::privateCompileSlowCases):
654 * jit/JITArithmetic.cpp: Copied from jit/JIT.cpp.
655 (JSC::JIT::compileBinaryArithOp):
656 (JSC::JIT::compileBinaryArithOpSlowCase):
657 * jit/JITPropertyAccess.cpp: Copied from jit/JIT.cpp.
658 (JSC::JIT::compileGetByIdHotPath):
659 (JSC::JIT::compileGetByIdSlowCase):
660 (JSC::JIT::compilePutByIdHotPath):
661 (JSC::JIT::compilePutByIdSlowCase):
662 (JSC::resizePropertyStorage):
663 (JSC::transitionWillNeedStorageRealloc):
664 (JSC::JIT::privateCompilePutByIdTransition):
665 (JSC::JIT::patchGetByIdSelf):
666 (JSC::JIT::patchPutByIdReplace):
667 (JSC::JIT::privateCompilePatchGetArrayLength):
670 2008-12-03 Geoffrey Garen <ggaren@apple.com>
672 Reviewed by Oliver Hunt.
674 Optimized sequences of characters in regular expressions by comparing
675 two characters at a time.
677 1-2% speedup on SunSpider, 19-25% speedup on regexp-dna.
679 * assembler/MacroAssembler.h:
680 (JSC::MacroAssembler::load32):
681 (JSC::MacroAssembler::jge32): Filled out a few more macro methods.
683 * assembler/X86Assembler.h:
684 (JSC::X86Assembler::movl_mr): Added a verion of movl_mr that operates
685 without an offset, to allow the macro assembler to optmize for that case.
688 (JSC::WREC::Generator::compileRegExp): Test the saved value of index
689 instead of the index register when checking for "end of input." The
690 index register doesn't increment by 1 in an orderly fashion, so testing
691 it for == "end of input" is not valid.
693 Also, jump all the way to "return failure" upon reaching "end of input,"
694 instead of executing the next alternative. This is more logical, and
695 it's a slight optimization in the case of an expression with many alternatives.
697 * wrec/WRECGenerator.cpp:
698 (JSC::WREC::Generator::generateIncrementIndex): Added support for
699 jumping to a failure label in the case where the index has reached "end
702 (JSC::WREC::Generator::generatePatternCharacterSequence):
703 (JSC::WREC::Generator::generatePatternCharacterPair): This is the
704 optmization. It's basically like generatePatternCharacter, but it runs two
705 characters at a time.
707 (JSC::WREC::Generator::generatePatternCharacter): Changed to use isASCII,
708 since it's clearer than comparing to a magic hex value.
710 * wrec/WRECGenerator.h:
712 2008-12-03 Gavin Barraclough <barraclough@apple.com>
714 Reviewed by Camron Zwarich.
716 Allow JIT to operate without the call-repatching optimization.
717 Controlled by ENABLE(JIT_OPTIMIZE_CALL), defaults on, disabling
718 this leads to significant performance regression.
720 https://bugs.webkit.org/show_bug.cgi?id=22639
722 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
723 * JavaScriptCore.xcodeproj/project.pbxproj:
725 (JSC::JIT::privateCompileSlowCases):
727 * jit/JITCall.cpp: Copied from jit/JIT.cpp.
728 (JSC::JIT::compileOpCallInitializeCallFrame):
729 (JSC::JIT::compileOpCallSetupArgs):
730 (JSC::JIT::compileOpCallEvalSetupArgs):
731 (JSC::JIT::compileOpConstructSetupArgs):
732 (JSC::JIT::compileOpCall):
733 (JSC::JIT::compileOpCallSlowCase):
735 * jit/JITInlineMethods.h: Copied from jit/JIT.cpp.
736 (JSC::JIT::checkStructure):
737 (JSC::JIT::emitFastArithPotentiallyReTagImmediate):
738 (JSC::JIT::emitTagAsBoolImmediate):
741 2008-12-03 Eric Seidel <eric@webkit.org>
743 Rubber-stamped by David Hyatt.
745 Make HAVE_ACCESSIBILITY only define if !defined
749 2008-12-03 Sam Weinig <sam@webkit.org>
753 * assembler/X86Assembler.h:
754 (JSC::X86Assembler::orl_i32r):
756 2008-12-03 Sam Weinig <sam@webkit.org>
758 Reviewed by Geoffrey Garen.
760 Remove shared AssemblerBuffer 1MB buffer and instead give AssemblerBuffer
761 an 256 byte inline capacity.
763 1% progression on Sunspider.
765 * assembler/AssemblerBuffer.h:
766 (JSC::AssemblerBuffer::AssemblerBuffer):
767 (JSC::AssemblerBuffer::~AssemblerBuffer):
768 (JSC::AssemblerBuffer::grow):
769 * assembler/MacroAssembler.h:
770 (JSC::MacroAssembler::MacroAssembler):
771 * assembler/X86Assembler.h:
772 (JSC::X86Assembler::X86Assembler):
773 * interpreter/Interpreter.cpp:
774 (JSC::Interpreter::Interpreter):
775 * interpreter/Interpreter.h:
779 (JSC::RegExpNode::emitBytecode):
780 * runtime/RegExp.cpp:
781 (JSC::RegExp::RegExp):
782 (JSC::RegExp::create):
784 * runtime/RegExpConstructor.cpp:
785 (JSC::constructRegExp):
786 * runtime/RegExpPrototype.cpp:
787 (JSC::regExpProtoFuncCompile):
788 * runtime/StringPrototype.cpp:
789 (JSC::stringProtoFuncMatch):
790 (JSC::stringProtoFuncSearch):
792 (JSC::WREC::Generator::compileRegExp):
793 * wrec/WRECGenerator.h:
794 (JSC::WREC::Generator::Generator):
796 (JSC::WREC::Parser::Parser):
798 2008-12-03 Geoffrey Garen <ggaren@apple.com>
800 Reviewed by Oliver Hunt, with help from Gavin Barraclough.
802 orl_i32r was actually coded as an 8bit OR. So, I renamed orl_i32r to
803 orl_i8r, changed all orl_i32r clients to use orl_i8r, and then added
804 a new orl_i32r that actually does a 32bit OR.
806 (32bit OR is currently unused, but a patch I'm working on uses it.)
808 * assembler/MacroAssembler.h:
809 (JSC::MacroAssembler::or32): Updated to choose between 8bit and 32bit OR.
811 * assembler/X86Assembler.h:
812 (JSC::X86Assembler::orl_i8r): The old orl_i32r.
813 (JSC::X86Assembler::orl_i32r): The new orl_i32r.
816 (JSC::JIT::emitFastArithPotentiallyReTagImmediate):
817 (JSC::JIT::emitTagAsBoolImmediate): Use orl_i8r, since we're ORing 8bit
820 2008-12-03 Dean Jackson <dino@apple.com>
822 Reviewed by Dan Bernstein.
824 Helper functions for turn -> degrees.
825 https://bugs.webkit.org/show_bug.cgi?id=22497
831 2008-12-02 Cameron Zwarich <zwarich@apple.com>
833 Reviewed by Geoff Garen.
835 Bug 22504: Crashes during code generation occur due to refing of ignoredResult()
836 <https://bugs.webkit.org/show_bug.cgi?id=22504>
838 Since ignoredResult() was implemented by casting 1 to a RegisterID*, any
839 attempt to ref ignoredResult() results in a crash. This will occur in
840 code generation of a function body where a node emits another node with
841 the dst that was passed to it, and then refs the returned RegisterID*.
843 To fix this problem, make ignoredResult() a member function of
844 BytecodeGenerator that simply returns a pointe to a fixed RegisterID
845 member of BytecodeGenerator.
847 * bytecompiler/BytecodeGenerator.h:
848 (JSC::BytecodeGenerator::ignoredResult):
849 * bytecompiler/RegisterID.h:
851 (JSC::NullNode::emitBytecode):
852 (JSC::BooleanNode::emitBytecode):
853 (JSC::NumberNode::emitBytecode):
854 (JSC::StringNode::emitBytecode):
855 (JSC::RegExpNode::emitBytecode):
856 (JSC::ThisNode::emitBytecode):
857 (JSC::ResolveNode::emitBytecode):
858 (JSC::ObjectLiteralNode::emitBytecode):
859 (JSC::PostfixResolveNode::emitBytecode):
860 (JSC::PostfixBracketNode::emitBytecode):
861 (JSC::PostfixDotNode::emitBytecode):
862 (JSC::DeleteValueNode::emitBytecode):
863 (JSC::VoidNode::emitBytecode):
864 (JSC::TypeOfResolveNode::emitBytecode):
865 (JSC::TypeOfValueNode::emitBytecode):
866 (JSC::PrefixResolveNode::emitBytecode):
867 (JSC::AssignResolveNode::emitBytecode):
868 (JSC::CommaNode::emitBytecode):
869 (JSC::ForNode::emitBytecode):
870 (JSC::ForInNode::emitBytecode):
871 (JSC::ReturnNode::emitBytecode):
872 (JSC::ThrowNode::emitBytecode):
873 (JSC::FunctionBodyNode::emitBytecode):
874 (JSC::FuncDeclNode::emitBytecode):
876 2008-12-02 Geoffrey Garen <ggaren@apple.com>
878 Reviewed by Cameron Zwarich.
880 Fixed https://bugs.webkit.org/show_bug.cgi?id=22537
881 REGRESSION (r38745): Assertion failure in jsSubstring() at ge.com
883 The bug was that index would become greater than length, so our
884 "end of input" checks, which all check "index == length", would fail.
886 The solution is to check for end of input before incrementing index,
887 to ensure that index is always <= length.
889 As a side benefit, generateJumpIfEndOfInput can now use je instead of
890 jg, which should be slightly faster.
893 (JSC::WREC::Generator::compileRegExp):
894 * wrec/WRECGenerator.cpp:
895 (JSC::WREC::Generator::generateJumpIfEndOfInput):
897 2008-12-02 Gavin Barraclough <barraclough@apple.com>
899 Reviewed by Geoffrey Garen.
901 Plant shift right immediate instructions, which are awesome.
902 https://bugs.webkit.org/show_bug.cgi?id=22610
903 ~5% on the v8-crypto test.
906 (JSC::JIT::privateCompileMainPass):
907 (JSC::JIT::privateCompileSlowCases):
909 2008-12-02 Geoffrey Garen <ggaren@apple.com>
911 Reviewed by Sam Weinig.
913 Cleaned up SegmentedVector by abstracting segment access into helper
916 SunSpider reports no change.
918 * bytecompiler/SegmentedVector.h:
919 (JSC::SegmentedVector::SegmentedVector):
920 (JSC::SegmentedVector::~SegmentedVector):
921 (JSC::SegmentedVector::size):
922 (JSC::SegmentedVector::at):
923 (JSC::SegmentedVector::operator[]):
924 (JSC::SegmentedVector::last):
925 (JSC::SegmentedVector::append):
926 (JSC::SegmentedVector::removeLast):
927 (JSC::SegmentedVector::grow):
928 (JSC::SegmentedVector::clear):
929 (JSC::SegmentedVector::deleteAllSegments):
930 (JSC::SegmentedVector::segmentFor):
931 (JSC::SegmentedVector::subscriptFor):
932 (JSC::SegmentedVector::ensureSegmentsFor):
933 (JSC::SegmentedVector::ensureSegment):
935 2008-12-02 Geoffrey Garen <ggaren@apple.com>
937 Reviewed by Geoffrey Garen. (Patch by Cameron Zwarich <zwarich@apple.com>.)
939 Fixed https://bugs.webkit.org/show_bug.cgi?id=22482
940 REGRESSION (r37991): Occasionally see "Scene rendered incorrectly"
941 message when running the V8 Raytrace benchmark
943 Rolled out r37991. It didn't properly save xmm0, which is caller-save,
944 before calling helper functions.
946 SunSpider and v8 benchmarks show little change -- possibly a .2%
947 SunSpider regression, possibly a .2% v8 benchmark speedup.
949 * assembler/X86Assembler.h:
950 (JSC::X86Assembler::):
951 * bytecode/CodeBlock.cpp:
952 (JSC::CodeBlock::dump):
953 * bytecode/Instruction.h:
954 (JSC::Instruction::):
955 * bytecompiler/BytecodeGenerator.cpp:
956 (JSC::BytecodeGenerator::emitUnaryOp):
957 * bytecompiler/BytecodeGenerator.h:
958 (JSC::BytecodeGenerator::emitToJSNumber):
959 (JSC::BytecodeGenerator::emitTypeOf):
960 (JSC::BytecodeGenerator::emitGetPropertyNames):
961 * interpreter/Interpreter.cpp:
962 (JSC::Interpreter::privateExecute):
963 * interpreter/Interpreter.h:
965 (JSC::JIT::privateCompileMainPass):
966 (JSC::JIT::privateCompileSlowCases):
969 (JSC::UnaryOpNode::emitBytecode):
970 (JSC::BinaryOpNode::emitBytecode):
971 (JSC::EqualNode::emitBytecode):
972 * parser/ResultType.h:
973 (JSC::ResultType::isReusable):
974 (JSC::ResultType::mightBeNumber):
975 * runtime/JSNumberCell.h:
977 2008-12-01 Gavin Barraclough <barraclough@apple.com>
979 Reviewed by Geoffrey Garen.
981 Remove unused (sampling only, and derivable) argument to JIT::emitCTICall.
982 https://bugs.webkit.org/show_bug.cgi?id=22587
985 (JSC::JIT::emitCTICall):
986 (JSC::JIT::compileOpCall):
987 (JSC::JIT::emitSlowScriptCheck):
988 (JSC::JIT::compileBinaryArithOpSlowCase):
989 (JSC::JIT::privateCompileMainPass):
990 (JSC::JIT::privateCompileSlowCases):
991 (JSC::JIT::privateCompile):
994 2008-12-02 Dimitri Glazkov <dglazkov@chromium.org>
996 Reviewed by Eric Seidel.
998 Fix the inheritance chain for JSFunction.
1000 * runtime/JSFunction.cpp:
1001 (JSC::JSFunction::info): Add InternalFunction::info as parent class
1003 2008-12-02 Simon Hausmann <hausmann@webkit.org>
1005 Reviewed by Tor Arne Vestbø.
1007 Fix ability to include JavaScriptCore.pri from other .pro files.
1009 * JavaScriptCore.pri: Moved -O3 setting into the .pro files.
1010 * JavaScriptCore.pro:
1013 2008-12-01 Geoffrey Garen <ggaren@apple.com>
1015 Reviewed by Cameron Zwarich, with help from Gavin Barraclough.
1017 Fixed https://bugs.webkit.org/show_bug.cgi?id=22583.
1019 Refactored regular expression parsing to parse sequences of characters
1020 as a single unit, in preparation for optimizing sequences of characters.
1022 SunSpider reports no change.
1024 * JavaScriptCore.xcodeproj/project.pbxproj:
1025 * wrec/Escapes.h: Added. Set of classes for representing an escaped
1028 * wrec/Quantifier.h:
1029 (JSC::WREC::Quantifier::Quantifier): Simplified this constructor slightly,
1030 to match the new Escape constructor.
1032 * wrec/WRECGenerator.cpp:
1033 (JSC::WREC::Generator::generatePatternCharacterSequence):
1034 * wrec/WRECGenerator.h: Added an interface for generating a sequence
1035 of pattern characters at a time. It doesn't do anything special yet.
1037 * wrec/WRECParser.cpp:
1038 (JSC::WREC::Parser::consumeGreedyQuantifier):
1039 (JSC::WREC::Parser::consumeQuantifier): Renamed "parse" to "consume" in
1040 these functions, to match "consumeEscape."
1042 (JSC::WREC::Parser::parsePatternCharacterSequence): New function for
1043 iteratively aggregating a sequence of characters in a pattern.
1045 (JSC::WREC::Parser::parseCharacterClassQuantifier):
1046 (JSC::WREC::Parser::parseBackreferenceQuantifier): Renamed "parse" to
1047 "consume" in these functions, to match "consumeEscape."
1049 (JSC::WREC::Parser::parseCharacterClass): Refactored to use the common
1050 escape processing code in consumeEscape.
1052 (JSC::WREC::Parser::parseEscape): Refactored to use the common
1053 escape processing code in consumeEscape.
1055 (JSC::WREC::Parser::consumeEscape): Factored escaped token processing
1056 into a common function, since we were doing this in a few places.
1058 (JSC::WREC::Parser::parseTerm): Refactored to use the common
1059 escape processing code in consumeEscape.
1061 * wrec/WRECParser.h:
1062 (JSC::WREC::Parser::consumeOctal): Refactored to use a helper function
1063 for reading a digit.
1065 2008-12-01 Cameron Zwarich <zwarich@apple.com>
1067 Reviewed by Oliver Hunt.
1069 Bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers
1070 <https://bugs.webkit.org/show_bug.cgi?id=20340>
1072 SegmentedVector currently frees segments and reallocates them when used
1073 as a stack. This can lead to unsafe use of pointers into freed segments.
1075 In order to fix this problem, SegmentedVector will be changed to only
1076 grow and never shrink. Also, rename the reserveCapacity() member
1077 function to grow() to match the actual usage in BytecodeGenerator, where
1078 this function is used to allocate a group of registers at once, rather
1079 than merely saving space for them.
1081 * bytecompiler/BytecodeGenerator.cpp:
1082 (JSC::BytecodeGenerator::BytecodeGenerator): Use grow() instead of
1084 * bytecompiler/SegmentedVector.h:
1085 (JSC::SegmentedVector::SegmentedVector):
1086 (JSC::SegmentedVector::last):
1087 (JSC::SegmentedVector::append):
1088 (JSC::SegmentedVector::removeLast):
1089 (JSC::SegmentedVector::grow): Renamed from reserveCapacity().
1090 (JSC::SegmentedVector::clear):
1092 2008-12-01 Mark Rowe <mrowe@apple.com>
1094 Rubber-stamped by Anders Carlsson.
1096 Disable WREC for x86_64 since memory allocated by the system allocator is not marked executable,
1097 which causes 64-bit debug builds to crash. Once we have a dedicated allocator for executable
1098 memory we can turn this back on.
1102 2008-12-01 Antti Koivisto <antti@apple.com>
1104 Reviewed by Maciej Stachowiak.
1106 Restore inline buffer after vector is shrunk back below its inline capacity.
1110 (WTF::VectorBuffer::restoreInlineBufferIfNeeded):
1111 (WTF::::shrinkCapacity):
1113 2008-11-30 Antti Koivisto <antti@apple.com>
1115 Reviewed by Mark Rowe.
1117 Try to return free pages in the current thread cache too.
1119 * wtf/FastMalloc.cpp:
1120 (WTF::TCMallocStats::releaseFastMallocFreeMemory):
1122 2008-12-01 David Levin <levin@chromium.org>
1124 Reviewed by Alexey Proskuryakov.
1126 https://bugs.webkit.org/show_bug.cgi?id=22567
1127 Make HashTable work as expected with respect to threads. Specifically, it has class-level
1128 thread safety and constant methods work on constant objects without synchronization.
1130 No observable change in behavior, so no test. This only affects debug builds.
1132 * wtf/HashTable.cpp:
1133 (WTF::hashTableStatsMutex):
1134 (WTF::HashTableStats::~HashTableStats):
1135 (WTF::HashTableStats::recordCollisionAtCount):
1136 Guarded variable access with a mutex.
1140 (WTF::::lookupForWriting):
1141 (WTF::::fullLookupForWriting):
1146 Changed increments of static variables to use atomicIncrement.
1148 (WTF::::invalidateIterators):
1150 (WTF::removeIterator):
1151 Guarded mutable access with a mutex.
1153 2008-11-29 Gavin Barraclough <barraclough@apple.com>
1155 Reviewed by Camron Zwarich.
1157 Enable WREC on PLATFORM(X86_64). This change predominantly requires changes to the
1158 WREC::Generator::generateEnter method to support the x86-64 ABI, and addition of
1159 support for a limited number of quadword operations in the X86Assembler.
1161 This patch will cause the JS heap to be allocated with RWX permissions on 64-bit Mac
1162 platforms. This is a regression with respect to previous 64-bit behaviour, but is no
1163 more permissive than on 32-bit builds. This issue should be addressed at some point.
1164 (This is tracked by bug #21783.)
1166 https://bugs.webkit.org/show_bug.cgi?id=22554
1167 Greater than 4x speedup on regexp-dna, on x86-64.
1169 * assembler/MacroAssembler.h:
1170 (JSC::MacroAssembler::addPtr):
1171 (JSC::MacroAssembler::loadPtr):
1172 (JSC::MacroAssembler::storePtr):
1173 (JSC::MacroAssembler::pop):
1174 (JSC::MacroAssembler::push):
1175 (JSC::MacroAssembler::move):
1176 * assembler/X86Assembler.h:
1177 (JSC::X86Assembler::):
1178 (JSC::X86Assembler::movq_rr):
1179 (JSC::X86Assembler::addl_i8m):
1180 (JSC::X86Assembler::addl_i32r):
1181 (JSC::X86Assembler::addq_i8r):
1182 (JSC::X86Assembler::addq_i32r):
1183 (JSC::X86Assembler::movq_mr):
1184 (JSC::X86Assembler::movq_rm):
1186 * wrec/WRECGenerator.cpp:
1187 (JSC::WREC::Generator::generateEnter):
1188 (JSC::WREC::Generator::generateReturnSuccess):
1189 (JSC::WREC::Generator::generateReturnFailure):
1191 * wtf/TCSystemAlloc.cpp:
1193 2008-12-01 Cameron Zwarich <zwarich@apple.com>
1195 Reviewed by Sam Weinig.
1197 Preliminary work for bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers
1198 <https://bugs.webkit.org/show_bug.cgi?id=20340>
1200 SegmentedVector currently frees segments and reallocates them when used
1201 as a stack. This can lead to unsafe use of pointers into freed segments.
1203 In order to fix this problem, SegmentedVector will be changed to only
1204 grow and never shrink, with the sole exception of clearing all of its
1205 data, a capability that is required by Lexer. This patch changes the
1206 public interface to only allow for these capabilities.
1208 * bytecompiler/BytecodeGenerator.cpp:
1209 (JSC::BytecodeGenerator::BytecodeGenerator): Use reserveCapacity()
1210 instead of resize() for m_globals and m_parameters.
1211 * bytecompiler/SegmentedVector.h:
1212 (JSC::SegmentedVector::resize): Removed.
1213 (JSC::SegmentedVector::reserveCapacity): Added.
1214 (JSC::SegmentedVector::clear): Added.
1215 (JSC::SegmentedVector::shrink): Removed.
1216 (JSC::SegmentedVector::grow): Removed.
1218 (JSC::Lexer::clear): Use clear() instead of resize(0).
1220 2008-11-30 Sam Weinig <sam@webkit.org>
1222 Reviewed by Mark Rowe.
1224 Renames jumps to m_jumps in JumpList.
1226 * assembler/MacroAssembler.h:
1227 (JSC::MacroAssembler::JumpList::link):
1228 (JSC::MacroAssembler::JumpList::linkTo):
1229 (JSC::MacroAssembler::JumpList::append):
1231 2008-11-30 Antti Koivisto <antti@apple.com>
1233 Reviewed by Mark Rowe.
1235 https://bugs.webkit.org/show_bug.cgi?id=22557
1237 Report free size in central and thread caches too.
1239 * wtf/FastMalloc.cpp:
1240 (WTF::TCMallocStats::fastMallocStatistics):
1243 2008-11-29 Antti Koivisto <antti@apple.com>
1245 Reviewed by Dan Bernstein.
1247 https://bugs.webkit.org/show_bug.cgi?id=22557
1248 Add statistics for JavaScript GC heap.
1250 * JavaScriptCore.exp:
1251 * runtime/Collector.cpp:
1252 (JSC::Heap::objectCount):
1253 (JSC::addToStatistics):
1254 (JSC::Heap::statistics):
1255 * runtime/Collector.h:
1257 2008-11-29 Antti Koivisto <antti@apple.com>
1259 Fix debug build by adding a stub method.
1261 * wtf/FastMalloc.cpp:
1262 (WTF::fastMallocStatistics):
1264 2008-11-29 Antti Koivisto <antti@apple.com>
1266 Reviewed by Alexey Proskuryakov.
1268 https://bugs.webkit.org/show_bug.cgi?id=22557
1270 Add function for getting basic statistics from FastMalloc.
1272 * JavaScriptCore.exp:
1273 * wtf/FastMalloc.cpp:
1275 (WTF::TCMalloc_PageHeap::ReturnedBytes):
1276 (WTF::TCMallocStats::fastMallocStatistics):
1279 2008-11-29 Cameron Zwarich <zwarich@apple.com>
1283 The C++ standard does not automatically grant the friendships of an
1284 enclosing class to its nested subclasses, so we should do so explicitly.
1285 This fixes the GCC 4.0 build, although both GCC 4.2 and Visual C++ 2005
1286 accept the incorrect code as it is.
1288 * assembler/MacroAssembler.h:
1290 2008-11-29 Gavin Barraclough <barraclough@apple.com>
1292 Reviewed by Camron Zwarich.
1294 Add the class MacroAssembler to provide some abstraction of code generation,
1295 and change WREC to make use of this class, rather than directly accessing
1298 This patch also allows WREC to be compiled without the rest of the JIT enabled.
1300 * JavaScriptCore.xcodeproj/project.pbxproj:
1301 * assembler/MacroAssembler.h: Added.
1302 (JSC::MacroAssembler::):
1303 (JSC::MacroAssembler::MacroAssembler):
1304 (JSC::MacroAssembler::copyCode):
1305 (JSC::MacroAssembler::Address::Address):
1306 (JSC::MacroAssembler::ImplicitAddress::ImplicitAddress):
1307 (JSC::MacroAssembler::BaseIndex::BaseIndex):
1308 (JSC::MacroAssembler::Label::Label):
1309 (JSC::MacroAssembler::Jump::Jump):
1310 (JSC::MacroAssembler::Jump::link):
1311 (JSC::MacroAssembler::Jump::linkTo):
1312 (JSC::MacroAssembler::JumpList::link):
1313 (JSC::MacroAssembler::JumpList::linkTo):
1314 (JSC::MacroAssembler::JumpList::append):
1315 (JSC::MacroAssembler::Imm32::Imm32):
1316 (JSC::MacroAssembler::add32):
1317 (JSC::MacroAssembler::or32):
1318 (JSC::MacroAssembler::sub32):
1319 (JSC::MacroAssembler::loadPtr):
1320 (JSC::MacroAssembler::load32):
1321 (JSC::MacroAssembler::load16):
1322 (JSC::MacroAssembler::storePtr):
1323 (JSC::MacroAssembler::store32):
1324 (JSC::MacroAssembler::pop):
1325 (JSC::MacroAssembler::push):
1326 (JSC::MacroAssembler::peek):
1327 (JSC::MacroAssembler::poke):
1328 (JSC::MacroAssembler::move):
1329 (JSC::MacroAssembler::compareImm32ForBranch):
1330 (JSC::MacroAssembler::compareImm32ForBranchEquality):
1331 (JSC::MacroAssembler::jae32):
1332 (JSC::MacroAssembler::je32):
1333 (JSC::MacroAssembler::je16):
1334 (JSC::MacroAssembler::jg32):
1335 (JSC::MacroAssembler::jge32):
1336 (JSC::MacroAssembler::jl32):
1337 (JSC::MacroAssembler::jle32):
1338 (JSC::MacroAssembler::jne32):
1339 (JSC::MacroAssembler::jump):
1340 (JSC::MacroAssembler::breakpoint):
1341 (JSC::MacroAssembler::ret):
1342 * assembler/X86Assembler.h:
1343 (JSC::X86Assembler::cmpw_rm):
1344 * interpreter/Interpreter.cpp:
1345 (JSC::Interpreter::Interpreter):
1346 * interpreter/Interpreter.h:
1347 (JSC::Interpreter::assemblerBuffer):
1348 * runtime/RegExp.cpp:
1349 (JSC::RegExp::RegExp):
1351 (JSC::WREC::Generator::compileRegExp):
1353 * wrec/WRECFunctors.cpp:
1354 (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom):
1355 (JSC::WREC::GenerateCharacterClassFunctor::generateAtom):
1356 (JSC::WREC::GenerateBackreferenceFunctor::generateAtom):
1357 (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom):
1358 * wrec/WRECFunctors.h:
1359 (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor):
1360 * wrec/WRECGenerator.cpp:
1361 (JSC::WREC::Generator::generateEnter):
1362 (JSC::WREC::Generator::generateReturnSuccess):
1363 (JSC::WREC::Generator::generateSaveIndex):
1364 (JSC::WREC::Generator::generateIncrementIndex):
1365 (JSC::WREC::Generator::generateLoadCharacter):
1366 (JSC::WREC::Generator::generateJumpIfEndOfInput):
1367 (JSC::WREC::Generator::generateJumpIfNotEndOfInput):
1368 (JSC::WREC::Generator::generateReturnFailure):
1369 (JSC::WREC::Generator::generateBacktrack1):
1370 (JSC::WREC::Generator::generateBacktrackBackreference):
1371 (JSC::WREC::Generator::generateBackreferenceQuantifier):
1372 (JSC::WREC::Generator::generateNonGreedyQuantifier):
1373 (JSC::WREC::Generator::generateGreedyQuantifier):
1374 (JSC::WREC::Generator::generatePatternCharacter):
1375 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
1376 (JSC::WREC::Generator::generateCharacterClassInverted):
1377 (JSC::WREC::Generator::generateCharacterClass):
1378 (JSC::WREC::Generator::generateParentheses):
1379 (JSC::WREC::Generator::generateParenthesesNonGreedy):
1380 (JSC::WREC::Generator::generateParenthesesResetTrampoline):
1381 (JSC::WREC::Generator::generateAssertionBOL):
1382 (JSC::WREC::Generator::generateAssertionEOL):
1383 (JSC::WREC::Generator::generateAssertionWordBoundary):
1384 (JSC::WREC::Generator::generateBackreference):
1385 (JSC::WREC::Generator::terminateAlternative):
1386 (JSC::WREC::Generator::terminateDisjunction):
1387 * wrec/WRECGenerator.h:
1388 (JSC::WREC::Generator::Generator):
1389 * wrec/WRECParser.cpp:
1390 (JSC::WREC::Parser::parsePatternCharacterQualifier):
1391 (JSC::WREC::Parser::parseCharacterClassQuantifier):
1392 (JSC::WREC::Parser::parseBackreferenceQuantifier):
1393 (JSC::WREC::Parser::parseParentheses):
1394 (JSC::WREC::Parser::parseCharacterClass):
1395 (JSC::WREC::Parser::parseOctalEscape):
1396 (JSC::WREC::Parser::parseEscape):
1397 (JSC::WREC::Parser::parseTerm):
1398 (JSC::WREC::Parser::parseDisjunction):
1399 * wrec/WRECParser.h:
1400 (JSC::WREC::Parser::Parser):
1401 (JSC::WREC::Parser::parsePattern):
1402 (JSC::WREC::Parser::parseAlternative):
1405 2008-11-28 Simon Hausmann <hausmann@webkit.org>
1407 Reviewed by Tor Arne Vestbø.
1409 Fix compilation on Windows CE
1411 Port away from the use of errno after calling strtol(), instead
1412 detect conversion errors by checking the result and the stop
1415 * runtime/DateMath.cpp:
1419 2008-11-28 Joerg Bornemann <joerg.bornemann@trolltech.com>
1421 Reviewed by Simon Hausmann.
1423 Implement lowResUTCTime() on Windows CE using GetSystemTime as _ftime() is not available.
1425 * runtime/DateMath.cpp:
1426 (JSC::lowResUTCTime):
1428 2008-11-28 Simon Hausmann <hausmann@webkit.org>
1430 Rubber-stamped by Tor Arne Vestbø.
1432 Removed unnecessary inclusion of errno.h, which also fixes compilation on Windows CE.
1434 * runtime/JSGlobalObjectFunctions.cpp:
1436 2008-11-27 Cameron Zwarich <zwarich@apple.com>
1440 r38825 made JSFunction::m_body private, but some inspector code in
1441 WebCore sets the field. Add setters for it.
1443 * runtime/JSFunction.h:
1444 (JSC::JSFunction::setBody):
1446 2008-11-27 Sam Weinig <sam@webkit.org>
1448 Reviewed by Cameron Zwarich.
1450 Fix FIXME by adding accessor for JSFunction's m_body property.
1452 * interpreter/Interpreter.cpp:
1453 (JSC::Interpreter::cti_op_call_JSFunction):
1454 (JSC::Interpreter::cti_vm_dontLazyLinkCall):
1455 (JSC::Interpreter::cti_vm_lazyLinkCall):
1456 * profiler/Profiler.cpp:
1457 (JSC::createCallIdentifierFromFunctionImp):
1458 * runtime/Arguments.h:
1459 (JSC::Arguments::getArgumentsData):
1460 (JSC::Arguments::Arguments):
1461 * runtime/FunctionPrototype.cpp:
1462 (JSC::functionProtoFuncToString):
1463 * runtime/JSFunction.h:
1464 (JSC::JSFunction::JSFunction):
1465 (JSC::JSFunction::body):
1467 2008-11-27 Sam Weinig <sam@webkit.org>
1469 Reviewed by Oliver Hunt.
1471 Remove unused member variables from ProgramNode.
1475 2008-11-27 Brent Fulgham <bfulgham@gmail.com>
1477 Reviewed by Alexey Proskuryakov.
1479 Enable mouse panning feaure on Windows Cairo build.
1480 See http://bugs.webkit.org/show_bug.cgi?id=22525
1482 * wtf/Platform.h: Enable mouse panning feaure on Windows Cairo build.
1484 2008-11-27 Alp Toker <alp@nuanti.com>
1486 Change recently introduced C++ comments in Platform.h to C comments to
1487 fix the minidom build with traditional C.
1489 Build GtkLauncher and minidom with the '-ansi' compiler flag to detect
1490 API header breakage at build time.
1495 2008-11-27 Alp Toker <alp@nuanti.com>
1497 Remove C++ comment from JavaScriptCore API headers (introduced r35449).
1498 Fixes build for ANSI C applications using the public API.
1500 * API/WebKitAvailability.h:
1502 2008-11-26 Eric Seidel <eric@webkit.org>
1504 No review, build fix only.
1506 Fix the JSC Chromium Mac build by adding JavaScriptCore/icu into the include path
1508 * JavaScriptCore.scons:
1510 2008-11-25 Cameron Zwarich <zwarich@apple.com>
1512 Reviewed by Maciej Stachowiak.
1514 Remove the unused member function JSFunction::getParameterName().
1516 * runtime/JSFunction.cpp:
1517 * runtime/JSFunction.h:
1519 2008-11-24 Gavin Barraclough <barraclough@apple.com>
1521 Reviewed by Geoff Garen.
1523 Polymorpic caching for get by id chain. Similar to the polymorphic caching already implemented
1524 for self and proto accesses (implemented by allowing multiple trampolines to be JIT genertaed,
1525 and linked together) - the get by id chain caching is implemented as a genericization of the
1526 proto list caching, allowing cached access lists to contain a mix of proto and proto chain
1527 accesses (since in JS style inheritance hierarchies you may commonly see a mix of properties
1528 being overridden on the direct prototype, or higher up its prototype chain).
1530 In order to allow this patch to compile there is a fix to appease gcc 4.2 compiler issues
1531 (removing the jumps between fall-through cases in privateExecute).
1533 This patch also removes redundant immediate checking from the reptach code, and fixes a related
1534 memory leak (failure to deallocate trampolines).
1536 ~2% progression on v8 tests (bulk on the win on deltablue)
1538 * bytecode/Instruction.h:
1539 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
1540 (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
1541 (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
1542 (JSC::PolymorphicAccessStructureList::derefStructures):
1543 * interpreter/Interpreter.cpp:
1544 (JSC::countPrototypeChainEntriesAndCheckForProxies):
1545 (JSC::Interpreter::tryCacheGetByID):
1546 (JSC::Interpreter::privateExecute):
1547 (JSC::Interpreter::tryCTICacheGetByID):
1548 (JSC::Interpreter::cti_op_get_by_id_self_fail):
1549 (JSC::getPolymorphicAccessStructureListSlot):
1550 (JSC::Interpreter::cti_op_get_by_id_proto_list):
1551 * interpreter/Interpreter.h:
1553 (JSC::JIT::privateCompileGetByIdProto):
1554 (JSC::JIT::privateCompileGetByIdSelfList):
1555 (JSC::JIT::privateCompileGetByIdProtoList):
1556 (JSC::JIT::privateCompileGetByIdChainList):
1557 (JSC::JIT::privateCompileGetByIdChain):
1558 (JSC::JIT::privateCompilePatchGetArrayLength):
1560 (JSC::JIT::compileGetByIdChainList):
1562 2008-11-25 Cameron Zwarich <zwarich@apple.com>
1564 Reviewed by Alexey Proskuryakov.
1566 Move the collect() call in Heap::heapAllocate() that is conditionally
1567 compiled under COLLECT_ON_EVERY_ALLOCATION so that it is before we get
1568 information about the heap. This was causing assertion failures for me
1569 while I was reducing a bug.
1571 * runtime/Collector.cpp:
1572 (JSC::Heap::heapAllocate):
1574 2008-11-24 Cameron Zwarich <zwarich@apple.com>
1576 Reviewed by Geoff Garen.
1578 Bug 13790: Function declarations are not treated as statements (used to affect starcraft2.com)
1579 <https://bugs.webkit.org/show_bug.cgi?id=13790>
1581 Modify the parser to treat function declarations as statements,
1582 simplifying the grammar in the process. Technically, according to the
1583 grammar in the ECMA spec, function declarations are not statements and
1584 can not be used everywhere that statements can, but it is not worth the
1585 possibility compatibility issues just to stick to the spec in this case.
1589 (JSC::FuncDeclNode::emitBytecode): Avoid returning ignoredResult()
1590 as a result, because it causes a crash in DoWhileNode::emitBytecode().
1592 2008-11-24 Geoffrey Garen <ggaren@apple.com>
1594 Reviewed by Sam Weinig.
1596 Unroll the regexp matching loop by 1. 10% speedup on simple matching
1597 stress test. No change on SunSpider.
1599 (I decided not to unroll to arbitrary levels because the returns diminsh
1603 (JSC::WREC::compileRegExp):
1604 * wrec/WRECGenerator.cpp:
1605 (JSC::WREC::Generator::generateJumpIfEndOfInput):
1606 (JSC::WREC::Generator::generateJumpIfNotEndOfInput):
1607 * wrec/WRECGenerator.h:
1608 * wrec/WRECParser.h:
1609 (JSC::WREC::Parser::error):
1610 (JSC::WREC::Parser::parsePattern):
1612 2008-11-24 Geoffrey Garen <ggaren@apple.com>
1614 Reviewed by Sam Weinig.
1616 Removed some unnecessary "Generator::" prefixes.
1618 * wrec/WRECGenerator.cpp:
1619 (JSC::WREC::Generator::generateEnter):
1620 (JSC::WREC::Generator::generateReturnSuccess):
1621 (JSC::WREC::Generator::generateSaveIndex):
1622 (JSC::WREC::Generator::generateIncrementIndex):
1623 (JSC::WREC::Generator::generateLoopIfNotEndOfInput):
1624 (JSC::WREC::Generator::generateReturnFailure):
1626 2008-11-24 Geoffrey Garen <ggaren@apple.com>
1628 Reviewed by Sam Weinig.
1630 Made a bunch of WREC::Parser functions private, and added an explicit
1631 "reset()" function, so a parser can be reused.
1633 * wrec/WRECParser.h:
1634 (JSC::WREC::Parser::Parser):
1635 (JSC::WREC::Parser::generator):
1636 (JSC::WREC::Parser::ignoreCase):
1637 (JSC::WREC::Parser::multiline):
1638 (JSC::WREC::Parser::recordSubpattern):
1639 (JSC::WREC::Parser::numSubpatterns):
1640 (JSC::WREC::Parser::parsePattern):
1641 (JSC::WREC::Parser::parseAlternative):
1642 (JSC::WREC::Parser::reset):
1644 2008-11-24 Gavin Barraclough <barraclough@apple.com>
1646 Reviewed by Camron Zwarich.
1648 Implement repatching for get by id chain.
1649 Previously the access is performed in a function stub, in the repatch form
1650 the trampoline is not called to; instead the hot path is relinked to jump
1651 directly to the trampoline, if it fails it will jump to the slow case.
1653 https://bugs.webkit.org/show_bug.cgi?id=22449
1654 3% progression on deltablue.
1657 (JSC::JIT::privateCompileGetByIdProto):
1658 (JSC::JIT::privateCompileGetByIdChain):
1660 2008-11-24 Joerg Bornemann <joerg.bornemann@trolltech.com>
1662 Reviewed by Simon Hausmann.
1664 https://bugs.webkit.org/show_bug.cgi?id=20746
1666 Various small compilation fixes to make the Qt port of WebKit
1667 compile on Windows CE.
1669 * config.h: Don't set _CRT_RAND_S for CE, it's not available.
1670 * jsc.cpp: Disabled use of debugger includes for CE. It
1671 does not have the debugging functions.
1672 * runtime/DateMath.cpp: Use localtime() on Windows CE.
1673 * wtf/Assertions.cpp: Compile on Windows CE without debugger.
1674 * wtf/Assertions.h: Include windows.h before defining ASSERT.
1675 * wtf/MathExtras.h: Include stdlib.h instead of xmath.h.
1676 * wtf/Platform.h: Disable ERRNO_H and detect endianess based
1677 on the Qt endianess. On Qt for Windows CE the endianess is
1678 defined by the vendor specific build spec.
1679 * wtf/Threading.h: Use the volatile-less atomic functions.
1680 * wtf/dtoa.cpp: Compile without errno.
1681 * wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after
1682 Assertions.h due to the redefinition of ASSERT.
1684 2008-11-22 Gavin Barraclough <barraclough@apple.com>
1686 Reviewed by Camron Zwarich.
1688 Replace accidentally deleted immediate check from get by id chain trampoline.
1689 https://bugs.webkit.org/show_bug.cgi?id=22413
1692 (JSC::JIT::privateCompileGetByIdChain):
1694 2008-11-21 Gavin Barraclough <barraclough@apple.com>
1696 Reviewed by Oliver Hunt.
1698 Add (really) polymorphic caching for get by id self.
1699 Very similar to caching of prototype accesses, described below.
1701 Oh, also, probably shouldn't have been leaking those structure list objects.
1703 4% preogression on deltablue.
1705 * bytecode/CodeBlock.cpp:
1706 (JSC::CodeBlock::dump):
1707 (JSC::CodeBlock::derefStructures):
1708 (JSC::PrototypeStructureList::derefStructures):
1709 * bytecode/Instruction.h:
1710 * bytecode/Opcode.h:
1711 * interpreter/Interpreter.cpp:
1712 (JSC::Interpreter::privateExecute):
1713 (JSC::Interpreter::cti_op_get_by_id_self_fail):
1715 (JSC::JIT::privateCompileMainPass):
1716 (JSC::JIT::privateCompileGetByIdSelfList):
1717 (JSC::JIT::patchGetByIdSelf):
1719 (JSC::JIT::compileGetByIdSelfList):
1721 2008-11-21 Geoffrey Garen <ggaren@apple.com>
1723 Reviewed by Sam Weinig.
1725 Fixed many crashes seen 'round the world (but only in release builds).
1727 Update outputParameter offset to reflect slight re-ordering of push
1728 instructions in r38669.
1730 * wrec/WRECGenerator.cpp:
1732 2008-11-21 Geoffrey Garen <ggaren@apple.com>
1734 Reviewed by Sam Weinig.
1736 A little more RegExp refactoring.
1738 Deployed a helper function for reading the next character. Used the "link
1739 vector of jumps" helper in a place I missed before.
1741 * wrec/WRECGenerator.cpp:
1742 (JSC::WREC::Generator::generateLoadCharacter):
1743 (JSC::WREC::Generator::generatePatternCharacter):
1744 (JSC::WREC::Generator::generateCharacterClass):
1745 (JSC::WREC::Generator::generateAssertionEOL):
1746 (JSC::WREC::Generator::generateAssertionWordBoundary):
1747 * wrec/WRECGenerator.h:
1749 2008-11-21 Alexey Proskuryakov <ap@webkit.org>
1751 Reviewed by Dan Bernstein.
1753 https://bugs.webkit.org/show_bug.cgi?id=22402
1754 Replace abort() with CRASH()
1756 * wtf/Assertions.h: Added a different method to crash, which should work even is 0xbbadbeef
1757 is a valid memory address.
1759 * runtime/Collector.cpp:
1760 * wtf/FastMalloc.cpp:
1763 Replace abort() with CRASH().
1765 2008-11-21 Alexey Proskuryakov <ap@webkit.org>
1767 Reverted fix for bug 22042 (Replace abort() with CRASH()), because it was breaking
1768 FOR_EACH_OPCODE_ID macro somehow, making Safari crash.
1770 * runtime/Collector.cpp:
1771 (JSC::Heap::heapAllocate):
1772 (JSC::Heap::collect):
1774 * wtf/FastMalloc.cpp:
1778 (WTF::InitSizeClasses):
1779 (WTF::PageHeapAllocator::New):
1780 (WTF::TCMallocStats::do_malloc):
1783 (TCMalloc_SpinLock::Init):
1784 (TCMalloc_SpinLock::Finalize):
1785 (TCMalloc_SpinLock::Lock):
1786 (TCMalloc_SpinLock::Unlock):
1788 2008-11-21 Geoffrey Garen <ggaren@apple.com>
1790 Reviewed by Sam Weinig.
1792 A little more RegExp refactoring.
1794 Moved all assembly from WREC.cpp into WRECGenerator helper functions.
1795 This should help with portability and readability.
1797 Removed ASSERTs after calls to executableCopy(), and changed
1798 executableCopy() to ASSERT instead.
1800 * assembler/X86Assembler.h:
1801 (JSC::X86Assembler::executableCopy):
1803 (JSC::JIT::privateCompile):
1804 (JSC::JIT::privateCompileGetByIdSelf):
1805 (JSC::JIT::privateCompileGetByIdProto):
1806 (JSC::JIT::privateCompileGetByIdChain):
1807 (JSC::JIT::privateCompilePutByIdReplace):
1808 (JSC::JIT::privateCompilePutByIdTransition):
1809 (JSC::JIT::privateCompileCTIMachineTrampolines):
1810 (JSC::JIT::privateCompilePatchGetArrayLength):
1812 (JSC::WREC::compileRegExp):
1813 * wrec/WRECGenerator.cpp:
1814 (JSC::WREC::Generator::generateEnter):
1815 (JSC::WREC::Generator::generateReturnSuccess):
1816 (JSC::WREC::Generator::generateSaveIndex):
1817 (JSC::WREC::Generator::generateIncrementIndex):
1818 (JSC::WREC::Generator::generateLoopIfNotEndOfInput):
1819 (JSC::WREC::Generator::generateReturnFailure):
1820 * wrec/WRECGenerator.h:
1821 * wrec/WRECParser.h:
1822 (JSC::WREC::Parser::ignoreCase):
1823 (JSC::WREC::Parser::generator):
1825 2008-11-21 Alexey Proskuryakov <ap@webkit.org>
1829 * wtf/Assertions.h: Use ::abort for C++ code.
1831 2008-11-21 Alexey Proskuryakov <ap@webkit.org>
1833 Reviewed by Sam Weinig.
1835 https://bugs.webkit.org/show_bug.cgi?id=22402
1836 Replace abort() with CRASH()
1838 * wtf/Assertions.h: Added abort() after an attempt to crash for extra safety.
1840 * runtime/Collector.cpp:
1841 * wtf/FastMalloc.cpp:
1844 Replace abort() with CRASH().
1846 2008-11-21 Geoffrey Garen <ggaren@apple.com>
1848 Reviewed by Sam Weinig.
1850 Renamed wrec => generator.
1852 * wrec/WRECFunctors.cpp:
1853 (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom):
1854 (JSC::WREC::GeneratePatternCharacterFunctor::backtrack):
1855 (JSC::WREC::GenerateCharacterClassFunctor::generateAtom):
1856 (JSC::WREC::GenerateCharacterClassFunctor::backtrack):
1857 (JSC::WREC::GenerateBackreferenceFunctor::generateAtom):
1858 (JSC::WREC::GenerateBackreferenceFunctor::backtrack):
1859 (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom):
1861 2008-11-19 Gavin Barraclough <barraclough@apple.com>
1863 Reviewed by Darin Adler.
1865 Add support for (really) polymorphic caching of prototype accesses.
1867 If a cached prototype access misses, cti_op_get_by_id_proto_list is called.
1868 When this occurs the Structure pointers from the instruction stream are copied
1869 off into a new ProtoStubInfo object. A second prototype access trampoline is
1870 generated, and chained onto the first. Subsequent missed call to
1871 cti_op_get_by_id_proto_list_append, which append futher new trampolines, up to
1872 PROTOTYPE_LIST_CACHE_SIZE (currently 4). If any of the misses result in an
1873 access other than to a direct prototype property, list formation is halted (or
1874 for the initial miss, does not take place at all).
1876 Separate fail case functions are provided for each access since this contributes
1877 to the performance progression (enables better processor branch prediction).
1879 Overall this is a near 5% progression on v8, with around 10% wins on richards
1882 * bytecode/CodeBlock.cpp:
1883 (JSC::CodeBlock::dump):
1884 (JSC::CodeBlock::derefStructures):
1885 * bytecode/Instruction.h:
1886 (JSC::ProtoStructureList::ProtoStubInfo::set):
1887 (JSC::ProtoStructureList::ProtoStructureList):
1888 (JSC::Instruction::Instruction):
1889 (JSC::Instruction::):
1890 * bytecode/Opcode.h:
1891 * interpreter/Interpreter.cpp:
1892 (JSC::Interpreter::privateExecute):
1893 (JSC::Interpreter::tryCTICacheGetByID):
1894 (JSC::Interpreter::cti_op_put_by_id_fail):
1895 (JSC::Interpreter::cti_op_get_by_id_self_fail):
1896 (JSC::Interpreter::cti_op_get_by_id_proto_list):
1897 (JSC::Interpreter::cti_op_get_by_id_proto_list_append):
1898 (JSC::Interpreter::cti_op_get_by_id_proto_list_full):
1899 (JSC::Interpreter::cti_op_get_by_id_proto_fail):
1900 (JSC::Interpreter::cti_op_get_by_id_chain_fail):
1901 (JSC::Interpreter::cti_op_get_by_id_array_fail):
1902 (JSC::Interpreter::cti_op_get_by_id_string_fail):
1903 * interpreter/Interpreter.h:
1905 (JSC::JIT::privateCompileMainPass):
1906 (JSC::JIT::privateCompileGetByIdSelf):
1907 (JSC::JIT::privateCompileGetByIdProto):
1908 (JSC::JIT::privateCompileGetByIdProtoList):
1909 (JSC::JIT::privateCompileGetByIdChain):
1910 (JSC::JIT::privateCompileCTIMachineTrampolines):
1911 (JSC::JIT::privateCompilePatchGetArrayLength):
1913 (JSC::JIT::compileGetByIdProtoList):
1915 2008-11-20 Sam Weinig <sam@webkit.org>
1917 Try and fix the tiger build.
1921 2008-11-20 Eric Seidel <eric@webkit.org>
1923 Reviewed by Darin Adler.
1925 Make JavaScriptCore Chromium build under Windows (cmd only, cygwin almost works)
1926 https://bugs.webkit.org/show_bug.cgi?id=22347
1928 * JavaScriptCore.scons:
1929 * parser/Parser.cpp: Add using std::auto_ptr since we use auto_ptr
1931 2008-11-20 Steve Falkenburg <sfalken@apple.com>
1935 Reviewed by Sam Weinig.
1937 * parser/Parser.cpp:
1938 (JSC::Parser::reparse):
1940 2008-11-20 Geoffrey Garen <ggaren@apple.com>
1942 Reviewed by Sam Weinig.
1944 A little more RegExp refactoring.
1946 Created a helper function in the assembler for linking a vector of
1947 JmpSrc to a location, and deployed it in a bunch of places.
1949 * JavaScriptCore.xcodeproj/project.pbxproj:
1950 * assembler/X86Assembler.h:
1951 (JSC::X86Assembler::link):
1953 (JSC::WREC::compileRegExp):
1954 * wrec/WRECGenerator.cpp:
1955 (JSC::WREC::Generator::generateNonGreedyQuantifier):
1956 (JSC::WREC::Generator::generateGreedyQuantifier):
1957 (JSC::WREC::Generator::generateCharacterClassInverted):
1958 (JSC::WREC::Generator::generateParentheses):
1959 (JSC::WREC::Generator::generateParenthesesResetTrampoline):
1960 (JSC::WREC::Generator::generateAssertionBOL):
1961 (JSC::WREC::Generator::generateAssertionEOL):
1962 (JSC::WREC::Generator::generateAssertionWordBoundary):
1963 (JSC::WREC::Generator::terminateAlternative):
1964 (JSC::WREC::Generator::terminateDisjunction):
1965 * wrec/WRECParser.cpp:
1966 * wrec/WRECParser.h:
1967 (JSC::WREC::Parser::consumeHex):
1969 2008-11-20 Sam Weinig <sam@webkit.org>
1974 * parser/Parser.cpp:
1976 2008-11-20 Sam Weinig <sam@webkit.org>
1978 Reviewed by Darin Adler.
1980 Patch for https://bugs.webkit.org/show_bug.cgi?id=22385
1981 <rdar://problem/6390179>
1982 Lazily reparse FunctionBodyNodes on first execution.
1984 - Saves 57MB on Membuster head.
1986 * bytecompiler/BytecodeGenerator.cpp:
1987 (JSC::BytecodeGenerator::generate): Remove vector shrinking since this is now
1988 handled by destroying the ScopeNodeData after generation.
1990 * parser/Grammar.y: Add alternate NoNode version of the grammar
1991 that does not create nodes. This is used to lazily create FunctionBodyNodes
1995 (JSC::Lexer::setCode): Fix bug where on reparse, the Lexer was confused about
1996 what position and length meant. Position is the current position in the original
1997 data buffer (important for getting correct line/column information) and length
1998 the end offset in the original buffer.
2000 (JSC::Lexer::sourceCode): Positions are relative to the beginning of the buffer.
2003 (JSC::ScopeNodeData::ScopeNodeData): Move initialization of ScopeNode data here.
2004 (JSC::ScopeNode::ScopeNode): Add constructor that only sets the JSGlobalData
2005 for FunctionBodyNode stubs.
2006 (JSC::ScopeNode::~ScopeNode): Release m_children now that we don't inherit from
2008 (JSC::ScopeNode::releaseNodes): Ditto.
2009 (JSC::EvalNode::generateBytecode): Only shrink m_children, as we need to keep around
2010 the rest of the data.
2011 (JSC::FunctionBodyNode::FunctionBodyNode): Add constructor that only sets the
2013 (JSC::FunctionBodyNode::create): Ditto.
2014 (JSC::FunctionBodyNode::generateBytecode): If we don't have the data, do a reparse
2015 to construct it. Then after generation, destroy the data.
2016 (JSC::ProgramNode::generateBytecode): After generation, destroy the AST data.
2018 (JSC::ExpressionNode::): Add isFuncExprNode for FunctionConstructor.
2019 (JSC::StatementNode::): Add isExprStatementNode for FunctionConstructor.
2020 (JSC::ExprStatementNode::): Ditto.
2021 (JSC::ExprStatementNode::expr): Add accessor for FunctionConstructor.
2022 (JSC::FuncExprNode::): Add isFuncExprNode for FunctionConstructor
2024 (JSC::ScopeNode::adoptData): Adopts a ScopeNodeData.
2025 (JSC::ScopeNode::data): Accessor for ScopeNodeData.
2026 (JSC::ScopeNode::destroyData): Deletes the ScopeNodeData.
2027 (JSC::ScopeNode::setFeatures): Added.
2028 (JSC::ScopeNode::varStack): Added assert.
2029 (JSC::ScopeNode::functionStack): Ditto.
2030 (JSC::ScopeNode::children): Ditto.
2031 (JSC::ScopeNode::neededConstants): Ditto.
2032 Factor m_varStack, m_functionStack, m_children and m_numConstants into ScopeNodeData.
2034 * parser/Parser.cpp:
2035 (JSC::Parser::reparse): Reparse the SourceCode in the FunctionBodyNode and set
2036 set up the ScopeNodeData for it.
2039 * parser/SourceCode.h:
2040 (JSC::SourceCode::endOffset): Added for use in the lexer.
2042 * runtime/FunctionConstructor.cpp:
2043 (JSC::getFunctionBody): Assuming a ProgramNode with one FunctionExpression in it,
2044 get the FunctionBodyNode. Any issues signifies a parse failure in constructFunction.
2045 (JSC::constructFunction): Make parsing functions in the form new Function(""), easier
2046 by concatenating the strings together (with some glue) and parsing the function expression
2047 as a ProgramNode from which we can receive the FunctionBodyNode. This has the added benefit
2048 of not having special parsing code for the arguments and lazily constructing the
2049 FunctionBodyNode's AST on first execution.
2051 * runtime/Identifier.h:
2052 (JSC::operator!=): Added.
2054 2008-11-20 Sam Weinig <sam@webkit.org>
2056 Reviewed by Geoffrey Garen.
2058 Speedup the lexer to offset coming re-parsing patch.
2060 - .6% progression on Sunspider.
2062 * bytecompiler/SegmentedVector.h:
2063 (JSC::SegmentedVector::shrink): Fixed bug where m_size would not be
2064 set when shrinking to 0.
2067 (JSC::Lexer::Lexer):
2068 (JSC::Lexer::isIdentStart): Use isASCIIAlpha and isASCII to avoid going into ICU in the common cases.
2069 (JSC::Lexer::isIdentPart): Use isASCIIAlphanumeric and isASCII to avoid going into ICU in the common cases
2070 (JSC::isDecimalDigit): Use version in ASCIICType.h. Inlining it was a regression.
2071 (JSC::Lexer::isHexDigit): Ditto.
2072 (JSC::Lexer::isOctalDigit): Ditto.
2073 (JSC::Lexer::clear): Resize the m_identifiers SegmentedVector to initial
2075 * parser/Lexer.h: Remove unused m_strings vector. Make m_identifiers
2076 a SegmentedVector<Identifier> to avoid allocating a new Identifier* for
2077 each identifier found. The SegmentedVector is need so we can passes
2078 references to the Identifier to the parser, which remain valid even when
2079 the vector is resized.
2080 (JSC::Lexer::makeIdentifier): Inline and return a reference to the added
2083 2008-11-20 Sam Weinig <sam@webkit.org>
2085 Reviewed by Darin Adler.
2087 Add isASCII to ASCIICType. Use coming soon!
2092 2008-11-20 Sam Weinig <sam@webkit.org>
2094 Reviewed by Darin Adler.
2096 Add OwnPtr constructor and OwnPtr::adopt that take an auto_ptr.
2099 (WTF::OwnPtr::OwnPtr):
2100 (WTF::OwnPtr::adopt):
2102 2008-11-20 Alexey Proskuryakov <ap@webkit.org>
2104 Reviewed by Darin Adler.
2106 https://bugs.webkit.org/show_bug.cgi?id=22364
2107 Crashes seen on Tiger buildbots due to worker threads exhausting pthread keys
2109 * runtime/Collector.cpp:
2111 (JSC::Heap::destroy):
2112 (JSC::Heap::makeUsableFromMultipleThreads):
2113 (JSC::Heap::registerThread):
2114 * runtime/Collector.h:
2115 Pthread key for tracking threads is only created on request now, because this is a limited
2116 resource, and thread tracking is not needed for worker heaps, or for WebCore heap.
2118 * API/JSContextRef.cpp: (JSGlobalContextCreateInGroup): Call makeUsableFromMultipleThreads().
2120 * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::sharedInstance): Ditto.
2122 * runtime/JSGlobalData.h: (JSC::JSGlobalData::makeUsableFromMultipleThreads): Just forward
2123 the call to Heap, which clients need not know about, ideally.
2125 2008-11-20 Geoffrey Garen <ggaren@apple.com>
2127 Reviewed by Sam Weinig.
2129 A little more WREC refactoring.
2131 Removed the "Register" suffix from register names in WREC, and renamed:
2132 currentPosition => index
2133 currentValue => character
2134 quantifierCount => repeatCount
2136 Added a top-level parsePattern function to the WREC parser, which
2137 allowed me to remove the error() and atEndOfPattern() accessors.
2139 Factored out an MSVC customization into a constant.
2141 Renamed nextLabel => beginPattern.
2144 (JSC::WREC::compileRegExp):
2145 * wrec/WRECGenerator.cpp:
2146 (JSC::WREC::Generator::generateBacktrack1):
2147 (JSC::WREC::Generator::generateBacktrackBackreference):
2148 (JSC::WREC::Generator::generateBackreferenceQuantifier):
2149 (JSC::WREC::Generator::generateNonGreedyQuantifier):
2150 (JSC::WREC::Generator::generateGreedyQuantifier):
2151 (JSC::WREC::Generator::generatePatternCharacter):
2152 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
2153 (JSC::WREC::Generator::generateCharacterClassInverted):
2154 (JSC::WREC::Generator::generateCharacterClass):
2155 (JSC::WREC::Generator::generateParentheses):
2156 (JSC::WREC::Generator::generateParenthesesResetTrampoline):
2157 (JSC::WREC::Generator::generateAssertionBOL):
2158 (JSC::WREC::Generator::generateAssertionEOL):
2159 (JSC::WREC::Generator::generateAssertionWordBoundary):
2160 (JSC::WREC::Generator::generateBackreference):
2161 (JSC::WREC::Generator::generateDisjunction):
2162 (JSC::WREC::Generator::terminateDisjunction):
2163 * wrec/WRECGenerator.h:
2164 * wrec/WRECParser.h:
2165 (JSC::WREC::Parser::parsePattern):
2167 2008-11-19 Geoffrey Garen <ggaren@apple.com>
2169 Reviewed by Darin Adler.
2171 https://bugs.webkit.org/show_bug.cgi?id=22361
2172 A little more RegExp refactoring.
2174 Consistently named variables holding the starting position at which
2175 regexp matching should begin to "startOffset".
2177 A few more "regExpObject" => "regExpConstructor" changes.
2179 Refactored RegExpObject::match for clarity, and replaced a slow "get"
2180 of the "global" property with a fast access to the global bit.
2182 Made the error message you see when RegExpObject::match has no input a
2183 little more informative, as in Firefox.
2185 * runtime/RegExp.cpp:
2186 (JSC::RegExp::match):
2188 * runtime/RegExpObject.cpp:
2189 (JSC::RegExpObject::match):
2190 * runtime/StringPrototype.cpp:
2191 (JSC::stringProtoFuncReplace):
2192 (JSC::stringProtoFuncMatch):
2193 (JSC::stringProtoFuncSearch):
2195 2008-11-19 Geoffrey Garen <ggaren@apple.com>
2197 Reviewed by Sam Weinig.
2199 A little more refactoring.
2201 Removed the "emit" and "emitUnlinked" prefixes from the assembler.
2203 Moved the JmpSrc and JmpDst class definitions to the top of the X86
2204 assembler class, in accordance with WebKit style guidelines.
2206 * assembler/X86Assembler.h:
2207 (JSC::X86Assembler::JmpSrc::JmpSrc):
2208 (JSC::X86Assembler::JmpDst::JmpDst):
2209 (JSC::X86Assembler::int3):
2210 (JSC::X86Assembler::pushl_m):
2211 (JSC::X86Assembler::popl_m):
2212 (JSC::X86Assembler::movl_rr):
2213 (JSC::X86Assembler::addl_rr):
2214 (JSC::X86Assembler::addl_i8r):
2215 (JSC::X86Assembler::addl_i8m):
2216 (JSC::X86Assembler::addl_i32r):
2217 (JSC::X86Assembler::addl_mr):
2218 (JSC::X86Assembler::andl_rr):
2219 (JSC::X86Assembler::andl_i32r):
2220 (JSC::X86Assembler::cmpl_i8r):
2221 (JSC::X86Assembler::cmpl_rr):
2222 (JSC::X86Assembler::cmpl_rm):
2223 (JSC::X86Assembler::cmpl_mr):
2224 (JSC::X86Assembler::cmpl_i32r):
2225 (JSC::X86Assembler::cmpl_i32m):
2226 (JSC::X86Assembler::cmpl_i8m):
2227 (JSC::X86Assembler::cmpw_rm):
2228 (JSC::X86Assembler::orl_rr):
2229 (JSC::X86Assembler::orl_mr):
2230 (JSC::X86Assembler::orl_i32r):
2231 (JSC::X86Assembler::subl_rr):
2232 (JSC::X86Assembler::subl_i8r):
2233 (JSC::X86Assembler::subl_i8m):
2234 (JSC::X86Assembler::subl_i32r):
2235 (JSC::X86Assembler::subl_mr):
2236 (JSC::X86Assembler::testl_i32r):
2237 (JSC::X86Assembler::testl_i32m):
2238 (JSC::X86Assembler::testl_rr):
2239 (JSC::X86Assembler::xorl_i8r):
2240 (JSC::X86Assembler::xorl_rr):
2241 (JSC::X86Assembler::sarl_i8r):
2242 (JSC::X86Assembler::sarl_CLr):
2243 (JSC::X86Assembler::shl_i8r):
2244 (JSC::X86Assembler::shll_CLr):
2245 (JSC::X86Assembler::imull_rr):
2246 (JSC::X86Assembler::imull_i32r):
2247 (JSC::X86Assembler::idivl_r):
2248 (JSC::X86Assembler::negl_r):
2249 (JSC::X86Assembler::movl_mr):
2250 (JSC::X86Assembler::movzbl_rr):
2251 (JSC::X86Assembler::movzwl_mr):
2252 (JSC::X86Assembler::movl_rm):
2253 (JSC::X86Assembler::movl_i32r):
2254 (JSC::X86Assembler::movl_i32m):
2255 (JSC::X86Assembler::leal_mr):
2256 (JSC::X86Assembler::jmp_r):
2257 (JSC::X86Assembler::jmp_m):
2258 (JSC::X86Assembler::movsd_mr):
2259 (JSC::X86Assembler::xorpd_mr):
2260 (JSC::X86Assembler::movsd_rm):
2261 (JSC::X86Assembler::movd_rr):
2262 (JSC::X86Assembler::cvtsi2sd_rr):
2263 (JSC::X86Assembler::cvttsd2si_rr):
2264 (JSC::X86Assembler::addsd_mr):
2265 (JSC::X86Assembler::subsd_mr):
2266 (JSC::X86Assembler::mulsd_mr):
2267 (JSC::X86Assembler::addsd_rr):
2268 (JSC::X86Assembler::subsd_rr):
2269 (JSC::X86Assembler::mulsd_rr):
2270 (JSC::X86Assembler::ucomis_rr):
2271 (JSC::X86Assembler::pextrw_irr):
2272 (JSC::X86Assembler::call):
2273 (JSC::X86Assembler::jmp):
2274 (JSC::X86Assembler::jne):
2275 (JSC::X86Assembler::jnz):
2276 (JSC::X86Assembler::je):
2277 (JSC::X86Assembler::jl):
2278 (JSC::X86Assembler::jb):
2279 (JSC::X86Assembler::jle):
2280 (JSC::X86Assembler::jbe):
2281 (JSC::X86Assembler::jge):
2282 (JSC::X86Assembler::jg):
2283 (JSC::X86Assembler::ja):
2284 (JSC::X86Assembler::jae):
2285 (JSC::X86Assembler::jo):
2286 (JSC::X86Assembler::jp):
2287 (JSC::X86Assembler::js):
2288 (JSC::X86Assembler::predictNotTaken):
2289 (JSC::X86Assembler::convertToFastCall):
2290 (JSC::X86Assembler::restoreArgumentReference):
2291 (JSC::X86Assembler::restoreArgumentReferenceForTrampoline):
2292 (JSC::X86Assembler::modRm_rr):
2293 (JSC::X86Assembler::modRm_rr_Unchecked):
2294 (JSC::X86Assembler::modRm_rm):
2295 (JSC::X86Assembler::modRm_rm_Unchecked):
2296 (JSC::X86Assembler::modRm_rmsib):
2297 (JSC::X86Assembler::modRm_opr):
2298 (JSC::X86Assembler::modRm_opr_Unchecked):
2299 (JSC::X86Assembler::modRm_opm):
2300 (JSC::X86Assembler::modRm_opm_Unchecked):
2301 (JSC::X86Assembler::modRm_opmsib):
2303 (JSC::JIT::emitNakedCall):
2304 (JSC::JIT::emitNakedFastCall):
2305 (JSC::JIT::emitCTICall):
2306 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
2307 (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
2308 (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
2309 (JSC::JIT::emitFastArithIntToImmOrSlowCase):
2310 (JSC::JIT::emitArithIntToImmWithJump):
2311 (JSC::JIT::compileOpCall):
2312 (JSC::JIT::compileOpStrictEq):
2313 (JSC::JIT::emitSlowScriptCheck):
2314 (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate):
2315 (JSC::JIT::compileBinaryArithOp):
2316 (JSC::JIT::privateCompileMainPass):
2317 (JSC::JIT::privateCompileSlowCases):
2318 (JSC::JIT::privateCompile):
2319 (JSC::JIT::privateCompileGetByIdSelf):
2320 (JSC::JIT::privateCompileGetByIdProto):
2321 (JSC::JIT::privateCompileGetByIdChain):
2322 (JSC::JIT::privateCompilePutByIdReplace):
2323 (JSC::JIT::privateCompilePutByIdTransition):
2324 (JSC::JIT::privateCompileCTIMachineTrampolines):
2325 (JSC::JIT::privateCompilePatchGetArrayLength):
2327 (JSC::WREC::compileRegExp):
2328 * wrec/WRECGenerator.cpp:
2329 (JSC::WREC::Generator::generateBackreferenceQuantifier):
2330 (JSC::WREC::Generator::generateNonGreedyQuantifier):
2331 (JSC::WREC::Generator::generateGreedyQuantifier):
2332 (JSC::WREC::Generator::generatePatternCharacter):
2333 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
2334 (JSC::WREC::Generator::generateCharacterClassInverted):
2335 (JSC::WREC::Generator::generateCharacterClass):
2336 (JSC::WREC::Generator::generateParentheses):
2337 (JSC::WREC::Generator::generateParenthesesNonGreedy):
2338 (JSC::WREC::Generator::generateParenthesesResetTrampoline):
2339 (JSC::WREC::Generator::generateAssertionBOL):
2340 (JSC::WREC::Generator::generateAssertionEOL):
2341 (JSC::WREC::Generator::generateAssertionWordBoundary):
2342 (JSC::WREC::Generator::generateBackreference):
2343 (JSC::WREC::Generator::generateDisjunction):
2345 2008-11-19 Simon Hausmann <hausmann@webkit.org>
2347 Sun CC build fix, removed trailing comman for last enum value.
2349 * wtf/unicode/qt4/UnicodeQt4.h:
2352 2008-11-19 Mark Rowe <mrowe@apple.com>
2354 Reviewed by Alexey Proskuryakov.
2356 Expand the workaround for Apple GCC compiler bug <rdar://problem/6354696> to all versions of GCC 4.0.1.
2357 It has been observed with builds 5465 (Xcode 3.0) and 5484 (Xcode 3.1), and there is no evidence
2358 that it has been fixed in newer builds of GCC 4.0.1.
2360 This addresses <https://bugs.webkit.org/show_bug.cgi?id=22351> (WebKit nightly crashes on launch on 10.4.11).
2362 * wtf/StdLibExtras.h:
2364 2008-11-18 Cameron Zwarich <zwarich@apple.com>
2366 Reviewed by Maciej Stachowiak and Geoff Garen.
2368 Bug 22287: ASSERTION FAILED: Not enough jumps linked in slow case codegen in CTI::privateCompileSlowCases())
2369 <https://bugs.webkit.org/show_bug.cgi?id=22287>
2371 Fix a typo in the number cell reuse code where the first and second
2372 operands are sometimes confused.
2375 (JSC::JIT::compileBinaryArithOpSlowCase):
2377 2008-11-18 Dan Bernstein <mitz@apple.com>
2379 - try to fix the Windows build
2381 * interpreter/Interpreter.cpp:
2382 (JSC::Interpreter::privateExecute):
2384 2008-11-18 Geoffrey Garen <ggaren@apple.com>
2386 Reviewed by Sam Weinig.
2388 Minor RegExp cleanup.
2390 SunSpider says no change.
2392 * runtime/RegExpObject.cpp:
2393 (JSC::RegExpObject::match): Renamed "regExpObj" to "regExpConstructor".
2396 (JSC::WREC::compileRegExp): Instead of checking for a NULL output vector,
2397 ASSERT that the output vector is not NULL. (The rest of WREC is not
2398 safe to use with a NULL output vector, and we probably don't want to
2399 spend the time and/or performance to make it safe.)
2401 2008-11-18 Geoffrey Garen <ggaren@apple.com>
2403 Reviewed by Darin Adler.
2405 A little more renaming and refactoring.
2407 VM_CHECK_EXCEPTION() => CHECK_FOR_EXCEPTION().
2408 NEXT_INSTRUCTION => NEXT_INSTRUCTION().
2410 Removed the "Error_" and "TempError_" prefixes from WREC error types.
2412 Refactored the WREC parser so it doesn't need a "setError" function,
2413 and changed "isEndOfPattern" and its use -- they read kind of backwards
2416 Changed our "TODO:" error messages at least to say something, since you
2417 can't say "TODO:" in shipping software.
2419 * interpreter/Interpreter.cpp:
2420 (JSC::Interpreter::privateExecute):
2421 (JSC::Interpreter::cti_op_convert_this):
2422 (JSC::Interpreter::cti_op_add):
2423 (JSC::Interpreter::cti_op_pre_inc):
2424 (JSC::Interpreter::cti_op_loop_if_less):
2425 (JSC::Interpreter::cti_op_loop_if_lesseq):
2426 (JSC::Interpreter::cti_op_put_by_id):
2427 (JSC::Interpreter::cti_op_put_by_id_second):
2428 (JSC::Interpreter::cti_op_put_by_id_generic):
2429 (JSC::Interpreter::cti_op_put_by_id_fail):
2430 (JSC::Interpreter::cti_op_get_by_id):
2431 (JSC::Interpreter::cti_op_get_by_id_second):
2432 (JSC::Interpreter::cti_op_get_by_id_generic):
2433 (JSC::Interpreter::cti_op_get_by_id_fail):
2434 (JSC::Interpreter::cti_op_instanceof):
2435 (JSC::Interpreter::cti_op_del_by_id):
2436 (JSC::Interpreter::cti_op_mul):
2437 (JSC::Interpreter::cti_op_call_NotJSFunction):
2438 (JSC::Interpreter::cti_op_resolve):
2439 (JSC::Interpreter::cti_op_construct_NotJSConstruct):
2440 (JSC::Interpreter::cti_op_get_by_val):
2441 (JSC::Interpreter::cti_op_resolve_func):
2442 (JSC::Interpreter::cti_op_sub):
2443 (JSC::Interpreter::cti_op_put_by_val):
2444 (JSC::Interpreter::cti_op_put_by_val_array):
2445 (JSC::Interpreter::cti_op_lesseq):
2446 (JSC::Interpreter::cti_op_loop_if_true):
2447 (JSC::Interpreter::cti_op_negate):
2448 (JSC::Interpreter::cti_op_resolve_skip):
2449 (JSC::Interpreter::cti_op_resolve_global):
2450 (JSC::Interpreter::cti_op_div):
2451 (JSC::Interpreter::cti_op_pre_dec):
2452 (JSC::Interpreter::cti_op_jless):
2453 (JSC::Interpreter::cti_op_not):
2454 (JSC::Interpreter::cti_op_jtrue):
2455 (JSC::Interpreter::cti_op_post_inc):
2456 (JSC::Interpreter::cti_op_eq):
2457 (JSC::Interpreter::cti_op_lshift):
2458 (JSC::Interpreter::cti_op_bitand):
2459 (JSC::Interpreter::cti_op_rshift):
2460 (JSC::Interpreter::cti_op_bitnot):
2461 (JSC::Interpreter::cti_op_resolve_with_base):
2462 (JSC::Interpreter::cti_op_mod):
2463 (JSC::Interpreter::cti_op_less):
2464 (JSC::Interpreter::cti_op_neq):
2465 (JSC::Interpreter::cti_op_post_dec):
2466 (JSC::Interpreter::cti_op_urshift):
2467 (JSC::Interpreter::cti_op_bitxor):
2468 (JSC::Interpreter::cti_op_bitor):
2469 (JSC::Interpreter::cti_op_push_scope):
2470 (JSC::Interpreter::cti_op_to_jsnumber):
2471 (JSC::Interpreter::cti_op_in):
2472 (JSC::Interpreter::cti_op_del_by_val):
2474 (JSC::WREC::compileRegExp):
2475 * wrec/WRECParser.cpp:
2476 (JSC::WREC::Parser::parseGreedyQuantifier):
2477 (JSC::WREC::Parser::parseParentheses):
2478 (JSC::WREC::Parser::parseCharacterClass):
2479 (JSC::WREC::Parser::parseEscape):
2480 * wrec/WRECParser.h:
2481 (JSC::WREC::Parser::):
2482 (JSC::WREC::Parser::atEndOfPattern):
2484 2008-11-18 Alexey Proskuryakov <ap@webkit.org>
2486 Reviewed by Darin Adler.
2488 https://bugs.webkit.org/show_bug.cgi?id=22337
2489 Enable workers by default
2491 * Configurations/JavaScriptCore.xcconfig: Define ENABLE_WORKERS.
2493 2008-11-18 Alexey Proskuryakov <ap@webkit.org>
2497 * wrec/WRECFunctors.h:
2498 * wrec/WRECGenerator.h:
2499 * wrec/WRECParser.h:
2500 CharacterClass is a struct, not a class, fix forward declarations.
2502 2008-11-18 Dan Bernstein <mitz@apple.com>
2506 * assembler/X86Assembler.h:
2508 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2512 Try to fix gtk build.
2514 * wrec/Quantifier.h:
2516 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2520 Try to fix gtk build.
2522 * assembler/AssemblerBuffer.h:
2524 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2526 Reviewed by Sam Weinig.
2528 Split WREC classes out into individual files, with a few modifications
2529 to more closely match the WebKit coding style.
2532 * JavaScriptCore.scons:
2533 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2534 * JavaScriptCore.xcodeproj/project.pbxproj:
2535 * assembler/X86Assembler.h:
2536 * runtime/RegExp.cpp:
2537 * wrec/CharacterClass.cpp: Copied from wrec/CharacterClassConstructor.cpp.
2538 (JSC::WREC::CharacterClass::newline):
2539 (JSC::WREC::CharacterClass::digits):
2540 (JSC::WREC::CharacterClass::spaces):
2541 (JSC::WREC::CharacterClass::wordchar):
2542 (JSC::WREC::CharacterClass::nondigits):
2543 (JSC::WREC::CharacterClass::nonspaces):
2544 (JSC::WREC::CharacterClass::nonwordchar):
2545 * wrec/CharacterClass.h: Copied from wrec/CharacterClassConstructor.h.
2546 * wrec/CharacterClassConstructor.cpp:
2547 (JSC::WREC::CharacterClassConstructor::addSortedRange):
2548 (JSC::WREC::CharacterClassConstructor::append):
2549 * wrec/CharacterClassConstructor.h:
2550 * wrec/Quantifier.h: Copied from wrec/WREC.h.
2552 (JSC::WREC::compileRegExp):
2554 * wrec/WRECFunctors.cpp: Copied from wrec/WREC.cpp.
2555 * wrec/WRECFunctors.h: Copied from wrec/WREC.cpp.
2556 (JSC::WREC::GenerateAtomFunctor::~GenerateAtomFunctor):
2557 (JSC::WREC::GeneratePatternCharacterFunctor::GeneratePatternCharacterFunctor):
2558 (JSC::WREC::GenerateCharacterClassFunctor::GenerateCharacterClassFunctor):
2559 (JSC::WREC::GenerateBackreferenceFunctor::GenerateBackreferenceFunctor):
2560 (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor):
2561 * wrec/WRECGenerator.cpp: Copied from wrec/WREC.cpp.
2562 (JSC::WREC::Generator::generatePatternCharacter):
2563 (JSC::WREC::Generator::generateCharacterClassInvertedRange):
2564 (JSC::WREC::Generator::generateCharacterClassInverted):
2565 (JSC::WREC::Generator::generateCharacterClass):
2566 (JSC::WREC::Generator::generateParentheses):
2567 (JSC::WREC::Generator::generateAssertionBOL):
2568 (JSC::WREC::Generator::generateAssertionEOL):
2569 (JSC::WREC::Generator::generateAssertionWordBoundary):
2570 * wrec/WRECGenerator.h: Copied from wrec/WREC.h.
2571 * wrec/WRECParser.cpp: Copied from wrec/WREC.cpp.
2572 (JSC::WREC::Parser::parseGreedyQuantifier):
2573 (JSC::WREC::Parser::parseCharacterClassQuantifier):
2574 (JSC::WREC::Parser::parseParentheses):
2575 (JSC::WREC::Parser::parseCharacterClass):
2576 (JSC::WREC::Parser::parseEscape):
2577 (JSC::WREC::Parser::parseTerm):
2578 * wrec/WRECParser.h: Copied from wrec/WREC.h.
2579 (JSC::WREC::Parser::):
2580 (JSC::WREC::Parser::Parser):
2581 (JSC::WREC::Parser::setError):
2582 (JSC::WREC::Parser::error):
2583 (JSC::WREC::Parser::recordSubpattern):
2584 (JSC::WREC::Parser::numSubpatterns):
2585 (JSC::WREC::Parser::ignoreCase):
2586 (JSC::WREC::Parser::multiline):
2588 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2592 Try to fix a few builds.
2594 * JavaScriptCoreSources.bkl:
2596 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2600 Try to fix a few builds.
2602 * JavaScriptCore.pri:
2603 * JavaScriptCore.scons:
2604 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2606 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2608 Reviewed by Sam Weinig.
2610 Moved VM/CTI.* => jit/JIT.*.
2615 * JavaScriptCore.pri:
2616 * JavaScriptCore.scons:
2617 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2618 * JavaScriptCore.xcodeproj/project.pbxproj:
2619 * VM/CTI.cpp: Removed.
2620 * VM/CTI.h: Removed.
2621 * bytecode/CodeBlock.cpp:
2622 * interpreter/Interpreter.cpp:
2624 * jit/JIT.cpp: Copied from VM/CTI.cpp.
2625 * jit/JIT.h: Copied from VM/CTI.h.
2626 * runtime/RegExp.cpp:
2628 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2630 Reviewed by Sam Weinig.
2632 Moved runtime/ExecState.* => interpreter/CallFrame.*.
2635 * API/OpaqueJSString.cpp:
2637 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2638 * JavaScriptCore.xcodeproj/project.pbxproj:
2639 * debugger/DebuggerCallFrame.h:
2640 * interpreter/CallFrame.cpp: Copied from runtime/ExecState.cpp.
2641 * interpreter/CallFrame.h: Copied from runtime/ExecState.h.
2642 * interpreter/Interpreter.cpp:
2644 * profiler/ProfileGenerator.cpp:
2645 * profiler/Profiler.cpp:
2646 * runtime/ClassInfo.h:
2647 * runtime/Collector.cpp:
2648 * runtime/Completion.cpp:
2649 * runtime/ExceptionHelpers.cpp:
2650 * runtime/ExecState.cpp: Removed.
2651 * runtime/ExecState.h: Removed.
2652 * runtime/Identifier.cpp:
2653 * runtime/JSFunction.cpp:
2654 * runtime/JSGlobalObjectFunctions.cpp:
2655 * runtime/JSLock.cpp:
2656 * runtime/JSNumberCell.h:
2657 * runtime/JSObject.h:
2658 * runtime/JSString.h:
2660 * runtime/PropertyNameArray.h:
2662 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2666 Try to fix Windows build.
2670 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2674 Try to fix Windows build.
2677 * runtime/ExecState.h:
2679 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2681 Reviewed by Sam Weinig.
2683 Moved VM/SamplingTool.* => bytecode/SamplingTool.*.
2686 * JavaScriptCore.pri:
2687 * JavaScriptCore.scons:
2688 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2689 * JavaScriptCore.xcodeproj/project.pbxproj:
2690 * JavaScriptCoreSources.bkl:
2691 * VM/SamplingTool.cpp: Removed.
2692 * VM/SamplingTool.h: Removed.
2693 * bytecode/SamplingTool.cpp: Copied from VM/SamplingTool.cpp.
2694 * bytecode/SamplingTool.h: Copied from VM/SamplingTool.h.
2698 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2702 Try to fix Windows build.
2704 * runtime/ExecState.h:
2706 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2708 Reviewed by Sam Weinig.
2710 Moved VM/ExceptionHelpers.cpp => runtime/ExceptionHelpers.cpp.
2713 * JavaScriptCore.pri:
2714 * JavaScriptCore.scons:
2715 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2716 * JavaScriptCore.xcodeproj/project.pbxproj:
2717 * JavaScriptCoreSources.bkl:
2718 * VM/ExceptionHelpers.cpp: Removed.
2719 * runtime/ExceptionHelpers.cpp: Copied from VM/ExceptionHelpers.cpp.
2721 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2723 Reviewed by Sam Weinig.
2725 Moved VM/RegisterFile.cpp => interpreter/RegisterFile.cpp.
2729 * JavaScriptCore.pri:
2730 * JavaScriptCore.scons:
2731 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2732 * JavaScriptCore.xcodeproj/project.pbxproj:
2733 * JavaScriptCoreSources.bkl:
2734 * VM/RegisterFile.cpp: Removed.
2735 * interpreter/RegisterFile.cpp: Copied from VM/RegisterFile.cpp.
2737 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2741 Try to fix Windows build.
2743 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2745 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2749 Try to fix Windows build.
2751 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2753 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2757 Try to fix Windows build.
2759 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2761 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2763 Reviewed by Sam Weinig.
2766 VM/ExceptionHelpers.h => runtime/ExceptionHelpers.h
2767 VM/Register.h => interpreter/Register.h
2768 VM/RegisterFile.h => interpreter/RegisterFile.h
2772 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2773 * JavaScriptCore.xcodeproj/project.pbxproj:
2774 * VM/ExceptionHelpers.h: Removed.
2775 * VM/Register.h: Removed.
2776 * VM/RegisterFile.h: Removed.
2777 * interpreter/Register.h: Copied from VM/Register.h.
2778 * interpreter/RegisterFile.h: Copied from VM/RegisterFile.h.
2779 * runtime/ExceptionHelpers.h: Copied from VM/ExceptionHelpers.h.
2781 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2785 Try to fix Qt build.
2787 * JavaScriptCore.pri:
2789 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2791 Reviewed by Sam Weinig.
2793 Moved VM/Machine.cpp => interpreter/Interpreter.cpp.
2795 * DerivedSources.make:
2797 * JavaScriptCore.pri:
2798 * JavaScriptCore.scons:
2799 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2800 * JavaScriptCore.xcodeproj/project.pbxproj:
2801 * JavaScriptCoreSources.bkl:
2802 * VM/Machine.cpp: Removed.
2803 * interpreter/Interpreter.cpp: Copied from VM/Machine.cpp.
2805 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2807 Reviewed by Sam Weinig.
2809 Moved VM/Machine.h => interpreter/Interpreter.h
2812 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2813 * JavaScriptCore.xcodeproj/project.pbxproj:
2816 * VM/ExceptionHelpers.cpp:
2818 * VM/Machine.h: Removed.
2819 * VM/SamplingTool.cpp:
2820 * bytecode/CodeBlock.cpp:
2821 * bytecompiler/BytecodeGenerator.cpp:
2822 * bytecompiler/BytecodeGenerator.h:
2823 * debugger/DebuggerCallFrame.cpp:
2824 * interpreter: Added.
2825 * interpreter/Interpreter.h: Copied from VM/Machine.h.
2826 * profiler/ProfileGenerator.cpp:
2827 * runtime/Arguments.h:
2828 * runtime/ArrayPrototype.cpp:
2829 * runtime/Collector.cpp:
2830 * runtime/Completion.cpp:
2831 * runtime/ExecState.h:
2832 * runtime/FunctionPrototype.cpp:
2833 * runtime/JSActivation.cpp:
2834 * runtime/JSFunction.cpp:
2835 * runtime/JSGlobalData.cpp:
2836 * runtime/JSGlobalObject.cpp:
2837 * runtime/JSGlobalObjectFunctions.cpp:
2840 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2842 Reviewed by Sam Weinig.
2844 Moved runtime/Interpreter.cpp => runtime/Completion.cpp.
2846 Moved functions from Interpreter.h to Completion.h, and removed
2847 Interpreter.h from the project.
2852 * JavaScriptCore.pri:
2853 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2854 * JavaScriptCore.xcodeproj/project.pbxproj:
2855 * JavaScriptCoreSources.bkl:
2857 * runtime/Completion.cpp: Copied from runtime/Interpreter.cpp.
2858 * runtime/Completion.h:
2859 * runtime/Interpreter.cpp: Removed.
2860 * runtime/Interpreter.h: Removed.
2862 2008-11-17 Gabor Loki <loki@inf.u-szeged.hu>
2864 Reviewed by Darin Adler.
2866 <https://bugs.webkit.org/show_bug.cgi?id=22312>
2867 Fix PCRE include path problem on Qt-port
2869 * JavaScriptCore.pri:
2872 2008-11-17 Gabor Loki <loki@inf.u-szeged.hu>
2874 Reviewed by Darin Adler.
2876 <https://bugs.webkit.org/show_bug.cgi?id=22313>
2877 Add missing CTI source to the build system on Qt-port
2879 * JavaScriptCore.pri:
2881 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2885 Try to fix JSGlue build.
2887 * JavaScriptCore.xcodeproj/project.pbxproj:
2889 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2893 Try to fix Qt build.
2897 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2901 Try to fix Qt build.
2903 * JavaScriptCore.pri:
2905 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2909 Try to fix Qt build.
2911 * JavaScriptCore.pri:
2913 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2915 Reviewed by Sam Weinig.
2919 VM/CodeBlock.* => bytecode/CodeBlock.*
2920 VM/EvalCodeCache.h => bytecode/EvalCodeCache.h
2921 VM/Instruction.h => bytecode/Instruction.h
2922 VM/Opcode.* => bytecode/Opcode.*
2925 * JavaScriptCore.scons:
2926 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2927 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2928 * JavaScriptCore.xcodeproj/project.pbxproj:
2929 * JavaScriptCoreSources.bkl:
2930 * VM/CodeBlock.cpp: Removed.
2931 * VM/CodeBlock.h: Removed.
2932 * VM/EvalCodeCache.h: Removed.
2933 * VM/Instruction.h: Removed.
2934 * VM/Opcode.cpp: Removed.
2935 * VM/Opcode.h: Removed.
2937 * bytecode/CodeBlock.cpp: Copied from VM/CodeBlock.cpp.
2938 * bytecode/CodeBlock.h: Copied from VM/CodeBlock.h.
2939 * bytecode/EvalCodeCache.h: Copied from VM/EvalCodeCache.h.
2940 * bytecode/Instruction.h: Copied from VM/Instruction.h.
2941 * bytecode/Opcode.cpp: Copied from VM/Opcode.cpp.
2942 * bytecode/Opcode.h: Copied from VM/Opcode.h.
2946 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2950 Try to fix a few more builds.
2953 * JavaScriptCore.pri:
2954 * JavaScriptCore.scons:
2955 * JavaScriptCoreSources.bkl:
2957 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2961 Try to fix gtk build.
2965 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2969 Try to fix Windows build.
2971 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2973 2008-11-17 Geoffrey Garen <ggaren@apple.com>
2975 Reviewed by Sam Weinig.
2979 VM/LabelID.h => bytecompiler/Label.h
2980 VM/RegisterID.h => bytecompiler/RegisterID.h
2981 VM/SegmentedVector.h => bytecompiler/SegmentedVector.h
2982 bytecompiler/CodeGenerator.* => bytecompiler/BytecodeGenerator.*
2985 * JavaScriptCore.xcodeproj/project.pbxproj:
2986 * VM/LabelID.h: Removed.
2987 * VM/RegisterID.h: Removed.
2988 * VM/SegmentedVector.h: Removed.
2989 * bytecompiler/BytecodeGenerator.cpp: Copied from bytecompiler/CodeGenerator.cpp.
2990 * bytecompiler/BytecodeGenerator.h: Copied from bytecompiler/CodeGenerator.h.
2991 * bytecompiler/CodeGenerator.cpp: Removed.
2992 * bytecompiler/CodeGenerator.h: Removed.
2993 * bytecompiler/Label.h: Copied from VM/LabelID.h.
2994 * bytecompiler/LabelScope.h:
2995 * bytecompiler/RegisterID.h: Copied from VM/RegisterID.h.
2996 * bytecompiler/SegmentedVector.h: Copied from VM/SegmentedVector.h.
3000 2008-11-17 Geoffrey Garen <ggaren@apple.com>
3004 Try to fix Windows build.
3006 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3008 2008-11-17 Geoffrey Garen <ggaren@apple.com>
3012 Try to fix Windows build.
3014 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3016 2008-11-17 Geoffrey Garen <ggaren@apple.com>
3020 Try to fix Windows build.
3022 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3024 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3028 Try to fix Windows build.
3030 * JavaScriptCore.vcproj/jsc/jsc.vcproj:
3032 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3036 Try to fix Windows build.
3038 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3040 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3042 Reviewed by Sam Weinig.
3044 Moved masm => assembler and split "AssemblerBuffer.h" out of "X86Assembler.h".
3046 Also renamed ENABLE_MASM to ENABLE_ASSEMBLER.
3049 * JavaScriptCore.xcodeproj/project.pbxproj:
3051 * assembler/AssemblerBuffer.h: Copied from masm/X86Assembler.h.
3052 (JSC::AssemblerBuffer::AssemblerBuffer):
3053 (JSC::AssemblerBuffer::~AssemblerBuffer):
3054 (JSC::AssemblerBuffer::ensureSpace):
3055 (JSC::AssemblerBuffer::isAligned):
3056 (JSC::AssemblerBuffer::putByteUnchecked):
3057 (JSC::AssemblerBuffer::putByte):
3058 (JSC::AssemblerBuffer::putShortUnchecked):
3059 (JSC::AssemblerBuffer::putShort):
3060 (JSC::AssemblerBuffer::putIntUnchecked):
3061 (JSC::AssemblerBuffer::putInt):
3062 (JSC::AssemblerBuffer::data):
3063 (JSC::AssemblerBuffer::size):
3064 (JSC::AssemblerBuffer::reset):
3065 (JSC::AssemblerBuffer::executableCopy):
3066 (JSC::AssemblerBuffer::grow):
3067 * assembler/X86Assembler.h: Copied from masm/X86Assembler.h.
3069 * masm/X86Assembler.h: Removed.
3072 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3076 Try to fix gtk build.
3080 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3088 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3092 Try to fix windows build.
3096 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3100 Try to fix gtk build.
3104 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3106 Reviewed by Sam Weinig.
3108 Renamed ENABLE_CTI and ENABLE(CTI) to ENABLE_JIT and ENABLE(JIT).
3113 (JSC::CodeBlock::~CodeBlock):
3115 (JSC::CodeBlock::CodeBlock):
3117 (JSC::Interpreter::Interpreter):
3118 (JSC::Interpreter::initialize):
3119 (JSC::Interpreter::~Interpreter):
3120 (JSC::Interpreter::execute):
3121 (JSC::Interpreter::privateExecute):
3123 * bytecompiler/CodeGenerator.cpp:
3124 (JSC::prepareJumpTableForStringSwitch):
3125 * runtime/JSFunction.cpp:
3126 (JSC::JSFunction::~JSFunction):
3127 * runtime/JSGlobalData.h:
3130 * wtf/TCSystemAlloc.cpp:
3132 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3136 Try to fix gtk build.
3140 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3142 Reviewed by a few people on squirrelfish-dev.
3147 (JSC::JIT::killLastResultRegister):
3148 (JSC::JIT::emitGetVirtualRegister):
3149 (JSC::JIT::emitGetVirtualRegisters):
3150 (JSC::JIT::emitPutCTIArgFromVirtualRegister):
3151 (JSC::JIT::emitPutCTIArg):
3152 (JSC::JIT::emitGetCTIArg):
3153 (JSC::JIT::emitPutCTIArgConstant):
3154 (JSC::JIT::getConstantImmediateNumericArg):
3155 (JSC::JIT::emitPutCTIParam):
3156 (JSC::JIT::emitGetCTIParam):
3157 (JSC::JIT::emitPutToCallFrameHeader):
3158 (JSC::JIT::emitGetFromCallFrameHeader):
3159 (JSC::JIT::emitPutVirtualRegister):
3160 (JSC::JIT::emitInitRegister):
3161 (JSC::JIT::printBytecodeOperandTypes):
3162 (JSC::JIT::emitAllocateNumber):
3163 (JSC::JIT::emitNakedCall):
3164 (JSC::JIT::emitNakedFastCall):
3165 (JSC::JIT::emitCTICall):
3166 (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
3167 (JSC::JIT::linkSlowCaseIfNotJSCell):
3168 (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
3169 (JSC::JIT::emitJumpSlowCaseIfNotImmNums):
3170 (JSC::JIT::getDeTaggedConstantImmediate):
3171 (JSC::JIT::emitFastArithDeTagImmediate):
3172 (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
3173 (JSC::JIT::emitFastArithReTagImmediate):
3174 (JSC::JIT::emitFastArithPotentiallyReTagImmediate):
3175 (JSC::JIT::emitFastArithImmToInt):
3176 (JSC::JIT::emitFastArithIntToImmOrSlowCase):
3177 (JSC::JIT::emitFastArithIntToImmNoCheck):
3178 (JSC::JIT::emitArithIntToImmWithJump):
3179 (JSC::JIT::emitTagAsBoolImmediate):
3181 (JSC::JIT::compileOpCallInitializeCallFrame):
3182 (JSC::JIT::compileOpCallSetupArgs):
3183 (JSC::JIT::compileOpCallEvalSetupArgs):
3184 (JSC::JIT::compileOpConstructSetupArgs):
3185 (JSC::JIT::compileOpCall):
3186 (JSC::JIT::compileOpStrictEq):
3187 (JSC::JIT::emitSlowScriptCheck):
3188 (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate):
3189 (JSC::JIT::compileBinaryArithOp):
3190 (JSC::JIT::compileBinaryArithOpSlowCase):
3191 (JSC::JIT::privateCompileMainPass):
3192 (JSC::JIT::privateCompileLinkPass):
3193 (JSC::JIT::privateCompileSlowCases):
3194 (JSC::JIT::privateCompile):
3195 (JSC::JIT::privateCompileGetByIdSelf):
3196 (JSC::JIT::privateCompileGetByIdProto):
3197 (JSC::JIT::privateCompileGetByIdChain):
3198 (JSC::JIT::privateCompilePutByIdReplace):
3199 (JSC::JIT::privateCompilePutByIdTransition):
3200 (JSC::JIT::unlinkCall):
3201 (JSC::JIT::linkCall):
3202 (JSC::JIT::privateCompileCTIMachineTrampolines):
3203 (JSC::JIT::freeCTIMachineTrampolines):
3204 (JSC::JIT::patchGetByIdSelf):
3205 (JSC::JIT::patchPutByIdReplace):
3206 (JSC::JIT::privateCompilePatchGetArrayLength):
3207 (JSC::JIT::emitGetVariableObjectRegister):
3208 (JSC::JIT::emitPutVariableObjectRegister):
3210 (JSC::JIT::compile):
3211 (JSC::JIT::compileGetByIdSelf):
3212 (JSC::JIT::compileGetByIdProto):
3213 (JSC::JIT::compileGetByIdChain):
3214 (JSC::JIT::compilePutByIdReplace):
3215 (JSC::JIT::compilePutByIdTransition):
3216 (JSC::JIT::compileCTIMachineTrampolines):
3217 (JSC::JIT::compilePatchGetArrayLength):
3219 (JSC::CodeBlock::unlinkCallers):
3221 (JSC::Interpreter::initialize):
3222 (JSC::Interpreter::~Interpreter):
3223 (JSC::Interpreter::execute):
3224 (JSC::Interpreter::tryCTICachePutByID):
3225 (JSC::Interpreter::tryCTICacheGetByID):
3226 (JSC::Interpreter::cti_op_call_JSFunction):
3227 (JSC::Interpreter::cti_vm_dontLazyLinkCall):
3228 (JSC::Interpreter::cti_vm_lazyLinkCall):
3230 * VM/RegisterFile.h:
3232 * runtime/JSArray.h:
3234 * runtime/JSFunction.h:
3235 * runtime/JSImmediate.h:
3236 * runtime/JSNumberCell.h:
3237 * runtime/JSObject.h:
3238 * runtime/JSString.h:
3239 * runtime/JSVariableObject.h:
3240 * runtime/ScopeChain.h:
3241 * runtime/Structure.h:
3242 * runtime/TypeInfo.h:
3243 * runtime/UString.h:
3245 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3249 Try to fix wx build.
3253 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3255 Reviewed by Sam Weinig.
3257 Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs.
3260 (JSC::CTI::emitGetVirtualRegister):
3261 (JSC::CTI::emitGetVirtualRegisters):
3262 (JSC::CTI::emitPutCTIArgFromVirtualRegister):
3263 (JSC::CTI::emitPutCTIArg):
3264 (JSC::CTI::emitGetCTIArg):
3265 (JSC::CTI::emitPutCTIParam):
3266 (JSC::CTI::emitGetCTIParam):
3267 (JSC::CTI::emitPutToCallFrameHeader):
3268 (JSC::CTI::emitGetFromCallFrameHeader):
3269 (JSC::CTI::emitPutVirtualRegister):
3270 (JSC::CTI::emitNakedCall):
3271 (JSC::CTI::emitNakedFastCall):
3272 (JSC::CTI::emitCTICall):
3273 (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
3274 (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
3275 (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
3276 (JSC::CTI::emitFastArithDeTagImmediate):
3277 (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
3278 (JSC::CTI::emitFastArithReTagImmediate):
3279 (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
3280 (JSC::CTI::emitFastArithImmToInt):
3281 (JSC::CTI::emitFastArithIntToImmOrSlowCase):
3282 (JSC::CTI::emitFastArithIntToImmNoCheck):
3283 (JSC::CTI::emitArithIntToImmWithJump):
3284 (JSC::CTI::emitTagAsBoolImmediate):
3285 (JSC::CTI::compileOpCall):
3286 (JSC::CTI::compileOpStrictEq):
3287 (JSC::CTI::emitSlowScriptCheck):
3288 (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
3289 (JSC::CTI::compileBinaryArithOp):
3290 (JSC::CTI::compileBinaryArithOpSlowCase):
3291 (JSC::CTI::privateCompileMainPass):
3292 (JSC::CTI::privateCompileSlowCases):
3293 (JSC::CTI::privateCompile):
3294 (JSC::CTI::privateCompileGetByIdSelf):
3295 (JSC::CTI::privateCompileGetByIdProto):
3296 (JSC::CTI::privateCompileGetByIdChain):
3297 (JSC::CTI::privateCompilePutByIdReplace):
3298 (JSC::CTI::privateCompilePutByIdTransition):
3299 (JSC::CTI::privateCompileCTIMachineTrampolines):
3300 (JSC::CTI::privateCompilePatchGetArrayLength):
3301 (JSC::CTI::emitGetVariableObjectRegister):
3302 (JSC::CTI::emitPutVariableObjectRegister):
3304 (JSC::CallRecord::CallRecord):
3305 (JSC::JmpTable::JmpTable):
3306 (JSC::SlowCaseEntry::SlowCaseEntry):
3307 (JSC::CTI::JSRInfo::JSRInfo):
3310 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3314 Try to fix Qt build.
3316 * JavaScriptCore.pri:
3318 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3320 Reviewed by Sam Weinig.
3322 Renamed OBJECT_OFFSET => FIELD_OFFSET
3324 Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in
3328 (JSC::CTI::compileOpCallInitializeCallFrame):
3329 (JSC::CTI::compileOpCall):
3330 (JSC::CTI::emitSlowScriptCheck):
3331 (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
3332 (JSC::CTI::compileBinaryArithOp):
3333 (JSC::CTI::privateCompileMainPass):
3334 (JSC::CTI::privateCompileSlowCases):
3335 (JSC::CTI::privateCompile):
3336 (JSC::CTI::privateCompileGetByIdSelf):
3337 (JSC::CTI::privateCompileGetByIdProto):
3338 (JSC::CTI::privateCompileGetByIdChain):
3339 (JSC::CTI::privateCompilePutByIdReplace):
3340 (JSC::CTI::privateCompilePutByIdTransition):
3341 (JSC::CTI::privateCompileCTIMachineTrampolines):
3342 (JSC::CTI::privateCompilePatchGetArrayLength):
3343 (JSC::CTI::emitGetVariableObjectRegister):
3344 (JSC::CTI::emitPutVariableObjectRegister):
3345 * runtime/JSValue.h:
3346 * runtime/JSVariableObject.h:
3348 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3350 Reviewed by Sam Weinig.
3354 X86Assembler::copy => X86Assembler::executableCopy
3355 AssemblerBuffer::copy => AssemblerBuffer::executableCopy
3358 (JSC::CTI::privateCompile):
3359 (JSC::CTI::privateCompileGetByIdSelf):
3360 (JSC::CTI::privateCompileGetByIdProto):
3361 (JSC::CTI::privateCompileGetByIdChain):
3362 (JSC::CTI::privateCompilePutByIdReplace):
3363 (JSC::CTI::privateCompilePutByIdTransition):
3364 (JSC::CTI::privateCompileCTIMachineTrampolines):
3365 (JSC::CTI::privateCompilePatchGetArrayLength):
3366 * masm/X86Assembler.h:
3367 (JSC::AssemblerBuffer::executableCopy):
3368 (JSC::X86Assembler::executableCopy):
3370 (JSC::WREC::compileRegExp):
3372 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3374 Reviewed by Sam Weinig.
3376 Renamed WREC => JSC::WREC, removing JSC:: prefix in a lot of places.
3377 Renamed WRECFunction => WREC::CompiledRegExp, and deployed this type
3378 name in place of a few casts.
3380 * runtime/RegExp.cpp:
3381 (JSC::RegExp::RegExp):
3382 (JSC::RegExp::~RegExp):
3383 (JSC::RegExp::match):
3385 * wrec/CharacterClassConstructor.cpp:
3386 * wrec/CharacterClassConstructor.h:
3388 (JSC::WREC::compileRegExp):
3390 (JSC::WREC::Generator::Generator):
3391 (JSC::WREC::Parser::Parser):
3392 (JSC::WREC::Parser::parseAlternative):
3394 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3396 Reviewed by Sam Weinig.
3398 Renamed BytecodeInterpreter => Interpreter.
3400 * JavaScriptCore.exp:
3403 (JSC::CTI::compileOpCall):
3404 (JSC::CTI::emitSlowScriptCheck):
3405 (JSC::CTI::compileBinaryArithOpSlowCase):
3406 (JSC::CTI::privateCompileMainPass):
3407 (JSC::CTI::privateCompileSlowCases):
3408 (JSC::CTI::privateCompile):
3409 (JSC::CTI::privateCompileGetByIdSelf):
3410 (JSC::CTI::privateCompileGetByIdProto):
3411 (JSC::CTI::privateCompileGetByIdChain):
3412 (JSC::CTI::privateCompilePutByIdReplace):
3413 (JSC::CTI::privateCompilePutByIdTransition):
3414 (JSC::CTI::privateCompileCTIMachineTrampolines):
3415 (JSC::CTI::freeCTIMachineTrampolines):
3416 (JSC::CTI::patchGetByIdSelf):
3417 (JSC::CTI::patchPutByIdReplace):
3418 (JSC::CTI::privateCompilePatchGetArrayLength):
3421 (JSC::CodeBlock::printStructures):
3422 (JSC::CodeBlock::derefStructures):
3423 (JSC::CodeBlock::refStructures):
3427 (JSC::Interpreter::resolve):
3428 (JSC::Interpreter::resolveSkip):
3429 (JSC::Interpreter::resolveGlobal):
3430 (JSC::Interpreter::resolveBase):
3431 (JSC::Interpreter::resolveBaseAndProperty):
3432 (JSC::Interpreter::resolveBaseAndFunc):
3433 (JSC::Interpreter::slideRegisterWindowForCall):
3434 (JSC::Interpreter::callEval):
3435 (JSC::Interpreter::Interpreter):
3436 (JSC::Interpreter::initialize):
3437 (JSC::Interpreter::~Interpreter):
3438 (JSC::Interpreter::dumpCallFrame):
3439 (JSC::Interpreter::dumpRegisters):
3440 (JSC::Interpreter::isOpcode):
3441 (JSC::Interpreter::unwindCallFrame):
3442 (JSC::Interpreter::throwException):
3443 (JSC::Interpreter::execute):
3444 (JSC::Interpreter::debug):
3445 (JSC::Interpreter::resetTimeoutCheck):
3446 (JSC::Interpreter::checkTimeout):
3447 (JSC::Interpreter::createExceptionScope):
3448 (JSC::Interpreter::tryCachePutByID):
3449 (JSC::Interpreter::uncachePutByID):
3450 (JSC::Interpreter::tryCacheGetByID):
3451 (JSC::Interpreter::uncacheGetByID):
3452 (JSC::Interpreter::privateExecute):
3453 (JSC::Interpreter::retrieveArguments):
3454 (JSC::Interpreter::retrieveCaller):
3455 (JSC::Interpreter::retrieveLastCaller):
3456 (JSC::Interpreter::findFunctionCallFrame):
3457 (JSC::Interpreter::tryCTICachePutByID):
3458 (JSC::Interpreter::tryCTICacheGetByID):
3459 (JSC::Interpreter::cti_op_convert_this):
3460 (JSC::Interpreter::cti_op_end):
3461 (JSC::Interpreter::cti_op_add):
3462 (JSC::Interpreter::cti_op_pre_inc):
3463 (JSC::Interpreter::cti_timeout_check):
3464 (JSC::Interpreter::cti_register_file_check):
3465 (JSC::Interpreter::cti_op_loop_if_less):
3466 (JSC::Interpreter::cti_op_loop_if_lesseq):
3467 (JSC::Interpreter::cti_op_new_object):
3468 (JSC::Interpreter::cti_op_put_by_id):
3469 (JSC::Interpreter::cti_op_put_by_id_second):
3470 (JSC::Interpreter::cti_op_put_by_id_generic):
3471 (JSC::Interpreter::cti_op_put_by_id_fail):
3472 (JSC::Interpreter::cti_op_get_by_id):
3473 (JSC::Interpreter::cti_op_get_by_id_second):
3474 (JSC::Interpreter::cti_op_get_by_id_generic):
3475 (JSC::Interpreter::cti_op_get_by_id_fail):
3476 (JSC::Interpreter::cti_op_instanceof):
3477 (JSC::Interpreter::cti_op_del_by_id):
3478 (JSC::Interpreter::cti_op_mul):
3479 (JSC::Interpreter::cti_op_new_func):
3480 (JSC::Interpreter::cti_op_call_JSFunction):
3481 (JSC::Interpreter::cti_op_call_arityCheck):
3482 (JSC::Interpreter::cti_vm_dontLazyLinkCall):
3483 (JSC::Interpreter::cti_vm_lazyLinkCall):
3484 (JSC::Interpreter::cti_op_push_activation):
3485 (JSC::Interpreter::cti_op_call_NotJSFunction):
3486 (JSC::Interpreter::cti_op_create_arguments):
3487 (JSC::Interpreter::cti_op_create_arguments_no_params):
3488 (JSC::Interpreter::cti_op_tear_off_activation):
3489 (JSC::Interpreter::cti_op_tear_off_arguments):
3490 (JSC::Interpreter::cti_op_profile_will_call):
3491 (JSC::Interpreter::cti_op_profile_did_call):
3492 (JSC::Interpreter::cti_op_ret_scopeChain):
3493 (JSC::Interpreter::cti_op_new_array):
3494 (JSC::Interpreter::cti_op_resolve):
3495 (JSC::Interpreter::cti_op_construct_JSConstruct):
3496 (JSC::Interpreter::cti_op_construct_NotJSConstruct):
3497 (JSC::Interpreter::cti_op_get_by_val):
3498 (JSC::Interpreter::cti_op_resolve_func):
3499 (JSC::Interpreter::cti_op_sub):
3500 (JSC::Interpreter::cti_op_put_by_val):
3501 (JSC::Interpreter::cti_op_put_by_val_array):
3502 (JSC::Interpreter::cti_op_lesseq):
3503 (JSC::Interpreter::cti_op_loop_if_true):
3504 (JSC::Interpreter::cti_op_negate):
3505 (JSC::Interpreter::cti_op_resolve_base):
3506 (JSC::Interpreter::cti_op_resolve_skip):
3507 (JSC::Interpreter::cti_op_resolve_global):
3508 (JSC::Interpreter::cti_op_div):
3509 (JSC::Interpreter::cti_op_pre_dec):
3510 (JSC::Interpreter::cti_op_jless):
3511 (JSC::Interpreter::cti_op_not):
3512 (JSC::Interpreter::cti_op_jtrue):
3513 (JSC::Interpreter::cti_op_post_inc):
3514 (JSC::Interpreter::cti_op_eq):
3515 (JSC::Interpreter::cti_op_lshift):
3516 (JSC::Interpreter::cti_op_bitand):
3517 (JSC::Interpreter::cti_op_rshift):
3518 (JSC::Interpreter::cti_op_bitnot):
3519 (JSC::Interpreter::cti_op_resolve_with_base):
3520 (JSC::Interpreter::cti_op_new_func_exp):
3521 (JSC::Interpreter::cti_op_mod):
3522 (JSC::Interpreter::cti_op_less):
3523 (JSC::Interpreter::cti_op_neq):
3524 (JSC::Interpreter::cti_op_post_dec):
3525 (JSC::Interpreter::cti_op_urshift):
3526 (JSC::Interpreter::cti_op_bitxor):
3527 (JSC::Interpreter::cti_op_new_regexp):
3528 (JSC::Interpreter::cti_op_bitor):
3529 (JSC::Interpreter::cti_op_call_eval):
3530 (JSC::Interpreter::cti_op_throw):
3531 (JSC::Interpreter::cti_op_get_pnames):
3532 (JSC::Interpreter::cti_op_next_pname):
3533 (JSC::Interpreter::cti_op_push_scope):
3534 (JSC::Interpreter::cti_op_pop_scope):
3535 (JSC::Interpreter::cti_op_typeof):
3536 (JSC::Interpreter::cti_op_is_undefined):
3537 (JSC::Interpreter::cti_op_is_boolean):
3538 (JSC::Interpreter::cti_op_is_number):
3539 (JSC::Interpreter::cti_op_is_string):
3540 (JSC::Interpreter::cti_op_is_object):
3541 (JSC::Interpreter::cti_op_is_function):
3542 (JSC::Interpreter::cti_op_stricteq):
3543 (JSC::Interpreter::cti_op_nstricteq):
3544 (JSC::Interpreter::cti_op_to_jsnumber):
3545 (JSC::Interpreter::cti_op_in):
3546 (JSC::Interpreter::cti_op_push_new_scope):
3547 (JSC::Interpreter::cti_op_jmp_scopes):
3548 (JSC::Interpreter::cti_op_put_by_index):
3549 (JSC::Interpreter::cti_op_switch_imm):
3550 (JSC::Interpreter::cti_op_switch_char):
3551 (JSC::Interpreter::cti_op_switch_string):
3552 (JSC::Interpreter::cti_op_del_by_val):
3553 (JSC::Interpreter::cti_op_put_getter):
3554 (JSC::Interpreter::cti_op_put_setter):
3555 (JSC::Interpreter::cti_op_new_error):
3556 (JSC::Interpreter::cti_op_debug):
3557 (JSC::Interpreter::cti_vm_throw):
3560 * VM/SamplingTool.h:
3561 (JSC::SamplingTool::SamplingTool):
3562 * bytecompiler/CodeGenerator.cpp:
3563 (JSC::BytecodeGenerator::generate):
3564 (JSC::BytecodeGenerator::BytecodeGenerator):
3567 * runtime/ExecState.h:
3568 (JSC::ExecState::interpreter):
3570 * runtime/JSFunction.h:
3571 * runtime/JSGlobalData.cpp:
3572 (JSC::JSGlobalData::JSGlobalData):
3573 * runtime/JSGlobalData.h:
3574 * runtime/JSString.h:
3576 (WREC::compileRegExp):
3579 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3581 Roll out r38461 (my last patch) because it broke the world.
3583 2008-11-16 Geoffrey Garen <ggaren@apple.com>
3585 Reviewed by Sam Weinig.
3589 BytecodeInterpreter => Interpreter
3590 WREC => JSC::WREC, removing JSC:: prefix in a lot of places
3591 X86Assembler::copy => X86Assembler::executableCopy
3592 AssemblerBuffer::copy => AssemblerBuffer::executableCopy
3593 WRECFunction => WREC::RegExpFunction
3594 OBJECT_OFFSET => FIELD_OFFSET
3598 Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.
3599 Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs
3601 * JavaScriptCore.exp:
3604 (JSC::CTI::emitGetVirtualRegister):
3605 (JSC::CTI::emitGetVirtualRegisters):
3606 (JSC::CTI::emitPutCTIArgFromVirtualRegister):
3607 (JSC::CTI::emitPutCTIArg):
3608 (JSC::CTI::emitGetCTIArg):
3609 (JSC::CTI::emitPutCTIParam):
3610 (JSC::CTI::emitGetCTIParam):
3611 (JSC::CTI::emitPutToCallFrameHeader):
3612 (JSC::CTI::emitGetFromCallFrameHeader):
3613 (JSC::CTI::emitPutVirtualRegister):
3614 (JSC::CTI::emitNakedCall):
3615 (JSC::CTI::emitNakedFastCall):
3616 (JSC::CTI::emitCTICall):
3617 (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
3618 (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
3619 (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
3620 (JSC::CTI::emitFastArithDeTagImmediate):
3621 (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
3622 (JSC::CTI::emitFastArithReTagImmediate):
3623 (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
3624 (JSC::CTI::emitFastArithImmToInt):
3625 (JSC::CTI::emitFastArithIntToImmOrSlowCase):
3626 (JSC::CTI::emitFastArithIntToImmNoCheck):
3627 (JSC::CTI::emitArithIntToImmWithJump):
3628 (JSC::CTI::emitTagAsBoolImmediate):
3629 (JSC::CTI::compileOpCallInitializeCallFrame):
3630 (JSC::CTI::compileOpCall):
3631 (JSC::CTI::compileOpStrictEq):
3632 (JSC::CTI::emitSlowScriptCheck):
3633 (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
3634 (JSC::CTI::compileBinaryArithOp):
3635 (JSC::CTI::compileBinaryArithOpSlowCase):
3636 (JSC::CTI::privateCompileMainPass):
3637 (JSC::CTI::privateCompileSlowCases):
3638 (JSC::CTI::privateCompile):
3639 (JSC::CTI::privateCompileGetByIdSelf):
3640 (JSC::CTI::privateCompileGetByIdProto):
3641 (JSC::CTI::privateCompileGetByIdChain):
3642 (JSC::CTI::privateCompilePutByIdReplace):
3643 (JSC::CTI::privateCompilePutByIdTransition):
3644 (JSC::CTI::privateCompileCTIMachineTrampolines):
3645 (JSC::CTI::freeCTIMachineTrampolines):
3646 (JSC::CTI::patchGetByIdSelf):
3647 (JSC::CTI::patchPutByIdReplace):
3648 (JSC::CTI::privateCompilePatchGetArrayLength):
3649 (JSC::CTI::emitGetVariableObjectRegister):
3650 (JSC::CTI::emitPutVariableObjectRegister):
3652 (JSC::CallRecord::CallRecord):
3653 (JSC::JmpTable::JmpTable):
3654 (JSC::SlowCaseEntry::SlowCaseEntry):
3655 (JSC::CTI::JSRInfo::JSRInfo):
3657 (JSC::CodeBlock::printStructures):
3658 (JSC::CodeBlock::derefStructures):
3659 (JSC::CodeBlock::refStructures):
3663 (JSC::Interpreter::resolve):
3664 (JSC::Interpreter::resolveSkip):
3665 (JSC::Interpreter::resolveGlobal):
3666 (JSC::Interpreter::resolveBase):
3667 (JSC::Interpreter::resolveBaseAndProperty):
3668 (JSC::Interpreter::resolveBaseAndFunc):
3669 (JSC::Interpreter::slideRegisterWindowForCall):
3670 (JSC::Interpreter::callEval):
3671 (JSC::Interpreter::Interpreter):
3672 (JSC::Interpreter::initialize):
3673 (JSC::Interpreter::~Interpreter):
3674 (JSC::Interpreter::dumpCallFrame):
3675 (JSC::Interpreter::dumpRegisters):
3676 (JSC::Interpreter::isOpcode):
3677 (JSC::Interpreter::unwindCallFrame):
3678 (JSC::Interpreter::throwException):
3679 (JSC::Interpreter::execute):
3680 (JSC::Interpreter::debug):
3681 (JSC::Interpreter::resetTimeoutCheck):
3682 (JSC::Interpreter::checkTimeout):
3683 (JSC::Interpreter::createExceptionScope):
3684 (JSC::Interpreter::tryCachePutByID):
3685 (JSC::Interpreter::uncachePutByID):
3686 (JSC::Interpreter::tryCacheGetByID):
3687 (JSC::Interpreter::uncacheGetByID):
3688 (JSC::Interpreter::privateExecute):
3689 (JSC::Interpreter::retrieveArguments):
3690 (JSC::Interpreter::retrieveCaller):
3691 (JSC::Interpreter::retrieveLastCaller):
3692 (JSC::Interpreter::findFunctionCallFrame):
3693 (JSC::Interpreter::tryCTICachePutByID):
3694 (JSC::Interpreter::tryCTICacheGetByID):
3696 (JSC::Interpreter::cti_op_convert_this):
3697 (JSC::Interpreter::cti_op_end):
3698 (JSC::Interpreter::cti_op_add):
3699 (JSC::Interpreter::cti_op_pre_inc):
3700 (JSC::Interpreter::cti_timeout_check):
3701 (JSC::Interpreter::cti_register_file_check):
3702 (JSC::Interpreter::cti_op_loop_if_less):
3703 (JSC::Interpreter::cti_op_loop_if_lesseq):
3704 (JSC::Interpreter::cti_op_new_object):
3705 (JSC::Interpreter::cti_op_put_by_id):
3706 (JSC::Interpreter::cti_op_put_by_id_second):
3707 (JSC::Interpreter::cti_op_put_by_id_generic):
3708 (JSC::Interpreter::cti_op_put_by_id_fail):
3709 (JSC::Interpreter::cti_op_get_by_id):
3710 (JSC::Interpreter::cti_op_get_by_id_second):
3711 (JSC::Interpreter::cti_op_get_by_id_generic):
3712 (JSC::Interpreter::cti_op_get_by_id_fail):
3713 (JSC::Interpreter::cti_op_instanceof):
3714 (JSC::Interpreter::cti_op_del_by_id):
3715 (JSC::Interpreter::cti_op_mul):
3716 (JSC::Interpreter::cti_op_new_func):
3717 (JSC::Interpreter::cti_op_call_JSFunction):
3718 (JSC::Interpreter::cti_op_call_arityCheck):
3719 (JSC::Interpreter::cti_vm_dontLazyLinkCall):
3720 (JSC::Interpreter::cti_vm_lazyLinkCall):
3721 (JSC::Interpreter::cti_op_push_activation):
3722 (JSC::Interpreter::cti_op_call_NotJSFunction):
3723 (JSC::Interpreter::cti_op_create_arguments):
3724 (JSC::Interpreter::cti_op_create_arguments_no_params):
3725 (JSC::Interpreter::cti_op_tear_off_activation):
3726 (JSC::Interpreter::cti_op_tear_off_arguments):
3727 (JSC::Interpreter::cti_op_profile_will_call):
3728 (JSC::Interpreter::cti_op_profile_did_call):
3729 (JSC::Interpreter::cti_op_ret_scopeChain):
3730 (JSC::Interpreter::cti_op_new_array):
3731 (JSC::Interpreter::cti_op_resolve):
3732 (JSC::Interpreter::cti_op_construct_JSConstruct):
3733 (JSC::Interpreter::cti_op_construct_NotJSConstruct):
3734 (JSC::Interpreter::cti_op_get_by_val):
3735 (JSC::Interpreter::cti_op_resolve_func):
3736 (JSC::Interpreter::cti_op_sub):
3737 (JSC::Interpreter::cti_op_put_by_val):
3738 (JSC::Interpreter::cti_op_put_by_val_array):
3739 (JSC::Interpreter::cti_op_lesseq):
3740 (JSC::Interpreter::cti_op_loop_if_true):
3741 (JSC::Interpreter::cti_op_negate):
3742 (JSC::Interpreter::cti_op_resolve_base):
3743 (JSC::Interpreter::cti_op_resolve_skip):
3744 (JSC::Interpreter::cti_op_resolve_global):
3745 (JSC::Interpreter::cti_op_div):
3746 (JSC::Interpreter::cti_op_pre_dec):
3747 (JSC::Interpreter::cti_op_jless):
3748 (JSC::Interpreter::cti_op_not):
3749 (JSC::Interpreter::cti_op_jtrue):
3750 (JSC::Interpreter::cti_op_post_inc):
3751 (JSC::Interpreter::cti_op_eq):
3752 (JSC::Interpreter::cti_op_lshift):
3753 (JSC::Interpreter::cti_op_bitand):
3754 (JSC::Interpreter::cti_op_rshift):
3755 (JSC::Interpreter::cti_op_bitnot):
3756 (JSC::Interpreter::cti_op_resolve_with_base):
3757 (JSC::Interpreter::cti_op_new_func_exp):
3758 (JSC::Interpreter::cti_op_mod):
3759 (JSC::Interpreter::cti_op_less):
3760 (JSC::Interpreter::cti_op_neq):
3761 (JSC::Interpreter::cti_op_post_dec):
3762 (JSC::Interpreter::cti_op_urshift):
3763 (JSC::Interpreter::cti_op_bitxor):
3764 (JSC::Interpreter::cti_op_new_regexp):
3765 (JSC::Interpreter::cti_op_bitor):
3766 (JSC::Interpreter::cti_op_call_eval):
3767 (JSC::Interpreter::cti_op_throw):
3768 (JSC::Interpreter::cti_op_get_pnames):
3769 (JSC::Interpreter::cti_op_next_pname):
3770 (JSC::Interpreter::cti_op_push_scope):
3771 (JSC::Interpreter::cti_op_pop_scope):
3772 (JSC::Interpreter::cti_op_typeof):
3773 (JSC::Interpreter::cti_op_is_undefined):
3774 (JSC::Interpreter::cti_op_is_boolean):
3775 (JSC::Interpreter::cti_op_is_number):
3776 (JSC::Interpreter::cti_op_is_string):
3777 (JSC::Interpreter::cti_op_is_object):
3778 (JSC::Interpreter::cti_op_is_function):
3779 (JSC::Interpreter::cti_op_stricteq):
3780 (JSC::Interpreter::cti_op_nstricteq):
3781 (JSC::Interpreter::cti_op_to_jsnumber):
3782 (JSC::Interpreter::cti_op_in):
3783 (JSC::Interpreter::cti_op_push_new_scope):
3784 (JSC::Interpreter::cti_op_jmp_scopes):
3785 (JSC::Interpreter::cti_op_put_by_index):
3786 (JSC::Interpreter::cti_op_switch_imm):
3787 (JSC::Interpreter::cti_op_switch_char):
3788 (JSC::Interpreter::cti_op_switch_string):
3789 (JSC::Interpreter::cti_op_del_by_val):
3790 (JSC::Interpreter::cti_op_put_getter):
3791 (JSC::Interpreter::cti_op_put_setter):
3792 (JSC::Interpreter::cti_op_new_error):
3793 (JSC::Interpreter::cti_op_debug):
3794 (JSC::Interpreter::cti_vm_throw):
3797 * VM/SamplingTool.cpp:
3798 (JSC::SamplingTool::dump):
3799 * VM/SamplingTool.h:
3800 (JSC::SamplingTool::SamplingTool):
3801 * bytecompiler/CodeGenerator.cpp:
3802 (JSC::BytecodeGenerator::generate):
3803 (JSC::BytecodeGenerator::BytecodeGenerator):
3806 * masm/X86Assembler.h:
3807 (JSC::AssemblerBuffer::executableCopy):
3808 (JSC::X86Assembler::executableCopy):
3809 * runtime/ExecState.h:
3810 (JSC::ExecState::interpreter):
3812 * runtime/JSFunction.h:
3813 * runtime/JSGlobalData.cpp:
3814 (JSC::JSGlobalData::JSGlobalData):
3815 * runtime/JSGlobalData.h:
3816 * runtime/JSImmediate.h:
3817 * runtime/JSString.h:
3818 * runtime/JSValue.h:
3819 * runtime/JSVariableObject.h:
3820 * runtime/RegExp.cpp:
3821 (JSC::RegExp::RegExp):
3822 (JSC::RegExp::~RegExp):
3823 (JSC::RegExp::match):
3825 * wrec/CharacterClassConstructor.cpp:
3826 * wrec/CharacterClassConstructor.h:
3828 (JSC::WREC::compileRegExp):
3830 (JSC::WREC::Generator::Generator):
3831 (JSC::WREC::Parser::):
3832 (JSC::WREC::Parser::Parser):
3833 (JSC::WREC::Parser::parseAlternative):
3835 2008-11-16 Greg Bolsinga <bolsinga@apple.com>
3837 Reviewed by Darin Adler.
3839 https://bugs.webkit.org/show_bug.cgi?id=21810
3840 Remove use of static C++ objects that are destroyed at exit time (destructors)
3842 Conditionally have the DEFINE_STATIC_LOCAL workaround <rdar://problem/6354696>
3843 (Codegen issue with C++ static reference in gcc build 5465) based upon the compiler
3844 build versions. It will use the:
3846 style for all other compilers.
3848 * wtf/StdLibExtras.h:
3850 2008-11-16 Alexey Proskuryakov <ap@webkit.org>
3852 Reviewed by Dan Bernstein.
3854 https://bugs.webkit.org/show_bug.cgi?id=22290
3855 Remove cross-heap GC and MessagePort multi-threading support
3857 It is broken (and may not be implementable at all), and no longer needed, as we
3858 don't use MessagePorts for communication with workers any more.
3860 * JavaScriptCore.exp:
3861 * runtime/Collector.cpp:
3862 (JSC::Heap::collect):
3863 * runtime/JSGlobalObject.cpp:
3864 * runtime/JSGlobalObject.h:
3865 Remove hooks for cross-heap GC.
3867 2008-11-15 Sam Weinig <sam@webkit.org>
3869 Reviewed by Cameron Zwarich.
3871 Cleanup jsc command line code a little.
3875 (main): Use standard exit status macros
3876 (cleanupGlobalData): Factor out cleanup code into this function.
3877 (printUsageStatement): Use standard exit status macros.
3879 2008-11-15 Sam Weinig <sam@webkit.org>
3881 Reviewed by Cameron Zwarich.
3883 Cleanup BytecodeGenerator constructors.
3885 * bytecompiler/CodeGenerator.cpp:
3886 (JSC::BytecodeGenerator::BytecodeGenerator):
3887 * bytecompiler/CodeGenerator.h:
3889 (JSC::ProgramNode::generateBytecode):
3891 2008-11-15 Darin Adler <darin@apple.com>
3893 Rubber stamped by Geoff Garen.
3895 - do the long-planned StructureID -> Structure rename
3897 * API/JSCallbackConstructor.cpp:
3898 (JSC::JSCallbackConstructor::JSCallbackConstructor):
3899 * API/JSCallbackConstructor.h:
3900 (JSC::JSCallbackConstructor::createStructure):
3901 * API/JSCallbackFunction.h:
3902 (JSC::JSCallbackFunction::createStructure):
3903 * API/JSCallbackObject.h:
3904 (JSC::JSCallbackObject::createStructure):
3905 * API/JSCallbackObjectFunctions.h:
3906 (JSC::::JSCallbackObject):
3907 * API/JSValueRef.cpp:
3908 (JSValueIsInstanceOfConstructor):
3910 * JavaScriptCore.exp:
3911 * JavaScriptCore.pri:
3912 * JavaScriptCore.scons:
3913 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3914 * JavaScriptCore.xcodeproj/project.pbxproj:
3915 * JavaScriptCoreSources.bkl:
3917 (JSC::CTI::compileBinaryArithOp):
3918 (JSC::CTI::privateCompileMainPass):
3919 (JSC::CTI::privateCompileGetByIdSelf):
3920 (JSC::CTI::privateCompileGetByIdProto):
3921 (JSC::CTI::privateCompileGetByIdChain):
3922 (JSC::CTI::privateCompilePutByIdReplace):
3923 (JSC::transitionWillNeedStorageRealloc):
3924 (JSC::CTI::privateCompilePutByIdTransition):
3925 (JSC::CTI::patchGetByIdSelf):
3926 (JSC::CTI::patchPutByIdReplace):
3928 (JSC::CTI::compileGetByIdSelf):
3929 (JSC::CTI::compileGetByIdProto):
3930 (JSC::CTI::compileGetByIdChain):
3931 (JSC::CTI::compilePutByIdReplace):
3932 (JSC::CTI::compilePutByIdTransition):
3934 (JSC::CodeBlock::printStructure):
3935 (JSC::CodeBlock::printStructures):
3936 (JSC::CodeBlock::dump):
3937 (JSC::CodeBlock::~CodeBlock):
3938 (JSC::CodeBlock::derefStructures):
3939 (JSC::CodeBlock::refStructures):
3942 (JSC::Instruction::Instruction):
3943 (JSC::Instruction::):
3945 (JSC::jsTypeStringForValue):
3946 (JSC::jsIsObjectType):
3947 (JSC::BytecodeInterpreter::resolveGlobal):
3948 (JSC::BytecodeInterpreter::BytecodeInterpreter):
3949 (JSC::cachePrototypeChain):
3950 (JSC::BytecodeInterpreter::tryCachePutByID):
3951 (JSC::BytecodeInterpreter::uncachePutByID):
3952 (JSC::BytecodeInterpreter::tryCacheGetByID):
3953 (JSC::BytecodeInterpreter::uncacheGetByID):
3954 (JSC::BytecodeInterpreter::privateExecute):
3955 (JSC::BytecodeInterpreter::tryCTICachePutByID):
3956 (JSC::BytecodeInterpreter::tryCTICacheGetByID):
3957 (JSC::BytecodeInterpreter::cti_op_instanceof):
3958 (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct):
3959 (JSC::BytecodeInterpreter::cti_op_resolve_global):
3960 (JSC::BytecodeInterpreter::cti_op_is_undefined):
3961 * runtime/Arguments.h:
3962 (JSC::Arguments::createStructure):
3963 * runtime/ArrayConstructor.cpp:
3964 (JSC::ArrayConstructor::ArrayConstructor):
3965 * runtime/ArrayConstructor.h:
3966 * runtime/ArrayPrototype.cpp:
3967 (JSC::ArrayPrototype::ArrayPrototype):
3968 * runtime/ArrayPrototype.h:
3969 * runtime/BatchedTransitionOptimizer.h:
3970 (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3971 (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
3972 * runtime/BooleanConstructor.cpp:
3973 (JSC::BooleanConstructor::BooleanConstructor):
3974 * runtime/BooleanConstructor.h:
3975 * runtime/BooleanObject.cpp:
3976 (JSC::BooleanObject::BooleanObject):
3977 * runtime/BooleanObject.h:
3978 * runtime/BooleanPrototype.cpp:
3979 (JSC::BooleanPrototype::BooleanPrototype):
3980 * runtime/BooleanPrototype.h:
3981 * runtime/DateConstructor.cpp:
3982 (JSC::DateConstructor::DateConstructor):
3983 * runtime/DateConstructor.h:
3984 * runtime/DateInstance.cpp:
3985 (JSC::DateInstance::DateInstance):
3986 * runtime/DateInstance.h:
3987 * runtime/DatePrototype.cpp:
3988 (JSC::DatePrototype::DatePrototype):
3989 * runtime/DatePrototype.h:
3990 (JSC::DatePrototype::createStructure):
3991 * runtime/ErrorConstructor.cpp:
3992 (JSC::ErrorConstructor::ErrorConstructor):
3993 * runtime/ErrorConstructor.h:
3994 * runtime/ErrorInstance.cpp:
3995 (JSC::ErrorInstance::ErrorInstance):
3996 * runtime/ErrorInstance.h:
3997 * runtime/ErrorPrototype.cpp:
3998 (JSC::ErrorPrototype::ErrorPrototype):
3999 * runtime/ErrorPrototype.h:
4000 * runtime/FunctionConstructor.cpp:
4001 (JSC::FunctionConstructor::FunctionConstructor):
4002 * runtime/FunctionConstructor.h:
4003 * runtime/FunctionPrototype.cpp:
4004 (JSC::FunctionPrototype::FunctionPrototype):
4005 (JSC::FunctionPrototype::addFunctionProperties):
4006 * runtime/FunctionPrototype.h:
4007 (JSC::FunctionPrototype::createStructure):
4008 * runtime/GlobalEvalFunction.cpp:
4009 (JSC::GlobalEvalFunction::GlobalEvalFunction):
4010 * runtime/GlobalEvalFunction.h:
4011 * runtime/Identifier.h:
4012 * runtime/InternalFunction.cpp:
4013 (JSC::InternalFunction::InternalFunction):
4014 * runtime/InternalFunction.h:
4015 (JSC::InternalFunction::createStructure):
4016 (JSC::InternalFunction::InternalFunction):
4017 * runtime/JSActivation.cpp:
4018 (JSC::JSActivation::JSActivation):
4019 * runtime/JSActivation.h:
4020 (JSC::JSActivation::createStructure):
4021 * runtime/JSArray.cpp:
4022 (JSC::JSArray::JSArray):
4023 * runtime/JSArray.h:
4024 (JSC::JSArray::createStructure):
4026 (JSC::JSCell::JSCell):
4027 (JSC::JSCell::isObject):
4028 (JSC::JSCell::isString):
4029 (JSC::JSCell::structure):
4030 (JSC::JSValue::needsThisConversion):
4031 * runtime/JSFunction.cpp:
4032 (JSC::JSFunction::construct):
4033 * runtime/JSFunction.h:
4034 (JSC::JSFunction::JSFunction):
4035 (JSC::JSFunction::createStructure):
4036 * runtime/JSGlobalData.cpp:
4037 (JSC::JSGlobalData::JSGlobalData):
4038 (JSC::JSGlobalData::createLeaked):
4039 * runtime/JSGlobalData.h:
4040 * runtime/JSGlobalObject.cpp:
4041 (JSC::markIfNeeded):
4042 (JSC::JSGlobalObject::reset):
4043 * runtime/JSGlobalObject.h:
4044 (JSC::JSGlobalObject::JSGlobalObject):
4045 (JSC::JSGlobalObject::argumentsStructure):
4046 (JSC::JSGlobalObject::arrayStructure):
4047 (JSC::JSGlobalObject::booleanObjectStructure):
4048 (JSC::JSGlobalObject::callbackConstructorStructure):
4049 (JSC::JSGlobalObject::callbackFunctionStructure):
4050 (JSC::JSGlobalObject::callbackObjectStructure):
4051 (JSC::JSGlobalObject::dateStructure):
4052 (JSC::JSGlobalObject::emptyObjectStructure):
4053 (JSC::JSGlobalObject::errorStructure):
4054 (JSC::JSGlobalObject::functionStructure):
4055 (JSC::JSGlobalObject::numberObjectStructure):
4056 (JSC::JSGlobalObject::prototypeFunctionStructure):
4057 (JSC::JSGlobalObject::regExpMatchesArrayStructure):
4058 (JSC::JSGlobalObject::regExpStructure):
4059 (JSC::JSGlobalObject::stringObjectStructure):
4060 (JSC::JSGlobalObject::createStructure):
4061 (JSC::Structure::prototypeForLookup):
4062 * runtime/JSNotAnObject.h:
4063 (JSC::JSNotAnObject::createStructure):
4064 * runtime/JSNumberCell.h:
4065 (JSC::JSNumberCell::createStructure):
4066 (JSC::JSNumberCell::JSNumberCell):
4067 * runtime/JSObject.cpp:
4068 (JSC::JSObject::mark):
4069 (JSC::JSObject::put):
4070 (JSC::JSObject::deleteProperty):
4071 (JSC::JSObject::defineGetter):
4072 (JSC::JSObject::defineSetter):
4073 (JSC::JSObject::getPropertyAttributes):
4074 (JSC::JSObject::getPropertyNames):
4075 (JSC::JSObject::removeDirect):
4076 (JSC::JSObject::createInheritorID):
4077 * runtime/JSObject.h:
4078 (JSC::JSObject::getDirect):
4079 (JSC::JSObject::getDirectLocation):
4080 (JSC::JSObject::hasCustomProperties):
4081 (JSC::JSObject::hasGetterSetterProperties):
4082 (JSC::JSObject::createStructure):
4083 (JSC::JSObject::JSObject):
4084 (JSC::JSObject::~JSObject):
4085 (JSC::JSObject::prototype):
4086 (JSC::JSObject::setPrototype):
4087 (JSC::JSObject::setStructure):
4088 (JSC::JSObject::inheritorID):
4089 (JSC::JSObject::inlineGetOwnPropertySlot):
4090 (JSC::JSObject::getOwnPropertySlotForWrite):
4091 (JSC::JSCell::fastGetOwnPropertySlot):
4092 (JSC::JSObject::putDirect):
4093 (JSC::JSObject::putDirectWithoutTransition):
4094 (JSC::JSObject::transitionTo):
4095 * runtime/JSPropertyNameIterator.h:
4096 (JSC::JSPropertyNameIterator::next):
4097 * runtime/JSStaticScopeObject.h:
4098 (JSC::JSStaticScopeObject::JSStaticScopeObject):
4099 (JSC::JSStaticScopeObject::createStructure):
4100 * runtime/JSString.h:
4101 (JSC::JSString::JSString):
4102 (JSC::JSString::createStructure):
4103 * runtime/JSVariableObject.h:
4104 (JSC::JSVariableObject::JSVariableObject):
4105 * runtime/JSWrapperObject.h:
4106 (JSC::JSWrapperObject::JSWrapperObject):
4107 * runtime/MathObject.cpp:
4108 (JSC::MathObject::MathObject):
4109 * runtime/MathObject.h:
4110 (JSC::MathObject::createStructure):
4111 * runtime/NativeErrorConstructor.cpp:
4112 (JSC::NativeErrorConstructor::NativeErrorConstructor):
4113 * runtime/NativeErrorConstructor.h:
4114 * runtime/NativeErrorPrototype.cpp:
4115 (JSC::NativeErrorPrototype::NativeErrorPrototype):
4116 * runtime/NativeErrorPrototype.h:
4117 * runtime/NumberConstructor.cpp:
4118 (JSC::NumberConstructor::NumberConstructor):
4119 * runtime/NumberConstructor.h:
4120 (JSC::NumberConstructor::createStructure):
4121 * runtime/NumberObject.cpp:
4122 (JSC::NumberObject::NumberObject):
4123 * runtime/NumberObject.h:
4124 * runtime/NumberPrototype.cpp:
4125 (JSC::NumberPrototype::NumberPrototype):
4126 * runtime/NumberPrototype.h:
4127 * runtime/ObjectConstructor.cpp:
4128 (JSC::ObjectConstructor::ObjectConstructor):
4129 * runtime/ObjectConstructor.h:
4130 * runtime/ObjectPrototype.cpp:
4131 (JSC::ObjectPrototype::ObjectPrototype):
4132 * runtime/ObjectPrototype.h:
4133 * runtime/Operations.h:
4134 (JSC::equalSlowCaseInline):
4135 * runtime/PropertyNameArray.h:
4136 (JSC::PropertyNameArrayData::setCachedStructure):
4137 (JSC::PropertyNameArrayData::cachedStructure):
4138 (JSC::PropertyNameArrayData::setCachedPrototypeChain):
4139 (JSC::PropertyNameArrayData::cachedPrototypeChain):
4140 (JSC::PropertyNameArrayData::PropertyNameArrayData):
4141 * runtime/PrototypeFunction.cpp:
4142 (JSC::PrototypeFunction::PrototypeFunction):
4143 * runtime/PrototypeFunction.h:
4144 * runtime/RegExpConstructor.cpp:
4145 (JSC::RegExpConstructor::RegExpConstructor):
4146 * runtime/RegExpConstructor.h:
4147 (JSC::RegExpConstructor::createStructure):
4148 * runtime/RegExpObject.cpp:
4149 (JSC::RegExpObject::RegExpObject):
4150 * runtime/RegExpObject.h:
4151 (JSC::RegExpObject::createStructure):
4152 * runtime/RegExpPrototype.cpp:
4153 (JSC::RegExpPrototype::RegExpPrototype):
4154 * runtime/RegExpPrototype.h:
4155 * runtime/StringConstructor.cpp:
4156 (JSC::StringConstructor::StringConstructor):
4157 * runtime/StringConstructor.h:
4158 * runtime/StringObject.cpp:
4159 (JSC::StringObject::StringObject):
4160 * runtime/StringObject.h:
4161 (JSC::StringObject::createStructure):
4162 * runtime/StringObjectThatMasqueradesAsUndefined.h:
4163 (JSC::StringObjectThatMasqueradesAsUndefined::create):
4164 (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
4165 (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
4166 * runtime/StringPrototype.cpp:
4167 (JSC::StringPrototype::StringPrototype):
4168 * runtime/StringPrototype.h:
4169 * runtime/Structure.cpp: Copied from JavaScriptCore/runtime/StructureID.cpp.
4170 (JSC::Structure::dumpStatistics):
4171 (JSC::Structure::Structure):
4172 (JSC::Structure::~Structure):
4173 (JSC::Structure::startIgnoringLeaks):
4174 (JSC::Structure::stopIgnoringLeaks):
4175 (JSC::Structure::materializePropertyMap):
4176 (JSC::Structure::getEnumerablePropertyNames):
4177 (JSC::Structure::clearEnumerationCache):
4178 (JSC::Structure::growPropertyStorageCapacity):
4179 (JSC::Structure::addPropertyTransitionToExistingStructure):
4180 (JSC::Structure::addPropertyTransition):
4181 (JSC::Structure::removePropertyTransition):
4182 (JSC::Structure::changePrototypeTransition):
4183 (JSC::Structure::getterSetterTransition):
4184 (JSC::Structure::toDictionaryTransition):
4185 (JSC::Structure::fromDictionaryTransition):
4186 (JSC::Structure::addPropertyWithoutTransition):
4187 (JSC::Structure::removePropertyWithoutTransition):