1 2015-09-06 Sukolsak Sakshuwong <sukolsak@gmail.com>
3 Simplify JIT::emit_op_mod()
4 https://bugs.webkit.org/show_bug.cgi?id=148908
6 Reviewed by Michael Saboff.
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.
14 * jit/JITArithmetic.cpp:
15 (JSC::JIT::emit_op_mod):
17 2015-09-05 Mark Lam <mark.lam@apple.com>
19 Fix JSDollarVMPrototype after r189160.
20 https://bugs.webkit.org/show_bug.cgi?id=148900
22 Reviewed by Michael Saboff.
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.
27 * tools/JSDollarVMPrototype.cpp:
28 (JSC::JSDollarVMPrototype::finishCreation):
30 2015-09-05 Yusuke Suzuki <utatane.tea@gmail.com>
32 Unreviewed, fix the module name resolution in Windows
33 https://bugs.webkit.org/show_bug.cgi?id=148689
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().
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.
43 (ModuleName::startsWithRoot):
44 (ModuleName::ModuleName):
46 (GlobalObject::moduleLoaderResolve):
48 2015-09-05 Brian Burg <bburg@apple.com>
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
53 Reviewed by Joseph Pecoraro.
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).
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.
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.
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:
111 2015-09-04 Brian Burg <bburg@apple.com>
113 Web Inspector: agents should send messages through FrontendRouter instead of FrontendChannel
114 https://bugs.webkit.org/show_bug.cgi?id=148492
116 Reviewed by Joseph Pecoraro.
118 Replace uses of FrontendChannel with FrontendRouter. Minor cleanups along the way.
120 Make AgentRegistry automatically signal discardAgent() in its destructor, since it always
121 gets executed in the owning controller's destructor anyway.
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):
168 2015-09-05 Yusuke Suzuki <utatane.tea@gmail.com>
170 [ES6] Enable ES6 Module in JSC shell by default
171 https://bugs.webkit.org/show_bug.cgi?id=148689
173 Reviewed by Geoffrey Garen.
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.
179 And add bunch of tests for ES6 Modules.
182 (GlobalObject::finishCreation):
183 (functionLoadModule):
185 (printUsageStatement): Deleted.
186 (CommandLine::parseArguments): Deleted.
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.
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.
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.
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:
337 2015-09-05 Yusuke Suzuki <utatane.tea@gmail.com>
339 [ES6] Implement ModuleNamespaceObject
340 https://bugs.webkit.org/show_bug.cgi?id=148705
342 Reviewed by Geoffrey Garen.
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
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:
382 2015-09-04 Mark Lam <mark.lam@apple.com>
384 Rollout r189411, r189413: Broke JSC tests.
388 * API/tests/PingPongStackOverflowTest.cpp: Removed.
389 * API/tests/PingPongStackOverflowTest.h: Removed.
390 * API/tests/testapi.c:
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:
419 (JSC::VM::exceptionOffset):
420 (JSC::VM::vmEntryFrameForThrowOffset):
421 (JSC::VM::topVMEntryFrameOffset):
422 (JSC::VM::callFrameForThrowOffset):
424 2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
426 Web Inspector: Test Runtime.saveResult and $n values
427 https://bugs.webkit.org/show_bug.cgi?id=148837
429 Reviewed by Timothy Hatcher.
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.
438 2015-09-04 Mark Lam <mark.lam@apple.com>
440 [Follow up] StackOverflow stack unwinding should stop at native frames.
441 https://bugs.webkit.org/show_bug.cgi?id=148749
443 Rubber stamped by Michael Saboff.
445 Speculative fix for jsc test failure.
447 * interpreter/Interpreter.cpp:
448 (JSC::Interpreter::unwind):
450 2015-09-04 Mark Lam <mark.lam@apple.com>
452 StackOverflow stack unwinding should stop at native frames.
453 https://bugs.webkit.org/show_bug.cgi?id=148749
455 Reviewed by Michael Saboff.
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
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
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.
472 Other supporting work:
473 1. Remove vm->vmEntryFrameForThrow. It should always be the same as
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.
482 * API/tests/PingPongStackOverflowTest.cpp: Added.
483 (PingPongStackOverflowObject_hasInstance):
484 (testPingPongStackOverflow):
485 * API/tests/PingPongStackOverflowTest.h: Added.
486 * API/tests/testapi.c:
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:
513 (JSC::VM::exceptionOffset):
514 (JSC::VM::callFrameForThrowOffset):
515 (JSC::VM::vmEntryFrameForThrowOffset): Deleted.
516 (JSC::VM::topVMEntryFrameOffset): Deleted.
518 2015-09-04 Sukolsak Sakshuwong <sukolsak@gmail.com>
520 Implement the division and modulo instructions in WebAssembly
521 https://bugs.webkit.org/show_bug.cgi?id=148791
523 Reviewed by Geoffrey Garen.
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
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:
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:
546 2015-09-04 Basile Clement <basile_clement@apple.com>
548 Fix debug output for an eval call
549 https://bugs.webkit.org/show_bug.cgi?id=148839
551 Reviewed by Filip Pizlo.
553 * jit/ThunkGenerators.cpp:
554 (JSC::virtualThunkFor):
556 2015-09-04 Sukolsak Sakshuwong <sukolsak@gmail.com>
558 Implement the signed division instruction in WebAssembly
559 https://bugs.webkit.org/show_bug.cgi?id=148772
561 Reviewed by Geoffrey Garen.
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.
569 * jit/JITOperations.cpp:
570 * jit/JITOperations.h:
571 * tests/stress/wasm-arithmetic.js:
574 * tests/stress/wasm-arithmetic.wasm:
575 * wasm/WASMFunctionCompiler.h:
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):
586 2015-09-04 Sukolsak Sakshuwong <sukolsak@gmail.com>
588 Implement the GetLocal and SetLocal instructions in WebAssembly
589 https://bugs.webkit.org/show_bug.cgi?id=148793
591 Reviewed by Saam Barati.
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.
597 * tests/stress/wasm-locals.js: Added.
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):
612 2015-09-04 Basile Clement <basile_clement@apple.com>
614 Unreviewed, add missing copyright to file from r189336
616 * bytecompiler/SetForScope.h:
618 2015-09-04 Brian Burg <bburg@apple.com>
620 Web Inspector: InspectorController should support multiple frontend channels
621 https://bugs.webkit.org/show_bug.cgi?id=148538
623 Reviewed by Joseph Pecoraro.
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.
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.
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.
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.
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:
697 2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
699 Web Inspector: Expand Console domain test coverage
700 https://bugs.webkit.org/show_bug.cgi?id=148740
702 Reviewed by Brian Burg.
704 * inspector/protocol/Console.json:
705 Update the description of this command now that it only
706 manipulates $0, and not $1, $2, .. $n.
708 2015-09-04 Joseph Pecoraro <pecoraro@apple.com>
710 Web Inspector: Test RuntimeAgent.parse, detecting if a script parse error is recoverable
711 https://bugs.webkit.org/show_bug.cgi?id=148790
713 Reviewed by Timothy Hatcher.
716 (JSC::Lexer<T>::lex):
718 (JSC::Parser<LexerType>::printUnexpectedTokenText):
719 * parser/ParserTokens.h:
720 More consistently name and treat unterminated numeric literals.
723 (JSC::Parser<LexerType>::parse):
724 Treat multiline capable unterminated literals as recoverable.
726 2015-08-25 Basile Clement <basile_clement@apple.com>
728 Get rid of FTLValueFormat
729 https://bugs.webkit.org/show_bug.cgi?id=148448
731 Reviewed by Michael Saboff.
733 FTL::ValueFormat is nothing more than DataFormat (and is actually
734 slightly less). Let's get rid of it.
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):
774 * ftl/FTLOSRExitCompiler.cpp:
775 (JSC::FTL::reboxAccordingToFormat):
776 (JSC::FTL::compileRecovery):
777 (JSC::FTL::compileStub):
778 * ftl/FTLValueFormat.cpp: Removed.
780 2015-09-04 Basile Clement <basile_clement@apple.com>
782 Introduce RegisterMap<T>
783 https://bugs.webkit.org/show_bug.cgi?id=148335
785 Reviewed by Michael Saboff.
787 Introduce RegisterMap<T>, GPRMap<T> and FPRMap<T> dense mappings for
788 Reg, GPRReg and FPRReg.
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[]):
798 2015-09-04 Andreas Kling <akling@apple.com>
800 Remove some unused functions from MarkedBlock and MarkedSpace.
801 <https://webkit.org/b/148748>
803 Reviewed by Darin Adler.
805 * ftl/FTLAbstractHeapRepository.h:
806 * heap/MarkedBlock.h:
807 (JSC::MarkedBlock::offsetOfMarks): Deleted.
808 (JSC::MarkedBlock::didConsumeEmptyFreeList): Deleted.
809 * heap/MarkedSpace.h:
811 2015-09-04 Basile Clement <basile_clement@apple.com>
813 Make a bunch of MacroAssembler operations constexpr
814 https://bugs.webkit.org/show_bug.cgi?id=148334
816 Reviewed by Saam Barati.
818 This is in preparation of https://bugs.webkit.org/show_bug.cgi?id=148335 .
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):
863 2015-08-24 Basile Clement <basile_clement@apple.com>
865 Add a bunch of operators
866 https://bugs.webkit.org/show_bug.cgi?id=148337
868 Reviewed by Saam Barati.
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!):
878 (JSC::Reg::operator bool):
880 2015-09-04 Basile Clement <basile_clement@apple.com>
882 Since r189341, es6.yaml/es6/arrow_functions_no_prototype_property.js is expected to succeed
884 Rubber stamped by Michael Saboff.
888 2015-09-04 Csaba Osztrogonác <ossy@webkit.org>
890 [ARM] Fix the ARM Traditional build after r189288
891 https://bugs.webkit.org/show_bug.cgi?id=148792
893 Reviewed by Zoltan Herczeg.
895 * assembler/MacroAssemblerARM.h: Make repatchCall public similar to changes in r189288.
896 (JSC::MacroAssemblerARM::repatchCall):
898 2015-09-03 Aleksandr Skachkov <gskachkov@gmail.com>
900 [ES6] Implement ES6 arrow function syntax. Prototype of arrow function should be undefined
901 https://bugs.webkit.org/show_bug.cgi?id=147742
903 Reviewed by Saam Barati.
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.
911 * runtime/JSFunction.cpp:
912 (JSC::JSFunction::getOwnPropertySlot):
913 (JSC::JSFunction::deleteProperty):
914 * tests/stress/arrowfunction-prototype.js: Added.
916 2015-09-03 Commit Queue <commit-queue@webkit.org>
918 Unreviewed, rolling out r189338.
919 https://bugs.webkit.org/show_bug.cgi?id=148785
921 Caused tons of crashes (Requested by cdumez on #webkit).
925 "Web Inspector: InspectorController should support multiple
927 https://bugs.webkit.org/show_bug.cgi?id=148538
928 http://trac.webkit.org/changeset/189338
930 2015-09-03 Yusuke Suzuki <utatane.tea@gmail.com>
932 [ES6] Instantiate Module Environment bindings and execute module
933 https://bugs.webkit.org/show_bug.cgi?id=148053
935 Reviewed by Saam Barati.
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.
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.
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].
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.
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.
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.
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.
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.)
971 [1]: https://bugs.webkit.org/show_bug.cgi?id=148705
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):
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):
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:
1082 2015-09-03 Brian Burg <bburg@apple.com>
1084 Web Inspector: InspectorController should support multiple frontend channels
1085 https://bugs.webkit.org/show_bug.cgi?id=148538
1087 Reviewed by Joseph Pecoraro.
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.
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.
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.
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.
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:
1161 2015-09-03 Basile Clement <basile_clement@apple.com>
1163 [ES6] Recognize calls in tail position
1164 https://bugs.webkit.org/show_bug.cgi?id=148665
1166 Reviewed by Saam Barati.
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
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
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:
1206 2015-08-11 Basile Clement <basile_clement@apple.com>
1208 Add more strict mode tests
1209 https://bugs.webkit.org/show_bug.cgi?id=147850
1211 Reviewed by Michael Saboff.
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.
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
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.
1230 2015-09-03 Geoffrey Garen <ggaren@apple.com>
1232 JavaScriptCore should have some ES6 conformance tests
1233 https://bugs.webkit.org/show_bug.cgi?id=148771
1235 Reviewed by Chris Dumez.
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/.
1241 * tests/es6.yaml: Added.
1242 * tests/es6/Array.prototype_methods_Array.prototype.copyWithin.js: Added.
1244 * tests/es6/Array.prototype_methods_Array.prototype.entries.js: Added.
1246 * tests/es6/Array.prototype_methods_Array.prototype.fill.js: Added.
1248 * tests/es6/Array.prototype_methods_Array.prototype.find.js: Added.
1250 * tests/es6/Array.prototype_methods_Array.prototype.findIndex.js: Added.
1252 * tests/es6/Array.prototype_methods_Array.prototype.keys.js: Added.
1254 * tests/es6/Array.prototype_methods_Array.prototype.values.js: Added.
1256 * tests/es6/Array.prototype_methods_Array.prototype[Symbol.iterator].js: Added.
1258 * tests/es6/Array.prototype_methods_Array.prototype[Symbol.unscopables].js: Added.
1260 * tests/es6/Array.prototype_methods_Array_iterator_prototype_chain.js: Added.
1262 * tests/es6/Array_is_subclassable_Array.from.js: Added.
1265 * tests/es6/Array_is_subclassable_Array.isArray_support.js: Added.
1268 * tests/es6/Array_is_subclassable_Array.of.js: Added.
1271 * tests/es6/Array_is_subclassable_Array.prototype.concat.js: Added.
1274 * tests/es6/Array_is_subclassable_Array.prototype.filter.js: Added.
1277 * tests/es6/Array_is_subclassable_Array.prototype.map.js: Added.
1280 * tests/es6/Array_is_subclassable_Array.prototype.slice.js: Added.
1283 * tests/es6/Array_is_subclassable_Array.prototype.splice.js: Added.
1286 * tests/es6/Array_is_subclassable_correct_prototype_chain.js: Added.
1289 * tests/es6/Array_is_subclassable_length_property_accessing.js: Added.
1292 * tests/es6/Array_is_subclassable_length_property_setting.js: Added.
1295 * tests/es6/Array_static_methods_Array.from_array-like_objects.js: Added.
1297 * tests/es6/Array_static_methods_Array.from_generator_instances.js: Added.
1300 * tests/es6/Array_static_methods_Array.from_generic_iterables.js: Added.
1302 * tests/es6/Array_static_methods_Array.from_instances_of_generic_iterables.js: Added.
1304 * tests/es6/Array_static_methods_Array.from_iterator_closing.js: Added.
1307 * tests/es6/Array_static_methods_Array.from_map_function_array-like_objects.js: Added.
1309 * tests/es6/Array_static_methods_Array.from_map_function_generator_instances.js: Added.
1312 * tests/es6/Array_static_methods_Array.from_map_function_generic_iterables.js: Added.
1314 * tests/es6/Array_static_methods_Array.from_map_function_instances_of_iterables.js: Added.
1316 * tests/es6/Array_static_methods_Array.of.js: Added.
1318 * tests/es6/Array_static_methods_Array[Symbol.species].js: Added.
1320 * tests/es6/Function_is_subclassable_Function.prototype.apply.js: Added.
1323 * tests/es6/Function_is_subclassable_Function.prototype.bind.js: Added.
1326 * tests/es6/Function_is_subclassable_Function.prototype.call.js: Added.
1329 * tests/es6/Function_is_subclassable_can_be_called.js: Added.
1332 * tests/es6/Function_is_subclassable_can_be_used_with_new.js: Added.
1335 * tests/es6/Function_is_subclassable_correct_prototype_chain.js: Added.
1338 * tests/es6/HTML-style_comments.js: Added.
1340 * tests/es6/Map_-0_key_converts_to_+0.js: Added.
1342 * tests/es6/Map_Map.prototype.clear.js: Added.
1344 * tests/es6/Map_Map.prototype.delete.js: Added.
1346 * tests/es6/Map_Map.prototype.entries.js: Added.
1348 * tests/es6/Map_Map.prototype.forEach.js: Added.
1350 * tests/es6/Map_Map.prototype.keys.js: Added.
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.
1356 * tests/es6/Map_Map.prototype[Symbol.iterator].js: Added.
1358 * tests/es6/Map_Map[Symbol.species].js: Added.
1360 * tests/es6/Map_Map_iterator_prototype_chain.js: Added.
1362 * tests/es6/Map_basic_functionality.js: Added.
1363 * tests/es6/Map_constructor_accepts_null.js: Added.
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.
1369 * tests/es6/Map_iterator_closing.js: Added.
1372 * tests/es6/Math_methods_Math.acosh.js: Added.
1374 * tests/es6/Math_methods_Math.asinh.js: Added.
1376 * tests/es6/Math_methods_Math.atanh.js: Added.
1378 * tests/es6/Math_methods_Math.cbrt.js: Added.
1380 * tests/es6/Math_methods_Math.clz32.js: Added.
1382 * tests/es6/Math_methods_Math.cosh.js: Added.
1384 * tests/es6/Math_methods_Math.expm1.js: Added.
1386 * tests/es6/Math_methods_Math.fround.js: Added.
1388 * tests/es6/Math_methods_Math.hypot.js: Added.
1390 * tests/es6/Math_methods_Math.imul.js: Added.
1392 * tests/es6/Math_methods_Math.log10.js: Added.
1394 * tests/es6/Math_methods_Math.log1p.js: Added.
1396 * tests/es6/Math_methods_Math.log2.js: Added.
1398 * tests/es6/Math_methods_Math.sign.js: Added.
1400 * tests/es6/Math_methods_Math.sinh.js: Added.
1402 * tests/es6/Math_methods_Math.tanh.js: Added.
1404 * tests/es6/Math_methods_Math.trunc.js: Added.
1406 * tests/es6/Number_properties_Number.EPSILON.js: Added.
1408 * tests/es6/Number_properties_Number.MAX_SAFE_INTEGER.js: Added.
1410 * tests/es6/Number_properties_Number.MIN_SAFE_INTEGER.js: Added.
1412 * tests/es6/Number_properties_Number.isFinite.js: Added.
1414 * tests/es6/Number_properties_Number.isInteger.js: Added.
1416 * tests/es6/Number_properties_Number.isNaN.js: Added.
1418 * tests/es6/Number_properties_Number.isSafeInteger.js: Added.
1420 * tests/es6/Object.prototype.__proto___absent_from_Object.createnull.js: Added.
1422 * tests/es6/Object.prototype.__proto___correct_property_descriptor.js: Added.
1425 * tests/es6/Object.prototype.__proto___get_prototype.js: Added.
1428 * tests/es6/Object.prototype.__proto___present_in_Object.getOwnPropertyNames.js: Added.
1430 * tests/es6/Object.prototype.__proto___present_in_hasOwnProperty.js: Added.
1432 * tests/es6/Object.prototype.__proto___set_prototype.js: Added.
1434 * tests/es6/Object_static_methods_Object.assign.js: Added.
1436 * tests/es6/Object_static_methods_Object.getOwnPropertySymbols.js: Added.
1438 * tests/es6/Object_static_methods_Object.is.js: Added.
1440 * tests/es6/Object_static_methods_Object.setPrototypeOf.js: Added.
1442 * tests/es6/Object_static_methods_accept_primitives_Object.freeze.js: Added.
1444 * tests/es6/Object_static_methods_accept_primitives_Object.getOwnPropertyDescriptor.js: Added.
1446 * tests/es6/Object_static_methods_accept_primitives_Object.getOwnPropertyNames.js: Added.
1448 * tests/es6/Object_static_methods_accept_primitives_Object.getPrototypeOf.js: Added.
1450 * tests/es6/Object_static_methods_accept_primitives_Object.isExtensible.js: Added.
1452 * tests/es6/Object_static_methods_accept_primitives_Object.isFrozen.js: Added.
1454 * tests/es6/Object_static_methods_accept_primitives_Object.isSealed.js: Added.
1456 * tests/es6/Object_static_methods_accept_primitives_Object.keys.js: Added.
1458 * tests/es6/Object_static_methods_accept_primitives_Object.preventExtensions.js: Added.
1460 * tests/es6/Object_static_methods_accept_primitives_Object.seal.js: Added.
1462 * tests/es6/Promise_Promise.all.js: Added.
1464 * tests/es6/Promise_Promise.all_generic_iterables.js: Added.
1466 * tests/es6/Promise_Promise.race.js: Added.
1468 * tests/es6/Promise_Promise.race_generic_iterables.js: Added.
1470 * tests/es6/Promise_Promise[Symbol.species].js: Added.
1472 * tests/es6/Promise_basic_functionality.js: Added.
1475 (test.shouldNotRun):
1477 * tests/es6/Promise_constructor_requires_new.js: Added.
1479 * tests/es6/Promise_is_subclassable_Promise.all.js: Added.
1482 * tests/es6/Promise_is_subclassable_Promise.race.js: Added.
1485 * tests/es6/Promise_is_subclassable_basic_functionality.js: Added.
1489 (test.shouldNotRun):
1490 * tests/es6/Promise_is_subclassable_correct_prototype_chain.js: Added.
1493 * tests/es6/Proxy_Array.isArray_support.js: Added.
1495 * tests/es6/Proxy_JSON.stringify_support.js: Added.
1497 * tests/es6/Proxy_Proxy.revocable.js: Added.
1501 * tests/es6/Proxy_apply_handler.js: Added.
1505 * tests/es6/Proxy_construct_handler.js: Added.
1509 * tests/es6/Proxy_constructor_requires_new.js: Added.
1511 * tests/es6/Proxy_defineProperty_handler.js: Added.
1514 * tests/es6/Proxy_deleteProperty_handler.js: Added.
1517 * tests/es6/Proxy_enumerate_handler.js: Added.
1520 * tests/es6/Proxy_getOwnPropertyDescriptor_handler.js: Added.
1523 * tests/es6/Proxy_getPrototypeOf_handler.js: Added.
1526 * tests/es6/Proxy_get_handler.js: Added.
1528 * tests/es6/Proxy_get_handler_instances_of_proxies.js: Added.
1530 * tests/es6/Proxy_has_handler.js: Added.
1533 * tests/es6/Proxy_has_handler_instances_of_proxies.js: Added.
1536 * tests/es6/Proxy_internal_defineProperty_calls_SetIntegrityLevel.js: Added.
1539 * tests/es6/Proxy_internal_defineProperty_calls_[[Set]].js: Added.
1542 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.copyWithin.js: Added.
1545 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.pop.js: Added.
1548 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.reverse.js: Added.
1551 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.shift.js: Added.
1554 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.splice.js: Added.
1557 * tests/es6/Proxy_internal_deleteProperty_calls_Array.prototype.unshift.js: Added.
1560 * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Function.prototype.bind.js: Added.
1563 * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Object.assign.js: Added.
1566 * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_Object.prototype.hasOwnProperty.js: Added.
1569 * tests/es6/Proxy_internal_getOwnPropertyDescriptor_calls_[[Set]].js: Added.
1572 * tests/es6/Proxy_internal_get_calls_Array.from.js: Added.
1575 * tests/es6/Proxy_internal_get_calls_Array.prototype.concat.js: Added.
1578 * tests/es6/Proxy_internal_get_calls_Array.prototype.pop.js: Added.
1581 * tests/es6/Proxy_internal_get_calls_Array.prototype.reverse.js: Added.
1584 * tests/es6/Proxy_internal_get_calls_Array.prototype.shift.js: Added.
1587 * tests/es6/Proxy_internal_get_calls_Array.prototype.splice.js: Added.
1590 * tests/es6/Proxy_internal_get_calls_Array.prototype.toString.js: Added.
1593 * tests/es6/Proxy_internal_get_calls_Array.prototype_iteration_methods.js: Added.
1596 * tests/es6/Proxy_internal_get_calls_ClassDefinitionEvaluation.js: Added.
1600 * tests/es6/Proxy_internal_get_calls_CreateDynamicFunction.js: Added.
1603 * tests/es6/Proxy_internal_get_calls_CreateListFromArrayLike.js: Added.
1606 (test.get Function):
1607 * tests/es6/Proxy_internal_get_calls_Date.prototype.toJSON.js: Added.
1610 * tests/es6/Proxy_internal_get_calls_Error.prototype.toString.js: Added.
1613 * tests/es6/Proxy_internal_get_calls_Function.prototype.bind.js: Added.
1616 * tests/es6/Proxy_internal_get_calls_HasBinding.js: Added.
1620 * tests/es6/Proxy_internal_get_calls_IteratorComplete_IteratorValue.js: Added.
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.
1628 * tests/es6/Proxy_internal_get_calls_Object.assign.js: Added.
1632 * tests/es6/Proxy_internal_get_calls_Object.defineProperties.js: Added.
1636 * tests/es6/Proxy_internal_get_calls_Promise_resolve_functions.js: Added.
1640 * tests/es6/Proxy_internal_get_calls_RegExp.prototype.flags.js: Added.
1643 * tests/es6/Proxy_internal_get_calls_RegExp.prototype.test.js: Added.
1644 (test.get var.p.new.Proxy):
1647 * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.match].js: Added.
1648 (test.get var.p.new.Proxy):
1651 * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.replace].js: Added.
1652 (test.get var.p.new.Proxy):
1655 * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.search].js: Added.
1656 (test.get var.p.new.Proxy):
1659 * tests/es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.split].js: Added.
1663 * tests/es6/Proxy_internal_get_calls_RegExp_constructor.js: Added.
1666 * tests/es6/Proxy_internal_get_calls_String.prototype.match.js: Added.
1669 * tests/es6/Proxy_internal_get_calls_String.prototype.replace.js: Added.
1672 * tests/es6/Proxy_internal_get_calls_String.prototype.search.js: Added.
1675 * tests/es6/Proxy_internal_get_calls_String.prototype.split.js: Added.
1678 * tests/es6/Proxy_internal_get_calls_String.raw.js: Added.
1681 * tests/es6/Proxy_internal_get_calls_ToPrimitive.js: Added.
1684 * tests/es6/Proxy_internal_get_calls_ToPropertyDescriptor.js: Added.
1688 * tests/es6/Proxy_internal_get_calls_instanceof_operator.js: Added.
1691 * tests/es6/Proxy_internal_ownKeys_calls_SerializeJSONObject.js: Added.
1694 * tests/es6/Proxy_internal_ownKeys_calls_SetIntegrityLevel.js: Added.
1697 * tests/es6/Proxy_internal_ownKeys_calls_TestIntegrityLevel.js: Added.
1700 * tests/es6/Proxy_internal_set_calls_Array.from.js: Added.
1704 * tests/es6/Proxy_internal_set_calls_Array.of.js: Added.
1708 * tests/es6/Proxy_internal_set_calls_Array.prototype.copyWithin.js: Added.
1711 * tests/es6/Proxy_internal_set_calls_Array.prototype.fill.js: Added.
1714 * tests/es6/Proxy_internal_set_calls_Array.prototype.pop.js: Added.
1717 * tests/es6/Proxy_internal_set_calls_Array.prototype.push.js: Added.
1720 * tests/es6/Proxy_internal_set_calls_Array.prototype.reverse.js: Added.
1723 * tests/es6/Proxy_internal_set_calls_Array.prototype.shift.js: Added.
1726 * tests/es6/Proxy_internal_set_calls_Array.prototype.splice.js: Added.
1729 * tests/es6/Proxy_internal_set_calls_Array.prototype.unshift.js: Added.
1732 * tests/es6/Proxy_internal_set_calls_Object.assign.js: Added.
1736 * tests/es6/Proxy_isExtensible_handler.js: Added.
1739 * tests/es6/Proxy_ownKeys_handler.js: Added.
1742 * tests/es6/Proxy_preventExtensions_handler.js: Added.
1745 * tests/es6/Proxy_setPrototypeOf_handler.js: Added.
1748 * tests/es6/Proxy_set_handler.js: Added.
1750 * tests/es6/Proxy_set_handler_instances_of_proxies.js: Added.
1752 * tests/es6/Reflect_Reflect.apply.js: Added.
1754 * tests/es6/Reflect_Reflect.construct.js: Added.
1756 * tests/es6/Reflect_Reflect.construct_creates_instance_from_newTarget_argument.js: Added.
1759 * tests/es6/Reflect_Reflect.construct_sets_new.target_meta_property.js: Added.
1761 * tests/es6/Reflect_Reflect.defineProperty.js: Added.
1763 * tests/es6/Reflect_Reflect.deleteProperty.js: Added.
1765 * tests/es6/Reflect_Reflect.enumerate.js: Added.
1767 * tests/es6/Reflect_Reflect.get.js: Added.
1768 * tests/es6/Reflect_Reflect.getOwnPropertyDescriptor.js: Added.
1770 * tests/es6/Reflect_Reflect.getPrototypeOf.js: Added.
1772 * tests/es6/Reflect_Reflect.has.js: Added.
1774 * tests/es6/Reflect_Reflect.isExtensible.js: Added.
1776 * tests/es6/Reflect_Reflect.ownKeys_string_keys.js: Added.
1778 * tests/es6/Reflect_Reflect.ownKeys_symbol_keys.js: Added.
1780 * tests/es6/Reflect_Reflect.preventExtensions.js: Added.
1782 * tests/es6/Reflect_Reflect.set.js: Added.
1783 * tests/es6/Reflect_Reflect.setPrototypeOf.js: Added.
1785 * tests/es6/RegExp.prototype.compile.js: Added.
1787 * tests/es6/RegExp.prototype_properties_RegExp.prototype.flags.js: Added.
1789 * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.match].js: Added.
1791 * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.replace].js: Added.
1793 * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.search].js: Added.
1795 * tests/es6/RegExp.prototype_properties_RegExp.prototype[Symbol.split].js: Added.
1797 * tests/es6/RegExp.prototype_properties_RegExp[Symbol.species].js: Added.
1799 * tests/es6/RegExp_is_subclassable_RegExp.prototype.exec.js: Added.
1802 * tests/es6/RegExp_is_subclassable_RegExp.prototype.test.js: Added.
1805 * tests/es6/RegExp_is_subclassable_basic_functionality.js: Added.
1808 * tests/es6/RegExp_is_subclassable_correct_prototype_chain.js: Added.
1811 * tests/es6/RegExp_syntax_extensions_hyphens_in_character_sets.js: Added.
1813 * tests/es6/RegExp_syntax_extensions_incomplete_patterns_and_quantifiers.js: Added.
1814 * tests/es6/RegExp_syntax_extensions_invalid_Unicode_escapes.js: Added.
1816 * tests/es6/RegExp_syntax_extensions_invalid_backreferences_become_octal_escapes.js: Added.
1818 * tests/es6/RegExp_syntax_extensions_invalid_character_escapes.js: Added.
1820 * tests/es6/RegExp_syntax_extensions_invalid_control-character_escapes.js: Added.
1822 * tests/es6/RegExp_syntax_extensions_invalid_hexadecimal_escapes.js: Added.
1824 * tests/es6/RegExp_syntax_extensions_octal_escape_sequences.js: Added.
1826 * tests/es6/RegExp_y_and_u_flags_u_flag.js: Added.
1828 * tests/es6/RegExp_y_and_u_flags_u_flag_Unicode_code_point_escapes.js: Added.
1830 * tests/es6/RegExp_y_and_u_flags_y_flag.js: Added.
1832 * tests/es6/RegExp_y_and_u_flags_y_flag_lastIndex.js: Added.
1834 * tests/es6/Set_-0_key_converts_to_+0.js: Added.
1836 * tests/es6/Set_Set.prototype.add_returns_this.js: Added.
1837 * tests/es6/Set_Set.prototype.clear.js: Added.
1839 * tests/es6/Set_Set.prototype.delete.js: Added.
1841 * tests/es6/Set_Set.prototype.entries.js: Added.
1843 * tests/es6/Set_Set.prototype.forEach.js: Added.
1845 * tests/es6/Set_Set.prototype.keys.js: Added.
1847 * tests/es6/Set_Set.prototype.size.js: Added.
1848 * tests/es6/Set_Set.prototype.values.js: Added.
1850 * tests/es6/Set_Set.prototype[Symbol.iterator].js: Added.
1852 * tests/es6/Set_Set[Symbol.species].js: Added.
1854 * tests/es6/Set_Set_iterator_prototype_chain.js: Added.
1856 * tests/es6/Set_basic_functionality.js: Added.
1857 * tests/es6/Set_constructor_accepts_null.js: Added.
1859 * tests/es6/Set_constructor_arguments.js: Added.
1860 * tests/es6/Set_constructor_invokes_add.js: Added.
1861 (test.Set.prototype.add):
1863 * tests/es6/Set_constructor_requires_new.js: Added.
1865 * tests/es6/Set_iterator_closing.js: Added.
1867 (test.Set.prototype.add):
1869 * tests/es6/String.prototype_HTML_methods_existence.js: Added.
1871 * tests/es6/String.prototype_HTML_methods_quotes_in_arguments_are_escaped.js: Added.
1873 * tests/es6/String.prototype_HTML_methods_tags_names_are_lowercase.js: Added.
1875 * tests/es6/String.prototype_methods_String.prototype.codePointAt.js: Added.
1877 * tests/es6/String.prototype_methods_String.prototype.endsWith.js: Added.
1879 * tests/es6/String.prototype_methods_String.prototype.includes.js: Added.
1881 * tests/es6/String.prototype_methods_String.prototype.normalize.js: Added.
1883 * tests/es6/String.prototype_methods_String.prototype.repeat.js: Added.
1885 * tests/es6/String.prototype_methods_String.prototype.startsWith.js: Added.
1887 * tests/es6/String.prototype_methods_String.prototype[Symbol.iterator].js: Added.
1889 * tests/es6/String.prototype_methods_String_iterator_prototype_chain.js: Added.
1891 * tests/es6/String_static_methods_String.fromCodePoint.js: Added.
1893 * tests/es6/String_static_methods_String.raw.js: Added.
1895 * tests/es6/Symbol_JSON.stringify_ignores_symbols.js: Added.
1897 * tests/es6/Symbol_Object.defineProperty_support.js: Added.
1899 * tests/es6/Symbol_Objectsymbol.js: Added.
1901 * tests/es6/Symbol_basic_functionality.js: Added.
1903 * tests/es6/Symbol_can_convert_with_String.js: Added.
1905 * tests/es6/Symbol_cannot_coerce_to_string_or_number.js: Added.
1907 * tests/es6/Symbol_global_symbol_registry.js: Added.
1909 * tests/es6/Symbol_new_Symbol_throws.js: Added.
1911 * tests/es6/Symbol_symbol_keys_are_hidden_to_pre-ES6_code.js: Added.
1913 * tests/es6/Symbol_typeof_support.js: Added.
1915 * tests/es6/Unicode_code_point_escapes_in_identifiers.js: Added.
1917 * tests/es6/Unicode_code_point_escapes_in_strings.js: Added.
1919 * tests/es6/WeakMap_WeakMap.prototype.delete.js: Added.
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.
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.
1929 * tests/es6/WeakMap_frozen_objects_as_keys.js: Added.
1930 * tests/es6/WeakMap_iterator_closing.js: Added.
1933 * tests/es6/WeakMap_no_WeakMap.prototype.clear_method.js: Added.
1934 * tests/es6/WeakSet_WeakSet.prototype.add_returns_this.js: Added.
1936 * tests/es6/WeakSet_WeakSet.prototype.delete.js: Added.
1938 * tests/es6/WeakSet_basic_functionality.js: Added.
1940 * tests/es6/WeakSet_constructor_accepts_null.js: Added.
1942 * tests/es6/WeakSet_constructor_arguments.js: Added.
1944 * tests/es6/WeakSet_constructor_invokes_add.js: Added.
1945 (test.WeakSet.prototype.add):
1947 * tests/es6/WeakSet_constructor_requires_new.js: Added.
1949 * tests/es6/WeakSet_iterator_closing.js: Added.
1952 * tests/es6/WeakSet_no_WeakSet.prototype.clear_method.js: Added.
1954 * tests/es6/__proto___in_object_literals_basic_support.js: Added.
1956 * tests/es6/__proto___in_object_literals_multiple___proto___is_an_error.js: Added.
1958 * tests/es6/__proto___in_object_literals_not_a_computed_property.js: Added.
1960 * tests/es6/__proto___in_object_literals_not_a_shorthand_method.js: Added.
1962 * tests/es6/__proto___in_object_literals_not_a_shorthand_property.js: Added.
1964 * tests/es6/arrow_functions_0_parameters.js: Added.
1966 * tests/es6/arrow_functions_1_parameter_no_brackets.js: Added.
1968 * tests/es6/arrow_functions_cant_be_bound_can_be_curried.js: Added.
1971 * tests/es6/arrow_functions_correct_precedence.js: Added.
1973 * tests/es6/arrow_functions_lexical_arguments_binding.js: Added.
1976 * tests/es6/arrow_functions_lexical_new.target_binding.js: Added.
1979 * tests/es6/arrow_functions_lexical_super_binding.js: Added.
1980 (test.B.prototype.qux):
1982 (test.C.prototype.baz):
1985 * tests/es6/arrow_functions_lexical_this_binding.js: Added.
1988 * tests/es6/arrow_functions_multiple_parameters.js: Added.
1990 * tests/es6/arrow_functions_no_line_break_between_params_and_code_=_code.js: Added.
1992 * tests/es6/arrow_functions_no_prototype_property.js: Added.
1994 * tests/es6/arrow_functions_this_unchanged_by_call_or_apply.js: Added.
1997 * tests/es6/block-level_function_declaration.js: Added.
2000 * tests/es6/class_accessor_properties.js: Added.
2001 (test.C.prototype.get foo):
2002 (test.C.prototype.set bar):
2005 * tests/es6/class_anonymous_class.js: Added.
2006 * tests/es6/class_class_expression.js: Added.
2007 (test.return.typeof.C):
2009 * tests/es6/class_class_name_is_lexically_scoped.js: Added.
2010 (test.C.prototype.method):
2013 * tests/es6/class_class_statement.js: Added.
2016 * tests/es6/class_computed_accessor_properties.js: Added.
2017 (test.C.prototype.get garply):
2018 (test.C.prototype.set grault):
2021 * tests/es6/class_computed_names_temporal_dead_zone.js: Added.
2022 (test.try.B.prototype.C):
2025 * tests/es6/class_computed_prototype_methods.js: Added.
2026 (test.C.prototype.foo):
2029 * tests/es6/class_computed_static_accessor_properties.js: Added.
2030 (test.C.prototype.get garply):
2031 (test.C.prototype.set grault):
2034 * tests/es6/class_computed_static_methods.js: Added.
2038 * tests/es6/class_constructor.js: Added.
2041 * tests/es6/class_constructor_requires_new.js: Added.
2044 * tests/es6/class_extends.js: Added.
2048 * tests/es6/class_extends_expressions.js: Added.
2051 * tests/es6/class_extends_null.js: Added.
2054 * tests/es6/class_implicit_strict_mode.js: Added.
2058 * tests/es6/class_is_block-scoped.js: Added.
2061 * tests/es6/class_methods_arent_enumerable.js: Added.
2062 (test.C.prototype.foo):
2066 * tests/es6/class_new.target.js: Added.
2071 * tests/es6/class_prototype_methods.js: Added.
2072 (test.C.prototype.method):
2075 * tests/es6/class_static_accessor_properties.js: Added.
2076 (test.C.prototype.get foo):
2077 (test.C.prototype.set bar):
2080 * tests/es6/class_static_methods.js: Added.
2084 * tests/es6/class_string-keyed_methods.js: Added.
2085 (test.C.prototype.string_appeared_here):
2088 * tests/es6/const_basic_support.js: Added.
2090 * tests/es6/const_basic_support_strict_mode.js: Added.
2092 * tests/es6/const_is_block-scoped.js: Added.
2094 * tests/es6/const_is_block-scoped_strict_mode.js: Added.
2096 * tests/es6/const_redefining_a_const_is_an_error.js: Added.
2098 * tests/es6/const_redefining_a_const_strict_mode.js: Added.
2100 * tests/es6/const_temporal_dead_zone.js: Added.
2103 * tests/es6/const_temporal_dead_zone_strict_mode.js: Added.
2106 * tests/es6/default_function_parameters_arguments_object_interaction.js: Added.
2108 * tests/es6/default_function_parameters_basic_functionality.js: Added.
2110 * tests/es6/default_function_parameters_defaults_can_refer_to_previous_params.js: Added.
2112 * tests/es6/default_function_parameters_explicit_undefined_defers_to_the_default.js: Added.
2114 * tests/es6/default_function_parameters_new_Function_support.js: Added.
2116 * tests/es6/default_function_parameters_separate_scope.js: Added.
2119 * tests/es6/default_function_parameters_temporal_dead_zone.js: Added.
2121 * tests/es6/destructuring_chained_iterable_destructuring.js: Added.
2123 * tests/es6/destructuring_chained_object_destructuring.js: Added.
2125 * tests/es6/destructuring_computed_properties.js: Added.
2127 * tests/es6/destructuring_defaults.js: Added.
2129 * tests/es6/destructuring_defaults_in_parameters.js: Added.
2131 * tests/es6/destructuring_defaults_in_parameters_new_Function_support.js: Added.
2133 * tests/es6/destructuring_defaults_in_parameters_separate_scope.js: Added.
2136 * tests/es6/destructuring_defaults_let_temporal_dead_zone.js: Added.
2138 * tests/es6/destructuring_empty_patterns.js: Added.
2140 * tests/es6/destructuring_empty_patterns_in_parameters.js: Added.
2142 * tests/es6/destructuring_in_for-in_loop_heads.js: Added.
2144 * tests/es6/destructuring_in_for-of_loop_heads.js: Added.
2146 * tests/es6/destructuring_in_parameters.js: Added.
2148 * tests/es6/destructuring_in_parameters_arguments_interaction.js: Added.
2150 * tests/es6/destructuring_in_parameters_function_length_property.js: Added.
2152 * tests/es6/destructuring_in_parameters_new_Function_support.js: Added.
2154 * tests/es6/destructuring_iterable_destructuring_expression.js: Added.
2156 * tests/es6/destructuring_iterator_closing.js: Added.
2159 * tests/es6/destructuring_multiples_in_a_single_var_statement.js: Added.
2161 * tests/es6/destructuring_nested.js: Added.
2163 * tests/es6/destructuring_nested_rest.js: Added.
2165 * tests/es6/destructuring_object_destructuring_expression.js: Added.
2167 * tests/es6/destructuring_object_destructuring_with_primitives.js: Added.
2169 * tests/es6/destructuring_parenthesised_left-hand-side_is_a_syntax_error.js: Added.
2171 * tests/es6/destructuring_rest.js: Added.
2173 * tests/es6/destructuring_throws_on_null_and_undefined.js: Added.
2175 * tests/es6/destructuring_trailing_commas_in_iterable_patterns.js: Added.
2177 * tests/es6/destructuring_trailing_commas_in_object_patterns.js: Added.
2179 * tests/es6/destructuring_with_arrays.js: Added.
2181 * tests/es6/destructuring_with_astral_plane_strings.js: Added.
2183 * tests/es6/destructuring_with_generator_instances.js: Added.
2187 * tests/es6/destructuring_with_generic_iterables.js: Added.
2189 * tests/es6/destructuring_with_instances_of_generic_iterables.js: Added.
2191 * tests/es6/destructuring_with_objects.js: Added.
2193 * tests/es6/destructuring_with_sparse_arrays.js: Added.
2195 * tests/es6/destructuring_with_strings.js: Added.
2197 * tests/es6/for..of_loops_iterator_closing_break.js: Added.
2200 * tests/es6/for..of_loops_iterator_closing_throw.js: Added.
2203 * tests/es6/for..of_loops_with_arrays.js: Added.
2205 * tests/es6/for..of_loops_with_astral_plane_strings.js: Added.
2207 * tests/es6/for..of_loops_with_generator_instances.js: Added.
2210 * tests/es6/for..of_loops_with_generic_iterables.js: Added.
2212 * tests/es6/for..of_loops_with_instances_of_generic_iterables.js: Added.
2214 * tests/es6/for..of_loops_with_sparse_arrays.js: Added.
2216 * tests/es6/for..of_loops_with_strings.js: Added.
2218 * tests/es6/function_name_property_accessor_properties.js: Added.
2221 * tests/es6/function_name_property_bound_functions.js: Added.
2224 * tests/es6/function_name_property_class_expressions.js: Added.
2226 (test.name.string_appeared_here.typeof.bar.name):
2227 (test.name.string_appeared_here.typeof.bar):
2229 * tests/es6/function_name_property_class_prototype_methods.js: Added.
2230 (test.C.prototype.foo):
2233 * tests/es6/function_name_property_class_statements.js: Added.
2238 * tests/es6/function_name_property_class_static_methods.js: Added.
2242 * tests/es6/function_name_property_function_expressions.js: Added.
2244 * tests/es6/function_name_property_function_statements.js: Added.
2247 * tests/es6/function_name_property_isnt_writable_is_configurable.js: Added.
2249 * tests/es6/function_name_property_new_Function.js: Added.
2251 * tests/es6/function_name_property_object_methods_class.js: Added.
2253 * tests/es6/function_name_property_object_methods_function.js: Added.
2258 * tests/es6/function_name_property_shorthand_methods.js: Added.
2260 * tests/es6/function_name_property_shorthand_methods_no_lexical_binding.js: Added.
2262 * tests/es6/function_name_property_symbol-keyed_methods.js: Added.
2266 * tests/es6/function_name_property_variables_class.js: Added.
2269 * tests/es6/function_name_property_variables_function.js: Added.
2273 * tests/es6/generators_%GeneratorPrototype%.constructor.js: Added.
2276 * tests/es6/generators_%GeneratorPrototype%.js: Added.
2279 * tests/es6/generators_%GeneratorPrototype%.return.js: Added.
2282 * tests/es6/generators_%GeneratorPrototype%.throw.js: Added.
2285 * tests/es6/generators_basic_functionality.js: Added.
2288 * tests/es6/generators_cant_use_this_with_new.js: Added.
2291 * tests/es6/generators_computed_shorthand_generators.js: Added.
2293 * tests/es6/generators_computed_shorthand_generators_classes.js: Added.
2294 (test.C.prototype.garply):
2297 * tests/es6/generators_correct_this_binding.js: Added.
2300 * tests/es6/generators_generator_function_expressions.js: Added.
2303 * tests/es6/generators_sending.js: Added.
2306 * tests/es6/generators_shorthand_generator_methods.js: Added.
2308 * tests/es6/generators_shorthand_generator_methods_classes.js: Added.
2309 (test.C.prototype.generator):
2312 * tests/es6/generators_string-keyed_shorthand_generator_methods.js: Added.
2314 * tests/es6/generators_yield_*_arrays.js: Added.
2317 * tests/es6/generators_yield_*_astral_plane_strings.js: Added.
2320 * tests/es6/generators_yield_*_generator_instances.js: Added.
2323 * tests/es6/generators_yield_*_generic_iterables.js: Added.
2326 * tests/es6/generators_yield_*_instances_of_iterables.js: Added.
2329 * tests/es6/generators_yield_*_iterator_closing.js: Added.
2333 * tests/es6/generators_yield_*_iterator_closing_via_throw.js: Added.
2337 * tests/es6/generators_yield_*_on_non-iterables_is_a_runtime_error.js: Added.
2340 * tests/es6/generators_yield_*_sparse_arrays.js: Added.
2343 * tests/es6/generators_yield_*_strings.js: Added.
2346 * tests/es6/generators_yield_operator_precedence.js: Added.
2349 * tests/es6/let_basic_support.js: Added.
2351 * tests/es6/let_basic_support_strict_mode.js: Added.
2353 * tests/es6/let_for-loop_iteration_scope.js: Added.
2355 * tests/es6/let_for-loop_iteration_scope_strict_mode.js: Added.
2357 * tests/es6/let_for-loop_statement_scope.js: Added.
2359 * tests/es6/let_for-loop_statement_scope_strict_mode.js: Added.
2361 * tests/es6/let_is_block-scoped.js: Added.
2363 * tests/es6/let_is_block-scoped_strict_mode.js: Added.
2365 * tests/es6/let_temporal_dead_zone.js: Added.
2368 * tests/es6/let_temporal_dead_zone_strict_mode.js: Added.
2371 * tests/es6/miscellaneous_Invalid_Date.js: Added.
2373 * tests/es6/miscellaneous_RegExp_constructor_can_alter_flags.js: Added.
2375 * tests/es6/miscellaneous_String.prototype_case_methods_Unicode_support.js: Added.
2377 * tests/es6/miscellaneous_accessors_arent_constructors.js: Added.
2380 * tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js: Added.
2382 * tests/es6/miscellaneous_duplicate_property_names_in_strict_mode.js: Added.
2384 * tests/es6/miscellaneous_function_length_is_configurable.js: Added.
2387 * tests/es6/miscellaneous_no_assignments_allowed_in_for-in_head.js: Added.
2389 * tests/es6/miscellaneous_no_escaped_reserved_words_as_identifiers.js: Added.
2391 * tests/es6/miscellaneous_no_semicolon_needed_after_do-while.js: Added.
2393 * tests/es6/miscellaneous_subclassables_Boolean_is_subclassable.js: Added.
2396 * tests/es6/miscellaneous_subclassables_Map_is_subclassable.js: Added.
2398 * tests/es6/miscellaneous_subclassables_Number_is_subclassable.js: Added.
2401 * tests/es6/miscellaneous_subclassables_Set_is_subclassable.js: Added.
2403 * tests/es6/miscellaneous_subclassables_String_is_subclassable.js: Added.
2406 * tests/es6/new.target_assignment_is_an_early_error.js: Added.
2409 * tests/es6/new.target_in_constructors.js: Added.
2412 * tests/es6/non-strict_function_semantics_function_statements_in_if-statement_clauses.js: Added.
2419 * tests/es6/non-strict_function_semantics_hoisted_block-level_function_declaration.js: Added.
2424 * tests/es6/non-strict_function_semantics_labeled_function_statements.js: Added.
2427 * tests/es6/object_literal_extensions_computed_accessors.js: Added.
2431 * tests/es6/object_literal_extensions_computed_properties.js: Added.
2433 * tests/es6/object_literal_extensions_computed_shorthand_methods.js: Added.
2435 * tests/es6/object_literal_extensions_shorthand_methods.js: Added.
2437 * tests/es6/object_literal_extensions_shorthand_properties.js: Added.
2439 * tests/es6/object_literal_extensions_string-keyed_shorthand_methods.js: Added.
2441 * tests/es6/octal_and_binary_literals_binary_literals.js: Added.
2443 * tests/es6/octal_and_binary_literals_binary_supported_by_Number.js: Added.
2445 * tests/es6/octal_and_binary_literals_octal_literals.js: Added.
2447 * tests/es6/octal_and_binary_literals_octal_supported_by_Number.js: Added.
2449 * tests/es6/own_property_order_JSON.parse.js: Added.
2451 * tests/es6/own_property_order_JSON.stringify.js: Added.
2453 * tests/es6/own_property_order_Object.assign.js: Added.
2454 * tests/es6/own_property_order_Object.getOwnPropertyNames.js: Added.
2456 * tests/es6/own_property_order_Object.keys.js: Added.
2458 * tests/es6/own_property_order_Reflect.ownKeys_string_key_order.js: Added.
2460 * tests/es6/own_property_order_Reflect.ownKeys_symbol_key_order.js: Added.
2462 * tests/es6/own_property_order_for..in.js: Added.
2464 * tests/es6/proper_tail_calls_tail_call_optimisation_direct_recursion.js: Added.
2466 * tests/es6/proper_tail_calls_tail_call_optimisation_mutual_recursion.js: Added.
2470 * tests/es6/prototype_of_bound_functions_arrow_functions.js: Added.
2471 (test.correctProtoBound):
2473 * tests/es6/prototype_of_bound_functions_basic_functions.js: Added.
2474 (test.correctProtoBound.f):
2475 (test.correctProtoBound):
2477 * tests/es6/prototype_of_bound_functions_classes.js: Added.
2478 (test.correctProtoBound.C):
2479 (test.correctProtoBound):
2481 * tests/es6/prototype_of_bound_functions_generator_functions.js: Added.
2482 (test.correctProtoBound.f):
2483 (test.correctProtoBound):
2485 * tests/es6/prototype_of_bound_functions_subclasses.js: Added.
2486 (test.correctProtoBound.C):
2487 (test.correctProtoBound):
2489 * tests/es6/rest_parameters_arguments_object_interaction.js: Added.
2491 * tests/es6/rest_parameters_basic_functionality.js: Added.
2493 * tests/es6/rest_parameters_cant_be_used_in_setters.js: Added.
2495 * tests/es6/rest_parameters_function_length_property.js: Added.
2497 * tests/es6/rest_parameters_new_Function_support.js: Added.
2499 * tests/es6/spread_..._operator_spreading_non-iterables_is_a_runtime_error.js: Added.
2501 * tests/es6/spread_..._operator_with_arrays_in_array_literals.js: Added.
2503 * tests/es6/spread_..._operator_with_arrays_in_function_calls.js: Added.
2505 * tests/es6/spread_..._operator_with_astral_plane_strings_in_array_literals.js: Added.
2507 * tests/es6/spread_..._operator_with_astral_plane_strings_in_function_calls.js: Added.
2509 * tests/es6/spread_..._operator_with_generator_instances_in_arrays.js: Added.
2512 * tests/es6/spread_..._operator_with_generator_instances_in_calls.js: Added.
2515 * tests/es6/spread_..._operator_with_generic_iterables_in_arrays.js: Added.
2517 * tests/es6/spread_..._operator_with_generic_iterables_in_calls.js: Added.
2519 * tests/es6/spread_..._operator_with_instances_of_iterables_in_arrays.js: Added.
2521 * tests/es6/spread_..._operator_with_instances_of_iterables_in_calls.js: Added.
2523 * tests/es6/spread_..._operator_with_sparse_arrays_in_array_literals.js: Added.
2525 * tests/es6/spread_..._operator_with_sparse_arrays_in_function_calls.js: Added.
2527 * tests/es6/spread_..._operator_with_strings_in_array_literals.js: Added.
2529 * tests/es6/spread_..._operator_with_strings_in_function_calls.js: Added.
2531 * tests/es6/super_constructor_calls_use_correct_new.target_binding.js: Added.
2534 * tests/es6/super_expression_in_constructors.js: Added.
2538 * tests/es6/super_in_methods_method_calls.js: Added.
2539 (test.B.prototype.qux):
2541 (test.C.prototype.qux):
2544 * tests/es6/super_in_methods_property_access.js: Added.
2546 (test.C.prototype.quux):
2549 * tests/es6/super_is_statically_bound.js: Added.
2550 (test.B.prototype.qux):
2552 (test.C.prototype.qux):
2555 * tests/es6/super_method_calls_use_correct_this_binding.js: Added.
2556 (test.B.prototype.qux):
2558 (test.C.prototype.qux):
2561 * tests/es6/super_statement_in_constructors.js: Added.
2564 * tests/es6/template_strings_basic_functionality.js: Added.
2566 * tests/es6/template_strings_line_break_normalisation.js: Added.
2568 * tests/es6/template_strings_passed_array_is_frozen.js: Added.
2570 * tests/es6/template_strings_tagged_template_strings.js: Added.
2573 * tests/es6/template_strings_toString_conversion.js: Added.
2577 * tests/es6/typed_arrays_%TypedArray%.from.js: Added.
2579 * tests/es6/typed_arrays_%TypedArray%.of.js: Added.
2581 * tests/es6/typed_arrays_%TypedArray%.prototype.copyWithin.js: Added.
2583 * tests/es6/typed_arrays_%TypedArray%.prototype.entries.js: Added.
2585 * tests/es6/typed_arrays_%TypedArray%.prototype.every.js: Added.
2587 * tests/es6/typed_arrays_%TypedArray%.prototype.fill.js: Added.
2589 * tests/es6/typed_arrays_%TypedArray%.prototype.filter.js: Added.
2591 * tests/es6/typed_arrays_%TypedArray%.prototype.find.js: Added.
2593 * tests/es6/typed_arrays_%TypedArray%.prototype.findIndex.js: Added.
2595 * tests/es6/typed_arrays_%TypedArray%.prototype.forEach.js: Added.
2597 * tests/es6/typed_arrays_%TypedArray%.prototype.indexOf.js: Added.
2599 * tests/es6/typed_arrays_%TypedArray%.prototype.join.js: Added.
2601 * tests/es6/typed_arrays_%TypedArray%.prototype.keys.js: Added.
2603 * tests/es6/typed_arrays_%TypedArray%.prototype.lastIndexOf.js: Added.
2605 * tests/es6/typed_arrays_%TypedArray%.prototype.map.js: Added.
2607 * tests/es6/typed_arrays_%TypedArray%.prototype.reduce.js: Added.
2609 * tests/es6/typed_arrays_%TypedArray%.prototype.reduceRight.js: Added.
2611 * tests/es6/typed_arrays_%TypedArray%.prototype.reverse.js: Added.
2613 * tests/es6/typed_arrays_%TypedArray%.prototype.slice.js: Added.
2615 * tests/es6/typed_arrays_%TypedArray%.prototype.some.js: Added.
2617 * tests/es6/typed_arrays_%TypedArray%.prototype.sort.js: Added.
2619 * tests/es6/typed_arrays_%TypedArray%.prototype.subarray.js: Added.
2621 * tests/es6/typed_arrays_%TypedArray%.prototype.values.js: Added.
2623 * tests/es6/typed_arrays_%TypedArray%.prototype[Symbol.iterator].js: Added.
2625 * tests/es6/typed_arrays_%TypedArray%[Symbol.species].js: Added.
2627 * tests/es6/typed_arrays_ArrayBuffer[Symbol.species].js: Added.
2629 * tests/es6/typed_arrays_DataView_Float32.js: Added.
2631 * tests/es6/typed_arrays_DataView_Float64.js: Added.
2633 * tests/es6/typed_arrays_DataView_Int16.js: Added.
2635 * tests/es6/typed_arrays_DataView_Int32.js: Added.
2637 * tests/es6/typed_arrays_DataView_Int8.js: Added.
2639 * tests/es6/typed_arrays_DataView_Uint16.js: Added.
2641 * tests/es6/typed_arrays_DataView_Uint32.js: Added.
2643 * tests/es6/typed_arrays_DataView_Uint8.js: Added.
2645 * tests/es6/typed_arrays_Float32Array.js: Added.
2647 * tests/es6/typed_arrays_Float64Array.js: Added.
2649 * tests/es6/typed_arrays_Int16Array.js: Added.
2651 * tests/es6/typed_arrays_Int32Array.js: Added.
2653 * tests/es6/typed_arrays_Int8Array.js: Added.
2655 * tests/es6/typed_arrays_Uint16Array.js: Added.
2657 * tests/es6/typed_arrays_Uint32Array.js: Added.
2659 * tests/es6/typed_arrays_Uint8Array.js: Added.
2661 * tests/es6/typed_arrays_Uint8ClampedArray.js: Added.
2663 * tests/es6/typed_arrays_constructors_require_new.js: Added.
2665 * tests/es6/typed_arrays_correct_prototype_chains.js: Added.
2667 * tests/es6/well-known_symbols_Symbol.hasInstance.js: Added.
2671 * tests/es6/well-known_symbols_Symbol.isConcatSpreadable.js: Added.
2673 * tests/es6/well-known_symbols_Symbol.iterator_arguments_object.js: Added.
2675 * tests/es6/well-known_symbols_Symbol.iterator_existence.js: Added.
2677 * tests/es6/well-known_symbols_Symbol.match.js: Added.
2678 (test.O.Symbol.match):
2680 * tests/es6/well-known_symbols_Symbol.replace.js: Added.
2681 (test.O.Symbol.replace):
2683 * tests/es6/well-known_symbols_Symbol.search.js: Added.
2684 (test.O.Symbol.search):
2686 * tests/es6/well-known_symbols_Symbol.species_Array.prototype.concat.js: Added.
2687 (test.obj.Symbol.species):
2689 * tests/es6/well-known_symbols_Symbol.species_Array.prototype.filter.js: Added.
2690 (test.obj.Symbol.species):
2692 * tests/es6/well-known_symbols_Symbol.species_Array.prototype.map.js: Added.
2693 (test.obj.Symbol.species):
2695 * tests/es6/well-known_symbols_Symbol.species_Array.prototype.slice.js: Added.
2696 (test.obj.Symbol.species):
2698 * tests/es6/well-known_symbols_Symbol.species_Array.prototype.splice.js: Added.
2699 (test.obj.Symbol.species):
2701 * tests/es6/well-known_symbols_Symbol.species_RegExp.prototype[Symbol.split].js: Added.
2702 (test.obj.Symbol.species):
2704 * tests/es6/well-known_symbols_Symbol.species_existence.js: Added.
2706 * tests/es6/well-known_symbols_Symbol.split.js: Added.
2707 (test.O.Symbol.split):
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):
2714 * tests/es6/well-known_symbols_Symbol.toStringTag.js: Added.
2716 * tests/es6/well-known_symbols_Symbol.toStringTag_misc._built-ins.js: Added.
2718 * tests/es6/well-known_symbols_Symbol.unscopables.js: Added.
2721 2015-09-03 Filip Pizlo <fpizlo@apple.com>
2723 WatchpointsOnStructureStubInfo doesn't need to be reference counted
2724 https://bugs.webkit.org/show_bug.cgi?id=148766
2726 Reviewed by Saam Barati.
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.
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):
2740 2015-09-03 Basile Clement <basile_clement@apple.com>
2742 JavaScript functions should restore the stack pointer after a call
2743 https://bugs.webkit.org/show_bug.cgi?id=148659
2745 Reviewed by Michael Saboff.
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.
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):
2763 * ftl/FTLStackMaps.h:
2764 (JSC::FTL::StackMaps::stackSizeForLocals):
2766 (JSC::generateByIdStub):
2767 * tests/stress/tail-call-in-inline-cache.js: Added.
2771 2015-09-03 Filip Pizlo <fpizlo@apple.com>
2773 StructureStubInfo should be able to reset itself without going through CodeBlock
2774 https://bugs.webkit.org/show_bug.cgi?id=148743
2776 Reviewed by Geoffrey Garen.
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.
2782 It's still true that:
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.
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.
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.
2810 2015-09-03 Sukolsak Sakshuwong <sukolsak@gmail.com>
2812 Implement some arithmetic instructions in WebAssembly
2813 https://bugs.webkit.org/show_bug.cgi?id=148737
2815 Reviewed by Geoffrey Garen.
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.)
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):
2849 2015-09-03 Brian Burg <bburg@apple.com>
2851 Web Inspector: should crash on purpose if InjectedScriptSource.js is unparseable
2852 https://bugs.webkit.org/show_bug.cgi?id=148750
2854 Reviewed by Timothy Hatcher.
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.
2860 * inspector/InjectedScriptManager.cpp:
2861 (Inspector::InjectedScriptManager::injectedScriptFor):
2863 2015-09-03 Basile Clement <basile_clement@apple.com> and Michael Saboff <msaboff@apple.com>
2865 Clean up register naming
2866 https://bugs.webkit.org/show_bug.cgi?id=148658
2868 Reviewed by Geoffrey Garen.
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.
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.
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.
2886 This is in preparation for properly handling callee save register
2887 preservation and restoration.
2889 * dfg/DFGJITCompiler.cpp:
2890 (JSC::DFG::JITCompiler::compileFunction):
2894 (JSC::FPRInfo::toRegister):
2895 (JSC::FPRInfo::toIndex):
2897 (JSC::GPRInfo::toIndex):
2898 (JSC::GPRInfo::toRegister):
2899 (JSC::GPRInfo::debugName): Deleted.
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:
2926 2015-09-03 Filip Pizlo <fpizlo@apple.com>
2928 Get rid of RepatchBuffer and replace it with static functions
2929 https://bugs.webkit.org/show_bug.cgi?id=148742
2931 Reviewed by Geoffrey Garen and Mark Lam.
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.
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:
3019 (JSC::ctiPatchCallByReturnAddress):
3021 (JSC::ctiPatchNearCallByReturnAddress): Deleted.
3024 * jit/JITOpcodes.cpp:
3025 (JSC::JIT::privateCompileHasIndexedProperty):
3026 (JSC::JIT::emit_op_has_indexed_property):
3027 * jit/JITOperations.cpp:
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):
3047 (JSC::readCallTarget):
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):
3064 (JSC::linkVirtualFor):
3065 (JSC::linkPolymorphicCall):
3066 (JSC::resetGetByID):
3067 (JSC::resetPutByID):
3071 2015-09-03 Sukolsak Sakshuwong <sukolsak@gmail.com>
3073 Initial implementation of WebAssembly function compiler
3074 https://bugs.webkit.org/show_bug.cgi?id=148734
3076 Reviewed by Filip Pizlo.
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.
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):
3115 2015-09-03 Saam barati <sbarati@apple.com>
3117 Block scoped variables should be visible across scripts
3118 https://bugs.webkit.org/show_bug.cgi?id=147813
3120 Reviewed by Filip Pizlo.
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.
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.
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.
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:
3201 * dfg/DFGFixupPhase.cpp:
3202 (JSC::DFG::FixupPhase::fixupNode):
3204 (JSC::DFG::Graph::dump):
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):
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):
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):
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):
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.
3366 * tests/stress/global-lexical-redeclare-variable.js: Added.
3370 (assertExpectations):
3371 (assertProperError):
3372 * tests/stress/global-lexical-redefine-const.js: Added.
3373 * tests/stress/global-lexical-var-injection.js: Added.
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.
3380 (shouldThrowInvalidConstAssignment):
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.
3393 (shouldThrowInvalidConstAssignment):
3394 * tests/stress/multiple-files-tests/global-lexical-redefine-const/second.js: Added.
3398 * tests/stress/multiple-files-tests/global-lexical-variable-tdz: Added.
3399 * tests/stress/multiple-files-tests/global-lexical-variable-tdz/first.js: Added.
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.
3410 * tests/stress/multiple-files-tests/global-lexical-variable-unresolved-property/second.js: Added.
3412 2015-09-03 Filip Pizlo <fpizlo@apple.com>
3414 RepatchBuffer should be stateless
3415 https://bugs.webkit.org/show_bug.cgi?id=148741
3417 Reviewed by Geoffrey Garen.
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
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):
3489 (JSC::readCallTarget):
3491 (JSC::repatchByIdSelfAccess):
3492 (JSC::tryCacheGetByID):
3493 (JSC::tryCachePutByID):
3494 (JSC::tryBuildPutByIdList):
3497 (JSC::linkVirtualFor):
3498 (JSC::linkPolymorphicCall):
3499 (JSC::resetGetByID):
3500 (JSC::resetPutByID):
3504 2015-09-02 Filip Pizlo <fpizlo@apple.com>
3506 Replace all the various forms of branchStructure() with a single method in AssemblyHelpers
3507 https://bugs.webkit.org/show_bug.cgi?id=148725
3509 Reviewed by Saam Barati.
3511 Previously there were the following branchStructure() implementations:
3513 JSC::JIT::branchStructure()
3514 JSC::branchStructure()
3515 JSC::DFG::JITCompiler::branchStructurePtr()
3517 They all did the same thing. Now there is only one, AssemblyHelpers::branchStructure().
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):
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):
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):
3550 2015-09-02 Filip Pizlo <fpizlo@apple.com>
3552 Remove some unused methods from GetByIdAccess.
3554 Rubber stamped by Michael Saboff.
3556 * bytecode/PolymorphicGetByIdList.h:
3557 (JSC::GetByIdAccess::stubRoutine):
3558 (JSC::GetByIdAccess::doesCalls):
3559 (JSC::GetByIdAccess::isWatched): Deleted.
3560 (JSC::GetByIdAccess::isSimple): Deleted.
3562 2015-09-02 Geoffrey Garen <ggaren@apple.com>
3564 Fix the no JIT build.
3569 (JSC::Heap::markRoots):
3571 2015-09-02 Geoffrey Garen <ggaren@apple.com>
3573 CodeBlock should have a more explicit "strongly referenced" state
3574 https://bugs.webkit.org/show_bug.cgi?id=148714
3576 Reviewed by Filip Pizlo.
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".
3582 Now, CodeBlock has an explicit "is strongly referenced" bit to do the
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:
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.
3595 (2) Visiting more heap objects might reveal more strong references
3596 but, by definition, it cannot reveal more stack references.
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.
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):
3616 (JSC::DFG::Plan::key):
3617 (JSC::DFG::Plan::clearCodeBlockMarks):
3618 (JSC::DFG::Plan::checkLivenessAndVisitChildren):
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:
3637 (JSC::Heap::markRoots):
3639 2015-09-01 Brian Burg <bburg@apple.com>
3641 Web Inspector: protocol generator should not allow non-boolean values for "optional" key
3642 https://bugs.webkit.org/show_bug.cgi?id=148679
3644 Reviewed by Joseph Pecoraro.
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.
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.
3657 2015-09-01 Filip Pizlo <fpizlo@apple.com>
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
3662 Reviewed by Saam Barati.
3664 We often generate IR like:
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.
3675 The correct solution is to remove the compile-time assertions about Known use kinds
3676 having already been checked.
3678 * dfg/DFGAbstractInterpreterInlines.h:
3679 (JSC::DFG::AbstractInterpreter<AbstractStateType>::verifyEdge):
3681 2015-09-01 Brian Burg <bburg@apple.com>
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
3686 Reviewed by Joseph Pecoraro.
3688 Both InjectedScriptManager and AgentRegistry (thus all agents) are
3689 owned by JSGlobalObjectInspectorController. So, use references.
3691 Add brace initalizers for scalar and pointer members in agent classes.
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:
3742 2015-08-31 Yusuke Suzuki <utatane.tea@gmail.com>
3744 [ES6] Introduce ModuleProgramExecutable families and compile Module code to bytecode
3745 https://bugs.webkit.org/show_bug.cgi?id=148581
3747 Reviewed by Saam Barati.
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.
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)
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).
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.
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.
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:
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):
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):
3881 * runtime/ModuleLoaderObject.cpp:
3882 (JSC::moduleLoaderObjectModuleDeclarationInstantiation):
3887 2015-08-31 Basile Clement <basile_clement@apple.com>
3889 Unreviewed, build fix after r189292
3891 * bytecode/ValueRecovery.h:
3892 (JSC::ValueRecovery::jsValueRegs): Deleted.
3894 2015-08-24 Basile Clement <basile_clement@apple.com>
3896 ValueRecovery should distinguish between doubles in an FPR and JSValues in an FPR
3897 https://bugs.webkit.org/show_bug.cgi?id=148336
3899 Reviewed by Michael Saboff.
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
3907 * bytecode/ValueRecovery.cpp:
3908 (JSC::ValueRecovery::dumpInContext):
3909 * bytecode/ValueRecovery.h:
3910 (JSC::ValueRecovery::operator bool):