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