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