Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2016-09-26  Daniel Bates  <dabates@apple.com>
2
3         Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
4         https://bugs.webkit.org/show_bug.cgi?id=162365
5
6         Reviewed by Simon Fraser.
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2016-09-26  Benjamin Poulain  <benjamin@webkit.org>
11
12         [JSC] Shrink the Math inline caches some more
13         https://bugs.webkit.org/show_bug.cgi?id=162485
14
15         Reviewed by Saam Barati.
16
17         This patch applies some lessons learnt from op_negate
18         to shrink the generated asm of the previous 3 inline
19         caches.
20
21         In order of importance:
22         -We do not need to pass the pointer to ArithProfile
23          on the slow path. We can just get the profile out
24          of the Math IC.
25          This saves us from materializing a 64bits value
26          in a register before the call on the slow path.
27         -We can remove a bunch of mov by setting up the registers
28          in the way the slow path needs them.
29          The slow path makes a function calls with the input
30          as second and third arguments, and return the result in
31          the "return register". By using those as target when
32          loading/storing from the stack, we remove 3 mov per slow path.
33         -When performing integer add, we can set the result directly in
34          the output register if that does not trashes one of the input
35          register. This removes one mov per integer add.
36
37         The inline cache average sizes on Sunspider change as follow:
38         -Adds: 147.573099->131.555556 (~10%)
39         -Muls: 186.882353->170.991597 (~8%)
40         -Subs: 139.127907->121.523256 (~12%)
41
42         * jit/JIT.h:
43         * jit/JITAddGenerator.cpp:
44         (JSC::JITAddGenerator::generateInline):
45         (JSC::JITAddGenerator::generateFastPath):
46         * jit/JITArithmetic.cpp:
47         (JSC::JIT::emitMathICFast):
48         (JSC::JIT::emitMathICSlow):
49         * jit/JITInlines.h:
50         (JSC::JIT::callOperation): Deleted.
51         * jit/JITOperations.cpp:
52         * jit/JITOperations.h:
53
54 2016-09-26  Mark Lam  <mark.lam@apple.com>
55
56         Added RETURN_IF_EXCEPTION() macro and use it for exception checks.
57         https://bugs.webkit.org/show_bug.cgi?id=162521
58
59         Reviewed by Saam Barati.
60
61         Also, where possible, if the return type is JSValue, changed the returned value
62         (on exception) to the empty JSValue (instead of sometimes jsUndefined, jsNull,
63         or the thrown exception value).
64
65         There are a few places where I had to continue to return the previously returned
66         value (instead of the empty JSValue) in order for tests to pass.  This is needed
67         because there are missing exception checks that will need to be added before I
68         can change those to return the empty JSValue too.  Identifying all the places
69         where those checks need to be added is beyond the scope of this patch.  I will
70         work on adding missing exception checks in a subsequent patch.
71
72         In this patch, there is one missing exception check in replaceUsingRegExpSearch()
73         that was easily identified, and is necessary so that Interpreter::execute()
74         functions can return JSValue.  I've added this missing check.
75
76         This patch has passed the JSC and layout tests.
77
78         * dfg/DFGOperations.cpp:
79         (JSC::DFG::operationPutByValInternal):
80         * inspector/JSInjectedScriptHost.cpp:
81         (Inspector::JSInjectedScriptHost::evaluateWithScopeExtension):
82         (Inspector::JSInjectedScriptHost::getInternalProperties):
83         (Inspector::JSInjectedScriptHost::weakMapEntries):
84         (Inspector::JSInjectedScriptHost::weakSetEntries):
85         (Inspector::JSInjectedScriptHost::iteratorEntries):
86         * inspector/JSJavaScriptCallFrame.cpp:
87         (Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):
88         * interpreter/Interpreter.cpp:
89         (JSC::eval):
90         (JSC::sizeOfVarargs):
91         (JSC::Interpreter::execute):
92         (JSC::Interpreter::executeCall):
93         (JSC::Interpreter::executeConstruct):
94         * interpreter/ShadowChicken.cpp:
95         (JSC::ShadowChicken::functionsOnStack):
96         * jit/JITOperations.cpp:
97         (JSC::getByVal):
98         * jsc.cpp:
99         (WTF::ImpureGetter::getOwnPropertySlot):
100         (functionRun):
101         (functionRunString):
102         (functionLoad):
103         (functionLoadString):
104         (functionReadFile):
105         (functionCheckSyntax):
106         (functionSetRandomSeed):
107         (functionLoadModule):
108         (functionCreateBuiltin):
109         (functionCheckModuleSyntax):
110         * llint/LLIntSlowPaths.cpp:
111         (JSC::LLInt::getByVal):
112         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
113         * profiler/ProfilerBytecodeSequence.cpp:
114         (JSC::Profiler::BytecodeSequence::addSequenceProperties):
115         * profiler/ProfilerCompilation.cpp:
116         (JSC::Profiler::Compilation::toJS):
117         * profiler/ProfilerDatabase.cpp:
118         (JSC::Profiler::Database::toJS):
119         * profiler/ProfilerOSRExitSite.cpp:
120         (JSC::Profiler::OSRExitSite::toJS):
121         * profiler/ProfilerOriginStack.cpp:
122         (JSC::Profiler::OriginStack::toJS):
123         * runtime/ArrayPrototype.cpp:
124         (JSC::speciesConstructArray):
125         (JSC::shift):
126         (JSC::unshift):
127         (JSC::arrayProtoFuncToString):
128         (JSC::arrayProtoFuncToLocaleString):
129         (JSC::slowJoin):
130         (JSC::fastJoin):
131         (JSC::arrayProtoFuncJoin):
132         (JSC::arrayProtoFuncPop):
133         (JSC::arrayProtoFuncPush):
134         (JSC::arrayProtoFuncReverse):
135         (JSC::arrayProtoFuncShift):
136         (JSC::arrayProtoFuncSlice):
137         (JSC::arrayProtoFuncSplice):
138         (JSC::arrayProtoFuncUnShift):
139         (JSC::arrayProtoFuncIndexOf):
140         (JSC::arrayProtoFuncLastIndexOf):
141         (JSC::moveElements):
142         (JSC::arrayProtoPrivateFuncConcatMemcpy):
143         * runtime/BooleanConstructor.cpp:
144         (JSC::constructWithBooleanConstructor):
145         * runtime/CommonSlowPaths.h:
146         (JSC::CommonSlowPaths::opIn):
147         * runtime/Completion.cpp:
148         (JSC::loadAndEvaluateModule):
149         (JSC::loadModule):
150         * runtime/ConsoleObject.cpp:
151         (JSC::consoleProtoFuncAssert):
152         (JSC::consoleProtoFuncProfile):
153         (JSC::consoleProtoFuncProfileEnd):
154         (JSC::consoleProtoFuncTakeHeapSnapshot):
155         (JSC::consoleProtoFuncTime):
156         (JSC::consoleProtoFuncTimeEnd):
157         * runtime/DateConstructor.cpp:
158         (JSC::constructDate):
159         (JSC::dateParse):
160         * runtime/DatePrototype.cpp:
161         (JSC::dateProtoFuncToPrimitiveSymbol):
162         (JSC::dateProtoFuncToJSON):
163         * runtime/ErrorConstructor.cpp:
164         (JSC::Interpreter::constructWithErrorConstructor):
165         * runtime/ErrorInstance.cpp:
166         (JSC::ErrorInstance::sanitizedToString):
167         * runtime/ErrorPrototype.cpp:
168         (JSC::errorProtoFuncToString):
169         * runtime/ExceptionScope.h:
170         * runtime/FunctionConstructor.cpp:
171         (JSC::constructFunctionSkippingEvalEnabledCheck):
172         * runtime/GenericArgumentsInlines.h:
173         (JSC::GenericArguments<Type>::copyToArguments):
174         * runtime/GetterSetter.cpp:
175         (JSC::callGetter):
176         * runtime/HashMapImpl.h:
177         (JSC::jsMapHash):
178         (JSC::HashMapImpl::finishCreation):
179         (JSC::HashMapImpl::findBucket):
180         (JSC::HashMapImpl::add):
181         (JSC::HashMapImpl::rehash):
182         * runtime/InspectorInstrumentationObject.cpp:
183         (JSC::inspectorInstrumentationObjectLog):
184         * runtime/InternalFunction.cpp:
185         (JSC::InternalFunction::createSubclassStructure):
186         * runtime/IntlCollator.cpp:
187         (JSC::IntlCollator::initializeCollator):
188         * runtime/IntlCollatorConstructor.cpp:
189         (JSC::constructIntlCollator):
190         (JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
191         * runtime/IntlCollatorPrototype.cpp:
192         (JSC::IntlCollatorFuncCompare):
193         (JSC::IntlCollatorPrototypeGetterCompare):
194         * runtime/IntlDateTimeFormat.cpp:
195         (JSC::toDateTimeOptionsAnyDate):
196         (JSC::IntlDateTimeFormat::initializeDateTimeFormat):
197         * runtime/IntlDateTimeFormatConstructor.cpp:
198         (JSC::constructIntlDateTimeFormat):
199         (JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
200         * runtime/IntlDateTimeFormatPrototype.cpp:
201         (JSC::IntlDateTimeFormatFuncFormatDateTime):
202         (JSC::IntlDateTimeFormatPrototypeGetterFormat):
203         * runtime/IntlNumberFormat.cpp:
204         (JSC::IntlNumberFormat::initializeNumberFormat):
205         * runtime/IntlNumberFormatConstructor.cpp:
206         (JSC::constructIntlNumberFormat):
207         (JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
208         * runtime/IntlNumberFormatPrototype.cpp:
209         (JSC::IntlNumberFormatFuncFormatNumber):
210         (JSC::IntlNumberFormatPrototypeGetterFormat):
211         * runtime/IntlObject.cpp:
212         (JSC::intlBooleanOption):
213         (JSC::intlStringOption):
214         (JSC::intlNumberOption):
215         (JSC::canonicalizeLocaleList):
216         (JSC::supportedLocales):
217         * runtime/IntlObjectInlines.h:
218         (JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):
219         * runtime/IteratorOperations.cpp:
220         (JSC::iteratorNext):
221         (JSC::iteratorStep):
222         (JSC::iteratorClose):
223         (JSC::iteratorForIterable):
224         * runtime/IteratorOperations.h:
225         (JSC::forEachInIterable):
226         * runtime/JSArray.cpp:
227         (JSC::JSArray::pop):
228         (JSC::JSArray::copyToArguments):
229         * runtime/JSArrayBufferConstructor.cpp:
230         (JSC::constructArrayBuffer):
231         * runtime/JSArrayBufferPrototype.cpp:
232         (JSC::arrayBufferProtoFuncSlice):
233         * runtime/JSArrayInlines.h:
234         (JSC::getLength):
235         (JSC::toLength):
236         * runtime/JSBoundFunction.cpp:
237         (JSC::getBoundFunctionStructure):
238         (JSC::JSBoundFunction::create):
239         * runtime/JSCJSValue.cpp:
240         (JSC::JSValue::putToPrimitive):
241         (JSC::JSValue::toStringSlowCase):
242         * runtime/JSCJSValueInlines.h:
243         (JSC::toPreferredPrimitiveType):
244         (JSC::JSValue::getPropertySlot):
245         (JSC::JSValue::equalSlowCaseInline):
246         * runtime/JSDataViewPrototype.cpp:
247         (JSC::getData):
248         (JSC::setData):
249         * runtime/JSFunction.cpp:
250         (JSC::JSFunction::setFunctionName):
251         * runtime/JSGenericTypedArrayView.h:
252         (JSC::JSGenericTypedArrayView::setIndex):
253         * runtime/JSGenericTypedArrayViewConstructorInlines.h:
254         (JSC::constructGenericTypedArrayViewFromIterator):
255         (JSC::constructGenericTypedArrayViewWithArguments):
256         (JSC::constructGenericTypedArrayView):
257         * runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
258         (JSC::speciesConstruct):
259         (JSC::genericTypedArrayViewProtoFuncSet):
260         (JSC::genericTypedArrayViewProtoFuncCopyWithin):
261         (JSC::genericTypedArrayViewProtoFuncIncludes):
262         (JSC::genericTypedArrayViewProtoFuncIndexOf):
263         (JSC::genericTypedArrayViewProtoFuncJoin):
264         (JSC::genericTypedArrayViewProtoFuncLastIndexOf):
265         (JSC::genericTypedArrayViewProtoFuncSlice):
266         (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
267         * runtime/JSGlobalObject.h:
268         (JSC::constructEmptyArray):
269         (JSC::constructArray):
270         (JSC::constructArrayNegativeIndexed):
271         * runtime/JSGlobalObjectFunctions.cpp:
272         (JSC::globalFuncEval):
273         * runtime/JSModuleRecord.cpp:
274         (JSC::JSModuleRecord::instantiateDeclarations):
275         * runtime/JSONObject.cpp:
276         (JSC::Stringifier::stringify):
277         (JSC::Stringifier::toJSON):
278         (JSC::Stringifier::appendStringifiedValue):
279         (JSC::Stringifier::Holder::appendNextProperty):
280         (JSC::Walker::walk):
281         (JSC::JSONProtoFuncParse):
282         * runtime/JSObject.cpp:
283         (JSC::ordinarySetSlow):
284         (JSC::JSObject::setPrototypeWithCycleCheck):
285         (JSC::callToPrimitiveFunction):
286         (JSC::JSObject::defaultHasInstance):
287         (JSC::JSObject::getPropertyNames):
288         (JSC::JSObject::toNumber):
289         (JSC::JSObject::toString):
290         (JSC::JSObject::defineOwnNonIndexProperty):
291         (JSC::JSObject::getGenericPropertyNames):
292         (JSC::JSObject::getMethod):
293         * runtime/JSObjectInlines.h:
294         (JSC::createListFromArrayLike):
295         (JSC::JSObject::getPropertySlot):
296         (JSC::JSObject::getNonIndexPropertySlot):
297         * runtime/JSPromiseConstructor.cpp:
298         (JSC::constructPromise):
299         * runtime/JSPromiseDeferred.cpp:
300         (JSC::JSPromiseDeferred::create):
301         * runtime/JSPropertyNameEnumerator.h:
302         (JSC::propertyNameEnumerator):
303         * runtime/JSPropertyNameIterator.cpp:
304         (JSC::JSPropertyNameIterator::create):
305         * runtime/JSScope.cpp:
306         (JSC::isUnscopable):
307         * runtime/JSString.cpp:
308         (JSC::JSString::equalSlowCase):
309         * runtime/JSStringJoiner.cpp:
310         (JSC::JSStringJoiner::join):
311         * runtime/LiteralParser.cpp:
312         (JSC::LiteralParser<CharType>::parse):
313         * runtime/MapBase.h:
314         (JSC::MapBase::finishCreation):
315         * runtime/MapConstructor.cpp:
316         (JSC::constructMap):
317         * runtime/MathObject.cpp:
318         (JSC::mathProtoFuncClz32):
319         (JSC::mathProtoFuncHypot):
320         (JSC::mathProtoFuncIMul):
321         * runtime/ModuleLoaderPrototype.cpp:
322         (JSC::moduleLoaderPrototypeParseModule):
323         (JSC::moduleLoaderPrototypeRequestedModules):
324         (JSC::moduleLoaderPrototypeModuleDeclarationInstantiation):
325         * runtime/NativeErrorConstructor.cpp:
326         (JSC::Interpreter::constructWithNativeErrorConstructor):
327         * runtime/NumberConstructor.cpp:
328         (JSC::constructWithNumberConstructor):
329         * runtime/ObjectConstructor.cpp:
330         (JSC::constructObject):
331         (JSC::objectConstructorGetPrototypeOf):
332         (JSC::objectConstructorSetPrototypeOf):
333         (JSC::objectConstructorGetOwnPropertyDescriptor):
334         (JSC::objectConstructorGetOwnPropertyDescriptors):
335         (JSC::objectConstructorGetOwnPropertyNames):
336         (JSC::objectConstructorGetOwnPropertySymbols):
337         (JSC::objectConstructorKeys):
338         (JSC::ownEnumerablePropertyKeys):
339         (JSC::toPropertyDescriptor):
340         (JSC::objectConstructorDefineProperty):
341         (JSC::defineProperties):
342         (JSC::objectConstructorSeal):
343         (JSC::objectConstructorFreeze):
344         (JSC::objectConstructorIsSealed):
345         (JSC::objectConstructorIsFrozen):
346         (JSC::objectConstructorIsExtensible):
347         (JSC::ownPropertyKeys):
348         * runtime/ObjectConstructor.h:
349         (JSC::constructObjectFromPropertyDescriptor):
350         * runtime/ObjectPrototype.cpp:
351         (JSC::objectProtoFuncHasOwnProperty):
352         (JSC::objectProtoFuncIsPrototypeOf):
353         (JSC::objectProtoFuncDefineGetter):
354         (JSC::objectProtoFuncDefineSetter):
355         (JSC::objectProtoFuncLookupGetter):
356         (JSC::objectProtoFuncLookupSetter):
357         (JSC::objectProtoFuncPropertyIsEnumerable):
358         (JSC::objectProtoFuncToLocaleString):
359         (JSC::objectProtoFuncToString):
360         * runtime/Operations.cpp:
361         (JSC::jsAddSlowCase):
362         * runtime/PropertyDescriptor.cpp:
363         (JSC::PropertyDescriptor::slowGetterSetter):
364         * runtime/ProxyConstructor.cpp:
365         (JSC::makeRevocableProxy):
366         * runtime/ProxyObject.cpp:
367         (JSC::performProxyGet):
368         (JSC::ProxyObject::performGet):
369         (JSC::ProxyObject::performInternalMethodGetOwnProperty):
370         (JSC::ProxyObject::performHasProperty):
371         (JSC::ProxyObject::performPut):
372         (JSC::ProxyObject::putByIndexCommon):
373         (JSC::performProxyCall):
374         (JSC::performProxyConstruct):
375         (JSC::ProxyObject::performDelete):
376         (JSC::ProxyObject::performPreventExtensions):
377         (JSC::ProxyObject::performIsExtensible):
378         (JSC::ProxyObject::performDefineOwnProperty):
379         (JSC::ProxyObject::performGetOwnPropertyNames):
380         (JSC::ProxyObject::performSetPrototype):
381         (JSC::ProxyObject::performGetPrototype):
382         * runtime/ReflectObject.cpp:
383         (JSC::reflectObjectConstruct):
384         (JSC::reflectObjectDefineProperty):
385         (JSC::reflectObjectGet):
386         (JSC::reflectObjectGetOwnPropertyDescriptor):
387         (JSC::reflectObjectIsExtensible):
388         (JSC::reflectObjectPreventExtensions):
389         (JSC::reflectObjectSet):
390         (JSC::reflectObjectSetPrototypeOf):
391         * runtime/RegExpConstructor.cpp:
392         (JSC::toFlags):
393         (JSC::regExpCreate):
394         (JSC::constructRegExp):
395         * runtime/RegExpConstructor.h:
396         (JSC::isRegExp):
397         * runtime/RegExpObject.cpp:
398         (JSC::collectMatches):
399         (JSC::RegExpObject::matchGlobal):
400         * runtime/RegExpPrototype.cpp:
401         (JSC::regExpProtoFuncCompile):
402         (JSC::flagsString):
403         (JSC::regExpProtoFuncToString):
404         (JSC::regExpProtoGetterFlags):
405         (JSC::regExpProtoFuncSearchFast):
406         (JSC::regExpProtoFuncSplitFast):
407         * runtime/SetConstructor.cpp:
408         (JSC::constructSet):
409         * runtime/StringConstructor.cpp:
410         (JSC::stringFromCodePoint):
411         (JSC::constructWithStringConstructor):
412         * runtime/StringObject.cpp:
413         (JSC::StringObject::defineOwnProperty):
414         * runtime/StringPrototype.cpp:
415         (JSC::replaceUsingRegExpSearch):
416         (JSC::operationStringProtoFuncReplaceRegExpEmptyStr):
417         (JSC::replaceUsingStringSearch):
418         (JSC::replace):
419         (JSC::stringProtoFuncReplaceUsingRegExp):
420         (JSC::stringProtoFuncReplaceUsingStringSearch):
421         (JSC::stringProtoFuncCodePointAt):
422         (JSC::stringProtoFuncSlice):
423         (JSC::stringProtoFuncSplitFast):
424         (JSC::stringProtoFuncSubstr):
425         (JSC::stringProtoFuncSubstring):
426         (JSC::stringProtoFuncLocaleCompare):
427         (JSC::toLocaleCase):
428         (JSC::stringProtoFuncBig):
429         (JSC::stringProtoFuncSmall):
430         (JSC::stringProtoFuncBlink):
431         (JSC::stringProtoFuncBold):
432         (JSC::stringProtoFuncFixed):
433         (JSC::stringProtoFuncItalics):
434         (JSC::stringProtoFuncStrike):
435         (JSC::stringProtoFuncSub):
436         (JSC::stringProtoFuncSup):
437         (JSC::stringProtoFuncFontcolor):
438         (JSC::stringProtoFuncFontsize):
439         (JSC::stringProtoFuncAnchor):
440         (JSC::stringProtoFuncLink):
441         (JSC::trimString):
442         (JSC::stringProtoFuncStartsWith):
443         (JSC::stringProtoFuncEndsWith):
444         (JSC::stringIncludesImpl):
445         (JSC::stringProtoFuncIncludes):
446         (JSC::builtinStringIncludesInternal):
447         (JSC::stringProtoFuncNormalize):
448         * runtime/SymbolConstructor.cpp:
449         (JSC::symbolConstructorFor):
450         * runtime/TemplateRegistry.cpp:
451         (JSC::TemplateRegistry::getTemplateObject):
452         * runtime/WeakMapConstructor.cpp:
453         (JSC::constructWeakMap):
454         * runtime/WeakSetConstructor.cpp:
455         (JSC::constructWeakSet):
456         * tools/JSDollarVMPrototype.cpp:
457         (JSC::functionPrint):
458
459 2016-09-26  Don Olmstead  <don.olmstead@am.sony.com>
460
461         [JSC] Allow fixedExecutableMemoryPoolSize to be set during build
462         https://bugs.webkit.org/show_bug.cgi?id=162514
463
464         Reviewed by Mark Lam.
465
466         * jit/ExecutableAllocator.h:
467
468 == Rolled over to ChangeLog-2016-09-26 ==