Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the...
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-05-26  Gavin Barraclough  <barraclough@apple.com>
2
3         Reviewed by Oliver Hunt.
4
5         Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
6
7         If the last item in a main disjunction is a quantified set of parentheses,
8         this is easier to code generate for than the general case for quantified
9         parentheses. This is because we never need to backtrack into the parentheses
10         - the first match will be the final and accepted match.
11
12         This patch also somewhat reverts a recent change to when fallback to PCRE
13         occurs. At the minute the compiler is tracking on patterns which will
14         require JIT fallback. This is handy from a performance perspective (it saves
15         the failed attempt at JIT compilation), but it means introducing knowledge
16         of the JITs capabilities into the other layers of the regex compilers. For
17         the specific feature of back-references, add a flag tracking their presence
18         on the pattern, and make these expressions fallback without attempting to
19         JIT. For parentheses, return to detecting which cases are have or have not
20         been handled during JIT compilation.
21
22         18% progression on tagcloud, ~1.5% overall on sunspidey.
23
24         * yarr/RegexCompiler.cpp:
25         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
26         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
27         * yarr/RegexJIT.cpp:
28         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
29         (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
30         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
31         (JSC::Yarr::RegexGenerator::generateTerm):
32         (JSC::Yarr::RegexGenerator::RegexGenerator):
33         (JSC::Yarr::RegexGenerator::shouldFallBack):
34         (JSC::Yarr::jitCompileRegex):
35         * yarr/RegexPattern.h:
36         (JSC::Yarr::RegexPattern::RegexPattern):
37         (JSC::Yarr::RegexPattern::reset):
38
39 2010-05-26  Geoffrey Garen  <ggaren@apple.com>
40
41         Reviewed by Sam Weinig.
42
43         Fixed a crash seen on the Leopard bot, caused by merge.
44
45         * jit/JITStubs.cpp:
46         (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
47         since it's no longer passed to us as an argument.
48
49 2010-05-25  Geoffrey Garen  <ggaren@apple.com>
50
51         Fixed build failure caused by merge.
52
53         * jit/JITStubs.cpp:
54         (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
55         function no longer returns a pair.
56
57 2010-05-25  Geoffrey Garen  <ggaren@apple.com>
58
59         Reviewed by Oliver Hunt.
60
61         <rdar://problem/8020221>
62         
63         Fixed a crash seen on Windows when calling a function with too many
64         arguments.
65         
66         SunSpider reports no change.
67         
68         No test because the ASSERT I added fires in existing tests.
69
70         * jit/JITStubs.cpp:
71         (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
72         many arguments have been provided, since the caller only allocated enough
73         registerFile space for the arguments it provided, not enough for the extra
74         copy of arguments we're going to need.
75
76 2010-05-25  Kwang Yul Seo  <skyul@company100.net>
77
78         Reviewed by Darin Adler.
79
80         Build fix for JSFunction
81         https://bugs.webkit.org/show_bug.cgi?id=39658
82
83         MSVC can't compile one of JSFunction constructors when JIT is disabled.
84         "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. 
85         Add ENABLE(JIT) guard to the constructor.
86
87         * runtime/JSFunction.cpp:
88         (JSC::JSFunction::JSFunction):
89         * runtime/JSFunction.h:
90
91 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
92
93         Reviewed by Sam Weinig.
94
95         Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
96
97         Presently, as soon as op-call strays off the hot path we set up a set of values on
98         the stack to be passed as arguments to cti functions, in case any should be called.
99
100         Instead, hoist the setup of the callframe to happen slightly sooner, and make the
101         cti functions to compile & check arity read these values from the callframe. This
102         allows up to remove the deprecated methods to manually set up cti arguments, rather
103         than using JITStubCall.h.
104
105         * interpreter/CallFrame.h:
106         * jit/JIT.h:
107         * jit/JITCall.cpp:
108         (JSC::JIT::compileOpCallInitializeCallFrame):
109         (JSC::JIT::compileOpCallVarargs):
110         (JSC::JIT::compileOpCallVarargsSlowCase):
111         (JSC::JIT::compileOpCall):
112         (JSC::JIT::compileOpCallSlowCase):
113         * jit/JITCall32_64.cpp:
114         (JSC::JIT::compileOpCallInitializeCallFrame):
115         (JSC::JIT::compileOpCallVarargs):
116         (JSC::JIT::compileOpCallVarargsSlowCase):
117         (JSC::JIT::compileOpCall):
118         (JSC::JIT::compileOpCallSlowCase):
119         * jit/JITInlineMethods.h:
120         * jit/JITOpcodes.cpp:
121         (JSC::JIT::privateCompileCTIMachineTrampolines):
122         * jit/JITOpcodes32_64.cpp:
123         (JSC::JIT::privateCompileCTIMachineTrampolines):
124         * jit/JITStubs.cpp:
125         (JSC::DEFINE_STUB_FUNCTION):
126         * jit/JITStubs.h:
127         (JSC::):
128
129 2010-05-24  Gavin Barraclough  <barraclough@apple.com>
130
131         Reviewed by Sam Weinig.
132         Relanding r60075.
133
134         * bytecode/CodeBlock.cpp:
135         (JSC::CodeBlock::dump):
136         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
137         * bytecode/CodeBlock.h:
138         * bytecode/Opcode.h:
139         * bytecompiler/BytecodeGenerator.cpp:
140         (JSC::BytecodeGenerator::BytecodeGenerator):
141         (JSC::BytecodeGenerator::emitConstruct):
142         * bytecompiler/BytecodeGenerator.h:
143         (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
144         * interpreter/Interpreter.cpp:
145         (JSC::Interpreter::privateExecute):
146         * jit/JIT.cpp:
147         (JSC::JIT::privateCompileMainPass):
148         * jit/JIT.h:
149         * jit/JITCall.cpp:
150         (JSC::JIT::compileOpCall):
151         (JSC::JIT::compileOpCallSlowCase):
152         * jit/JITCall32_64.cpp:
153         (JSC::JIT::compileOpCall):
154         (JSC::JIT::compileOpCallSlowCase):
155         * jit/JITOpcodes.cpp:
156         (JSC::JIT::privateCompileCTIMachineTrampolines):
157         (JSC::JIT::privateCompileCTINativeCall):
158         (JSC::JIT::emit_op_neq_null):
159         (JSC::JIT::emit_op_convert_this):
160         (JSC::JIT::emit_op_get_callee):
161         (JSC::JIT::emit_op_create_this):
162         * jit/JITOpcodes32_64.cpp:
163         (JSC::JIT::privateCompileCTIMachineTrampolines):
164         (JSC::JIT::privateCompileCTINativeCall):
165         (JSC::JIT::emit_op_get_callee):
166         (JSC::JIT::emit_op_create_this):
167         * jit/JITStubs.cpp:
168         (JSC::DEFINE_STUB_FUNCTION):
169         (JSC::JITThunks::hostFunctionStub):
170         * jit/JITStubs.h:
171         (JSC::JITThunks::ctiNativeConstruct):
172         (JSC::):
173         * runtime/ExceptionHelpers.cpp:
174         (JSC::createNotAnObjectError):
175         * runtime/Executable.h:
176         (JSC::NativeExecutable::create):
177         (JSC::NativeExecutable::NativeExecutable):
178         * runtime/JSFunction.cpp:
179         (JSC::callHostFunctionAsConstructor):
180         * runtime/JSFunction.h:
181         * wtf/Platform.h:
182
183 == Rolled over to ChangeLog-2010-05-24 ==