Fix broken non-JIT build.
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2012-08-20  Mark Lam  <mark.lam@apple.com>
2
3         Fix broken non-JIT build.
4         https://bugs.webkit.org/show_bug.cgi?id=94564.
5
6         Reviewed by Filip Pizlo.
7
8         Added some UNUSED_PARAM() macros to make the compiler happy.
9
10         * runtime/Executable.cpp:
11         (JSC::EvalExecutable::compileInternal):
12         (JSC::ProgramExecutable::compileInternal):
13         (JSC::FunctionExecutable::compileForCallInternal):
14         (JSC::FunctionExecutable::compileForConstructInternal):
15
16 2012-08-20  Mark Lam  <mark.lam@apple.com>
17
18         Fixed erroneous line number for LLint frame when throwing exceptions.
19         https://bugs.webkit.org/show_bug.cgi?id=94051.
20
21         Reviewed by Filip Pizlo.
22
23         For LLInt frames, before throwing an exception, adjust the PC from the
24         return PC back to the call PC if we are indeed at a call site.
25
26         * bytecode/CodeBlock.cpp:
27         (JSC::CodeBlock::adjustPCIfAtCallSite):
28         (JSC):
29         (JSC::CodeBlock::bytecodeOffset):
30         * bytecode/CodeBlock.h:
31         (CodeBlock):
32         * llint/LLIntExceptions.cpp:
33         (JSC::LLInt::fixupPCforExceptionIfNeeded):
34         (LLInt):
35         (JSC::LLInt::interpreterThrowInCaller):
36         (JSC::LLInt::returnToThrow):
37         (JSC::LLInt::callToThrow):
38
39 2012-08-20  Filip Pizlo  <fpizlo@apple.com>
40
41         fast/js/dfg-peephole-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html on 32-bit
42         https://bugs.webkit.org/show_bug.cgi?id=94538
43
44         Reviewed by Mark Hahnenberg.
45
46         * dfg/DFGSpeculativeJIT32_64.cpp:
47         (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
48
49 2012-08-20  Filip Pizlo  <fpizlo@apple.com>
50
51         fast/js/dfg-compare-final-object-to-final-object-or-other-when-both-proven-final-object.html crashes on 32-bit
52         https://bugs.webkit.org/show_bug.cgi?id=94026
53
54         Reviewed by Mark Hahnenberg.
55
56         * dfg/DFGSpeculativeJIT32_64.cpp:
57         (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
58
59 2012-08-19  Filip Pizlo  <fpizlo@apple.com>
60
61         The relationship between abstract values and structure transition watchpoints should be rationalized
62         https://bugs.webkit.org/show_bug.cgi?id=94205
63
64         Reviewed by Geoffrey Garen.
65
66         This patch does a number of things related to the handling of the abstract values
67         arrising from values with structures known to be watchpointable:
68         
69         - This rationalizes the relationship between the structure that we know an object
70           to have *right now* based on having executed a check against that structure, and
71           the structure that we know the object could have *in the future* based on a type
72           check executed in the past over a structure that was watchpointable.
73         
74         - We use the above to assert that structure transition watchpoints are being used
75           soundly.
76         
77         - We use the above to strength reduce CheckStructure into StructureTransitionWatchpoint
78           whenever possible.
79         
80         - This rationalizes the handling of CFA over constants that appeared in the bytecode.
81           If at compile-time the constant has a watchpointable structure, then we can prove
82           what structures it may have in the future. The analysis uses this to both assert
83           that structure transition watchpoints are being used correctly, and to find
84           opportunities for using them more aggressively.
85         
86         The net effect of all of these changes is that OSR entry should work more smoothly.
87         It may also be a slight win due to strength reductions, though most of those strength
88         reductions would have already been done by the parser and the structure check hoister.
89
90         * GNUmakefile.list.am:
91         * JavaScriptCore.xcodeproj/project.pbxproj:
92         * dfg/DFGAbstractState.cpp:
93         (JSC::DFG::AbstractState::beginBasicBlock):
94         (JSC::DFG::AbstractState::execute):
95         * dfg/DFGAbstractValue.h:
96         (DFG):
97         (JSC::DFG::AbstractValue::clear):
98         (JSC::DFG::AbstractValue::isClear):
99         (JSC::DFG::AbstractValue::makeTop):
100         (JSC::DFG::AbstractValue::clobberStructures):
101         (JSC::DFG::AbstractValue::isTop):
102         (JSC::DFG::AbstractValue::setFuturePossibleStructure):
103         (AbstractValue):
104         (JSC::DFG::AbstractValue::filterFuturePossibleStructure):
105         (JSC::DFG::AbstractValue::setMostSpecific):
106         (JSC::DFG::AbstractValue::set):
107         (JSC::DFG::AbstractValue::operator==):
108         (JSC::DFG::AbstractValue::merge):
109         (JSC::DFG::AbstractValue::filter):
110         (JSC::DFG::AbstractValue::filterValueByType):
111         (JSC::DFG::AbstractValue::validateType):
112         (JSC::DFG::AbstractValue::validate):
113         (JSC::DFG::AbstractValue::checkConsistency):
114         (JSC::DFG::AbstractValue::dump):
115         * dfg/DFGArgumentsSimplificationPhase.cpp:
116         (JSC::DFG::ArgumentsSimplificationPhase::run):
117         * dfg/DFGCSEPhase.cpp:
118         (JSC::DFG::CSEPhase::checkStructureLoadElimination):
119         (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
120         (JSC::DFG::CSEPhase::performNodeCSE):
121         * dfg/DFGConstantFoldingPhase.cpp:
122         (JSC::DFG::ConstantFoldingPhase::foldConstants):
123         * dfg/DFGNode.h:
124         (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
125         (Node):
126         (JSC::DFG::Node::hasStructure):
127         * dfg/DFGNodeType.h:
128         (DFG):
129         * dfg/DFGOSREntry.cpp:
130         (JSC::DFG::prepareOSREntry):
131         * dfg/DFGPredictionPropagationPhase.cpp:
132         (JSC::DFG::PredictionPropagationPhase::propagate):
133         * dfg/DFGSpeculativeJIT.cpp:
134         (JSC::DFG::SpeculativeJIT::convertLastOSRExitToForward):
135         (JSC::DFG::SpeculativeJIT::forwardSpeculationWatchpoint):
136         (DFG):
137         (JSC::DFG::SpeculativeJIT::speculationWatchpointWithConditionalDirection):
138         (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
139         (JSC::DFG::SpeculativeJIT::speculateArray):
140         * dfg/DFGSpeculativeJIT.h:
141         (SpeculativeJIT):
142         * dfg/DFGSpeculativeJIT32_64.cpp:
143         (JSC::DFG::SpeculativeJIT::compile):
144         * dfg/DFGSpeculativeJIT64.cpp:
145         (JSC::DFG::SpeculativeJIT::compile):
146         * dfg/DFGStructureAbstractValue.h: Added.
147         (DFG):
148         (StructureAbstractValue):
149         (JSC::DFG::StructureAbstractValue::StructureAbstractValue):
150         (JSC::DFG::StructureAbstractValue::clear):
151         (JSC::DFG::StructureAbstractValue::makeTop):
152         (JSC::DFG::StructureAbstractValue::top):
153         (JSC::DFG::StructureAbstractValue::add):
154         (JSC::DFG::StructureAbstractValue::addAll):
155         (JSC::DFG::StructureAbstractValue::contains):
156         (JSC::DFG::StructureAbstractValue::isSubsetOf):
157         (JSC::DFG::StructureAbstractValue::doesNotContainAnyOtherThan):
158         (JSC::DFG::StructureAbstractValue::isSupersetOf):
159         (JSC::DFG::StructureAbstractValue::filter):
160         (JSC::DFG::StructureAbstractValue::isClear):
161         (JSC::DFG::StructureAbstractValue::isTop):
162         (JSC::DFG::StructureAbstractValue::isClearOrTop):
163         (JSC::DFG::StructureAbstractValue::isNeitherClearNorTop):
164         (JSC::DFG::StructureAbstractValue::size):
165         (JSC::DFG::StructureAbstractValue::at):
166         (JSC::DFG::StructureAbstractValue::operator[]):
167         (JSC::DFG::StructureAbstractValue::last):
168         (JSC::DFG::StructureAbstractValue::speculationFromStructures):
169         (JSC::DFG::StructureAbstractValue::hasSingleton):
170         (JSC::DFG::StructureAbstractValue::singleton):
171         (JSC::DFG::StructureAbstractValue::operator==):
172         (JSC::DFG::StructureAbstractValue::dump):
173         (JSC::DFG::StructureAbstractValue::topValue):
174         * dfg/DFGStructureCheckHoistingPhase.cpp:
175         (JSC::DFG::StructureCheckHoistingPhase::run):
176
177 2012-08-17  Filip Pizlo  <fpizlo@apple.com>
178
179         The current state of the call frame should be taken into account in the DFG for both predictions and proofs
180         https://bugs.webkit.org/show_bug.cgi?id=94412
181
182         Reviewed by Geoffrey Garen.
183
184         This ensures that no matter how smart the DFG gets, it'll always know through
185         which entrypoint OSR will try to enter, and with which values it will attempt
186         to do so. For prologue OSR, this has no effect other than adding the current
187         arguments to the argument predictions. For loop OSR, this makes our treatment
188         of the loop slightly more conservative - just conservative enough to ensure
189         that OSR succeeds.
190
191         * bytecode/CodeBlock.cpp:
192         (JSC::ProgramCodeBlock::compileOptimized):
193         (JSC::EvalCodeBlock::compileOptimized):
194         (JSC::FunctionCodeBlock::compileOptimized):
195         * bytecode/CodeBlock.h:
196         (CodeBlock):
197         (ProgramCodeBlock):
198         (EvalCodeBlock):
199         (FunctionCodeBlock):
200         * dfg/DFGAbstractState.cpp:
201         (JSC::DFG::AbstractState::initialize):
202         * dfg/DFGAbstractValue.h:
203         (JSC::DFG::AbstractValue::setMostSpecific):
204         (AbstractValue):
205         * dfg/DFGByteCodeParser.cpp:
206         (JSC::DFG::ByteCodeParser::fixVariableAccessPredictions):
207         (JSC::DFG::ByteCodeParser::parse):
208         * dfg/DFGDriver.cpp:
209         (JSC::DFG::compile):
210         (JSC::DFG::tryCompile):
211         (JSC::DFG::tryCompileFunction):
212         * dfg/DFGDriver.h:
213         (DFG):
214         (JSC::DFG::tryCompile):
215         (JSC::DFG::tryCompileFunction):
216         * dfg/DFGGraph.h:
217         (JSC::DFG::Graph::Graph):
218         (Graph):
219         * jit/JITDriver.h:
220         (JSC::jitCompileIfAppropriate):
221         (JSC::jitCompileFunctionIfAppropriate):
222         * jit/JITStubs.cpp:
223         (JSC::DEFINE_STUB_FUNCTION):
224         * runtime/Executable.cpp:
225         (JSC::EvalExecutable::compileOptimized):
226         (JSC::EvalExecutable::compileInternal):
227         (JSC::ProgramExecutable::compileOptimized):
228         (JSC::ProgramExecutable::compileInternal):
229         (JSC::FunctionExecutable::compileOptimizedForCall):
230         (JSC::FunctionExecutable::compileOptimizedForConstruct):
231         (JSC::FunctionExecutable::compileForCallInternal):
232         (JSC::FunctionExecutable::compileForConstructInternal):
233         * runtime/Executable.h:
234         (EvalExecutable):
235         (ProgramExecutable):
236         (FunctionExecutable):
237         (JSC::FunctionExecutable::compileOptimizedFor):
238         * runtime/ExecutionHarness.h:
239         (JSC::prepareForExecution):
240         (JSC::prepareFunctionForExecution):
241
242 2012-08-17  Filip Pizlo  <fpizlo@apple.com>
243
244         DFG CSE should be more honest about when it changed the IR
245         https://bugs.webkit.org/show_bug.cgi?id=94408
246
247         Reviewed by Geoffrey Garen.
248
249         The CSE phase now always returns true if it changed the IR.
250
251         * dfg/DFGCSEPhase.cpp:
252         (JSC::DFG::CSEPhase::setReplacement):
253         (JSC::DFG::CSEPhase::eliminate):
254         (JSC::DFG::CSEPhase::performNodeCSE):
255
256 2012-08-17  Filip Pizlo  <fpizlo@apple.com>
257
258         DFG is still too pessimistic about what constitutes a side-effect on array accesses
259         https://bugs.webkit.org/show_bug.cgi?id=94309
260
261         Reviewed by Geoffrey Garen.
262
263         This change means that even if structure transition watchpoints are not used for
264         hoisting of clobbered structure checks, we still retain good performance on the
265         benchmarks we care about. That's important, since butterflies will likely make
266         most array structures not watchpointable.
267
268         * dfg/DFGAbstractState.cpp:
269         (JSC::DFG::AbstractState::execute):
270         * dfg/DFGStructureCheckHoistingPhase.cpp:
271         (JSC::DFG::StructureCheckHoistingPhase::run):
272
273 2012-08-17  Milian Wolff  <milian.wolff@kdab.com>
274
275         [Qt] QNX build fails due to ctype usage in system headers
276         https://bugs.webkit.org/show_bug.cgi?id=93849
277
278         Reviewed by Simon Hausmann.
279
280         Move the check for whether DisallowCType should be active or not
281         to the DisallowCType.h header. This way, we can update the list
282         of platforms or OSes which do not work with this header in a
283         central place. All users can now safely include the header
284         and do not need to place custom guards around it.
285
286         * config.h:
287
288 2012-08-16  Simon Hausmann  <simon.hausmann@nokia.com>
289
290         [Qt] Replace use of internal Weak smart pointer with JSWeakObjectMap
291         https://bugs.webkit.org/show_bug.cgi?id=93872
292
293         Reviewed by Kenneth Rohde Christiansen.
294
295         * Target.pri: Add missing JSWeakObjectMap file to build.
296
297 2012-08-16  Filip Pizlo  <fpizlo@apple.com>
298
299         Structure check hoisting should be less expensive
300         https://bugs.webkit.org/show_bug.cgi?id=94201
301
302         Reviewed by Mark Hahnenberg.
303
304         This appears like a broad win on short-running programs.
305
306         * dfg/DFGArgumentsSimplificationPhase.cpp:
307         (JSC::DFG::ArgumentsSimplificationPhase::run):
308         * dfg/DFGCSEPhase.cpp:
309         (JSC::DFG::CSEPhase::performNodeCSE):
310         * dfg/DFGDriver.cpp:
311         (JSC::DFG::compile):
312         * dfg/DFGGraph.h:
313         (JSC::DFG::Graph::compareAndSwap):
314         (Graph):
315         (JSC::DFG::Graph::substitute):
316         (JSC::DFG::Graph::substituteGetLocal):
317         * dfg/DFGStructureCheckHoistingPhase.cpp:
318         (JSC::DFG::StructureCheckHoistingPhase::run):
319
320 2012-08-16  Filip Pizlo  <fpizlo@apple.com>
321
322         All op_resolve_global instructions should end up in the list of global resolve instructions
323         https://bugs.webkit.org/show_bug.cgi?id=94247
324         <rdar://problem/12103500>
325
326         Reviewed by Mark Hahnenberg.
327
328         * bytecompiler/BytecodeGenerator.cpp:
329         (JSC::BytecodeGenerator::emitResolveWithBase):
330
331 2012-08-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
332
333         [css3-text] Add CSS3 Text decoration compile flag
334         https://bugs.webkit.org/show_bug.cgi?id=93863
335
336         Reviewed by Julien Chaffraix.
337
338         This patch handles the compile flag implementation, which will come disabled by
339         default, thus not exposing the CSS3 text decoration features to the web, unless
340         when explicitly enabling it with "--css3-text-decoration" build parameter.
341
342         * Configurations/FeatureDefines.xcconfig:
343
344 2012-08-15  Sheriff Bot  <webkit.review.bot@gmail.com>
345
346         Unreviewed, rolling out r125687.
347         http://trac.webkit.org/changeset/125687
348         https://bugs.webkit.org/show_bug.cgi?id=94147
349
350         It broke the whole world (Requested by Ossy_night on #webkit).
351
352         * API/JSValueRef.cpp:
353         (JSValueToBoolean):
354         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
355         * bytecode/Watchpoint.h:
356         (WatchpointSet):
357         * debugger/DebuggerCallFrame.h:
358         * dfg/DFGAbstractState.cpp:
359         (JSC::DFG::AbstractState::execute):
360         * dfg/DFGCFGSimplificationPhase.cpp:
361         (JSC::DFG::CFGSimplificationPhase::run):
362         * dfg/DFGOperations.cpp:
363         * dfg/DFGOperations.h:
364         * dfg/DFGSpeculativeJIT32_64.cpp:
365         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
366         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
367         (JSC::DFG::SpeculativeJIT::compile):
368         * dfg/DFGSpeculativeJIT64.cpp:
369         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
370         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
371         (JSC::DFG::SpeculativeJIT::compile):
372         * interpreter/Interpreter.cpp:
373         (JSC::Interpreter::privateExecute):
374         * jit/JITOpcodes.cpp:
375         (JSC::JIT::emit_op_is_undefined):
376         (JSC::JIT::emit_op_jeq_null):
377         (JSC::JIT::emit_op_jneq_null):
378         (JSC::JIT::emit_op_eq_null):
379         (JSC::JIT::emit_op_neq_null):
380         * jit/JITOpcodes32_64.cpp:
381         (JSC::JIT::emit_op_is_undefined):
382         (JSC::JIT::emit_op_jeq_null):
383         (JSC::JIT::emit_op_jneq_null):
384         (JSC::JIT::emit_op_eq_null):
385         (JSC::JIT::emit_op_neq_null):
386         * jit/JITStubs.cpp:
387         (JSC::DEFINE_STUB_FUNCTION):
388         * llint/LLIntSlowPaths.cpp:
389         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
390         * llint/LowLevelInterpreter32_64.asm:
391         * llint/LowLevelInterpreter64.asm:
392         * runtime/ArrayPrototype.cpp:
393         (JSC::arrayProtoFuncFilter):
394         (JSC::arrayProtoFuncEvery):
395         (JSC::arrayProtoFuncSome):
396         * runtime/BooleanConstructor.cpp:
397         (JSC::constructBoolean):
398         (JSC::callBooleanConstructor):
399         * runtime/JSCell.h:
400         (JSCell):
401         * runtime/JSGlobalObject.cpp:
402         (JSC::JSGlobalObject::JSGlobalObject):
403         * runtime/JSGlobalObject.h:
404         (JSGlobalObject):
405         * runtime/JSString.h:
406         (JSC::JSCell::toBoolean):
407         (JSC::JSValue::toBoolean):
408         * runtime/JSValue.h:
409         * runtime/ObjectConstructor.cpp:
410         (JSC::toPropertyDescriptor):
411         * runtime/Operations.cpp:
412         (JSC::jsTypeStringForValue):
413         (JSC::jsIsObjectType):
414         * runtime/Operations.h:
415         (JSC):
416         (JSC::JSValue::equalSlowCaseInline):
417         * runtime/RegExpConstructor.cpp:
418         (JSC::setRegExpConstructorMultiline):
419         * runtime/RegExpPrototype.cpp:
420         (JSC::regExpProtoFuncToString):
421         * runtime/Structure.h:
422
423 2012-08-15  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
424
425         Buildfix after r125541
426         https://bugs.webkit.org/show_bug.cgi?id=94097
427
428         Reviewed by Filip Pizlo.
429
430         r125541 has broken the traditional ARM port build of JSC.
431
432         * assembler/MacroAssemblerARM.h:
433         (JSC::MacroAssemblerARM::neg32):
434         (JSC::MacroAssemblerARM::xor32):
435
436 2012-08-14  Mark Hahnenberg  <mhahnenberg@apple.com>
437
438         Change behavior of MasqueradesAsUndefined to better accommodate DFG changes
439         https://bugs.webkit.org/show_bug.cgi?id=93884
440
441         Reviewed by Geoffrey Garen.
442
443         With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of 
444         MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines, 
445         we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined 
446         objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject). 
447         For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not 
448         masquerade as undefined within frame B, but it will continue to masquerade in frame A.
449
450         There are two primary changes that are taking place here. One is to thread the ExecState* through 
451         JSValue::toBoolean and JSCell::toBoolean so that JSCell::toBoolean can check the object's 
452         JSGlobalObject to compare it to the lexical JSGlobalObject of the currently running code. If the two 
453         are distinct, then the object cannot MasqueradeAsUndefined.
454
455         The other change is to perform this comparison of JSGlobalObjects everywhere where the MasqueradesAsUndefined
456         flag in the Structure is checked. For C++ code, this check has been factored into its own function in 
457         Structure::masqueradesAsUndefined. We only perform this check in the DFG if the current JSGlobalObject has 
458         had a MasqueradesAsUndefined object allocated within its context. This conditional compilation is managed 
459         through the use of a WatchpointSet in each JSGlobalObject and alternate create() functions for JS DOM wrappers
460         that are MasqueradesAsUndefined.
461
462         * API/JSValueRef.cpp:
463         (JSValueToBoolean):
464         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
465         * bytecode/Watchpoint.h:
466         (WatchpointSet):
467         * debugger/DebuggerCallFrame.h:
468         (JSC::DebuggerCallFrame::callFrame):
469         * dfg/DFGAbstractState.cpp:
470         (JSC::DFG::AbstractState::execute):
471         * dfg/DFGCFGSimplificationPhase.cpp:
472         (JSC::DFG::CFGSimplificationPhase::run):
473         * dfg/DFGOperations.cpp:
474         * dfg/DFGOperations.h:
475         * dfg/DFGSpeculativeJIT32_64.cpp:
476         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
477         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
478         (JSC::DFG::SpeculativeJIT::compile):
479         * dfg/DFGSpeculativeJIT64.cpp:
480         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
481         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
482         (JSC::DFG::SpeculativeJIT::compile):
483         * interpreter/Interpreter.cpp:
484         (JSC::Interpreter::privateExecute):
485         * jit/JITOpcodes.cpp:
486         (JSC::JIT::emit_op_is_undefined):
487         (JSC::JIT::emit_op_jeq_null):
488         (JSC::JIT::emit_op_jneq_null):
489         (JSC::JIT::emit_op_eq_null):
490         (JSC::JIT::emit_op_neq_null):
491         * jit/JITOpcodes32_64.cpp:
492         (JSC::JIT::emit_op_is_undefined):
493         (JSC::JIT::emit_op_jeq_null):
494         (JSC::JIT::emit_op_jneq_null):
495         (JSC::JIT::emit_op_eq_null):
496         (JSC::JIT::emit_op_neq_null):
497         * jit/JITStubs.cpp:
498         (JSC::DEFINE_STUB_FUNCTION):
499         * llint/LLIntSlowPaths.cpp:
500         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
501         * llint/LowLevelInterpreter32_64.asm:
502         * llint/LowLevelInterpreter64.asm:
503         * runtime/ArrayPrototype.cpp:
504         (JSC::arrayProtoFuncFilter):
505         (JSC::arrayProtoFuncEvery):
506         (JSC::arrayProtoFuncSome):
507         * runtime/BooleanConstructor.cpp:
508         (JSC::constructBoolean):
509         (JSC::callBooleanConstructor):
510         * runtime/JSCell.h:
511         (JSCell):
512         * runtime/JSGlobalObject.cpp:
513         (JSC::JSGlobalObject::JSGlobalObject):
514         * runtime/JSGlobalObject.h:
515         (JSGlobalObject):
516         (JSC::JSGlobalObject::masqueradesAsUndefinedWatchpoint):
517         * runtime/JSString.h:
518         (JSC::JSCell::toBoolean):
519         (JSC::JSValue::toBoolean):
520         * runtime/JSValue.h:
521         * runtime/ObjectConstructor.cpp:
522         (JSC::toPropertyDescriptor):
523         * runtime/Operations.cpp:
524         (JSC::jsTypeStringForValue):
525         (JSC::jsIsObjectType):
526         * runtime/Operations.h:
527         (JSC):
528         (JSC::JSValue::equalSlowCaseInline):
529         * runtime/RegExpConstructor.cpp:
530         (JSC::setRegExpConstructorMultiline):
531         * runtime/RegExpPrototype.cpp:
532         (JSC::regExpProtoFuncToString):
533         * runtime/Structure.h:
534         (Structure):
535         (JSC::Structure::globalObjectOffset):
536         (JSC::Structure::masqueradesAsUndefined):
537         (JSC):
538
539 2012-08-14  Filip Pizlo  <fpizlo@apple.com>
540
541         Unreviewed, build fix for !ENABLE(DFG_JIT)
542
543         * jit/JITPropertyAccess.cpp:
544         (JSC::JIT::emit_op_get_by_val):
545         (JSC::JIT::emit_op_put_by_val):
546         (JSC::JIT::privateCompilePatchGetArrayLength):
547         * jit/JITPropertyAccess32_64.cpp:
548         (JSC::JIT::emit_op_get_by_val):
549         (JSC::JIT::emit_op_put_by_val):
550         (JSC::JIT::privateCompilePatchGetArrayLength):
551         * llint/LowLevelInterpreter32_64.asm:
552         * llint/LowLevelInterpreter64.asm:
553
554 2012-08-13  Filip Pizlo  <fpizlo@apple.com>
555
556         Array checks should use the structure, not the class info
557         https://bugs.webkit.org/show_bug.cgi?id=93150
558
559         Reviewed by Mark Hahnenberg.
560
561         This changes all array checks used in array accesses (get, put, get length,
562         push, pop) to use the structure, not the class info. Additionally, these
563         checks in the LLInt and baseline JIT record the structure in an ArrayProfile,
564         so that the DFG can know exactly what structure to check for.
565         
566         * CMakeLists.txt:
567         * GNUmakefile.list.am:
568         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
569         * JavaScriptCore.xcodeproj/project.pbxproj:
570         * Target.pri:
571         * bytecode/ArrayProfile.cpp: Added.
572         (JSC):
573         (JSC::ArrayProfile::computeUpdatedPrediction):
574         * bytecode/ArrayProfile.h: Added.
575         (JSC):
576         (JSC::arrayModeFromStructure):
577         (ArrayProfile):
578         (JSC::ArrayProfile::ArrayProfile):
579         (JSC::ArrayProfile::bytecodeOffset):
580         (JSC::ArrayProfile::addressOfLastSeenStructure):
581         (JSC::ArrayProfile::observeStructure):
582         (JSC::ArrayProfile::expectedStructure):
583         (JSC::ArrayProfile::structureIsPolymorphic):
584         (JSC::ArrayProfile::hasDefiniteStructure):
585         (JSC::ArrayProfile::observedArrayModes):
586         * bytecode/CodeBlock.cpp:
587         (JSC::CodeBlock::dump):
588         (JSC::CodeBlock::getArrayProfile):
589         (JSC):
590         (JSC::CodeBlock::getOrAddArrayProfile):
591         (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
592         * bytecode/CodeBlock.h:
593         (JSC::CodeBlock::executionEntryCount):
594         (JSC::CodeBlock::numberOfArrayProfiles):
595         (JSC::CodeBlock::arrayProfiles):
596         (JSC::CodeBlock::addArrayProfile):
597         (CodeBlock):
598         * bytecode/Instruction.h:
599         (JSC):
600         (JSC::Instruction::Instruction):
601         * bytecode/Opcode.h:
602         (JSC):
603         (JSC::padOpcodeName):
604         * bytecompiler/BytecodeGenerator.cpp:
605         (JSC::BytecodeGenerator::emitGetArgumentByVal):
606         (JSC::BytecodeGenerator::emitGetByVal):
607         (JSC::BytecodeGenerator::emitPutByVal):
608         * dfg/DFGAbstractState.cpp:
609         (JSC::DFG::AbstractState::initialize):
610         (JSC::DFG::AbstractState::execute):
611         * dfg/DFGAbstractValue.h:
612         (JSC::DFG::StructureAbstractValue::hasSingleton):
613         (StructureAbstractValue):
614         (JSC::DFG::StructureAbstractValue::singleton):
615         * dfg/DFGArgumentsSimplificationPhase.cpp:
616         (JSC::DFG::ArgumentsSimplificationPhase::run):
617         * dfg/DFGByteCodeParser.cpp:
618         (JSC::DFG::ByteCodeParser::parseBlock):
619         * dfg/DFGFixupPhase.cpp:
620         (JSC::DFG::FixupPhase::fixupNode):
621         * dfg/DFGSpeculativeJIT.cpp:
622         (JSC::DFG::SpeculativeJIT::speculateArray):
623         (DFG):
624         (JSC::DFG::SpeculativeJIT::compile):
625         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
626         (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
627         * dfg/DFGSpeculativeJIT.h:
628         (SpeculativeJIT):
629         * dfg/DFGSpeculativeJIT32_64.cpp:
630         (JSC::DFG::SpeculativeJIT::compile):
631         * dfg/DFGSpeculativeJIT64.cpp:
632         (JSC::DFG::SpeculativeJIT::compile):
633         * dfg/DFGStructureCheckHoistingPhase.cpp:
634         (JSC::DFG::StructureCheckHoistingPhase::run):
635         * jit/JITPropertyAccess.cpp:
636         (JSC::JIT::emit_op_get_by_val):
637         (JSC::JIT::emit_op_put_by_val):
638         (JSC::JIT::privateCompilePatchGetArrayLength):
639         * jit/JITPropertyAccess32_64.cpp:
640         (JSC::JIT::emit_op_get_by_val):
641         (JSC::JIT::emit_op_put_by_val):
642         (JSC::JIT::privateCompilePatchGetArrayLength):
643         * llint/LLIntOffsetsExtractor.cpp:
644         * llint/LowLevelInterpreter32_64.asm:
645         * llint/LowLevelInterpreter64.asm:
646         * runtime/Structure.h:
647         (Structure):
648         (JSC::Structure::classInfoOffset):
649
650 2012-08-14  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
651
652         Rename functions in the ARM port of DFG-JIT for better code readability.
653         https://bugs.webkit.org/show_bug.cgi?id=93609
654
655         Reviewed by Zoltan Herczeg.
656
657         Rename functions in the ARM port of DFG-JIT for better code
658         readability, and for following the WebKit coding style
659         wherever it is possible.
660
661         * assembler/ARMAssembler.cpp:
662         (JSC::ARMAssembler::genInt):
663         (JSC::ARMAssembler::getImm):
664         (JSC::ARMAssembler::moveImm):
665         (JSC::ARMAssembler::encodeComplexImm):
666         (JSC::ARMAssembler::dataTransfer32):
667         (JSC::ARMAssembler::baseIndexTransfer32):
668         (JSC::ARMAssembler::dataTransfer16):
669         (JSC::ARMAssembler::baseIndexTransfer16):
670         (JSC::ARMAssembler::dataTransferFloat):
671         (JSC::ARMAssembler::baseIndexTransferFloat):
672         * assembler/ARMAssembler.h:
673         (JSC::ARMAssembler::bitAnd):
674         (JSC::ARMAssembler::bitAnds):
675         (JSC::ARMAssembler::eor):
676         (JSC::ARMAssembler::eors):
677         (JSC::ARMAssembler::sub):
678         (JSC::ARMAssembler::subs):
679         (JSC::ARMAssembler::rsb):
680         (JSC::ARMAssembler::rsbs):
681         (JSC::ARMAssembler::add):
682         (JSC::ARMAssembler::adds):
683         (JSC::ARMAssembler::adc):
684         (JSC::ARMAssembler::adcs):
685         (JSC::ARMAssembler::sbc):
686         (JSC::ARMAssembler::sbcs):
687         (JSC::ARMAssembler::rsc):
688         (JSC::ARMAssembler::rscs):
689         (JSC::ARMAssembler::tst):
690         (JSC::ARMAssembler::teq):
691         (JSC::ARMAssembler::cmp):
692         (JSC::ARMAssembler::cmn):
693         (JSC::ARMAssembler::orr):
694         (JSC::ARMAssembler::orrs):
695         (JSC::ARMAssembler::mov):
696         (JSC::ARMAssembler::movw):
697         (JSC::ARMAssembler::movt):
698         (JSC::ARMAssembler::movs):
699         (JSC::ARMAssembler::bic):
700         (JSC::ARMAssembler::bics):
701         (JSC::ARMAssembler::mvn):
702         (JSC::ARMAssembler::mvns):
703         (JSC::ARMAssembler::mul):
704         (JSC::ARMAssembler::muls):
705         (JSC::ARMAssembler::mull):
706         (JSC::ARMAssembler::vmov_f64):
707         (JSC::ARMAssembler::vadd_f64):
708         (JSC::ARMAssembler::vdiv_f64):
709         (JSC::ARMAssembler::vsub_f64):
710         (JSC::ARMAssembler::vmul_f64):
711         (JSC::ARMAssembler::vcmp_f64):
712         (JSC::ARMAssembler::vsqrt_f64):
713         (JSC::ARMAssembler::vabs_f64):
714         (JSC::ARMAssembler::vneg_f64):
715         (JSC::ARMAssembler::ldrImmediate):
716         (JSC::ARMAssembler::ldrUniqueImmediate):
717         (JSC::ARMAssembler::dtrUp):
718         (JSC::ARMAssembler::dtrUpRegister):
719         (JSC::ARMAssembler::dtrDown):
720         (JSC::ARMAssembler::dtrDownRegister):
721         (JSC::ARMAssembler::halfDtrUp):
722         (JSC::ARMAssembler::halfDtrUpRegister):
723         (JSC::ARMAssembler::halfDtrDown):
724         (JSC::ARMAssembler::halfDtrDownRegister):
725         (JSC::ARMAssembler::doubleDtrUp):
726         (JSC::ARMAssembler::doubleDtrDown):
727         (JSC::ARMAssembler::push):
728         (JSC::ARMAssembler::pop):
729         (JSC::ARMAssembler::poke):
730         (JSC::ARMAssembler::peek):
731         (JSC::ARMAssembler::vmov_vfp64):
732         (JSC::ARMAssembler::vmov_arm64):
733         (JSC::ARMAssembler::vmov_vfp32):
734         (JSC::ARMAssembler::vmov_arm32):
735         (JSC::ARMAssembler::vcvt_f64_s32):
736         (JSC::ARMAssembler::vcvt_s32_f64):
737         (JSC::ARMAssembler::vcvt_u32_f64):
738         (JSC::ARMAssembler::vcvt_f64_f32):
739         (JSC::ARMAssembler::vcvt_f32_f64):
740         (JSC::ARMAssembler::clz):
741         (JSC::ARMAssembler::lslRegister):
742         (JSC::ARMAssembler::lsrRegister):
743         (JSC::ARMAssembler::asrRegister):
744         (JSC::ARMAssembler::align):
745         (JSC::ARMAssembler::loadBranchTarget):
746         (JSC::ARMAssembler::vmov):
747         * assembler/MacroAssemblerARM.cpp:
748         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
749         * assembler/MacroAssemblerARM.h:
750         (JSC::MacroAssemblerARM::add32):
751         (JSC::MacroAssemblerARM::and32):
752         (JSC::MacroAssemblerARM::lshift32):
753         (JSC::MacroAssemblerARM::mul32):
754         (JSC::MacroAssemblerARM::or32):
755         (JSC::MacroAssemblerARM::rshift32):
756         (JSC::MacroAssemblerARM::urshift32):
757         (JSC::MacroAssemblerARM::sub32):
758         (JSC::MacroAssemblerARM::xor32):
759         (JSC::MacroAssemblerARM::countLeadingZeros32):
760         (JSC::MacroAssemblerARM::convertibleLoadPtr):
761         (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
762         (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
763         (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
764         (JSC::MacroAssemblerARM::store32):
765         (JSC::MacroAssemblerARM::pop):
766         (JSC::MacroAssemblerARM::push):
767         (JSC::MacroAssemblerARM::move):
768         (JSC::MacroAssemblerARM::swap):
769         (JSC::MacroAssemblerARM::branch32):
770         (JSC::MacroAssemblerARM::branchTest32):
771         (JSC::MacroAssemblerARM::mull32):
772         (JSC::MacroAssemblerARM::branchSub32):
773         (JSC::MacroAssemblerARM::compare32):
774         (JSC::MacroAssemblerARM::test32):
775         (JSC::MacroAssemblerARM::load32):
776         (JSC::MacroAssemblerARM::relativeTableJump):
777         (JSC::MacroAssemblerARM::moveWithPatch):
778         (JSC::MacroAssemblerARM::loadDouble):
779         (JSC::MacroAssemblerARM::moveDouble):
780         (JSC::MacroAssemblerARM::addDouble):
781         (JSC::MacroAssemblerARM::divDouble):
782         (JSC::MacroAssemblerARM::subDouble):
783         (JSC::MacroAssemblerARM::mulDouble):
784         (JSC::MacroAssemblerARM::sqrtDouble):
785         (JSC::MacroAssemblerARM::absDouble):
786         (JSC::MacroAssemblerARM::negateDouble):
787         (JSC::MacroAssemblerARM::convertInt32ToDouble):
788         (JSC::MacroAssemblerARM::convertFloatToDouble):
789         (JSC::MacroAssemblerARM::convertDoubleToFloat):
790         (JSC::MacroAssemblerARM::branchDouble):
791         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
792         (JSC::MacroAssemblerARM::branchTruncateDoubleToUint32):
793         (JSC::MacroAssemblerARM::truncateDoubleToInt32):
794         (JSC::MacroAssemblerARM::truncateDoubleToUint32):
795         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
796         (JSC::MacroAssemblerARM::branchDoubleNonZero):
797         (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
798
799 2012-08-13  Simon Hausmann  <simon.hausmann@nokia.com>
800
801         Unreviewed, rolling out r125444.
802         http://trac.webkit.org/changeset/125444
803         https://bugs.webkit.org/show_bug.cgi?id=93872
804
805         Broke some tests
806
807         * Target.pri:
808
809 2012-08-13  Simon Hausmann  <simon.hausmann@nokia.com>
810
811         [Qt] Replace use of internal Weak smart pointer with JSWeakObjectMap
812         https://bugs.webkit.org/show_bug.cgi?id=93872
813
814         Reviewed by Kenneth Rohde Christiansen.
815
816         * Target.pri: Add missing JSWeakObjectMap file to build.
817
818 2012-08-13  Raphael Kubo da Costa  <rakuco@webkit.org>
819
820         [CMake] Remove glib-related Find modules and write single new one instead.
821         https://bugs.webkit.org/show_bug.cgi?id=93786
822
823         Reviewed by Rob Buis.
824
825         * shell/PlatformEfl.cmake: Use GLIB_* instead of Glib_*.
826
827 2012-08-12  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
828
829         Doesn't build with ENABLE_JIT=0
830         https://bugs.webkit.org/show_bug.cgi?id=85042
831
832         Reviewed by Eric Seidel.
833
834         Include headers without which CallFrame.h does not build, and
835         fix gcc warning about comparing unsigned int with 0.
836
837         * dfg/DFGDriver.cpp:
838         * interpreter/Interpreter.cpp:
839         (JSC::Interpreter::isOpcode):
840
841 2012-08-10  Yong Li  <yoli@rim.com>
842
843         [BlackBerry] GCActivityCallback should always schedule GC even allocated bytes is a small number
844         https://bugs.webkit.org/show_bug.cgi?id=93650
845
846         Reviewed by Rob Buis.
847
848         Even a small number of allocated JS objects could hold expensive resources.
849
850         * runtime/GCActivityCallbackBlackBerry.cpp:
851         (JSC::DefaultGCActivityCallback::didAllocate):
852
853 2012-08-09  Yong Li  <yoli@rim.com>
854
855         [QNX] Implement getCPUTime() for OS(QNX)
856         https://bugs.webkit.org/show_bug.cgi?id=93516
857
858         Reviewed by George Staikos.
859
860         Implement getCPUTime() with CLOCK_THREAD_CPUTIME_ID so it will tell
861         exactly how long the current thread has spent without being impacted
862         by other things.
863
864         * runtime/TimeoutChecker.cpp:
865         (JSC::getCPUTime):
866
867 2012-08-08  Shane Stephens  <shanestephens@google.com>
868
869         Compile flag for CSS Hierarchies
870         https://bugs.webkit.org/show_bug.cgi?id=92433
871
872         Reviewed by Tony Chang.
873
874         * Configurations/FeatureDefines.xcconfig:
875
876 2012-08-08  Benjamin Poulain  <bpoulain@apple.com>
877
878         Use char* instead of LChar* for the public interface of String construction from literals
879         https://bugs.webkit.org/show_bug.cgi?id=93402
880
881         Reviewed by Michael Saboff.
882
883         Update JSC' Identifier to use StringImpl::createFromLiteral with a char*.
884
885         * runtime/Identifier.cpp:
886         (JSC::IdentifierASCIIStringTranslator::translate):
887
888 2012-08-08  Patrick Gansterer  <paroga@webkit.org>
889
890         Remove ce_time.(cpp|h) from list of source files
891         https://bugs.webkit.org/show_bug.cgi?id=93446
892
893         Reviewed by Simon Hausmann.
894
895         r125004 removed the last dependency on functions defined in ce_time.cpp.
896
897         * Target.pri:
898
899 2012-08-08  Patrick Gansterer  <paroga@webkit.org>
900
901         [WIN] Use GetTimeZoneInformation() for getting the timezone name
902         https://bugs.webkit.org/show_bug.cgi?id=91936
903
904         Reviewed by Ryosuke Niwa.
905
906         The MS CRT implementation of strftime calls the same functions in the background.
907         Using them directly avoids the overhead of parsing the format string and removes
908         the dependency on strftime() for WinCE where this function does not exist.
909
910         * runtime/DateConversion.cpp:
911         (JSC::formatTime):
912
913 2012-08-07  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
914
915         Refactor magic numbers in the ARM port of DFG-JIT
916         https://bugs.webkit.org/show_bug.cgi?id=93348
917
918         Reviewed by Eric Seidel.
919
920         Introduce new names for hard-coded magic numbers.
921         Refactor constant with confusing names to more descriptive ones.
922
923         * assembler/ARMAssembler.cpp:
924         (JSC::ARMAssembler::patchConstantPoolLoad):
925         (JSC::ARMAssembler::getOp2):
926         (JSC::ARMAssembler::genInt):
927         (JSC::ARMAssembler::getImm):
928         (JSC::ARMAssembler::moveImm):
929         (JSC::ARMAssembler::encodeComplexImm):
930         (JSC::ARMAssembler::dataTransfer32):
931         (JSC::ARMAssembler::dataTransfer16):
932         (JSC::ARMAssembler::dataTransferFloat):
933         (JSC::ARMAssembler::executableCopy):
934         * assembler/ARMAssembler.h:
935         (JSC::ARMAssembler::emitInstruction):
936         (JSC::ARMAssembler::ands_r):
937         (JSC::ARMAssembler::eors_r):
938         (JSC::ARMAssembler::subs_r):
939         (JSC::ARMAssembler::rsbs_r):
940         (JSC::ARMAssembler::adds_r):
941         (JSC::ARMAssembler::adcs_r):
942         (JSC::ARMAssembler::sbcs_r):
943         (JSC::ARMAssembler::rscs_r):
944         (JSC::ARMAssembler::tst_r):
945         (JSC::ARMAssembler::teq_r):
946         (JSC::ARMAssembler::cmp_r):
947         (JSC::ARMAssembler::cmn_r):
948         (JSC::ARMAssembler::orrs_r):
949         (JSC::ARMAssembler::movs_r):
950         (JSC::ARMAssembler::bics_r):
951         (JSC::ARMAssembler::mvns_r):
952         (JSC::ARMAssembler::muls_r):
953         (JSC::ARMAssembler::ldr_imm):
954         (JSC::ARMAssembler::ldr_un_imm):
955         (JSC::ARMAssembler::dtr_u):
956         (JSC::ARMAssembler::dtr_ur):
957         (JSC::ARMAssembler::dtr_dr):
958         (JSC::ARMAssembler::dtrh_u):
959         (JSC::ARMAssembler::dtrh_ur):
960         (JSC::ARMAssembler::fdtr_u):
961         (JSC::ARMAssembler::push_r):
962         (JSC::ARMAssembler::pop_r):
963         (JSC::ARMAssembler::getLdrImmAddress):
964         (JSC::ARMAssembler::getLdrImmAddressOnPool):
965         (JSC::ARMAssembler::patchConstantPoolLoad):
966         (JSC::ARMAssembler::repatchCompact):
967         (JSC::ARMAssembler::replaceWithJump):
968         (JSC::ARMAssembler::replaceWithLoad):
969         (JSC::ARMAssembler::replaceWithAddressComputation):
970         (JSC::ARMAssembler::getOp2Byte):
971         (JSC::ARMAssembler::getOp2Half):
972         (JSC::ARMAssembler::getImm16Op2):
973         (JSC::ARMAssembler::placeConstantPoolBarrier):
974         (JSC::ARMAssembler::getConditionalField):
975         * assembler/MacroAssemblerARM.cpp:
976         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
977         * assembler/MacroAssemblerARM.h:
978         (JSC::MacroAssemblerARM::and32):
979         (JSC::MacroAssemblerARM::branch32):
980         (JSC::MacroAssemblerARM::branchTest32):
981         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
982
983 2012-08-07  Benjamin Poulain  <benjamin@webkit.org>
984
985         Use the initialization from literal for JSC's Identifiers
986         https://bugs.webkit.org/show_bug.cgi?id=93193
987
988         Reviewed by Geoffrey Garen.
989
990         This patches modify Identifier ot take advantage of the new initialization from literal.
991
992         In addition to the memory savings (~600bytes per instance), this gives us a 2% speed
993         improvement on CommonIdentifiers on average.
994
995         * runtime/CommonIdentifiers.cpp:
996         (JSC::CommonIdentifiers::CommonIdentifiers):
997         Null and empty strings are forbidden for literal initialization. Use the most efficient constructors
998         instead of a literal.
999
1000         * runtime/Identifier.cpp:
1001         (IdentifierASCIIStringTranslator):
1002         Rename IdentifierCStringTranslator to IdentifierASCIIStringTranslator to make the text encoding
1003         explicit.
1004         (JSC::IdentifierASCIIStringTranslator::hash):
1005         (JSC::IdentifierASCIIStringTranslator::equal):
1006         (JSC::IdentifierASCIIStringTranslator::translate): Use the fast initialization from literal.
1007         (JSC::Identifier::add):
1008         * runtime/Identifier.h:
1009         (JSC::Identifier::Identifier):
1010
1011 2012-08-07  Simon Hausmann  <simon.hausmann@nokia.com>
1012
1013         [Qt][Win] Remove pthreads linkage
1014
1015         Reviewed by Csaba Osztrogonác.
1016
1017         After r124823 linkage to pthreads is not needed anymore for the Windows
1018         build.
1019
1020         * JavaScriptCore.pri:
1021
1022 2012-08-07  Gabor Ballabas  <gaborb@inf.u-szeged.hu>
1023
1024         Refactor emit*Inst functions and introduce toARMWord functions in DFG-JIT's traditional ARM port
1025         https://bugs.webkit.org/show_bug.cgi?id=93266
1026
1027         Reviewed by Csaba Osztrogonác.
1028
1029         First part of a bigger refactoring issue trying to make traditional
1030         ARM DFG-JIT port easier to read and understand.
1031
1032
1033         * assembler/ARMAssembler.h:
1034         (JSC::ARMAssembler::emitInstruction):
1035         (JSC::ARMAssembler::emitDoublePrecisionInstruction):
1036         (JSC::ARMAssembler::emitSinglePrecisionInstruction):
1037         (JSC::ARMAssembler::and_r):
1038         (JSC::ARMAssembler::ands_r):
1039         (JSC::ARMAssembler::eor_r):
1040         (JSC::ARMAssembler::eors_r):
1041         (JSC::ARMAssembler::sub_r):
1042         (JSC::ARMAssembler::subs_r):
1043         (JSC::ARMAssembler::rsb_r):
1044         (JSC::ARMAssembler::rsbs_r):
1045         (JSC::ARMAssembler::add_r):
1046         (JSC::ARMAssembler::adds_r):
1047         (JSC::ARMAssembler::adc_r):
1048         (JSC::ARMAssembler::adcs_r):
1049         (JSC::ARMAssembler::sbc_r):
1050         (JSC::ARMAssembler::sbcs_r):
1051         (JSC::ARMAssembler::rsc_r):
1052         (JSC::ARMAssembler::rscs_r):
1053         (JSC::ARMAssembler::tst_r):
1054         (JSC::ARMAssembler::teq_r):
1055         (JSC::ARMAssembler::cmp_r):
1056         (JSC::ARMAssembler::cmn_r):
1057         (JSC::ARMAssembler::orr_r):
1058         (JSC::ARMAssembler::orrs_r):
1059         (JSC::ARMAssembler::mov_r):
1060         (JSC::ARMAssembler::movw_r):
1061         (JSC::ARMAssembler::movt_r):
1062         (JSC::ARMAssembler::movs_r):
1063         (JSC::ARMAssembler::bic_r):
1064         (JSC::ARMAssembler::bics_r):
1065         (JSC::ARMAssembler::mvn_r):
1066         (JSC::ARMAssembler::mvns_r):
1067         (JSC::ARMAssembler::mul_r):
1068         (JSC::ARMAssembler::muls_r):
1069         (JSC::ARMAssembler::mull_r):
1070         (JSC::ARMAssembler::vmov_f64_r):
1071         (JSC::ARMAssembler::vadd_f64_r):
1072         (JSC::ARMAssembler::vdiv_f64_r):
1073         (JSC::ARMAssembler::vsub_f64_r):
1074         (JSC::ARMAssembler::vmul_f64_r):
1075         (JSC::ARMAssembler::vcmp_f64_r):
1076         (JSC::ARMAssembler::vsqrt_f64_r):
1077         (JSC::ARMAssembler::vabs_f64_r):
1078         (JSC::ARMAssembler::vneg_f64_r):
1079         (JSC::ARMAssembler::ldr_imm):
1080         (JSC::ARMAssembler::ldr_un_imm):
1081         (JSC::ARMAssembler::dtr_u):
1082         (JSC::ARMAssembler::dtr_ur):
1083         (JSC::ARMAssembler::dtr_d):
1084         (JSC::ARMAssembler::dtr_dr):
1085         (JSC::ARMAssembler::dtrh_u):
1086         (JSC::ARMAssembler::dtrh_ur):
1087         (JSC::ARMAssembler::dtrh_d):
1088         (JSC::ARMAssembler::dtrh_dr):
1089         (JSC::ARMAssembler::fdtr_u):
1090         (JSC::ARMAssembler::fdtr_d):
1091         (JSC::ARMAssembler::push_r):
1092         (JSC::ARMAssembler::pop_r):
1093         (JSC::ARMAssembler::vmov_vfp64_r):
1094         (JSC::ARMAssembler::vmov_arm64_r):
1095         (JSC::ARMAssembler::vmov_vfp32_r):
1096         (JSC::ARMAssembler::vmov_arm32_r):
1097         (JSC::ARMAssembler::vcvt_f64_s32_r):
1098         (JSC::ARMAssembler::vcvt_s32_f64_r):
1099         (JSC::ARMAssembler::vcvt_u32_f64_r):
1100         (JSC::ARMAssembler::vcvt_f64_f32_r):
1101         (JSC::ARMAssembler::vcvt_f32_f64_r):
1102         (JSC::ARMAssembler::vmrs_apsr):
1103         (JSC::ARMAssembler::clz_r):
1104         (JSC::ARMAssembler::bx):
1105         (JSC::ARMAssembler::blx):
1106         (JSC::ARMAssembler::linkJump):
1107         (JSC::ARMAssembler::toARMWord):
1108         (ARMAssembler):
1109
1110 2012-08-06  Patrick Gansterer  <paroga@webkit.org>
1111
1112         [WIN] Remove dependency on pthread from MachineStackMarker
1113         https://bugs.webkit.org/show_bug.cgi?id=68429
1114
1115         Reviewed by Geoffrey Garen.
1116
1117         Windows has no support for calling a destructor for thread specific data.
1118         Since we need more control over creating and deleting thread specific keys
1119         we can not simply extend WTF::ThreadSpecific with this functionality.
1120
1121         All thread specific keys created via the new API get stored in a list.
1122         After a thread function finished we iterate over this list and call
1123         the registered destructor for every item if needed.
1124
1125         * heap/MachineStackMarker.cpp:  Use the new functions instead of pthread directly.
1126         (JSC::MachineThreads::~MachineThreads):
1127         (JSC::MachineThreads::makeUsableFromMultipleThreads):
1128         (JSC::MachineThreads::addCurrentThread):
1129         * heap/MachineStackMarker.h:
1130         (MachineThreads):
1131
1132 2012-08-06  Patrick Gansterer  <paroga@webkit.org>
1133
1134         Unify JSC date and time formating functions
1135         https://bugs.webkit.org/show_bug.cgi?id=92282
1136
1137         Reviewed by Geoffrey Garen.
1138
1139         Replace the existing functions for formating GregorianDateTime
1140         with one single function. This removes some code duplications
1141         in DatePrototype and is a preperation to fix encoding issues,
1142         since we can add UChar* values to the resulting string now.
1143
1144         * runtime/DateConstructor.cpp:
1145         (JSC::callDate):
1146         * runtime/DateConversion.cpp:
1147         (JSC::formatDateTime):
1148         * runtime/DateConversion.h:
1149         (JSC):
1150         * runtime/DatePrototype.cpp:
1151         (JSC::formateDateInstance):
1152         (JSC::dateProtoFuncToString):
1153         (JSC::dateProtoFuncToUTCString):
1154         (JSC::dateProtoFuncToDateString):
1155         (JSC::dateProtoFuncToTimeString):
1156         (JSC::dateProtoFuncToGMTString):
1157
1158 2012-08-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1159
1160         Unreviewed. Fix make distcheck.
1161
1162         * GNUmakefile.list.am: Add missing header file.
1163
1164 2012-08-05  Peter Wang  <peter.wang@torchmobile.com.cn>
1165
1166         Web Inspector: [JSC] implement setting breakpoints by line:column
1167         https://bugs.webkit.org/show_bug.cgi?id=53003
1168
1169         Reviewed by Geoffrey Garen.
1170
1171         Add a counter to Lexer to record the column info of each Token. Add a column parameter to
1172         op_debug, cti_op_debug, and _llint_op_debug byte-code command.
1173
1174         * bytecode/CodeBlock.cpp:
1175         (JSC::CodeBlock::dump):
1176         * bytecode/Opcode.h:
1177         (JSC):
1178         (JSC::padOpcodeName):
1179         * bytecompiler/BytecodeGenerator.cpp:
1180         (JSC::BytecodeGenerator::resolve):
1181         (JSC::BytecodeGenerator::emitDebugHook):
1182         * bytecompiler/BytecodeGenerator.h:
1183         (BytecodeGenerator):
1184         * bytecompiler/NodesCodegen.cpp:
1185         (JSC::ArrayNode::toArgumentList):
1186         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1187         (JSC::ConstStatementNode::emitBytecode):
1188         (JSC::EmptyStatementNode::emitBytecode):
1189         (JSC::DebuggerStatementNode::emitBytecode):
1190         (JSC::ExprStatementNode::emitBytecode):
1191         (JSC::VarStatementNode::emitBytecode):
1192         (JSC::IfNode::emitBytecode):
1193         (JSC::IfElseNode::emitBytecode):
1194         (JSC::DoWhileNode::emitBytecode):
1195         (JSC::WhileNode::emitBytecode):
1196         (JSC::ForNode::emitBytecode):
1197         (JSC::ForInNode::emitBytecode):
1198         (JSC::ContinueNode::emitBytecode):
1199         (JSC::BreakNode::emitBytecode):
1200         (JSC::ReturnNode::emitBytecode):
1201         (JSC::WithNode::emitBytecode):
1202         (JSC::SwitchNode::emitBytecode):
1203         (JSC::LabelNode::emitBytecode):
1204         (JSC::ThrowNode::emitBytecode):
1205         (JSC::TryNode::emitBytecode):
1206         (JSC::ProgramNode::emitBytecode):
1207         (JSC::EvalNode::emitBytecode):
1208         (JSC::FunctionBodyNode::emitBytecode):
1209         * debugger/Debugger.h:
1210         * interpreter/Interpreter.cpp:
1211         (JSC::Interpreter::unwindCallFrame):
1212         (JSC::Interpreter::throwException):
1213         (JSC::Interpreter::debug):
1214         (JSC::Interpreter::privateExecute):
1215         * interpreter/Interpreter.h:
1216         (Interpreter):
1217         * jit/JITOpcodes.cpp:
1218         (JSC::JIT::emit_op_debug):
1219         * jit/JITOpcodes32_64.cpp:
1220         (JSC::JIT::emit_op_debug):
1221         * jit/JITStubs.cpp:
1222         (JSC::DEFINE_STUB_FUNCTION):
1223         * llint/LLIntSlowPaths.cpp:
1224         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
1225         * llint/LowLevelInterpreter.asm:
1226         * parser/ASTBuilder.h:
1227         (ASTBuilder):
1228         (JSC::ASTBuilder::createCommaExpr):
1229         (JSC::ASTBuilder::createLogicalNot):
1230         (JSC::ASTBuilder::createUnaryPlus):
1231         (JSC::ASTBuilder::createVoid):
1232         (JSC::ASTBuilder::thisExpr):
1233         (JSC::ASTBuilder::createResolve):
1234         (JSC::ASTBuilder::createObjectLiteral):
1235         (JSC::ASTBuilder::createArray):
1236         (JSC::ASTBuilder::createNumberExpr):
1237         (JSC::ASTBuilder::createString):
1238         (JSC::ASTBuilder::createBoolean):
1239         (JSC::ASTBuilder::createNull):
1240         (JSC::ASTBuilder::createBracketAccess):
1241         (JSC::ASTBuilder::createDotAccess):
1242         (JSC::ASTBuilder::createRegExp):
1243         (JSC::ASTBuilder::createNewExpr):
1244         (JSC::ASTBuilder::createConditionalExpr):
1245         (JSC::ASTBuilder::createAssignResolve):
1246         (JSC::ASTBuilder::createFunctionExpr):
1247         (JSC::ASTBuilder::createFunctionBody):
1248         (JSC::ASTBuilder::createGetterOrSetterProperty):
1249         (JSC::ASTBuilder::createArgumentsList):
1250         (JSC::ASTBuilder::createPropertyList):
1251         (JSC::ASTBuilder::createFuncDeclStatement):
1252         (JSC::ASTBuilder::createBlockStatement):
1253         (JSC::ASTBuilder::createExprStatement):
1254         (JSC::ASTBuilder::createIfStatement):
1255         (JSC::ASTBuilder::createForLoop):
1256         (JSC::ASTBuilder::createForInLoop):
1257         (JSC::ASTBuilder::createEmptyStatement):
1258         (JSC::ASTBuilder::createVarStatement):
1259         (JSC::ASTBuilder::createReturnStatement):
1260         (JSC::ASTBuilder::createBreakStatement):
1261         (JSC::ASTBuilder::createContinueStatement):
1262         (JSC::ASTBuilder::createTryStatement):
1263         (JSC::ASTBuilder::createSwitchStatement):
1264         (JSC::ASTBuilder::createWhileStatement):
1265         (JSC::ASTBuilder::createDoWhileStatement):
1266         (JSC::ASTBuilder::createLabelStatement):
1267         (JSC::ASTBuilder::createWithStatement):
1268         (JSC::ASTBuilder::createThrowStatement):
1269         (JSC::ASTBuilder::createDebugger):
1270         (JSC::ASTBuilder::createConstStatement):
1271         (JSC::ASTBuilder::appendConstDecl):
1272         (JSC::ASTBuilder::combineCommaNodes):
1273         (JSC::ASTBuilder::appendBinaryOperation):
1274         (JSC::ASTBuilder::createAssignment):
1275         (JSC::ASTBuilder::createNumber):
1276         (JSC::ASTBuilder::makeTypeOfNode):
1277         (JSC::ASTBuilder::makeDeleteNode):
1278         (JSC::ASTBuilder::makeNegateNode):
1279         (JSC::ASTBuilder::makeBitwiseNotNode):
1280         (JSC::ASTBuilder::makeMultNode):
1281         (JSC::ASTBuilder::makeDivNode):
1282         (JSC::ASTBuilder::makeModNode):
1283         (JSC::ASTBuilder::makeAddNode):
1284         (JSC::ASTBuilder::makeSubNode):
1285         (JSC::ASTBuilder::makeLeftShiftNode):
1286         (JSC::ASTBuilder::makeRightShiftNode):
1287         (JSC::ASTBuilder::makeURightShiftNode):
1288         (JSC::ASTBuilder::makeBitOrNode):
1289         (JSC::ASTBuilder::makeBitAndNode):
1290         (JSC::ASTBuilder::makeBitXOrNode):
1291         (JSC::ASTBuilder::makeFunctionCallNode):
1292         (JSC::ASTBuilder::makeBinaryNode):
1293         (JSC::ASTBuilder::makeAssignNode):
1294         (JSC::ASTBuilder::makePrefixNode):
1295         (JSC::ASTBuilder::makePostfixNode):
1296         * parser/Lexer.cpp:
1297         (JSC::::setCode):
1298         (JSC::::internalShift):
1299         (JSC::::shift):
1300         (JSC::::lex):
1301         * parser/Lexer.h:
1302         (Lexer):
1303         (JSC::Lexer::currentColumnNumber):
1304         (JSC::::lexExpectIdentifier):
1305         * parser/NodeConstructors.h:
1306         (JSC::Node::Node):
1307         (JSC::ExpressionNode::ExpressionNode):
1308         (JSC::StatementNode::StatementNode):
1309         (JSC::NullNode::NullNode):
1310         (JSC::BooleanNode::BooleanNode):
1311         (JSC::NumberNode::NumberNode):
1312         (JSC::StringNode::StringNode):
1313         (JSC::RegExpNode::RegExpNode):
1314         (JSC::ThisNode::ThisNode):
1315         (JSC::ResolveNode::ResolveNode):
1316         (JSC::ArrayNode::ArrayNode):
1317         (JSC::PropertyListNode::PropertyListNode):
1318         (JSC::ObjectLiteralNode::ObjectLiteralNode):
1319         (JSC::BracketAccessorNode::BracketAccessorNode):
1320         (JSC::DotAccessorNode::DotAccessorNode):
1321         (JSC::ArgumentListNode::ArgumentListNode):
1322         (JSC::NewExprNode::NewExprNode):
1323         (JSC::EvalFunctionCallNode::EvalFunctionCallNode):
1324         (JSC::FunctionCallValueNode::FunctionCallValueNode):
1325         (JSC::FunctionCallResolveNode::FunctionCallResolveNode):
1326         (JSC::FunctionCallBracketNode::FunctionCallBracketNode):
1327         (JSC::FunctionCallDotNode::FunctionCallDotNode):
1328         (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
1329         (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
1330         (JSC::PrePostResolveNode::PrePostResolveNode):
1331         (JSC::PostfixResolveNode::PostfixResolveNode):
1332         (JSC::PostfixBracketNode::PostfixBracketNode):
1333         (JSC::PostfixDotNode::PostfixDotNode):
1334         (JSC::PostfixErrorNode::PostfixErrorNode):
1335         (JSC::DeleteResolveNode::DeleteResolveNode):
1336         (JSC::DeleteBracketNode::DeleteBracketNode):
1337         (JSC::DeleteDotNode::DeleteDotNode):
1338         (JSC::DeleteValueNode::DeleteValueNode):
1339         (JSC::VoidNode::VoidNode):
1340         (JSC::TypeOfResolveNode::TypeOfResolveNode):
1341         (JSC::TypeOfValueNode::TypeOfValueNode):
1342         (JSC::PrefixResolveNode::PrefixResolveNode):
1343         (JSC::PrefixBracketNode::PrefixBracketNode):
1344         (JSC::PrefixDotNode::PrefixDotNode):
1345         (JSC::PrefixErrorNode::PrefixErrorNode):
1346         (JSC::UnaryOpNode::UnaryOpNode):
1347         (JSC::UnaryPlusNode::UnaryPlusNode):
1348         (JSC::NegateNode::NegateNode):
1349         (JSC::BitwiseNotNode::BitwiseNotNode):
1350         (JSC::LogicalNotNode::LogicalNotNode):
1351         (JSC::BinaryOpNode::BinaryOpNode):
1352         (JSC::MultNode::MultNode):
1353         (JSC::DivNode::DivNode):
1354         (JSC::ModNode::ModNode):
1355         (JSC::AddNode::AddNode):
1356         (JSC::SubNode::SubNode):
1357         (JSC::LeftShiftNode::LeftShiftNode):
1358         (JSC::RightShiftNode::RightShiftNode):
1359         (JSC::UnsignedRightShiftNode::UnsignedRightShiftNode):
1360         (JSC::LessNode::LessNode):
1361         (JSC::GreaterNode::GreaterNode):
1362         (JSC::LessEqNode::LessEqNode):
1363         (JSC::GreaterEqNode::GreaterEqNode):
1364         (JSC::ThrowableBinaryOpNode::ThrowableBinaryOpNode):
1365         (JSC::InstanceOfNode::InstanceOfNode):
1366         (JSC::InNode::InNode):
1367         (JSC::EqualNode::EqualNode):
1368         (JSC::NotEqualNode::NotEqualNode):
1369         (JSC::StrictEqualNode::StrictEqualNode):
1370         (JSC::NotStrictEqualNode::NotStrictEqualNode):
1371         (JSC::BitAndNode::BitAndNode):
1372         (JSC::BitOrNode::BitOrNode):
1373         (JSC::BitXOrNode::BitXOrNode):
1374         (JSC::LogicalOpNode::LogicalOpNode):
1375         (JSC::ConditionalNode::ConditionalNode):
1376         (JSC::ReadModifyResolveNode::ReadModifyResolveNode):
1377         (JSC::AssignResolveNode::AssignResolveNode):
1378         (JSC::ReadModifyBracketNode::ReadModifyBracketNode):
1379         (JSC::AssignBracketNode::AssignBracketNode):
1380         (JSC::AssignDotNode::AssignDotNode):
1381         (JSC::ReadModifyDotNode::ReadModifyDotNode):
1382         (JSC::AssignErrorNode::AssignErrorNode):
1383         (JSC::CommaNode::CommaNode):
1384         (JSC::ConstStatementNode::ConstStatementNode):
1385         (JSC::EmptyStatementNode::EmptyStatementNode):
1386         (JSC::DebuggerStatementNode::DebuggerStatementNode):
1387         (JSC::ExprStatementNode::ExprStatementNode):
1388         (JSC::VarStatementNode::VarStatementNode):
1389         (JSC::IfNode::IfNode):
1390         (JSC::IfElseNode::IfElseNode):
1391         (JSC::DoWhileNode::DoWhileNode):
1392         (JSC::WhileNode::WhileNode):
1393         (JSC::ForNode::ForNode):
1394         (JSC::ContinueNode::ContinueNode):
1395         (JSC::BreakNode::BreakNode):
1396         (JSC::ReturnNode::ReturnNode):
1397         (JSC::WithNode::WithNode):
1398         (JSC::LabelNode::LabelNode):
1399         (JSC::ThrowNode::ThrowNode):
1400         (JSC::TryNode::TryNode):
1401         (JSC::FuncExprNode::FuncExprNode):
1402         (JSC::FuncDeclNode::FuncDeclNode):
1403         (JSC::SwitchNode::SwitchNode):
1404         (JSC::ConstDeclNode::ConstDeclNode):
1405         (JSC::BlockNode::BlockNode):
1406         (JSC::ForInNode::ForInNode):
1407         * parser/Nodes.cpp:
1408         (JSC::StatementNode::setLoc):
1409         (JSC):
1410         (JSC::ScopeNode::ScopeNode):
1411         (JSC::ProgramNode::ProgramNode):
1412         (JSC::ProgramNode::create):
1413         (JSC::EvalNode::EvalNode):
1414         (JSC::EvalNode::create):
1415         (JSC::FunctionBodyNode::FunctionBodyNode):
1416         (JSC::FunctionBodyNode::create):
1417         * parser/Nodes.h:
1418         (Node):
1419         (JSC::Node::columnNo):
1420         (ExpressionNode):
1421         (StatementNode):
1422         (JSC::StatementNode::column):
1423         (NullNode):
1424         (BooleanNode):
1425         (NumberNode):
1426         (StringNode):
1427         (RegExpNode):
1428         (ThisNode):
1429         (ResolveNode):
1430         (ArrayNode):
1431         (PropertyListNode):
1432         (ObjectLiteralNode):
1433         (BracketAccessorNode):
1434         (DotAccessorNode):
1435         (ArgumentListNode):
1436         (NewExprNode):
1437         (EvalFunctionCallNode):
1438         (FunctionCallValueNode):
1439         (FunctionCallResolveNode):
1440         (FunctionCallBracketNode):
1441         (FunctionCallDotNode):
1442         (CallFunctionCallDotNode):
1443         (ApplyFunctionCallDotNode):
1444         (PrePostResolveNode):
1445         (PostfixResolveNode):
1446         (PostfixBracketNode):
1447         (PostfixDotNode):
1448         (PostfixErrorNode):
1449         (DeleteResolveNode):
1450         (DeleteBracketNode):
1451         (DeleteDotNode):
1452         (DeleteValueNode):
1453         (VoidNode):
1454         (TypeOfResolveNode):
1455         (TypeOfValueNode):
1456         (PrefixResolveNode):
1457         (PrefixBracketNode):
1458         (PrefixDotNode):
1459         (PrefixErrorNode):
1460         (UnaryOpNode):
1461         (UnaryPlusNode):
1462         (NegateNode):
1463         (BitwiseNotNode):
1464         (LogicalNotNode):
1465         (BinaryOpNode):
1466         (MultNode):
1467         (DivNode):
1468         (ModNode):
1469         (AddNode):
1470         (SubNode):
1471         (LeftShiftNode):
1472         (RightShiftNode):
1473         (UnsignedRightShiftNode):
1474         (LessNode):
1475         (GreaterNode):
1476         (LessEqNode):
1477         (GreaterEqNode):
1478         (ThrowableBinaryOpNode):
1479         (InstanceOfNode):
1480         (InNode):
1481         (EqualNode):
1482         (NotEqualNode):
1483         (StrictEqualNode):
1484         (NotStrictEqualNode):
1485         (BitAndNode):
1486         (BitOrNode):
1487         (BitXOrNode):
1488         (LogicalOpNode):
1489         (ConditionalNode):
1490         (ReadModifyResolveNode):
1491         (AssignResolveNode):
1492         (ReadModifyBracketNode):
1493         (AssignBracketNode):
1494         (AssignDotNode):
1495         (ReadModifyDotNode):
1496         (AssignErrorNode):
1497         (CommaNode):
1498         (ConstDeclNode):
1499         (ConstStatementNode):
1500         (BlockNode):
1501         (EmptyStatementNode):
1502         (DebuggerStatementNode):
1503         (ExprStatementNode):
1504         (VarStatementNode):
1505         (IfNode):
1506         (IfElseNode):
1507         (DoWhileNode):
1508         (WhileNode):
1509         (ForNode):
1510         (ForInNode):
1511         (ContinueNode):
1512         (BreakNode):
1513         (ReturnNode):
1514         (WithNode):
1515         (LabelNode):
1516         (ThrowNode):
1517         (TryNode):
1518         (ScopeNode):
1519         (ProgramNode):
1520         (EvalNode):
1521         (FunctionBodyNode):
1522         (FuncExprNode):
1523         (FuncDeclNode):
1524         (SwitchNode):
1525         * parser/Parser.cpp:
1526         (JSC::::parseSourceElements):
1527         (JSC::::parseVarDeclaration):
1528         (JSC::::parseConstDeclaration):
1529         (JSC::::parseDoWhileStatement):
1530         (JSC::::parseWhileStatement):
1531         (JSC::::parseVarDeclarationList):
1532         (JSC::::parseConstDeclarationList):
1533         (JSC::::parseForStatement):
1534         (JSC::::parseBreakStatement):
1535         (JSC::::parseContinueStatement):
1536         (JSC::::parseReturnStatement):
1537         (JSC::::parseThrowStatement):
1538         (JSC::::parseWithStatement):
1539         (JSC::::parseSwitchStatement):
1540         (JSC::::parseTryStatement):
1541         (JSC::::parseDebuggerStatement):
1542         (JSC::::parseBlockStatement):
1543         (JSC::::parseStatement):
1544         (JSC::::parseFunctionBody):
1545         (JSC::::parseFunctionInfo):
1546         (JSC::::parseFunctionDeclaration):
1547         (JSC::::parseExpressionOrLabelStatement):
1548         (JSC::::parseExpressionStatement):
1549         (JSC::::parseIfStatement):
1550         (JSC::::parseExpression):
1551         (JSC::::parseAssignmentExpression):
1552         (JSC::::parseConditionalExpression):
1553         (JSC::::parseBinaryExpression):
1554         (JSC::::parseProperty):
1555         (JSC::::parseObjectLiteral):
1556         (JSC::::parseStrictObjectLiteral):
1557         (JSC::::parseArrayLiteral):
1558         (JSC::::parsePrimaryExpression):
1559         (JSC::::parseArguments):
1560         (JSC::::parseMemberExpression):
1561         (JSC::::parseUnaryExpression):
1562         * parser/Parser.h:
1563         (JSC::Parser::next):
1564         (JSC::Parser::nextExpectIdentifier):
1565         (JSC::Parser::tokenStart):
1566         (JSC::Parser::tokenLine):
1567         (JSC::Parser::tokenEnd):
1568         (JSC::Parser::tokenLocation):
1569         (Parser):
1570         (JSC::Parser::getTokenName):
1571         (JSC::::parse):
1572         * parser/ParserTokens.h:
1573         (JSC::JSTokenLocation::JSTokenLocation):
1574         (JSTokenLocation):
1575         (JSToken):
1576         * parser/SourceProviderCacheItem.h:
1577         (JSC::SourceProviderCacheItem::closeBraceToken):
1578         * parser/SyntaxChecker.h:
1579         (JSC::SyntaxChecker::makeFunctionCallNode):
1580         (JSC::SyntaxChecker::createCommaExpr):
1581         (JSC::SyntaxChecker::makeAssignNode):
1582         (JSC::SyntaxChecker::makePrefixNode):
1583         (JSC::SyntaxChecker::makePostfixNode):
1584         (JSC::SyntaxChecker::makeTypeOfNode):
1585         (JSC::SyntaxChecker::makeDeleteNode):
1586         (JSC::SyntaxChecker::makeNegateNode):
1587         (JSC::SyntaxChecker::makeBitwiseNotNode):
1588         (JSC::SyntaxChecker::createLogicalNot):
1589         (JSC::SyntaxChecker::createUnaryPlus):
1590         (JSC::SyntaxChecker::createVoid):
1591         (JSC::SyntaxChecker::thisExpr):
1592         (JSC::SyntaxChecker::createResolve):
1593         (JSC::SyntaxChecker::createObjectLiteral):
1594         (JSC::SyntaxChecker::createArray):
1595         (JSC::SyntaxChecker::createNumberExpr):
1596         (JSC::SyntaxChecker::createString):
1597         (JSC::SyntaxChecker::createBoolean):
1598         (JSC::SyntaxChecker::createNull):
1599         (JSC::SyntaxChecker::createBracketAccess):
1600         (JSC::SyntaxChecker::createDotAccess):
1601         (JSC::SyntaxChecker::createRegExp):
1602         (JSC::SyntaxChecker::createNewExpr):
1603         (JSC::SyntaxChecker::createConditionalExpr):
1604         (JSC::SyntaxChecker::createAssignResolve):
1605         (JSC::SyntaxChecker::createFunctionExpr):
1606         (JSC::SyntaxChecker::createFunctionBody):
1607         (JSC::SyntaxChecker::createArgumentsList):
1608         (JSC::SyntaxChecker::createPropertyList):
1609         (JSC::SyntaxChecker::createFuncDeclStatement):
1610         (JSC::SyntaxChecker::createBlockStatement):
1611         (JSC::SyntaxChecker::createExprStatement):
1612         (JSC::SyntaxChecker::createIfStatement):
1613         (JSC::SyntaxChecker::createForLoop):
1614         (JSC::SyntaxChecker::createForInLoop):
1615         (JSC::SyntaxChecker::createEmptyStatement):
1616         (JSC::SyntaxChecker::createVarStatement):
1617         (JSC::SyntaxChecker::createReturnStatement):
1618         (JSC::SyntaxChecker::createBreakStatement):
1619         (JSC::SyntaxChecker::createContinueStatement):
1620         (JSC::SyntaxChecker::createTryStatement):
1621         (JSC::SyntaxChecker::createSwitchStatement):
1622         (JSC::SyntaxChecker::createWhileStatement):
1623         (JSC::SyntaxChecker::createWithStatement):
1624         (JSC::SyntaxChecker::createDoWhileStatement):
1625         (JSC::SyntaxChecker::createLabelStatement):
1626         (JSC::SyntaxChecker::createThrowStatement):
1627         (JSC::SyntaxChecker::createDebugger):
1628         (JSC::SyntaxChecker::createConstStatement):
1629         (JSC::SyntaxChecker::appendConstDecl):
1630         (JSC::SyntaxChecker::createGetterOrSetterProperty):
1631         (JSC::SyntaxChecker::combineCommaNodes):
1632         (JSC::SyntaxChecker::operatorStackPop):
1633
1634 2012-08-03  Filip Pizlo  <fpizlo@apple.com>
1635
1636         Crashes in dfgBuildPutByIdList when clicking on just about anything on Google Maps
1637         https://bugs.webkit.org/show_bug.cgi?id=92691
1638
1639         Reviewed by Mark Hahnenberg.
1640
1641         The state of the stubs was changing after we determined the type (by virtue of the slow path
1642         function that was called), since the get or put (in this case put) could cause arbitrary
1643         side effects. Perhaps a full-blown fix would be to eliminate our reliance of the slow path
1644         function to determine what to do, but an easier fix for now is to have the slow path give up
1645         if its assumptions were invalidated by a side effect.
1646
1647         * dfg/DFGOperations.cpp:
1648         * jit/JITStubs.cpp:
1649         (JSC::DEFINE_STUB_FUNCTION):
1650
1651 2012-08-03  Filip Pizlo  <fpizlo@apple.com>
1652
1653         DFG handling of get_by_id should always inject a ForceOSRExit node if there is no prediction
1654         https://bugs.webkit.org/show_bug.cgi?id=93162
1655
1656         Reviewed by Mark Hahnenberg.
1657
1658         This simplifies the DFG IR by ensuring that all nodes that use value profiles will be preceded
1659         by a ForceOSRExit if the value profile had no data.
1660
1661         * dfg/DFGByteCodeParser.cpp:
1662         (JSC::DFG::ByteCodeParser::parseBlock):
1663
1664 2012-08-03  Filip Pizlo  <fpizlo@apple.com>
1665
1666         DFG::StructureCheckHoistingPhase keeps a Node& around for too long
1667         https://bugs.webkit.org/show_bug.cgi?id=93157
1668
1669         Reviewed by Mark Hahnenberg.
1670
1671         * dfg/DFGStructureCheckHoistingPhase.cpp:
1672         (JSC::DFG::StructureCheckHoistingPhase::run):
1673
1674 2012-08-02  Patrick Gansterer  <paroga@webkit.org>
1675
1676         Move getLocalTime() as static inline function to DateMath
1677         https://bugs.webkit.org/show_bug.cgi?id=92955
1678
1679         Reviewed by Ryosuke Niwa.
1680
1681         getCurrentLocalTime() and getLocalTime() has been superseded with the
1682         GregorianDateTime class. So we can move it into DateMath.cpp as an static inline
1683         function. This allows us to remove the dependecy on time() and localtime()
1684         for Windows CE, where this functions require the ce_time library to work.
1685
1686         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1687
1688 2012-08-02  Filip Pizlo  <fpizlo@apple.com>
1689
1690         ASSERTION FAILED: at(m_compileIndex).canExit() || m_isCheckingArgumentTypes
1691         https://bugs.webkit.org/show_bug.cgi?id=91074
1692
1693         Reviewed by Mark Hahnenberg.
1694
1695         Fixes a bug where the speculative JIT was performing an unnecessary speculation that the
1696         CFA had proven shouldn't be performed, leading to asserts that a node should not have
1697         exit sites. This is a debug-only assert with no release symptom - we were just emitting
1698         a check that was not reachable.
1699         
1700         Also found, and fixed, a bug where structure check hoisting was slightly confusing the
1701         CFA by inserting GetLocal's into the graph. CSE would clean the GetLocal's up, which
1702         would make the backend happy - but the CFA would produce subtly wrong results.
1703
1704         * bytecode/SpeculatedType.h:
1705         (JSC::isOtherOrEmptySpeculation):
1706         (JSC):
1707         * dfg/DFGDriver.cpp:
1708         (JSC::DFG::compile):
1709         * dfg/DFGGraph.cpp:
1710         (JSC::DFG::Graph::dump):
1711         * dfg/DFGSpeculativeJIT64.cpp:
1712         (JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
1713         (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
1714
1715 2012-08-02  Filip Pizlo  <fpizlo@apple.com>
1716
1717         Unreviewed, build fix for DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE).
1718
1719         * dfg/DFGStructureCheckHoistingPhase.cpp:
1720         (JSC::DFG::StructureCheckHoistingPhase::run):
1721
1722 2012-08-01  Mark Hahnenberg  <mhahnenberg@apple.com>
1723
1724         Remove all uses of ClassInfo for JSStrings in JIT code
1725         https://bugs.webkit.org/show_bug.cgi?id=92935
1726
1727         Reviewed by Geoffrey Garen.
1728
1729         This is the first step in removing our dependence on in-object ClassInfo pointers
1730         in JIT code. Most of the changes are to check the Structure, which is unique for 
1731         JSString primitives.
1732
1733         * bytecode/SpeculatedType.cpp:
1734         (JSC::speculationFromClassInfo):
1735         (JSC::speculationFromStructure): Changed to check the TypeInfo in the Structure
1736         since there wasn't a JSGlobalData immediately available to grab the JSString 
1737         Structure out of.
1738         * dfg/DFGSpeculativeJIT.cpp:
1739         (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
1740         * dfg/DFGSpeculativeJIT32_64.cpp:
1741         (JSC::DFG::SpeculativeJIT::compile):
1742         * dfg/DFGSpeculativeJIT64.cpp:
1743         (JSC::DFG::SpeculativeJIT::compile):
1744         * jit/JITInlineMethods.h:
1745         (JSC::JIT::emitLoadCharacterString):
1746         * jit/JITOpcodes.cpp:
1747         (JSC::JIT::privateCompileCTIMachineTrampolines):
1748         (JSC::JIT::emit_op_to_primitive):
1749         (JSC::JIT::emit_op_convert_this):
1750         * jit/JITOpcodes32_64.cpp:
1751         (JSC::JIT::privateCompileCTIMachineTrampolines):
1752         (JSC::JIT::emit_op_to_primitive):
1753         (JSC::JIT::emitSlow_op_eq):
1754         (JSC::JIT::emitSlow_op_neq):
1755         (JSC::JIT::compileOpStrictEq):
1756         (JSC::JIT::emit_op_convert_this):
1757         * jit/JITPropertyAccess.cpp:
1758         (JSC::JIT::stringGetByValStubGenerator):
1759         (JSC::JIT::emitSlow_op_get_by_val):
1760         * jit/JITPropertyAccess32_64.cpp:
1761         (JSC::JIT::stringGetByValStubGenerator):
1762         (JSC::JIT::emitSlow_op_get_by_val):
1763         * jit/SpecializedThunkJIT.h:
1764         (JSC::SpecializedThunkJIT::loadJSStringArgument):
1765         * jit/ThunkGenerators.cpp:
1766         (JSC::stringCharLoad):
1767         (JSC::charCodeAtThunkGenerator):
1768         (JSC::charAtThunkGenerator):
1769
1770 2012-08-02  Filip Pizlo  <fpizlo@apple.com>
1771
1772         Unreviewed, missed a style goof in the previous patch: "NodeIndex nodeIndex"
1773         in a method signature is painfully redundant.
1774
1775         * dfg/DFGSpeculativeJIT.h:
1776         (SpeculativeJIT):
1777
1778 2012-08-02  Filip Pizlo  <fpizlo@apple.com>
1779
1780         DFGSpeculativeJIT.h has too many inline method bodies
1781         https://bugs.webkit.org/show_bug.cgi?id=92957
1782
1783         Reviewed by Antti Koivisto.
1784
1785         * dfg/DFGSpeculativeJIT.cpp:
1786         (JSC::DFG::SpeculativeJIT::speculationCheck):
1787         (DFG):
1788         (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
1789         (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
1790         (JSC::DFG::SpeculativeJIT::speculationCheckWithConditionalDirection):
1791         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
1792         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecutionWithConditionalDirection):
1793         * dfg/DFGSpeculativeJIT.h:
1794         (SpeculativeJIT):
1795
1796 2012-08-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1797
1798         Unreviewed, rolling out r124406.
1799         http://trac.webkit.org/changeset/124406
1800         https://bugs.webkit.org/show_bug.cgi?id=92951
1801
1802         it set the Mac bots on fire (Requested by pizlo on #webkit).
1803
1804         * bytecode/Opcode.h:
1805         (JSC):
1806         (JSC::padOpcodeName):
1807         * bytecompiler/BytecodeGenerator.cpp:
1808         (JSC::BytecodeGenerator::emitDebugHook):
1809         * bytecompiler/BytecodeGenerator.h:
1810         (BytecodeGenerator):
1811         * bytecompiler/NodesCodegen.cpp:
1812         (JSC::ArrayNode::toArgumentList):
1813         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1814         (JSC::ConditionalNode::emitBytecode):
1815         (JSC::ConstStatementNode::emitBytecode):
1816         (JSC::EmptyStatementNode::emitBytecode):
1817         (JSC::DebuggerStatementNode::emitBytecode):
1818         (JSC::ExprStatementNode::emitBytecode):
1819         (JSC::VarStatementNode::emitBytecode):
1820         (JSC::IfNode::emitBytecode):
1821         (JSC::IfElseNode::emitBytecode):
1822         (JSC::DoWhileNode::emitBytecode):
1823         (JSC::WhileNode::emitBytecode):
1824         (JSC::ForNode::emitBytecode):
1825         (JSC::ForInNode::emitBytecode):
1826         (JSC::ContinueNode::emitBytecode):
1827         (JSC::BreakNode::emitBytecode):
1828         (JSC::ReturnNode::emitBytecode):
1829         (JSC::WithNode::emitBytecode):
1830         (JSC::SwitchNode::emitBytecode):
1831         (JSC::LabelNode::emitBytecode):
1832         (JSC::ThrowNode::emitBytecode):
1833         (JSC::TryNode::emitBytecode):
1834         (JSC::ProgramNode::emitBytecode):
1835         (JSC::EvalNode::emitBytecode):
1836         (JSC::FunctionBodyNode::emitBytecode):
1837         * debugger/Debugger.h:
1838         * interpreter/Interpreter.cpp:
1839         (JSC::Interpreter::unwindCallFrame):
1840         (JSC::Interpreter::throwException):
1841         (JSC::Interpreter::debug):
1842         * interpreter/Interpreter.h:
1843         (Interpreter):
1844         * jit/JITOpcodes.cpp:
1845         (JSC::JIT::emit_op_debug):
1846         * jit/JITOpcodes32_64.cpp:
1847         (JSC::JIT::emit_op_debug):
1848         * jit/JITStubs.cpp:
1849         (JSC::DEFINE_STUB_FUNCTION):
1850         * llint/LLIntSlowPaths.cpp:
1851         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
1852         * parser/ASTBuilder.h:
1853         (ASTBuilder):
1854         (JSC::ASTBuilder::createCommaExpr):
1855         (JSC::ASTBuilder::createLogicalNot):
1856         (JSC::ASTBuilder::createUnaryPlus):
1857         (JSC::ASTBuilder::createVoid):
1858         (JSC::ASTBuilder::thisExpr):
1859         (JSC::ASTBuilder::createResolve):
1860         (JSC::ASTBuilder::createObjectLiteral):
1861         (JSC::ASTBuilder::createArray):
1862         (JSC::ASTBuilder::createNumberExpr):
1863         (JSC::ASTBuilder::createString):
1864         (JSC::ASTBuilder::createBoolean):
1865         (JSC::ASTBuilder::createNull):
1866         (JSC::ASTBuilder::createBracketAccess):
1867         (JSC::ASTBuilder::createDotAccess):
1868         (JSC::ASTBuilder::createRegExp):
1869         (JSC::ASTBuilder::createNewExpr):
1870         (JSC::ASTBuilder::createConditionalExpr):
1871         (JSC::ASTBuilder::createAssignResolve):
1872         (JSC::ASTBuilder::createFunctionExpr):
1873         (JSC::ASTBuilder::createFunctionBody):
1874         (JSC::ASTBuilder::createGetterOrSetterProperty):
1875         (JSC::ASTBuilder::createArgumentsList):
1876         (JSC::ASTBuilder::createPropertyList):
1877         (JSC::ASTBuilder::createFuncDeclStatement):
1878         (JSC::ASTBuilder::createBlockStatement):
1879         (JSC::ASTBuilder::createExprStatement):
1880         (JSC::ASTBuilder::createIfStatement):
1881         (JSC::ASTBuilder::createForLoop):
1882         (JSC::ASTBuilder::createForInLoop):
1883         (JSC::ASTBuilder::createEmptyStatement):
1884         (JSC::ASTBuilder::createVarStatement):
1885         (JSC::ASTBuilder::createReturnStatement):
1886         (JSC::ASTBuilder::createBreakStatement):
1887         (JSC::ASTBuilder::createContinueStatement):
1888         (JSC::ASTBuilder::createTryStatement):
1889         (JSC::ASTBuilder::createSwitchStatement):
1890         (JSC::ASTBuilder::createWhileStatement):
1891         (JSC::ASTBuilder::createDoWhileStatement):
1892         (JSC::ASTBuilder::createLabelStatement):
1893         (JSC::ASTBuilder::createWithStatement):
1894         (JSC::ASTBuilder::createThrowStatement):
1895         (JSC::ASTBuilder::createDebugger):
1896         (JSC::ASTBuilder::createConstStatement):
1897         (JSC::ASTBuilder::appendConstDecl):
1898         (JSC::ASTBuilder::combineCommaNodes):
1899         (JSC::ASTBuilder::appendBinaryOperation):
1900         (JSC::ASTBuilder::createAssignment):
1901         (JSC::ASTBuilder::createNumber):
1902         (JSC::ASTBuilder::makeTypeOfNode):
1903         (JSC::ASTBuilder::makeDeleteNode):
1904         (JSC::ASTBuilder::makeNegateNode):
1905         (JSC::ASTBuilder::makeBitwiseNotNode):
1906         (JSC::ASTBuilder::makeMultNode):
1907         (JSC::ASTBuilder::makeDivNode):
1908         (JSC::ASTBuilder::makeModNode):
1909         (JSC::ASTBuilder::makeAddNode):
1910         (JSC::ASTBuilder::makeSubNode):
1911         (JSC::ASTBuilder::makeLeftShiftNode):
1912         (JSC::ASTBuilder::makeRightShiftNode):
1913         (JSC::ASTBuilder::makeURightShiftNode):
1914         (JSC::ASTBuilder::makeBitOrNode):
1915         (JSC::ASTBuilder::makeBitAndNode):
1916         (JSC::ASTBuilder::makeBitXOrNode):
1917         (JSC::ASTBuilder::makeFunctionCallNode):
1918         (JSC::ASTBuilder::makeBinaryNode):
1919         (JSC::ASTBuilder::makeAssignNode):
1920         (JSC::ASTBuilder::makePrefixNode):
1921         (JSC::ASTBuilder::makePostfixNode):
1922         * parser/Lexer.cpp:
1923         (JSC::::setCode):
1924         (JSC::::internalShift):
1925         (JSC::::shift):
1926         (JSC::::lex):
1927         * parser/Lexer.h:
1928         (Lexer):
1929         (JSC::::lexExpectIdentifier):
1930         * parser/NodeConstructors.h:
1931         (JSC::Node::Node):
1932         (JSC::ExpressionNode::ExpressionNode):
1933         (JSC::StatementNode::StatementNode):
1934         (JSC::NullNode::NullNode):
1935         (JSC::BooleanNode::BooleanNode):
1936         (JSC::NumberNode::NumberNode):
1937         (JSC::StringNode::StringNode):
1938         (JSC::RegExpNode::RegExpNode):
1939         (JSC::ThisNode::ThisNode):
1940         (JSC::ResolveNode::ResolveNode):
1941         (JSC::ArrayNode::ArrayNode):
1942         (JSC::PropertyListNode::PropertyListNode):
1943         (JSC::ObjectLiteralNode::ObjectLiteralNode):
1944         (JSC::BracketAccessorNode::BracketAccessorNode):
1945         (JSC::DotAccessorNode::DotAccessorNode):
1946         (JSC::ArgumentListNode::ArgumentListNode):
1947         (JSC::NewExprNode::NewExprNode):
1948         (JSC::EvalFunctionCallNode::EvalFunctionCallNode):
1949         (JSC::FunctionCallValueNode::FunctionCallValueNode):
1950         (JSC::FunctionCallResolveNode::FunctionCallResolveNode):
1951         (JSC::FunctionCallBracketNode::FunctionCallBracketNode):
1952         (JSC::FunctionCallDotNode::FunctionCallDotNode):
1953         (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
1954         (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
1955         (JSC::PrePostResolveNode::PrePostResolveNode):
1956         (JSC::PostfixResolveNode::PostfixResolveNode):
1957         (JSC::PostfixBracketNode::PostfixBracketNode):
1958         (JSC::PostfixDotNode::PostfixDotNode):
1959         (JSC::PostfixErrorNode::PostfixErrorNode):
1960         (JSC::DeleteResolveNode::DeleteResolveNode):
1961         (JSC::DeleteBracketNode::DeleteBracketNode):
1962         (JSC::DeleteDotNode::DeleteDotNode):
1963         (JSC::DeleteValueNode::DeleteValueNode):
1964         (JSC::VoidNode::VoidNode):
1965         (JSC::TypeOfResolveNode::TypeOfResolveNode):
1966         (JSC::TypeOfValueNode::TypeOfValueNode):
1967         (JSC::PrefixResolveNode::PrefixResolveNode):
1968         (JSC::PrefixBracketNode::PrefixBracketNode):
1969         (JSC::PrefixDotNode::PrefixDotNode):
1970         (JSC::PrefixErrorNode::PrefixErrorNode):
1971         (JSC::UnaryOpNode::UnaryOpNode):
1972         (JSC::UnaryPlusNode::UnaryPlusNode):
1973         (JSC::NegateNode::NegateNode):
1974         (JSC::BitwiseNotNode::BitwiseNotNode):
1975         (JSC::LogicalNotNode::LogicalNotNode):
1976         (JSC::BinaryOpNode::BinaryOpNode):
1977         (JSC::MultNode::MultNode):
1978         (JSC::DivNode::DivNode):
1979         (JSC::ModNode::ModNode):
1980         (JSC::AddNode::AddNode):
1981         (JSC::SubNode::SubNode):
1982         (JSC::LeftShiftNode::LeftShiftNode):
1983         (JSC::RightShiftNode::RightShiftNode):
1984         (JSC::UnsignedRightShiftNode::UnsignedRightShiftNode):
1985         (JSC::LessNode::LessNode):
1986         (JSC::GreaterNode::GreaterNode):
1987         (JSC::LessEqNode::LessEqNode):
1988         (JSC::GreaterEqNode::GreaterEqNode):
1989         (JSC::ThrowableBinaryOpNode::ThrowableBinaryOpNode):
1990         (JSC::InstanceOfNode::InstanceOfNode):
1991         (JSC::InNode::InNode):
1992         (JSC::EqualNode::EqualNode):
1993         (JSC::NotEqualNode::NotEqualNode):
1994         (JSC::StrictEqualNode::StrictEqualNode):
1995         (JSC::NotStrictEqualNode::NotStrictEqualNode):
1996         (JSC::BitAndNode::BitAndNode):
1997         (JSC::BitOrNode::BitOrNode):
1998         (JSC::BitXOrNode::BitXOrNode):
1999         (JSC::LogicalOpNode::LogicalOpNode):
2000         (JSC::ConditionalNode::ConditionalNode):
2001         (JSC::ReadModifyResolveNode::ReadModifyResolveNode):
2002         (JSC::AssignResolveNode::AssignResolveNode):
2003         (JSC::ReadModifyBracketNode::ReadModifyBracketNode):
2004         (JSC::AssignBracketNode::AssignBracketNode):
2005         (JSC::AssignDotNode::AssignDotNode):
2006         (JSC::ReadModifyDotNode::ReadModifyDotNode):
2007         (JSC::AssignErrorNode::AssignErrorNode):
2008         (JSC::CommaNode::CommaNode):
2009         (JSC::ConstStatementNode::ConstStatementNode):
2010         (JSC::EmptyStatementNode::EmptyStatementNode):
2011         (JSC::DebuggerStatementNode::DebuggerStatementNode):
2012         (JSC::ExprStatementNode::ExprStatementNode):
2013         (JSC::VarStatementNode::VarStatementNode):
2014         (JSC::IfNode::IfNode):
2015         (JSC::IfElseNode::IfElseNode):
2016         (JSC::DoWhileNode::DoWhileNode):
2017         (JSC::WhileNode::WhileNode):
2018         (JSC::ForNode::ForNode):
2019         (JSC::ContinueNode::ContinueNode):
2020         (JSC::BreakNode::BreakNode):
2021         (JSC::ReturnNode::ReturnNode):
2022         (JSC::WithNode::WithNode):
2023         (JSC::LabelNode::LabelNode):
2024         (JSC::ThrowNode::ThrowNode):
2025         (JSC::TryNode::TryNode):
2026         (JSC::FuncExprNode::FuncExprNode):
2027         (JSC::FuncDeclNode::FuncDeclNode):
2028         (JSC::SwitchNode::SwitchNode):
2029         (JSC::ConstDeclNode::ConstDeclNode):
2030         (JSC::BlockNode::BlockNode):
2031         (JSC::ForInNode::ForInNode):
2032         * parser/Nodes.cpp:
2033         (JSC):
2034         (JSC::StatementNode::setLoc):
2035         (JSC::ScopeNode::ScopeNode):
2036         (JSC::ProgramNode::ProgramNode):
2037         (JSC::ProgramNode::create):
2038         (JSC::EvalNode::EvalNode):
2039         (JSC::EvalNode::create):
2040         (JSC::FunctionBodyNode::FunctionBodyNode):
2041         (JSC::FunctionBodyNode::create):
2042         * parser/Nodes.h:
2043         (Node):
2044         (ExpressionNode):
2045         (StatementNode):
2046         (NullNode):
2047         (BooleanNode):
2048         (NumberNode):
2049         (StringNode):
2050         (RegExpNode):
2051         (ThisNode):
2052         (ResolveNode):
2053         (ArrayNode):
2054         (PropertyListNode):
2055         (ObjectLiteralNode):
2056         (BracketAccessorNode):
2057         (DotAccessorNode):
2058         (ArgumentListNode):
2059         (NewExprNode):
2060         (EvalFunctionCallNode):
2061         (FunctionCallValueNode):
2062         (FunctionCallResolveNode):
2063         (FunctionCallBracketNode):
2064         (FunctionCallDotNode):
2065         (CallFunctionCallDotNode):
2066         (ApplyFunctionCallDotNode):
2067         (PrePostResolveNode):
2068         (PostfixResolveNode):
2069         (PostfixBracketNode):
2070         (PostfixDotNode):
2071         (PostfixErrorNode):
2072         (DeleteResolveNode):
2073         (DeleteBracketNode):
2074         (DeleteDotNode):
2075         (DeleteValueNode):
2076         (VoidNode):
2077         (TypeOfResolveNode):
2078         (TypeOfValueNode):
2079         (PrefixResolveNode):
2080         (PrefixBracketNode):
2081         (PrefixDotNode):
2082         (PrefixErrorNode):
2083         (UnaryOpNode):
2084         (UnaryPlusNode):
2085         (NegateNode):
2086         (BitwiseNotNode):
2087         (LogicalNotNode):
2088         (BinaryOpNode):
2089         (MultNode):
2090         (DivNode):
2091         (ModNode):
2092         (AddNode):
2093         (SubNode):
2094         (LeftShiftNode):
2095         (RightShiftNode):
2096         (UnsignedRightShiftNode):
2097         (LessNode):
2098         (GreaterNode):
2099         (LessEqNode):
2100         (GreaterEqNode):
2101         (ThrowableBinaryOpNode):
2102         (InstanceOfNode):
2103         (InNode):
2104         (EqualNode):
2105         (NotEqualNode):
2106         (StrictEqualNode):
2107         (NotStrictEqualNode):
2108         (BitAndNode):
2109         (BitOrNode):
2110         (BitXOrNode):
2111         (LogicalOpNode):
2112         (ConditionalNode):
2113         (ReadModifyResolveNode):
2114         (AssignResolveNode):
2115         (ReadModifyBracketNode):
2116         (AssignBracketNode):
2117         (AssignDotNode):
2118         (ReadModifyDotNode):
2119         (AssignErrorNode):
2120         (CommaNode):
2121         (ConstDeclNode):
2122         (ConstStatementNode):
2123         (BlockNode):
2124         (EmptyStatementNode):
2125         (DebuggerStatementNode):
2126         (ExprStatementNode):
2127         (VarStatementNode):
2128         (IfNode):
2129         (IfElseNode):
2130         (DoWhileNode):
2131         (WhileNode):
2132         (ForNode):
2133         (ForInNode):
2134         (ContinueNode):
2135         (BreakNode):
2136         (ReturnNode):
2137         (WithNode):
2138         (LabelNode):
2139         (ThrowNode):
2140         (TryNode):
2141         (ScopeNode):
2142         (ProgramNode):
2143         (EvalNode):
2144         (FunctionBodyNode):
2145         (FuncExprNode):
2146         (FuncDeclNode):
2147         (SwitchNode):
2148         * parser/Parser.cpp:
2149         (JSC::::parseSourceElements):
2150         (JSC::::parseVarDeclaration):
2151         (JSC::::parseConstDeclaration):
2152         (JSC::::parseDoWhileStatement):
2153         (JSC::::parseWhileStatement):
2154         (JSC::::parseVarDeclarationList):
2155         (JSC::::parseConstDeclarationList):
2156         (JSC::::parseForStatement):
2157         (JSC::::parseBreakStatement):
2158         (JSC::::parseContinueStatement):
2159         (JSC::::parseReturnStatement):
2160         (JSC::::parseThrowStatement):
2161         (JSC::::parseWithStatement):
2162         (JSC::::parseSwitchStatement):
2163         (JSC::::parseTryStatement):
2164         (JSC::::parseDebuggerStatement):
2165         (JSC::::parseBlockStatement):
2166         (JSC::::parseStatement):
2167         (JSC::::parseFunctionBody):
2168         (JSC::::parseFunctionInfo):
2169         (JSC::::parseFunctionDeclaration):
2170         (JSC::::parseExpressionOrLabelStatement):
2171         (JSC::::parseExpressionStatement):
2172         (JSC::::parseIfStatement):
2173         (JSC::::parseExpression):
2174         (JSC::::parseAssignmentExpression):
2175         (JSC::::parseConditionalExpression):
2176         (JSC::::parseBinaryExpression):
2177         (JSC::::parseProperty):
2178         (JSC::::parseObjectLiteral):
2179         (JSC::::parseStrictObjectLiteral):
2180         (JSC::::parseArrayLiteral):
2181         (JSC::::parsePrimaryExpression):
2182         (JSC::::parseArguments):
2183         (JSC::::parseMemberExpression):
2184         (JSC::::parseUnaryExpression):
2185         * parser/Parser.h:
2186         (JSC::Parser::next):
2187         (JSC::Parser::nextExpectIdentifier):
2188         (JSC::Parser::tokenStart):
2189         (JSC::Parser::tokenLine):
2190         (JSC::Parser::tokenEnd):
2191         (JSC::Parser::getTokenName):
2192         (JSC::::parse):
2193         * parser/ParserTokens.h:
2194         (JSC::JSTokenInfo::JSTokenInfo):
2195         (JSTokenInfo):
2196         (JSToken):
2197         * parser/SourceProviderCacheItem.h:
2198         (JSC::SourceProviderCacheItem::closeBraceToken):
2199         * parser/SyntaxChecker.h:
2200         (JSC::SyntaxChecker::makeFunctionCallNode):
2201         (JSC::SyntaxChecker::createCommaExpr):
2202         (JSC::SyntaxChecker::makeAssignNode):
2203         (JSC::SyntaxChecker::makePrefixNode):
2204         (JSC::SyntaxChecker::makePostfixNode):
2205         (JSC::SyntaxChecker::makeTypeOfNode):
2206         (JSC::SyntaxChecker::makeDeleteNode):
2207         (JSC::SyntaxChecker::makeNegateNode):
2208         (JSC::SyntaxChecker::makeBitwiseNotNode):
2209         (JSC::SyntaxChecker::createLogicalNot):
2210         (JSC::SyntaxChecker::createUnaryPlus):
2211         (JSC::SyntaxChecker::createVoid):
2212         (JSC::SyntaxChecker::thisExpr):
2213         (JSC::SyntaxChecker::createResolve):
2214         (JSC::SyntaxChecker::createObjectLiteral):
2215         (JSC::SyntaxChecker::createArray):
2216         (JSC::SyntaxChecker::createNumberExpr):
2217         (JSC::SyntaxChecker::createString):
2218         (JSC::SyntaxChecker::createBoolean):
2219         (JSC::SyntaxChecker::createNull):
2220         (JSC::SyntaxChecker::createBracketAccess):
2221         (JSC::SyntaxChecker::createDotAccess):
2222         (JSC::SyntaxChecker::createRegExp):
2223         (JSC::SyntaxChecker::createNewExpr):
2224         (JSC::SyntaxChecker::createConditionalExpr):
2225         (JSC::SyntaxChecker::createAssignResolve):
2226         (JSC::SyntaxChecker::createFunctionExpr):
2227         (JSC::SyntaxChecker::createFunctionBody):
2228         (JSC::SyntaxChecker::createArgumentsList):
2229         (JSC::SyntaxChecker::createPropertyList):
2230         (JSC::SyntaxChecker::createFuncDeclStatement):
2231         (JSC::SyntaxChecker::createBlockStatement):
2232         (JSC::SyntaxChecker::createExprStatement):
2233         (JSC::SyntaxChecker::createIfStatement):
2234         (JSC::SyntaxChecker::createForLoop):
2235         (JSC::SyntaxChecker::createForInLoop):
2236         (JSC::SyntaxChecker::createEmptyStatement):
2237         (JSC::SyntaxChecker::createVarStatement):
2238         (JSC::SyntaxChecker::createReturnStatement):
2239         (JSC::SyntaxChecker::createBreakStatement):
2240         (JSC::SyntaxChecker::createContinueStatement):
2241         (JSC::SyntaxChecker::createTryStatement):
2242         (JSC::SyntaxChecker::createSwitchStatement):
2243         (JSC::SyntaxChecker::createWhileStatement):
2244         (JSC::SyntaxChecker::createWithStatement):
2245         (JSC::SyntaxChecker::createDoWhileStatement):
2246         (JSC::SyntaxChecker::createLabelStatement):
2247         (JSC::SyntaxChecker::createThrowStatement):
2248         (JSC::SyntaxChecker::createDebugger):
2249         (JSC::SyntaxChecker::createConstStatement):
2250         (JSC::SyntaxChecker::appendConstDecl):
2251         (JSC::SyntaxChecker::createGetterOrSetterProperty):
2252         (JSC::SyntaxChecker::combineCommaNodes):
2253         (JSC::SyntaxChecker::operatorStackPop):
2254
2255 2012-08-01  Peter Wang  <peter.wang@torchmobile.com.cn>
2256
2257         Web Inspector: [JSC] implement setting breakpoints by line:column
2258         https://bugs.webkit.org/show_bug.cgi?id=53003
2259
2260         Reviewed by Geoffrey Garen.
2261
2262         Add a counter in lexer to record the column of each token. Debugger will use column info
2263         in "Pretty Print" debug mode of Inspector.
2264
2265         * bytecode/Opcode.h:
2266         (JSC):
2267         (JSC::padOpcodeName):
2268         * bytecompiler/BytecodeGenerator.cpp:
2269         (JSC::BytecodeGenerator::emitDebugHook):
2270         * bytecompiler/BytecodeGenerator.h:
2271         (BytecodeGenerator):
2272         * bytecompiler/NodesCodegen.cpp:
2273         (JSC::ArrayNode::toArgumentList):
2274         (JSC::ApplyFunctionCallDotNode::emitBytecode):
2275         (JSC::ConditionalNode::emitBytecode):
2276         (JSC::ConstStatementNode::emitBytecode):
2277         (JSC::EmptyStatementNode::emitBytecode):
2278         (JSC::DebuggerStatementNode::emitBytecode):
2279         (JSC::ExprStatementNode::emitBytecode):
2280         (JSC::VarStatementNode::emitBytecode):
2281         (JSC::IfNode::emitBytecode):
2282         (JSC::IfElseNode::emitBytecode):
2283         (JSC::DoWhileNode::emitBytecode):
2284         (JSC::WhileNode::emitBytecode):
2285         (JSC::ForNode::emitBytecode):
2286         (JSC::ForInNode::emitBytecode):
2287         (JSC::ContinueNode::emitBytecode):
2288         (JSC::BreakNode::emitBytecode):
2289         (JSC::ReturnNode::emitBytecode):
2290         (JSC::WithNode::emitBytecode):
2291         (JSC::SwitchNode::emitBytecode):
2292         (JSC::LabelNode::emitBytecode):
2293         (JSC::ThrowNode::emitBytecode):
2294         (JSC::TryNode::emitBytecode):
2295         (JSC::ProgramNode::emitBytecode):
2296         (JSC::EvalNode::emitBytecode):
2297         (JSC::FunctionBodyNode::emitBytecode):
2298         * debugger/Debugger.h:
2299         * interpreter/Interpreter.cpp:
2300         (JSC::Interpreter::unwindCallFrame):
2301         (JSC::Interpreter::throwException):
2302         (JSC::Interpreter::debug):
2303         * interpreter/Interpreter.h:
2304         (Interpreter):
2305         * jit/JITOpcodes.cpp:
2306         (JSC::JIT::emit_op_debug):
2307         * jit/JITOpcodes32_64.cpp:
2308         (JSC::JIT::emit_op_debug):
2309         * jit/JITStubs.cpp:
2310         (JSC::DEFINE_STUB_FUNCTION):
2311         * llint/LLIntSlowPaths.cpp:
2312         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
2313         * parser/ASTBuilder.h:
2314         (ASTBuilder):
2315         (JSC::ASTBuilder::createCommaExpr):
2316         (JSC::ASTBuilder::createLogicalNot):
2317         (JSC::ASTBuilder::createUnaryPlus):
2318         (JSC::ASTBuilder::createVoid):
2319         (JSC::ASTBuilder::thisExpr):
2320         (JSC::ASTBuilder::createResolve):
2321         (JSC::ASTBuilder::createObjectLiteral):
2322         (JSC::ASTBuilder::createArray):
2323         (JSC::ASTBuilder::createNumberExpr):
2324         (JSC::ASTBuilder::createString):
2325         (JSC::ASTBuilder::createBoolean):
2326         (JSC::ASTBuilder::createNull):
2327         (JSC::ASTBuilder::createBracketAccess):
2328         (JSC::ASTBuilder::createDotAccess):
2329         (JSC::ASTBuilder::createRegExp):
2330         (JSC::ASTBuilder::createNewExpr):
2331         (JSC::ASTBuilder::createConditionalExpr):
2332         (JSC::ASTBuilder::createAssignResolve):
2333         (JSC::ASTBuilder::createFunctionExpr):
2334         (JSC::ASTBuilder::createFunctionBody):
2335         (JSC::ASTBuilder::createGetterOrSetterProperty):
2336         (JSC::ASTBuilder::createArgumentsList):
2337         (JSC::ASTBuilder::createPropertyList):
2338         (JSC::ASTBuilder::createFuncDeclStatement):
2339         (JSC::ASTBuilder::createBlockStatement):
2340         (JSC::ASTBuilder::createExprStatement):
2341         (JSC::ASTBuilder::createIfStatement):
2342         (JSC::ASTBuilder::createForLoop):
2343         (JSC::ASTBuilder::createForInLoop):
2344         (JSC::ASTBuilder::createEmptyStatement):
2345         (JSC::ASTBuilder::createVarStatement):
2346         (JSC::ASTBuilder::createReturnStatement):
2347         (JSC::ASTBuilder::createBreakStatement):
2348         (JSC::ASTBuilder::createContinueStatement):
2349         (JSC::ASTBuilder::createTryStatement):
2350         (JSC::ASTBuilder::createSwitchStatement):
2351         (JSC::ASTBuilder::createWhileStatement):
2352         (JSC::ASTBuilder::createDoWhileStatement):
2353         (JSC::ASTBuilder::createLabelStatement):
2354         (JSC::ASTBuilder::createWithStatement):
2355         (JSC::ASTBuilder::createThrowStatement):
2356         (JSC::ASTBuilder::createDebugger):
2357         (JSC::ASTBuilder::createConstStatement):
2358         (JSC::ASTBuilder::appendConstDecl):
2359         (JSC::ASTBuilder::combineCommaNodes):
2360         (JSC::ASTBuilder::appendBinaryOperation):
2361         (JSC::ASTBuilder::createAssignment):
2362         (JSC::ASTBuilder::createNumber):
2363         (JSC::ASTBuilder::makeTypeOfNode):
2364         (JSC::ASTBuilder::makeDeleteNode):
2365         (JSC::ASTBuilder::makeNegateNode):
2366         (JSC::ASTBuilder::makeBitwiseNotNode):
2367         (JSC::ASTBuilder::makeMultNode):
2368         (JSC::ASTBuilder::makeDivNode):
2369         (JSC::ASTBuilder::makeModNode):
2370         (JSC::ASTBuilder::makeAddNode):
2371         (JSC::ASTBuilder::makeSubNode):
2372         (JSC::ASTBuilder::makeLeftShiftNode):
2373         (JSC::ASTBuilder::makeRightShiftNode):
2374         (JSC::ASTBuilder::makeURightShiftNode):
2375         (JSC::ASTBuilder::makeBitOrNode):
2376         (JSC::ASTBuilder::makeBitAndNode):
2377         (JSC::ASTBuilder::makeBitXOrNode):
2378         (JSC::ASTBuilder::makeFunctionCallNode):
2379         (JSC::ASTBuilder::makeBinaryNode):
2380         (JSC::ASTBuilder::makeAssignNode):
2381         (JSC::ASTBuilder::makePrefixNode):
2382         (JSC::ASTBuilder::makePostfixNode):
2383         * parser/Lexer.cpp:
2384         (JSC::::setCode):
2385         (JSC::::internalShift):
2386         (JSC::::shift):
2387         (JSC::::lex):
2388         * parser/Lexer.h:
2389         (Lexer):
2390         (JSC::Lexer::currentColumnNumber):
2391         (JSC::::lexExpectIdentifier):
2392         * parser/NodeConstructors.h:
2393         (JSC::Node::Node):
2394         (JSC::ExpressionNode::ExpressionNode):
2395         (JSC::StatementNode::StatementNode):
2396         (JSC::NullNode::NullNode):
2397         (JSC::BooleanNode::BooleanNode):
2398         (JSC::NumberNode::NumberNode):
2399         (JSC::StringNode::StringNode):
2400         (JSC::RegExpNode::RegExpNode):
2401         (JSC::ThisNode::ThisNode):
2402         (JSC::ResolveNode::ResolveNode):
2403         (JSC::ArrayNode::ArrayNode):
2404         (JSC::PropertyListNode::PropertyListNode):
2405         (JSC::ObjectLiteralNode::ObjectLiteralNode):
2406         (JSC::BracketAccessorNode::BracketAccessorNode):
2407         (JSC::DotAccessorNode::DotAccessorNode):
2408         (JSC::ArgumentListNode::ArgumentListNode):
2409         (JSC::NewExprNode::NewExprNode):
2410         (JSC::EvalFunctionCallNode::EvalFunctionCallNode):
2411         (JSC::FunctionCallValueNode::FunctionCallValueNode):
2412         (JSC::FunctionCallResolveNode::FunctionCallResolveNode):
2413         (JSC::FunctionCallBracketNode::FunctionCallBracketNode):
2414         (JSC::FunctionCallDotNode::FunctionCallDotNode):
2415         (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
2416         (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
2417         (JSC::PrePostResolveNode::PrePostResolveNode):
2418         (JSC::PostfixResolveNode::PostfixResolveNode):
2419         (JSC::PostfixBracketNode::PostfixBracketNode):
2420         (JSC::PostfixDotNode::PostfixDotNode):
2421         (JSC::PostfixErrorNode::PostfixErrorNode):
2422         (JSC::DeleteResolveNode::DeleteResolveNode):
2423         (JSC::DeleteBracketNode::DeleteBracketNode):
2424         (JSC::DeleteDotNode::DeleteDotNode):
2425         (JSC::DeleteValueNode::DeleteValueNode):
2426         (JSC::VoidNode::VoidNode):
2427         (JSC::TypeOfResolveNode::TypeOfResolveNode):
2428         (JSC::TypeOfValueNode::TypeOfValueNode):
2429         (JSC::PrefixResolveNode::PrefixResolveNode):
2430         (JSC::PrefixBracketNode::PrefixBracketNode):
2431         (JSC::PrefixDotNode::PrefixDotNode):
2432         (JSC::PrefixErrorNode::PrefixErrorNode):
2433         (JSC::UnaryOpNode::UnaryOpNode):
2434         (JSC::UnaryPlusNode::UnaryPlusNode):
2435         (JSC::NegateNode::NegateNode):
2436         (JSC::BitwiseNotNode::BitwiseNotNode):
2437         (JSC::LogicalNotNode::LogicalNotNode):
2438         (JSC::BinaryOpNode::BinaryOpNode):
2439         (JSC::MultNode::MultNode):
2440         (JSC::DivNode::DivNode):
2441         (JSC::ModNode::ModNode):
2442         (JSC::AddNode::AddNode):
2443         (JSC::SubNode::SubNode):
2444         (JSC::LeftShiftNode::LeftShiftNode):
2445         (JSC::RightShiftNode::RightShiftNode):
2446         (JSC::UnsignedRightShiftNode::UnsignedRightShiftNode):
2447         (JSC::LessNode::LessNode):
2448         (JSC::GreaterNode::GreaterNode):
2449         (JSC::LessEqNode::LessEqNode):
2450         (JSC::GreaterEqNode::GreaterEqNode):
2451         (JSC::ThrowableBinaryOpNode::ThrowableBinaryOpNode):
2452         (JSC::InstanceOfNode::InstanceOfNode):
2453         (JSC::InNode::InNode):
2454         (JSC::EqualNode::EqualNode):
2455         (JSC::NotEqualNode::NotEqualNode):
2456         (JSC::StrictEqualNode::StrictEqualNode):
2457         (JSC::NotStrictEqualNode::NotStrictEqualNode):
2458         (JSC::BitAndNode::BitAndNode):
2459         (JSC::BitOrNode::BitOrNode):
2460         (JSC::BitXOrNode::BitXOrNode):
2461         (JSC::LogicalOpNode::LogicalOpNode):
2462         (JSC::ConditionalNode::ConditionalNode):
2463         (JSC::ReadModifyResolveNode::ReadModifyResolveNode):
2464         (JSC::AssignResolveNode::AssignResolveNode):
2465         (JSC::ReadModifyBracketNode::ReadModifyBracketNode):
2466         (JSC::AssignBracketNode::AssignBracketNode):
2467         (JSC::AssignDotNode::AssignDotNode):
2468         (JSC::ReadModifyDotNode::ReadModifyDotNode):
2469         (JSC::AssignErrorNode::AssignErrorNode):
2470         (JSC::CommaNode::CommaNode):
2471         (JSC::ConstStatementNode::ConstStatementNode):
2472         (JSC::EmptyStatementNode::EmptyStatementNode):
2473         (JSC::DebuggerStatementNode::DebuggerStatementNode):
2474         (JSC::ExprStatementNode::ExprStatementNode):
2475         (JSC::VarStatementNode::VarStatementNode):
2476         (JSC::IfNode::IfNode):
2477         (JSC::IfElseNode::IfElseNode):
2478         (JSC::DoWhileNode::DoWhileNode):
2479         (JSC::WhileNode::WhileNode):
2480         (JSC::ForNode::ForNode):
2481         (JSC::ContinueNode::ContinueNode):
2482         (JSC::BreakNode::BreakNode):
2483         (JSC::ReturnNode::ReturnNode):
2484         (JSC::WithNode::WithNode):
2485         (JSC::LabelNode::LabelNode):
2486         (JSC::ThrowNode::ThrowNode):
2487         (JSC::TryNode::TryNode):
2488         (JSC::FuncExprNode::FuncExprNode):
2489         (JSC::FuncDeclNode::FuncDeclNode):
2490         (JSC::SwitchNode::SwitchNode):
2491         (JSC::ConstDeclNode::ConstDeclNode):
2492         (JSC::BlockNode::BlockNode):
2493         (JSC::ForInNode::ForInNode):
2494         * parser/Nodes.cpp:
2495         (JSC::StatementNode::setLoc):
2496         (JSC):
2497         (JSC::ScopeNode::ScopeNode):
2498         (JSC::ProgramNode::ProgramNode):
2499         (JSC::ProgramNode::create):
2500         (JSC::EvalNode::EvalNode):
2501         (JSC::EvalNode::create):
2502         (JSC::FunctionBodyNode::FunctionBodyNode):
2503         (JSC::FunctionBodyNode::create):
2504         * parser/Nodes.h:
2505         (Node):
2506         (JSC::Node::columnNo):
2507         (ExpressionNode):
2508         (StatementNode):
2509         (JSC::StatementNode::column):
2510         (NullNode):
2511         (BooleanNode):
2512         (NumberNode):
2513         (StringNode):
2514         (RegExpNode):
2515         (ThisNode):
2516         (ResolveNode):
2517         (ArrayNode):
2518         (PropertyListNode):
2519         (ObjectLiteralNode):
2520         (BracketAccessorNode):
2521         (DotAccessorNode):
2522         (ArgumentListNode):
2523         (NewExprNode):
2524         (EvalFunctionCallNode):
2525         (FunctionCallValueNode):
2526         (FunctionCallResolveNode):
2527         (FunctionCallBracketNode):
2528         (FunctionCallDotNode):
2529         (CallFunctionCallDotNode):
2530         (ApplyFunctionCallDotNode):
2531         (PrePostResolveNode):
2532         (PostfixResolveNode):
2533         (PostfixBracketNode):
2534         (PostfixDotNode):
2535         (PostfixErrorNode):
2536         (DeleteResolveNode):
2537         (DeleteBracketNode):
2538         (DeleteDotNode):
2539         (DeleteValueNode):
2540         (VoidNode):
2541         (TypeOfResolveNode):
2542         (TypeOfValueNode):
2543         (PrefixResolveNode):
2544         (PrefixBracketNode):
2545         (PrefixDotNode):
2546         (PrefixErrorNode):
2547         (UnaryOpNode):
2548         (UnaryPlusNode):
2549         (NegateNode):
2550         (BitwiseNotNode):
2551         (LogicalNotNode):
2552         (BinaryOpNode):
2553         (MultNode):
2554         (DivNode):
2555         (ModNode):
2556         (AddNode):
2557         (SubNode):
2558         (LeftShiftNode):
2559         (RightShiftNode):
2560         (UnsignedRightShiftNode):
2561         (LessNode):
2562         (GreaterNode):
2563         (LessEqNode):
2564         (GreaterEqNode):
2565         (ThrowableBinaryOpNode):
2566         (InstanceOfNode):
2567         (InNode):
2568         (EqualNode):
2569         (NotEqualNode):
2570         (StrictEqualNode):
2571         (NotStrictEqualNode):
2572         (BitAndNode):
2573         (BitOrNode):
2574         (BitXOrNode):
2575         (LogicalOpNode):
2576         (ConditionalNode):
2577         (ReadModifyResolveNode):
2578         (AssignResolveNode):
2579         (ReadModifyBracketNode):
2580         (AssignBracketNode):
2581         (AssignDotNode):
2582         (ReadModifyDotNode):
2583         (AssignErrorNode):
2584         (CommaNode):
2585         (ConstDeclNode):
2586         (ConstStatementNode):
2587         (BlockNode):
2588         (EmptyStatementNode):
2589         (DebuggerStatementNode):
2590         (ExprStatementNode):
2591         (VarStatementNode):
2592         (IfNode):
2593         (IfElseNode):
2594         (DoWhileNode):
2595         (WhileNode):
2596         (ForNode):
2597         (ForInNode):
2598         (ContinueNode):
2599         (BreakNode):
2600         (ReturnNode):
2601         (WithNode):
2602         (LabelNode):
2603         (ThrowNode):
2604         (TryNode):
2605         (ScopeNode):
2606         (ProgramNode):
2607         (EvalNode):
2608         (FunctionBodyNode):
2609         (FuncExprNode):
2610         (FuncDeclNode):
2611         (SwitchNode):
2612         * parser/Parser.cpp:
2613         (JSC::::parseSourceElements):
2614         (JSC::::parseVarDeclaration):
2615         (JSC::::parseConstDeclaration):
2616         (JSC::::parseDoWhileStatement):
2617         (JSC::::parseWhileStatement):
2618         (JSC::::parseVarDeclarationList):
2619         (JSC::::parseConstDeclarationList):
2620         (JSC::::parseForStatement):
2621         (JSC::::parseBreakStatement):
2622         (JSC::::parseContinueStatement):
2623         (JSC::::parseReturnStatement):
2624         (JSC::::parseThrowStatement):
2625         (JSC::::parseWithStatement):
2626         (JSC::::parseSwitchStatement):
2627         (JSC::::parseTryStatement):
2628         (JSC::::parseDebuggerStatement):
2629         (JSC::::parseBlockStatement):
2630         (JSC::::parseStatement):
2631         (JSC::::parseFunctionBody):
2632         (JSC::::parseFunctionInfo):
2633         (JSC::::parseFunctionDeclaration):
2634         (JSC::::parseExpressionOrLabelStatement):
2635         (JSC::::parseExpressionStatement):
2636         (JSC::::parseIfStatement):
2637         (JSC::::parseExpression):
2638         (JSC::::parseAssignmentExpression):
2639         (JSC::::parseConditionalExpression):
2640         (JSC::::parseBinaryExpression):
2641         (JSC::::parseProperty):
2642         (JSC::::parseObjectLiteral):
2643         (JSC::::parseStrictObjectLiteral):
2644         (JSC::::parseArrayLiteral):
2645         (JSC::::parsePrimaryExpression):
2646         (JSC::::parseArguments):
2647         (JSC::::parseMemberExpression):
2648         (JSC::::parseUnaryExpression):
2649         * parser/Parser.h:
2650         (JSC::Parser::next):
2651         (JSC::Parser::nextExpectIdentifier):
2652         (JSC::Parser::tokenStart):
2653         (JSC::Parser::tokenLine):
2654         (JSC::Parser::tokenEnd):
2655         (JSC::Parser::tokenLocation):
2656         (Parser):
2657         (JSC::Parser::getTokenName):
2658         (JSC::::parse):
2659         * parser/ParserTokens.h:
2660         (JSC::JSTokenLocation::JSTokenLocation):
2661         (JSTokenLocation):
2662         (JSToken):
2663         * parser/SourceProviderCacheItem.h:
2664         (JSC::SourceProviderCacheItem::closeBraceToken):
2665         * parser/SyntaxChecker.h:
2666         (JSC::SyntaxChecker::makeFunctionCallNode):
2667         (JSC::SyntaxChecker::createCommaExpr):
2668         (JSC::SyntaxChecker::makeAssignNode):
2669         (JSC::SyntaxChecker::makePrefixNode):
2670         (JSC::SyntaxChecker::makePostfixNode):
2671         (JSC::SyntaxChecker::makeTypeOfNode):
2672         (JSC::SyntaxChecker::makeDeleteNode):
2673         (JSC::SyntaxChecker::makeNegateNode):
2674         (JSC::SyntaxChecker::makeBitwiseNotNode):
2675         (JSC::SyntaxChecker::createLogicalNot):
2676         (JSC::SyntaxChecker::createUnaryPlus):
2677         (JSC::SyntaxChecker::createVoid):
2678         (JSC::SyntaxChecker::thisExpr):
2679         (JSC::SyntaxChecker::createResolve):
2680         (JSC::SyntaxChecker::createObjectLiteral):
2681         (JSC::SyntaxChecker::createArray):
2682         (JSC::SyntaxChecker::createNumberExpr):
2683         (JSC::SyntaxChecker::createString):
2684         (JSC::SyntaxChecker::createBoolean):
2685         (JSC::SyntaxChecker::createNull):
2686         (JSC::SyntaxChecker::createBracketAccess):
2687         (JSC::SyntaxChecker::createDotAccess):
2688         (JSC::SyntaxChecker::createRegExp):
2689         (JSC::SyntaxChecker::createNewExpr):
2690         (JSC::SyntaxChecker::createConditionalExpr):
2691         (JSC::SyntaxChecker::createAssignResolve):
2692         (JSC::SyntaxChecker::createFunctionExpr):
2693         (JSC::SyntaxChecker::createFunctionBody):
2694         (JSC::SyntaxChecker::createArgumentsList):
2695         (JSC::SyntaxChecker::createPropertyList):
2696         (JSC::SyntaxChecker::createFuncDeclStatement):
2697         (JSC::SyntaxChecker::createBlockStatement):
2698         (JSC::SyntaxChecker::createExprStatement):
2699         (JSC::SyntaxChecker::createIfStatement):
2700         (JSC::SyntaxChecker::createForLoop):
2701         (JSC::SyntaxChecker::createForInLoop):
2702         (JSC::SyntaxChecker::createEmptyStatement):
2703         (JSC::SyntaxChecker::createVarStatement):
2704         (JSC::SyntaxChecker::createReturnStatement):
2705         (JSC::SyntaxChecker::createBreakStatement):
2706         (JSC::SyntaxChecker::createContinueStatement):
2707         (JSC::SyntaxChecker::createTryStatement):
2708         (JSC::SyntaxChecker::createSwitchStatement):
2709         (JSC::SyntaxChecker::createWhileStatement):
2710         (JSC::SyntaxChecker::createWithStatement):
2711         (JSC::SyntaxChecker::createDoWhileStatement):
2712         (JSC::SyntaxChecker::createLabelStatement):
2713         (JSC::SyntaxChecker::createThrowStatement):
2714         (JSC::SyntaxChecker::createDebugger):
2715         (JSC::SyntaxChecker::createConstStatement):
2716         (JSC::SyntaxChecker::appendConstDecl):
2717         (JSC::SyntaxChecker::createGetterOrSetterProperty):
2718         (JSC::SyntaxChecker::combineCommaNodes):
2719         (JSC::SyntaxChecker::operatorStackPop):
2720
2721 2012-08-01  Filip Pizlo  <fpizlo@apple.com>
2722
2723         DFG should hoist structure checks
2724         https://bugs.webkit.org/show_bug.cgi?id=92696
2725
2726         Reviewed by Gavin Barraclough.
2727
2728         This hoists structure checks in the same way that we would hoist array checks, but with added
2729         complexity to cope with the fact that the structure of an object may change. This is handled
2730         by performing a side effects analysis over the region in which the respective variable is
2731         live. If a structure clobbering side effect may happen then we either hoist the structure
2732         checks and fall back on structure transition watchpoints (if the watchpoint set is still
2733         valid), or we avoid hoisting altogether.
2734         
2735         Doing this required teaching the CFA that we may have an expectation that an object has a
2736         particular structure even after structure clobbering happens, in the sense that structure
2737         proofs that were cobbered can be revived using watchpoints. CFA must know about this so that
2738         OSR entry may know about it, since we cannot allow entry to happen if the variable has a
2739         clobbered structure proof, will have a watchpoint to revive the proof, and the variable in
2740         the baseline JIT has a completely unrelated structure.
2741         
2742         This is mostly performance neutral.
2743
2744         * CMakeLists.txt:
2745         * GNUmakefile.list.am:
2746         * JavaScriptCore.xcodeproj/project.pbxproj:
2747         * Target.pri:
2748         * bytecode/ValueRecovery.h:
2749         (JSC::ValueRecovery::isSet):
2750         (JSC::ValueRecovery::operator!):
2751         (ValueRecovery):
2752         * dfg/DFGAbstractState.cpp:
2753         (JSC::DFG::AbstractState::execute):
2754         (JSC::DFG::AbstractState::clobberWorld):
2755         (DFG):
2756         (JSC::DFG::AbstractState::clobberCapturedVars):
2757         * dfg/DFGAbstractState.h:
2758         (AbstractState):
2759         * dfg/DFGAbstractValue.h:
2760         (JSC::DFG::AbstractValue::clear):
2761         (JSC::DFG::AbstractValue::isClear):
2762         (JSC::DFG::AbstractValue::makeTop):
2763         (JSC::DFG::AbstractValue::isTop):
2764         (JSC::DFG::AbstractValue::set):
2765         (JSC::DFG::AbstractValue::operator==):
2766         (JSC::DFG::AbstractValue::merge):
2767         (JSC::DFG::AbstractValue::filter):
2768         (JSC::DFG::AbstractValue::validate):
2769         (JSC::DFG::AbstractValue::validateForEntry):
2770         (AbstractValue):
2771         (JSC::DFG::AbstractValue::checkConsistency):
2772         (JSC::DFG::AbstractValue::dump):
2773         * dfg/DFGByteCodeParser.cpp:
2774         (JSC::DFG::ByteCodeParser::setLocal):
2775         (JSC::DFG::ByteCodeParser::getArgument):
2776         (JSC::DFG::ByteCodeParser::setArgument):
2777         (JSC::DFG::ByteCodeParser::parseBlock):
2778         (JSC::DFG::ByteCodeParser::fixVariableAccessSpeculations):
2779         * dfg/DFGCSEPhase.cpp:
2780         (JSC::DFG::CSEPhase::checkStructureLoadElimination):
2781         (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
2782         (JSC::DFG::CSEPhase::putStructureStoreElimination):
2783         (JSC::DFG::CSEPhase::getLocalLoadElimination):
2784         (JSC::DFG::CSEPhase::performNodeCSE):
2785         * dfg/DFGDriver.cpp:
2786         (JSC::DFG::compile):
2787         * dfg/DFGGraph.cpp:
2788         (JSC::DFG::Graph::dump):
2789         * dfg/DFGGraph.h:
2790         (JSC::DFG::Graph::vote):
2791         (Graph):
2792         * dfg/DFGNode.h:
2793         (JSC::DFG::Node::convertToStructureTransitionWatchpoint):
2794         (Node):
2795         (JSC::DFG::Node::hasStructureSet):
2796         * dfg/DFGNodeType.h:
2797         (DFG):
2798         * dfg/DFGOSREntry.cpp:
2799         (JSC::DFG::prepareOSREntry):
2800         * dfg/DFGPredictionPropagationPhase.cpp:
2801         (JSC::DFG::PredictionPropagationPhase::propagate):
2802         (PredictionPropagationPhase):
2803         (JSC::DFG::PredictionPropagationPhase::doRoundOfDoubleVoting):
2804         * dfg/DFGSpeculativeJIT.h:
2805         (SpeculativeJIT):
2806         (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
2807         (JSC::DFG::SpeculativeJIT::speculationCheckWithConditionalDirection):
2808         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecutionWithConditionalDirection):
2809         (JSC::DFG::SpeculateCellOperand::SpeculateCellOperand):
2810         (JSC::DFG::SpeculateCellOperand::gpr):
2811         (SpeculateCellOperand):
2812         * dfg/DFGSpeculativeJIT32_64.cpp:
2813         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
2814         (JSC::DFG::SpeculativeJIT::compile):
2815         * dfg/DFGSpeculativeJIT64.cpp:
2816         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
2817         (JSC::DFG::SpeculativeJIT::compile):
2818         * dfg/DFGStructureCheckHoistingPhase.cpp: Added.
2819         (DFG):
2820         (StructureCheckHoistingPhase):
2821         (JSC::DFG::StructureCheckHoistingPhase::StructureCheckHoistingPhase):
2822         (JSC::DFG::StructureCheckHoistingPhase::run):
2823         (JSC::DFG::StructureCheckHoistingPhase::noticeStructureCheck):
2824         (JSC::DFG::StructureCheckHoistingPhase::noticeClobber):
2825         (JSC::DFG::StructureCheckHoistingPhase::clobber):
2826         (CheckData):
2827         (JSC::DFG::StructureCheckHoistingPhase::CheckData::CheckData):
2828         (JSC::DFG::performStructureCheckHoisting):
2829         * dfg/DFGStructureCheckHoistingPhase.h: Added.
2830         (DFG):
2831         * dfg/DFGVariableAccessData.h:
2832         (VariableAccessData):
2833         (JSC::DFG::VariableAccessData::VariableAccessData):
2834         (JSC::DFG::VariableAccessData::mergeStructureCheckHoistingFailed):
2835         (JSC::DFG::VariableAccessData::structureCheckHoistingFailed):
2836         (JSC::DFG::VariableAccessData::clearVotes):
2837         (JSC::DFG::VariableAccessData::vote):
2838         (JSC::DFG::VariableAccessData::voteRatio):
2839         (JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):
2840         * runtime/Options.h:
2841         (JSC):
2842
2843 2012-08-01  Filip Pizlo  <fpizlo@apple.com>
2844
2845         DFG should distinguish between PutByVal's that clobber the world and ones that don't
2846         https://bugs.webkit.org/show_bug.cgi?id=92923
2847
2848         Reviewed by Mark Hahnenberg.
2849
2850         This is performance-neutral. I also confirmed that it's neutral if we make the
2851         clobbering variant (PutByValSafe) clobber all knowledge of what is an array,
2852         which should feed nicely into work on removing uses of ClassInfo.
2853
2854         * bytecode/DFGExitProfile.h:
2855         * dfg/DFGAbstractState.cpp:
2856         (JSC::DFG::AbstractState::execute):
2857         * dfg/DFGByteCodeParser.cpp:
2858         (JSC::DFG::ByteCodeParser::parseBlock):
2859         * dfg/DFGCSEPhase.cpp:
2860         (JSC::DFG::CSEPhase::getByValLoadElimination):
2861         (JSC::DFG::CSEPhase::checkStructureLoadElimination):
2862         (JSC::DFG::CSEPhase::structureTransitionWatchpointElimination):
2863         (JSC::DFG::CSEPhase::getByOffsetLoadElimination):
2864         (JSC::DFG::CSEPhase::putByOffsetStoreElimination):
2865         (JSC::DFG::CSEPhase::getPropertyStorageLoadElimination):
2866         (JSC::DFG::CSEPhase::getIndexedPropertyStorageLoadElimination):
2867         (JSC::DFG::CSEPhase::performNodeCSE):
2868         * dfg/DFGFixupPhase.cpp:
2869         (JSC::DFG::FixupPhase::fixupNode):
2870         * dfg/DFGGraph.h:
2871         (JSC::DFG::Graph::byValIsPure):
2872         (JSC::DFG::Graph::clobbersWorld):
2873         * dfg/DFGNodeType.h:
2874         (DFG):
2875         * dfg/DFGPredictionPropagationPhase.cpp:
2876         (JSC::DFG::PredictionPropagationPhase::propagate):
2877         * dfg/DFGSpeculativeJIT32_64.cpp:
2878         (JSC::DFG::SpeculativeJIT::compile):
2879         * dfg/DFGSpeculativeJIT64.cpp:
2880         (JSC::DFG::SpeculativeJIT::compile):
2881
2882 2012-08-01  Jian Li  <jianli@chromium.org>
2883
2884         Add new CSS property "-webkit-widget-region" to expose dashboard region support for other port
2885         https://bugs.webkit.org/show_bug.cgi?id=90298
2886
2887         Reviewed by Adam Barth.
2888
2889         * Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.
2890
2891 2012-08-01  Patrick Gansterer  <paroga@webkit.org>
2892
2893         Replace WTF::getCurrentLocalTime() with GregorianDateTime::setToCurrentLocalTime()
2894         https://bugs.webkit.org/show_bug.cgi?id=92286
2895
2896         Reviewed by Geoffrey Garen.
2897
2898         Add a method to GregorianDateTime to set its values to the current locale time.
2899         Replacing all occurrences of getCurrentLocalTime with the new function allows
2900         us to remove getCurrentLocalTime in a next step.
2901
2902         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2903
2904 2012-08-01  Mark Hahnenberg  <mhahnenberg@apple.com>
2905
2906         C++ code should get ClassInfo from the Structure
2907         https://bugs.webkit.org/show_bug.cgi?id=92892
2908
2909         Reviewed by Geoffrey Garen.
2910
2911         In our march to remove ClassInfo from our JSCell object headers, we can switch 
2912         C++ code over to grabbing the ClassInfo from the Structure since it is finally 
2913         safe to do so now that Structure access is safe during finalization/destruction. 
2914         The remaining JIT code changes can be done in a separate patch.
2915
2916         * heap/MarkedBlock.cpp:
2917         (JSC::MarkedBlock::callDestructor): We don't want to clear the Structure any more 
2918         since the Structure should still be valid at this point.
2919         * heap/WeakSetInlines.h:
2920         (JSC::WeakBlock::finalize): Ditto.
2921         * runtime/JSCell.h:
2922         (JSC):
2923         * runtime/Structure.h:
2924         (JSC::JSCell::classInfo): Move JSCell's classInfo() to Structure.h so it can be 
2925         inline. Use a different method of getting the JSCell's Structure based on 
2926         whether we're in GC_VALIDATION mode or not, since always using get() will cause 
2927         infinite recursion in GC_VALIDATION mode.
2928         (JSC):
2929
2930 2012-07-31  Mark Hahnenberg  <mhahnenberg@apple.com>
2931
2932         MarkedBlock::sweep() should sweep another block if it can't sweep a Structure block
2933         https://bugs.webkit.org/show_bug.cgi?id=92819
2934
2935         Reviewed by Geoffrey Garen.
2936
2937         If we are forced to allocate a new block for Structures because we are unable to safely 
2938         sweep our pre-existing Structure blocks, we should sweep another random block so that we 
2939         can start sweeping Structure blocks sooner.
2940
2941         * heap/IncrementalSweeper.cpp:
2942         (JSC::IncrementalSweeper::doSweep): Change to use sweepNextBlock.
2943         (JSC):
2944         (JSC::IncrementalSweeper::sweepNextBlock): 
2945         * heap/IncrementalSweeper.h:
2946         (IncrementalSweeper):
2947         * heap/MarkedAllocator.cpp:
2948         (JSC::MarkedAllocator::tryAllocateHelper): When we can't safely sweep 
2949         our Structure blocks, call sweepNextBlock instead.
2950
2951 2012-07-31  Sam Weinig  <sam@webkit.org>
2952
2953         Fix the Windows build.
2954
2955         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2956
2957 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
2958
2959         Maybe fix the GCC build.
2960
2961         * heap/HeapBlock.h:
2962         (HeapBlock): Accommodate incorrect parsing in GCC.
2963
2964 2012-07-31  Sam Weinig  <sam@webkit.org>
2965
2966         Stop masking 8 bits off of the visited link hash. We need all the bits!
2967         https://bugs.webkit.org/show_bug.cgi?id=92799
2968
2969         Reviewed by Anders Carlsson.
2970
2971         * runtime/Identifier.cpp:
2972         (JSC::IdentifierCStringTranslator::hash):
2973         (JSC::IdentifierLCharFromUCharTranslator::hash):
2974         * runtime/Identifier.h:
2975         (JSC::IdentifierCharBufferTranslator::hash):
2976         Update for new function names.
2977
2978 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
2979
2980         Maybe break the Windows build.
2981
2982         Reviewed by Anders Carlsson.
2983
2984         Formally objected to by Sam Weinig.
2985
2986         * heap/HeapBlock.h:
2987         (HeapBlock): Try to slightly improve this because we don't want Windows to control our lives.
2988
2989 2012-07-30  Mark Hahnenberg  <mhahnenberg@apple.com>
2990
2991         Structures should be swept after all other objects
2992         https://bugs.webkit.org/show_bug.cgi?id=92679
2993
2994         Reviewed by Filip Pizlo.
2995
2996         In order to get rid of ClassInfo from our objects, we need to be able to safely get the 
2997         ClassInfo during the destruction of objects. We'd like to get the ClassInfo out of the 
2998         Structure, but currently it is not safe to do so because the order of destruction of objects 
2999         is not guaranteed to sweep objects before their corresponding Structure. We can fix this by 
3000         sweeping Structures after everything else.
3001
3002         * heap/Heap.cpp:
3003         (JSC::Heap::isSafeToSweepStructures): Add a function that checks if it is safe to sweep Structures.
3004         If the Heap's IncrementalSweeper member is null, that means we're shutting down this VM and it is 
3005         safe to sweep structures since we'll always do Structures last anyways due to the ordering of 
3006         MarkedSpace::forEachBlock.
3007         (JSC):
3008         (JSC::Heap::didStartVMShutdown): Add this intermediate function to the Heap that ~JSGlobalData now
3009         calls rather than calling the two HeapTimer objects individually. This allows the Heap to null out 
3010         these pointers after it has invalidated them to prevent accidental use-after-free in the sweep() 
3011         calls during lastChanceToFinalize().
3012         * heap/Heap.h:
3013         (Heap):
3014         * heap/HeapTimer.h:
3015         (HeapTimer):
3016         * heap/IncrementalSweeper.cpp:
3017         (JSC::IncrementalSweeper::structuresCanBeSwept): Determines if it is currently safe to sweep Structures.
3018         This decision is based on whether we have gotten to the end of the vector of blocks that need sweeping
3019         the first time.
3020         (JSC):
3021         (JSC::IncrementalSweeper::doSweep): We add a second pass over the vector to sweep Structures after we 
3022         make our first pass. We now null out the slots as we sweep them so that we can quickly find the 
3023         Structures during the second pass.
3024         (JSC::IncrementalSweeper::startSweeping): Initialize our new Structure sweeping index.
3025         (JSC::IncrementalSweeper::willFinishSweeping): Callback that is called by MarkedSpace::sweep to notify 
3026         the IncrementalSweeper that we are going to sweep all of the remaining blocks in the Heap so it can 
3027         assume that everything is taken care of in the correct order. Since MarkedSpace::forEachBlock 
3028         iterates over the Structure blocks after all other blocks, the ordering property for sweeping Structures holds.
3029         (JSC::IncrementalSweeper::IncrementalSweeper): Initialize Structure sweeping index.
3030         * heap/IncrementalSweeper.h: Add declarations for new stuff.
3031         (IncrementalSweeper):
3032         * heap/MarkedAllocator.cpp:
3033         (JSC::MarkedAllocator::tryAllocateHelper): We now check if the current block only contains structures and 
3034         if so and it isn't safe to sweep Structures according to the Heap, we just return early instead of doing 
3035         the normal lazy sweep. If this proves to be too much of a waste in the future we can add an extra clause that 
3036         will sweep some number of other blocks in place of the current block to mitigate the cost of the floating 
3037         Structure garbage.
3038         (JSC::MarkedAllocator::addBlock):
3039         * heap/MarkedAllocator.h:
3040         (JSC::MarkedAllocator::zapFreeList): When we zap the free list in the MarkedAllocator, the current block is no 
3041         longer valid to allocate from, so we set the current block to null.
3042         * heap/MarkedBlock.cpp:
3043         (JSC::MarkedBlock::sweepHelper): Added a couple assertions to make sure that we weren't trying to sweep Structures
3044         at an unsafe time.
3045         * heap/MarkedSpace.cpp:
3046         (JSC::MarkedSpace::sweep): Notify the IncrementalSweeper that the MarkedSpace will finish all currently remaining sweeping.
3047         (JSC): 
3048         * heap/MarkedSpace.h:
3049         (JSC):
3050         * runtime/JSGlobalData.cpp:
3051         (JSC::JSGlobalData::~JSGlobalData): Call the new Heap::didStartVMShutdown.
3052
3053 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
3054
3055         Fix all the other builds I just broke. Maybe fix the Windows build.
3056
3057         * heap/HeapBlock.h:
3058         (HeapBlock): WTF?
3059
3060 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
3061
3062         Maybe fix the Windows build.
3063
3064         * heap/HeapBlock.h:
3065         (HeapBlock): WTF?
3066
3067 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
3068
3069         Maybe fix the Windows build.
3070
3071         * heap/HeapBlock.h:
3072         (HeapBlock): WTF?
3073
3074 2012-07-31  Geoffrey Garen  <ggaren@apple.com>
3075
3076         Removed some public data and casting from the Heap
3077         https://bugs.webkit.org/show_bug.cgi?id=92777
3078
3079         Reviewed by Oliver Hunt.
3080
3081         * heap/BlockAllocator.cpp:
3082         (JSC::BlockAllocator::releaseFreeBlocks):
3083         (JSC::BlockAllocator::blockFreeingThreadMain): Use the DeadBlock class
3084         since HeapBlock is a template, and not a class, now. Call destroy()
3085         instead of monkeying around with DeadBlock's internal data because
3086         encapsulation is good.
3087
3088         * heap/BlockAllocator.h:
3089         (DeadBlock): Added a class to represent a dead block, since HeapBlock is
3090         a template now, and can't be instantiated directly.
3091
3092         (JSC::DeadBlock::DeadBlock):
3093         (JSC::DeadBlock::create):
3094         (BlockAllocator):
3095         (JSC::BlockAllocator::allocate):
3096         (JSC::BlockAllocator::deallocate): Use the DeadBlock class because
3097         encapsulation is good.
3098
3099         * heap/CopiedBlock.h:
3100         (CopiedBlock::destroy): No need for a destroy() function, since we
3101         inherit one now.
3102
3103         (JSC::CopiedBlock::CopiedBlock):
3104         (JSC::CopiedBlock::payloadEnd):
3105         (JSC::CopiedBlock::capacity): Updated for some encapsulation inside
3106         HeapBlock.
3107
3108         * heap/CopiedSpace.cpp:
3109         (JSC::CopiedSpace::~CopiedSpace):
3110         (JSC::CopiedSpace::doneCopying):
3111         (JSC::CopiedSpace::size):
3112         (JSC::CopiedSpace::capacity):
3113         (JSC::isBlockListPagedOut): Removed a bunch of casting. This is no longer
3114         necessary, now that our list and its nodes have the right type.
3115
3116         * heap/CopiedSpace.h: Use the right type in our data structures because
3117         it improves clarity.
3118
3119         * heap/CopiedSpaceInlineMethods.h:
3120         (JSC::CopiedSpace::startedCopying): Use swap to avoid duplicating it.
3121
3122         * heap/HeapBlock.h:
3123         (HeapBlock): Made this a class template so we can return the right type
3124         in linked list operations. Made our data private because encapsulation
3125         is good.
3126
3127         (JSC::HeapBlock::destroy): Since we know our type, we can also eliminate
3128         duplicate destroy() functions in our subclasses.
3129
3130         (JSC::HeapBlock::allocation): Added an accessor so we can hide our data.
3131         By using const, this accessor prevents clients from accidentally deleting
3132         our allocation.
3133
3134         * heap/MarkedAllocator.cpp:
3135         (JSC::MarkedAllocator::isPagedOut):
3136         (JSC::MarkedAllocator::tryAllocateHelper):
3137         (JSC::MarkedAllocator::removeBlock): Removed a bunch of casting. This is
3138         no longer necessary, now that our list and its nodes have the right type.
3139
3140         * heap/MarkedAllocator.h:
3141         (MarkedAllocator):
3142         (JSC::MarkedAllocator::reset):
3143         (JSC::MarkedAllocator::forEachBlock): Use the right type, do less casting.
3144
3145         * heap/MarkedBlock.cpp: 
3146         (JSC::MarkedBlock::destroy): Removed this function because our parent
3147         class provides it for us now.
3148
3149         (JSC::MarkedBlock::MarkedBlock):
3150         * heap/MarkedBlock.h:
3151         (MarkedBlock):
3152         (JSC::MarkedBlock::capacity): Updated for encapsulation.
3153
3154 2012-07-31  Filip Pizlo  <fpizlo@apple.com>
3155
3156         DFG OSR exit profiling has unusual oversights
3157         https://bugs.webkit.org/show_bug.cgi?id=92728
3158
3159         Reviewed by Geoffrey Garen.
3160
3161         * dfg/DFGOSRExit.cpp:
3162         (JSC::DFG::OSRExit::considerAddingAsFrequentExitSiteSlow):
3163         * dfg/DFGSpeculativeJIT.h:
3164         (JSC::DFG::SpeculativeJIT::speculationWatchpoint):
3165         * dfg/DFGSpeculativeJIT32_64.cpp:
3166         (JSC::DFG::SpeculativeJIT::compile):
3167         * dfg/DFGSpeculativeJIT64.cpp:
3168         (JSC::DFG::SpeculativeJIT::compile):
3169
3170 2012-07-31  Chao-ying Fu  <fu@mips.com>
3171
3172         Add MIPS add32 function
3173         https://bugs.webkit.org/show_bug.cgi?id=91522
3174
3175         Reviewed by Oliver Hunt.
3176
3177         Add isCompactPtrAlignedAddressOffset.
3178         Add a new version of add32 that accepts AbsoluteAddress as inputs.
3179
3180         * assembler/MacroAssemblerMIPS.h:
3181         (JSC::MacroAssemblerMIPS::isCompactPtrAlignedAddressOffset): New.
3182         (MacroAssemblerMIPS):
3183         (JSC::MacroAssemblerMIPS::add32): Support AbsoluteAddress as inputs.
3184
3185 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3186
3187         Unreviewed, rolling out r124123.
3188         http://trac.webkit.org/changeset/124123
3189         https://bugs.webkit.org/show_bug.cgi?id=92700
3190
3191         ASSERT crashes terminate webkit Layout tests (Requested by
3192         msaboff on #webkit).
3193
3194         * heap/Heap.cpp:
3195         * heap/Heap.h:
3196         (Heap):
3197         * heap/IncrementalSweeper.cpp:
3198         (JSC::IncrementalSweeper::doSweep):
3199         (JSC::IncrementalSweeper::startSweeping):
3200         (JSC::IncrementalSweeper::IncrementalSweeper):
3201         (JSC):
3202         * heap/IncrementalSweeper.h:
3203         (IncrementalSweeper):
3204         * heap/MarkedAllocator.cpp:
3205         (JSC::MarkedAllocator::tryAllocateHelper):
3206         (JSC::MarkedAllocator::addBlock):
3207         * heap/MarkedAllocator.h:
3208         (JSC::MarkedAllocator::zapFreeList):
3209         * heap/MarkedBlock.cpp:
3210         (JSC::MarkedBlock::sweepHelper):
3211         * heap/MarkedSpace.cpp:
3212         * heap/MarkedSpace.h:
3213         (JSC::MarkedSpace::sweep):
3214         (JSC):
3215         * runtime/JSGlobalData.cpp:
3216         (JSC::JSGlobalData::~JSGlobalData):
3217
3218 2012-07-30  Mark Hahnenberg  <mhahnenberg@apple.com>
3219
3220         Structures should be swept after all other objects
3221         https://bugs.webkit.org/show_bug.cgi?id=92679
3222
3223         Reviewed by Filip Pizlo.
3224
3225         In order to get rid of ClassInfo from our objects, we need to be able to safely get the 
3226         ClassInfo during the destruction of objects. We'd like to get the ClassInfo out of the 
3227         Structure, but currently it is not safe to do so because the order of destruction of objects 
3228         is not guaranteed to sweep objects before their corresponding Structure. We can fix this by 
3229         sweeping Structures after everything else.
3230
3231         * heap/Heap.cpp:
3232         (JSC::Heap::isSafeToSweepStructures): Add a function that checks if it is safe to sweep Structures.
3233         If the Heap's IncrementalSweeper member is null, that means we're shutting down this VM and it is 
3234         safe to sweep structures since we'll always do Structures last anyways due to the ordering of 
3235         MarkedSpace::forEachBlock.
3236         (JSC):
3237         (JSC::Heap::didStartVMShutdown): Add this intermediate function to the Heap that ~JSGlobalData now
3238         calls rather than calling the two HeapTimer objects individually. This allows the Heap to null out 
3239         these pointers after it has invalidated them to prevent accidental use-after-free in the sweep() 
3240         calls during lastChanceToFinalize().
3241         * heap/Heap.h:
3242         (Heap):
3243         * heap/HeapTimer.h:
3244         (HeapTimer):
3245         * heap/IncrementalSweeper.cpp:
3246         (JSC::IncrementalSweeper::structuresCanBeSwept): Determines if it is currently safe to sweep Structures.
3247         This decision is based on whether we have gotten to the end of the vector of blocks that need sweeping
3248         the first time.
3249         (JSC):
3250         (JSC::IncrementalSweeper::doSweep): We add a second pass over the vector to sweep Structures after we 
3251         make our first pass. We now null out the slots as we sweep them so that we can quickly find the 
3252         Structures during the second pass.
3253         (JSC::IncrementalSweeper::startSweeping): Initialize our new Structure sweeping index.
3254         (JSC::IncrementalSweeper::willFinishSweeping): Callback that is called by MarkedSpace::sweep to notify 
3255         the IncrementalSweeper that we are going to sweep all of the remaining blocks in the Heap so it can 
3256         assume that everything is taken care of in the correct order. Since MarkedSpace::forEachBlock 
3257         iterates over the Structure blocks after all other blocks, the ordering property for sweeping Structures holds.
3258         (JSC::IncrementalSweeper::IncrementalSweeper): Initialize Structure sweeping index.
3259         * heap/IncrementalSweeper.h: Add declarations for new stuff.
3260         (IncrementalSweeper):
3261         * heap/MarkedAllocator.cpp:
3262         (JSC::MarkedAllocator::tryAllocateHelper): We now check if the current block only contains structures and 
3263         if so and it isn't safe to sweep Structures according to the Heap, we just return early instead of doing 
3264         the normal lazy sweep. If this proves to be too much of a waste in the future we can add an extra clause that 
3265         will sweep some number of other blocks in place of the current block to mitigate the cost of the floating 
3266         Structure garbage.
3267         (JSC::MarkedAllocator::addBlock):
3268         * heap/MarkedAllocator.h:
3269         (JSC::MarkedAllocator::zapFreeList): When we zap the free list in the MarkedAllocator, the current block is no 
3270         longer valid to allocate from, so we set the current block to null.
3271         * heap/MarkedBlock.cpp:
3272         (JSC::MarkedBlock::sweepHelper): Added a couple assertions to make sure that we weren't trying to sweep Structures
3273         at an unsafe time.
3274         * heap/MarkedSpace.cpp:
3275         (JSC::MarkedSpace::sweep): Notify the IncrementalSweeper that the MarkedSpace will finish all currently remaining sweeping.
3276         (JSC): 
3277         * heap/MarkedSpace.h:
3278         (JSC):
3279         * runtime/JSGlobalData.cpp:
3280         (JSC::JSGlobalData::~JSGlobalData): Call the new Heap::didStartVMShutdown.
3281
3282 2012-07-29  Filip Pizlo  <fpizlo@apple.com>
3283
3284         PropertyNameArray::m_shouldCache is only assigned and never used
3285         https://bugs.webkit.org/show_bug.cgi?id=92598
3286
3287         Reviewed by Dan Bernstein.
3288
3289         * runtime/PropertyNameArray.h:
3290         (JSC::PropertyNameArray::PropertyNameArray):
3291         (PropertyNameArray):
3292
3293 2012-07-29  Rik Cabanier  <cabanier@adobe.com>
3294
3295         Add ENABLE_CSS_COMPOSITING flag
3296         https://bugs.webkit.org/show_bug.cgi?id=92553
3297
3298         Reviewed by Dirk Schulze.
3299
3300         Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html
3301
3302         * Configurations/FeatureDefines.xcconfig:
3303
3304 2012-07-27  Mark Hahnenberg  <mhahnenberg@apple.com>
3305
3306         Split functionality of MarkedAllocator::m_currentBlock
3307         https://bugs.webkit.org/show_bug.cgi?id=92550
3308
3309         Reviewed by Filip Pizlo.
3310
3311         MarkedAllocator::m_currentBlock serves two purposes right now; it indicates the block that is currently 
3312         being used for allocation and the beginning of the list of blocks that need to be swept. We should split 
3313         these two functionalities into two separate fields.
3314
3315         * heap/MarkedAllocator.cpp:
3316         (JSC::MarkedAllocator::tryAllocateHelper): Use m_blocksToSweep instead of m_currentBlock as the 
3317         initializer/reference of the loop. Only change m_currentBlock when we know what the result will be.
3318         (JSC::MarkedAllocator::addBlock): When we add a new block we know that both m_blocksToSweep and 
3319         m_currentBlock are null. In order to preserve the invariant that m_currentBlock <= m_blocksToSweep, 
3320         we assign both of them to point to the new block.
3321         (JSC::MarkedAllocator::removeBlock): We need a separate check to see if the block we're removing is 
3322         m_blocksToSweep and if so, advance it to the next block in the list.
3323         * heap/MarkedAllocator.h:
3324         (MarkedAllocator): Initialize m_blocksToSweep.
3325         (JSC::MarkedAllocator::MarkedAllocator):
3326         (JSC::MarkedAllocator::reset): We set m_blocksToSweep to be the head of our list. This function is called
3327         at the end of a collection, so all of the blocks in our allocator need to be swept. We need to sweep a 
3328         block before we can start allocating, so m_currentBlock is set to null. We also set the freeList to 
3329         the empty FreeList to emphasize the fact that we can't start allocating until we do some sweeping.
3330
3331 2012-07-27  Mark Hahnenberg  <mhahnenberg@apple.com>
3332
3333         Increase inline storage for JSFinalObjects by one
3334         https://bugs.webkit.org/show_bug.cgi?id=92526
3335
3336         Reviewed by Geoffrey Garen.
3337
3338         Now that we've removed the inheritorID from objects, we can increase our inline storage for JSFinalObjects on 
3339         64-bit platforms by 1.
3340
3341         * llint/LowLevelInterpreter.asm: Change the constant.
3342         * runtime/PropertyOffset.h: Change the constant.
3343         (JSC):
3344
3345 2012-07-27  Jer Noble  <jer.noble@apple.com>
3346
3347         Support a rational time class for use by media elements.
3348         https://bugs.webkit.org/show_bug.cgi?id=88787
3349
3350         Re-export WTF::MediaTime from JavaScriptCore.
3351
3352         Reviewed by Eric Carlson.
3353
3354         * JavaScriptCore.order:
3355         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3356
3357 2012-07-26  Filip Pizlo  <fpizlo@apple.com>
3358
3359         JSObject::reallocateStorageIfNecessary is neither used nor defined
3360         https://bugs.webkit.org/show_bug.cgi?id=92417
3361
3362         Reviewed by Mark Rowe.
3363
3364         * runtime/JSObject.h:
3365         (JSObject):
3366
3367 2012-07-26  Mark Hahnenberg  <mhahnenberg@apple.com>
3368
3369         Allocate Structures in a separate part of the Heap
3370         https://bugs.webkit.org/show_bug.cgi?id=92420
3371
3372         Reviewed by Filip Pizlo.
3373
3374         To fix our issue with destruction/finalization of Structures before their objects, we can move Structures to a separate 
3375         part of the Heap that will be swept after all other objects. This first patch will just be separating Structures 
3376         out into their own separate MarkedAllocator. Everything else will behave identically.
3377
3378         * heap/Heap.h: New function to allocate Structures in the Heap.
3379         (Heap):
3380         (JSC):
3381         (JSC::Heap::allocateStructure):
3382         * heap/MarkedAllocator.cpp: Pass whether or not we're allocated Structures to the MarkedBlock.
3383         (JSC::MarkedAllocator::allocateBlock):
3384         * heap/MarkedAllocator.h: Add tracking for whether or not we're allocating only Structures.
3385         (JSC::MarkedAllocator::onlyContainsStructures):
3386         (MarkedAllocator):
3387         (JSC::MarkedAllocator::MarkedAllocator):
3388         (JSC::MarkedAllocator::init):
3389         * heap/MarkedBlock.cpp: Add tracking for whether or not we're allocating only Structures. We need this to be able to 
3390         distinguish the various MarkedBlock types in MarkedSpace::allocatorFor(MarkedBlock*).
3391         (JSC::MarkedBlock::create):
3392         (JSC::MarkedBlock::MarkedBlock):
3393         * heap/MarkedBlock.h:
3394         (MarkedBlock):
3395         (JSC::MarkedBlock::onlyContainsStructures):
3396         (JSC):
3397         * heap/MarkedSpace.cpp: Include the new Structure allocator in all the places that all the other allocators are used/modified.
3398         (JSC::MarkedSpace::MarkedSpace):
3399         (JSC::MarkedSpace::resetAllocators):
3400         (JSC::MarkedSpace::canonicalizeCellLivenessData):
3401         (JSC::MarkedSpace::isPagedOut):
3402         * heap/MarkedSpace.h: Add new MarkedAllocator just for Structures.
3403         (MarkedSpace):
3404         (JSC::MarkedSpace::allocatorFor):
3405         (JSC::MarkedSpace::allocateStructure):
3406         (JSC):
3407         (JSC::MarkedSpace::forEachBlock):
3408         * runtime/Structure.h: Move all of the functions that call allocateCell<Structure> down below the explicit template specialization
3409         for allocateCell<Structure>. The new inline specialization for allocateCell directly calls the allocateStructure() function in the
3410         Heap.
3411         (Structure):
3412         (JSC::Structure):
3413         (JSC):
3414         (JSC::Structure::create):
3415         (JSC::Structure::createStructure):
3416
3417 2012-07-26  Filip Pizlo  <fpizlo@apple.com>
3418
3419         JSArray has methods that are neither used nor defined
3420         https://bugs.webkit.org/show_bug.cgi?id=92416
3421