a5eccf3477585794b450ffdd75f860a36168eb9a
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2018-09-24  Tadeu Zagallo  <tzagallo@apple.com>
2
3         offlineasm: fix macro scoping
4         https://bugs.webkit.org/show_bug.cgi?id=189902
5
6         Reviewed by Mark Lam.
7
8         In the code below, the reference to `f` in `g`, which should refer to
9         the outer macro definition will instead refer to the f argument of the
10         anonymous macro passed to `g`. That leads to this code failing to
11         compile (f expected 0 args but got 1).
12         
13         ```
14         macro f(x)
15             move x, t0
16         end
17         
18         macro g(fn)
19             fn(macro () f(42) end)
20         end
21         
22         g(macro(f) f() end)
23         ```
24
25         * offlineasm/ast.rb:
26         * offlineasm/transform.rb:
27
28 2018-09-24  Tadeu Zagallo  <tzagallo@apple.com>
29
30         Add forEach method for iterating CodeBlock's ValueProfiles
31         https://bugs.webkit.org/show_bug.cgi?id=189897
32
33         Reviewed by Mark Lam.
34
35         Add method to abstract how we find ValueProfiles in a CodeBlock in
36         preparation for https://bugs.webkit.org/show_bug.cgi?id=189785, when
37         ValueProfiles will be stored in the MetadataTable.
38
39         * bytecode/CodeBlock.cpp:
40         (JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
41         (JSC::CodeBlock::updateAllValueProfilePredictions):
42         (JSC::CodeBlock::shouldOptimizeNow):
43         (JSC::CodeBlock::dumpValueProfiles):
44         * bytecode/CodeBlock.h:
45         (JSC::CodeBlock::forEachValueProfile):
46         (JSC::CodeBlock::numberOfArgumentValueProfiles):
47         (JSC::CodeBlock::valueProfileForArgument):
48         (JSC::CodeBlock::numberOfValueProfiles):
49         (JSC::CodeBlock::valueProfile):
50         (JSC::CodeBlock::totalNumberOfValueProfiles): Deleted.
51         (JSC::CodeBlock::getFromAllValueProfiles): Deleted.
52         * tools/HeapVerifier.cpp:
53         (JSC::HeapVerifier::validateJSCell):
54
55 2018-09-24  Saam barati  <sbarati@apple.com>
56
57         ArgumentsEliminationPhase should snip basic blocks after proven OSR exits
58         https://bugs.webkit.org/show_bug.cgi?id=189682
59         <rdar://problem/43557315>
60
61         Reviewed by Mark Lam.
62
63         Otherwise, if we have code like this:
64         ```
65         a: Arguments
66         b: GetButterfly(@a)
67         c: ForceExit
68         d: GetArrayLength(@a, @b)
69         ```
70         it will get transformed into this invalid DFG IR:
71         ```
72         a: PhantomArguments
73         b: Check(@a)
74         c: ForceExit
75         d: GetArrayLength(@a, @b)
76         ```
77         
78         And we will fail DFG validation since @b does not have a result.
79         
80         The fix is to just remove all nodes after the ForceExit and plant an
81         Unreachable after it. So the above code program will now turn into this:
82         ```
83         a: PhantomArguments
84         b: Check(@a)
85         c: ForceExit
86         e: Unreachable
87         ```
88
89         * dfg/DFGArgumentsEliminationPhase.cpp:
90
91 2018-09-22  Saam barati  <sbarati@apple.com>
92
93         The sampling should not use Strong<CodeBlock> in its machineLocation field
94         https://bugs.webkit.org/show_bug.cgi?id=189319
95
96         Reviewed by Filip Pizlo.
97
98         The sampling profiler has a CLI mode where we gather information about inline
99         call frames. That data structure was using a Strong<CodeBlock>. We were
100         constructing this Strong<CodeBlock> during GC concurrently to processing all
101         the Strong handles. This is a bug since we end up corrupting that data
102         structure. This patch fixes this by just making this data structure use the
103         sampling profiler's mechanism for holding onto and properly visiting heap pointers.
104
105         * inspector/agents/InspectorScriptProfilerAgent.cpp:
106         (Inspector::InspectorScriptProfilerAgent::trackingComplete):
107         * runtime/SamplingProfiler.cpp:
108         (JSC::SamplingProfiler::processUnverifiedStackTraces):
109
110         (JSC::SamplingProfiler::reportTopFunctions):
111         (JSC::SamplingProfiler::reportTopBytecodes):
112         These CLI helpers needed a DeferGC otherwise we may end up deadlocking when we
113         cause a GC to happen while already holding the sampling profiler's
114         lock.
115
116 2018-09-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
117
118         [JSC] Enable LLInt ASM interpreter on X64 and ARM64 in non JIT configuration
119         https://bugs.webkit.org/show_bug.cgi?id=189778
120
121         Reviewed by Keith Miller.
122
123         LLInt ASM interpreter is 2x and 15% faster than CLoop interpreter on
124         Linux and macOS respectively. We would like to enable it for non JIT
125         configurations in X86_64 and ARM64.
126
127         This patch enables LLInt for non JIT builds in X86_64 and ARM64 architectures.
128         Previously, we switch LLInt ASM interpreter and CLoop by using ENABLE(JIT)
129         configuration. But it is wrong in the new scenario since we have a build
130         configuration that uses LLInt ASM interpreter and JIT is disabled. We introduce
131         ENABLE(C_LOOP) option, which represents that we use CLoop. And we replace
132         ENABLE(JIT) with ENABLE(C_LOOP) if the previous ENABLE(JIT) is essentially just
133         related to LLInt ASM interpreter and not related to JIT.
134
135         We also replace some ENABLE(JIT) configurations with ENABLE(ASSEMBLER).
136         ENABLE(ASSEMBLER) is now enabled even if we disable JIT since MacroAssembler
137         has machine register information that is used in LLInt ASM interpreter.
138
139         * API/tests/PingPongStackOverflowTest.cpp:
140         (testPingPongStackOverflow):
141         * CMakeLists.txt:
142         * JavaScriptCore.xcodeproj/project.pbxproj:
143         * assembler/MaxFrameExtentForSlowPathCall.h:
144         * bytecode/CallReturnOffsetToBytecodeOffset.h: Removed. It is no longer used.
145         * bytecode/CodeBlock.cpp:
146         (JSC::CodeBlock::finishCreation):
147         * bytecode/CodeBlock.h:
148         (JSC::CodeBlock::calleeSaveRegisters const):
149         (JSC::CodeBlock::numberOfLLIntBaselineCalleeSaveRegisters):
150         (JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters):
151         (JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):
152         * bytecode/Opcode.h:
153         (JSC::padOpcodeName):
154         * heap/Heap.cpp:
155         (JSC::Heap::gatherJSStackRoots):
156         (JSC::Heap::stopThePeriphery):
157         * interpreter/CLoopStack.cpp:
158         * interpreter/CLoopStack.h:
159         * interpreter/CLoopStackInlines.h:
160         * interpreter/EntryFrame.h:
161         * interpreter/Interpreter.cpp:
162         (JSC::Interpreter::Interpreter):
163         (JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):
164         * interpreter/Interpreter.h:
165         * interpreter/StackVisitor.cpp:
166         (JSC::StackVisitor::Frame::calleeSaveRegisters):
167         * interpreter/VMEntryRecord.h:
168         * jit/ExecutableAllocator.h:
169         * jit/FPRInfo.h:
170         (WTF::printInternal):
171         * jit/GPRInfo.cpp:
172         * jit/GPRInfo.h:
173         (WTF::printInternal):
174         * jit/HostCallReturnValue.cpp:
175         (JSC::getHostCallReturnValueWithExecState): Moved. They are used in LLInt ASM interpreter too.
176         * jit/HostCallReturnValue.h:
177         * jit/JITOperations.cpp:
178         (JSC::getHostCallReturnValueWithExecState): Deleted.
179         * jit/JITOperationsMSVC64.cpp:
180         * jit/Reg.cpp:
181         * jit/Reg.h:
182         * jit/RegisterAtOffset.cpp:
183         * jit/RegisterAtOffset.h:
184         * jit/RegisterAtOffsetList.cpp:
185         * jit/RegisterAtOffsetList.h:
186         * jit/RegisterMap.h:
187         * jit/RegisterSet.cpp:
188         * jit/RegisterSet.h:
189         * jit/TempRegisterSet.cpp:
190         * jit/TempRegisterSet.h:
191         * llint/LLIntCLoop.cpp:
192         * llint/LLIntCLoop.h:
193         * llint/LLIntData.cpp:
194         (JSC::LLInt::initialize):
195         (JSC::LLInt::Data::performAssertions):
196         * llint/LLIntData.h:
197         * llint/LLIntOfflineAsmConfig.h:
198         * llint/LLIntOpcode.h:
199         * llint/LLIntPCRanges.h:
200         * llint/LLIntSlowPaths.cpp:
201         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
202         * llint/LLIntSlowPaths.h:
203         * llint/LLIntThunks.cpp:
204         * llint/LowLevelInterpreter.cpp:
205         * llint/LowLevelInterpreter.h:
206         * runtime/JSCJSValue.h:
207         * runtime/MachineContext.h:
208         * runtime/SamplingProfiler.cpp:
209         (JSC::SamplingProfiler::processUnverifiedStackTraces): Enable SamplingProfiler
210         for LLInt ASM interpreter with non JIT configuration.
211         * runtime/TestRunnerUtils.cpp:
212         (JSC::optimizeNextInvocation):
213         * runtime/VM.cpp:
214         (JSC::VM::VM):
215         (JSC::VM::getHostFunction):
216         (JSC::VM::updateSoftReservedZoneSize):
217         (JSC::sanitizeStackForVM):
218         (JSC::VM::committedStackByteCount):
219         * runtime/VM.h:
220         * runtime/VMInlines.h:
221         (JSC::VM::ensureStackCapacityFor):
222         (JSC::VM::isSafeToRecurseSoft const):
223
224 2018-09-21  Keith Miller  <keith_miller@apple.com>
225
226         Add Promise SPI
227         https://bugs.webkit.org/show_bug.cgi?id=189809
228
229         Reviewed by Saam Barati.
230
231         The Patch adds new SPI to create promises. It's mostly SPI because
232         I want to see how internal users react to it before we make it
233         public.
234
235         This patch adds a couple of new Obj-C SPI methods. The first
236         creates a new promise using the same API that JS does where the
237         user provides an executor callback. If an exception is raised
238         in/to that callback the promise is automagically rejected. The
239         other methods create a pre-resolved or rejected promise as this
240         appears to be a common way to initialize a promise.
241
242         I was also considering adding a second version of executor API
243         where it would catch specific Obj-C exceptions. This would work by
244         taking a Class paramter and checking isKindOfClass: on the
245         exception. I decided against this as nothing else in our API
246         handles Obj-C exceptions. I'm pretty sure the VM will end up in a
247         corrupt state if an Obj-C exception unwinds through JS frames.
248
249         This patch adds a new C function that will create a "deferred"
250         promise. A deferred promise is a style of creating promise/futures
251         where the resolve and reject functions are passed as outputs of a
252         function. I went with this style for the C SPI because we don't have
253         any concept of forwarding exceptions in the C API.
254
255         In order to make the C API work I refactored a bit of the promise code
256         so that we can call a static method on JSDeferredPromise and just get
257         the components without allocating an extra cell wrapper.
258
259         * API/JSContext.mm:
260         (+[JSContext currentCallee]):
261         * API/JSObjectRef.cpp:
262         (JSObjectMakeDeferredPromise):
263         * API/JSObjectRefPrivate.h:
264         * API/JSValue.mm:
265         (+[JSValue valueWithNewPromiseInContext:fromExecutor:]):
266         (+[JSValue valueWithNewPromiseResolvedWithResult:inContext:]):
267         (+[JSValue valueWithNewPromiseRejectedWithReason:inContext:]):
268         * API/JSValuePrivate.h: Added.
269         * API/JSVirtualMachine.mm:
270         * API/JSVirtualMachinePrivate.h:
271         * API/tests/testapi.c:
272         (main):
273         * API/tests/testapi.cpp:
274         (APIContext::operator JSC::ExecState*):
275         (TestAPI::failed const):
276         (TestAPI::check):
277         (TestAPI::basicSymbol):
278         (TestAPI::symbolsTypeof):
279         (TestAPI::symbolsGetPropertyForKey):
280         (TestAPI::symbolsSetPropertyForKey):
281         (TestAPI::symbolsHasPropertyForKey):
282         (TestAPI::symbolsDeletePropertyForKey):
283         (TestAPI::promiseResolveTrue):
284         (TestAPI::promiseRejectTrue):
285         (testCAPIViaCpp):
286         (TestAPI::run): Deleted.
287         * API/tests/testapi.mm:
288         (testObjectiveCAPIMain):
289         (promiseWithExecutor):
290         (promiseRejectOnJSException):
291         (promiseCreateResolved):
292         (promiseCreateRejected):
293         (parallelPromiseResolveTest):
294         (testObjectiveCAPI):
295         * JavaScriptCore.xcodeproj/project.pbxproj:
296         * runtime/JSInternalPromiseDeferred.cpp:
297         (JSC::JSInternalPromiseDeferred::create):
298         * runtime/JSPromise.h:
299         * runtime/JSPromiseConstructor.cpp:
300         (JSC::constructPromise):
301         * runtime/JSPromiseDeferred.cpp:
302         (JSC::JSPromiseDeferred::createDeferredData):
303         (JSC::JSPromiseDeferred::create):
304         (JSC::JSPromiseDeferred::finishCreation):
305         (JSC::newPromiseCapability): Deleted.
306         * runtime/JSPromiseDeferred.h:
307         (JSC::JSPromiseDeferred::promise const):
308         (JSC::JSPromiseDeferred::resolve const):
309         (JSC::JSPromiseDeferred::reject const):
310
311 2018-09-21  Ryan Haddad  <ryanhaddad@apple.com>
312
313         Unreviewed, rolling out r236359.
314
315         Broke the Windows build.
316
317         Reverted changeset:
318
319         "Add Promise SPI"
320         https://bugs.webkit.org/show_bug.cgi?id=189809
321         https://trac.webkit.org/changeset/236359
322
323 2018-09-21  Mark Lam  <mark.lam@apple.com>
324
325         JSRopeString::resolveRope() wrongly assumes that tryGetValue() passes it a valid ExecState.
326         https://bugs.webkit.org/show_bug.cgi?id=189855
327         <rdar://problem/44680181>
328
329         Reviewed by Filip Pizlo.
330
331         tryGetValue() always passes a nullptr to JSRopeString::resolveRope() for the
332         ExecState* argument.  This is intentional so that resolveRope() does not throw
333         in the event of an OutOfMemory error.  Hence, JSRopeString::resolveRope() should
334         get the VM from the cell instead of via the ExecState.
335
336         Also removed an obsolete and unused field in JSString.
337
338         * runtime/JSString.cpp:
339         (JSC::JSRopeString::resolveRope const):
340         (JSC::JSRopeString::outOfMemory const):
341         * runtime/JSString.h:
342         (JSC::JSString::tryGetValue const):
343
344 2018-09-21  Michael Saboff  <msaboff@apple.com>
345
346         Add functions to measure memory footprint to JSC
347         https://bugs.webkit.org/show_bug.cgi?id=189768
348
349         Reviewed by Saam Barati.
350
351         Rolling this back in again.
352
353         Provide system memory metrics for the current process to aid in memory reduction measurement and
354         tuning using native JS tests.
355
356         * jsc.cpp:
357         (MemoryFootprint::now):
358         (MemoryFootprint::resetPeak):
359         (GlobalObject::finishCreation):
360         (JSCMemoryFootprint::JSCMemoryFootprint):
361         (JSCMemoryFootprint::createStructure):
362         (JSCMemoryFootprint::create):
363         (JSCMemoryFootprint::finishCreation):
364         (JSCMemoryFootprint::addProperty):
365         (functionResetMemoryPeak):
366
367 2018-09-21  Keith Miller  <keith_miller@apple.com>
368
369         Add Promise SPI
370         https://bugs.webkit.org/show_bug.cgi?id=189809
371
372         Reviewed by Saam Barati.
373
374         The Patch adds new SPI to create promises. It's mostly SPI because
375         I want to see how internal users react to it before we make it
376         public.
377
378         This patch adds a couple of new Obj-C SPI methods. The first
379         creates a new promise using the same API that JS does where the
380         user provides an executor callback. If an exception is raised
381         in/to that callback the promise is automagically rejected. The
382         other methods create a pre-resolved or rejected promise as this
383         appears to be a common way to initialize a promise.
384
385         I was also considering adding a second version of executor API
386         where it would catch specific Obj-C exceptions. This would work by
387         taking a Class paramter and checking isKindOfClass: on the
388         exception. I decided against this as nothing else in our API
389         handles Obj-C exceptions. I'm pretty sure the VM will end up in a
390         corrupt state if an Obj-C exception unwinds through JS frames.
391
392         This patch adds a new C function that will create a "deferred"
393         promise. A deferred promise is a style of creating promise/futures
394         where the resolve and reject functions are passed as outputs of a
395         function. I went with this style for the C SPI because we don't have
396         any concept of forwarding exceptions in the C API.
397
398         In order to make the C API work I refactored a bit of the promise code
399         so that we can call a static method on JSDeferredPromise and just get
400         the components without allocating an extra cell wrapper.
401
402         * API/JSContext.mm:
403         (+[JSContext currentCallee]):
404         * API/JSObjectRef.cpp:
405         (JSObjectMakeDeferredPromise):
406         * API/JSObjectRefPrivate.h:
407         * API/JSValue.mm:
408         (+[JSValue valueWithNewPromiseInContext:fromExecutor:]):
409         (+[JSValue valueWithNewPromiseResolvedWithResult:inContext:]):
410         (+[JSValue valueWithNewPromiseRejectedWithReason:inContext:]):
411         * API/JSValuePrivate.h: Added.
412         * API/JSVirtualMachine.mm:
413         * API/JSVirtualMachinePrivate.h:
414         * API/tests/testapi.c:
415         (main):
416         * API/tests/testapi.cpp:
417         (APIContext::operator JSC::ExecState*):
418         (TestAPI::failed const):
419         (TestAPI::check):
420         (TestAPI::basicSymbol):
421         (TestAPI::symbolsTypeof):
422         (TestAPI::symbolsGetPropertyForKey):
423         (TestAPI::symbolsSetPropertyForKey):
424         (TestAPI::symbolsHasPropertyForKey):
425         (TestAPI::symbolsDeletePropertyForKey):
426         (TestAPI::promiseResolveTrue):
427         (TestAPI::promiseRejectTrue):
428         (testCAPIViaCpp):
429         (TestAPI::run): Deleted.
430         * API/tests/testapi.mm:
431         (testObjectiveCAPIMain):
432         (promiseWithExecutor):
433         (promiseRejectOnJSException):
434         (promiseCreateResolved):
435         (promiseCreateRejected):
436         (parallelPromiseResolveTest):
437         (testObjectiveCAPI):
438         * JavaScriptCore.xcodeproj/project.pbxproj:
439         * runtime/JSInternalPromiseDeferred.cpp:
440         (JSC::JSInternalPromiseDeferred::create):
441         * runtime/JSPromise.h:
442         * runtime/JSPromiseConstructor.cpp:
443         (JSC::constructPromise):
444         * runtime/JSPromiseDeferred.cpp:
445         (JSC::JSPromiseDeferred::createDeferredData):
446         (JSC::JSPromiseDeferred::create):
447         (JSC::JSPromiseDeferred::finishCreation):
448         (JSC::newPromiseCapability): Deleted.
449         * runtime/JSPromiseDeferred.h:
450         (JSC::JSPromiseDeferred::promise const):
451         (JSC::JSPromiseDeferred::resolve const):
452         (JSC::JSPromiseDeferred::reject const):
453
454 2018-09-21  Truitt Savell  <tsavell@apple.com>
455
456         Rebaseline tests after changes in https://trac.webkit.org/changeset/236321/webkit
457         https://bugs.webkit.org/show_bug.cgi?id=156674
458
459         Unreviewed Test Gardening
460
461         * Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
462         * Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
463
464 2018-09-21  Mike Gorse  <mgorse@suse.com>
465
466         Build tools should work when the /usr/bin/python is python3
467         https://bugs.webkit.org/show_bug.cgi?id=156674
468
469         Reviewed by Michael Catanzaro.
470
471         * Scripts/cssmin.py:
472         * Scripts/generate-js-builtins.py:
473         (do_open):
474         (generate_bindings_for_builtins_files):
475         * Scripts/generateIntlCanonicalizeLanguage.py:
476         * Scripts/jsmin.py:
477         (JavascriptMinify.minify.write):
478         (JavascriptMinify):
479         (JavascriptMinify.minify):
480         * Scripts/make-js-file-arrays.py:
481         (chunk):
482         (main):
483         * Scripts/wkbuiltins/__init__.py:
484         * Scripts/wkbuiltins/builtins_generate_combined_header.py:
485         (generate_section_for_global_private_code_name_macro):
486         * Scripts/wkbuiltins/builtins_generate_internals_wrapper_header.py:
487         (BuiltinsInternalsWrapperHeaderGenerator.__init__):
488         * Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py:
489         (BuiltinsInternalsWrapperImplementationGenerator.__init__):
490         * Scripts/wkbuiltins/builtins_model.py:
491         (BuiltinFunction.__lt__):
492         (BuiltinsCollection.copyrights):
493         (BuiltinsCollection._parse_functions):
494         * disassembler/udis86/ud_opcode.py:
495         (UdOpcodeTables.pprint.printWalk):
496         * generate-bytecode-files:
497         * inspector/scripts/codegen/__init__.py:
498         * inspector/scripts/codegen/cpp_generator.py:
499         * inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py:
500         (CppAlternateBackendDispatcherHeaderGenerator.generate_output):
501         * inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
502         (CppBackendDispatcherHeaderGenerator.domains_to_generate):
503         (CppBackendDispatcherHeaderGenerator.generate_output):
504         (CppBackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
505         * inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
506         (CppBackendDispatcherImplementationGenerator.domains_to_generate):
507         (CppBackendDispatcherImplementationGenerator.generate_output):
508         * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:
509         (CppFrontendDispatcherHeaderGenerator.domains_to_generate):
510         (CppFrontendDispatcherHeaderGenerator.generate_output):
511         * inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py:
512         (CppFrontendDispatcherImplementationGenerator.domains_to_generate):
513         (CppFrontendDispatcherImplementationGenerator.generate_output):
514         * inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
515         (CppProtocolTypesHeaderGenerator.generate_output):
516         (CppProtocolTypesHeaderGenerator._generate_forward_declarations):
517         * inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
518         (CppProtocolTypesImplementationGenerator.generate_output):
519         (CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain):
520         (CppProtocolTypesImplementationGenerator._generate_enum_mapping_and_conversion_methods):
521         (CppProtocolTypesImplementationGenerator._generate_open_field_names):
522         (CppProtocolTypesImplementationGenerator._generate_builders_for_domain):
523         (CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration):
524         * inspector/scripts/codegen/generate_js_backend_commands.py:
525         (JSBackendCommandsGenerator.should_generate_domain):
526         (JSBackendCommandsGenerator.domains_to_generate):
527         (JSBackendCommandsGenerator.generate_output):
528         (JSBackendCommandsGenerator.generate_domain):
529         * inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:
530         (ObjCBackendDispatcherHeaderGenerator.domains_to_generate):
531         (ObjCBackendDispatcherHeaderGenerator.generate_output):
532         * inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
533         (ObjCBackendDispatcherImplementationGenerator.domains_to_generate):
534         (ObjCBackendDispatcherImplementationGenerator.generate_output):
535         (ObjCBackendDispatcherImplementationGenerator._generate_success_block_for_command):
536         * inspector/scripts/codegen/generate_objc_configuration_header.py:
537         * inspector/scripts/codegen/generate_objc_configuration_implementation.py:
538         * inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:
539         (ObjCFrontendDispatcherImplementationGenerator.domains_to_generate):
540         (ObjCFrontendDispatcherImplementationGenerator.generate_output):
541         (ObjCFrontendDispatcherImplementationGenerator._generate_event):
542         * inspector/scripts/codegen/generate_objc_header.py:
543         (ObjCHeaderGenerator.generate_output):
544         (ObjCHeaderGenerator._generate_type_interface):
545         * inspector/scripts/codegen/generate_objc_internal_header.py:
546         (ObjCInternalHeaderGenerator.generate_output):
547         * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
548         (ObjCProtocolTypeConversionsHeaderGenerator.domains_to_generate):
549         (ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
550         * inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py:
551         (ObjCProtocolTypeConversionsImplementationGenerator.domains_to_generate):
552         * inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
553         (ObjCProtocolTypesImplementationGenerator.domains_to_generate):
554         (ObjCProtocolTypesImplementationGenerator.generate_output):
555         (ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
556         (ObjCProtocolTypesImplementationGenerator._generate_init_method_for_required_members):
557         * inspector/scripts/codegen/generator.py:
558         (Generator.non_supplemental_domains):
559         (Generator.open_fields):
560         (Generator.calculate_types_requiring_shape_assertions):
561         (Generator._traverse_and_assign_enum_values):
562         (Generator.stylized_name_for_enum_value):
563         * inspector/scripts/codegen/models.py:
564         (find_duplicates):
565         * inspector/scripts/codegen/objc_generator.py:
566         * wasm/generateWasm.py:
567         (opcodeIterator):
568         * yarr/generateYarrCanonicalizeUnicode:
569         * yarr/generateYarrUnicodePropertyTables.py:
570         * yarr/hasher.py:
571         (stringHash):
572
573 2018-09-21  Tomas Popela  <tpopela@redhat.com>
574
575         [ARM] Build broken on armv7hl after r235517
576         https://bugs.webkit.org/show_bug.cgi?id=189831
577
578         Reviewed by Yusuke Suzuki.
579
580         Add missing implementation of patchebleBranch8() for traditional ARM.
581
582         * assembler/MacroAssemblerARM.h:
583         (JSC::MacroAssemblerARM::patchableBranch8):
584
585 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
586
587         Unreviewed, rolling out r236293.
588
589         Internal build still broken.
590
591         Reverted changeset:
592
593         "Add functions to measure memory footprint to JSC"
594         https://bugs.webkit.org/show_bug.cgi?id=189768
595         https://trac.webkit.org/changeset/236293
596
597 2018-09-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
598
599         [JSC] Heap::reportExtraMemoryVisited shows contention if we have many JSString
600         https://bugs.webkit.org/show_bug.cgi?id=189558
601
602         Reviewed by Mark Lam.
603
604         When running web-tooling-benchmark postcss test on Linux JSCOnly port, we get the following result in `perf report`.
605
606             10.95%  AutomaticThread  libJavaScriptCore.so.1.0.0  [.] JSC::Heap::reportExtraMemoryVisited
607
608         This is because postcss produces bunch of JSString, which require reportExtraMemoryVisited calls in JSString::visitChildren.
609         And since reportExtraMemoryVisited attempts to update atomic counter, if we have bunch of marking threads, it becomes super contended.
610
611         This patch reduces the frequency of updating the atomic counter. Each SlotVisitor has per-SlotVisitor m_extraMemorySize counter.
612         And we propagate this value to the global atomic counter when rebalance happens.
613
614         We also reduce HeapCell::heap() access by using `vm.heap`.
615
616         * heap/SlotVisitor.cpp:
617         (JSC::SlotVisitor::didStartMarking):
618         (JSC::SlotVisitor::propagateExternalMemoryVisitedIfNecessary):
619         (JSC::SlotVisitor::drain):
620         (JSC::SlotVisitor::performIncrementOfDraining):
621         * heap/SlotVisitor.h:
622         * heap/SlotVisitorInlines.h:
623         (JSC::SlotVisitor::reportExtraMemoryVisited):
624         * runtime/JSString.cpp:
625         (JSC::JSRopeString::resolveRopeToAtomicString const):
626         (JSC::JSRopeString::resolveRope const):
627         * runtime/JSString.h:
628         (JSC::JSString::finishCreation):
629         * wasm/js/JSWebAssemblyInstance.cpp:
630         (JSC::JSWebAssemblyInstance::finishCreation):
631         * wasm/js/JSWebAssemblyMemory.cpp:
632         (JSC::JSWebAssemblyMemory::finishCreation):
633
634 2018-09-20  Michael Saboff  <msaboff@apple.com>
635
636         Add functions to measure memory footprint to JSC
637         https://bugs.webkit.org/show_bug.cgi?id=189768
638
639         Reviewed by Saam Barati.
640
641         Rolling this back in.
642
643         Provide system memory metrics for the current process to aid in memory reduction measurement and
644         tuning using native JS tests.
645
646         * jsc.cpp:
647         (MemoryFootprint::now):
648         (MemoryFootprint::resetPeak):
649         (GlobalObject::finishCreation):
650         (JSCMemoryFootprint::JSCMemoryFootprint):
651         (JSCMemoryFootprint::createStructure):
652         (JSCMemoryFootprint::create):
653         (JSCMemoryFootprint::finishCreation):
654         (JSCMemoryFootprint::addProperty):
655         (functionResetMemoryPeak):
656
657 2018-09-20  Ryan Haddad  <ryanhaddad@apple.com>
658
659         Unreviewed, rolling out r236235.
660
661         Breaks internal builds.
662
663         Reverted changeset:
664
665         "Add functions to measure memory footprint to JSC"
666         https://bugs.webkit.org/show_bug.cgi?id=189768
667         https://trac.webkit.org/changeset/236235
668
669 2018-09-20  Fujii Hironori  <Hironori.Fujii@sony.com>
670
671         [Win][Clang] JITMathIC.h: error: missing 'template' keyword prior to dependent template name 'retagged'
672         https://bugs.webkit.org/show_bug.cgi?id=189730
673
674         Reviewed by Saam Barati.
675
676         Clang for Windows can't compile the workaround for MSVC quirk in generateOutOfLine.
677
678         * jit/JITMathIC.h:
679         (generateOutOfLine): Append "&& !COMPILER(CLANG)" to "#if COMPILER(MSVC)".
680
681 2018-09-19  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
682
683         [JSC] Optimize Array#indexOf in C++ runtime
684         https://bugs.webkit.org/show_bug.cgi?id=189507
685
686         Reviewed by Saam Barati.
687
688         C++ Array#indexOf runtime function takes so much time in babylon benchmark in
689         web-tooling-benchmark. While our DFG and FTL has Array#indexOf optimization
690         and actually it is working well, C++ Array#indexOf is called significant amount
691         of time before tiering up, and it takes 6.74% of jsc main thread samples according
692         to perf command in Linux. This is because C++ Array#indexOf is too generic and
693         misses the chance to optimize JSArray cases.
694
695         This patch adds JSArray fast path for Array#indexOf. If we know that indexed
696         access to the given JSArray is non-observable and indexing type is good for the fast
697         path, we go to the fast path. This makes sampling of Array#indexOf 3.83% in
698         babylon web-tooling-benchmark.
699
700         * runtime/ArrayPrototype.cpp:
701         (JSC::arrayProtoFuncIndexOf):
702         * runtime/JSArray.h:
703         * runtime/JSArrayInlines.h:
704         (JSC::JSArray::canDoFastIndexedAccess):
705         (JSC::toLength):
706         * runtime/JSCJSValueInlines.h:
707         (JSC::JSValue::JSValue):
708         * runtime/JSGlobalObject.h:
709         * runtime/JSGlobalObjectInlines.h:
710         (JSC::JSGlobalObject::isArrayPrototypeIndexedAccessFastAndNonObservable):
711         (JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable):
712         * runtime/MathCommon.h:
713         (JSC::canBeStrictInt32):
714         (JSC::canBeInt32):
715
716 2018-09-19  Michael Saboff  <msaboff@apple.com>
717
718         Add functions to measure memory footprint to JSC
719         https://bugs.webkit.org/show_bug.cgi?id=189768
720
721         Reviewed by Saam Barati.
722
723         Provide system memory metrics for the current process to aid in memory reduction measurement and
724         tuning using native JS tests.
725
726         * jsc.cpp:
727         (MemoryFootprint::now):
728         (MemoryFootprint::resetPeak):
729         (GlobalObject::finishCreation):
730         (JSCMemoryFootprint::JSCMemoryFootprint):
731         (JSCMemoryFootprint::createStructure):
732         (JSCMemoryFootprint::create):
733         (JSCMemoryFootprint::finishCreation):
734         (JSCMemoryFootprint::addProperty):
735         (functionResetMemoryPeak):
736
737 2018-09-19  Saam barati  <sbarati@apple.com>
738
739         CheckStructureOrEmpty should pass in a tempGPR to emitStructureCheck since it may jump over that code
740         https://bugs.webkit.org/show_bug.cgi?id=189703
741
742         Reviewed by Mark Lam.
743
744         This fixes a crash that a TypeProfiler change revealed.
745
746         * dfg/DFGSpeculativeJIT64.cpp:
747         (JSC::DFG::SpeculativeJIT::compile):
748
749 2018-09-19  Saam barati  <sbarati@apple.com>
750
751         AI rule for MultiPutByOffset executes its effects in the wrong order
752         https://bugs.webkit.org/show_bug.cgi?id=189757
753         <rdar://problem/43535257>
754
755         Reviewed by Michael Saboff.
756
757         The AI rule for MultiPutByOffset was executing effects in the wrong order.
758         It first executed the transition effects and the effects on the base, and
759         then executed the filtering effects on the value being stored. However, you
760         can end up with the wrong type when the base and the value being stored
761         are the same. E.g, in a program like `o.f = o`. These effects need to happen
762         in the opposite order, modeling what happens in the runtime executing of
763         MultiPutByOffset.
764
765         * dfg/DFGAbstractInterpreterInlines.h:
766         (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
767
768 2018-09-18  Mark Lam  <mark.lam@apple.com>
769
770         Ensure that ForInContexts are invalidated if their loop local is over-written.
771         https://bugs.webkit.org/show_bug.cgi?id=189571
772         <rdar://problem/44402277>
773
774         Reviewed by Saam Barati.
775
776         Instead of hunting down every place in the BytecodeGenerator that potentially
777         needs to invalidate an enclosing ForInContext (if one exists), we simply iterate
778         the bytecode range of the loop body when the ForInContext is popped, and
779         invalidate the context if we ever find the loop temp variable over-written.
780
781         This has 2 benefits:
782         1. It ensures that every type of opcode that can write to the loop temp will be
783            handled appropriately, not just the op_mov that we've hunted down.
784         2. It avoids us having to check the BytecodeGenerator's m_forInContextStack
785            every time we emit an op_mov (or other opcodes that can write to a local)
786            even when we're not inside a for-in loop.
787
788         JSC benchmarks show that that this change is performance neutral.
789
790         * bytecompiler/BytecodeGenerator.cpp:
791         (JSC::BytecodeGenerator::pushIndexedForInScope):
792         (JSC::BytecodeGenerator::popIndexedForInScope):
793         (JSC::BytecodeGenerator::pushStructureForInScope):
794         (JSC::BytecodeGenerator::popStructureForInScope):
795         (JSC::ForInContext::finalize):
796         (JSC::StructureForInContext::finalize):
797         (JSC::IndexedForInContext::finalize):
798         (JSC::BytecodeGenerator::invalidateForInContextForLocal): Deleted.
799         * bytecompiler/BytecodeGenerator.h:
800         (JSC::ForInContext::ForInContext):
801         (JSC::ForInContext::bodyBytecodeStartOffset const):
802         (JSC::StructureForInContext::StructureForInContext):
803         (JSC::IndexedForInContext::IndexedForInContext):
804         * bytecompiler/NodesCodegen.cpp:
805         (JSC::PostfixNode::emitResolve):
806         (JSC::PrefixNode::emitResolve):
807         (JSC::ReadModifyResolveNode::emitBytecode):
808         (JSC::AssignResolveNode::emitBytecode):
809         (JSC::EmptyLetExpression::emitBytecode):
810         (JSC::ForInNode::emitLoopHeader):
811         (JSC::ForOfNode::emitBytecode):
812         (JSC::BindingNode::bindValue const):
813         (JSC::AssignmentElementNode::bindValue const):
814         * runtime/CommonSlowPaths.cpp:
815         (JSC::SLOW_PATH_DECL):
816
817 2018-09-17  Devin Rousso  <drousso@apple.com>
818
819         Web Inspector: generate CSSKeywordCompletions from backend values
820         https://bugs.webkit.org/show_bug.cgi?id=189041
821
822         Reviewed by Joseph Pecoraro.
823
824         * inspector/protocol/CSS.json:
825         Include an optional `aliases` array and `inherited` boolean for `CSSPropertyInfo`.
826
827 2018-09-17  Saam barati  <sbarati@apple.com>
828
829         We must convert ProfileType to CheckStructureOrEmpty instead of CheckStructure
830         https://bugs.webkit.org/show_bug.cgi?id=189676
831         <rdar://problem/39682897>
832
833         Reviewed by Michael Saboff.
834
835         Because the incoming value may be TDZ, CheckStructure may end up crashing.
836         Since the Type Profile does not currently record TDZ values in any of its
837         data structures, this is not a semantic change in how it will show you data.
838         It just fixes crashes when we emit a CheckStructure and the incoming value
839         is TDZ.
840
841         * dfg/DFGFixupPhase.cpp:
842         (JSC::DFG::FixupPhase::fixupNode):
843         * dfg/DFGNode.h:
844         (JSC::DFG::Node::convertToCheckStructureOrEmpty):
845
846 2018-09-17  Darin Adler  <darin@apple.com>
847
848         Use OpaqueJSString rather than JSRetainPtr inside WebKit
849         https://bugs.webkit.org/show_bug.cgi?id=189652
850
851         Reviewed by Saam Barati.
852
853         * API/JSCallbackObjectFunctions.h: Removed an uneeded include of
854         JSStringRef.h.
855
856         * API/JSContext.mm:
857         (-[JSContext evaluateScript:withSourceURL:]): Use OpaqueJSString::create rather
858         than JSStringCreateWithCFString, simplifying the code and also obviating the
859         need for explicit JSStringRelease.
860         (-[JSContext setName:]): Ditto.
861
862         * API/JSStringRef.cpp:
863         (JSStringIsEqualToUTF8CString): Use adoptRef rather than explicit JSStringRelease.
864         It seems that additional optimization is possible, obviating the need to allocate
865         an OpaqueJSString, but that's true almost everywhere else in this patch, too.
866
867         * API/JSValue.mm:
868         (+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): Use
869         OpaqueJSString::create and adoptRef as appropriate.
870         (+[JSValue valueWithNewErrorFromMessage:inContext:]): Ditto.
871         (+[JSValue valueWithNewSymbolFromDescription:inContext:]): Ditto.
872         (performPropertyOperation): Ditto.
873         (-[JSValue invokeMethod:withArguments:]): Ditto.
874         (valueToObjectWithoutCopy): Ditto.
875         (containerValueToObject): Ditto.
876         (valueToString): Ditto.
877         (objectToValueWithoutCopy): Ditto.
878         (objectToValue): Ditto.
879
880 2018-09-08  Darin Adler  <darin@apple.com>
881
882         Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
883         https://bugs.webkit.org/show_bug.cgi?id=189455
884
885         Reviewed by Keith Miller.
886
887         * API/JSObjectRef.cpp:
888         (OpaqueJSPropertyNameArray): Use Ref<OpaqueJSString> instead of
889         JSRetainPtr<JSStringRef>.
890         (JSObjectCopyPropertyNames): Remove now-unneeded use of leakRef and
891         adopt constructor.
892         (JSPropertyNameArrayGetNameAtIndex): Use ptr() instead of get() since
893         the array elements are now Ref.
894
895         * API/JSRetainPtr.h: While JSRetainPtr is written as a template,
896         it only works for two specific unrelated types, JSStringRef and
897         JSGlobalContextRef. Simplified the default constructor using data
898         member initialization. Prepared to make the adopt constructor private
899         (got everything compiling that way, then made it public again so that
900         Apple internal software will still build). Got rid of unneeded
901         templated constructor and assignment operator, since it's not relevant
902         since there is no inheritance between JSRetainPtr template types.
903         Added WARN_UNUSED_RETURN to leakRef as in RefPtr and RetainPtr.
904         Added move constructor and move assignment operator for slightly better
905         performance. Simplified implementations of various member functions
906         so they are more obviously correct, by using leakPtr in more of them
907         and using std::exchange to make the flow of values more obvious.
908
909         * API/JSValue.mm:
910         (+[JSValue valueWithNewSymbolFromDescription:inContext:]): Added a
911         missing JSStringRelease to fix a leak.
912
913         * API/tests/CustomGlobalObjectClassTest.c:
914         (customGlobalObjectClassTest): Added a JSGlobalContextRelease to fix a leak.
915         (globalObjectSetPrototypeTest): Ditto.
916         (globalObjectPrivatePropertyTest): Ditto.
917
918         * API/tests/ExecutionTimeLimitTest.cpp:
919         (testResetAfterTimeout): Added a call to JSStringRelease to fix a leak.
920         (testExecutionTimeLimit): Ditto, lots more.
921
922         * API/tests/FunctionOverridesTest.cpp:
923         (testFunctionOverrides): Added a call to JSStringRelease to fix a leak.
924
925         * API/tests/JSObjectGetProxyTargetTest.cpp:
926         (testJSObjectGetProxyTarget): Added a call to JSGlobalContextRelease to fix
927         a leak.
928
929         * API/tests/PingPongStackOverflowTest.cpp:
930         (testPingPongStackOverflow): Added calls to JSGlobalContextRelease and
931         JSStringRelease to fix leaks.
932
933         * API/tests/testapi.c:
934         (throwException): Added. Helper function for repeated idiom where we want
935         to throw an exception, but with additional JSStringRelease calls so we don't
936         have to leak just to keep the code simpler to read.
937         (MyObject_getProperty): Use throwException.
938         (MyObject_setProperty): Ditto.
939         (MyObject_deleteProperty): Ditto.
940         (isValueEqualToString): Added. Helper function for an idiom where we check
941         if something is a string and then if it's equal to a particular string
942         constant, but a version that has an additional JSStringRelease call so we
943         don't have to leak just to keep the code simpler to read.
944         (MyObject_callAsFunction): Use isValueEqualToString and throwException.
945         (MyObject_callAsConstructor): Ditto.
946         (MyObject_hasInstance): Ditto.
947         (globalContextNameTest): Added a JSGlobalContextRelease to fix a leak.
948         (testMarkingConstraintsAndHeapFinalizers): Ditto.
949
950 2018-09-14  Saam barati  <sbarati@apple.com>
951
952         Don't dump OSRAvailabilityData in Graph::dump because a stale Availability may point to a Node that is already freed
953         https://bugs.webkit.org/show_bug.cgi?id=189628
954         <rdar://problem/39481690>
955
956         Reviewed by Mark Lam.
957
958         An Availability may point to a Node. And that Node may be removed from
959         the graph, e.g, it's freed and its memory is no longer owned by Graph.
960         This patch makes it so we no longer dump this metadata by default. If
961         this metadata is interesting to you, you'll need to go in and change
962         Graph::dump to dump the needed metadata.
963
964         * dfg/DFGGraph.cpp:
965         (JSC::DFG::Graph::dump):
966
967 2018-09-14  Mark Lam  <mark.lam@apple.com>
968
969         Refactor some ForInContext code for better encapsulation.
970         https://bugs.webkit.org/show_bug.cgi?id=189626
971         <rdar://problem/44466415>
972
973         Reviewed by Keith Miller.
974
975         1. Add a ForInContext::m_type field to store the context type.  This does not
976            increase the class size, but eliminates the need for a virtual call to get the
977            type.
978
979            Note: we still need a virtual destructor because we'll be mingling
980            IndexedForInContexts and StructureForInContexts in the BytecodeGenerator::m_forInContextStack.
981
982         2. Add ForInContext::isIndexedForInContext() and ForInContext::isStructureForInContext()
983            convenience methods.
984
985         3. Add ForInContext::asIndexedForInContext() and ForInContext::asStructureForInContext()
986            to do the casting to the subclass types.  This ensures that we'll properly
987            assert that the casting is legal.
988
989         * bytecompiler/BytecodeGenerator.cpp:
990         (JSC::BytecodeGenerator::emitGetByVal):
991         (JSC::BytecodeGenerator::popIndexedForInScope):
992         (JSC::BytecodeGenerator::popStructureForInScope):
993         * bytecompiler/BytecodeGenerator.h:
994         (JSC::ForInContext::type const):
995         (JSC::ForInContext::isIndexedForInContext const):
996         (JSC::ForInContext::isStructureForInContext const):
997         (JSC::ForInContext::asIndexedForInContext):
998         (JSC::ForInContext::asStructureForInContext):
999         (JSC::ForInContext::ForInContext):
1000         (JSC::StructureForInContext::StructureForInContext):
1001         (JSC::IndexedForInContext::IndexedForInContext):
1002         (JSC::ForInContext::~ForInContext): Deleted.
1003
1004 2018-09-14  Devin Rousso  <webkit@devinrousso.com>
1005
1006         Web Inspector: Record actions performed on ImageBitmapRenderingContext
1007         https://bugs.webkit.org/show_bug.cgi?id=181341
1008
1009         Reviewed by Joseph Pecoraro.
1010
1011         * inspector/protocol/Recording.json:
1012         * inspector/scripts/codegen/generator.py:
1013
1014 2018-09-14  Mike Gorse  <mgorse@suse.com>
1015
1016         builtins directory causes name conflict on Python 3
1017         https://bugs.webkit.org/show_bug.cgi?id=189552
1018
1019         Reviewed by Michael Catanzaro.
1020
1021         * CMakeLists.txt: builtins -> wkbuiltins.
1022         * DerivedSources.make: builtins -> wkbuiltins.
1023         * Scripts/generate-js-builtins.py: import wkbuiltins, rather than
1024           builtins.
1025         * Scripts/wkbuiltins/__init__.py: Renamed from Source/JavaScriptCore/Scripts/builtins/__init__.py.
1026         * Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
1027         * Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
1028         * Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
1029         * Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
1030         * Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
1031         * Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
1032         * Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
1033         * Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
1034         * Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
1035         * Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
1036         * JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.
1037
1038 2018-09-13  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1039
1040         [WebAssembly] Inline WasmContext accessor functions
1041         https://bugs.webkit.org/show_bug.cgi?id=189416
1042
1043         Reviewed by Saam Barati.
1044
1045         WasmContext accessor functions are very small while it resides in the critical path of
1046         JS to Wasm function call. This patch makes them inline to improve performance.
1047         This change improves a small benchmark (calling JS to Wasm function 1e7 times) from 320ms to 270ms.
1048
1049         * JavaScriptCore.xcodeproj/project.pbxproj:
1050         * Sources.txt:
1051         * interpreter/CallFrame.cpp:
1052         * jit/AssemblyHelpers.cpp:
1053         * wasm/WasmB3IRGenerator.cpp:
1054         * wasm/WasmContextInlines.h: Renamed from Source/JavaScriptCore/wasm/WasmContext.cpp.
1055         (JSC::Wasm::Context::useFastTLS):
1056         (JSC::Wasm::Context::load const):
1057         (JSC::Wasm::Context::store):
1058         * wasm/WasmMemoryInformation.cpp:
1059         * wasm/WasmModuleParser.cpp: Include <wtf/SHA1.h> due to changes of unified source combinations.
1060         * wasm/js/JSToWasm.cpp:
1061         * wasm/js/WebAssemblyFunction.cpp:
1062
1063 2018-09-12  David Kilzer  <ddkilzer@apple.com>
1064
1065         Move JavaScriptCore files to match Xcode project hierarchy
1066         <https://webkit.org/b/189574>
1067
1068         Reviewed by Filip Pizlo.
1069
1070         * API/JSAPIValueWrapper.cpp: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp.
1071         * API/JSAPIValueWrapper.h: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.h.
1072         * CMakeLists.txt: Update for new path to
1073         generateYarrUnicodePropertyTables.py, hasher.py and
1074         JSAPIValueWrapper.h.
1075         * DerivedSources.make: Ditto. Add missing dependency on
1076         hasher.py captured by CMakeLists.txt.
1077         * JavaScriptCore.xcodeproj/project.pbxproj: Update for new file
1078         reference paths. Add hasher.py library to project.
1079         * Sources.txt: Update for new path to
1080         JSAPIValueWrapper.cpp.
1081         * runtime/JSImmutableButterfly.h: Add missing includes
1082         after changes to Sources.txt and regenerating unified
1083         sources.
1084         * runtime/RuntimeType.h: Ditto.
1085         * yarr/generateYarrUnicodePropertyTables.py: Rename from Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py.
1086         * yarr/hasher.py: Rename from Source/JavaScriptCore/Scripts/hasher.py.
1087
1088 2018-09-12  David Kilzer  <ddkilzer@apple.com>
1089
1090         Let Xcode have its way with the JavaScriptCore project
1091
1092         * JavaScriptCore.xcodeproj/project.pbxproj:
1093
1094 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
1095
1096         Add IGNORE_WARNING_.* macros
1097         https://bugs.webkit.org/show_bug.cgi?id=188996
1098
1099         Reviewed by Michael Catanzaro.
1100
1101         * API/JSCallbackObject.h:
1102         * API/tests/testapi.c:
1103         * assembler/LinkBuffer.h:
1104         (JSC::LinkBuffer::finalizeCodeWithDisassembly):
1105         * b3/B3LowerToAir.cpp:
1106         * b3/B3Opcode.cpp:
1107         * b3/B3Type.h:
1108         * b3/B3TypeMap.h:
1109         * b3/B3Width.h:
1110         * b3/air/AirArg.cpp:
1111         * b3/air/AirArg.h:
1112         * b3/air/AirCode.h:
1113         * bytecode/Opcode.h:
1114         (JSC::padOpcodeName):
1115         * dfg/DFGSpeculativeJIT.cpp:
1116         (JSC::DFG::SpeculativeJIT::speculateNumber):
1117         (JSC::DFG::SpeculativeJIT::speculateMisc):
1118         * dfg/DFGSpeculativeJIT64.cpp:
1119         * ftl/FTLOutput.h:
1120         * jit/CCallHelpers.h:
1121         (JSC::CCallHelpers::calculatePokeOffset):
1122         * llint/LLIntData.cpp:
1123         * llint/LLIntSlowPaths.cpp:
1124         (JSC::LLInt::slowPathLogF):
1125         * runtime/ConfigFile.cpp:
1126         (JSC::ConfigFile::canonicalizePaths):
1127         * runtime/JSDataViewPrototype.cpp:
1128         * runtime/JSGenericTypedArrayViewConstructor.h:
1129         * runtime/JSGenericTypedArrayViewPrototype.h:
1130         * runtime/Options.cpp:
1131         (JSC::Options::setAliasedOption):
1132         * tools/CodeProfiling.cpp:
1133         * wasm/WasmSections.h:
1134         * wasm/generateWasmValidateInlinesHeader.py:
1135
1136 == Rolled over to ChangeLog-2018-09-11 ==