REGRESSION(CMake): Make it possible to build without introspection
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2014-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         REGRESSION(CMake): Make it possible to build without introspection
4         https://bugs.webkit.org/show_bug.cgi?id=138006
5
6         Reviewed by Philippe Normand.
7
8         Do not install introspection files when introspection is disabled.
9
10         * PlatformGTK.cmake:
11
12 2014-10-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
13
14         Use std::unique_ptr for TypeCountSet
15         https://bugs.webkit.org/show_bug.cgi?id=138242
16
17         Reviewed by Andreas Kling.
18
19         * heap/Heap.cpp:
20         (JSC::Heap::protectedObjectTypeCounts):
21         Use std::unique_ptr<> instead of PassOwnPtr|OwnPtr.
22         (JSC::Heap::objectTypeCounts): ditto.
23         * heap/Heap.h:
24
25 2014-10-31  Michael Saboff  <msaboff@apple.com>
26
27         Add scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope
28         https://bugs.webkit.org/show_bug.cgi?id=138252
29
30         Reviewed by Geoffrey Garen.
31
32         Added scope operand to op_push_with_scope, op_push_name_scope and op_pop_scope.
33         Although the scope register is filled in with the ScopeChain register for all 
34         three bytecodes, this operand is not used in the processing of the bytecodes.
35         That will be addressed in a future patch.
36
37         * bytecode/BytecodeList.json: Lengthened the three bytecodes.
38         * bytecode/CodeBlock.cpp:
39         (JSC::CodeBlock::dumpBytecode): Added code to dump the scope operand.
40         * bytecompiler/BytecodeGenerator.cpp:
41         (JSC::BytecodeGenerator::BytecodeGenerator):
42         (JSC::BytecodeGenerator::emitPushWithScope):
43         (JSC::BytecodeGenerator::emitPopScope):
44         (JSC::BytecodeGenerator::emitComplexPopScopes):
45         (JSC::BytecodeGenerator::emitPopScopes):
46         (JSC::BytecodeGenerator::emitPushFunctionNameScope):
47         (JSC::BytecodeGenerator::emitPushCatchScope):
48         * bytecompiler/BytecodeGenerator.h:
49         (JSC::BytecodeGenerator::scopeRegister):
50         Added scope register to these emit functions and the bytecodes they emit.
51         New m_scopeRegister and accessor.
52
53         * bytecompiler/NodesCodegen.cpp:
54         (JSC::ContinueNode::emitBytecode):
55         (JSC::BreakNode::emitBytecode):
56         (JSC::ReturnNode::emitBytecode):
57         (JSC::WithNode::emitBytecode):
58         (JSC::TryNode::emitBytecode):
59         Created a RegisterID for the ScopeChain register and used it to emit the updated
60         bytecodes.
61
62         * jit/JITOpcodes.cpp:
63         (JSC::JIT::emit_op_push_with_scope):
64         (JSC::JIT::emit_op_push_name_scope):
65         * jit/JITOpcodes32_64.cpp:
66         (JSC::JIT::emit_op_push_with_scope):
67         (JSC::JIT::emit_op_push_name_scope):
68         * llint/LLIntSlowPaths.cpp:
69         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
70         * llint/LowLevelInterpreter.asm:
71         Updated the operand indecies for the processing of the updated bytecodes.
72
73 2014-10-31  Andreas Kling  <akling@apple.com>
74
75         Make writes to RegExpObject.lastIndex cacheable.
76         <https://webkit.org/b/138255>
77
78         Reviewed by Geoffrey Garen.
79
80         We were neglecting to IC the puts to RegExpObject.lastIndex on Octane/regexp,
81         and ended up spending 4.5% of a time profile in operationPutByIdNonStrict.
82
83         ~3% progression on Octane/regexp.
84
85         * runtime/RegExpObject.cpp:
86         (JSC::regExpObjectSetLastIndexStrict):
87         (JSC::regExpObjectSetLastIndexNonStrict):
88         (JSC::RegExpObject::put):
89
90 2014-10-31  Chris Dumez  <cdumez@apple.com>
91
92         Fix a couple of warnings in JSC reported by clang static analyzer
93         https://bugs.webkit.org/show_bug.cgi?id=138240
94
95         Reviewed by Geoffrey Garen.
96
97         Fix a couple of warnings in JSC reported by clang static analyzer about
98         value stored in variables never being read. This is addressed by
99         reducing the scope of the variable or removing the variable entirely.
100
101         * dfg/DFGConstantFoldingPhase.cpp:
102         (JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
103         * runtime/VM.cpp:
104         (JSC::VM::throwException):
105
106 2014-10-30  Dana Burkart  <dburkart@apple.com>
107
108         <rdar://problem/18821260> Prepare for the mysterious future
109
110         Reviewed by Lucas Forschler.
111
112         * Configurations/Base.xcconfig:
113         * Configurations/DebugRelease.xcconfig:
114         * Configurations/FeatureDefines.xcconfig:
115         * Configurations/Version.xcconfig:
116
117 2014-10-30  Saam Barati  <saambarati1@gmail.com>
118
119         AST Nodes should keep track of their end offset
120         https://bugs.webkit.org/show_bug.cgi?id=138143
121
122         Reviewed by Filip Pizlo.
123
124         AST nodes nodes now have an int property for their end text 
125         offsets. This change lays some foundational work that will be 
126         needed in profiling which basic blocks have executed.
127
128         * parser/ASTBuilder.h:
129         (JSC::ASTBuilder::setEndOffset):
130         * parser/Nodes.h:
131         (JSC::Node::endOffset):
132         (JSC::Node::setEndOffset):
133         * parser/Parser.cpp:
134         (JSC::Parser<LexerType>::parseStatement):
135         (JSC::Parser<LexerType>::parseFunctionInfo):
136         (JSC::Parser<LexerType>::parseExpression):
137         (JSC::Parser<LexerType>::parseProperty):
138         * parser/Parser.h:
139         (JSC::Parser<LexerType>::parse):
140         * parser/SyntaxChecker.h:
141         (JSC::SyntaxChecker::operatorStackPop):
142
143 2014-10-30  Joseph Pecoraro  <pecoraro@apple.com>
144
145         Web Inspector: Generate ObjC inspector protocol types and alternate dispatcher interfaces
146         https://bugs.webkit.org/show_bug.cgi?id=138048
147
148         Reviewed by Brian Burg.
149
150         Generate Objective-C interfaces for inspector protocol types, command, and event dispatchers.
151         This is very much like the InspectorProtocolTypes, BackendDispatchers, and FrontendDispatchers,
152         but with an ObjC spin on things.
153
154         The private API that clients would use is all encapsulated in RWIProtocol.h. It includes the
155         types interfaces, command handler protocol, and event dispatcher interface. Where possible the
156         API uses real enums, which hides the raw protocol enum strings from clients.
157
158         Inspector protocol types are, like InspectorProtocolObjects, built on top of an InspectorObject.
159         This offers the flexibilty of adding arbitrary key/values using the RWIProtocolJSONObject
160         interface, which may be required for certain protocol objects like "Network.Headers" which
161         have no fields, but expect arbitrary properties to be added.
162
163         Command handler protocols always have two callbacks. An error callback and a success callback.
164         The signature is very much like BackendDispatchers. In parameters are passed directly to
165         the selectors, and out parameters are defined by the success callback. It will be the client's
166         responsibility to call either of these callbacks to complete handling of a request.
167
168         Event dispatcher interfaces are straight forward, just packaging up the arguments and sending
169         the message to the frontend.
170
171         ObjC <-> Protocol conversion happens in each of the generated files. In type getters / setters,
172         in commands parameters and event parameters. For this to work we generate conversion helpers
173         for all enums, ObjC enum <-> protocol strings. For NSArray <-> InspectorArray there are some
174         static helpers to do the conversions. We do lose some type safety in these conversions.
175
176         * JavaScriptCore.xcodeproj/project.pbxproj:
177         * inspector/scripts/codegen/__init__.py:
178         * inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py:
179         (AlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
180         * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
181         (BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.AlternateInspector):
182         (BackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
183         (BackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
184         * inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
185         (BackendDispatcherImplementationGenerator._generate_handler_class_destructor_for_domain):
186         (BackendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
187         * inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
188         (FrontendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
189         * inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
190         (FrontendDispatcherImplementationGenerator._generate_dispatcher_implementations_for_domain):
191         * inspector/scripts/codegen/generate_objective_c.py: Added.
192         (join_type_and_name):
193         (strip_comment_markers):
194         (remove_duplicate_from_str):
195         (ObjCTypeCategory):
196         (ObjCTypeCategory.category_of_type):
197         (ObjCGenerator):
198         (ObjCGenerator.identifier_to_objc_identifier):
199         (ObjCGenerator.objc_identifier_to_identifier):
200         (ObjCGenerator.should_generate_domain_types_filter):
201         (ObjCGenerator.should_generate_domain_types_filter.should_generate_domain_types):
202         (ObjCGenerator.should_generate_domain_command_handler_filter):
203         (ObjCGenerator.should_generate_domain_command_handler_filter.should_generate_domain_command_handler):
204         (ObjCGenerator.should_generate_domain_event_dispatcher_filter):
205         (ObjCGenerator.should_generate_domain_event_dispatcher_filter.should_generate_domain_event_dispatcher):
206         (ObjCGenerator.objc_name_for_type):
207         (ObjCGenerator.objc_enum_name_for_anonymous_enum_declaration):
208         (ObjCGenerator.objc_enum_name_for_anonymous_enum_member):
209         (ObjCGenerator.objc_enum_name_for_anonymous_enum_parameter):
210         (ObjCGenerator.objc_enum_name_for_non_anonymous_enum):
211         (ObjCGenerator.variable_name_prefix_for_domain):
212         (ObjCGenerator.objc_accessor_type_for_raw_name):
213         (ObjCGenerator.objc_type_for_raw_name):
214         (ObjCGenerator.objc_class_for_raw_name):
215         (ObjCGenerator.protocol_type_for_raw_name):
216         (ObjCGenerator.protocol_type_for_type):
217         (ObjCGenerator.objc_class_for_type):
218         (ObjCGenerator.objc_accessor_type_for_member):
219         (ObjCGenerator.objc_accessor_type_for_member_internal):
220         (ObjCGenerator.objc_type_for_member):
221         (ObjCGenerator.objc_type_for_member_internal):
222         (ObjCGenerator.objc_type_for_param):
223         (ObjCGenerator.objc_type_for_param_internal):
224         (ObjCGenerator.objc_protocol_export_expression_for_variable):
225         (ObjCGenerator.objc_protocol_import_expression_for_member):
226         (ObjCGenerator.objc_protocol_import_expression_for_parameter):
227         (ObjCGenerator.objc_protocol_import_expression_for_variable):
228         (ObjCGenerator.objc_to_protocol_expression_for_member):
229         (ObjCGenerator.protocol_to_objc_expression_for_member):
230         (ObjCGenerator.objc_setter_method_for_member):
231         (ObjCGenerator.objc_setter_method_for_member_internal):
232         (ObjCGenerator.objc_getter_method_for_member):
233         (ObjCGenerator.objc_getter_method_for_member_internal):
234         * inspector/scripts/codegen/generate_objective_c_backend_dispatcher_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
235         (ObjectiveCBackendDispatcherHeaderGenerator):
236         (ObjectiveCBackendDispatcherHeaderGenerator.output_filename):
237         (ObjectiveCBackendDispatcherHeaderGenerator.domains_to_generate):
238         (ObjectiveCBackendDispatcherHeaderGenerator.generate_output):
239         (ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_forward_declarations):
240         (ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_forward_declarations_for_domains):
241         (ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_handler_declarations_for_domain):
242         (ObjectiveCBackendDispatcherHeaderGenerator._generate_objc_handler_declaration_for_command):
243         * inspector/scripts/codegen/generate_objective_c_backend_dispatcher_implementation.py: Added.
244         (ObjectiveCConfigurationImplementationGenerator):
245         (ObjectiveCConfigurationImplementationGenerator.__init__):
246         (ObjectiveCConfigurationImplementationGenerator.output_filename):
247         (ObjectiveCConfigurationImplementationGenerator.domains_to_generate):
248         (ObjectiveCConfigurationImplementationGenerator.generate_output):
249         (ObjectiveCConfigurationImplementationGenerator._generate_handler_implementation_for_domain):
250         (ObjectiveCConfigurationImplementationGenerator._generate_handler_implementation_for_command):
251         (ObjectiveCConfigurationImplementationGenerator._generate_success_block_for_command):
252         (ObjectiveCConfigurationImplementationGenerator._generate_conversions_for_command):
253         (ObjectiveCConfigurationImplementationGenerator._generate_invocation_for_command):
254         * inspector/scripts/codegen/generate_objective_c_configuration_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
255         (ObjectiveCConfigurationHeaderGenerator):
256         (ObjectiveCConfigurationHeaderGenerator.output_filename):
257         (ObjectiveCConfigurationHeaderGenerator.generate_output):
258         (ObjectiveCConfigurationHeaderGenerator._generate_configuration_interface_for_domains):
259         (ObjectiveCConfigurationHeaderGenerator._generate_properties_for_domain):
260         * inspector/scripts/codegen/generate_objective_c_configuration_implementation.py: Added.
261         (ObjectiveCBackendDispatcherImplementationGenerator):
262         (ObjectiveCBackendDispatcherImplementationGenerator.__init__):
263         (ObjectiveCBackendDispatcherImplementationGenerator.output_filename):
264         (ObjectiveCBackendDispatcherImplementationGenerator.generate_output):
265         (ObjectiveCBackendDispatcherImplementationGenerator._generate_configuration_implementation_for_domains):
266         (ObjectiveCBackendDispatcherImplementationGenerator._generate_ivars):
267         (ObjectiveCBackendDispatcherImplementationGenerator._generate_dealloc):
268         (ObjectiveCBackendDispatcherImplementationGenerator._generate_handler_setter_for_domain):
269         (ObjectiveCBackendDispatcherImplementationGenerator._generate_event_dispatcher_getter_for_domain):
270         * inspector/scripts/codegen/generate_objective_c_conversion_helpers.py: Added.
271         (add_whitespace_separator):
272         (ObjectiveCConversionHelpersGenerator):
273         (ObjectiveCConversionHelpersGenerator.__init__):
274         (ObjectiveCConversionHelpersGenerator.output_filename):
275         (ObjectiveCConversionHelpersGenerator.domains_to_generate):
276         (ObjectiveCConversionHelpersGenerator.generate_output):
277         (ObjectiveCConversionHelpersGenerator._generate_enum_conversion_functions):
278         (ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_declaration):
279         (ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_member):
280         (ObjectiveCConversionHelpersGenerator._generate_anonymous_enum_conversion_for_parameter):
281         (ObjectiveCConversionHelpersGenerator._generate_enum_objc_to_protocol_string):
282         (ObjectiveCConversionHelpersGenerator._generate_enum_from_protocol_string):
283         * inspector/scripts/codegen/generate_objective_c_frontend_dispatcher_implementation.py: Added.
284         (ObjectiveCFrontendDispatcherImplementationGenerator):
285         (ObjectiveCFrontendDispatcherImplementationGenerator.__init__):
286         (ObjectiveCFrontendDispatcherImplementationGenerator.output_filename):
287         (ObjectiveCFrontendDispatcherImplementationGenerator.domains_to_generate):
288         (ObjectiveCFrontendDispatcherImplementationGenerator.generate_output):
289         (ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_dispatcher_implementations):
290         (ObjectiveCFrontendDispatcherImplementationGenerator._generate_event):
291         (ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_signature):
292         (ObjectiveCFrontendDispatcherImplementationGenerator._generate_event_out_parameters):
293         * inspector/scripts/codegen/generate_objective_c_header.py: Added.
294         (add_whitespace_separator):
295         (ObjectiveCHeaderGenerator):
296         (ObjectiveCHeaderGenerator.__init__):
297         (ObjectiveCHeaderGenerator.output_filename):
298         (ObjectiveCHeaderGenerator.generate_output):
299         (ObjectiveCHeaderGenerator._generate_forward_declarations):
300         (ObjectiveCHeaderGenerator._generate_enums):
301         (ObjectiveCHeaderGenerator._generate_types):
302         (ObjectiveCHeaderGenerator._generate_anonymous_enum_for_declaration):
303         (ObjectiveCHeaderGenerator._generate_anonymous_enum_for_member):
304         (ObjectiveCHeaderGenerator._generate_anonymous_enum_for_parameter):
305         (ObjectiveCHeaderGenerator._generate_enum):
306         (ObjectiveCHeaderGenerator._generate_enum.NS_ENUM):
307         (ObjectiveCHeaderGenerator._generate_type_interface):
308         (ObjectiveCHeaderGenerator._generate_init_method_for_required_members):
309         (ObjectiveCHeaderGenerator._generate_member_property):
310         (ObjectiveCHeaderGenerator._generate_command_protocols):
311         (ObjectiveCHeaderGenerator._generate_single_command_protocol):
312         (ObjectiveCHeaderGenerator._callback_block_for_command):
313         (ObjectiveCHeaderGenerator._generate_event_interfaces):
314         (ObjectiveCHeaderGenerator._generate_single_event_interface):
315         * inspector/scripts/codegen/generate_objective_c_internal_header.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
316         (ObjectiveCTypesInternalHeaderGenerator):
317         (ObjectiveCTypesInternalHeaderGenerator.output_filename):
318         (ObjectiveCTypesInternalHeaderGenerator.generate_output):
319         (ObjectiveCTypesInternalHeaderGenerator._generate_event_dispatcher_private_interfaces):
320         * inspector/scripts/codegen/generate_objective_c_types_implementation.py: Added.
321         (add_whitespace_separator):
322         (ObjectiveCTypesImplementationGenerator):
323         (ObjectiveCTypesImplementationGenerator.__init__):
324         (ObjectiveCTypesImplementationGenerator.output_filename):
325         (ObjectiveCTypesImplementationGenerator.domains_to_generate):
326         (ObjectiveCTypesImplementationGenerator.generate_output):
327         (ObjectiveCTypesImplementationGenerator.generate_type_implementations):
328         (ObjectiveCTypesImplementationGenerator.generate_type_implementation):
329         (ObjectiveCTypesImplementationGenerator._generate_init_method_for_required_members):
330         (ObjectiveCTypesImplementationGenerator._generate_setter_for_member):
331         (ObjectiveCTypesImplementationGenerator._generate_getter_for_member):
332         * inspector/scripts/codegen/generate_protocol_types_header.py:
333         (ProtocolTypesHeaderGenerator._generate_forward_declarations):
334         (_generate_typedefs_for_domain):
335         (_generate_builders_for_domain):
336         * inspector/scripts/codegen/generator.py:
337         (Generator.wrap_with_guard_for_domain):
338         (Generator):
339         (Generator.wrap_with_guard):
340         * inspector/scripts/codegen/generator_templates.py:
341         (AlternateInspector):
342         (ObjCInspector):
343         * inspector/scripts/codegen/models.py:
344         (Framework.fromString):
345         (Frameworks):
346         * inspector/scripts/generate-inspector-protocol-bindings.py:
347         (generate_from_specification):
348         * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
349         * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
350         * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
351         * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
352         * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
353         * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
354         * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
355         * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
356         * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
357         * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
358         * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
359         * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
360
361 2014-10-30  Andreas Kling  <akling@apple.com>
362
363         Unreviewed assertion fix.
364
365         RegExpCachedResult::m_reified is now the dedicated member that knows whether
366         the result was reified into an array or not. Check that instead of m_result
367         which is now single-purpose.
368
369         * runtime/RegExpCachedResult.cpp:
370         (JSC::RegExpCachedResult::setInput):
371
372 2014-10-29  Andreas Kling  <akling@apple.com>
373
374         Use plain JSArray for RegExp matches instead of a lazily populated custom object.
375         <https://webkit.org/b/138191>
376
377         Reviewed by Geoffrey Garen.
378
379         We're already offering two RegExp matching APIs, one that collects subpattern
380         matches (exec), and one that simply tests for a match (test).
381         Given that, it was pretty overkill to lazily populate the resulting array of
382         matches, since the user could simply use test() if they didn't need them.
383
384         This allows the JIT to generate better code for RegExp match arrays, and also
385         enables some fast paths in the JSC runtime that check if an object isJSArray().
386
387         Looks like ~1.5% improvement on Octane/regexp according to run-jsc-benchmarks.
388
389         * jit/Repatch.cpp:
390         (JSC::tryCacheGetByID):
391         * runtime/JSArray.h:
392         (JSC::createArrayButterflyWithExactLength): Deleted.
393         * runtime/JSGlobalObject.cpp:
394         (JSC::JSGlobalObject::init):
395         * runtime/RegExpCachedResult.cpp:
396         (JSC::RegExpCachedResult::visitChildren):
397         (JSC::RegExpCachedResult::lastResult):
398         (JSC::RegExpCachedResult::leftContext):
399         (JSC::RegExpCachedResult::rightContext):
400         * runtime/RegExpCachedResult.h:
401         (JSC::RegExpCachedResult::RegExpCachedResult):
402         (JSC::RegExpCachedResult::record):
403         (JSC::RegExpCachedResult::input):
404         * runtime/RegExpConstructor.cpp:
405         (JSC::RegExpConstructor::getBackref):
406         (JSC::RegExpConstructor::getLastParen):
407         (JSC::RegExpConstructor::getLeftContext):
408         (JSC::RegExpConstructor::getRightContext):
409         * runtime/RegExpMatchesArray.cpp:
410         (JSC::createRegExpMatchesArray):
411         (JSC::RegExpMatchesArray::RegExpMatchesArray): Deleted.
412         (JSC::RegExpMatchesArray::create): Deleted.
413         (JSC::RegExpMatchesArray::finishCreation): Deleted.
414         (JSC::RegExpMatchesArray::visitChildren): Deleted.
415         (JSC::RegExpMatchesArray::reifyAllProperties): Deleted.
416         (JSC::RegExpMatchesArray::reifyMatchProperty): Deleted.
417         (JSC::RegExpMatchesArray::leftContext): Deleted.
418         (JSC::RegExpMatchesArray::rightContext): Deleted.
419         * runtime/RegExpMatchesArray.h:
420         (JSC::RegExpMatchesArray::createStructure): Deleted.
421         (JSC::RegExpMatchesArray::reifyAllPropertiesIfNecessary): Deleted.
422         (JSC::RegExpMatchesArray::reifyMatchPropertyIfNecessary): Deleted.
423         (JSC::RegExpMatchesArray::getOwnPropertySlot): Deleted.
424         (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex): Deleted.
425         (JSC::RegExpMatchesArray::put): Deleted.
426         (JSC::RegExpMatchesArray::putByIndex): Deleted.
427         (JSC::RegExpMatchesArray::deleteProperty): Deleted.
428         (JSC::RegExpMatchesArray::deletePropertyByIndex): Deleted.
429         (JSC::RegExpMatchesArray::getOwnPropertyNames): Deleted.
430         (JSC::RegExpMatchesArray::defineOwnProperty): Deleted.
431         (JSC::isRegExpMatchesArray): Deleted.
432         * runtime/RegExpObject.cpp:
433         (JSC::RegExpObject::exec):
434         * runtime/StringPrototype.cpp:
435         (JSC::stringProtoFuncMatch):
436
437 2014-10-29  Joseph Pecoraro  <pecoraro@apple.com>
438
439         Web Inspector: Fix Type Dependency Issues
440         https://bugs.webkit.org/show_bug.cgi?id=125664
441
442         Reviewed by Brian Burg.
443
444         Now that all JSON protocol files are processed together again
445         in r174892, we can remove the duplicated types which were only
446         needed when the domains were split.
447
448         * inspector/protocol/Console.json:
449         * inspector/protocol/Runtime.json:
450
451 2014-10-28  Commit Queue  <commit-queue@webkit.org>
452
453         Unreviewed, rolling out r175249.
454         https://bugs.webkit.org/show_bug.cgi?id=138138
455
456         Appears to be failing some JS tests (Requested by mlam_ on
457         #webkit).
458
459         Reverted changeset:
460
461         "Holes are not copied properly when Arrays change shape to
462         ArrayStorage type."
463         https://bugs.webkit.org/show_bug.cgi?id=138118
464         http://trac.webkit.org/changeset/175249
465
466 2014-10-27  Mark Lam  <mark.lam@apple.com>
467
468         Holes are not copied properly when Arrays change shape to ArrayStorage type.
469         <https://webkit.org/b/138118>
470
471         Reviewed by Mark Hahnenberg.
472
473         When we convert non-ArrayStorage typed arrays into ArrayStorage typed arrays,
474         we skipped the holes.  As a result, the slots in the ArrayStorage vector that
475         corresponds to those holes are uninitialize.  This is now fixed.
476
477         * runtime/JSObject.cpp:
478         (JSC::JSObject::convertUndecidedToArrayStorage):
479         (JSC::JSObject::convertInt32ToArrayStorage):
480         (JSC::JSObject::convertDoubleToArrayStorage):
481         (JSC::JSObject::convertContiguousToArrayStorage):
482
483 2014-10-27  Mark Lam  <mark.lam@apple.com>
484
485         Crash when attempting to perform array iteration on a non-array with numeric keys not initialized.
486         <https://webkit.org/b/137814>
487
488         Reviewed by Geoffrey Garen.
489
490         The arrayIteratorNextThunkGenerator() thunk was not checking for the case where
491         the butterfly may be NULL.  This was the source of the crash, and is now fixed.
492
493         In addition, it is also not checking for the case where a property named "length"
494         may have been set on the iterated object.  The thunk only checks the butterfly's
495         publicLength for its iteration operation.  Array objects will work fine with this
496         because it always updates its butterfly's publicLength when its length changes.
497         In the case of iterable non-Array objects, the "length" property will require a
498         look up outside of the scope of this thunk.  The fix is simply to limit the fast
499         case checks in this thunk to Array objects.
500
501         * jit/ThunkGenerators.cpp:
502         (JSC::arrayIteratorNextThunkGenerator):
503
504 2014-10-27  Mark Lam  <mark.lam@apple.com>
505
506         Simplified some JSObject methods for converting arrays to ArrayStorage shape.
507         <https://webkit.org/b/138119>
508
509         Reviewed by Filip Pizlo.
510
511         Currently, for each Undecided, Int32, Double, and Contiguous array shapes,
512         there are 3 JSObject methods to convert them to ArrayStorage shape:
513             ArrayStorage* convert<shape>ToArrayStorage(VM&, NonPropertyTransition, unsigned neededLength);
514             ArrayStorage* convert<shape>ToArrayStorage(VM&, NonPropertyTransition);
515             ArrayStorage* convert<shape>ToArrayStorage(VM&);
516
517         However, the neededLength that is passed is always m_butterfly->vectorLength().
518         Hence, the method that takes a neededLength is really not needed.  This patch
519         removes this unneeded verbosity.
520
521         * runtime/JSObject.cpp:
522         (JSC::JSObject::convertUndecidedToArrayStorage):
523         (JSC::JSObject::convertInt32ToArrayStorage):
524         - Also reordered the placement of the DeferGC statement so this Int32 function
525           will look more similar to the others.
526         (JSC::JSObject::convertDoubleToArrayStorage):
527         (JSC::JSObject::convertContiguousToArrayStorage):
528         * runtime/JSObject.h:
529
530 2014-10-25  Brian J. Burg  <burg@cs.washington.edu>
531
532         Web Inspector: timelines should not count time elapsed while paused in the debugger
533         https://bugs.webkit.org/show_bug.cgi?id=136351
534
535         Unreviewed, follow-up fix after r175203. The debugger agent should not assume
536         that the inspector environment's stopwatch has already been started.
537
538         * inspector/agents/InspectorDebuggerAgent.cpp:
539         (Inspector::InspectorDebuggerAgent::didPause): Check if the stopwatch isActive() before stopping.
540
541 2014-10-18  Brian J. Burg  <burg@cs.washington.edu>
542
543         Web Inspector: timelines should not count time elapsed while paused in the debugger
544         https://bugs.webkit.org/show_bug.cgi?id=136351
545
546         Reviewed by Timothy Hatcher.
547
548         Now that we have a stopwatch to provide pause-aware timing data, we can remove the
549         profiler's handling of debugger pause/continue callbacks. The debugger agent accounts
550         for suspended execution by pausing and resuming the stopwatch.
551
552         * API/JSProfilerPrivate.cpp:
553         (JSStartProfiling): Use a fresh stopwatch when profiling from the JSC API.
554         * inspector/InspectorEnvironment.h:
555         * inspector/JSGlobalObjectInspectorController.cpp:
556         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
557         (Inspector::JSGlobalObjectInspectorController::executionStopwatch):
558         * inspector/JSGlobalObjectInspectorController.h:
559         * inspector/ScriptDebugServer.cpp:
560         (Inspector::ScriptDebugServer::handlePause):
561         * inspector/agents/InspectorDebuggerAgent.cpp:
562         (Inspector::InspectorDebuggerAgent::didPause):
563         (Inspector::InspectorDebuggerAgent::breakpointActionProbe):
564         (Inspector::InspectorDebuggerAgent::didContinue):
565         * inspector/agents/InspectorDebuggerAgent.h:
566         * profiler/LegacyProfiler.cpp:
567         (JSC::LegacyProfiler::profiler): Use nullptr.
568         (JSC::LegacyProfiler::startProfiling): Hand off a stopwatch to the profile generator.
569         (JSC::LegacyProfiler::stopProfiling): Use nullptr.
570         (JSC::LegacyProfiler::didPause): Deleted.
571         (JSC::LegacyProfiler::didContinue): Deleted.
572         * profiler/LegacyProfiler.h:
573         * profiler/Profile.cpp: The root node should always have a start time of 0.0.
574         (JSC::Profile::Profile):
575         * profiler/ProfileGenerator.cpp: Remove debugger pause/continue callbacks and the
576         timestamp member that was used to track time elapsed by the debugger. Just use the
577         stopwatch's elapsed times to generate start/elapsed times for function calls.
578
579         (JSC::ProfileGenerator::create):
580         (JSC::ProfileGenerator::ProfileGenerator):
581         (JSC::AddParentForConsoleStartFunctor::operator()): The parent node of |console.profile|
582         should have a start time of 0.0, since it represents the starting node of profiling.
583
584         (JSC::ProfileGenerator::beginCallEntry):
585         (JSC::ProfileGenerator::endCallEntry):
586         (JSC::ProfileGenerator::didPause): Deleted.
587         (JSC::ProfileGenerator::didContinue): Deleted.
588         * profiler/ProfileGenerator.h:
589
590 2014-10-24  Mark Lam  <mark.lam@apple.com>
591
592         Simplified IndexingType's hasAnyArrayStorage().
593         <https://webkit.org/b/138051>
594
595         Reviewed by Michael Saboff.
596
597         IndexingType's hasAnyArrayStorage() currently does subtraction of ArrayStorageShape
598         with the purpose of making non-ArrayStorage types underflow (with that subtraction)
599         and have a result that exceeds SlowPutArrayStorageShape.  What it is doing is
600         basically checking for a shape value that is greater equal to ArrayStorageShape.
601         We can just simplify the code as such.
602
603         Also added a comment to describe the structure of the bits in IndexingType.
604
605         * runtime/IndexingType.h:
606         (JSC::hasAnyArrayStorage):
607
608 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
609
610         Web Inspector: Provide a way to have alternate inspector agents
611         https://bugs.webkit.org/show_bug.cgi?id=137901
612
613         Reviewed by Brian Burg.
614
615         Provide a way to use alternate inspector agents debugging a JSContext.
616         Expose a very slim private API that a client could use to know when
617         an inspector has connected/disconnected, and a way to register its
618         augmentative agents.
619
620         * Configurations/FeatureDefines.xcconfig:
621         * JavaScriptCore.xcodeproj/project.pbxproj:
622         New feature guard. New files.
623
624         * API/JSContextRef.cpp:
625         (JSGlobalContextGetAugmentableInspectorController):
626         * API/JSContextRefInspectorSupport.h: Added.
627         Access to the private interface from a JSContext.
628
629         * inspector/JSGlobalObjectInspectorController.cpp:
630         (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
631         (Inspector::JSGlobalObjectInspectorController::connectFrontend):
632         (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
633         * inspector/JSGlobalObjectInspectorController.h:
634         * inspector/augmentable/AugmentableInspectorController.h: Added.
635         (Inspector::AugmentableInspectorController::~AugmentableInspectorController):
636         (Inspector::AugmentableInspectorController::connected):
637         * inspector/augmentable/AugmentableInspectorControllerClient.h: Added.
638         (Inspector::AugmentableInspectorControllerClient::~AugmentableInspectorControllerClient):
639         * inspector/augmentable/AlternateDispatchableAgent.h: Added.
640         (Inspector::AlternateDispatchableAgent::AlternateDispatchableAgent):
641         Provide the private APIs a client could use to add alternate agents using alternate backend dispatchers.
642
643         * inspector/scripts/codegen/__init__.py:
644         * inspector/scripts/generate-inspector-protocol-bindings.py:
645         (generate_from_specification):
646         New includes, and use the new generator.
647         
648         * inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py: Added.
649         (AlternateBackendDispatcherHeaderGenerator):
650         (AlternateBackendDispatcherHeaderGenerator.__init__):
651         (AlternateBackendDispatcherHeaderGenerator.output_filename):
652         (AlternateBackendDispatcherHeaderGenerator.generate_output):
653         (AlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
654         (AlternateBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
655         Generate the abstract AlternateInspectorBackendDispatcher interfaces.
656
657         * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
658         (BackendDispatcherHeaderGenerator.generate_output):
659         (BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains):
660         (BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.AlternateInspector):
661         Forward declare alternate dispatchers, and allow setting an alternate dispatcher on a domain dispatcher.
662
663         * inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
664         (BackendDispatcherImplementationGenerator.generate_output):
665         (BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
666         Check for and dispatch on an AlternateInspectorBackendDispatcher if there is one for this domain.
667
668         * inspector/scripts/codegen/generator_templates.py:
669         (AlternateInspectorBackendDispatcher):
670         (AlternateInspector):
671         Template boilerplate for prelude and postlude.
672
673         * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
674         * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
675         * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
676         * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
677         * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
678         * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
679         * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
680         * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
681         * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
682         * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
683         * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
684         * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
685         Rebaseline tests.
686
687 2014-10-23  Michael Saboff  <msaboff@apple.com>
688
689         offsets.rb:183:in `buildOffsetsMap': unhandled exception - is offlineasm dependency tracking broken? (132668)
690         https://bugs.webkit.org/show_bug.cgi?id=138017
691
692         Reviewed by Mark Lam.
693
694         Removed from the nput file $(SRCROOT)/llint/LowLevelAssembler.asm and output file
695         $(BUILT_PRODUCTS_DIR)/LLIntOffsets/LLIntDesiredOffsets.h from the Generate Derived Sources
696         build phase in the LLInt Offset target.  There is no need for Xcode to do any dependency
697         checking with these files as the ruby script offlineasm/generate_offset_extractor.rb will
698         do that for us.
699
700         * JavaScriptCore.xcodeproj/project.pbxproj:
701
702 2014-10-23  Michael Saboff  <msaboff@apple.com>
703
704         Change CallFrame::lexicalGlobalObject() to use Callee instead of JSScope
705         https://bugs.webkit.org/show_bug.cgi?id=136901
706
707         Reviewed by Mark Lam.
708
709         Implement ExecState::lexicalGlobalObject() using Callee.
710         
711         * runtime/JSScope.h:
712         (JSC::ExecState::lexicalGlobalObject):
713
714 2014-10-22  Milan Crha  <mcrha@redhat.com>
715
716         Prefix isnan() with std::.
717         <https://webkit.org/b/137966>.
718
719         Reviewed by Carlos Garcia Campos.
720
721         * profiler/ProfileNode.h:
722         (JSC::ProfileNode::Call::setStartTime):
723         (JSC::ProfileNode::Call::setElapsedTime):
724
725 2014-10-22  Mark Lam  <mark.lam@apple.com>
726
727         Refactoring to simplify some code in DatePrototype.cpp.
728         <https://webkit.org/b/137997>
729
730         Reviewed by Filip Pizlo.
731
732         A bunch of functions in DatePrototype.cpp have the pattern of loading a
733         constant into a local variable only to pass it to a callee function
734         immediately after.  There is no other use for that variable.  This adds
735         additional verbosity with no added benefit.
736
737         This patch refactors those functions to just pass the constant arg directly.
738
739         * runtime/DatePrototype.cpp:
740         (JSC::dateProtoFuncSetMilliSeconds):
741         (JSC::dateProtoFuncSetUTCMilliseconds):
742         (JSC::dateProtoFuncSetSeconds):
743         (JSC::dateProtoFuncSetUTCSeconds):
744         (JSC::dateProtoFuncSetMinutes):
745         (JSC::dateProtoFuncSetUTCMinutes):
746         (JSC::dateProtoFuncSetHours):
747         (JSC::dateProtoFuncSetUTCHours):
748         (JSC::dateProtoFuncSetDate):
749         (JSC::dateProtoFuncSetUTCDate):
750         (JSC::dateProtoFuncSetMonth):
751         (JSC::dateProtoFuncSetUTCMonth):
752         (JSC::dateProtoFuncSetFullYear):
753         (JSC::dateProtoFuncSetUTCFullYear):
754
755 2014-10-22  Byungseon Shin  <sun.shin@lge.com>
756
757         String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
758         https://bugs.webkit.org/show_bug.cgi?id=130967
759
760         Reviewed by Mark Lam.
761
762         By definition of calculateLocalTimeOffset, input time should be UTC time.
763         But there are many cases when input time is based on local time.
764         So, it gives erroneous results while calculating offset of DST boundary time.
765         By adding a argument to distinguish UTC and local time, we can get the correct offset.
766
767         * JavaScriptCore.order:
768         * runtime/DateConstructor.cpp:
769         (JSC::constructDate):
770         (JSC::callDate):
771         (JSC::dateUTC):
772         * runtime/DateInstance.cpp:
773         (JSC::DateInstance::calculateGregorianDateTime):
774         (JSC::DateInstance::calculateGregorianDateTimeUTC):
775         * runtime/DatePrototype.cpp:
776         (JSC::setNewValueFromTimeArgs):
777         (JSC::setNewValueFromDateArgs):
778         (JSC::dateProtoFuncSetMilliSeconds):
779         (JSC::dateProtoFuncSetUTCMilliseconds):
780         (JSC::dateProtoFuncSetSeconds):
781         (JSC::dateProtoFuncSetUTCSeconds):
782         (JSC::dateProtoFuncSetMinutes):
783         (JSC::dateProtoFuncSetUTCMinutes):
784         (JSC::dateProtoFuncSetHours):
785         (JSC::dateProtoFuncSetUTCHours):
786         (JSC::dateProtoFuncSetDate):
787         (JSC::dateProtoFuncSetUTCDate):
788         (JSC::dateProtoFuncSetMonth):
789         (JSC::dateProtoFuncSetUTCMonth):
790         (JSC::dateProtoFuncSetFullYear):
791         (JSC::dateProtoFuncSetUTCFullYear):
792         (JSC::dateProtoFuncSetYear):
793         * runtime/JSDateMath.cpp:
794         (JSC::localTimeOffset):
795         (JSC::gregorianDateTimeToMS):
796         (JSC::msToGregorianDateTime):
797         (JSC::parseDateFromNullTerminatedCharacters):
798         * runtime/JSDateMath.h:
799         * runtime/VM.h:
800         (JSC::LocalTimeOffsetCache::LocalTimeOffsetCache):
801         (JSC::LocalTimeOffsetCache::reset):
802         Passing TimeType argument to distingush UTC time and local time.
803
804 2014-10-22  Joseph Pecoraro  <pecoraro@apple.com>
805
806         Web Inspector: Fix generator importing of protocol type "any", treat as value
807         https://bugs.webkit.org/show_bug.cgi?id=137931
808
809         Reviewed by Timothy Hatcher.
810
811         Treat incoming "any" objects as InspectorValues, which can be any type.
812         Add the necessary boilerplate to import.
813
814         * inspector/InspectorBackendDispatcher.cpp:
815         (Inspector::AsMethodBridges::asValue):
816         (Inspector::InspectorBackendDispatcher::getValue):
817         * inspector/InspectorBackendDispatcher.h:
818         * inspector/scripts/codegen/generator.py:
819         (Generator.keyed_get_method_for_type):
820         * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
821
822 2014-10-22  Michael Saboff  <msaboff@apple.com>
823
824         REGRESSION(r174996): Broke C_LOOP
825         https://bugs.webkit.org/show_bug.cgi?id=137971
826
827         Reviewed by Mark Lam.
828
829         Removed incorrect move to cfr (CallFrameRegister) before we make the call to a native function.
830         After r174996, the source register for the move contained garbage causing the crash.  The move
831         to cfr before making the call to the native function is wrong and should have been removed
832         some time ago.  This brings the ARM64 / C_LOOP code path inline with the other CPU paths.
833         Tested on ARM64 as well as a C_LOOP build.
834
835         * llint/LowLevelInterpreter64.asm:
836
837 2014-10-21  Mark Lam  <mark.lam@apple.com>
838
839         Remove erroneous canUseJIT() in the intrinsics version of JITThunks::hostFunctionStub().
840         <https://webkit.org/b/137937>
841
842         Reviewed by Michael Saboff.
843
844         This version of JITThunks::hostFunctionStub() can only be called from the intrinsics
845         version of VM::getHostFunction() which asserts canUseJIT().  Hence, we can eliminate
846         the canUseJIT() check in JITThunks::hostFunctionStub().  We don't handle the
847         !canUseJIT() case properly there anyway.
848
849         * jit/JITThunks.cpp:
850         (JSC::JITThunks::hostFunctionStub):
851
852 2014-10-21  Michael Saboff  <msaboff@apple.com>
853
854         Add operator==(PropertyName, const char*)
855         https://bugs.webkit.org/show_bug.cgi?id=137925
856
857         Reviewed by Mark Lam.
858
859         * runtime/PropertyName.h:
860         (JSC::operator==): Added to simplify comparison with string literals.
861
862
863 2014-10-21  Michael Saboff  <msaboff@apple.com>
864
865         Change native call frames to use the scope from their Callee instead of their caller's scope
866         https://bugs.webkit.org/show_bug.cgi?id=137907
867
868         Reviewed by Mark Lam.
869
870         Changed setting of scope for native CallFrames to use the scope associated with the
871         Callee instead of the caller's scope.
872
873         * jit/ThunkGenerators.cpp:
874         (JSC::nativeForGenerator):
875         * llint/LowLevelInterpreter32_64.asm:
876         * llint/LowLevelInterpreter64.asm:
877
878 2014-10-21  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
879
880         Add missing ENABLE(FTL_NATIVE_CALL_INLINING) guard to BundlePath.cpp after r174940
881         https://bugs.webkit.org/show_bug.cgi?id=137924
882
883         Reviewed by Csaba Osztrogonác.
884
885         * runtime/BundlePath.cpp:
886
887 2014-10-21  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
888
889         Fix FTL Native Inlining for EFL
890         https://bugs.webkit.org/show_bug.cgi?id=137774
891
892         Reviewed by Michael Saboff.
893
894         Added required functionality for Native Inlining to EFL, and fixed a bug/typo in the original code,
895         which caused incorrect memory allocation.
896
897         * CMakeLists.txt:
898         * create-llvm-ir-from-source-file.py: Added.
899         * create-symbol-table-index.py: Added.
900         * ftl/FTLLowerDFGToLLVM.cpp:
901         (JSC::FTL::LowerDFGToLLVM::lower):
902         (JSC::FTL::LowerDFGToLLVM::getModuleByPathForSymbol):
903         (JSC::FTL::LowerDFGToLLVM::exitValueForAvailability):
904         (JSC::FTL::LowerDFGToLLVM::exitValueForNode):
905         * runtime/BundlePath.cpp: Added.
906         (JSC::bundlePath):
907         * runtime/JSDataViewPrototype.cpp:
908         (JSC::getData):
909         (JSC::setData):
910         * runtime/MathObject.cpp:
911
912 2014-10-21  Milan Crha  <mcrha@redhat.com>
913
914         Move JSC::MacroAssemblerX86Common::s_sse2CheckState definition to MacroAssemblerX86Common.cpp.
915         <https://webkit.org/b/137807>
916
917         Reviewed by Csaba Osztrogonác.
918
919         * assembler/MacroAssemblerX86Common.cpp:
920         * jit/JIT.cpp:
921
922 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
923
924         Unreviewed add back copyright line that was accidentally removed.
925
926         * inspector/scripts/codegen/generator_templates.py:
927         (GeneratorTemplates):
928
929 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
930
931         Web Inspector: InspectorBackendCommands should include when to activate particular domains
932         https://bugs.webkit.org/show_bug.cgi?id=137753
933
934         Reviewed by Timothy Hatcher.
935
936         Add an availability property to domains that only activate for
937         particular debuggable types. If missing, the domain is always
938         activated. Otherwise it must be a debuggable type string.
939         When a frontend is opened for that debuggable type, the domain
940         will be activated.
941
942         * inspector/scripts/codegen/models.py:
943         (Protocol.parse_domain):
944         (Domain.__init__):
945         (Domains):
946         Parse and validate the Domain's "availability" property.
947
948         * inspector/scripts/codegen/generate_backend_commands.py:
949         (BackendCommandsGenerator.generate_domain):
950         Emit InspectorBackend.activateDomain with debuggable type filter.
951
952         * inspector/protocol/ApplicationCache.json:
953         * inspector/protocol/CSS.json:
954         * inspector/protocol/DOM.json:
955         * inspector/protocol/DOMDebugger.json:
956         * inspector/protocol/DOMStorage.json:
957         * inspector/protocol/Database.json:
958         * inspector/protocol/IndexedDB.json:
959         * inspector/protocol/LayerTree.json:
960         * inspector/protocol/Network.json:
961         * inspector/protocol/Page.json:
962         * inspector/protocol/Replay.json:
963         * inspector/protocol/Timeline.json:
964         * inspector/protocol/Worker.json:
965         These domains only activate for Web debuggables.
966
967         * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
968         * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
969         * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
970         * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
971         * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
972         Update existing tests that now have activate output.
973
974         * inspector/scripts/tests/expected/fail-on-domain-availability.json-error: Added.
975         * inspector/scripts/tests/fail-on-domain-availability.json: Added.
976         Add a test for "availability" validation.
977
978 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
979
980         [Win] Build fix for generated inspector files.
981
982         Rubberstamped by Brent Fulgham.
983
984         * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
985         (BackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
986         * inspector/scripts/codegen/generator_templates.py:
987         (GeneratorTemplates):
988
989 2014-10-20  Brent Fulgham  <bfulgham@apple.com>
990
991         [Win] Unreviewed build fix.
992
993         We need to (1) pass the 'windows' argument to our script for checking feature definitions,
994         and (2) we must use Cwd::realpath on our path input arguments to avoid Cygwin and Windows
995         getting confused about path separators versus escape characters.
996
997
998         * JavaScriptCore.vcxproj/build-generated-files.pl:
999
1000 2014-10-20  Mark Lam  <mark.lam@apple.com>
1001
1002         [Follow up] Web Process crash when starting the web inspector after r174025.
1003         <https://webkit.org/b/137340>
1004
1005         Reviewed by Geoffrey Garen.
1006
1007         Applied Geoff's feedback to clean up some code for better clarity after
1008         r174856.
1009
1010         * dfg/DFGFixupPhase.cpp:
1011         (JSC::DFG::FixupPhase::insertCheck):
1012         * dfg/DFGInsertionSet.h:
1013         (JSC::DFG::InsertionSet::insertOutOfOrder):
1014
1015 2014-10-20  Mark Lam  <mark.lam@apple.com>
1016
1017         Factor out JITCode::typeName() for debugging use.
1018         <https://webkit.org/b/137888>
1019
1020         Reviewed by Geoffrey Garen.
1021
1022         JITCode's printInternal() currently decodes the JITType into a string and
1023         prints it.  This change factors out the part that decodes the JITType into
1024         JITCode::typeName() so that we can call it from lldb while debugging to
1025         quickly decode a JITType value.
1026
1027         * jit/JITCode.cpp:
1028         (JSC::JITCode::typeName):
1029         (WTF::printInternal):
1030         * jit/JITCode.h:
1031
1032 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1033
1034         Unreviewed Windows Build Fix #2 after r174892.
1035
1036         * JavaScriptCore.vcxproj/build-generated-files.pl:
1037         Define FEATURE_DEFINES for JavaScriptCore's DerivedSources.make.
1038         This uses the same technique as WebCore.
1039
1040 2014-10-20  Mark Lam  <mark.lam@apple.com>
1041
1042         Fix placement of a few items in vcxproj ItemGroups.
1043         <https://webkit.org/b/137886>
1044
1045         Reviewed by Geoffrey Garen.
1046
1047         https://webkit.org/b/137873 is likely a cut-and-paste error that manifested
1048         because we had ClCompile and ClInclude entries mixed up in the wrong ItemGroups.
1049         We should fix these so that ClCompile entries are in the ClCompile ItemGroup,
1050         and ClInclude entries in the ClInclude ItemGroup.  This will help reduce the
1051         chance of future cut-and-paste errors of this nature.
1052
1053         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1054         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
1055
1056 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1057
1058         Unreviewed Windows Build Fix after r174892.
1059
1060         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1061         Update file name to the new generated file name.
1062
1063 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1064
1065         Web Inspector: Rename generated Inspector.json to CombinedDomains.json to prevent name collisions
1066         https://bugs.webkit.org/show_bug.cgi?id=137825
1067
1068         Reviewed by Timothy Hatcher.
1069
1070         * CMakeLists.txt:
1071         * DerivedSources.make:
1072         * JavaScriptCore.vcxproj/copy-files.cmd:
1073         * JavaScriptCore.xcodeproj/project.pbxproj:
1074         * inspector/protocol/Inspector.json: Renamed from Source/JavaScriptCore/inspector/protocol/InspectorDomain.json.
1075
1076 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1077
1078         Web Inspector: Generate all Inspector domains together in JavaScriptCore
1079         https://bugs.webkit.org/show_bug.cgi?id=137748
1080
1081         Reviewed by Brian Burg.
1082
1083         * inspector/protocol/ApplicationCache.json: Renamed from Source/WebCore/inspector/protocol/ApplicationCache.json.
1084         * inspector/protocol/CSS.json: Renamed from Source/WebCore/inspector/protocol/CSS.json.
1085         * inspector/protocol/DOM.json: Renamed from Source/WebCore/inspector/protocol/DOM.json.
1086         * inspector/protocol/DOMDebugger.json: Renamed from Source/WebCore/inspector/protocol/DOMDebugger.json.
1087         * inspector/protocol/DOMStorage.json: Renamed from Source/WebCore/inspector/protocol/DOMStorage.json.
1088         * inspector/protocol/Database.json: Renamed from Source/WebCore/inspector/protocol/Database.json.
1089         * inspector/protocol/IndexedDB.json: Renamed from Source/WebCore/inspector/protocol/IndexedDB.json.
1090         * inspector/protocol/LayerTree.json: Renamed from Source/WebCore/inspector/protocol/LayerTree.json.
1091         * inspector/protocol/Network.json: Renamed from Source/WebCore/inspector/protocol/Network.json.
1092         * inspector/protocol/Page.json: Renamed from Source/WebCore/inspector/protocol/Page.json.
1093         * inspector/protocol/Replay.json: Renamed from Source/WebCore/inspector/protocol/Replay.json.
1094         * inspector/protocol/Timeline.json: Renamed from Source/WebCore/inspector/protocol/Timeline.json.
1095         * inspector/protocol/Worker.json: Renamed from Source/WebCore/inspector/protocol/Worker.json.
1096         Move all protocol files into this directory.
1097
1098         * inspector/InspectorProtocolTypesBase.h: Renamed from Source/JavaScriptCore/inspector/InspectorProtocolTypes.h.
1099         Renamed the base types file to not clash with the generated types file.
1100
1101         * CMakeLists.txt:
1102         * DerivedSources.make:
1103         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1104         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
1105         * JavaScriptCore.vcxproj/copy-files.cmd:
1106         * JavaScriptCore.xcodeproj/project.pbxproj:
1107         Update build phases for new JSON files and new filenames.
1108
1109         * inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
1110         * inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
1111         * inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
1112         * inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
1113         * inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
1114         * inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
1115         * inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
1116         * inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
1117         * inspector/scripts/tests/expected/type-declaration-array-type.json-result:
1118         * inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
1119         * inspector/scripts/tests/expected/type-declaration-object-type.json-result:
1120         * inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
1121         Updated names of things now that prefixes are no longer needed.
1122
1123         * inspector/ConsoleMessage.h:
1124         * inspector/ContentSearchUtilities.cpp:
1125         * inspector/ContentSearchUtilities.h:
1126         * inspector/InjectedScript.h:
1127         * inspector/InjectedScriptBase.h:
1128         * inspector/ScriptCallFrame.h:
1129         * inspector/ScriptCallStack.h:
1130         * inspector/agents/InspectorAgent.h:
1131         * inspector/agents/InspectorConsoleAgent.h:
1132         * inspector/agents/InspectorDebuggerAgent.cpp:
1133         (Inspector::breakpointActionTypeForString):
1134         * inspector/agents/InspectorDebuggerAgent.h:
1135         * inspector/agents/InspectorRuntimeAgent.h:
1136         * runtime/TypeProfiler.cpp:
1137         * runtime/TypeSet.cpp:
1138         Update includes and update a few function names that are generated.
1139
1140         * inspector/scripts/codegen/generate_protocol_types_header.py:
1141         (ProtocolTypesHeaderGenerator.output_filename):
1142         (ProtocolTypesHeaderGenerator.generate_output):
1143         Include an export macro for type string constants defined in the implementation file.
1144
1145         * inspector/scripts/codegen/generate_backend_commands.py:
1146         (BackendCommandsGenerator.output_filename):
1147         * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
1148         (BackendDispatcherHeaderGenerator.output_filename):
1149         (BackendDispatcherHeaderGenerator.generate_output):
1150         * inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
1151         (BackendDispatcherImplementationGenerator.output_filename):
1152         (BackendDispatcherImplementationGenerator.generate_output):
1153         (BackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
1154         (BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
1155         * inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
1156         (FrontendDispatcherHeaderGenerator.output_filename):
1157         (FrontendDispatcherHeaderGenerator.generate_output):
1158         * inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
1159         (FrontendDispatcherImplementationGenerator.output_filename):
1160         (FrontendDispatcherImplementationGenerator.generate_output):
1161         (FrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
1162         (_generate_class_for_object_declaration):
1163         (_generate_builder_setter_for_member):
1164         (_generate_unchecked_setter_for_member):
1165         * inspector/scripts/codegen/generate_protocol_types_implementation.py:
1166         (ProtocolTypesImplementationGenerator.output_filename):
1167         (ProtocolTypesImplementationGenerator.generate_output):
1168         (ProtocolTypesImplementationGenerator._generate_enum_mapping):
1169         * inspector/scripts/codegen/models.py:
1170         (Framework.fromString):
1171         (Frameworks):
1172         * inspector/scripts/generate-inspector-protocol-bindings.py:
1173         Simplify generator now that prefixes are no longer needed. This updates
1174         filenames, includes, and the list of supported directories.
1175
1176 2014-10-20  Csaba Osztrogonác  <ossy@webkit.org>
1177
1178         Remove obsolete comments after r99798
1179         https://bugs.webkit.org/show_bug.cgi?id=137871
1180
1181         Reviewed by Darin Adler.
1182
1183         r99798 removed the comment in MacroAssemblerARMv7::supportsFloatingPointTruncate(),
1184         so we should remove the stale references to this removed comment.
1185
1186         * assembler/MacroAssemblerX86.h:
1187         * assembler/MacroAssemblerX86_64.h:
1188
1189 2014-10-20  Csaba Osztrogonác  <ossy@webkit.org>
1190
1191         MacroAssemblerX86Common.cpp should be built on Windows too
1192         https://bugs.webkit.org/show_bug.cgi?id=137873
1193
1194         Reviewed by Brent Fulgham.
1195
1196         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1197         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
1198
1199 2014-10-20  Csaba Osztrogonác  <ossy@webkit.org>
1200
1201         [cmake] Remove duplicated source files
1202         https://bugs.webkit.org/show_bug.cgi?id=137875
1203
1204         Reviewed by Gyuyoung Kim.
1205
1206         * CMakeLists.txt:
1207
1208 2014-10-18  Brian J. Burg  <burg@cs.washington.edu>
1209
1210         Web Replay: code generator shouldn't complain about enums without a storage type if they are in an enclosing scope
1211         https://bugs.webkit.org/show_bug.cgi?id=137084
1212
1213         Reviewed by Joseph Pecoraro.
1214
1215         In order to generate encode/decode method declarations without pulling in lots of headers,
1216         the generator must forward declare enums (for enum classes or enums with explicit sizes).
1217
1218         Change the generator to not require an explicit size if an enum is declared inside a struct
1219         or class definition. In that case, it must pull in headers since scoped enums can't be
1220         forward declared.
1221
1222         This patch also fixes some chained if-statements that should be if-else statements.
1223
1224         Test: updated replay/scripts/tests/generate-enum-encoding-helpers.json to cover the new case.
1225
1226         * replay/scripts/CodeGeneratorReplayInputs.py:
1227         (InputsModel.parse_type_with_framework_name.is):
1228         (InputsModel.parse_type_with_framework_name.is.must):
1229         (Generator.generate_enum_trait_implementation):
1230         (InputsModel.parse_type_with_framework_name): Deleted.
1231         * replay/scripts/CodeGeneratorReplayInputsTemplates.py:
1232         * replay/scripts/tests/expected/fail-on-c-style-enum-no-storage.json-error:
1233         * replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp:
1234         (JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
1235         * replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:
1236         (JSC::EncodingTraits<WebCore::MouseButton>::decodeValue):
1237         (JSC::EncodingTraits<WebCore::PlatformEvent::Type>::encodeValue):
1238         (JSC::EncodingTraits<WebCore::PlatformEvent::Type>::decodeValue):
1239         * replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h:
1240         * replay/scripts/tests/expected/generate-enums-with-same-base-name.json-TestReplayInputs.cpp:
1241         (JSC::EncodingTraits<WebCore::FormData1::Type>::decodeValue):
1242         (JSC::EncodingTraits<PlatformEvent1::Type>::decodeValue):
1243         * replay/scripts/tests/generate-enum-encoding-helpers.json: Added a new input to cover this case.
1244
1245 2014-10-17  Mark Lam  <mark.lam@apple.com>
1246
1247         Web Process crash when starting the web inspector after r174025.
1248         <https://webkit.org/b/137340>
1249
1250         Reviewed by Filip Pizlo.
1251
1252         After r174025, we can generate a bad graph in the DFG fixup phase like so:
1253
1254             102:<!0:-> StoreBarrier(Check:KnownCell:@19, ..., bc#44)
1255             60:<!0:->  PutStructure(Check:KnownCell:@19, ..., bc#44)
1256             103:<!0:-> Check(Check:NotCell:@54, ..., bc#44)
1257                     // ^-- PutByOffset's StoreBarrier has been elided and replaced
1258                     //     with a speculation check which can OSR exit.
1259             61:<!0:->  PutByOffset(Check:KnownCell:@19, ..., bc#44)
1260
1261         As a result, the structure change will get executed even if we end up OSR
1262         exiting before the PutByOffset.  In the baseline JIT code, the structure now
1263         erroneously tells the put operation that there is a value in that property
1264         slot when it is actually uninitialized (hence, the crash).
1265
1266         The fix is to insert the Check at the earliest point possible:
1267
1268         1. If the checked node is in the same bytecode as the PutByOffset, then
1269            the earliest point where we can insert the Check is right after the
1270            checked node.
1271
1272         2. If the checked node is from a preceding bytecode (before the PutByOffset),
1273            then the earliest point where we can insert the Check is at the start
1274            of the current bytecode.
1275
1276         Also reverted the workaround from r174749: https://webkit.org/b/137758.
1277
1278         Benchmark results appear to be a wash on aggregate.
1279
1280         * dfg/DFGFixupPhase.cpp:
1281         (JSC::DFG::FixupPhase::indexOfNode):
1282         (JSC::DFG::FixupPhase::indexOfFirstNodeOfExitOrigin):
1283         (JSC::DFG::FixupPhase::fixupNode):
1284         (JSC::DFG::FixupPhase::insertCheck):
1285         * dfg/DFGInsertionSet.h:
1286         (JSC::DFG::InsertionSet::insertOutOfOrder):
1287         (JSC::DFG::InsertionSet::insertOutOfOrderNode):
1288
1289 2014-10-10  Oliver Hunt  <oliver@apple.com>
1290
1291         Various arguments optimisations in codegen fail to account for arguments being in lexical record
1292         https://bugs.webkit.org/show_bug.cgi?id=137617
1293
1294         Reviewed by Michael Saboff.
1295
1296         Rework the way we track |arguments| references so that we don't try
1297         to use the |arguments| reference on the stack if it's not safe.
1298
1299         To do this without nuking performance it was necessary to update
1300         the parser to track modification of the |arguments| reference
1301         itself.
1302
1303         * bytecode/CodeBlock.cpp:
1304         * bytecompiler/BytecodeGenerator.cpp:
1305         (JSC::BytecodeGenerator::BytecodeGenerator):
1306         (JSC::BytecodeGenerator::willResolveToArguments):
1307         (JSC::BytecodeGenerator::uncheckedLocalArgumentsRegister):
1308         (JSC::BytecodeGenerator::emitCall):
1309         (JSC::BytecodeGenerator::emitConstruct):
1310         (JSC::BytecodeGenerator::emitEnumeration):
1311         (JSC::BytecodeGenerator::uncheckedRegisterForArguments): Deleted.
1312         * bytecompiler/BytecodeGenerator.h:
1313         (JSC::BytecodeGenerator::hasSafeLocalArgumentsRegister):
1314         * bytecompiler/NodesCodegen.cpp:
1315         (JSC::BracketAccessorNode::emitBytecode):
1316         (JSC::DotAccessorNode::emitBytecode):
1317         (JSC::getArgumentByVal):
1318         (JSC::CallFunctionCallDotNode::emitBytecode):
1319         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1320         (JSC::ArrayPatternNode::emitDirectBinding):
1321         * interpreter/StackVisitor.cpp:
1322         (JSC::StackVisitor::Frame::existingArguments):
1323         * parser/Nodes.h:
1324         (JSC::ScopeNode::modifiesArguments):
1325         * parser/Parser.cpp:
1326         (JSC::Parser<LexerType>::parseInner):
1327         * parser/Parser.h:
1328         (JSC::Scope::getCapturedVariables):
1329         * parser/ParserModes.h:
1330
1331 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1332
1333         Use WTF::move() instead of std::move() to help ensure move semantics in JavaScriptCore
1334         https://bugs.webkit.org/show_bug.cgi?id=137809
1335
1336         Reviewed by Csaba Osztrogonác.
1337
1338         Substitution of WTF::move() for std::move(). Clean up std::move() in JavaScriptCore.
1339
1340         * bytecode/GetByIdStatus.cpp:
1341         (JSC::GetByIdStatus::computeForStubInfo):
1342         * bytecode/PutByIdStatus.cpp:
1343         (JSC::PutByIdStatus::computeForStubInfo):
1344         * bytecode/PutByIdVariant.cpp:
1345         (JSC::PutByIdVariant::setter):
1346
1347 2014-10-15  Oliver Hunt  <oliver@apple.com>
1348
1349         Use a single allocation for the Arguments object
1350         https://bugs.webkit.org/show_bug.cgi?id=137751
1351
1352         Reviewed by Filip Pizlo.
1353
1354         This patch removes the secondary allocation for parameters in the Arguments
1355         object.  This is faily simple, but we needed to make it possible for the JIT
1356         to allocate a variable GC object.  To do this i've added a new 
1357         emitAllocateVariableSizedJSObject function to the JIT that does the work to
1358         find the correct heap for a variable sized allocation and then bump that
1359         allocator.
1360
1361         * dfg/DFGSpeculativeJIT.cpp:
1362         (JSC::DFG::SpeculativeJIT::emitAllocateArguments):
1363         * dfg/DFGSpeculativeJIT.h:
1364         (JSC::DFG::SpeculativeJIT::emitAllocateVariableSizedJSObject):
1365         * heap/CopyToken.h:
1366         * heap/Heap.h:
1367         (JSC::Heap::subspaceForObjectWithoutDestructor):
1368         (JSC::Heap::subspaceForObjectNormalDestructor):
1369         (JSC::Heap::subspaceForObjectsWithImmortalStructure):
1370         * heap/MarkedSpace.h:
1371         (JSC::MarkedSpace::subspaceForObjectsWithNormalDestructor):
1372         (JSC::MarkedSpace::subspaceForObjectsWithImmortalStructure):
1373         (JSC::MarkedSpace::subspaceForObjectsWithoutDestructor):
1374         * interpreter/StackVisitor.cpp:
1375         (JSC::StackVisitor::Frame::createArguments):
1376         * runtime/Arguments.cpp:
1377         (JSC::Arguments::visitChildren):
1378         (JSC::Arguments::copyBackingStore):
1379         (JSC::Arguments::tearOff):
1380         (JSC::Arguments::allocateRegisterArray): Deleted.
1381         * runtime/Arguments.h:
1382         (JSC::Arguments::create):
1383         (JSC::Arguments::isTornOff):
1384         (JSC::Arguments::offsetOfRegisterArray):
1385         (JSC::Arguments::registerArraySizeInBytes):
1386         (JSC::Arguments::registerArray):
1387         (JSC::Arguments::allocationSize): Deleted.
1388
1389 2014-10-15  Filip Pizlo  <fpizlo@apple.com>
1390
1391         Apparently we've had a hole in arguments capture all along
1392         https://bugs.webkit.org/show_bug.cgi?id=137767
1393
1394         Reviewed by Oliver Hunt.
1395
1396         * dfg/DFGByteCodeParser.cpp:
1397         (JSC::DFG::ByteCodeParser::getArgument):
1398         * tests/stress/arguments-captured.js: Added.
1399         (foo):
1400         (bar):
1401
1402 2014-10-16  Saam Barati  <saambarati1@gmail.com>
1403
1404         Have the ProfileType node in the DFG convert to a structure check where it can
1405         https://bugs.webkit.org/show_bug.cgi?id=137596
1406
1407         Reviewed by Filip Pizlo.
1408
1409         TypeSet now keeps track of the live set of Structures it has seen.
1410         It no longer nukes everything during GC. It now only removes unmarked
1411         structures during GC. This modification allows the ProfileType node 
1412         to convert into a CheckStructure node safely in the DFG. 
1413
1414         This change brings up the conversion rate from ProfileType to Check 
1415         or CheckStructrue from ~45% to ~65%. This change also speeds the 
1416         type profiler up significantly: consistently between 2x-20x faster. 
1417
1418         This patch also does some slight refactoring: a few type profiler
1419         related fields are moved from VM to TypeProfiler.
1420
1421         * bytecode/CodeBlock.cpp:
1422         (JSC::CodeBlock::CodeBlock):
1423         * dfg/DFGFixupPhase.cpp:
1424         (JSC::DFG::FixupPhase::fixupNode):
1425         * dfg/DFGNode.h:
1426         (JSC::DFG::Node::convertToCheckStructure):
1427         * heap/Heap.cpp:
1428         (JSC::Heap::collect):
1429         * runtime/SymbolTable.cpp:
1430         (JSC::SymbolTable::uniqueIDForVariable):
1431         * runtime/SymbolTable.h:
1432         * runtime/TypeLocationCache.cpp:
1433         (JSC::TypeLocationCache::getTypeLocation):
1434         * runtime/TypeProfiler.cpp:
1435         (JSC::TypeProfiler::TypeProfiler):
1436         (JSC::TypeProfiler::nextTypeLocation):
1437         (JSC::TypeProfiler::invalidateTypeSetCache):
1438         (JSC::TypeProfiler::dumpTypeProfilerData):
1439         * runtime/TypeProfiler.h:
1440         (JSC::TypeProfiler::getNextUniqueVariableID):
1441         * runtime/TypeProfilerLog.cpp:
1442         (JSC::TypeProfilerLog::processLogEntries):
1443         * runtime/TypeSet.cpp:
1444         (JSC::TypeSet::addTypeInformation):
1445         (JSC::TypeSet::invalidateCache):
1446         * runtime/TypeSet.h:
1447         (JSC::TypeSet::structureSet):
1448         * runtime/VM.cpp:
1449         (JSC::VM::VM):
1450         (JSC::VM::enableTypeProfiler):
1451         (JSC::VM::disableTypeProfiler):
1452         (JSC::VM::dumpTypeProfilerData):
1453         (JSC::VM::nextTypeLocation): Deleted.
1454         (JSC::VM::invalidateTypeSetCache): Deleted.
1455         * runtime/VM.h:
1456         (JSC::VM::typeProfiler):
1457         (JSC::VM::getNextUniqueVariableID): Deleted.
1458         * tests/typeProfiler/dfg-jit-optimizations.js:
1459
1460 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
1461
1462         Use isnan from std namespace in ProfileGenerator.cpp
1463         https://bugs.webkit.org/show_bug.cgi?id=137653
1464
1465         Reviewed by Darin Adler.
1466
1467         The C++ isnan() function is in the std namespace. The unprefixed isnan
1468         may be available because of C99 headers leakage in C++, but should not
1469         be used.
1470
1471         No new tests: no functional change, build fix on platforms which don't
1472         export C99 functions in C++.
1473
1474         * profiler/ProfileGenerator.cpp:
1475         (JSC::ProfileGenerator::beginCallEntry):
1476         (JSC::ProfileGenerator::endCallEntry):
1477         (JSC::ProfileGenerator::didPause):
1478         (JSC::ProfileGenerator::didContinue):
1479
1480 2014-10-15  Michael Saboff  <msaboff@apple.com>
1481
1482         REGRESSION(r174025): remote inspector crashes frequently when executing inspector frontend's JavaScript
1483         https://bugs.webkit.org/show_bug.cgi?id=137758
1484
1485         Rubber stamped by Filip Pizlo.
1486
1487         Reverted r174025 for just PutByOffset Nodes.
1488
1489         * dfg/DFGFixupPhase.cpp:
1490         (JSC::DFG::FixupPhase::fixupNode):
1491
1492 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1493
1494         Clean up unnecessary PassOwnPtr.h inclusion
1495         https://bugs.webkit.org/show_bug.cgi?id=137726
1496
1497         Reviewed by Chris Dumez.
1498
1499         * API/JSCallbackObject.h: Remove PassOwnPtr.h inclusion.
1500         * bytecode/DFGExitProfile.cpp: ditto.
1501
1502 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
1503
1504         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
1505
1506         * JavaScriptCore.vcxproj: Modified properties svn:ignore and svn:ignore.
1507         * JavaScriptCore.vcxproj/jsc: Modified property svn:ignore.
1508
1509 2014-10-14  Matthew Mirman  <mmirman@apple.com>
1510
1511         Removes references to LLVMJIT which is no longer part of LLVM
1512         https://bugs.webkit.org/show_bug.cgi?id=137708
1513
1514         Reviewed by Filip Pizlo.
1515
1516         * Configurations/LLVMForJSC.xcconfig: removed -lLLVMJIT
1517         * llvm/LLVMAPIFunctions.h: removed LinkInJIT
1518
1519 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
1520
1521         [Win32] Thunk is not implemented.
1522         https://bugs.webkit.org/show_bug.cgi?id=137691
1523
1524         Reviewed by Mark Lam.
1525
1526         Thunks for functions with double operands (floor, etc.) are not implemented on Win32.
1527
1528         * jit/ThunkGenerators.cpp:
1529
1530 2014-10-12  Alexey Proskuryakov  <ap@apple.com>
1531
1532         Adding svn:ignore so that .pyc files don't show up as new.
1533
1534         * inspector/scripts/codegen: Added property svn:ignore.
1535
1536 2014-10-10  Commit Queue  <commit-queue@webkit.org>
1537
1538         Unreviewed, rolling out r174606.
1539         https://bugs.webkit.org/show_bug.cgi?id=137621
1540
1541         broke a JSC test (Requested by estes on #webkit).
1542
1543         Reverted changeset:
1544
1545         "Various arguments optimisations in codegen fail to account
1546         for arguments being in lexical record"
1547         https://bugs.webkit.org/show_bug.cgi?id=137617
1548         http://trac.webkit.org/changeset/174606
1549
1550 2014-10-10  Oliver Hunt  <oliver@apple.com>
1551
1552         Various arguments optimisations in codegen fail to account for arguments being in lexical record
1553         https://bugs.webkit.org/show_bug.cgi?id=137617
1554
1555         Reviewed by Michael Saboff.
1556
1557         Rework the way we track |arguments| references so that we don't try
1558         to use the |arguments| reference on the stack if it's not safe.
1559
1560         To do this without nuking performance it was necessary to update
1561         the parser to track modification of the |arguments| reference
1562         itself.
1563
1564         * bytecode/CodeBlock.cpp:
1565         * bytecompiler/BytecodeGenerator.cpp:
1566         (JSC::BytecodeGenerator::BytecodeGenerator):
1567         (JSC::BytecodeGenerator::willResolveToArguments):
1568         (JSC::BytecodeGenerator::uncheckedLocalArgumentsRegister):
1569         (JSC::BytecodeGenerator::emitCall):
1570         (JSC::BytecodeGenerator::emitConstruct):
1571         (JSC::BytecodeGenerator::emitEnumeration):
1572         (JSC::BytecodeGenerator::uncheckedRegisterForArguments): Deleted.
1573         * bytecompiler/BytecodeGenerator.h:
1574         (JSC::BytecodeGenerator::hasSafeLocalArgumentsRegister):
1575         * bytecompiler/NodesCodegen.cpp:
1576         (JSC::BracketAccessorNode::emitBytecode):
1577         (JSC::DotAccessorNode::emitBytecode):
1578         (JSC::getArgumentByVal):
1579         (JSC::CallFunctionCallDotNode::emitBytecode):
1580         (JSC::ApplyFunctionCallDotNode::emitBytecode):
1581         (JSC::ArrayPatternNode::emitDirectBinding):
1582         * interpreter/StackVisitor.cpp:
1583         (JSC::StackVisitor::Frame::existingArguments):
1584         * parser/Nodes.h:
1585         (JSC::ScopeNode::modifiesArguments):
1586         * parser/Parser.cpp:
1587         (JSC::Parser<LexerType>::parseInner):
1588         * parser/Parser.h:
1589         (JSC::Scope::getCapturedVariables):
1590         * parser/ParserModes.h:
1591
1592 2014-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1593
1594         Web Inspector: Remove unused generator code
1595         https://bugs.webkit.org/show_bug.cgi?id=137564
1596
1597         Reviewed by Brian Burg.
1598
1599         * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
1600         (BackendDispatcherHeaderGenerator.generate_output): Deleted.
1601         * inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
1602         (BackendDispatcherImplementationGenerator.generate_output):
1603         * inspector/scripts/codegen/generate_frontend_dispatcher_header.py:
1604         (FrontendDispatcherHeaderGenerator.generate_output):
1605         * inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:
1606         (FrontendDispatcherImplementationGenerator.generate_output):
1607         * inspector/scripts/codegen/generate_protocol_types_header.py:
1608         (ProtocolTypesHeaderGenerator.generate_output):
1609         * inspector/scripts/codegen/generate_protocol_types_implementation.py:
1610         (ProtocolTypesImplementationGenerator.generate_output):
1611         inputFilename is now handled by the generic generator base class.
1612
1613         * inspector/scripts/codegen/models.py:
1614         (Framework.fromString):
1615         (Frameworks):
1616         * inspector/scripts/generate-inspector-protocol-bindings.py:
1617         The WTF framework is unused. Remove unexpected frameworks.
1618
1619 2014-10-09  Dean Jackson  <dino@apple.com>
1620
1621         Remove ENABLE_CSS3_CONDITIONAL_RULES
1622         https://bugs.webkit.org/show_bug.cgi?id=137571
1623
1624         Reviewed by Simon Fraser.
1625
1626         * Configurations/FeatureDefines.xcconfig:
1627
1628 2014-10-09  Adrien Destugues  <pulkomandy@gmail.com>
1629
1630         Fix compiler warning on noreturn function
1631         https://bugs.webkit.org/show_bug.cgi?id=137558
1632
1633         Reviewed by Darin Adler.
1634
1635         The function is marked "noreturn", but the stub implementation does
1636         return. No new tests: function is never called. Only fixes a warning.
1637
1638         * heap/HeapStatistics.cpp:
1639         (JSC::HeapStatistics::exitWithFailure):
1640
1641 2014-10-09  Akos Kiss  <akiss@inf.u-szeged.hu>
1642
1643         Ensure that inline assembly Thunk functions don't conflict with the section designations of the compiler
1644         https://bugs.webkit.org/show_bug.cgi?id=137434
1645
1646         Reviewed by Michael Saboff.
1647
1648         The ARM64 version of the defineUnaryDoubleOpWrapper macro in
1649         ThunkGenerators.cpp contains inline assembly with .text assembler
1650         directive followed by a static variable declaration. This macro gets
1651         expanded several times afterwards, however, only during the compilation
1652         of the first expansion does gcc insert a .data assembler directive
1653         before the assembled version of the static variable. Thus, only the
1654         first variable gets allocated in the .data section, all the others
1655         remain in .text. If JavaScriptCore is built as a shared library then
1656         this causes a segmentation fault during dynamic linking.
1657
1658         This patch puts a .previous directive at the end of the inline assembly
1659         to ensure that the assumptions of the compiler about the sections are
1660         not broken and the following variable goes to the right place.
1661
1662         * jit/ThunkGenerators.cpp:
1663
1664 2014-10-08  Oliver Hunt  <oliver@apple.com>
1665
1666         Make sure arguments tearoff is performed through the environment record if necessary
1667         https://bugs.webkit.org/show_bug.cgi?id=137538
1668
1669         Reviewed by Michael Saboff.
1670
1671         Fairly simple change.  If we have a lexical record we need to pull the unmodified
1672         arguments object from the record and then use the standard op_tear_off_arguments
1673         instruction on the temporary.
1674
1675         * bytecompiler/BytecodeGenerator.cpp:
1676         (JSC::BytecodeGenerator::emitGetOwnScope):
1677         (JSC::BytecodeGenerator::emitReturn):
1678         * bytecompiler/BytecodeGenerator.h:
1679
1680 2014-10-08  peavo@outlook.com  <peavo@outlook.com>
1681
1682         [WinCairo] Enable JIT on 32-bit.
1683         https://bugs.webkit.org/show_bug.cgi?id=137521
1684
1685         Reviewed by Mark Lam.
1686
1687         Enable JIT on Windows 32-bit, but disable it at runtime if SSE2 is not present.
1688
1689         * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl:
1690         * runtime/Options.cpp:
1691         (JSC::recomputeDependentOptions):
1692
1693 2014-10-08  Brent Fulgham  <bfulgham@apple.com>
1694
1695         [Win] Resolve some static analysis warnings in JavaScriptCore
1696         https://bugs.webkit.org/show_bug.cgi?id=137508
1697
1698         Reviewed by Geoffrey Garen.
1699
1700         * API/tests/testapi.c:
1701         (assertEqualsAsCharactersPtr): MSVC insists on using %Iu as its format specifier
1702         for size_t. Make the format string conditional on Windows.
1703         * bytecode/Watchpoint.h:
1704         (JSC::InlineWatchpointSet::encodeState): Silence warning about left-shifting 'state'
1705         as a 32-bit value before OR-ing it with a 64-bit value.
1706         * dfg/DFGFixupPhase.cpp:
1707         (JSC::DFG::FixupPhase::fixupNode): Silence warning about operator prescedence
1708         causing the || operation to take place before the >= test.
1709         * dfg/DFGInPlaceAbstractState.cpp:
1710         (JSC::DFG::InPlaceAbstractState::endBasicBlock): Ditto (|| before !=)
1711         * testRegExp.cpp:
1712         (testOneRegExp): Ditto %Iu format specifier.
1713         * yarr/YarrInterpreter.cpp:
1714         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): Silence warning about
1715         using a 32-bit value as part of a 64-bit calculation.
1716
1717 2014-10-07  Simon Fraser  <simon.fraser@apple.com>
1718
1719         Roll-over Changelogs.
1720
1721         * ChangeLog-2014-10-07: Copied from Source/JavaScriptCore/ChangeLog.
1722
1723 == Rolled over to ChangeLog-2014-10-07 ==