1 2018-01-04 Yusuke Suzuki <utatane.tea@gmail.com>
3 [JSC] Remove LocalScope
4 https://bugs.webkit.org/show_bug.cgi?id=181206
6 Reviewed by Geoffrey Garen.
8 The last user of HandleStack and LocalScope is JSON. But MarkedArgumentBuffer is enough for their use.
9 This patch changes JSON parsing and stringifying to using MarkedArgumentBuffer. And remove HandleStack
12 We make Stringifier and Walker WTF_FORBID_HEAP_ALLOCATION to place them on the stack. So they can hold
13 JSObject* directly in their fields.
15 * JavaScriptCore.xcodeproj/project.pbxproj:
17 * heap/HandleStack.cpp: Removed.
18 * heap/HandleStack.h: Removed.
20 (JSC::Heap::addCoreConstraints):
22 (JSC::Heap::handleSet):
23 (JSC::Heap::handleStack): Deleted.
24 * heap/Local.h: Removed.
25 * heap/LocalScope.h: Removed.
26 * runtime/JSONObject.cpp:
27 (JSC::Stringifier::Holder::object const):
29 (JSC::Stringifier::Stringifier):
30 (JSC::Stringifier::stringify):
31 (JSC::Stringifier::appendStringifiedValue):
32 (JSC::Stringifier::Holder::Holder):
33 (JSC::Stringifier::Holder::appendNextProperty):
34 (JSC::Walker::Walker):
35 (JSC::Walker::callReviver):
37 (JSC::JSONProtoFuncParse):
38 (JSC::JSONProtoFuncStringify):
42 2018-01-04 Yusuke Suzuki <utatane.tea@gmail.com>
44 [FTL] Optimize ObjectAllocationSinking mergePointerSets by using removeIf
45 https://bugs.webkit.org/show_bug.cgi?id=180238
47 Reviewed by Saam Barati.
49 We can optimize ObjectAllocationSinking a bit by using removeIf.
51 * dfg/DFGObjectAllocationSinkingPhase.cpp:
53 2018-01-04 Yusuke Suzuki <utatane.tea@gmail.com>
55 [JSC] Create parallel SlotVisitors apriori
56 https://bugs.webkit.org/show_bug.cgi?id=180907
58 Reviewed by Saam Barati.
60 The number of SlotVisitors are capped with the number of HeapHelperPool's threads + 2.
61 If we create these SlotVisitors apriori, we do not need to create SlotVisitors dynamically.
62 Then we do not need to grab locks while iterating all the SlotVisitors.
64 In addition, we do not need to consider the case that the number of SlotVisitors increases
65 after setting up VisitCounters in MarkingConstraintSolver since the number of SlotVisitors
66 does not increase any more.
70 (JSC::Heap::runBeginPhase):
73 (JSC::Heap::forEachSlotVisitor):
74 (JSC::Heap::numberOfSlotVisitors): Deleted.
75 * heap/MarkingConstraintSolver.cpp:
76 (JSC::MarkingConstraintSolver::didVisitSomething const):
78 2018-01-03 Ting-Wei Lan <lantw44@gmail.com>
80 Replace hard-coded paths in shebangs with #!/usr/bin/env
81 https://bugs.webkit.org/show_bug.cgi?id=181040
83 Reviewed by Alex Christensen.
85 * Scripts/UpdateContents.py:
87 * Scripts/generate-combined-inspector-json.py:
90 * generate-bytecode-files:
91 * wasm/generateWasm.py:
92 * wasm/generateWasmOpsHeader.py:
93 * yarr/generateYarrCanonicalizeUnicode:
95 2018-01-03 Michael Saboff <msaboff@apple.com>
97 Disable SharedArrayBuffers from Web API
98 https://bugs.webkit.org/show_bug.cgi?id=181266
100 Reviewed by Saam Barati.
102 Removed SharedArrayBuffer prototype and structure from GlobalObject creation
105 * runtime/JSGlobalObject.cpp:
106 (JSC::JSGlobalObject::init):
107 (JSC::JSGlobalObject::visitChildren):
108 * runtime/JSGlobalObject.h:
109 (JSC::JSGlobalObject::arrayBufferPrototype const):
110 (JSC::JSGlobalObject::arrayBufferStructure const):
112 2018-01-03 Michael Saboff <msaboff@apple.com>
114 Add "noInline" to $vm
115 https://bugs.webkit.org/show_bug.cgi?id=181265
117 Reviewed by Mark Lam.
119 This would be useful for web based tests.
121 * tools/JSDollarVM.cpp:
122 (JSC::getExecutableForFunction):
123 (JSC::functionNoInline):
124 (JSC::JSDollarVM::finishCreation):
126 2018-01-03 Michael Saboff <msaboff@apple.com>
128 Remove unnecessary flushing of Butterfly pointer in functionCpuClflush()
129 https://bugs.webkit.org/show_bug.cgi?id=181263
131 Reviewed by Mark Lam.
133 Flushing the butterfly pointer provides no benefit and slows this function.
135 * tools/JSDollarVM.cpp:
136 (JSC::functionCpuClflush):
138 2018-01-03 Saam Barati <sbarati@apple.com>
140 Fix BytecodeParser op_catch assert to work with useProfiler=1
141 https://bugs.webkit.org/show_bug.cgi?id=181260
143 Reviewed by Keith Miller.
145 op_catch was asserting that the current block was empty. This is only true
146 if the profiler isn't enabled. When the profiler is enabled, we will
147 insert a CountExecution node before each bytecode. This patch fixes the
148 assert to work with the profiler.
150 * dfg/DFGByteCodeParser.cpp:
151 (JSC::DFG::ByteCodeParser::parseBlock):
153 2018-01-03 Per Arne Vollan <pvollan@apple.com>
155 [Win][Debug] testapi link error.
156 https://bugs.webkit.org/show_bug.cgi?id=181247
157 <rdar://problem/36166729>
159 Reviewed by Brent Fulgham.
161 Do not set the runtime library compile flag for C files, it is already set to the correct value.
163 * shell/PlatformWin.cmake:
165 2018-01-03 Robin Morisset <rmorisset@apple.com>
167 Inlining of a function that ends in op_unreachable crashes
168 https://bugs.webkit.org/show_bug.cgi?id=181027
170 Reviewed by Filip Pizlo.
172 * dfg/DFGByteCodeParser.cpp:
173 (JSC::DFG::ByteCodeParser::allocateTargetableBlock):
174 (JSC::DFG::ByteCodeParser::inlineCall):
176 2018-01-02 Saam Barati <sbarati@apple.com>
178 Incorrect assertion inside AccessCase
179 https://bugs.webkit.org/show_bug.cgi?id=181200
180 <rdar://problem/35494754>
182 Reviewed by Yusuke Suzuki.
184 Consider a PutById compiled to a setter in a function like so:
187 function foo(o) { o.f = o; }
190 The DFG will often assign the same registers to the baseGPR (o in o.f) and the
191 valueRegsPayloadGPR (o in the RHS). The code totally works when these are assigned
192 to the same register. However, we're asserting that they're not the same register.
193 This patch just removes this invalid assertion.
195 * bytecode/AccessCase.cpp:
196 (JSC::AccessCase::generateImpl):
198 2018-01-02 Caio Lima <ticaiolima@gmail.com>
200 [ESNext][BigInt] Implement BigIntConstructor and BigIntPrototype
201 https://bugs.webkit.org/show_bug.cgi?id=175359
203 Reviewed by Yusuke Suzuki.
205 This patch is implementing BigIntConstructor and BigIntPrototype
206 following spec[1, 2]. As addition, we are also implementing BigIntObject
207 warapper to handle ToObject(v) abstract operation when "v" is a BigInt
208 primitive. With these classes, now it's possible to syntetize
209 BigInt.prototype and then call "toString", "valueOf" and
210 "toLocaleString" when the primitive is a BigInt.
211 BigIntConstructor exposes an API to parse other primitives such as
212 Number, Boolean and String to BigInt.
213 We decided to skip parseInt implementation, since it was removed from
216 [1] - https://tc39.github.io/proposal-bigint/#sec-bigint-constructor
217 [2] - https://tc39.github.io/proposal-bigint/#sec-properties-of-the-bigint-prototype-object
220 * DerivedSources.make:
221 * JavaScriptCore.xcodeproj/project.pbxproj:
224 * runtime/BigIntConstructor.cpp: Added.
225 (JSC::BigIntConstructor::BigIntConstructor):
226 (JSC::BigIntConstructor::finishCreation):
227 (JSC::isSafeInteger):
229 (JSC::callBigIntConstructor):
230 (JSC::bigIntConstructorFuncAsUintN):
231 (JSC::bigIntConstructorFuncAsIntN):
232 * runtime/BigIntConstructor.h: Added.
233 (JSC::BigIntConstructor::create):
234 (JSC::BigIntConstructor::createStructure):
235 * runtime/BigIntObject.cpp: Added.
236 (JSC::BigIntObject::BigIntObject):
237 (JSC::BigIntObject::finishCreation):
238 (JSC::BigIntObject::toStringName):
239 (JSC::BigIntObject::defaultValue):
240 * runtime/BigIntObject.h: Added.
241 (JSC::BigIntObject::create):
242 (JSC::BigIntObject::internalValue const):
243 (JSC::BigIntObject::createStructure):
244 * runtime/BigIntPrototype.cpp: Added.
245 (JSC::BigIntPrototype::BigIntPrototype):
246 (JSC::BigIntPrototype::finishCreation):
247 (JSC::toThisBigIntValue):
248 (JSC::bigIntProtoFuncToString):
249 (JSC::bigIntProtoFuncToLocaleString):
250 (JSC::bigIntProtoFuncValueOf):
251 * runtime/BigIntPrototype.h: Added.
252 (JSC::BigIntPrototype::create):
253 (JSC::BigIntPrototype::createStructure):
254 * runtime/IntlCollator.cpp:
255 (JSC::IntlCollator::initializeCollator):
256 * runtime/IntlNumberFormat.cpp:
257 (JSC::IntlNumberFormat::initializeNumberFormat):
258 * runtime/JSBigInt.cpp:
259 (JSC::JSBigInt::createFrom):
260 (JSC::JSBigInt::parseInt):
261 (JSC::JSBigInt::toObject const):
262 * runtime/JSBigInt.h:
263 * runtime/JSCJSValue.cpp:
264 (JSC::JSValue::synthesizePrototype const):
265 * runtime/JSCPoisonedPtr.cpp:
266 * runtime/JSCell.cpp:
267 (JSC::JSCell::toObjectSlow const):
268 * runtime/JSGlobalObject.cpp:
269 (JSC::JSGlobalObject::init):
270 (JSC::JSGlobalObject::visitChildren):
271 * runtime/JSGlobalObject.h:
272 (JSC::JSGlobalObject::bigIntPrototype const):
273 (JSC::JSGlobalObject::bigIntObjectStructure const):
274 * runtime/StructureCache.h:
275 * runtime/StructureInlines.h:
276 (JSC::prototypeForLookupPrimitiveImpl):
278 2018-01-02 Tim Horton <timothy_horton@apple.com>
280 Fix the MathCommon build with a recent compiler
281 https://bugs.webkit.org/show_bug.cgi?id=181216
283 Reviewed by Sam Weinig.
285 * runtime/MathCommon.cpp:
287 This cast drops the 'const' qualifier from the pointer to 'one',
288 but it doesn't have to, and it makes the compiler sad.
290 == Rolled over to ChangeLog-2018-01-01 ==