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