4565b0ee73a7169bcb2923abe40927aace41ed93
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2015-09-05  Brian Burg  <bburg@apple.com>
2
3         Web Inspector: tighten up lifetimes for Agent-owned objects, and initialize agents using contexts
4         https://bugs.webkit.org/show_bug.cgi?id=148625
5
6         Reviewed by Joseph Pecoraro.
7
8         All agents own their domain-specific frontend and backend dispatchers. Change so that
9         they are initialized in constructors rather than when a frontend connects or disconnects.
10         This may cause additional memory use, but this can be counteracted by lazily creating
11         some agents that are not required for other agents to function (i.e., runtime and page agents).
12
13         To avoid adding frontend/backend dispatcher arguments to every single agent constructor,
14         change agent construction to take a AgentContext or a subclass of it. This provides agents with
15         references to objects in the owning InspectorEnvironment subclass that are guaranteed to
16         outlive all agents. AgentContext and its subclasses follow the existing Agent class hierarchy.
17
18         * inspector/InspectorAgentBase.h:
19         (Inspector::JSAgentContext::JSAgentContext):
20         * inspector/JSGlobalObjectInspectorController.cpp:
21         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
22         (Inspector::JSGlobalObjectInspectorController::connectFrontend):
23         (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
24         (Inspector::JSGlobalObjectInspectorController::disconnectAllFrontends):
25         (Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
26         * inspector/JSGlobalObjectInspectorController.h:
27         * inspector/agents/InspectorAgent.cpp:
28         (Inspector::InspectorAgent::InspectorAgent):
29         (Inspector::InspectorAgent::didCreateFrontendAndBackend):
30         (Inspector::InspectorAgent::willDestroyFrontendAndBackend):
31         * inspector/agents/InspectorAgent.h:
32         * inspector/agents/InspectorConsoleAgent.cpp:
33         (Inspector::InspectorConsoleAgent::InspectorConsoleAgent):
34         (Inspector::InspectorConsoleAgent::didCreateFrontendAndBackend):
35         (Inspector::InspectorConsoleAgent::willDestroyFrontendAndBackend):
36         * inspector/agents/InspectorConsoleAgent.h:
37         * inspector/agents/InspectorDebuggerAgent.cpp:
38         (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
39         (Inspector::InspectorDebuggerAgent::didCreateFrontendAndBackend):
40         (Inspector::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
41         * inspector/agents/InspectorDebuggerAgent.h:
42         * inspector/agents/InspectorRuntimeAgent.cpp:
43         (Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
44         * inspector/agents/InspectorRuntimeAgent.h:
45         * inspector/agents/JSGlobalObjectConsoleAgent.cpp:
46         (Inspector::JSGlobalObjectConsoleAgent::JSGlobalObjectConsoleAgent):
47         * inspector/agents/JSGlobalObjectConsoleAgent.h:
48         * inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
49         (Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent):
50         * inspector/agents/JSGlobalObjectDebuggerAgent.h:
51         * inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
52         (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent):
53         (Inspector::JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend):
54         * inspector/agents/JSGlobalObjectRuntimeAgent.h:
55         * inspector/augmentable/AlternateDispatchableAgent.h:
56         * inspector/augmentable/AugmentableInspectorController.h: Alternate agents should
57         have access to frontend router and backend dispatcher at construction time.
58         
59         * inspector/scripts/codegen/cpp_generator_templates.py:
60         * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:
61         (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
62         * inspector/scripts/codegen/objc_generator_templates.py:
63
64 2015-09-04  Brian Burg  <bburg@apple.com>
65
66         Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
67         https://bugs.webkit.org/show_bug.cgi?id=148492
68
69         Reviewed by Joseph Pecoraro.
70
71         Replace uses of FrontendChannel with FrontendRouter. Minor cleanups along the way.  
72
73         Make AgentRegistry automatically signal discardAgent() in its destructor, since it always
74         gets executed in the owning controller's destructor anyway.
75
76         * inspector/InspectorAgentBase.h:
77         * inspector/InspectorAgentRegistry.cpp:
78         (Inspector::AgentRegistry::~AgentRegistry):
79         (Inspector::AgentRegistry::didCreateFrontendAndBackend):
80         (Inspector::AgentRegistry::willDestroyFrontendAndBackend):
81         (Inspector::AgentRegistry::discardAgents): Deleted.
82         * inspector/InspectorAgentRegistry.h:
83         * inspector/InspectorBackendDispatcher.cpp:
84         * inspector/InspectorFrontendRouter.cpp:
85         (Inspector::FrontendRouter::leakChannel): Deleted, no longer necessary.
86         * inspector/InspectorFrontendRouter.h:
87         * inspector/JSGlobalObjectInspectorController.cpp:
88         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
89         (Inspector::JSGlobalObjectInspectorController::connectFrontend):
90         (Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
91         (Inspector::JSGlobalObjectInspectorController::~JSGlobalObjectInspectorController):
92         * inspector/JSGlobalObjectInspectorController.h:
93         * inspector/agents/InspectorAgent.cpp:
94         (Inspector::InspectorAgent::didCreateFrontendAndBackend):
95         * inspector/agents/InspectorAgent.h:
96         * inspector/agents/InspectorConsoleAgent.cpp:
97         (Inspector::InspectorConsoleAgent::didCreateFrontendAndBackend):
98         * inspector/agents/InspectorConsoleAgent.h:
99         * inspector/agents/InspectorDebuggerAgent.cpp:
100         (Inspector::InspectorDebuggerAgent::didCreateFrontendAndBackend):
101         * inspector/agents/InspectorDebuggerAgent.h:
102         * inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
103         (Inspector::JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend):
104         * inspector/agents/JSGlobalObjectRuntimeAgent.h:
105         * inspector/augmentable/AlternateDispatchableAgent.h:
106         * inspector/remote/RemoteInspectorDebuggable.cpp:
107         * inspector/scripts/codegen/cpp_generator_templates.py:
108         * inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
109         (CppBackendDispatcherImplementationGenerator.generate_output):
110         * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:
111         (CppFrontendDispatcherHeaderGenerator.generate_output.FrontendRouter):
112         (CppFrontendDispatcherHeaderGenerator.generate_output):
113         * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:
114         (CppFrontendDispatcherImplementationGenerator.generate_output):
115         (CppFrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
116         * inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
117         (ObjCConfigurationImplementationGenerator.generate_output):
118         * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
119         (ObjCFrontendDispatcherImplementationGenerator.generate_output):
120
121 2015-09-05  Yusuke Suzuki  <utatane.tea@gmail.com>
122
123         [ES6] Enable ES6 Module in JSC shell by default
124         https://bugs.webkit.org/show_bug.cgi?id=148689
125
126         Reviewed by Geoffrey Garen.
127
128         Enable ES6 Modules in JSC shell by default. Compile time flag is left for WebCore.
129         Since the entry point to evaluate the modules are completely separated from the usual
130         entry point to evaluate the script, we can safely enable ES6 modules in JSC shell.
131
132         And add bunch of tests for ES6 Modules.
133
134         * jsc.cpp:
135         (GlobalObject::finishCreation):
136         (functionLoadModule):
137         (runWithScripts):
138         (printUsageStatement): Deleted.
139         (CommandLine::parseArguments): Deleted.
140         * parser/Parser.cpp:
141         (JSC::Parser<LexerType>::parseInner): Deleted.
142         * tests/modules.yaml: Added.
143         * tests/modules/aliasing.js: Added.
144         * tests/modules/aliasing/drink-2.js: Added.
145         (export.let.Cappuccino.string_appeared_here.export.changeCappuccino):
146         * tests/modules/aliasing/drink.js: Added.
147         (export.changeCocoa):
148         * tests/modules/cyclic-may-produce-tdz.js: Added.
149         * tests/modules/cyclic-may-produce-tdz/1.js: Added.
150         * tests/modules/cyclic-may-produce-tdz/2.js: Added.
151         * tests/modules/default-error/main.js: Added.
152         * tests/modules/default-value-case-should-be-copied.js: Added.
153         * tests/modules/default-value-case-should-be-copied/module.js: Added.
154         (export.changeValue):
155         * tests/modules/defaults.js: Added.
156         * tests/modules/defaults/Cappuccino.js: Added.
157         * tests/modules/defaults/Cocoa.js: Added.
158         (export.default.Cocoa):
159         * tests/modules/defaults/Matcha.js: Added.
160         * tests/modules/destructuring-export.js: Added.
161         * tests/modules/destructuring-export/array.js: Added.
162         * tests/modules/destructuring-export/main.js: Added.
163         * tests/modules/execution-order-cyclic.js: Added.
164         * tests/modules/execution-order-cyclic/1.js: Added.
165         * tests/modules/execution-order-cyclic/10.js: Added.
166         * tests/modules/execution-order-cyclic/11.js: Added.
167         * tests/modules/execution-order-cyclic/2.js: Added.
168         * tests/modules/execution-order-cyclic/3.js: Added.
169         * tests/modules/execution-order-cyclic/4.js: Added.
170         * tests/modules/execution-order-cyclic/5.js: Added.
171         * tests/modules/execution-order-cyclic/6.js: Added.
172         * tests/modules/execution-order-cyclic/7.js: Added.
173         * tests/modules/execution-order-cyclic/8.js: Added.
174         * tests/modules/execution-order-cyclic/9.js: Added.
175         * tests/modules/execution-order-dag.js: Added.
176         * tests/modules/execution-order-dag/1.js: Added.
177         * tests/modules/execution-order-dag/10.js: Added.
178         * tests/modules/execution-order-dag/2.js: Added.
179         * tests/modules/execution-order-dag/3.js: Added.
180         * tests/modules/execution-order-dag/4.js: Added.
181         * tests/modules/execution-order-dag/5.js: Added.
182         * tests/modules/execution-order-dag/6.js: Added.
183         * tests/modules/execution-order-dag/7.js: Added.
184         * tests/modules/execution-order-dag/8.js: Added.
185         * tests/modules/execution-order-dag/9.js: Added.
186         * tests/modules/execution-order-depth.js: Added.
187         * tests/modules/execution-order-depth/1.js: Added.
188         * tests/modules/execution-order-depth/2.js: Added.
189         * tests/modules/execution-order-depth/3.js: Added.
190         * tests/modules/execution-order-self.js: Added.
191         * tests/modules/execution-order-sibling.js: Added.
192         * tests/modules/execution-order-sibling/1.js: Added.
193         * tests/modules/execution-order-sibling/2.js: Added.
194         * tests/modules/execution-order-sibling/3.js: Added.
195         * tests/modules/execution-order-tree.js: Added.
196         * tests/modules/execution-order-tree/1.js: Added.
197         * tests/modules/execution-order-tree/10.js: Added.
198         * tests/modules/execution-order-tree/11.js: Added.
199         * tests/modules/execution-order-tree/2.js: Added.
200         * tests/modules/execution-order-tree/3.js: Added.
201         * tests/modules/execution-order-tree/4.js: Added.
202         * tests/modules/execution-order-tree/5.js: Added.
203         * tests/modules/execution-order-tree/6.js: Added.
204         * tests/modules/execution-order-tree/7.js: Added.
205         * tests/modules/execution-order-tree/8.js: Added.
206         * tests/modules/execution-order-tree/9.js: Added.
207         * tests/modules/export-conflict-ok.js: Added.
208         * tests/modules/export-conflict-ok/A.js: Added.
209         * tests/modules/export-conflict-ok/B.js: Added.
210         * tests/modules/export-conflict-ok/main.js: Added.
211         * tests/modules/export-from.js: Added.
212         * tests/modules/export-from/main.js: Added.
213         * tests/modules/export-from/second.js: Added.
214         * tests/modules/export-with-declarations-list.js: Added.
215         * tests/modules/export-with-declarations-list/main.js: Added.
216         * tests/modules/exported-function-may-be-called-before-module-is-executed.js: Added.
217         * tests/modules/exported-function-may-be-called-before-module-is-executed/1.js: Added.
218         * tests/modules/exported-function-may-be-called-before-module-is-executed/2.js: Added.
219         (export.add):
220         (export.raise):
221         * tests/modules/import-error.js: Added.
222         * tests/modules/import-error/export-ambiguous-1.js: Added.
223         * tests/modules/import-error/export-ambiguous-2.js: Added.
224         * tests/modules/import-error/export-ambiguous.js: Added.
225         * tests/modules/import-error/export-default-from-star-2.js: Added.
226         (export.default.Cocoa):
227         * tests/modules/import-error/export-default-from-star.js: Added.
228         * tests/modules/import-error/export-not-found.js: Added.
229         * tests/modules/import-error/import-ambiguous.js: Added.
230         * tests/modules/import-error/import-default-from-star.js: Added.
231         * tests/modules/import-error/import-not-found.js: Added.
232         * tests/modules/imported-bindings-are-immutable.js: Added.
233         * tests/modules/imported-bindings-are-immutable/bindings.js: Added.
234         (export.functionDeclaration):
235         (export.classDeclaration):
236         * tests/modules/imported-bindings-can-be-changed-in-original-module.js: Added.
237         * tests/modules/imported-bindings-can-be-changed-in-original-module/bindings.js: Added.
238         * tests/modules/indirect-export-error.js: Added.
239         * tests/modules/indirect-export-error/indirect-export-ambiguous-2.js: Added.
240         * tests/modules/indirect-export-error/indirect-export-ambiguous-3.js: Added.
241         * tests/modules/indirect-export-error/indirect-export-ambiguous-4.js: Added.
242         * tests/modules/indirect-export-error/indirect-export-ambiguous.js: Added.
243         * tests/modules/indirect-export-error/indirect-export-default-2.js: Added.
244         * tests/modules/indirect-export-error/indirect-export-default-3.js: Added.
245         (export.default.Cocoa):
246         * tests/modules/indirect-export-error/indirect-export-default.js: Added.
247         * tests/modules/indirect-export-error/indirect-export-not-found-2.js: Added.
248         * tests/modules/indirect-export-error/indirect-export-not-found.js: Added.
249         * tests/modules/module-eval.js: Added.
250         * tests/modules/module-eval/A.js: Added.
251         * tests/modules/module-eval/B.js: Added.
252         * tests/modules/module-eval/drink.js: Added.
253         * tests/modules/module-is-strict-code.js: Added.
254         * tests/modules/namespace-ambiguous.js: Added.
255         * tests/modules/namespace-ambiguous/ambiguous-2.js: Added.
256         * tests/modules/namespace-ambiguous/ambiguous-3.js: Added.
257         * tests/modules/namespace-ambiguous/ambiguous-4.js: Added.
258         * tests/modules/namespace-ambiguous/ambiguous.js: Added.
259         * tests/modules/namespace-error.js: Added.
260         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-2.js: Added.
261         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-3.js: Added.
262         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-4.js: Added.
263         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-5.js: Added.
264         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-6.js: Added.
265         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity-7.js: Added.
266         * tests/modules/namespace-error/namespace-local-error-should-hide-global-ambiguity.js: Added.
267         * tests/modules/namespace-tdz.js: Added.
268         * tests/modules/namespace-tdz/A.js: Added.
269         * tests/modules/namespace-tdz/B.js: Added.
270         (export.later):
271         * tests/modules/namespace-tdz/main.js: Added.
272         * tests/modules/namespace.js: Added.
273         * tests/modules/namespace/additional-drink.js: Added.
274         * tests/modules/namespace/drink.js: Added.
275         (export.default.changeCappuccino):
276         * tests/modules/namespace/more-additional-drink.js: Added.
277         * tests/modules/resources/assert.js: Added.
278         (export.shouldBe):
279         (export.shouldThrow):
280         * tests/modules/scopes.js: Added.
281         * tests/modules/scopes/additional-drink.js: Added.
282         * tests/modules/scopes/drink.js: Added.
283         (export.default.changeCappuccino):
284         * tests/modules/scopes/more-additional-drink.js: Added.
285         * tests/modules/this-should-be-undefined.js: Added.
286         * tests/stress/modules-syntax-error-with-names.js:
287         * tests/stress/modules-syntax-error.js:
288         * tests/stress/modules-syntax.js:
289
290 2015-09-05  Yusuke Suzuki  <utatane.tea@gmail.com>
291
292         [ES6] Implement ModuleNamespaceObject
293         https://bugs.webkit.org/show_bug.cgi?id=148705
294
295         Reviewed by Geoffrey Garen.
296
297         Implement Module namespace object.
298         That is used when importing the module with the form `import * as namespace from "mod"`.
299         The module namespace object is non-extensible object that has the bindings to the original module
300         as the property.
301
302         * CMakeLists.txt:
303         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
304         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
305         * JavaScriptCore.xcodeproj/project.pbxproj:
306         * runtime/JSGlobalObject.cpp:
307         (JSC::JSGlobalObject::init):
308         (JSC::JSGlobalObject::visitChildren):
309         * runtime/JSGlobalObject.h:
310         (JSC::JSGlobalObject::moduleNamespaceObjectStructure):
311         * runtime/JSModuleNamespaceObject.cpp: Added.
312         (JSC::JSModuleNamespaceObject::JSModuleNamespaceObject):
313         (JSC::JSModuleNamespaceObject::finishCreation):
314         (JSC::JSModuleNamespaceObject::destroy):
315         (JSC::JSModuleNamespaceObject::visitChildren):
316         (JSC::callbackGetter):
317         (JSC::JSModuleNamespaceObject::getOwnPropertySlot):
318         (JSC::JSModuleNamespaceObject::put):
319         (JSC::JSModuleNamespaceObject::putByIndex):
320         (JSC::JSModuleNamespaceObject::deleteProperty):
321         (JSC::JSModuleNamespaceObject::getOwnPropertyNames):
322         (JSC::JSModuleNamespaceObject::defineOwnProperty):
323         (JSC::moduleNamespaceObjectSymbolIterator):
324         * runtime/JSModuleNamespaceObject.h: Added.
325         (JSC::JSModuleNamespaceObject::create):
326         (JSC::JSModuleNamespaceObject::createStructure):
327         (JSC::JSModuleNamespaceObject::moduleRecord):
328         * runtime/JSModuleRecord.cpp:
329         (JSC::JSModuleRecord::visitChildren):
330         (JSC::getExportedNames):
331         (JSC::JSModuleRecord::getModuleNamespace):
332         (JSC::JSModuleRecord::instantiateDeclarations):
333         * runtime/JSModuleRecord.h:
334
335 2015-09-04  Mark Lam  <mark.lam@apple.com>
336
337         Rollout r189411, r189413: Broke JSC tests.
338
339         Not reviewed.
340
341         * API/tests/PingPongStackOverflowTest.cpp: Removed.
342         * API/tests/PingPongStackOverflowTest.h: Removed.
343         * API/tests/testapi.c:
344         (main):
345         * JavaScriptCore.xcodeproj/project.pbxproj:
346         * interpreter/CallFrame.h:
347         (JSC::ExecState::operator=):
348         (JSC::ExecState::callerFrame):
349         (JSC::ExecState::argIndexForRegister):
350         (JSC::ExecState::callerFrameOrVMEntryFrame):
351         (JSC::ExecState::callerFrameAndPC):
352         * interpreter/Interpreter.cpp:
353         (JSC::UnwindFunctor::UnwindFunctor):
354         (JSC::UnwindFunctor::operator()):
355         (JSC::Interpreter::unwind):
356         * interpreter/Interpreter.h:
357         (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
358         (JSC::Interpreter::sampler):
359         * jit/CCallHelpers.h:
360         (JSC::CCallHelpers::jumpToExceptionHandler):
361         * jit/JITExceptions.cpp:
362         (JSC::genericUnwind):
363         * jit/JITExceptions.h:
364         * jit/JITOpcodes.cpp:
365         (JSC::JIT::emit_op_catch):
366         * jit/JITOpcodes32_64.cpp:
367         (JSC::JIT::emit_op_catch):
368         * jit/JITOperations.cpp:
369         * llint/LowLevelInterpreter32_64.asm:
370         * llint/LowLevelInterpreter64.asm:
371         * runtime/VM.h:
372         (JSC::VM::exceptionOffset):
373         (JSC::VM::vmEntryFrameForThrowOffset):
374         (JSC::VM::topVMEntryFrameOffset):
375         (JSC::VM::callFrameForThrowOffset):
376
377 2015-09-04  Joseph Pecoraro  <pecoraro@apple.com>
378
379         Web Inspector: Test Runtime.saveResult and $n values
380         https://bugs.webkit.org/show_bug.cgi?id=148837
381
382         Reviewed by Timothy Hatcher.
383
384         * inspector/InjectedScriptSource.js:
385         (InjectedScript.prototype._evaluateOn):
386         We don't need to be in the console object group to put the value
387         in the saved results list. That strong reference will ensure $n
388         values are always alive even if other object groups were used
389         when creating and subsequently released.
390
391 2015-09-04  Mark Lam  <mark.lam@apple.com>
392
393         [Follow up] StackOverflow stack unwinding should stop at native frames.
394         https://bugs.webkit.org/show_bug.cgi?id=148749
395
396         Rubber stamped by Michael Saboff.
397
398         Speculative fix for jsc test failure.
399
400         * interpreter/Interpreter.cpp:
401         (JSC::Interpreter::unwind):
402
403 2015-09-04  Mark Lam  <mark.lam@apple.com>
404
405         StackOverflow stack unwinding should stop at native frames.
406         https://bugs.webkit.org/show_bug.cgi?id=148749
407
408         Reviewed by Michael Saboff.
409
410         In the present code, after ping-pong'ing back and forth between native and JS
411         code a few times, if we have a stack overflow on re-entry into the VM to run
412         JS code's whose stack frame would overflow the JS stack, the code will end up
413         unwinding past the native function that is making the call to re-enter the VM.
414         As a result, any clean up code (e.g. destructors for stack variables) in the
415         skipped native function frame (and its chain of native function callers) will
416         not be called.
417
418         This patch is based on the Michael Saboff's fix of this issue landed on the
419         jsc-tailcall branch: http://trac.webkit.org/changeset/188555
420
421         We now check for the case where there are no JS frames to unwind since the
422         last native frame, and treat the exception as an unhandled exception.  The
423         native function is responsible for further propagating the exception if needed.
424
425         Other supporting work:
426         1. Remove vm->vmEntryFrameForThrow.  It should always be the same as
427            vm->topVMEntryFrame.
428         2. Change operationThrowStackOverflowError() to use the throwStackOverflowError()
429            helper function instead of rolling its own.
430         3. In the LLINT vm entry, set vm->topVMEntryFrame as soon as the entry frame is
431            fully initialized (instead of waiting).  With this, we can always reliably
432            tell which VMEntryFrame is on top.
433         4. Added a test that exercises this edge case.  The test should not hang or crash.
434
435         * API/tests/PingPongStackOverflowTest.cpp: Added.
436         (PingPongStackOverflowObject_hasInstance):
437         (testPingPongStackOverflow):
438         * API/tests/PingPongStackOverflowTest.h: Added.
439         * API/tests/testapi.c:
440         (main):
441         * JavaScriptCore.xcodeproj/project.pbxproj:
442         * interpreter/Interpreter.cpp:
443         (JSC::unwindCallFrame):
444         (JSC::getStackFrameCodeType):
445         (JSC::UnwindFunctor::UnwindFunctor):
446         (JSC::UnwindFunctor::operator()):
447         (JSC::Interpreter::unwind):
448         * interpreter/Interpreter.h:
449         (JSC::NativeCallFrameTracer::NativeCallFrameTracer):
450         (JSC::NativeCallFrameTracerWithRestore::NativeCallFrameTracerWithRestore):
451         (JSC::NativeCallFrameTracerWithRestore::~NativeCallFrameTracerWithRestore):
452         (JSC::Interpreter::sampler):
453         * jit/CCallHelpers.h:
454         (JSC::CCallHelpers::jumpToExceptionHandler):
455         * jit/JITExceptions.cpp:
456         (JSC::genericUnwind):
457         * jit/JITExceptions.h:
458         * jit/JITOpcodes.cpp:
459         (JSC::JIT::emit_op_catch):
460         * jit/JITOpcodes32_64.cpp:
461         (JSC::JIT::emit_op_catch):
462         * jit/JITOperations.cpp:
463         * llint/LowLevelInterpreter32_64.asm:
464         * llint/LowLevelInterpreter64.asm:
465         * runtime/VM.h:
466         (JSC::VM::exceptionOffset):
467         (JSC::VM::callFrameForThrowOffset):
468         (JSC::VM::vmEntryFrameForThrowOffset): Deleted.
469         (JSC::VM::topVMEntryFrameOffset): Deleted.
470
471 2015-09-04  Sukolsak Sakshuwong  <sukolsak@gmail.com>
472
473         Implement the division and modulo instructions in WebAssembly
474         https://bugs.webkit.org/show_bug.cgi?id=148791
475
476         Reviewed by Geoffrey Garen.
477
478         This patch implements the unsigned division, signed modulo, and unsigned
479         modulo instructions for 32-bit integers in WebAssembly. It also
480         implements the context pool index instructions, which are needed for
481         testing. (pack-asmjs puts numbers that are used more than once in the
482         constant pool.)
483
484         * assembler/X86Assembler.h:
485         (JSC::X86Assembler::divl_r):
486         * tests/stress/wasm-arithmetic.js:
487         * tests/stress/wasm-arithmetic.wasm:
488         * wasm/WASMFunctionCompiler.h:
489         (JSC::operationMod):
490         (JSC::operationUnsignedDiv):
491         (JSC::operationUnsignedMod):
492         (JSC::WASMFunctionCompiler::buildBinaryI32):
493         (JSC::WASMFunctionCompiler::callOperation):
494         * wasm/WASMFunctionParser.cpp:
495         (JSC::WASMFunctionParser::parseExpressionI32):
496         (JSC::WASMFunctionParser::parseConstantPoolIndexExpressionI32):
497         * wasm/WASMFunctionParser.h:
498
499 2015-09-04  Basile Clement  <basile_clement@apple.com>
500
501         Fix debug output for an eval call
502         https://bugs.webkit.org/show_bug.cgi?id=148839
503
504         Reviewed by Filip Pizlo.
505
506         * jit/ThunkGenerators.cpp:
507         (JSC::virtualThunkFor):
508
509 2015-09-04  Sukolsak Sakshuwong  <sukolsak@gmail.com>
510
511         Implement the signed division instruction in WebAssembly
512         https://bugs.webkit.org/show_bug.cgi?id=148772
513
514         Reviewed by Geoffrey Garen.
515
516         This patch implements the signed division instruction in WebAssembly
517         for 32-bit integers. We use the IDIV instruction on x86 and x86-64 and
518         use a C function on all other platforms. We throw an exception if
519         - the denominator is zero, or
520         - the numerator is -2^31 and the denominator is -1.
521
522         * jit/JITOperations.cpp:
523         * jit/JITOperations.h:
524         * tests/stress/wasm-arithmetic.js:
525         (shouldBe):
526         (shouldThrow):
527         * tests/stress/wasm-arithmetic.wasm:
528         * wasm/WASMFunctionCompiler.h:
529         (JSC::operationDiv):
530         (JSC::WASMFunctionCompiler::endFunction):
531         (JSC::WASMFunctionCompiler::buildBinaryI32):
532         (JSC::WASMFunctionCompiler::appendCall):
533         (JSC::WASMFunctionCompiler::appendCallWithExceptionCheck):
534         (JSC::WASMFunctionCompiler::callOperation):
535         (JSC::WASMFunctionCompiler::throwStackOverflowError): Deleted.
536         * wasm/WASMFunctionParser.cpp:
537         (JSC::WASMFunctionParser::parseExpressionI32):
538
539 2015-09-04  Sukolsak Sakshuwong  <sukolsak@gmail.com>
540
541         Implement the GetLocal and SetLocal instructions in WebAssembly
542         https://bugs.webkit.org/show_bug.cgi?id=148793
543
544         Reviewed by Saam Barati.
545
546         This patch implements the GetLocal and SetLocal instructions for locals
547         of type int32 in WebAssembly. A "local" in this context is either an
548         argument or a local variable.
549
550         * tests/stress/wasm-locals.js: Added.
551         (shouldBe):
552         * tests/stress/wasm-locals.wasm: Added.
553         * wasm/WASMFunctionCompiler.h:
554         (JSC::WASMFunctionCompiler::buildSetLocal):
555         (JSC::WASMFunctionCompiler::buildGetLocal):
556         * wasm/WASMFunctionParser.cpp:
557         (JSC::WASMFunctionParser::parseSetLocalStatement):
558         (JSC::WASMFunctionParser::parseExpressionI32):
559         (JSC::WASMFunctionParser::parseGetLocalExpressionI32):
560         * wasm/WASMFunctionParser.h:
561         * wasm/WASMFunctionSyntaxChecker.h:
562         (JSC::WASMFunctionSyntaxChecker::buildSetLocal):
563         (JSC::WASMFunctionSyntaxChecker::buildGetLocal):
564
565 2015-09-04  Basile Clement  <basile_clement@apple.com>
566
567         Unreviewed, add missing copyright to file from r189336
568
569         * bytecompiler/SetForScope.h:
570
571 2015-09-04  Brian Burg  <bburg@apple.com>
572
573         Web Inspector: InspectorController should support multiple frontend channels
574         https://bugs.webkit.org/show_bug.cgi?id=148538
575
576         Reviewed by Joseph Pecoraro.
577
578         Instead of a singleton, it should be possible to have multiple channels open
579         at the same time and to individually close channels as frontends come and go.
580
581         The FrontendRouter class keeps a list of open FrontendChannels and sends messages
582         to the appropriate frontends based on whether the message is a response or event.
583         Each InspectorController owns a single FrontendRouter and BackendDispatcher instance.
584         Inspector backend code that sends messages to the frontend should switch over to
585         using the router rather than directly using a FrontendChannel.
586
587         * CMakeLists.txt:
588         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
589         * JavaScriptCore.xcodeproj/project.pbxproj:
590         * inspector/InspectorBackendDispatcher.cpp: Move constructors/destructors out of the header
591         to avoid including InspectorFrontendRouter everywhere. Use the router instead of a
592         specific frontend channel. Remove guards that are no longer necessary since the router
593         is guaranteed to outlive the backend dispatcher.
594
595         (Inspector::SupplementalBackendDispatcher::SupplementalBackendDispatcher):
596         (Inspector::SupplementalBackendDispatcher::~SupplementalBackendDispatcher):
597         (Inspector::BackendDispatcher::BackendDispatcher):
598         (Inspector::BackendDispatcher::create):
599         (Inspector::BackendDispatcher::isActive):
600         (Inspector::BackendDispatcher::registerDispatcherForDomain):
601         (Inspector::BackendDispatcher::sendResponse):
602         (Inspector::BackendDispatcher::sendPendingErrors):
603         * inspector/InspectorBackendDispatcher.h:
604         (Inspector::SupplementalBackendDispatcher::SupplementalBackendDispatcher): Deleted.
605         (Inspector::SupplementalBackendDispatcher::~SupplementalBackendDispatcher): Deleted.
606         (Inspector::BackendDispatcher::clearFrontend): Deleted, no longer necessary.
607         (Inspector::BackendDispatcher::isActive): Moved to implementation file.
608         (Inspector::BackendDispatcher::BackendDispatcher): Moved to implementation file.
609         * inspector/InspectorFrontendRouter.cpp: Added.
610         (Inspector::FrontendRouter::create):
611         (Inspector::FrontendRouter::connectFrontend):
612         (Inspector::FrontendRouter::disconnectFrontend):
613         (Inspector::FrontendRouter::disconnectAllFrontends):
614         (Inspector::FrontendRouter::leakChannel):
615         (Inspector::FrontendRouter::hasLocalFrontend):
616         (Inspector::FrontendRouter::hasRemoteFrontend):
617         (Inspector::FrontendRouter::sendEvent):
618         (Inspector::FrontendRouter::sendResponse):
619         * inspector/InspectorFrontendRouter.h: Added.
620         * inspector/JSGlobalObjectInspectorController.cpp: Remove guards that are no longer necessary.
621         The frontend router and backend dispatcher now have the same lifetime as the controller.
622         Explicitly connect/disconnect the frontend channel.
623
624         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
625         (Inspector::JSGlobalObjectInspectorController::globalObjectDestroyed):
626         (Inspector::JSGlobalObjectInspectorController::connectFrontend):
627         (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
628         (Inspector::JSGlobalObjectInspectorController::disconnectAllFrontends):
629         (Inspector::JSGlobalObjectInspectorController::dispatchMessageFromFrontend):
630         (Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
631         (Inspector::JSGlobalObjectInspectorController::pause): Deleted.
632         * inspector/JSGlobalObjectInspectorController.h:
633         * inspector/agents/InspectorAgent.cpp:
634         * inspector/agents/InspectorConsoleAgent.cpp:
635         * inspector/agents/InspectorDebuggerAgent.cpp:
636         * inspector/agents/InspectorRuntimeAgent.cpp:
637         * inspector/augmentable/AugmentableInspectorController.h:
638         (Inspector::AugmentableInspectorController::connected):
639         * inspector/remote/RemoteInspectorDebuggable.h:
640         * inspector/remote/RemoteInspectorDebuggableConnection.mm:
641         (Inspector::RemoteInspectorDebuggableConnection::close):
642         * inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:
643         (CppAlternateBackendDispatcherHeaderGenerator.generate_output):
644         * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
645         (ObjCFrontendDispatcherImplementationGenerator._generate_event): Use the router.
646         * runtime/JSGlobalObjectDebuggable.cpp:
647         (JSC::JSGlobalObjectDebuggable::disconnect):
648         * runtime/JSGlobalObjectDebuggable.h:
649
650 2015-09-04  Joseph Pecoraro  <pecoraro@apple.com>
651
652         Web Inspector: Expand Console domain test coverage
653         https://bugs.webkit.org/show_bug.cgi?id=148740
654
655         Reviewed by Brian Burg.
656
657         * inspector/protocol/Console.json:
658         Update the description of this command now that it only
659         manipulates $0, and not $1, $2, .. $n.
660
661 2015-09-04  Joseph Pecoraro  <pecoraro@apple.com>
662
663         Web Inspector: Test RuntimeAgent.parse, detecting if a script parse error is recoverable
664         https://bugs.webkit.org/show_bug.cgi?id=148790
665
666         Reviewed by Timothy Hatcher.
667
668         * parser/Lexer.cpp:
669         (JSC::Lexer<T>::lex):
670         * parser/Parser.cpp:
671         (JSC::Parser<LexerType>::printUnexpectedTokenText):
672         * parser/ParserTokens.h:
673         More consistently name and treat unterminated numeric literals.
674
675         * parser/Parser.h:
676         (JSC::Parser<LexerType>::parse):
677         Treat multiline capable unterminated literals as recoverable.
678
679 2015-08-25  Basile Clement  <basile_clement@apple.com>
680
681         Get rid of FTLValueFormat
682         https://bugs.webkit.org/show_bug.cgi?id=148448
683
684         Reviewed by Michael Saboff.
685
686         FTL::ValueFormat is nothing more than DataFormat (and is actually
687         slightly less). Let's get rid of it.
688
689         * CMakeLists.txt:
690         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
691         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
692         * JavaScriptCore.xcodeproj/project.pbxproj:
693         * bytecode/DataFormat.cpp: Renamed from Source/JavaScriptCore/ftl/FTLValueFormat.h.
694         (WTF::printInternal):
695         * bytecode/DataFormat.h:
696         * ftl/FTLAvailableRecovery.h:
697         (JSC::FTL::AvailableRecovery::AvailableRecovery):
698         (JSC::FTL::AvailableRecovery::format):
699         * ftl/FTLExitArgument.h:
700         (JSC::FTL::ExitArgument::ExitArgument):
701         (JSC::FTL::ExitArgument::operator!):
702         (JSC::FTL::ExitArgument::format):
703         (JSC::FTL::ExitArgument::withFormat):
704         * ftl/FTLExitValue.cpp:
705         (JSC::FTL::ExitValue::dataFormat):
706         * ftl/FTLExitValue.h:
707         (JSC::FTL::ExitValue::recovery):
708         (JSC::FTL::ExitValue::recoveryFormat):
709         * ftl/FTLFormattedValue.h:
710         (JSC::FTL::FormattedValue::FormattedValue):
711         (JSC::FTL::FormattedValue::operator!):
712         (JSC::FTL::FormattedValue::format):
713         (JSC::FTL::int32Value):
714         (JSC::FTL::booleanValue):
715         (JSC::FTL::jsValueValue):
716         (JSC::FTL::doubleValue):
717         * ftl/FTLLowerDFGToLLVM.cpp:
718         (JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
719         (JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
720         (JSC::FTL::DFG::LowerDFGToLLVM::convertDoubleToInt32):
721         (JSC::FTL::DFG::LowerDFGToLLVM::exitValueForNode):
722         (JSC::FTL::DFG::LowerDFGToLLVM::exitArgument):
723         (JSC::FTL::DFG::LowerDFGToLLVM::addAvailableRecovery):
724         * ftl/FTLOSRExit.cpp:
725         (JSC::FTL::OSRExit::OSRExit):
726         * ftl/FTLOSRExit.h:
727         * ftl/FTLOSRExitCompiler.cpp:
728         (JSC::FTL::reboxAccordingToFormat):
729         (JSC::FTL::compileRecovery):
730         (JSC::FTL::compileStub):
731         * ftl/FTLValueFormat.cpp: Removed.
732
733 2015-09-04  Basile Clement  <basile_clement@apple.com>
734
735         Introduce RegisterMap<T>
736         https://bugs.webkit.org/show_bug.cgi?id=148335
737
738         Reviewed by Michael Saboff.
739
740         Introduce RegisterMap<T>, GPRMap<T> and FPRMap<T> dense mappings for
741         Reg, GPRReg and FPRReg.
742
743         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
744         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
745         * JavaScriptCore.xcodeproj/project.pbxproj:
746         * jit/RegisterMap.h: Added.
747         (JSC::RegisterMap::operator[]):
748         (JSC::GPRMap::operator[]):
749         (JSC::FPRMap::operator[]):
750
751 2015-09-04  Andreas Kling  <akling@apple.com>
752
753         Remove some unused functions from MarkedBlock and MarkedSpace.
754         <https://webkit.org/b/148748>
755
756         Reviewed by Darin Adler.
757
758         * ftl/FTLAbstractHeapRepository.h:
759         * heap/MarkedBlock.h:
760         (JSC::MarkedBlock::offsetOfMarks): Deleted.
761         (JSC::MarkedBlock::didConsumeEmptyFreeList): Deleted.
762         * heap/MarkedSpace.h:
763
764 2015-09-04  Basile Clement  <basile_clement@apple.com>
765
766         Make a bunch of MacroAssembler operations constexpr
767         https://bugs.webkit.org/show_bug.cgi?id=148334
768
769         Reviewed by Saam Barati.
770
771         This is in preparation of https://bugs.webkit.org/show_bug.cgi?id=148335 .
772
773         * assembler/ARM64Assembler.h:
774         (JSC::ARM64Registers::isSp):
775         (JSC::ARM64Registers::isZr):
776         (JSC::ARM64Assembler::firstRegister):
777         (JSC::ARM64Assembler::lastRegister):
778         (JSC::ARM64Assembler::firstFPRegister):
779         (JSC::ARM64Assembler::lastFPRegister):
780         (JSC::ARM64Assembler::isSp):
781         (JSC::ARM64Assembler::isZr):
782         * assembler/ARMAssembler.h:
783         (JSC::ARMAssembler::firstRegister):
784         (JSC::ARMAssembler::lastRegister):
785         (JSC::ARMAssembler::firstFPRegister):
786         (JSC::ARMAssembler::lastFPRegister):
787         * assembler/AbstractMacroAssembler.h:
788         (JSC::AbstractMacroAssembler::firstRegister):
789         (JSC::AbstractMacroAssembler::lastRegister):
790         (JSC::AbstractMacroAssembler::firstFPRegister):
791         (JSC::AbstractMacroAssembler::lastFPRegister):
792         * assembler/MIPSAssembler.h:
793         (JSC::MIPSAssembler::firstRegister):
794         (JSC::MIPSAssembler::lastRegister):
795         (JSC::MIPSAssembler::firstFPRegister):
796         (JSC::MIPSAssembler::lastFPRegister):
797         * assembler/MacroAssembler.h:
798         (JSC::MacroAssembler::nextRegister):
799         (JSC::MacroAssembler::nextFPRegister):
800         (JSC::MacroAssembler::numberOfRegisters):
801         (JSC::MacroAssembler::registerIndex):
802         (JSC::MacroAssembler::numberOfFPRegisters):
803         (JSC::MacroAssembler::fpRegisterIndex):
804         (JSC::MacroAssembler::totalNumberOfRegisters):
805         * assembler/SH4Assembler.h:
806         (JSC::SH4Assembler::firstRegister):
807         (JSC::SH4Assembler::lastRegister):
808         (JSC::SH4Assembler::firstFPRegister):
809         (JSC::SH4Assembler::lastFPRegister):
810         * assembler/X86Assembler.h:
811         (JSC::X86Assembler::firstRegister):
812         (JSC::X86Assembler::lastRegister):
813         (JSC::X86Assembler::firstFPRegister):
814         (JSC::X86Assembler::lastFPRegister):
815
816 2015-08-24  Basile Clement  <basile_clement@apple.com>
817
818         Add a bunch of operators
819         https://bugs.webkit.org/show_bug.cgi?id=148337
820
821         Reviewed by Saam Barati.
822
823         * jit/GPRInfo.h:
824         (JSC::JSValueRegs::operator bool):
825         (JSC::JSValueRegs::operator==):
826         (JSC::JSValueRegs::operator!=):
827         (JSC::JSValueSource::operator bool):
828         (JSC::JSValueRegs::operator!):
829         (JSC::JSValueSource::operator!):
830         * jit/Reg.h:
831         (JSC::Reg::operator bool):
832
833 2015-09-04  Basile Clement  <basile_clement@apple.com>
834
835         Since r189341, es6.yaml/es6/arrow_functions_no_prototype_property.js is expected to succeed
836
837         Rubber stamped by Michael Saboff.
838
839         * tests/es6.yaml:
840
841 2015-09-04  Csaba Osztrogonác  <ossy@webkit.org>
842
843         [ARM] Fix the ARM Traditional build after r189288
844         https://bugs.webkit.org/show_bug.cgi?id=148792
845
846         Reviewed by Zoltan Herczeg.
847
848         * assembler/MacroAssemblerARM.h: Make repatchCall public similar to changes in r189288.
849         (JSC::MacroAssemblerARM::repatchCall):
850
851 2015-09-03 Aleksandr Skachkov   <gskachkov@gmail.com>
852
853         [ES6] Implement ES6 arrow function syntax. Prototype of arrow function should be undefined
854         https://bugs.webkit.org/show_bug.cgi?id=147742
855
856         Reviewed by Saam Barati.
857
858         Added correct support of prototype property for arrow function. Arrow function 
859         doesn’t have own prototype property, so (() => {}).hasOwnProperty('prototype') === false.
860         Changes prevent from creation of 'prototype' property automatically during initialization 
861         of arrow function and allow to assign & delete it later in js code. 
862
863
864         * runtime/JSFunction.cpp:
865         (JSC::JSFunction::getOwnPropertySlot):
866         (JSC::JSFunction::deleteProperty):
867         * tests/stress/arrowfunction-prototype.js: Added.
868
869 2015-09-03  Commit Queue  <commit-queue@webkit.org>
870
871         Unreviewed, rolling out r189338.
872         https://bugs.webkit.org/show_bug.cgi?id=148785
873
874         Caused tons of crashes (Requested by cdumez on #webkit).
875
876         Reverted changeset:
877
878         "Web Inspector: InspectorController should support multiple
879         frontend channels"
880         https://bugs.webkit.org/show_bug.cgi?id=148538
881         http://trac.webkit.org/changeset/189338
882
883 2015-09-03  Yusuke Suzuki  <utatane.tea@gmail.com>
884
885         [ES6] Instantiate Module Environment bindings and execute module
886         https://bugs.webkit.org/show_bug.cgi?id=148053
887
888         Reviewed by Saam Barati.
889
890         This patch implements Module Environment binding instantiation.
891         And since the layout of the module environment is tightly coupled with the variable
892         look up in LLInt / Baseline / DFG, we implement the execution part at the same time.
893
894         For the instantiation, we implement the several operations (like resolveExport)
895         specified in the spec. The original algorithm contains the recursive call, but it is not
896         good for C++ code. We flatten the algorithm by using the manual frames to avoid recursions.
897         By leveraging the information retrieved by the above operations, we instantiate and
898         initialize the slots of the module environment.
899
900         The module namespace object is not implemented yet in this patch. It will be implemented
901         and instantiated in the module environment in the subsequent patch[1].
902
903         To look up the imported module bindings in the JS code, we introduce the "ModuleVar" resolve
904         type for resolve_scope, get_from_scope and put_to_scope. This "ModuleVar" will be filled
905         when linking the CodeBlock. This type is used when treating the imported bindings.
906
907         1. For resolve_scope, when linking, we resolve the actual module environment where
908             looked up variable resides and store it directly to the instruction. And resolve_scope
909             simply retrieve the stored pointer from the instruction.
910
911         2. For get_from_scope, since "ModuleVar" behavior for get_from_scope is completely same
912             to the "ClosureVar", we just store "ClosureVar" for get_from_scope to eliminate
913             unnecessary branch in LLInt layer.
914
915         3. For put_to_scope, we always emit the function call that immediately raises the error.
916             Because all the imported bindings are immutable and module code is always strict code.
917             In DFG, we just emit the ForceOSRExit. We don't make put_to_scope with "ModuleVar"
918             "CannotCompile" because it disables DFG compiling for the function even if this
919             problematic instruction is never executed.
920
921         Exported module variables inside the original module environment are just treated as the
922         usual heap variables. So the types for closure variables are just used. ("ClosureVar" etc.)
923
924         [1]: https://bugs.webkit.org/show_bug.cgi?id=148705
925
926         * CMakeLists.txt:
927         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
928         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
929         * JavaScriptCore.xcodeproj/project.pbxproj:
930         * bytecode/CodeBlock.cpp:
931         (JSC::CodeBlock::CodeBlock):
932         * bytecode/CodeBlock.h:
933         * bytecode/UnlinkedCodeBlock.cpp:
934         (JSC::UnlinkedModuleProgramCodeBlock::visitChildren): Deleted.
935         * bytecode/UnlinkedCodeBlock.h:
936         * bytecompiler/BytecodeGenerator.cpp:
937         (JSC::BytecodeGenerator::BytecodeGenerator):
938         * dfg/DFGByteCodeParser.cpp:
939         (JSC::DFG::ByteCodeParser::parseBlock):
940         * interpreter/Interpreter.cpp:
941         (JSC::Interpreter::execute):
942         * interpreter/Interpreter.h:
943         * jit/JITOperations.cpp:
944         * jit/JITPropertyAccess.cpp:
945         (JSC::JIT::emit_op_resolve_scope):
946         (JSC::JIT::emitSlow_op_resolve_scope):
947         (JSC::JIT::emit_op_get_from_scope):
948         (JSC::JIT::emit_op_put_to_scope):
949         (JSC::JIT::emitSlow_op_put_to_scope):
950         * jit/JITPropertyAccess32_64.cpp:
951         (JSC::JIT::emit_op_resolve_scope):
952         (JSC::JIT::emitSlow_op_resolve_scope):
953         (JSC::JIT::emit_op_get_from_scope):
954         (JSC::JIT::emit_op_put_to_scope):
955         (JSC::JIT::emitSlow_op_put_to_scope):
956         * llint/LLIntData.cpp:
957         (JSC::LLInt::Data::performAssertions):
958         * llint/LLIntSlowPaths.cpp:
959         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
960         * llint/LowLevelInterpreter.asm:
961         * llint/LowLevelInterpreter32_64.asm:
962         * llint/LowLevelInterpreter64.asm:
963         * parser/ModuleAnalyzer.cpp:
964         (JSC::ModuleAnalyzer::exportVariable):
965         * runtime/CommonSlowPaths.cpp:
966         (JSC::SLOW_PATH_DECL):
967         * runtime/CommonSlowPaths.h:
968         * runtime/Error.cpp:
969         (JSC::throwSyntaxError):
970         * runtime/Error.h:
971         * runtime/Executable.cpp:
972         (JSC::ModuleProgramExecutable::create):
973         (JSC::ModuleProgramExecutable::visitChildren):
974         (JSC::ModuleProgramExecutable::clearCode):
975         * runtime/Executable.h:
976         * runtime/GetPutInfo.h:
977         (JSC::resolveTypeName):
978         (JSC::makeType):
979         (JSC::needsVarInjectionChecks):
980         (JSC::ResolveOp::ResolveOp):
981         * runtime/JSGlobalObject.cpp:
982         (JSC::JSGlobalObject::init):
983         (JSC::JSGlobalObject::visitChildren):
984         * runtime/JSGlobalObject.h:
985         (JSC::JSGlobalObject::moduleEnvironmentStructure):
986         * runtime/JSLexicalEnvironment.h:
987         * runtime/JSModuleEnvironment.cpp: Added.
988         (JSC::JSModuleEnvironment::create):
989         (JSC::JSModuleEnvironment::finishCreation):
990         (JSC::JSModuleEnvironment::visitChildren):
991         (JSC::JSModuleEnvironment::getOwnPropertySlot):
992         (JSC::JSModuleEnvironment::getOwnNonIndexPropertyNames):
993         (JSC::JSModuleEnvironment::put):
994         (JSC::JSModuleEnvironment::deleteProperty):
995         * runtime/JSModuleEnvironment.h: Copied from Source/JavaScriptCore/runtime/JSLexicalEnvironment.h.
996         (JSC::JSModuleEnvironment::create):
997         (JSC::JSModuleEnvironment::createStructure):
998         (JSC::JSModuleEnvironment::offsetOfModuleRecord):
999         (JSC::JSModuleEnvironment::allocationSize):
1000         (JSC::JSModuleEnvironment::moduleRecord):
1001         (JSC::JSModuleEnvironment::moduleRecordSlot):
1002         (JSC::JSModuleEnvironment::JSModuleEnvironment):
1003         * runtime/JSModuleRecord.cpp:
1004         (JSC::JSModuleRecord::visitChildren):
1005         (JSC::JSModuleRecord::appendRequestedModule):
1006         (JSC::JSModuleRecord::addStarExportEntry):
1007         (JSC::JSModuleRecord::addImportEntry):
1008         (JSC::JSModuleRecord::addExportEntry):
1009         (JSC::ResolveQuery::ResolveQuery):
1010         (JSC::ResolveQuery::isEmptyValue):
1011         (JSC::ResolveQuery::isDeletedValue):
1012         (JSC::ResolveQueryHash::hash):
1013         (JSC::ResolveQueryHash::equal):
1014         (JSC::resolveExportLoop):
1015         (JSC::JSModuleRecord::link):
1016         (JSC::JSModuleRecord::instantiateDeclarations):
1017         (JSC::JSModuleRecord::execute):
1018         (JSC::JSModuleRecord::dump):
1019         * runtime/JSModuleRecord.h:
1020         (JSC::JSModuleRecord::exportEntries):
1021         (JSC::JSModuleRecord::importEntries):
1022         (JSC::JSModuleRecord::starExportEntries):
1023         (JSC::JSModuleRecord::moduleEnvironment):
1024         (JSC::JSModuleRecord::appendRequestedModule): Deleted.
1025         (JSC::JSModuleRecord::addImportEntry): Deleted.
1026         (JSC::JSModuleRecord::addExportEntry): Deleted.
1027         (JSC::JSModuleRecord::addStarExportEntry): Deleted.
1028         * runtime/JSScope.cpp:
1029         (JSC::abstractAccess):
1030         (JSC::JSScope::collectVariablesUnderTDZ):
1031         (JSC::JSScope::isModuleScope):
1032         * runtime/JSScope.h:
1033         * runtime/ModuleLoaderObject.cpp:
1034
1035 2015-09-03  Brian Burg  <bburg@apple.com>
1036
1037         Web Inspector: InspectorController should support multiple frontend channels
1038         https://bugs.webkit.org/show_bug.cgi?id=148538
1039
1040         Reviewed by Joseph Pecoraro.
1041
1042         Instead of a singleton, it should be possible to have multiple channels open
1043         at the same time and to individually close channels as frontends come and go.
1044
1045         The FrontendRouter class keeps a list of open FrontendChannels and sends messages
1046         to the appropriate frontends based on whether the message is a response or event.
1047         Each InspectorController owns a single FrontendRouter and BackendDispatcher instance.
1048         Inspector backend code that sends messages to the frontend should switch over to
1049         using the router rather than directly using a FrontendChannel.
1050
1051         * CMakeLists.txt:
1052         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1053         * JavaScriptCore.xcodeproj/project.pbxproj:
1054         * inspector/InspectorBackendDispatcher.cpp: Move constructors/destructors out of the header
1055         to avoid including InspectorFrontendRouter everywhere. Use the router instead of a
1056         specific frontend channel. Remove guards that are no longer necessary since the router
1057         is guaranteed to outlive the backend dispatcher.
1058
1059         (Inspector::SupplementalBackendDispatcher::SupplementalBackendDispatcher):
1060         (Inspector::SupplementalBackendDispatcher::~SupplementalBackendDispatcher):
1061         (Inspector::BackendDispatcher::BackendDispatcher):
1062         (Inspector::BackendDispatcher::create):
1063         (Inspector::BackendDispatcher::isActive):
1064         (Inspector::BackendDispatcher::registerDispatcherForDomain):
1065         (Inspector::BackendDispatcher::sendResponse):
1066         (Inspector::BackendDispatcher::sendPendingErrors):
1067         * inspector/InspectorBackendDispatcher.h:
1068         (Inspector::SupplementalBackendDispatcher::SupplementalBackendDispatcher): Deleted.
1069         (Inspector::SupplementalBackendDispatcher::~SupplementalBackendDispatcher): Deleted.
1070         (Inspector::BackendDispatcher::clearFrontend): Deleted, no longer necessary.
1071         (Inspector::BackendDispatcher::isActive): Moved to implementation file.
1072         (Inspector::BackendDispatcher::BackendDispatcher): Moved to implementation file.
1073         * inspector/InspectorFrontendRouter.cpp: Added.
1074         (Inspector::FrontendRouter::create):
1075         (Inspector::FrontendRouter::connectFrontend):
1076         (Inspector::FrontendRouter::disconnectFrontend):
1077         (Inspector::FrontendRouter::disconnectAllFrontends):
1078         (Inspector::FrontendRouter::leakChannel):
1079         (Inspector::FrontendRouter::hasLocalFrontend):
1080         (Inspector::FrontendRouter::hasRemoteFrontend):
1081         (Inspector::FrontendRouter::sendEvent):
1082         (Inspector::FrontendRouter::sendResponse):
1083         * inspector/InspectorFrontendRouter.h: Added.
1084         * inspector/JSGlobalObjectInspectorController.cpp: Remove guards that are no longer necessary.
1085         The frontend router and backend dispatcher now have the same lifetime as the controller.
1086         Explicitly connect/disconnect the frontend channel.
1087
1088         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
1089         (Inspector::JSGlobalObjectInspectorController::globalObjectDestroyed):
1090         (Inspector::JSGlobalObjectInspectorController::connectFrontend):
1091         (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
1092         (Inspector::JSGlobalObjectInspectorController::disconnectAllFrontends):
1093         (Inspector::JSGlobalObjectInspectorController::dispatchMessageFromFrontend):
1094         (Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
1095         (Inspector::JSGlobalObjectInspectorController::pause): Deleted.
1096         * inspector/JSGlobalObjectInspectorController.h:
1097         * inspector/agents/InspectorAgent.cpp:
1098         * inspector/agents/InspectorConsoleAgent.cpp:
1099         * inspector/agents/InspectorDebuggerAgent.cpp:
1100         * inspector/agents/InspectorRuntimeAgent.cpp:
1101         * inspector/augmentable/AugmentableInspectorController.h:
1102         (Inspector::AugmentableInspectorController::connected):
1103         * inspector/remote/RemoteInspectorDebuggable.h:
1104         * inspector/remote/RemoteInspectorDebuggableConnection.mm:
1105         (Inspector::RemoteInspectorDebuggableConnection::close):
1106         * inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:
1107         (CppAlternateBackendDispatcherHeaderGenerator.generate_output):
1108         * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
1109         (ObjCFrontendDispatcherImplementationGenerator._generate_event): Use the router.
1110         * runtime/JSGlobalObjectDebuggable.cpp:
1111         (JSC::JSGlobalObjectDebuggable::disconnect):
1112         * runtime/JSGlobalObjectDebuggable.h:
1113
1114 2015-09-03  Basile Clement  <basile_clement@apple.com>
1115
1116         [ES6] Recognize calls in tail position
1117         https://bugs.webkit.org/show_bug.cgi?id=148665
1118
1119         Reviewed by Saam Barati.
1120
1121         This patch adds the capability for the bytecode generator to recognize
1122         and dispatch tail calls, as per ES6 spec:
1123         http://www.ecma-international.org/ecma-262/6.0/#sec-isintailposition
1124
1125         This does not change the generated bytecode, but merely provides the
1126         hook for generating tail calls in subsequent patches toward
1127         https://bugs.webkit.org/show_bug.cgi?id=146477
1128
1129         * bytecompiler/BytecodeGenerator.cpp:
1130         (JSC::BytecodeGenerator::BytecodeGenerator):
1131         (JSC::BytecodeGenerator::emitCallInTailPosition):
1132         (JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
1133         * bytecompiler/BytecodeGenerator.h:
1134         (JSC::BytecodeGenerator::emitNode):
1135         (JSC::BytecodeGenerator::emitNodeInTailPosition):
1136         * bytecompiler/NodesCodegen.cpp:
1137         (JSC::FunctionCallValueNode::emitBytecode):
1138         (JSC::FunctionCallResolveNode::emitBytecode):
1139         (JSC::FunctionCallBracketNode::emitBytecode):
1140         (JSC::FunctionCallDotNode::emitBytecode):
1141         (JSC::CallFunctionCallDotNode::emitBytecode):
1142         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1143         (JSC::LogicalOpNode::emitBytecode):
1144         (JSC::ConditionalNode::emitBytecode):
1145         (JSC::CommaNode::emitBytecode):
1146         (JSC::SourceElements::emitBytecode):
1147         (JSC::IfElseNode::emitBytecode):
1148         (JSC::DoWhileNode::emitBytecode):
1149         (JSC::WhileNode::emitBytecode):
1150         (JSC::ForNode::emitBytecode):
1151         (JSC::ReturnNode::emitBytecode):
1152         (JSC::WithNode::emitBytecode):
1153         (JSC::TryNode::emitBytecode):
1154         * bytecompiler/SetForScope.h: Added.
1155         (JSC::SetForScope::SetForScope):
1156         (JSC::SetForScope::~SetForScope):
1157         * runtime/Options.h:
1158
1159 2015-08-11  Basile Clement  <basile_clement@apple.com>
1160
1161         Add more strict mode tests
1162         https://bugs.webkit.org/show_bug.cgi?id=147850
1163
1164         Reviewed by Michael Saboff.
1165
1166         We should have more tests in strict mode to have better test coverage.
1167         This adds a copy of the v8-v6 tests from SunSpider as JSC stress tests,
1168         with "use strict"; added at the top of the files.
1169
1170         A few modifications were necessary to make the files valid in strict
1171         mode, namely adding a couple of "var" statements and removing some
1172         generated code in earley-boyer that was using strings with octal
1173         escapes.
1174
1175         * tests/stress/v8-crypto-strict.js: Added.
1176         * tests/stress/v8-deltablue-strict.js: Added.
1177         * tests/stress/v8-earley-boyer-strict.js: Added.
1178         * tests/stress/v8-raytrace-strict.js: Added.
1179         * tests/stress/v8-regexp-strict.js: Added.
1180         * tests/stress/v8-richards-strict.js: Added.
1181         * tests/stress/v8-splay-strict.js: Added.
1182
1183 2015-09-03  Geoffrey Garen  <ggaren@apple.com>
1184
1185         JavaScriptCore should have some ES6 conformance tests
1186         https://bugs.webkit.org/show_bug.cgi?id=148771
1187
1188         Reviewed by Chris Dumez.
1189
1190         I created 590 independent, reduced test cases that collectively tell us
1191         whether we pass or fail the conformance matrix @ http://kangax.github.io/compat-table/es6/.
1192
1193         * tests/es6: Added.
1194         * tests/es6.yaml: Added.
1195         * tests/es6/Array.prototype_methods_Array.prototype.copyWithin.js: Added.
1196         (test):
1197         * tests/es6/Array.prototype_methods_Array.prototype.entries.js: Added.
1198         (test):
1199         * tests/es6/Array.prototype_methods_Array.prototype.fill.js: Added.
1200         (test):
1201         * tests/es6/Array.prototype_methods_Array.prototype.find.js: Added.
1202         (test):
1203         * tests/es6/Array.prototype_methods_Array.prototype.findIndex.js: Added.
1204         (test):
1205         * tests/es6/Array.prototype_methods_Array.prototype.keys.js: Added.
1206         (test):
1207         * tests/es6/Array.prototype_methods_Array.prototype.values.js: Added.
1208         (test):
1209         * tests/es6/Array.prototype_methods_Array.prototype[Symbol.iterator].js: Added.
1210         (test):
1211         * tests/es6/Array.prototype_methods_Array.prototype[Symbol.unscopables].js: Added.
1212         (test):
1213         * tests/es6/Array.prototype_methods_Array_iterator_prototype_chain.js: Added.
1214         (test):
1215         * tests/es6/Array_is_subclassable_Array.from.js: Added.
1216         (test.C):
1217         (test):
1218         * tests/es6/Array_is_subclassable_Array.isArray_support.js: Added.
1219         (test.C):
1220         (test):
1221         * tests/es6/Array_is_subclassable_Array.of.js: Added.
1222         (test.C):
1223         (test):
1224         * tests/es6/Array_is_subclassable_Array.prototype.concat.js: Added.
1225         (test.C):
1226         (test):
1227         * tests/es6/Array_is_subclassable_Array.prototype.filter.js: Added.
1228         (test.C):
1229         (test):
1230         * tests/es6/Array_is_subclassable_Array.prototype.map.js: Added.
1231         (test.C):
1232         (test):
1233         * tests/es6/Array_is_subclassable_Array.prototype.slice.js: Added.
1234         (test.C):
1235         (test):
1236         * tests/es6/Array_is_subclassable_Array.prototype.splice.js: Added.
1237         (test.C):
1238         (test):
1239         * tests/es6/Array_is_subclassable_correct_prototype_chain.js: Added.
1240         (test.C):
1241         (test):
1242         * tests/es6/Array_is_subclassable_length_property_accessing.js: Added.
1243         (test.C):
1244         (test):
1245         * tests/es6/Array_is_subclassable_length_property_setting.js: Added.
1246         (test.C):
1247         (test):
1248         * tests/es6/Array_static_methods_Array.from_array-like_objects.js: Added.
1249         (test):
1250         * tests/es6/Array_static_methods_Array.from_generator_instances.js: Added.
1251         (test.iterable):
1252         (test):
1253         * tests/es6/Array_static_methods_Array.from_generic_iterables.js: Added.
1254         (test):
1255         * tests/es6/Array_static_methods_Array.from_instances_of_generic_iterables.js: Added.
1256         (test):
1257         * tests/es6/Array_static_methods_Array.from_iterator_closing.js: Added.
1258         (test.):
1259         (test):
1260         * tests/es6/Array_static_methods_Array.from_map_function_array-like_objects.js: Added.
1261         (test):
1262         * tests/es6/Array_static_methods_Array.from_map_function_generator_instances.js: Added.
1263         (test.iterable):
1264         (test):
1265         * tests/es6/Array_static_methods_Array.from_map_function_generic_iterables.js: Added.
1266         (test):
1267         * tests/es6/Array_static_methods_Array.from_map_function_instances_of_iterables.js: Added.
1268         (test):
1269         * tests/es6/Array_static_methods_Array.of.js: Added.
1270         (test):
1271         * tests/es6/Array_static_methods_Array[Symbol.species].js: Added.
1272         (test):
1273         * tests/es6/Function_is_subclassable_Function.prototype.apply.js: Added.
1274         (test.C):
1275         (test):
1276         * tests/es6/Function_is_subclassable_Function.prototype.bind.js: Added.
1277         (test.C):
1278         (test):
1279         * tests/es6/Function_is_subclassable_Function.prototype.call.js: Added.
1280         (test.C):
1281         (test):
1282         * tests/es6/Function_is_subclassable_can_be_called.js: Added.
1283         (test.C):
1284         (test):
1285         * tests/es6/Function_is_subclassable_can_be_used_with_new.js: Added.
1286         (test.C):
1287         (test):
1288         * tests/es6/Function_is_subclassable_correct_prototype_chain.js: Added.
1289         (test.C):
1290         (test):
1291         * tests/es6/HTML-style_comments.js: Added.
1292         (test):
1293         * tests/es6/Map_-0_key_converts_to_+0.js: Added.
1294         (test.set var):
1295         * tests/es6/Map_Map.prototype.clear.js: Added.
1296         (test):
1297         * tests/es6/Map_Map.prototype.delete.js: Added.
1298         (test):
1299         * tests/es6/Map_Map.prototype.entries.js: Added.
1300         (test):
1301         * tests/es6/Map_Map.prototype.forEach.js: Added.
1302         (test):
1303         * tests/es6/Map_Map.prototype.keys.js: Added.
1304         (test):
1305         * tests/es6/Map_Map.prototype.set_returns_this.js: Added.
1306         * tests/es6/Map_Map.prototype.size.js: Added.
1307         * tests/es6/Map_Map.prototype.values.js: Added.
1308         (test):
1309         * tests/es6/Map_Map.prototype[Symbol.iterator].js: Added.
1310         (test):
1311         * tests/es6/Map_Map[Symbol.species].js: Added.
1312         (test):
1313         * tests/es6/Map_Map_iterator_prototype_chain.js: Added.
1314         (test):
1315         * tests/es6/Map_basic_functionality.js: Added.
1316         * tests/es6/Map_constructor_accepts_null.js: Added.
1317         (test):
1318         * tests/es6/Map_constructor_arguments.js: Added.
1319         * tests/es6/Map_constructor_invokes_set.js: Added.
1320         * tests/es6/Map_constructor_requires_new.js: Added.
1321         (test):
1322         * tests/es6/Map_iterator_closing.js: Added.
1323         (test.):
1324         (test):
1325         * tests/es6/Math_methods_Math.acosh.js: Added.
1326         (test):
1327         * tests/es6/Math_methods_Math.asinh.js: Added.
1328         (test):
1329         * tests/es6/Math_methods_Math.atanh.js: Added.
1330         (test):
1331         * tests/es6/Math_methods_Math.cbrt.js: Added.
1332         (test):
1333         * tests/es6/Math_methods_Math.clz32.js: Added.
1334         (test):
1335         * tests/es6/Math_methods_Math.cosh.js: Added.
1336         (test):
1337         * tests/es6/Math_methods_Math.expm1.js: Added.
1338         (test):
1339         * tests/es6/Math_methods_Math.fround.js: Added.
1340         (test):
1341         * tests/es6/Math_methods_Math.hypot.js: Added.
1342         (test):
1343         * tests/es6/Math_methods_Math.imul.js: Added.
1344         (test):
1345         * tests/es6/Math_methods_Math.log10.js: Added.
1346         (test):
1347         * tests/es6/Math_methods_Math.log1p.js: Added.
1348         (test):
1349         * tests/es6/Math_methods_Math.log2.js: Added.
1350         (test):
1351         * tests/es6/Math_methods_Math.sign.js: Added.
1352         (test):
1353         * tests/es6/Math_methods_Math.sinh.js: Added.
1354         (test):
1355         * tests/es6/Math_methods_Math.tanh.js: Added.
1356         (test):
1357         * tests/es6/Math_methods_Math.trunc.js: Added.
1358         (test):
1359         * tests/es6/Number_properties_Number.EPSILON.js: Added.
1360         (test):
1361         * tests/es6/Number_properties_Number.MAX_SAFE_INTEGER.js: Added.
1362         (test):
1363         * tests/es6/Number_properties_Number.MIN_SAFE_INTEGER.js: Added.
1364         (test):
1365         * tests/es6/Number_properties_Number.isFinite.js: Added.
1366         (test):
1367         * tests/es6/Number_properties_Number.isInteger.js: Added.
1368         (test):
1369         * tests/es6/Number_properties_Number.isNaN.js: Added.
1370         (test):
1371         * tests/es6/Number_properties_Number.isSafeInteger.js: Added.
1372         (test):
1373         * tests/es6/Object.prototype.__proto___absent_from_Object.createnull.js: Added.
1374         (test):
1375         * tests/es6/Object.prototype.__proto___correct_property_descriptor.js: Added.
1376         (test.A):
1377         (test):
1378         * tests/es6/Object.prototype.__proto___get_prototype.js: Added.
1379         (test.A):
1380         (test):
1381         * tests/es6/Object.prototype.__proto___present_in_Object.getOwnPropertyNames.js: Added.
1382         (test):
1383         * tests/es6/Object.prototype.__proto___present_in_hasOwnProperty.js: Added.
1384         (test):
1385         * tests/es6/Object.prototype.__proto___set_prototype.js: Added.
1386         (test):
1387         * tests/es6/Object_static_methods_Object.assign.js: Added.
1388         (test):
1389         * tests/es6/Object_static_methods_Object.getOwnPropertySymbols.js: Added.
1390         (test):
1391         * tests/es6/Object_static_methods_Object.is.js: Added.
1392         (test):
1393         * tests/es6/Object_static_methods_Object.setPrototypeOf.js: Added.
1394         (test):
1395         * tests/es6/Object_static_methods_accept_primitives_Object.freeze.js: Added.
1396         (test):
1397         * tests/es6/Object_static_methods_accept_primitives_Object.getOwnPropertyDescriptor.js: Added.
1398         (test):
1399         * tests/es6/Object_static_methods_accept_primitives_Object.getOwnPropertyNames.js: Added.
1400         (test):
1401         * tests/es6/Object_static_methods_accept_primitives_Object.getPrototypeOf.js: Added.
1402         (test):
1403         * tests/es6/Object_static_methods_accept_primitives_Object.isExtensible.js: Added.
1404         (test):
1405         * tests/es6/Object_static_methods_accept_primitives_Object.isFrozen.js: Added.
1406         (test):
1407         * tests/es6/Object_static_methods_accept_primitives_Object.isSealed.js: Added.
1408         (test):
1409         * tests/es6/Object_static_methods_accept_primitives_Object.keys.js: Added.
1410         (test):
1411         * tests/es6/Object_static_methods_accept_primitives_Object.preventExtensions.js: Added.
1412         (test):
1413         * tests/es6/Object_static_methods_accept_primitives_Object.seal.js: Added.
1414         (test):
1415         * tests/es6/Promise_Promise.all.js: Added.
1416         (test):
1417         * tests/es6/Promise_Promise.all_generic_iterables.js: Added.
1418         (test):
1419         * tests/es6/Promise_Promise.race.js: Added.
1420         (test):
1421         * tests/es6/Promise_Promise.race_generic_iterables.js: Added.
1422         (test):
1423         * tests/es6/Promise_Promise[Symbol.species].js: Added.
1424         (test):
1425         * tests/es6/Promise_basic_functionality.js: Added.
1426         (test.thenFn):
1427         (test.catchFn):
1428         (test.shouldNotRun):
1429         (test):
1430         * tests/es6/Promise_constructor_requires_new.js: Added.
1431         (test):
1432         * tests/es6/Promise_is_subclassable_Promise.all.js: Added.
1433         (test.P):
1434         (test):
1435         * tests/es6/Promise_is_subclassable_Promise.race.js: Added.
1436         (test.P):
1437         (test):
1438         * tests/es6/Promise_is_subclassable_basic_functionality.js: Added.
1439         (test.P):
1440         (test):
1441         (test.catchFn):
1442         (test.shouldNotRun):
1443         * tests/es6/Promise_is_subclassable_correct_prototype_chain.js: Added.
1444         (test.C):
1445         (test):
1446         * tests/es6/Proxy_Array.isArray_support.js: Added.
1447         (test):
1448         * tests/es6/Proxy_JSON.stringify_support.js: Added.
1449         (test):
1450         * tests/es6/Proxy_Proxy.revocable.js: Added.
1451         (test.):
1452         (test.get var):
1453         (test):
1454         * tests/es6/Proxy_apply_handler.js: Added.
1455         (test.proxied):
1456         (test.host.):
1457         (test):
1458         * tests/es6/Proxy_construct_handler.js: Added.
1459         (test.proxied):
1460         (test.):
1461         (test):
1462         * tests/es6/Proxy_constructor_requires_new.js: Added.
1463         (test):
1464         * tests/es6/Proxy_defineProperty_handler.js: Added.
1465         (test.):
1466         (test):
1467         * tests/es6/Proxy_deleteProperty_handler.js: Added.
1468         (test.):
1469         (test):
1470         * tests/es6/Proxy_enumerate_handler.js: Added.
1471         (test.):
1472         (test):
1473         * tests/es6/Proxy_getOwnPropertyDescriptor_handler.js: Added.
1474         (test.):
1475         (test):
1476         * tests/es6/Proxy_getPrototypeOf_handler.js: Added.
1477         (test.):
1478         (test):
1479         * tests/es6/Proxy_get_handler.js: Added.
1480         (test.):
1481         * tests/es6/Proxy_get_handler_instances_of_proxies.js: Added.
1482         (test.):
1483         * tests/es6/Proxy_has_handler.js: Added.
1484         (test.):
1485         (test):
1486         * tests/es6/Proxy_has_handler_instances_of_proxies.js: Added.
1487         (test.):
1488         (test):
1489         * tests/es6/Proxy_internal_defineProperty_calls_SetIntegrityLevel.js: Added.
1490         (test.):
1491         (test):
1492         * tests/es6/Proxy_internal_defineProperty_calls_[[Set]].js: Added.
1493         (test.):
1494         (test):
1495         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.copyWithin.js: Added.
1496         (test.):
1497         (test):
1498         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.pop.js: Added.
1499         (test.):
1500         (test):
1501         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.reverse.js: Added.
1502         (test.):
1503         (test):
1504         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.shift.js: Added.
1505         (test.):
1506         (test):
1507         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.splice.js: Added.
1508         (test.):
1509         (test):
1510         * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.unshift.js: Added.
1511         (test.):
1512         (test):
1513         * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Function.prototype.bind.js: Added.
1514         (test.):
1515         (test):
1516         * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Object.assign.js: Added.
1517         (test.):
1518         (test):
1519         * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Object.prototype.hasOwnProperty.js: Added.
1520         (test.):
1521         (test):
1522         * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_[[Set]].js: Added.
1523         (test.):
1524         (test):
1525         * tests/es6/Proxy_internal_get_calls_Array.from.js: Added.
1526         (test.get var):
1527         (test.):
1528         * tests/es6/Proxy_internal_get_calls_Array.prototype.concat.js: Added.
1529         (test.):
1530         (test.get var):
1531         * tests/es6/Proxy_internal_get_calls_Array.prototype.pop.js: Added.
1532         (test.):
1533         (test.get var):
1534         * tests/es6/Proxy_internal_get_calls_Array.prototype.reverse.js: Added.
1535         (test.):
1536         (test.get var):
1537         * tests/es6/Proxy_internal_get_calls_Array.prototype.shift.js: Added.
1538         (test.):
1539         (test.get var):
1540         * tests/es6/Proxy_internal_get_calls_Array.prototype.splice.js: Added.
1541         (test.):
1542         (test.get var):
1543         * tests/es6/Proxy_internal_get_calls_Array.prototype.toString.js: Added.
1544         (test.get var):
1545         (test.):
1546         * tests/es6/Proxy_internal_get_calls_Array.prototype_iteration_methods.js: Added.
1547         (test.get var):
1548         (test.):
1549         * tests/es6/Proxy_internal_get_calls_ClassDefinitionEvaluation.js: Added.
1550         (test.):
1551         (test.get var):
1552         (test):
1553         * tests/es6/Proxy_internal_get_calls_CreateDynamicFunction.js: Added.
1554         (test.):
1555         (test.get var):
1556         * tests/es6/Proxy_internal_get_calls_CreateListFromArrayLike.js: Added.
1557         (test.get var):
1558         (test.):
1559         (test.get Function):
1560         * tests/es6/Proxy_internal_get_calls_Date.prototype.toJSON.js: Added.
1561         (test.get var):
1562         (test.):
1563         * tests/es6/Proxy_internal_get_calls_Error.prototype.toString.js: Added.
1564         (test.get var):
1565         (test.):
1566         * tests/es6/Proxy_internal_get_calls_Function.prototype.bind.js: Added.
1567         (test.):
1568         (test.get var):
1569         * tests/es6/Proxy_internal_get_calls_HasBinding.js: Added.
1570         (test.get var):
1571         (test.):
1572         (test.get p):
1573         * tests/es6/Proxy_internal_get_calls_IteratorComplete_IteratorValue.js: Added.
1574         (test.get var):
1575         (test.iterable.Symbol.iterator.return.next.):
1576         (test.iterable.Symbol.iterator.return.next):
1577         (test.iterable.Symbol.iterator):
1578         * tests/es6/Proxy_internal_get_calls_JSON.stringify.js: Added.
1579         (test.get var):
1580         (test.):
1581         * tests/es6/Proxy_internal_get_calls_Object.assign.js: Added.
1582         (test.get var):
1583         (test.):
1584         (test.get Object):
1585         * tests/es6/Proxy_internal_get_calls_Object.defineProperties.js: Added.
1586         (test.get var):
1587         (test.):
1588         (test.get Object):
1589         * tests/es6/Proxy_internal_get_calls_Promise_resolve_functions.js: Added.
1590         (test.get var):
1591         (test.):
1592         (test.get new):
1593         * tests/es6/Proxy_internal_get_calls_RegExp.prototype.flags.js: Added.
1594         (test.get var):
1595         (test.):
1596         * tests/es6/Proxy_internal_get_calls_RegExp.prototype.test.js: Added.
1597         (test.get var.p.new.Proxy):
1598         (test.get var):
1599         (test.):
1600         * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.match].js: Added.
1601         (test.get var.p.new.Proxy):
1602         (test.get var):
1603         (test.):
1604         * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.replace].js: Added.
1605         (test.get var.p.new.Proxy):
1606         (test.get var):
1607         (test.):
1608         * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.search].js: Added.
1609         (test.get var.p.new.Proxy):
1610         (test.get var):
1611         (test.):
1612         * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.split].js: Added.
1613         (test.p.new.Proxy):
1614         (test.get var):
1615         (test.):
1616         * tests/es6/Proxy_internal_get_calls_RegExp_constructor.js: Added.
1617         (test.get var):
1618         (test.):
1619         * tests/es6/Proxy_internal_get_calls_String.prototype.match.js: Added.
1620         (test.get var):
1621         (test.):
1622         * tests/es6/Proxy_internal_get_calls_String.prototype.replace.js: Added.
1623         (test.get var):
1624         (test.):
1625         * tests/es6/Proxy_internal_get_calls_String.prototype.search.js: Added.
1626         (test.get var):
1627         (test.):
1628         * tests/es6/Proxy_internal_get_calls_String.prototype.split.js: Added.
1629         (test.get var):
1630         (test.):
1631         * tests/es6/Proxy_internal_get_calls_String.raw.js: Added.
1632         (test.get var):
1633         (test.):
1634         * tests/es6/Proxy_internal_get_calls_ToPrimitive.js: Added.
1635         (test.get var):
1636         (test.):
1637         * tests/es6/Proxy_internal_get_calls_ToPropertyDescriptor.js: Added.
1638         (test.get var):
1639         (test.):
1640         (test.set get try):
1641         * tests/es6/Proxy_internal_get_calls_instanceof_operator.js: Added.
1642         (test.):
1643         (test.get var):
1644         * tests/es6/Proxy_internal_ownKeys_calls_SerializeJSONObject.js: Added.
1645         (test.):
1646         (test):
1647         * tests/es6/Proxy_internal_ownKeys_calls_SetIntegrityLevel.js: Added.
1648         (test.):
1649         (test):
1650         * tests/es6/Proxy_internal_ownKeys_calls_TestIntegrityLevel.js: Added.
1651         (test.):
1652         (test):
1653         * tests/es6/Proxy_internal_set_calls_Array.from.js: Added.
1654         (test.set var):
1655         (test.):
1656         (test.set Array):
1657         * tests/es6/Proxy_internal_set_calls_Array.of.js: Added.
1658         (test.set var):
1659         (test.):
1660         (test.set Array):
1661         * tests/es6/Proxy_internal_set_calls_Array.prototype.copyWithin.js: Added.
1662         (test.):
1663         (test.set var):
1664         * tests/es6/Proxy_internal_set_calls_Array.prototype.fill.js: Added.
1665         (test.):
1666         (test.set var):
1667         * tests/es6/Proxy_internal_set_calls_Array.prototype.pop.js: Added.
1668         (test.):
1669         (test.set var):
1670         * tests/es6/Proxy_internal_set_calls_Array.prototype.push.js: Added.
1671         (test.):
1672         (test.set var):
1673         * tests/es6/Proxy_internal_set_calls_Array.prototype.reverse.js: Added.
1674         (test.):
1675         (test.set var):
1676         * tests/es6/Proxy_internal_set_calls_Array.prototype.shift.js: Added.
1677         (test.):
1678         (test.set var):
1679         * tests/es6/Proxy_internal_set_calls_Array.prototype.splice.js: Added.
1680         (test.):
1681         (test.set var):
1682         * tests/es6/Proxy_internal_set_calls_Array.prototype.unshift.js: Added.
1683         (test.):
1684         (test.set var):
1685         * tests/es6/Proxy_internal_set_calls_Object.assign.js: Added.
1686         (test.set var):
1687         (test.):
1688         (test.set Object):
1689         * tests/es6/Proxy_isExtensible_handler.js: Added.
1690         (test.):
1691         (test):
1692         * tests/es6/Proxy_ownKeys_handler.js: Added.
1693         (test.):
1694         (test):
1695         * tests/es6/Proxy_preventExtensions_handler.js: Added.
1696         (test.):
1697         (test):
1698         * tests/es6/Proxy_setPrototypeOf_handler.js: Added.
1699         (test.):
1700         (test):
1701         * tests/es6/Proxy_set_handler.js: Added.
1702         (test.):
1703         * tests/es6/Proxy_set_handler_instances_of_proxies.js: Added.
1704         (test.):
1705         * tests/es6/Reflect_Reflect.apply.js: Added.
1706         (test):
1707         * tests/es6/Reflect_Reflect.construct.js: Added.
1708         (test):
1709         * tests/es6/Reflect_Reflect.construct_creates_instance_from_newTarget_argument.js: Added.
1710         (test.F):
1711         (test):
1712         * tests/es6/Reflect_Reflect.construct_sets_new.target_meta_property.js: Added.
1713         (test):
1714         * tests/es6/Reflect_Reflect.defineProperty.js: Added.
1715         (test):
1716         * tests/es6/Reflect_Reflect.deleteProperty.js: Added.
1717         (test):
1718         * tests/es6/Reflect_Reflect.enumerate.js: Added.
1719         (test):
1720         * tests/es6/Reflect_Reflect.get.js: Added.
1721         * tests/es6/Reflect_Reflect.getOwnPropertyDescriptor.js: Added.
1722         (test):
1723         * tests/es6/Reflect_Reflect.getPrototypeOf.js: Added.
1724         (test):
1725         * tests/es6/Reflect_Reflect.has.js: Added.
1726         (test):
1727         * tests/es6/Reflect_Reflect.isExtensible.js: Added.
1728         (test):
1729         * tests/es6/Reflect_Reflect.ownKeys_string_keys.js: Added.
1730         (test):
1731         * tests/es6/Reflect_Reflect.ownKeys_symbol_keys.js: Added.
1732         (test):
1733         * tests/es6/Reflect_Reflect.preventExtensions.js: Added.
1734         (test):
1735         * tests/es6/Reflect_Reflect.set.js: Added.
1736         * tests/es6/Reflect_Reflect.setPrototypeOf.js: Added.
1737         (test):
1738         * tests/es6/RegExp.prototype.compile.js: Added.
1739         (test):
1740         * tests/es6/RegExp.prototype_properties_RegExp.prototype.flags.js: Added.
1741         (test):
1742         * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.match].js: Added.
1743         (test):
1744         * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.replace].js: Added.
1745         (test):
1746         * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.search].js: Added.
1747         (test):
1748         * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.split].js: Added.
1749         (test):
1750         * tests/es6/RegExp.prototype_properties_RegExp[Symbol.species].js: Added.
1751         (test):
1752         * tests/es6/RegExp_is_subclassable_RegExp.prototype.exec.js: Added.
1753         (test.R):
1754         (test):
1755         * tests/es6/RegExp_is_subclassable_RegExp.prototype.test.js: Added.
1756         (test.R):
1757         (test):
1758         * tests/es6/RegExp_is_subclassable_basic_functionality.js: Added.
1759         (test.R):
1760         (test):
1761         * tests/es6/RegExp_is_subclassable_correct_prototype_chain.js: Added.
1762         (test.R):
1763         (test):
1764         * tests/es6/RegExp_syntax_extensions_hyphens_in_character_sets.js: Added.
1765         (test):
1766         * tests/es6/RegExp_syntax_extensions_incomplete_patterns_and_quantifiers.js: Added.
1767         * tests/es6/RegExp_syntax_extensions_invalid_Unicode_escapes.js: Added.
1768         (test):
1769         * tests/es6/RegExp_syntax_extensions_invalid_backreferences_become_octal_escapes.js: Added.
1770         (test):
1771         * tests/es6/RegExp_syntax_extensions_invalid_character_escapes.js: Added.
1772         (test):
1773         * tests/es6/RegExp_syntax_extensions_invalid_control-character_escapes.js: Added.
1774         (test):
1775         * tests/es6/RegExp_syntax_extensions_invalid_hexadecimal_escapes.js: Added.
1776         (test):
1777         * tests/es6/RegExp_syntax_extensions_octal_escape_sequences.js: Added.
1778         (test):
1779         * tests/es6/RegExp_y_and_u_flags_u_flag.js: Added.
1780         (test):
1781         * tests/es6/RegExp_y_and_u_flags_u_flag_Unicode_code_point_escapes.js: Added.
1782         (test):
1783         * tests/es6/RegExp_y_and_u_flags_y_flag.js: Added.
1784         (test):
1785         * tests/es6/RegExp_y_and_u_flags_y_flag_lastIndex.js: Added.
1786         (test):
1787         * tests/es6/Set_-0_key_converts_to_+0.js: Added.
1788         (test.set forEach):
1789         * tests/es6/Set_Set.prototype.add_returns_this.js: Added.
1790         * tests/es6/Set_Set.prototype.clear.js: Added.
1791         (test):
1792         * tests/es6/Set_Set.prototype.delete.js: Added.
1793         (test):
1794         * tests/es6/Set_Set.prototype.entries.js: Added.
1795         (test):
1796         * tests/es6/Set_Set.prototype.forEach.js: Added.
1797         (test):
1798         * tests/es6/Set_Set.prototype.keys.js: Added.
1799         (test):
1800         * tests/es6/Set_Set.prototype.size.js: Added.
1801         * tests/es6/Set_Set.prototype.values.js: Added.
1802         (test):
1803         * tests/es6/Set_Set.prototype[Symbol.iterator].js: Added.
1804         (test):
1805         * tests/es6/Set_Set[Symbol.species].js: Added.
1806         (test):
1807         * tests/es6/Set_Set_iterator_prototype_chain.js: Added.
1808         (test):
1809         * tests/es6/Set_basic_functionality.js: Added.
1810         * tests/es6/Set_constructor_accepts_null.js: Added.
1811         (test):
1812         * tests/es6/Set_constructor_arguments.js: Added.
1813         * tests/es6/Set_constructor_invokes_add.js: Added.
1814         (test.Set.prototype.add):
1815         (test):
1816         * tests/es6/Set_constructor_requires_new.js: Added.
1817         (test):
1818         * tests/es6/Set_iterator_closing.js: Added.
1819         (test.):
1820         (test.Set.prototype.add):
1821         (test):
1822         * tests/es6/String.prototype_HTML_methods_existence.js: Added.
1823         (test):
1824         * tests/es6/String.prototype_HTML_methods_quotes_in_arguments_are_escaped.js: Added.
1825         (test):
1826         * tests/es6/String.prototype_HTML_methods_tags_names_are_lowercase.js: Added.
1827         (test):
1828         * tests/es6/String.prototype_methods_String.prototype.codePointAt.js: Added.
1829         (test):
1830         * tests/es6/String.prototype_methods_String.prototype.endsWith.js: Added.
1831         (test):
1832         * tests/es6/String.prototype_methods_String.prototype.includes.js: Added.
1833         (test):
1834         * tests/es6/String.prototype_methods_String.prototype.normalize.js: Added.
1835         (test):
1836         * tests/es6/String.prototype_methods_String.prototype.repeat.js: Added.
1837         (test):
1838         * tests/es6/String.prototype_methods_String.prototype.startsWith.js: Added.
1839         (test):
1840         * tests/es6/String.prototype_methods_String.prototype[Symbol.iterator].js: Added.
1841         (test):
1842         * tests/es6/String.prototype_methods_String_iterator_prototype_chain.js: Added.
1843         (test):
1844         * tests/es6/String_static_methods_String.fromCodePoint.js: Added.
1845         (test):
1846         * tests/es6/String_static_methods_String.raw.js: Added.
1847         (test):
1848         * tests/es6/Symbol_JSON.stringify_ignores_symbols.js: Added.
1849         (test):
1850         * tests/es6/Symbol_Object.defineProperty_support.js: Added.
1851         (test):
1852         * tests/es6/Symbol_Objectsymbol.js: Added.
1853         (test):
1854         * tests/es6/Symbol_basic_functionality.js: Added.
1855         (test):
1856         * tests/es6/Symbol_can_convert_with_String.js: Added.
1857         (test):
1858         * tests/es6/Symbol_cannot_coerce_to_string_or_number.js: Added.
1859         (test):
1860         * tests/es6/Symbol_global_symbol_registry.js: Added.
1861         (test):
1862         * tests/es6/Symbol_new_Symbol_throws.js: Added.
1863         (test):
1864         * tests/es6/Symbol_symbol_keys_are_hidden_to_pre-ES6_code.js: Added.
1865         (test):
1866         * tests/es6/Symbol_typeof_support.js: Added.
1867         (test):
1868         * tests/es6/Unicode_code_point_escapes_in_identifiers.js: Added.
1869         (test):
1870         * tests/es6/Unicode_code_point_escapes_in_strings.js: Added.
1871         (test):
1872         * tests/es6/WeakMap_WeakMap.prototype.delete.js: Added.
1873         (test):
1874         * tests/es6/WeakMap_WeakMap.prototype.set_returns_this.js: Added.
1875         * tests/es6/WeakMap_basic_functionality.js: Added.
1876         * tests/es6/WeakMap_constructor_accepts_null.js: Added.
1877         (test):
1878         * tests/es6/WeakMap_constructor_arguments.js: Added.
1879         * tests/es6/WeakMap_constructor_invokes_set.js: Added.
1880         * tests/es6/WeakMap_constructor_requires_new.js: Added.
1881         (test):
1882         * tests/es6/WeakMap_frozen_objects_as_keys.js: Added.
1883         * tests/es6/WeakMap_iterator_closing.js: Added.
1884         (test.):
1885         (test):
1886         * tests/es6/WeakMap_no_WeakMap.prototype.clear_method.js: Added.
1887         * tests/es6/WeakSet_WeakSet.prototype.add_returns_this.js: Added.
1888         (test):
1889         * tests/es6/WeakSet_WeakSet.prototype.delete.js: Added.
1890         (test):
1891         * tests/es6/WeakSet_basic_functionality.js: Added.
1892         (test):
1893         * tests/es6/WeakSet_constructor_accepts_null.js: Added.
1894         (test):
1895         * tests/es6/WeakSet_constructor_arguments.js: Added.
1896         (test):
1897         * tests/es6/WeakSet_constructor_invokes_add.js: Added.
1898         (test.WeakSet.prototype.add):
1899         (test):
1900         * tests/es6/WeakSet_constructor_requires_new.js: Added.
1901         (test):
1902         * tests/es6/WeakSet_iterator_closing.js: Added.
1903         (test.):
1904         (test):
1905         * tests/es6/WeakSet_no_WeakSet.prototype.clear_method.js: Added.
1906         (test):
1907         * tests/es6/__proto___in_object_literals_basic_support.js: Added.
1908         (test):
1909         * tests/es6/__proto___in_object_literals_multiple___proto___is_an_error.js: Added.
1910         (test):
1911         * tests/es6/__proto___in_object_literals_not_a_computed_property.js: Added.
1912         (test):
1913         * tests/es6/__proto___in_object_literals_not_a_shorthand_method.js: Added.
1914         (test):
1915         * tests/es6/__proto___in_object_literals_not_a_shorthand_property.js: Added.
1916         (test):
1917         * tests/es6/arrow_functions_0_parameters.js: Added.
1918         (test):
1919         * tests/es6/arrow_functions_1_parameter_no_brackets.js: Added.
1920         (test):
1921         * tests/es6/arrow_functions_cant_be_bound_can_be_curried.js: Added.
1922         (test.d.y):
1923         (test):
1924         * tests/es6/arrow_functions_correct_precedence.js: Added.
1925         (test):
1926         * tests/es6/arrow_functions_lexical_arguments_binding.js: Added.
1927         (test.f):
1928         (test):
1929         * tests/es6/arrow_functions_lexical_new.target_binding.js: Added.
1930         (test.C):
1931         (test):
1932         * tests/es6/arrow_functions_lexical_super_binding.js: Added.
1933         (test.B.prototype.qux):
1934         (test.B):
1935         (test.C.prototype.baz):
1936         (test.C):
1937         (test):
1938         * tests/es6/arrow_functions_lexical_this_binding.js: Added.
1939         (test.d.y):
1940         (test):
1941         * tests/es6/arrow_functions_multiple_parameters.js: Added.
1942         (test):
1943         * tests/es6/arrow_functions_no_line_break_between_params_and_code_=_code.js: Added.
1944         (test):
1945         * tests/es6/arrow_functions_no_prototype_property.js: Added.
1946         (test):
1947         * tests/es6/arrow_functions_this_unchanged_by_call_or_apply.js: Added.
1948         (test.d.y):
1949         (test):
1950         * tests/es6/block-level_function_declaration.js: Added.
1951         (test.f):
1952         (test):
1953         * tests/es6/class_accessor_properties.js: Added.
1954         (test.C.prototype.get foo):
1955         (test.C.prototype.set bar):
1956         (test.C):
1957         (test):
1958         * tests/es6/class_anonymous_class.js: Added.
1959         * tests/es6/class_class_expression.js: Added.
1960         (test.return.typeof.C):
1961         (test):
1962         * tests/es6/class_class_name_is_lexically_scoped.js: Added.
1963         (test.C.prototype.method):
1964         (test.C):
1965         (test):
1966         * tests/es6/class_class_statement.js: Added.
1967         (test.C):
1968         (test):
1969         * tests/es6/class_computed_accessor_properties.js: Added.
1970         (test.C.prototype.get garply):
1971         (test.C.prototype.set grault):
1972         (test.C):
1973         (test):
1974         * tests/es6/class_computed_names_temporal_dead_zone.js: Added.
1975         (test.try.B.prototype.C):
1976         (test.try.B):
1977         (test):
1978         * tests/es6/class_computed_prototype_methods.js: Added.
1979         (test.C.prototype.foo):
1980         (test.C):
1981         (test):
1982         * tests/es6/class_computed_static_accessor_properties.js: Added.
1983         (test.C.prototype.get garply):
1984         (test.C.prototype.set grault):
1985         (test.C):
1986         (test):
1987         * tests/es6/class_computed_static_methods.js: Added.
1988         (test.C.foo):
1989         (test.C):
1990         (test):
1991         * tests/es6/class_constructor.js: Added.
1992         (test.C):
1993         (test):
1994         * tests/es6/class_constructor_requires_new.js: Added.
1995         (test.C):
1996         (test):
1997         * tests/es6/class_extends.js: Added.
1998         (test.B):
1999         (test.C):
2000         (test):
2001         * tests/es6/class_extends_expressions.js: Added.
2002         (test.C):
2003         (test):
2004         * tests/es6/class_extends_null.js: Added.
2005         (test.C):
2006         (test):
2007         * tests/es6/class_implicit_strict_mode.js: Added.
2008         (test.C.method):
2009         (test.C):
2010         (test):
2011         * tests/es6/class_is_block-scoped.js: Added.
2012         (test.C):
2013         (test):
2014         * tests/es6/class_methods_arent_enumerable.js: Added.
2015         (test.C.prototype.foo):
2016         (test.C.bar):
2017         (test.C):
2018         (test):
2019         * tests/es6/class_new.target.js: Added.
2020         (test.new.f):
2021         (test.A):
2022         (test.B):
2023         (test):
2024         * tests/es6/class_prototype_methods.js: Added.
2025         (test.C.prototype.method):
2026         (test.C):
2027         (test):
2028         * tests/es6/class_static_accessor_properties.js: Added.
2029         (test.C.prototype.get foo):
2030         (test.C.prototype.set bar):
2031         (test.C):
2032         (test):
2033         * tests/es6/class_static_methods.js: Added.
2034         (test.C.method):
2035         (test.C):
2036         (test):
2037         * tests/es6/class_string-keyed_methods.js: Added.
2038         (test.C.prototype.string_appeared_here):
2039         (test.C):
2040         (test):
2041         * tests/es6/const_basic_support.js: Added.
2042         (test):
2043         * tests/es6/const_basic_support_strict_mode.js: Added.
2044         (test):
2045         * tests/es6/const_is_block-scoped.js: Added.
2046         (test):
2047         * tests/es6/const_is_block-scoped_strict_mode.js: Added.
2048         (test):
2049         * tests/es6/const_redefining_a_const_is_an_error.js: Added.
2050         (test):
2051         * tests/es6/const_redefining_a_const_strict_mode.js: Added.
2052         (test):
2053         * tests/es6/const_temporal_dead_zone.js: Added.
2054         (test.passed):
2055         (test):
2056         * tests/es6/const_temporal_dead_zone_strict_mode.js: Added.
2057         (test.passed):
2058         (test):
2059         * tests/es6/default_function_parameters_arguments_object_interaction.js: Added.
2060         (test):
2061         * tests/es6/default_function_parameters_basic_functionality.js: Added.
2062         (test):
2063         * tests/es6/default_function_parameters_defaults_can_refer_to_previous_params.js: Added.
2064         (test):
2065         * tests/es6/default_function_parameters_explicit_undefined_defers_to_the_default.js: Added.
2066         (test):
2067         * tests/es6/default_function_parameters_new_Function_support.js: Added.
2068         (test):
2069         * tests/es6/default_function_parameters_separate_scope.js: Added.
2070         (test.return):
2071         (test):
2072         * tests/es6/default_function_parameters_temporal_dead_zone.js: Added.
2073         (test):
2074         * tests/es6/destructuring_chained_iterable_destructuring.js: Added.
2075         (test):
2076         * tests/es6/destructuring_chained_object_destructuring.js: Added.
2077         (test):
2078         * tests/es6/destructuring_computed_properties.js: Added.
2079         (test):
2080         * tests/es6/destructuring_defaults.js: Added.
2081         (test):
2082         * tests/es6/destructuring_defaults_in_parameters.js: Added.
2083         (test):
2084         * tests/es6/destructuring_defaults_in_parameters_new_Function_support.js: Added.
2085         (test):
2086         * tests/es6/destructuring_defaults_in_parameters_separate_scope.js: Added.
2087         (test.return):
2088         (test):
2089         * tests/es6/destructuring_defaults_let_temporal_dead_zone.js: Added.
2090         (test):
2091         * tests/es6/destructuring_empty_patterns.js: Added.
2092         (test):
2093         * tests/es6/destructuring_empty_patterns_in_parameters.js: Added.
2094         (test):
2095         * tests/es6/destructuring_in_for-in_loop_heads.js: Added.
2096         (test):
2097         * tests/es6/destructuring_in_for-of_loop_heads.js: Added.
2098         (test):
2099         * tests/es6/destructuring_in_parameters.js: Added.
2100         (test):
2101         * tests/es6/destructuring_in_parameters_arguments_interaction.js: Added.
2102         (test):
2103         * tests/es6/destructuring_in_parameters_function_length_property.js: Added.
2104         (test):
2105         * tests/es6/destructuring_in_parameters_new_Function_support.js: Added.
2106         (test):
2107         * tests/es6/destructuring_iterable_destructuring_expression.js: Added.
2108         (test):
2109         * tests/es6/destructuring_iterator_closing.js: Added.
2110         (test.):
2111         (test):
2112         * tests/es6/destructuring_multiples_in_a_single_var_statement.js: Added.
2113         (test):
2114         * tests/es6/destructuring_nested.js: Added.
2115         (test):
2116         * tests/es6/destructuring_nested_rest.js: Added.
2117         (test):
2118         * tests/es6/destructuring_object_destructuring_expression.js: Added.
2119         (test):
2120         * tests/es6/destructuring_object_destructuring_with_primitives.js: Added.
2121         (test):
2122         * tests/es6/destructuring_parenthesised_left-hand-side_is_a_syntax_error.js: Added.
2123         (test):
2124         * tests/es6/destructuring_rest.js: Added.
2125         (test):
2126         * tests/es6/destructuring_throws_on_null_and_undefined.js: Added.
2127         (test):
2128         * tests/es6/destructuring_trailing_commas_in_iterable_patterns.js: Added.
2129         (test):
2130         * tests/es6/destructuring_trailing_commas_in_object_patterns.js: Added.
2131         (test):
2132         * tests/es6/destructuring_with_arrays.js: Added.
2133         (test):
2134         * tests/es6/destructuring_with_astral_plane_strings.js: Added.
2135         (test):
2136         * tests/es6/destructuring_with_generator_instances.js: Added.
2137         (test.c):
2138         (test.e):
2139         (test):
2140         * tests/es6/destructuring_with_generic_iterables.js: Added.
2141         (test):
2142         * tests/es6/destructuring_with_instances_of_generic_iterables.js: Added.
2143         (test):
2144         * tests/es6/destructuring_with_objects.js: Added.
2145         (test):
2146         * tests/es6/destructuring_with_sparse_arrays.js: Added.
2147         (test):
2148         * tests/es6/destructuring_with_strings.js: Added.
2149         (test):
2150         * tests/es6/for..of_loops_iterator_closing_break.js: Added.
2151         (test.):
2152         (test):
2153         * tests/es6/for..of_loops_iterator_closing_throw.js: Added.
2154         (test.):
2155         (test):
2156         * tests/es6/for..of_loops_with_arrays.js: Added.
2157         (test):
2158         * tests/es6/for..of_loops_with_astral_plane_strings.js: Added.
2159         (test):
2160         * tests/es6/for..of_loops_with_generator_instances.js: Added.
2161         (test.iterable):
2162         (test):
2163         * tests/es6/for..of_loops_with_generic_iterables.js: Added.
2164         (test):
2165         * tests/es6/for..of_loops_with_instances_of_generic_iterables.js: Added.
2166         (test):
2167         * tests/es6/for..of_loops_with_sparse_arrays.js: Added.
2168         (test):
2169         * tests/es6/for..of_loops_with_strings.js: Added.
2170         (test):
2171         * tests/es6/function_name_property_accessor_properties.js: Added.
2172         (test.o.get foo):
2173         (test.o.set foo):
2174         * tests/es6/function_name_property_bound_functions.js: Added.
2175         (test.foo):
2176         (test):
2177         * tests/es6/function_name_property_class_expressions.js: Added.
2178         (test.return.foo):
2179         (test.name.string_appeared_here.typeof.bar.name):
2180         (test.name.string_appeared_here.typeof.bar):
2181         (test):
2182         * tests/es6/function_name_property_class_prototype_methods.js: Added.
2183         (test.C.prototype.foo):
2184         (test.C):
2185         (test):
2186         * tests/es6/function_name_property_class_statements.js: Added.
2187         (test.foo):
2188         (test.bar.name):
2189         (test.bar):
2190         (test):
2191         * tests/es6/function_name_property_class_static_methods.js: Added.
2192         (test.C.foo):
2193         (test.C):
2194         (test):
2195         * tests/es6/function_name_property_function_expressions.js: Added.
2196         (test):
2197         * tests/es6/function_name_property_function_statements.js: Added.
2198         (test.foo):
2199         (test):
2200         * tests/es6/function_name_property_isnt_writable_is_configurable.js: Added.
2201         (test):
2202         * tests/es6/function_name_property_new_Function.js: Added.
2203         (test):
2204         * tests/es6/function_name_property_object_methods_class.js: Added.
2205         (test.o):
2206         * tests/es6/function_name_property_object_methods_function.js: Added.
2207         (test.o.foo):
2208         (test.o.bar):
2209         (test.o.qux):
2210         (test):
2211         * tests/es6/function_name_property_shorthand_methods.js: Added.
2212         (test):
2213         * tests/es6/function_name_property_shorthand_methods_no_lexical_binding.js: Added.
2214         (test):
2215         * tests/es6/function_name_property_symbol-keyed_methods.js: Added.
2216         (test.o.sym1):
2217         (test.o.sym2):
2218         (test):
2219         * tests/es6/function_name_property_variables_class.js: Added.
2220         (test.bar):
2221         (test.qux):
2222         * tests/es6/function_name_property_variables_function.js: Added.
2223         (test.foo):
2224         (test.bar):
2225         (test):
2226         * tests/es6/generators_%GeneratorPrototype%.constructor.js: Added.
2227         (test.g):
2228         (test):
2229         * tests/es6/generators_%GeneratorPrototype%.js: Added.
2230         (test.generatorFn):
2231         (test):
2232         * tests/es6/generators_%GeneratorPrototype%.return.js: Added.
2233         (test.generator):
2234         (test):
2235         * tests/es6/generators_%GeneratorPrototype%.throw.js: Added.
2236         (test.generator):
2237         (test):
2238         * tests/es6/generators_basic_functionality.js: Added.
2239         (test.generator):
2240         (test):
2241         * tests/es6/generators_cant_use_this_with_new.js: Added.
2242         (test.generator):
2243         (test):
2244         * tests/es6/generators_computed_shorthand_generators.js: Added.
2245         (test):
2246         * tests/es6/generators_computed_shorthand_generators_classes.js: Added.
2247         (test.C.prototype.garply):
2248         (test.C):
2249         (test):
2250         * tests/es6/generators_correct_this_binding.js: Added.
2251         (test.generator):
2252         (test):
2253         * tests/es6/generators_generator_function_expressions.js: Added.
2254         (test.generator):
2255         (test):
2256         * tests/es6/generators_sending.js: Added.
2257         (test.generator):
2258         (test):
2259         * tests/es6/generators_shorthand_generator_methods.js: Added.
2260         (test):
2261         * tests/es6/generators_shorthand_generator_methods_classes.js: Added.
2262         (test.C.prototype.generator):
2263         (test.C):
2264         (test):
2265         * tests/es6/generators_string-keyed_shorthand_generator_methods.js: Added.
2266         (test):
2267         * tests/es6/generators_yield_*_arrays.js: Added.
2268         (test.iterator):
2269         (test):
2270         * tests/es6/generators_yield_*_astral_plane_strings.js: Added.
2271         (test.iterator):
2272         (test):
2273         * tests/es6/generators_yield_*_generator_instances.js: Added.
2274         (test.iterator):
2275         (test):
2276         * tests/es6/generators_yield_*_generic_iterables.js: Added.
2277         (test.iterator):
2278         (test):
2279         * tests/es6/generators_yield_*_instances_of_iterables.js: Added.
2280         (test.iterator):
2281         (test):
2282         * tests/es6/generators_yield_*_iterator_closing.js: Added.
2283         (test.):
2284         (test.gen):
2285         (test):
2286         * tests/es6/generators_yield_*_iterator_closing_via_throw.js: Added.
2287         (test.):
2288         (test.gen):
2289         (test):
2290         * tests/es6/generators_yield_*_on_non-iterables_is_a_runtime_error.js: Added.
2291         (test.iterator):
2292         (test):
2293         * tests/es6/generators_yield_*_sparse_arrays.js: Added.
2294         (test.iterator):
2295         (test):
2296         * tests/es6/generators_yield_*_strings.js: Added.
2297         (test.iterator):
2298         (test):
2299         * tests/es6/generators_yield_operator_precedence.js: Added.
2300         (test.generator):
2301         (test):
2302         * tests/es6/let_basic_support.js: Added.
2303         (test):
2304         * tests/es6/let_basic_support_strict_mode.js: Added.
2305         (test):
2306         * tests/es6/let_for-loop_iteration_scope.js: Added.
2307         (test):
2308         * tests/es6/let_for-loop_iteration_scope_strict_mode.js: Added.
2309         (test):
2310         * tests/es6/let_for-loop_statement_scope.js: Added.
2311         (test):
2312         * tests/es6/let_for-loop_statement_scope_strict_mode.js: Added.
2313         (test):
2314         * tests/es6/let_is_block-scoped.js: Added.
2315         (test):
2316         * tests/es6/let_is_block-scoped_strict_mode.js: Added.
2317         (test):
2318         * tests/es6/let_temporal_dead_zone.js: Added.
2319         (test.passed):
2320         (test):
2321         * tests/es6/let_temporal_dead_zone_strict_mode.js: Added.
2322         (test.passed):
2323         (test):
2324         * tests/es6/miscellaneous_Invalid_Date.js: Added.
2325         (test):
2326         * tests/es6/miscellaneous_RegExp_constructor_can_alter_flags.js: Added.
2327         (test):
2328         * tests/es6/miscellaneous_String.prototype_case_methods_Unicode_support.js: Added.
2329         (test):
2330         * tests/es6/miscellaneous_accessors_arent_constructors.js: Added.
2331         (test.get catch):
2332         (test):
2333         * tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js: Added.
2334         (test):
2335         * tests/es6/miscellaneous_duplicate_property_names_in_strict_mode.js: Added.
2336         (test):
2337         * tests/es6/miscellaneous_function_length_is_configurable.js: Added.
2338         (test.fn):
2339         (test):
2340         * tests/es6/miscellaneous_no_assignments_allowed_in_for-in_head.js: Added.
2341         (test):
2342         * tests/es6/miscellaneous_no_escaped_reserved_words_as_identifiers.js: Added.
2343         (test):
2344         * tests/es6/miscellaneous_no_semicolon_needed_after_do-while.js: Added.
2345         (test):
2346         * tests/es6/miscellaneous_subclassables_Boolean_is_subclassable.js: Added.
2347         (test.C):
2348         (test):
2349         * tests/es6/miscellaneous_subclassables_Map_is_subclassable.js: Added.
2350         (test):
2351         * tests/es6/miscellaneous_subclassables_Number_is_subclassable.js: Added.
2352         (test.C):
2353         (test):
2354         * tests/es6/miscellaneous_subclassables_Set_is_subclassable.js: Added.
2355         (test):
2356         * tests/es6/miscellaneous_subclassables_String_is_subclassable.js: Added.
2357         (test.C):
2358         (test):
2359         * tests/es6/new.target_assignment_is_an_early_error.js: Added.
2360         (test.new.f):
2361         (test):
2362         * tests/es6/new.target_in_constructors.js: Added.
2363         (test.new.f):
2364         (test):
2365         * tests/es6/non-strict_function_semantics_function_statements_in_if-statement_clauses.js: Added.
2366         (test.foo):
2367         (test.else.bar):
2368         (test.baz):
2369         (test.qux):
2370         (test.else.qux):
2371         (test):
2372         * tests/es6/non-strict_function_semantics_hoisted_block-level_function_declaration.js: Added.
2373         (test.f):
2374         (test.g):
2375         (test.h):
2376         (test):
2377         * tests/es6/non-strict_function_semantics_labeled_function_statements.js: Added.
2378         (test.label):
2379         (test):
2380         * tests/es6/object_literal_extensions_computed_accessors.js: Added.
2381         (test.obj.get x):
2382         (test.obj.set x):
2383         (test):
2384         * tests/es6/object_literal_extensions_computed_properties.js: Added.
2385         (test):
2386         * tests/es6/object_literal_extensions_computed_shorthand_methods.js: Added.
2387         (test):
2388         * tests/es6/object_literal_extensions_shorthand_methods.js: Added.
2389         (test):
2390         * tests/es6/object_literal_extensions_shorthand_properties.js: Added.
2391         (test):
2392         * tests/es6/object_literal_extensions_string-keyed_shorthand_methods.js: Added.
2393         (test):
2394         * tests/es6/octal_and_binary_literals_binary_literals.js: Added.
2395         (test):
2396         * tests/es6/octal_and_binary_literals_binary_supported_by_Number.js: Added.
2397         (test):
2398         * tests/es6/octal_and_binary_literals_octal_literals.js: Added.
2399         (test):
2400         * tests/es6/octal_and_binary_literals_octal_supported_by_Number.js: Added.
2401         (test):
2402         * tests/es6/own_property_order_JSON.parse.js: Added.
2403         (test):
2404         * tests/es6/own_property_order_JSON.stringify.js: Added.
2405         (test):
2406         * tests/es6/own_property_order_Object.assign.js: Added.
2407         * tests/es6/own_property_order_Object.getOwnPropertyNames.js: Added.
2408         (test):
2409         * tests/es6/own_property_order_Object.keys.js: Added.
2410         (test):
2411         * tests/es6/own_property_order_Reflect.ownKeys_string_key_order.js: Added.
2412         (test):
2413         * tests/es6/own_property_order_Reflect.ownKeys_symbol_key_order.js: Added.
2414         (test):
2415         * tests/es6/own_property_order_for..in.js: Added.
2416         (test):
2417         * tests/es6/proper_tail_calls_tail_call_optimisation_direct_recursion.js: Added.
2418         (test):
2419         * tests/es6/proper_tail_calls_tail_call_optimisation_mutual_recursion.js: Added.
2420         (test.f):
2421         (test.g):
2422         (test):
2423         * tests/es6/prototype_of_bound_functions_arrow_functions.js: Added.
2424         (test.correctProtoBound):
2425         (test):
2426         * tests/es6/prototype_of_bound_functions_basic_functions.js: Added.
2427         (test.correctProtoBound.f):
2428         (test.correctProtoBound):
2429         (test):
2430         * tests/es6/prototype_of_bound_functions_classes.js: Added.
2431         (test.correctProtoBound.C):
2432         (test.correctProtoBound):
2433         (test):
2434         * tests/es6/prototype_of_bound_functions_generator_functions.js: Added.
2435         (test.correctProtoBound.f):
2436         (test.correctProtoBound):
2437         (test):
2438         * tests/es6/prototype_of_bound_functions_subclasses.js: Added.
2439         (test.correctProtoBound.C):
2440         (test.correctProtoBound):
2441         (test):
2442         * tests/es6/rest_parameters_arguments_object_interaction.js: Added.
2443         (test):
2444         * tests/es6/rest_parameters_basic_functionality.js: Added.
2445         (test):
2446         * tests/es6/rest_parameters_cant_be_used_in_setters.js: Added.
2447         (test):
2448         * tests/es6/rest_parameters_function_length_property.js: Added.
2449         (test):
2450         * tests/es6/rest_parameters_new_Function_support.js: Added.
2451         (test):
2452         * tests/es6/spread_..._operator_spreading_non-iterables_is_a_runtime_error.js: Added.
2453         (test):
2454         * tests/es6/spread_..._operator_with_arrays_in_array_literals.js: Added.
2455         (test):
2456         * tests/es6/spread_..._operator_with_arrays_in_function_calls.js: Added.
2457         (test):
2458         * tests/es6/spread_..._operator_with_astral_plane_strings_in_array_literals.js: Added.
2459         (test):
2460         * tests/es6/spread_..._operator_with_astral_plane_strings_in_function_calls.js: Added.
2461         (test):
2462         * tests/es6/spread_..._operator_with_generator_instances_in_arrays.js: Added.
2463         (test.iterable):
2464         (test):
2465         * tests/es6/spread_..._operator_with_generator_instances_in_calls.js: Added.
2466         (test.iterable):
2467         (test):
2468         * tests/es6/spread_..._operator_with_generic_iterables_in_arrays.js: Added.
2469         (test):
2470         * tests/es6/spread_..._operator_with_generic_iterables_in_calls.js: Added.
2471         (test):
2472         * tests/es6/spread_..._operator_with_instances_of_iterables_in_arrays.js: Added.
2473         (test):
2474         * tests/es6/spread_..._operator_with_instances_of_iterables_in_calls.js: Added.
2475         (test):
2476         * tests/es6/spread_..._operator_with_sparse_arrays_in_array_literals.js: Added.
2477         (test):
2478         * tests/es6/spread_..._operator_with_sparse_arrays_in_function_calls.js: Added.
2479         (test):
2480         * tests/es6/spread_..._operator_with_strings_in_array_literals.js: Added.
2481         (test):
2482         * tests/es6/spread_..._operator_with_strings_in_function_calls.js: Added.
2483         (test):
2484         * tests/es6/super_constructor_calls_use_correct_new.target_binding.js: Added.
2485         (test.B):
2486         (test):
2487         * tests/es6/super_expression_in_constructors.js: Added.
2488         (test.B):
2489         (test.C):
2490         (test):
2491         * tests/es6/super_in_methods_method_calls.js: Added.
2492         (test.B.prototype.qux):
2493         (test.B):
2494         (test.C.prototype.qux):
2495         (test.C):
2496         (test):
2497         * tests/es6/super_in_methods_property_access.js: Added.
2498         (test.B):
2499         (test.C.prototype.quux):
2500         (test.C):
2501         (test):
2502         * tests/es6/super_is_statically_bound.js: Added.
2503         (test.B.prototype.qux):
2504         (test.B):
2505         (test.C.prototype.qux):
2506         (test.C):
2507         (test):
2508         * tests/es6/super_method_calls_use_correct_this_binding.js: Added.
2509         (test.B.prototype.qux):
2510         (test.B):
2511         (test.C.prototype.qux):
2512         (test.C):
2513         (test):
2514         * tests/es6/super_statement_in_constructors.js: Added.
2515         (test.B):
2516         (test):
2517         * tests/es6/template_strings_basic_functionality.js: Added.
2518         (test):
2519         * tests/es6/template_strings_line_break_normalisation.js: Added.
2520         (test):
2521         * tests/es6/template_strings_passed_array_is_frozen.js: Added.
2522         (test):
2523         * tests/es6/template_strings_tagged_template_strings.js: Added.
2524         (test.fn):
2525         (test):
2526         * tests/es6/template_strings_toString_conversion.js: Added.
2527         (test.a.toString):
2528         (test.a.valueOf):
2529         (test):
2530         * tests/es6/typed_arrays_%TypedArray%.from.js: Added.
2531         (test):
2532         * tests/es6/typed_arrays_%TypedArray%.of.js: Added.
2533         (test):
2534         * tests/es6/typed_arrays_%TypedArray%.prototype.copyWithin.js: Added.
2535         (test):
2536         * tests/es6/typed_arrays_%TypedArray%.prototype.entries.js: Added.
2537         (test):
2538         * tests/es6/typed_arrays_%TypedArray%.prototype.every.js: Added.
2539         (test):
2540         * tests/es6/typed_arrays_%TypedArray%.prototype.fill.js: Added.
2541         (test):
2542         * tests/es6/typed_arrays_%TypedArray%.prototype.filter.js: Added.
2543         (test):
2544         * tests/es6/typed_arrays_%TypedArray%.prototype.find.js: Added.
2545         (test):
2546         * tests/es6/typed_arrays_%TypedArray%.prototype.findIndex.js: Added.
2547         (test):
2548         * tests/es6/typed_arrays_%TypedArray%.prototype.forEach.js: Added.
2549         (test):
2550         * tests/es6/typed_arrays_%TypedArray%.prototype.indexOf.js: Added.
2551         (test):
2552         * tests/es6/typed_arrays_%TypedArray%.prototype.join.js: Added.
2553         (test):
2554         * tests/es6/typed_arrays_%TypedArray%.prototype.keys.js: Added.
2555         (test):
2556         * tests/es6/typed_arrays_%TypedArray%.prototype.lastIndexOf.js: Added.
2557         (test):
2558         * tests/es6/typed_arrays_%TypedArray%.prototype.map.js: Added.
2559         (test):
2560         * tests/es6/typed_arrays_%TypedArray%.prototype.reduce.js: Added.
2561         (test):
2562         * tests/es6/typed_arrays_%TypedArray%.prototype.reduceRight.js: Added.
2563         (test):
2564         * tests/es6/typed_arrays_%TypedArray%.prototype.reverse.js: Added.
2565         (test):
2566         * tests/es6/typed_arrays_%TypedArray%.prototype.slice.js: Added.
2567         (test):
2568         * tests/es6/typed_arrays_%TypedArray%.prototype.some.js: Added.
2569         (test):
2570         * tests/es6/typed_arrays_%TypedArray%.prototype.sort.js: Added.
2571         (test):
2572         * tests/es6/typed_arrays_%TypedArray%.prototype.subarray.js: Added.
2573         (test):
2574         * tests/es6/typed_arrays_%TypedArray%.prototype.values.js: Added.
2575         (test):
2576         * tests/es6/typed_arrays_%TypedArray%.prototype[Symbol.iterator].js: Added.
2577         (test):
2578         * tests/es6/typed_arrays_%TypedArray%[Symbol.species].js: Added.
2579         (test):
2580         * tests/es6/typed_arrays_ArrayBuffer[Symbol.species].js: Added.
2581         (test):
2582         * tests/es6/typed_arrays_DataView_Float32.js: Added.
2583         (test):
2584         * tests/es6/typed_arrays_DataView_Float64.js: Added.
2585         (test):
2586         * tests/es6/typed_arrays_DataView_Int16.js: Added.
2587         (test):
2588         * tests/es6/typed_arrays_DataView_Int32.js: Added.
2589         (test):
2590         * tests/es6/typed_arrays_DataView_Int8.js: Added.
2591         (test):
2592         * tests/es6/typed_arrays_DataView_Uint16.js: Added.
2593         (test):
2594         * tests/es6/typed_arrays_DataView_Uint32.js: Added.
2595         (test):
2596         * tests/es6/typed_arrays_DataView_Uint8.js: Added.
2597         (test):
2598         * tests/es6/typed_arrays_Float32Array.js: Added.
2599         (test):
2600         * tests/es6/typed_arrays_Float64Array.js: Added.
2601         (test):
2602         * tests/es6/typed_arrays_Int16Array.js: Added.
2603         (test):
2604         * tests/es6/typed_arrays_Int32Array.js: Added.
2605         (test):
2606         * tests/es6/typed_arrays_Int8Array.js: Added.
2607         (test):
2608         * tests/es6/typed_arrays_Uint16Array.js: Added.
2609         (test):
2610         * tests/es6/typed_arrays_Uint32Array.js: Added.
2611         (test):
2612         * tests/es6/typed_arrays_Uint8Array.js: Added.
2613         (test):
2614         * tests/es6/typed_arrays_Uint8ClampedArray.js: Added.
2615         (test):
2616         * tests/es6/typed_arrays_constructors_require_new.js: Added.
2617         (test):
2618         * tests/es6/typed_arrays_correct_prototype_chains.js: Added.
2619         (test):
2620         * tests/es6/well-known_symbols_Symbol.hasInstance.js: Added.
2621         (test.C):
2622         (test.):
2623         (test):
2624         * tests/es6/well-known_symbols_Symbol.isConcatSpreadable.js: Added.
2625         (test):
2626         * tests/es6/well-known_symbols_Symbol.iterator_arguments_object.js: Added.
2627         (test):
2628         * tests/es6/well-known_symbols_Symbol.iterator_existence.js: Added.
2629         (test):
2630         * tests/es6/well-known_symbols_Symbol.match.js: Added.
2631         (test.O.Symbol.match):
2632         (test):
2633         * tests/es6/well-known_symbols_Symbol.replace.js: Added.
2634         (test.O.Symbol.replace):
2635         (test):
2636         * tests/es6/well-known_symbols_Symbol.search.js: Added.
2637         (test.O.Symbol.search):
2638         (test):
2639         * tests/es6/well-known_symbols_Symbol.species_Array.prototype.concat.js: Added.
2640         (test.obj.Symbol.species):
2641         (test):
2642         * tests/es6/well-known_symbols_Symbol.species_Array.prototype.filter.js: Added.
2643         (test.obj.Symbol.species):
2644         (test):
2645         * tests/es6/well-known_symbols_Symbol.species_Array.prototype.map.js: Added.
2646         (test.obj.Symbol.species):
2647         (test):
2648         * tests/es6/well-known_symbols_Symbol.species_Array.prototype.slice.js: Added.
2649         (test.obj.Symbol.species):
2650         (test):
2651         * tests/es6/well-known_symbols_Symbol.species_Array.prototype.splice.js: Added.
2652         (test.obj.Symbol.species):
2653         (test):
2654         * tests/es6/well-known_symbols_Symbol.species_RegExp.prototype[Symbol.split].js: Added.
2655         (test.obj.Symbol.species):
2656         (test):
2657         * tests/es6/well-known_symbols_Symbol.species_existence.js: Added.
2658         (test):
2659         * tests/es6/well-known_symbols_Symbol.split.js: Added.
2660         (test.O.Symbol.split):
2661         (test):
2662         * tests/es6/well-known_symbols_Symbol.toPrimitive.js: Added.
2663         (test.a.Symbol.toPrimitive):
2664         (test.b.Symbol.toPrimitive):
2665         (test.c.Symbol.toPrimitive):
2666         (test):
2667         * tests/es6/well-known_symbols_Symbol.toStringTag.js: Added.
2668         (test):
2669         * tests/es6/well-known_symbols_Symbol.toStringTag_misc._built-ins.js: Added.
2670         (test):
2671         * tests/es6/well-known_symbols_Symbol.unscopables.js: Added.
2672         (test):
2673
2674 2015-09-03  Filip Pizlo  <fpizlo@apple.com>
2675
2676         WatchpointsOnStructureStubInfo doesn't need to be reference counted
2677         https://bugs.webkit.org/show_bug.cgi?id=148766
2678
2679         Reviewed by Saam Barati.
2680
2681         It doesn't need to be reference counted because the only RefPtr to it is in
2682         StructureStubInfo. Therefore, it can be a unique_ptr.
2683
2684         * bytecode/StructureStubClearingWatchpoint.cpp:
2685         (JSC::WatchpointsOnStructureStubInfo::addWatchpoint):
2686         (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint):
2687         * bytecode/StructureStubClearingWatchpoint.h:
2688         (JSC::WatchpointsOnStructureStubInfo::WatchpointsOnStructureStubInfo):
2689         (JSC::WatchpointsOnStructureStubInfo::codeBlock):
2690         * bytecode/StructureStubInfo.h:
2691         (JSC::getStructureStubInfoCodeOrigin):
2692
2693 2015-09-03  Basile Clement  <basile_clement@apple.com>
2694
2695         JavaScript functions should restore the stack pointer after a call
2696         https://bugs.webkit.org/show_bug.cgi?id=148659
2697
2698         Reviewed by Michael Saboff.
2699
2700         This patch makes it so that the various places where we are making a
2701         JS-to-JS call restore the stack pointer afterwards. This allows us to
2702         no longer rely on the stack pointer still being valid after a call, and
2703         is a prerequisite for getting rid of the arity fixup return thunk.
2704
2705         * dfg/DFGSpeculativeJIT32_64.cpp:
2706         (JSC::DFG::SpeculativeJIT::emitCall):
2707         * dfg/DFGSpeculativeJIT64.cpp:
2708         (JSC::DFG::SpeculativeJIT::emitCall):
2709         * ftl/FTLCompile.cpp:
2710         (JSC::FTL::mmAllocateDataSection):
2711         * ftl/FTLInlineCacheSize.cpp:
2712         (JSC::FTL::sizeOfCall):
2713         * ftl/FTLJSCall.cpp:
2714         (JSC::FTL::JSCall::emit):
2715         * ftl/FTLJSCall.h:
2716         * ftl/FTLStackMaps.h:
2717         (JSC::FTL::StackMaps::stackSizeForLocals):
2718         * jit/Repatch.cpp:
2719         (JSC::generateByIdStub):
2720         * tests/stress/tail-call-in-inline-cache.js: Added.
2721         (tail):
2722         (obj.get x):
2723
2724 2015-09-03  Filip Pizlo  <fpizlo@apple.com>
2725
2726         StructureStubInfo should be able to reset itself without going through CodeBlock
2727         https://bugs.webkit.org/show_bug.cgi?id=148743
2728
2729         Reviewed by Geoffrey Garen.
2730
2731         We had some resetStub...() methods in CodeBlock that didn't really do anything that
2732         StructureStubInfo couldn't do by itself. It makes sense for the functionality to reset a
2733         stub to be in the stub class, not in CodeBlock.
2734
2735         It's still true that:
2736
2737         - In order to mess with a StructureStubInfo, you either have to be in GC or you have to
2738           be holding the owning CodeBlock's lock.
2739
2740         - StructureStubInfo doesn't remember which CodeBlock owns it (to save space), and all
2741           of the callers of StructureStubInfo methods know which CodeBlock own it. So, many stub
2742           methods take CodeBlock* as an argument.
2743
2744         * bytecode/CodeBlock.cpp:
2745         (JSC::CodeBlock::finalizeUnconditionally):
2746         (JSC::CodeBlock::addCallLinkInfo):
2747         (JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
2748         (JSC::CodeBlock::resetStub): Deleted.
2749         (JSC::CodeBlock::resetStubInternal): Deleted.
2750         (JSC::CodeBlock::resetStubDuringGCInternal): Deleted.
2751         * bytecode/CodeBlock.h:
2752         * bytecode/StructureStubClearingWatchpoint.cpp:
2753         (JSC::StructureStubClearingWatchpoint::fireInternal):
2754         * bytecode/StructureStubInfo.cpp:
2755         (JSC::StructureStubInfo::deref):
2756         (JSC::StructureStubInfo::reset):
2757         (JSC::StructureStubInfo::visitWeakReferences):
2758         * bytecode/StructureStubInfo.h:
2759         (JSC::StructureStubInfo::initInList):
2760         (JSC::StructureStubInfo::seenOnce):
2761         (JSC::StructureStubInfo::reset): Deleted.
2762
2763 2015-09-03  Sukolsak Sakshuwong  <sukolsak@gmail.com>
2764
2765         Implement some arithmetic instructions in WebAssembly
2766         https://bugs.webkit.org/show_bug.cgi?id=148737
2767
2768         Reviewed by Geoffrey Garen.
2769
2770         This patch implements the addition and subtraction instructions in
2771         WebAssembly using a stack-based approach: each instruction reads its
2772         operands from the top of the 'temporary' stack, pops them, and
2773         optionally pushes a return value to the stack. Since operands are passed
2774         on the stack, we don't use the arguments that are passed to the methods
2775         of WASMFunctionCompiler, and we don't use the return values from these
2776         methods. (We will use them when we implement LLVM IR generation for
2777         WebAssembly, where each expression is an LLVMValueRef.)
2778
2779         * tests/stress/wasm-arithmetic.js: Added.
2780         * tests/stress/wasm-arithmetic.wasm: Added.
2781         * wasm/WASMFunctionCompiler.h:
2782         (JSC::WASMFunctionCompiler::endFunction):
2783         (JSC::WASMFunctionCompiler::buildReturn):
2784         (JSC::WASMFunctionCompiler::buildImmediateI32):
2785         (JSC::WASMFunctionCompiler::buildBinaryI32):
2786         (JSC::WASMFunctionCompiler::temporaryAddress):
2787         * wasm/WASMFunctionParser.cpp:
2788         (JSC::WASMFunctionParser::parseReturnStatement):
2789         (JSC::WASMFunctionParser::parseExpressionI32):
2790         (JSC::WASMFunctionParser::parseImmediateExpressionI32):
2791         (JSC::WASMFunctionParser::parseBinaryExpressionI32):
2792         * wasm/WASMFunctionParser.h:
2793         * wasm/WASMFunctionSyntaxChecker.h:
2794         (JSC::WASMFunctionSyntaxChecker::startFunction):
2795         (JSC::WASMFunctionSyntaxChecker::endFunction):
2796         (JSC::WASMFunctionSyntaxChecker::buildReturn):
2797         (JSC::WASMFunctionSyntaxChecker::buildImmediateI32):
2798         (JSC::WASMFunctionSyntaxChecker::buildBinaryI32):
2799         (JSC::WASMFunctionSyntaxChecker::stackHeight):
2800         (JSC::WASMFunctionSyntaxChecker::updateTempStackHeight):
2801
2802 2015-09-03  Brian Burg  <bburg@apple.com>
2803
2804         Web Inspector: should crash on purpose if InjectedScriptSource.js is unparseable
2805         https://bugs.webkit.org/show_bug.cgi?id=148750
2806
2807         Reviewed by Timothy Hatcher.
2808
2809         If an injected script cannot be parsed or executed without exception, we should abort as
2810         soon as possible. This patch adds a release assertion after creating the injected
2811         script and dumps the bad injected script's source as it was embedded into the binary.
2812
2813         * inspector/InjectedScriptManager.cpp:
2814         (Inspector::InjectedScriptManager::injectedScriptFor):
2815
2816 2015-09-03  Basile Clement  <basile_clement@apple.com> and Michael Saboff  <msaboff@apple.com>
2817
2818         Clean up register naming
2819         https://bugs.webkit.org/show_bug.cgi?id=148658
2820
2821         Reviewed by Geoffrey Garen.
2822
2823         This changes register naming conventions in the llint and baseline JIT
2824         in order to use as few (native) callee-save registers as possible on
2825         64-bits platforms. It also introduces significant changes in the way
2826         registers names are defined in the LLint and baseline JIT in order to
2827         enable a simpler convention about which registers can be aliased. That
2828         convention is valid across all architecture, and described in
2829         llint/LowLevelInterpreter.asm.
2830
2831         Callee save registers are now called out regCS<n> (in the JIT) or
2832         csr<n> (in the LLInt) with a common numbering across all tiers. Some
2833         registers are unused in some tiers.
2834
2835         As a part of this change, rdi was removed from the list of temporary
2836         registers for X86-64 Windows as it is a callee saves register. This
2837         reduced the number of temporary registers for X86-64 Windows.
2838
2839         This is in preparation for properly handling callee save register
2840         preservation and restoration.
2841
2842         * dfg/DFGJITCompiler.cpp:
2843         (JSC::DFG::JITCompiler::compileFunction):
2844         * ftl/FTLLink.cpp:
2845         (JSC::FTL::link):
2846         * jit/FPRInfo.h:
2847         (JSC::FPRInfo::toRegister):
2848         (JSC::FPRInfo::toIndex):
2849         * jit/GPRInfo.h:
2850         (JSC::GPRInfo::toIndex):
2851         (JSC::GPRInfo::toRegister):
2852         (JSC::GPRInfo::debugName): Deleted.
2853         * jit/JIT.cpp:
2854         (JSC::JIT::privateCompile):
2855         * jit/JITArithmetic.cpp:
2856         (JSC::JIT::emit_op_mod):
2857         * jit/JITOpcodes.cpp:
2858         (JSC::JIT::emitSlow_op_loop_hint):
2859         * jit/JITOpcodes32_64.cpp:
2860         (JSC::JIT::emit_op_end):
2861         (JSC::JIT::emit_op_new_object):
2862         * jit/RegisterPreservationWrapperGenerator.cpp:
2863         (JSC::generateRegisterPreservationWrapper):
2864         (JSC::generateRegisterRestoration):
2865         * jit/ThunkGenerators.cpp:
2866         (JSC::arityFixupGenerator):
2867         (JSC::nativeForGenerator): Deleted.
2868         * llint/LowLevelInterpreter.asm:
2869         * llint/LowLevelInterpreter32_64.asm:
2870         * llint/LowLevelInterpreter64.asm:
2871         * offlineasm/arm.rb:
2872         * offlineasm/arm64.rb:
2873         * offlineasm/cloop.rb:
2874         * offlineasm/mips.rb:
2875         * offlineasm/registers.rb:
2876         * offlineasm/sh4.rb:
2877         * offlineasm/x86.rb:
2878
2879 2015-09-03  Filip Pizlo  <fpizlo@apple.com>
2880
2881         Get rid of RepatchBuffer and replace it with static functions
2882         https://bugs.webkit.org/show_bug.cgi?id=148742
2883
2884         Reviewed by Geoffrey Garen and Mark Lam.
2885
2886         RepatchBuffer is an object that doesn't have any state. All of its instance methods are
2887         just wrappers for methods on MacroAssembler. So, we should make those MacroAssembler
2888         methods public and call them directly.
2889
2890         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
2891         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
2892         * JavaScriptCore.xcodeproj/project.pbxproj:
2893         * assembler/AbstractMacroAssembler.h:
2894         (JSC::AbstractMacroAssembler::linkJump):
2895         (JSC::AbstractMacroAssembler::linkPointer):
2896         (JSC::AbstractMacroAssembler::getLinkerAddress):
2897         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
2898         (JSC::AbstractMacroAssembler::repatchJump):
2899         (JSC::AbstractMacroAssembler::repatchNearCall):
2900         (JSC::AbstractMacroAssembler::repatchCompact):
2901         (JSC::AbstractMacroAssembler::repatchInt32):
2902         (JSC::AbstractMacroAssembler::repatchPointer):
2903         (JSC::AbstractMacroAssembler::readPointer):
2904         (JSC::AbstractMacroAssembler::replaceWithLoad):
2905         (JSC::AbstractMacroAssembler::replaceWithAddressComputation):
2906         (JSC::AbstractMacroAssembler::AbstractMacroAssembler):
2907         * assembler/MacroAssemblerARM64.h:
2908         (JSC::MacroAssemblerARM64::revertJumpReplacementToPatchableBranch32WithPatch):
2909         (JSC::MacroAssemblerARM64::repatchCall):
2910         (JSC::MacroAssemblerARM64::makeBranch):
2911         (JSC::MacroAssemblerARM64::linkCall):
2912         * assembler/MacroAssemblerARMv7.h:
2913         (JSC::MacroAssemblerARMv7::revertJumpReplacementToPatchableBranch32WithPatch):
2914         (JSC::MacroAssemblerARMv7::repatchCall):
2915         (JSC::MacroAssemblerARMv7::linkCall):
2916         (JSC::MacroAssemblerARMv7::trustedImm32FromPtr):
2917         * assembler/MacroAssemblerX86.h:
2918         (JSC::MacroAssemblerX86::revertJumpReplacementToPatchableBranch32WithPatch):
2919         (JSC::MacroAssemblerX86::repatchCall):
2920         (JSC::MacroAssemblerX86::linkCall):
2921         * assembler/MacroAssemblerX86_64.h:
2922         (JSC::MacroAssemblerX86_64::revertJumpReplacementToBranchPtrWithPatch):
2923         (JSC::MacroAssemblerX86_64::repatchCall):
2924         (JSC::MacroAssemblerX86_64::linkCall):
2925         * assembler/RepatchBuffer.h: Removed.
2926         * bytecode/CallLinkInfo.cpp:
2927         (JSC::CallLinkInfo::clearStub):
2928         (JSC::CallLinkInfo::unlink):
2929         (JSC::CallLinkInfo::visitWeak):
2930         * bytecode/CallLinkInfo.h:
2931         (JSC::CallLinkInfo::registerPreservationMode):
2932         (JSC::CallLinkInfo::isLinked):
2933         (JSC::CallLinkInfo::setUpCall):
2934         (JSC::CallLinkInfo::codeOrigin):
2935         * bytecode/CodeBlock.cpp:
2936         (JSC::CodeBlock::finalizeUnconditionally):
2937         (JSC::CodeBlock::resetStub):
2938         (JSC::CodeBlock::resetStubInternal):
2939         (JSC::CodeBlock::resetStubDuringGCInternal):
2940         (JSC::CodeBlock::unlinkIncomingCalls):
2941         * bytecode/CodeBlock.h:
2942         * bytecode/PolymorphicGetByIdList.cpp:
2943         (JSC::GetByIdAccess::fromStructureStubInfo):
2944         (JSC::GetByIdAccess::visitWeak):
2945         (JSC::PolymorphicGetByIdList::didSelfPatching):
2946         (JSC::PolymorphicGetByIdList::visitWeak):
2947         * bytecode/PolymorphicGetByIdList.h:
2948         (JSC::GetByIdAccess::doesCalls):
2949         * bytecode/PolymorphicPutByIdList.cpp:
2950         (JSC::PutByIdAccess::fromStructureStubInfo):
2951         (JSC::PutByIdAccess::visitWeak):
2952         (JSC::PolymorphicPutByIdList::addAccess):
2953         (JSC::PolymorphicPutByIdList::visitWeak):
2954         * bytecode/PolymorphicPutByIdList.h:
2955         (JSC::PutByIdAccess::customSetter):
2956         (JSC::PolymorphicPutByIdList::kind):
2957         * bytecode/StructureStubInfo.cpp:
2958         (JSC::StructureStubInfo::deref):
2959         (JSC::StructureStubInfo::visitWeakReferences):
2960         * bytecode/StructureStubInfo.h:
2961         (JSC::StructureStubInfo::seenOnce):
2962         * dfg/DFGOSRExitCompiler.cpp:
2963         * ftl/FTLCompile.cpp:
2964         (JSC::FTL::mmAllocateDataSection):
2965         * ftl/FTLOSRExitCompiler.cpp:
2966         (JSC::FTL::compileFTLOSRExit):
2967         * jit/AccessorCallJITStubRoutine.cpp:
2968         (JSC::AccessorCallJITStubRoutine::~AccessorCallJITStubRoutine):
2969         (JSC::AccessorCallJITStubRoutine::visitWeak):
2970         * jit/AccessorCallJITStubRoutine.h:
2971         * jit/JIT.cpp:
2972         (JSC::ctiPatchCallByReturnAddress):
2973         (JSC::JIT::JIT):
2974         (JSC::ctiPatchNearCallByReturnAddress): Deleted.
2975         * jit/JIT.h:
2976         * jit/JITCall.cpp:
2977         * jit/JITOpcodes.cpp:
2978         (JSC::JIT::privateCompileHasIndexedProperty):
2979         (JSC::JIT::emit_op_has_indexed_property):
2980         * jit/JITOperations.cpp:
2981         (JSC::getByVal):
2982         * jit/JITPropertyAccess.cpp:
2983         (JSC::JIT::privateCompileGetByVal):
2984         (JSC::JIT::privateCompileGetByValWithCachedId):
2985         (JSC::JIT::privateCompilePutByVal):
2986         (JSC::JIT::privateCompilePutByValWithCachedId):
2987         * jit/JITPropertyAccess32_64.cpp:
2988         * jit/JITStubRoutine.cpp:
2989         (JSC::JITStubRoutine::~JITStubRoutine):
2990         (JSC::JITStubRoutine::visitWeak):
2991         * jit/JITStubRoutine.h:
2992         * jit/PolymorphicCallStubRoutine.cpp:
2993         (JSC::PolymorphicCallNode::~PolymorphicCallNode):
2994         (JSC::PolymorphicCallNode::unlink):
2995         (JSC::PolymorphicCallStubRoutine::clearCallNodesFor):
2996         (JSC::PolymorphicCallStubRoutine::visitWeak):
2997         * jit/PolymorphicCallStubRoutine.h:
2998         (JSC::PolymorphicCallNode::hasCallLinkInfo):
2999         * jit/Repatch.cpp:
3000         (JSC::readCallTarget):
3001         (JSC::repatchCall):
3002         (JSC::repatchByIdSelfAccess):
3003         (JSC::checkObjectPropertyConditions):
3004         (JSC::replaceWithJump):
3005         (JSC::tryCacheGetByID):
3006         (JSC::repatchGetByID):
3007         (JSC::patchJumpToGetByIdStub):
3008         (JSC::tryBuildGetByIDList):
3009         (JSC::tryCachePutByID):
3010         (JSC::tryBuildPutByIdList):
3011         (JSC::tryRepatchIn):
3012         (JSC::repatchIn):
3013         (JSC::linkSlowFor):
3014         (JSC::linkFor):
3015         (JSC::revertCall):
3016         (JSC::unlinkFor):
3017         (JSC::linkVirtualFor):
3018         (JSC::linkPolymorphicCall):
3019         (JSC::resetGetByID):
3020         (JSC::resetPutByID):
3021         (JSC::resetIn):
3022         * jit/Repatch.h:
3023
3024 2015-09-03  Sukolsak Sakshuwong  <sukolsak@gmail.com>
3025
3026         Initial implementation of WebAssembly function compiler
3027         https://bugs.webkit.org/show_bug.cgi?id=148734
3028
3029         Reviewed by Filip Pizlo.
3030
3031         This patch introduces WASMFunctionCompiler, a class for generating
3032         baseline JIT code for WebAssembly functions. The source for each
3033         WebAssembly function is parsed in two passes.
3034         - The first pass is done by WASMFunctionSyntaxChecker when the
3035           WebAssembly module is initialized. It validates the syntax,
3036           determines the start and the end offsets in the source, and
3037           calculates the stack height of the function.
3038         - The second pass is done by WASMFunctionCompiler when the function
3039           is about to be executed.
3040         This patch doesn't calculate the correct stack height nor generate
3041         the correct code. That will be done in a subsequent patch.
3042
3043         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
3044         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
3045         * JavaScriptCore.xcodeproj/project.pbxproj:
3046         * wasm/JSWASMModule.h:
3047         (JSC::JSWASMModule::functionStartOffsetsInSource):
3048         (JSC::JSWASMModule::functionStackHeights):
3049         * wasm/WASMFunctionCompiler.h: Added.
3050         (JSC::WASMFunctionCompiler::WASMFunctionCompiler):
3051         (JSC::WASMFunctionCompiler::startFunction):
3052         (JSC::WASMFunctionCompiler::endFunction):
3053         (JSC::WASMFunctionCompiler::throwStackOverflowError):
3054         (JSC::WASMFunctionCompiler::localAddress):
3055         * wasm/WASMFunctionParser.cpp:
3056         (JSC::WASMFunctionParser::checkSyntax):
3057         (JSC::WASMFunctionParser::compile):
3058         (JSC::WASMFunctionParser::parseFunction):
3059         * wasm/WASMFunctionParser.h:
3060         * wasm/WASMFunctionSyntaxChecker.h:
3061         (JSC::WASMFunctionSyntaxChecker::startFunction):
3062         (JSC::WASMFunctionSyntaxChecker::endFunction):
3063         (JSC::WASMFunctionSyntaxChecker::stackHeight):
3064         * wasm/WASMModuleParser.cpp:
3065         (JSC::WASMModuleParser::parseFunctionDeclarationSection):
3066         (JSC::WASMModuleParser::parseFunctionDefinition):
3067
3068 2015-09-03  Saam barati  <sbarati@apple.com>
3069
3070         Block scoped variables should be visible across scripts
3071         https://bugs.webkit.org/show_bug.cgi?id=147813
3072
3073         Reviewed by Filip Pizlo.
3074
3075         This patch properly implements the global lexical tier described in
3076         http://www.ecma-international.org/ecma-262/6.0/index.html#sec-globaldeclarationinstantiation.
3077         The sepcification mandates that there is a global lexical environment
3078         that wrtaps all program execution. This global lexical environment
3079         holds let/const/class variables defined at the top-level scope
3080         inside a program. These variables can never shadow other program-level
3081         "var"s, global object properties, or other global lexical environment
3082         declarations. Doing so is a SyntaxError.
3083
3084         This patch adds new ResolveTypes that describe the global lexical environment:
3085         GlobalLexicalVar and GlobalLexiclaVarWithInjectionChecks. Resolving to
3086         these means we're doing a load/store from the JSGlobalLexicalEnvironment.
3087         This patch also addes new ResolveTypes: UnresolvedProperty and
3088         UnresolvedPropertyWithVarInjectionChecks. Before, we used GlobalProperty
3089         to encompass this category because if JSScope::abstractAccess didn't
3090         resolve to anything, we could safely assume that this property is
3091         on the global object. Such an assumption is no longer true in ES6.
3092         When we have a resolve_scope/put_to_scope/get_from_scope with this
3093         ResolveType, we try to transition it to either a GlobalProperty
3094         ResolveType or a GlobalLexicalVar resolve type.
3095
3096         JSGlobalLexicalEnvironment is a subclass of JSSegmentedVariableObject.
3097         This means get_from_scopes are direct pointer reads and
3098         put_to_scopes are direct pointer stores.
3099
3100         * CMakeLists.txt:
3101         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
3102         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
3103         * JavaScriptCore.xcodeproj/project.pbxproj:
3104         * bytecode/CodeBlock.cpp:
3105         (JSC::CodeBlock::dumpBytecode):
3106         (JSC::CodeBlock::CodeBlock):
3107         (JSC::CodeBlock::finalizeUnconditionally):
3108         * bytecode/EvalCodeCache.h:
3109         (JSC::EvalCodeCache::clear):
3110         (JSC::EvalCodeCache::isCacheableScope):
3111         (JSC::EvalCodeCache::isCacheable):
3112         * bytecode/SpeculatedType.h:
3113         * bytecode/UnlinkedCodeBlock.h:
3114         * bytecompiler/BytecodeGenerator.cpp:
3115         (JSC::BytecodeGenerator::generate):
3116         (JSC::BytecodeGenerator::BytecodeGenerator):
3117         (JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
3118         (JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
3119         (JSC::BytecodeGenerator::emitGetFromScope):
3120         (JSC::BytecodeGenerator::emitPutToScope):
3121         (JSC::BytecodeGenerator::initializeVariable):
3122         (JSC::BytecodeGenerator::emitInstanceOf):
3123         (JSC::BytecodeGenerator::emitPushFunctionNameScope):
3124         (JSC::BytecodeGenerator::pushScopedControlFlowContext):
3125         (JSC::BytecodeGenerator::emitPushCatchScope):
3126         (JSC::BytecodeGenerator::emitPopCatchScope):
3127         * bytecompiler/BytecodeGenerator.h:
3128         * bytecompiler/NodesCodegen.cpp:
3129         (JSC::PostfixNode::emitResolve):
3130         (JSC::PrefixNode::emitResolve):
3131         (JSC::ReadModifyResolveNode::emitBytecode):
3132         (JSC::AssignResolveNode::emitBytecode):
3133         (JSC::EmptyLetExpression::emitBytecode):
3134         (JSC::ForInNode::emitLoopHeader):
3135         (JSC::ForOfNode::emitBytecode):
3136         (JSC::BindingNode::bindValue):
3137         * debugger/DebuggerScope.cpp:
3138         (JSC::DebuggerScope::isGlobalScope):
3139         (JSC::DebuggerScope::isGlobalLexicalEnvironment):
3140         (JSC::DebuggerScope::isClosureScope):
3141         (JSC::DebuggerScope::caughtValue):
3142         (JSC::DebuggerScope::isFunctionOrEvalScope): Deleted.
3143         * debugger/DebuggerScope.h:
3144         * dfg/DFGAbstractInterpreterInlines.h:
3145         (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
3146         * dfg/DFGByteCodeParser.cpp:
3147         (JSC::DFG::ByteCodeParser::parseBlock):
3148         * dfg/DFGCapabilities.cpp:
3149         (JSC::DFG::capabilityLevel):
3150         * dfg/DFGClobberize.h:
3151         (JSC::DFG::clobberize):
3152         * dfg/DFGDoesGC.cpp:
3153         (JSC::DFG::doesGC):
3154         * dfg/DFGFixupPhase.cpp:
3155         (JSC::DFG::FixupPhase::fixupNode):
3156         * dfg/DFGGraph.cpp:
3157         (JSC::DFG::Graph::dump):
3158         * dfg/DFGNode.h:
3159         (JSC::DFG::Node::hasRegisterPointer):
3160         (JSC::DFG::Node::variablePointer):
3161         (JSC::DFG::Node::hasHeapPrediction):
3162         * dfg/DFGNodeType.h:
3163         * dfg/DFGPredictionPropagationPhase.cpp:
3164         (JSC::DFG::PredictionPropagationPhase::propagate):
3165         * dfg/DFGSafeToExecute.h:
3166         (JSC::DFG::safeToExecute):
3167         * dfg/DFGSpeculativeJIT32_64.cpp:
3168         (JSC::DFG::SpeculativeJIT::compile):
3169         * dfg/DFGSpeculativeJIT64.cpp:
3170         (JSC::DFG::SpeculativeJIT::compile):
3171         * dfg/DFGStoreBarrierInsertionPhase.cpp:
3172         * ftl/FTLCapabilities.cpp:
3173         (JSC::FTL::canCompile):
3174         * ftl/FTLLowerDFGToLLVM.cpp:
3175         (JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
3176         (JSC::FTL::DFG::LowerDFGToLLVM::compileMultiPutByOffset):
3177         (JSC::FTL::DFG::LowerDFGToLLVM::compileGetGlobalVariable):
3178         (JSC::FTL::DFG::LowerDFGToLLVM::compilePutGlobalVariable):
3179         (JSC::FTL::DFG::LowerDFGToLLVM::compileGetGlobalVar): Deleted.
3180         (JSC::FTL::DFG::LowerDFGToLLVM::compilePutGlobalVar): Deleted.
3181         * inspector/JSJavaScriptCallFrame.cpp:
3182         (Inspector::JSJavaScriptCallFrame::scopeType):
3183         * interpreter/Interpreter.cpp:
3184         (JSC::Interpreter::execute):
3185         * jit/JIT.h:
3186         * jit/JITOperations.cpp:
3187         * jit/JITOperations.h:
3188         * jit/JITPropertyAccess.cpp:
3189         (JSC::JIT::emit_op_resolve_scope):
3190         (JSC::JIT::emitSlow_op_resolve_scope):
3191         (JSC::JIT::emitLoadWithStructureCheck):
3192         (JSC::JIT::emitGetGlobalProperty):
3193         (JSC::JIT::emitGetVarFromPointer):
3194         (JSC::JIT::emitGetClosureVar):
3195         (JSC::JIT::emit_op_get_from_scope):
3196         (JSC::JIT::emitSlow_op_get_from_scope):
3197         (JSC::JIT::emitPutGlobalProperty):
3198         (JSC::JIT::emitPutGlobalVariable):
3199         (JSC::JIT::emit_op_put_to_scope):
3200         (JSC::JIT::emitSlow_op_put_to_scope):
3201         (JSC::JIT::emitGetGlobalVar): Deleted.
3202         (JSC::JIT::emitPutGlobalVar): Deleted.
3203         * jit/JITPropertyAccess32_64.cpp:
3204         (JSC::JIT::emit_op_resolve_scope):
3205         (JSC::JIT::emitSlow_op_resolve_scope):
3206         (JSC::JIT::emitLoadWithStructureCheck):
3207         (JSC::JIT::emitGetGlobalProperty):
3208         (JSC::JIT::emitGetVarFromPointer):
3209         (JSC::JIT::emitGetClosureVar):
3210         (JSC::JIT::emit_op_get_from_scope):
3211         (JSC::JIT::emitSlow_op_get_from_scope):
3212         (JSC::JIT::emitPutGlobalProperty):
3213         (JSC::JIT::emitPutGlobalVariable):
3214         (JSC::JIT::emit_op_put_to_scope):
3215         (JSC::JIT::emitSlow_op_put_to_scope):
3216         (JSC::JIT::emitGetGlobalVar): Deleted.
3217         (JSC::JIT::emitPutGlobalVar): Deleted.
3218         * llint/LLIntData.cpp:
3219         (JSC::LLInt::Data::performAssertions):
3220         * llint/LLIntSlowPaths.cpp:
3221         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
3222         * llint/LLIntSlowPaths.h:
3223         * llint/LowLevelInterpreter.asm:
3224         * llint/LowLevelInterpreter32_64.asm:
3225         * llint/LowLevelInterpreter64.asm:
3226         * runtime/CommonSlowPaths.cpp:
3227         (JSC::SLOW_PATH_DECL):
3228         * runtime/CommonSlowPaths.h:
3229         (JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
3230         (JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):
3231         * runtime/Executable.cpp:
3232         (JSC::ProgramExecutable::initializeGlobalProperties):
3233         * runtime/GetPutInfo.h: Added.
3234         (JSC::resolveModeName):
3235         (JSC::resolveTypeName):
3236         (JSC::initializationModeName):
3237         (JSC::makeType):
3238         (JSC::needsVarInjectionChecks):
3239         (JSC::ResolveOp::ResolveOp):
3240         (JSC::GetPutInfo::GetPutInfo):
3241         (JSC::GetPutInfo::resolveType):
3242         (JSC::GetPutInfo::initializationMode):
3243         (JSC::GetPutInfo::resolveMode):
3244         (JSC::GetPutInfo::operand):
3245         * runtime/JSGlobalLexicalEnvironment.cpp: Added.
3246         (JSC::JSGlobalLexicalEnvironment::getOwnPropertySlot):
3247         (JSC::JSGlobalLexicalEnvironment::put):
3248         * runtime/JSGlobalLexicalEnvironment.h: Added.
3249         (JSC::JSGlobalLexicalEnvironment::create):
3250         (JSC::JSGlobalLexicalEnvironment::isEmpty):
3251         (JSC::JSGlobalLexicalEnvironment::createStructure):
3252         (JSC::JSGlobalLexicalEnvironment::JSGlobalLexicalEnvironment):
3253         * runtime/JSGlobalObject.cpp:
3254         (JSC::JSGlobalObject::init):
3255         (JSC::JSGlobalObject::put):
3256         (JSC::JSGlobalObject::addGlobalVar):
3257         (JSC::JSGlobalObject::visitChildren):
3258         (JSC::JSGlobalObject::addStaticGlobals):
3259         * runtime/JSGlobalObject.h:
3260         (JSC::JSGlobalObject::addVar):
3261         (JSC::JSGlobalObject::globalScope):
3262         (JSC::JSGlobalObject::globalLexicalEnvironment):
3263         (JSC::JSGlobalObject::hasOwnPropertyForWrite):
3264         (JSC::constructEmptyArray):
3265         (JSC::JSGlobalObject::symbolTableHasProperty): Deleted.
3266         * runtime/JSGlobalObjectFunctions.cpp:
3267         (JSC::globalFuncEval):
3268         (JSC::globalFuncParseInt):
3269         * runtime/JSLexicalEnvironment.h:
3270         (JSC::JSLexicalEnvironment::createStructure):
3271         * runtime/JSObject.h:
3272         (JSC::JSObject::isGlobalObject):
3273         (JSC::JSObject::isErrorInstance):
3274         (JSC::JSObject::isVariableObject): Deleted.
3275         (JSC::JSObject::isStaticScopeObject): Deleted.
3276         (JSC::JSObject::isNameScopeObject): Deleted.
3277         (JSC::JSObject::isActivationObject): Deleted.
3278         * runtime/JSScope.cpp:
3279         (JSC::JSScope::visitChildren):
3280         (JSC::abstractAccess):
3281         (JSC::JSScope::resolve):
3282         (JSC::JSScope::abstractResolve):
3283         (JSC::JSScope::collectVariablesUnderTDZ):
3284         (JSC::isScopeType):
3285         (JSC::JSScope::isVarScope):
3286         (JSC::JSScope::isLexicalScope):
3287         (JSC::JSScope::isCatchScope):
3288         (JSC::JSScope::isFunctionNameScopeObject):
3289         (JSC::JSScope::isGlobalLexicalEnvironment):
3290         (JSC::JSScope::constantScopeForCodeBlock):
3291         (JSC::resolveModeName): Deleted.
3292         (JSC::resolveTypeName): Deleted.
3293         * runtime/JSScope.h:
3294         (JSC::makeType): Deleted.
3295         (JSC::needsVarInjectionChecks): Deleted.
3296         (JSC::ResolveOp::ResolveOp): Deleted.
3297         (JSC::ResolveModeAndType::ResolveModeAndType): Deleted.
3298         (JSC::ResolveModeAndType::mode): Deleted.
3299         (JSC::ResolveModeAndType::type): Deleted.
3300         (JSC::ResolveModeAndType::operand): Deleted.
3301         * runtime/JSSegmentedVariableObject.cpp:
3302         (JSC::JSSegmentedVariableObject::findVariableIndex):
3303         (JSC::JSSegmentedVariableObject::addVariables):
3304         * runtime/JSSegmentedVariableObject.h:
3305         * runtime/JSSymbolTableObject.h:
3306         (JSC::symbolTablePut):
3307         * runtime/JSType.h:
3308         * runtime/PutPropertySlot.h:
3309         (JSC::PutPropertySlot::PutPropertySlot):
3310         (JSC::PutPropertySlot::isCacheablePut):
3311         (JSC::PutPropertySlot::isCacheableSetter):
3312         (JSC::PutPropertySlot::isCacheableCustom):
3313         (JSC::PutPropertySlot::isInitialization):
3314         (JSC::PutPropertySlot::cachedOffset):
3315         * runtime/SymbolTable.h:
3316         * tests/stress/global-lexical-let-no-rhs.js: Added.
3317         (assert):
3318         (foo):
3319         * tests/stress/global-lexical-redeclare-variable.js: Added.
3320         (globalFunction):
3321         (globalClass):
3322         (assert):
3323         (assertExpectations):
3324         (assertProperError):
3325         * tests/stress/global-lexical-redefine-const.js: Added.
3326         * tests/stress/global-lexical-var-injection.js: Added.
3327         (assert):
3328         (baz):
3329         * tests/stress/global-lexical-variable-tdz.js: Added.
3330         * tests/stress/global-lexical-variable-unresolved-property.js: Added.
3331         * tests/stress/global-lexical-variable-with-statement.js: Added.
3332         (assert):
3333         (shouldThrowInvalidConstAssignment):
3334         (makeObj):
3335         * tests/stress/multiple-files-tests: Added.
3336         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable: Added.
3337         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/fifth.js: Added.
3338         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/first.js: Added.
3339         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/fourth.js: Added.
3340         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/second.js: Added.
3341         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/sixth.js: Added.
3342         * tests/stress/multiple-files-tests/global-lexical-redeclare-variable/third.js: Added.
3343         * tests/stress/multiple-files-tests/global-lexical-redefine-const: Added.
3344         * tests/stress/multiple-files-tests/global-lexical-redefine-const/first.js: Added.
3345         (assert):
3346         (shouldThrowInvalidConstAssignment):
3347         * tests/stress/multiple-files-tests/global-lexical-redefine-const/second.js: Added.
3348         (foo):
3349         (bar):
3350         (baz):
3351         * tests/stress/multiple-files-tests/global-lexical-variable-tdz: Added.
3352         * tests/stress/multiple-files-tests/global-lexical-variable-tdz/first.js: Added.
3353         (assert):
3354         (shouldThrowTDZ):
3355         (foo):
3356         (bar):
3357         * tests/stress/multiple-files-tests/global-lexical-variable-tdz/second.js: Added.
3358         * tests/stress/multiple-files-tests/global-lexical-variable-unresolved-property: Added.
3359         * tests/stress/multiple-files-tests/global-lexical-variable-unresolved-property/first.js: Added.
3360         (assert):
3361         (shouldThrowTDZ):
3362         (foo):
3363         * tests/stress/multiple-files-tests/global-lexical-variable-unresolved-property/second.js: Added.
3364
3365 2015-09-03  Filip Pizlo  <fpizlo@apple.com>
3366
3367         RepatchBuffer should be stateless
3368         https://bugs.webkit.org/show_bug.cgi?id=148741
3369
3370         Reviewed by Geoffrey Garen.
3371
3372         This removes our reliance on RepatchBuffer having a pointer to CodeBlock. This is in
3373         preparation for removing RepatchBuffer entirely (see
3374         https://bugs.webkit.org/show_bug.cgi?id=148742). In the longer term, this is necessary
3375         for making inline cache code, particularly in StructureStubInfo, more self-contained.
3376         Currently StructureStubInfo relies on very pointless-looking methods in CodeBlock to
3377         clear itself, and the only thing that those methods do is create a RepatchBuffer. It's
3378         quite silly.
3379
3380         * assembler/LinkBuffer.cpp:
3381         (JSC::LinkBuffer::allocate):
3382         (JSC::LinkBuffer::performFinalization):
3383         * assembler/RepatchBuffer.h:
3384         (JSC::RepatchBuffer::RepatchBuffer):
3385         (JSC::RepatchBuffer::~RepatchBuffer):
3386         (JSC::RepatchBuffer::relink):
3387         (JSC::RepatchBuffer::revertJumpReplacementToPatchableBranch32WithPatch):
3388         (JSC::RepatchBuffer::codeBlock): Deleted.
3389         * bytecode/CallLinkInfo.cpp:
3390         (JSC::CallLinkInfo::clearStub):
3391         (JSC::CallLinkInfo::unlink):
3392         (JSC::CallLinkInfo::visitWeak):
3393         * bytecode/CallLinkInfo.h:
3394         (JSC::CallLinkInfo::registerPreservationMode):
3395         (JSC::CallLinkInfo::isLinked):
3396         (JSC::CallLinkInfo::setUpCall):
3397         (JSC::CallLinkInfo::codeOrigin):
3398         * bytecode/CodeBlock.cpp:
3399         (JSC::CodeBlock::finalizeUnconditionally):
3400         (JSC::CodeBlock::resetStubInternal):
3401         (JSC::CodeBlock::unlinkIncomingCalls):
3402         * bytecode/PolymorphicGetByIdList.cpp:
3403         (JSC::GetByIdAccess::fromStructureStubInfo):
3404         (JSC::GetByIdAccess::visitWeak):
3405         (JSC::PolymorphicGetByIdList::didSelfPatching):
3406         (JSC::PolymorphicGetByIdList::visitWeak):
3407         * bytecode/PolymorphicGetByIdList.h:
3408         (JSC::GetByIdAccess::doesCalls):
3409         * bytecode/PolymorphicPutByIdList.cpp:
3410         (JSC::PutByIdAccess::fromStructureStubInfo):
3411         (JSC::PutByIdAccess::visitWeak):
3412         (JSC::PolymorphicPutByIdList::addAccess):
3413         (JSC::PolymorphicPutByIdList::visitWeak):
3414         * bytecode/PolymorphicPutByIdList.h:
3415         (JSC::PutByIdAccess::customSetter):
3416         (JSC::PolymorphicPutByIdList::kind):
3417         * bytecode/StructureStubInfo.cpp:
3418         (JSC::StructureStubInfo::deref):
3419         (JSC::StructureStubInfo::visitWeakReferences):
3420         * bytecode/StructureStubInfo.h:
3421         (JSC::StructureStubInfo::seenOnce):
3422         * jit/AccessorCallJITStubRoutine.cpp:
3423         (JSC::AccessorCallJITStubRoutine::~AccessorCallJITStubRoutine):
3424         (JSC::AccessorCallJITStubRoutine::visitWeak):
3425         * jit/AccessorCallJITStubRoutine.h:
3426         * jit/ExecutableAllocator.h:
3427         (JSC::ExecutableAllocator::makeWritable): Deleted.
3428         (JSC::ExecutableAllocator::makeExecutable): Deleted.
3429         (JSC::ExecutableAllocator::allocator): Deleted.
3430         * jit/JITStubRoutine.cpp:
3431         (JSC::JITStubRoutine::~JITStubRoutine):
3432         (JSC::JITStubRoutine::visitWeak):
3433         * jit/JITStubRoutine.h:
3434         * jit/PolymorphicCallStubRoutine.cpp:
3435         (JSC::PolymorphicCallNode::~PolymorphicCallNode):
3436         (JSC::PolymorphicCallNode::unlink):
3437         (JSC::PolymorphicCallStubRoutine::clearCallNodesFor):
3438         (JSC::PolymorphicCallStubRoutine::visitWeak):
3439         * jit/PolymorphicCallStubRoutine.h:
3440         (JSC::PolymorphicCallNode::hasCallLinkInfo):
3441         * jit/Repatch.cpp:
3442         (JSC::readCallTarget):
3443         (JSC::repatchCall):
3444         (JSC::repatchByIdSelfAccess):
3445         (JSC::tryCacheGetByID):
3446         (JSC::tryCachePutByID):
3447         (JSC::tryBuildPutByIdList):
3448         (JSC::revertCall):
3449         (JSC::unlinkFor):
3450         (JSC::linkVirtualFor):
3451         (JSC::linkPolymorphicCall):
3452         (JSC::resetGetByID):
3453         (JSC::resetPutByID):
3454         (JSC::resetIn):
3455         * jit/Repatch.h:
3456
3457 2015-09-02  Filip Pizlo  <fpizlo@apple.com>
3458
3459         Replace all the various forms of branchStructure() with a single method in AssemblyHelpers
3460         https://bugs.webkit.org/show_bug.cgi?id=148725
3461
3462         Reviewed by Saam Barati.
3463
3464         Previously there were the following branchStructure() implementations:
3465
3466         JSC::JIT::branchStructure()
3467         JSC::branchStructure()
3468         JSC::DFG::JITCompiler::branchStructurePtr()
3469
3470         They all did the same thing.  Now there is only one, AssemblyHelpers::branchStructure().
3471
3472         * dfg/DFGJITCompiler.h:
3473         (JSC::DFG::JITCompiler::branchWeakStructure):
3474         (JSC::DFG::JITCompiler::jitCode):
3475         (JSC::DFG::JITCompiler::branchStructurePtr): Deleted.
3476         * dfg/DFGSpeculativeJIT.cpp:
3477         (JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOnCell):
3478         (JSC::DFG::SpeculativeJIT::speculateStringOrStringObject):
3479         * dfg/DFGSpeculativeJIT.h:
3480         (JSC::DFG::SpeculativeJIT::speculateStringObjectForStructure):
3481         * jit/AssemblyHelpers.h:
3482         (JSC::AssemblyHelpers::branchIfEmpty):
3483         (JSC::AssemblyHelpers::branchStructure):
3484         (JSC::AssemblyHelpers::addressForByteOffset):
3485         * jit/JIT.h:
3486         * jit/JITInlines.h:
3487         (JSC::JIT::branchStructure): Deleted.
3488         (JSC::branchStructure): Deleted.
3489         * jit/JITPropertyAccess.cpp:
3490         (JSC::JIT::stringGetByValStubGenerator):
3491         * jit/JITPropertyAccess32_64.cpp:
3492         (JSC::JIT::stringGetByValStubGenerator):
3493         * jit/Repatch.cpp:
3494         (JSC::checkObjectPropertyCondition):
3495         (JSC::checkObjectPropertyConditions):
3496         (JSC::generateByIdStub):
3497         (JSC::emitPutReplaceStub):
3498         (JSC::emitPutTransitionStub):
3499         (JSC::tryRepatchIn):
3500         * jit/SpecializedThunkJIT.h:
3501         (JSC::SpecializedThunkJIT::loadJSStringArgument):
3502
3503 2015-09-02  Filip Pizlo  <fpizlo@apple.com>
3504
3505         Remove some unused methods from GetByIdAccess.
3506
3507         Rubber stamped by Michael Saboff.
3508
3509         * bytecode/PolymorphicGetByIdList.h:
3510         (JSC::GetByIdAccess::stubRoutine):
3511         (JSC::GetByIdAccess::doesCalls):
3512         (JSC::GetByIdAccess::isWatched): Deleted.
3513         (JSC::GetByIdAccess::isSimple): Deleted.
3514
3515 2015-09-02  Geoffrey Garen  <ggaren@apple.com>
3516
3517         Fix the no JIT build.
3518
3519         Unreviewed.
3520
3521         * heap/Heap.cpp:
3522         (JSC::Heap::markRoots):
3523
3524 2015-09-02  Geoffrey Garen  <ggaren@apple.com>
3525
3526         CodeBlock should have a more explicit "strongly referenced" state
3527         https://bugs.webkit.org/show_bug.cgi?id=148714
3528
3529         Reviewed by Filip Pizlo.
3530
3531         Previously, CodeBlock had a "may be executing" bit, which was used by
3532         both the stack visitor and the compiler to indicate "this CodeBlock must
3533         not jettison itself".
3534
3535         Now, CodeBlock has an explicit "is strongly referenced" bit to do the
3536         same.
3537
3538         For now, there is no behavior change. In future, I will use the "is
3539         strongly referenced" bit to indicate the set of all references that
3540         cause a CodeBlock not to jettison itself. Strong references and stack
3541         references will be different because:
3542
3543             (1) A stack reference requires a write barrier at the end of GC
3544             (since CodeBlocks only barrier themselves on function entry,
3545             and GC will clear that barrier); but a strong reference does not
3546             need or want a write barrier at the end of GC.
3547
3548             (2) Visiting more heap objects might reveal more strong references
3549             but, by definition, it cannot reveal more stack references.
3550
3551         Also, this patch adds an explicit mark clearing phase for compiler
3552         CodeBlocks, which does the work that would normally be done by a write
3553         barrier. A compiler CodeBlock can't rely on a normal write barrier 
3554         because the compiler writes to CodeBlocks without invoking a write
3555         barrier, and because the CodeBlock write barrier operates on an
3556         executable, but an in-flight compilation is not pointed to by any
3557         executable. This bug does not appear to be noticeable in the current
3558         system, but I will probably make it noticeable.
3559
3560         * bytecode/CodeBlock.cpp:
3561         (JSC::CodeBlock::CodeBlock):
3562         (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
3563         (JSC::CodeBlock::isKnownToBeLiveDuringGC):
3564         * bytecode/CodeBlock.h:
3565         (JSC::ExecState::uncheckedR):
3566         (JSC::CodeBlockSet::clearMarks):
3567         (JSC::CodeBlockSet::mark):
3568         * dfg/DFGPlan.cpp:
3569         (JSC::DFG::Plan::key):
3570         (JSC::DFG::Plan::clearCodeBlockMarks):
3571         (JSC::DFG::Plan::checkLivenessAndVisitChildren):
3572         * dfg/DFGPlan.h:
3573         * dfg/DFGWorklist.cpp:
3574         (JSC::DFG::Worklist::completeAllPlansForVM):
3575         (JSC::DFG::Worklist::clearCodeBlockMarks):
3576         (JSC::DFG::Worklist::suspendAllThreads):
3577         (JSC::DFG::Worklist::visitWeakReferences):
3578         (JSC::DFG::completeAllPlansForVM):
3579         (JSC::DFG::clearCodeBlockMarks):
3580         * dfg/DFGWorklist.h:
3581         (JSC::DFG::worklistForIndexOrNull):
3582         * heap/CodeBlockSet.cpp:
3583         (JSC::CodeBlockSet::clearMarksForFullCollection):
3584         (JSC::CodeBlockSet::clearMarksForEdenCollection):
3585         (JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
3586         (JSC::CodeBlockSet::traceMarked):
3587         (JSC::CodeBlockSet::rememberCurrentlyExecutingCodeBlocks):
3588         * heap/CodeBlockSet.h:
3589         * heap/Heap.cpp:
3590         (JSC::Heap::markRoots):
3591
3592 2015-09-01  Brian Burg  <bburg@apple.com>
3593
3594         Web Inspector: protocol generator should not allow non-boolean values for "optional" key
3595         https://bugs.webkit.org/show_bug.cgi?id=148679
3596
3597         Reviewed by Joseph Pecoraro.
3598
3599         In Python, the 'bool' type inherits from 'int'. In the runtime, True and False are
3600         just numbers to Python. So, the existing check for boolean literals was not quite right.
3601
3602         * inspector/scripts/codegen/models.py: Use isinstance instead.
3603         (TypeMember.__init__):
3604         (Parameter.__init__):
3605         * inspector/scripts/tests/expected/fail-on-number-typed-optional-parameter-flag.json-error: Added.
3606         * inspector/scripts/tests/expected/fail-on-number-typed-optional-type-member.json-error: Added.
3607         * inspector/scripts/tests/fail-on-number-typed-optional-parameter-flag.json: Added.
3608         * inspector/scripts/tests/fail-on-number-typed-optional-type-member.json: Added.
3609
3610 2015-09-01  Filip Pizlo  <fpizlo@apple.com>
3611
3612         DFG AI assertions about not having to do type checks at the point of a Known use kind are unsound
3613         https://bugs.webkit.org/show_bug.cgi?id=148649
3614
3615         Reviewed by Saam Barati.
3616
3617         We often generate IR like:
3618
3619         Check(Int32:@x)
3620         ...
3621         Foo(KnownInt32:@x)
3622
3623         It would be valid for any optimization that somehow proves the type of @x to remove the
3624         Check node entirely. But then, AI might fail on an assertion at Foo() because of the
3625         KnownInt32 use kind, if AI isn't smart enough to construct the same proof that the former
3626         optimization used for removing the Check.
3627
3628         The correct solution is to remove the compile-time assertions about Known use kinds
3629         having already been checked.
3630
3631         * dfg/DFGAbstractInterpreterInlines.h:
3632         (JSC::DFG::AbstractInterpreter<AbstractStateType>::verifyEdge):
3633
3634 2015-09-01  Brian Burg  <bburg@apple.com>
3635
3636         Web Inspector: tighten up lifetimes for InspectorController-owned objects; add brace initializers to agents
3637         https://bugs.webkit.org/show_bug.cgi?id=148612
3638
3639         Reviewed by Joseph Pecoraro.
3640
3641         Both InjectedScriptManager and AgentRegistry (thus all agents) are
3642         owned by JSGlobalObjectInspectorController. So, use references.
3643
3644         Add brace initalizers for scalar and pointer members in agent classes.
3645
3646         * inspector/ConsoleMessage.cpp:
3647         (Inspector::ConsoleMessage::addToFrontend):
3648         (Inspector::ConsoleMessage::updateRepeatCountInConsole):
3649         (Inspector::ConsoleMessage::ConsoleMessage):
3650         * inspector/ConsoleMessage.h:
3651         * inspector/JSGlobalObjectInspectorController.cpp:
3652         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
3653         * inspector/agents/InspectorAgent.cpp:
3654         (Inspector::InspectorAgent::InspectorAgent):
3655         * inspector/agents/InspectorAgent.h:
3656         * inspector/agents/InspectorConsoleAgent.cpp:
3657         (Inspector::InspectorConsoleAgent::InspectorConsoleAgent):
3658         (Inspector::InspectorConsoleAgent::enable):
3659         (Inspector::InspectorConsoleAgent::clearMessages):
3660         (Inspector::InspectorConsoleAgent::addMessageToConsole):
3661         (Inspector::InspectorConsoleAgent::addConsoleMessage):
3662         * inspector/agents/InspectorConsoleAgent.h:
3663         * inspector/agents/InspectorDebuggerAgent.cpp:
3664         (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
3665         (Inspector::InspectorDebuggerAgent::removeBreakpoint):
3666         (Inspector::InspectorDebuggerAgent::getFunctionDetails):
3667         (Inspector::InspectorDebuggerAgent::evaluateOnCallFrame):
3668         (Inspector::InspectorDebuggerAgent::didPause):
3669         (Inspector::InspectorDebuggerAgent::breakpointActionProbe):
3670         (Inspector::InspectorDebuggerAgent::didContinue):
3671         (Inspector::InspectorDebuggerAgent::clearExceptionValue):
3672         * inspector/agents/InspectorDebuggerAgent.h:
3673         * inspector/agents/InspectorRuntimeAgent.cpp:
3674         (Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
3675         (Inspector::InspectorRuntimeAgent::callFunctionOn):
3676         (Inspector::InspectorRuntimeAgent::getProperties):
3677         (Inspector::InspectorRuntimeAgent::getDisplayableProperties):
3678         (Inspector::InspectorRuntimeAgent::getCollectionEntries):
3679         (Inspector::InspectorRuntimeAgent::saveResult):
3680         (Inspector::InspectorRuntimeAgent::releaseObject):
3681         (Inspector::InspectorRuntimeAgent::releaseObjectGroup):
3682         * inspector/agents/InspectorRuntimeAgent.h:
3683         * inspector/agents/JSGlobalObjectConsoleAgent.cpp:
3684         (Inspector::JSGlobalObjectConsoleAgent::JSGlobalObjectConsoleAgent):
3685         * inspector/agents/JSGlobalObjectConsoleAgent.h:
3686         * inspector/agents/JSGlobalObjectDebuggerAgent.cpp:
3687         (Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent):
3688         (Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval):
3689         * inspector/agents/JSGlobalObjectDebuggerAgent.h:
3690         * inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
3691         (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent):
3692         (Inspector::JSGlobalObjectRuntimeAgent::injectedScriptForEval):
3693         * inspector/agents/JSGlobalObjectRuntimeAgent.h:
3694
3695 2015-08-31  Yusuke Suzuki  <utatane.tea@gmail.com>
3696
3697         [ES6] Introduce ModuleProgramExecutable families and compile Module code to bytecode
3698         https://bugs.webkit.org/show_bug.cgi?id=148581
3699
3700         Reviewed by Saam Barati.
3701
3702         This patch introduces ModuleProgramExecutable, that is new executable type for the ES6 modules.
3703         And related code block types, UninkedModuleProgramCodeBlock and ModuleProgramCodeBlock are also
3704         introduced. BytecodeGenerator now recognizes these types and emits the bytecode and constructs
3705         the symbol table for the module environment. While this patch introduces the bytecode generation
3706         for the ES6 modules, the module environment instantiation initialization and imported binding
3707         resolution are not included in this patch. They will be implemented in the subsequent patch.
3708
3709         The interesting part is the symbol table construction for the module environment.
3710         Since the module code will be only executed once, the module environment need not to be allocated
3711         and instantiated inside the module code; In the case of the function code, the function code need
3712         to allocate the environment inside the prologue of it because the function code can be executed
3713         more than once and the function environments are different in each time of the executions.
3714         The module environment will be instantiated outside the module code before executing the module code.
3715         This is required because we need to link the module environments to import the bindings before
3716         executing the any module code in the dependency graph. And this is because the function inside the
3717         module may be executed before the module top-level body is executed. (See the code comment for more
3718         detailed situations)
3719
3720         The module environment will hold the top-most heap allocated variables in the module code.
3721         This has the following benefits.
3722         1) This enables JSC to perform the usual LocalClosureVar operations onto it.
3723         2) It also makes the exported lexical variables just the heap allocated lexical variables.
3724         3) Make it possible to initialize the heap allocated function declarations before executing the module
3725            code. It is required under the circular dependency (see the code comment for more details).
3726
3727         To do so, the module environment will be constructed with the symbol table that is generated by the
3728         bytecode generator. And the symbol table is held by the unlinked code block. That means, once the module
3729         environment is instantiated, we cannot clear the unlinked code block before executing the module since
3730         the layout of the instantiated module environment is coupled with the unlinked code block. This is OK
3731         because the module code can be cleared once we executed the module code. If we failed to execute the
3732         module (some errors occur), we can throw away the both, the module environment and the unlinked code block.
3733
3734         The unlinked module program code block holds the symbol table, but it does not hold the module environment.
3735         So the unlinked module program code block can be cached. While unlinked code block can be cached, the linked
3736         code block cannot be cached because it is already linked to the specific set of the module environment to
3737         resolve the imported bindings.
3738
3739         * JavaScriptCore.xcodeproj/project.pbxproj:
3740         * bytecode/BytecodeList.json:
3741         * bytecode/CodeBlock.cpp:
3742         (JSC::CodeBlock::inferredName):
3743         (JSC::ModuleProgramCodeBlock::replacement):
3744         (JSC::ProgramCodeBlock::capabilityLevelInternal):
3745         (JSC::ModuleProgramCodeBlock::capabilityLevelInternal):
3746         * bytecode/CodeBlock.h:
3747         (JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock):
3748         (JSC::EvalCodeBlock::EvalCodeBlock):
3749         (JSC::FunctionCodeBlock::FunctionCodeBlock):
3750         * bytecode/CodeType.cpp:
3751         (WTF::printInternal):
3752         * bytecode/CodeType.h:
3753         * bytecode/UnlinkedCodeBlock.cpp:
3754         (JSC::UnlinkedModuleProgramCodeBlock::visitChildren):
3755         (JSC::UnlinkedModuleProgramCodeBlock::destroy):
3756         (JSC::UnlinkedCodeBlock::visitChildren): Deleted.
3757         * bytecode/UnlinkedCodeBlock.h:
3758         (JSC::UnlinkedCodeBlock::finishCreation): Deleted.
3759         * bytecompiler/BytecodeGenerator.cpp:
3760         (JSC::BytecodeGenerator::generate):
3761         (JSC::BytecodeGenerator::BytecodeGenerator):
3762         (JSC::BytecodeGenerator::instantiateLexicalVariables):
3763         (JSC::BytecodeGenerator::emitPrefillStackTDZVariables):
3764         (JSC::BytecodeGenerator::pushLexicalScopeInternal):
3765         * bytecompiler/BytecodeGenerator.h:
3766         * bytecompiler/NodesCodegen.cpp:
3767         (JSC::emitProgramNodeBytecode):
3768         (JSC::ProgramNode::emitBytecode):
3769         (JSC::ModuleProgramNode::emitBytecode):
3770         (JSC::ImportDeclarationNode::emitBytecode):
3771         (JSC::ExportAllDeclarationNode::emitBytecode):
3772         (JSC::ExportDefaultDeclarationNode::emitBytecode):
3773         (JSC::ExportLocalDeclarationNode::emitBytecode):
3774         (JSC::ExportNamedDeclarationNode::emitBytecode):
3775         * interpreter/Interpreter.cpp:
3776         (JSC::StackFrame::friendlySourceURL):
3777         (JSC::StackFrame::friendlyFunctionName):
3778         (JSC::getStackFrameCodeType):
3779         * interpreter/Interpreter.h:
3780         * interpreter/StackVisitor.cpp:
3781         (JSC::StackVisitor::Frame::codeType):
3782         (JSC::StackVisitor::Frame::functionName):
3783         (JSC::StackVisitor::Frame::sourceURL):
3784         * interpreter/StackVisitor.h:
3785         * jit/JIT.cpp:
3786         (JSC::JIT::privateCompile):
3787         * llint/LLIntData.cpp:
3788         (JSC::LLInt::Data::performAssertions):
3789         * llint/LLIntEntrypoint.cpp:
3790         (JSC::LLInt::setModuleProgramEntrypoint):
3791         (JSC::LLInt::setEntrypoint):
3792         * llint/LLIntOffsetsExtractor.cpp:
3793         * llint/LLIntThunks.cpp:
3794         (JSC::LLInt::moduleProgramEntryThunkGenerator):
3795         * llint/LLIntThunks.h:
3796         * llint/LowLevelInterpreter.asm:
3797         * parser/ModuleAnalyzer.cpp:
3798         (JSC::ModuleAnalyzer::exportVariable):
3799         * parser/Parser.cpp:
3800         (JSC::Parser<LexerType>::parseImportClauseItem):
3801         (JSC::Parser<LexerType>::parseExportDeclaration):
3802         * parser/Parser.h:
3803         (JSC::Scope::declareLexicalVariable):
3804         * parser/VariableEnvironment.h:
3805         (JSC::VariableEnvironmentEntry::isImportedNamespace):
3806         (JSC::VariableEnvironmentEntry::setIsImportedNamespace):
3807         (JSC::VariableEnvironment::find):
3808         * runtime/CodeCache.cpp:
3809         (JSC::CodeCache::getGlobalCodeBlock):
3810         (JSC::CodeCache::getModuleProgramCodeBlock):
3811         * runtime/CodeCache.h:
3812         * runtime/Executable.cpp:
3813         (JSC::ScriptExecutable::installCode):
3814         (JSC::ScriptExecutable::newCodeBlockFor):
3815         (JSC::ScriptExecutable::newReplacementCodeBlockFor):
3816         (JSC::ModuleProgramExecutable::ModuleProgramExecutable):
3817         (JSC::ModuleProgramExecutable::create):
3818         (JSC::ModuleProgramExecutable::destroy):
3819         (JSC::ModuleProgramExecutable::visitChildren):
3820         (JSC::ModuleProgramExecutable::clearCode):
3821         (JSC::ExecutableBase::dump):
3822         * runtime/Executable.h:
3823         (JSC::ExecutableBase::isModuleProgramExecutable):
3824         (JSC::ExecutableBase::clearCodeVirtual):
3825         * runtime/JSGlobalObject.cpp:
3826         (JSC::JSGlobalObject::createModuleProgramCodeBlock):
3827         * runtime/JSGlobalObject.h:
3828         * runtime/JSModuleRecord.cpp:
3829         (JSC::JSModuleRecord::visitChildren):
3830         (JSC::JSModuleRecord::link):
3831         * runtime/JSModuleRecord.h:
3832         (JSC::JSModuleRecord::moduleProgramExecutable):
3833         * runtime/JSType.h:
3834         * runtime/ModuleLoaderObject.cpp:
3835         (JSC::moduleLoaderObjectModuleDeclarationInstantiation):
3836         * runtime/VM.cpp:
3837         (JSC::VM::VM):
3838         * runtime/VM.h:
3839
3840 2015-08-31  Basile Clement  <basile_clement@apple.com>
3841
3842         Unreviewed, build fix after r189292
3843
3844         * bytecode/ValueRecovery.h:
3845         (JSC::ValueRecovery::jsValueRegs): Deleted.
3846
3847 2015-08-24  Basile Clement  <basile_clement@apple.com>
3848
3849         ValueRecovery should distinguish between doubles in an FPR and JSValues in an FPR
3850         https://bugs.webkit.org/show_bug.cgi?id=148336
3851
3852         Reviewed by Michael Saboff.
3853
3854         Currently, ValueRecovery::InFPR means "this is a *double* value in an
3855         FPR". Let's change the semantics to be "this is a *JSValue* in an FPR"
3856         (to match ValueRecovery::InGPR), and introduce
3857         ValueRecovery::UnboxedDoubleInFPR to mean "this is a double value in an
3858         FPR".
3859
3860         * bytecode/ValueRecovery.cpp:
3861         (JSC::ValueRecovery::dumpInContext):
3862         * bytecode/ValueRecovery.h:
3863         (JSC::ValueRecovery::operator bool):
3864         (JSC::ValueRecovery::inFPR):
3865         (JSC::ValueRecovery::isInGPR):
3866         (JSC::ValueRecovery::isInFPR):
3867         (JSC::ValueRecovery::isInRegisters):
3868         (JSC::ValueRecovery::isInJSStack):
3869         (JSC::ValueRecovery::dataFormat):
3870         (JSC::ValueRecovery::gpr):
3871         (JSC::ValueRecovery::isInJSValueRegs):
3872         (JSC::ValueRecovery::jsValueRegs):
3873         (JSC::ValueRecovery::fpr):
3874         (JSC::ValueRecovery::virtualRegister):
3875         (JSC::ValueRecovery::constant):
3876         * dfg/DFGOSRExitCompiler32_64.cpp:
3877         (JSC::DFG::OSRExitCompiler::compileExit):
3878         * dfg/DFGOSRExitCompiler64.cpp:
3879         (JSC::DFG::OSRExitCompiler::compileExit):
3880         * dfg/DFGVariableEventStream.cpp:
3881         (JSC::DFG::VariableEventStream::reconstruct):
3882
3883 2015-08-31  Chris Dumez  <cdumez@apple.com>
3884
3885         NodeFilter.SHOW_ALL has wrong value on 32-bit
3886         https://bugs.webkit.org/show_bug.cgi?id=148602
3887
3888         Reviewed by Geoffrey Garen.
3889
3890         NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
3891         NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
3892         our bindings code is casting it to an intptr_t type which is not wide
3893         enough on 32-bit.
3894
3895         * create_hash_table:
3896         Add extra curly brackets to initialize the union.
3897
3898         * runtime/Lookup.h:
3899         Use a union type to store either a struct containing 2 intptr_t members
3900         (value1 / value2) or a large constant of type unsigned long long. When
3901         storing a constant, we only need one of the values so this allows us to
3902         support larger constants without increasing the actual HashTableValue
3903         size.
3904
3905 2015-08-31  Mark Lam  <mark.lam@apple.com>
3906
3907         Watchdog timer callback should release the lock before deref'ing the watchdog.
3908         https://bugs.webkit.org/show_bug.cgi?id=148635
3909
3910         Reviewed by Filip Pizlo.