Select service worker for documents with data/blob URLS
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2018-01-02  Saam Barati  <sbarati@apple.com>
2
3         Incorrect assertion inside AccessCase
4         https://bugs.webkit.org/show_bug.cgi?id=181200
5         <rdar://problem/35494754>
6
7         Reviewed by Yusuke Suzuki.
8
9         Consider a PutById compiled to a setter in a function like so:
10         
11         ```
12         function foo(o) { o.f = o; }
13         ```
14         
15         The DFG will often assign the same registers to the baseGPR (o in o.f) and the
16         valueRegsPayloadGPR (o in the RHS). The code totally works when these are assigned
17         to the same register. However, we're asserting that they're not the same register.
18         This patch just removes this invalid assertion.
19
20         * bytecode/AccessCase.cpp:
21         (JSC::AccessCase::generateImpl):
22
23 2018-01-02  Caio Lima  <ticaiolima@gmail.com>
24
25         [ESNext][BigInt] Implement BigIntConstructor and BigIntPrototype
26         https://bugs.webkit.org/show_bug.cgi?id=175359
27
28         Reviewed by Yusuke Suzuki.
29
30         This patch is implementing BigIntConstructor and BigIntPrototype
31         following spec[1, 2]. As addition, we are also implementing BigIntObject
32         warapper to handle ToObject(v) abstract operation when "v" is a BigInt
33         primitive. With these classes, now it's possible to syntetize
34         BigInt.prototype and then call "toString", "valueOf" and
35         "toLocaleString" when the primitive is a BigInt.
36         BigIntConstructor exposes an API to parse other primitives such as
37         Number, Boolean and String to BigInt.
38         We decided to skip parseInt implementation, since it was removed from
39         spec.
40
41         [1] - https://tc39.github.io/proposal-bigint/#sec-bigint-constructor
42         [2] - https://tc39.github.io/proposal-bigint/#sec-properties-of-the-bigint-prototype-object 
43
44         * CMakeLists.txt:
45         * DerivedSources.make:
46         * JavaScriptCore.xcodeproj/project.pbxproj:
47         * Sources.txt:
48         * jsc.cpp:
49         * runtime/BigIntConstructor.cpp: Added.
50         (JSC::BigIntConstructor::BigIntConstructor):
51         (JSC::BigIntConstructor::finishCreation):
52         (JSC::isSafeInteger):
53         (JSC::toBigInt):
54         (JSC::callBigIntConstructor):
55         (JSC::bigIntConstructorFuncAsUintN):
56         (JSC::bigIntConstructorFuncAsIntN):
57         * runtime/BigIntConstructor.h: Added.
58         (JSC::BigIntConstructor::create):
59         (JSC::BigIntConstructor::createStructure):
60         * runtime/BigIntObject.cpp: Added.
61         (JSC::BigIntObject::BigIntObject):
62         (JSC::BigIntObject::finishCreation):
63         (JSC::BigIntObject::toStringName):
64         (JSC::BigIntObject::defaultValue):
65         * runtime/BigIntObject.h: Added.
66         (JSC::BigIntObject::create):
67         (JSC::BigIntObject::internalValue const):
68         (JSC::BigIntObject::createStructure):
69         * runtime/BigIntPrototype.cpp: Added.
70         (JSC::BigIntPrototype::BigIntPrototype):
71         (JSC::BigIntPrototype::finishCreation):
72         (JSC::toThisBigIntValue):
73         (JSC::bigIntProtoFuncToString):
74         (JSC::bigIntProtoFuncToLocaleString):
75         (JSC::bigIntProtoFuncValueOf):
76         * runtime/BigIntPrototype.h: Added.
77         (JSC::BigIntPrototype::create):
78         (JSC::BigIntPrototype::createStructure):
79         * runtime/IntlCollator.cpp:
80         (JSC::IntlCollator::initializeCollator):
81         * runtime/IntlNumberFormat.cpp:
82         (JSC::IntlNumberFormat::initializeNumberFormat):
83         * runtime/JSBigInt.cpp:
84         (JSC::JSBigInt::createFrom):
85         (JSC::JSBigInt::parseInt):
86         (JSC::JSBigInt::toObject const):
87         * runtime/JSBigInt.h:
88         * runtime/JSCJSValue.cpp:
89         (JSC::JSValue::synthesizePrototype const):
90         * runtime/JSCPoisonedPtr.cpp:
91         * runtime/JSCell.cpp:
92         (JSC::JSCell::toObjectSlow const):
93         * runtime/JSGlobalObject.cpp:
94         (JSC::JSGlobalObject::init):
95         (JSC::JSGlobalObject::visitChildren):
96         * runtime/JSGlobalObject.h:
97         (JSC::JSGlobalObject::bigIntPrototype const):
98         (JSC::JSGlobalObject::bigIntObjectStructure const):
99         * runtime/StructureCache.h:
100         * runtime/StructureInlines.h:
101         (JSC::prototypeForLookupPrimitiveImpl):
102
103 2018-01-02  Tim Horton  <timothy_horton@apple.com>
104
105         Fix the MathCommon build with a recent compiler
106         https://bugs.webkit.org/show_bug.cgi?id=181216
107
108         Reviewed by Sam Weinig.
109
110         * runtime/MathCommon.cpp:
111         (JSC::fdlibmPow):
112         This cast drops the 'const' qualifier from the pointer to 'one',
113         but it doesn't have to, and it makes the compiler sad.
114
115 == Rolled over to ChangeLog-2018-01-01 ==