Changeset 180703 in webkit
- Timestamp:
- Feb 26, 2015, 2:44:45 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/js/regress/arguments-out-of-bounds-expected.txt (added)
-
LayoutTests/js/regress/arguments-out-of-bounds.html (added)
-
LayoutTests/js/regress/exit-length-on-plain-object-expected.txt (added)
-
LayoutTests/js/regress/exit-length-on-plain-object.html (added)
-
LayoutTests/js/regress/script-tests/arguments-out-of-bounds.js (added)
-
LayoutTests/js/regress/script-tests/exit-length-on-plain-object.js (added)
-
LayoutTests/js/regress/script-tests/string-out-of-bounds.js (added)
-
LayoutTests/js/regress/string-out-of-bounds-expected.txt (added)
-
LayoutTests/js/regress/string-out-of-bounds.html (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/bytecode/ExitKind.cpp (modified) (1 diff)
-
Source/JavaScriptCore/bytecode/ExitKind.h (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGArrayMode.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/tests/stress/array-length-array-storage-plain-object.js (added)
-
Source/JavaScriptCore/tests/stress/array-length-plain-object.js (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r180690 r180703 1 2015-02-26 Filip Pizlo <fpizlo@apple.com> 2 3 Various array access corner cases should take OSR exit feedback 4 https://bugs.webkit.org/show_bug.cgi?id=142056 5 6 Reviewed by Geoffrey Garen. 7 8 * js/regress/arguments-out-of-bounds-expected.txt: Added. 9 * js/regress/arguments-out-of-bounds.html: Added. 10 * js/regress/exit-length-on-plain-object-expected.txt: Added. 11 * js/regress/exit-length-on-plain-object.html: Added. 12 * js/regress/script-tests/arguments-out-of-bounds.js: Added. 13 (foo): 14 (bar): 15 * js/regress/script-tests/exit-length-on-plain-object.js: Added. 16 (foo): 17 * js/regress/script-tests/string-out-of-bounds.js: Added. 18 (bar): 19 * js/regress/string-out-of-bounds-expected.txt: Added. 20 * js/regress/string-out-of-bounds.html: Added. 21 1 22 2015-02-26 Mark Lam <mark.lam@apple.com> 2 23 -
trunk/Source/JavaScriptCore/ChangeLog
r180691 r180703 1 2015-02-26 Filip Pizlo <fpizlo@apple.com> 2 3 Various array access corner cases should take OSR exit feedback 4 https://bugs.webkit.org/show_bug.cgi?id=142056 5 6 Reviewed by Geoffrey Garen. 7 8 Two major changes here: 9 10 - Don't keep converting GetById into GetArrayLength if we exited due to any kind of array 11 type check. 12 13 - Use a generic form of GetByVal/PutByVal if we exited due to any kind of exotic checks, 14 like the Arguments safety checks. We use the "ExoticObjectMode" for out-of-bounds on 15 arguments for now, since it's a convenient way of forcing out-of-bounds to be handled by 16 the Generic array mode. 17 18 * bytecode/ExitKind.cpp: 19 (JSC::exitKindToString): 20 * bytecode/ExitKind.h: 21 * dfg/DFGArrayMode.cpp: 22 (JSC::DFG::ArrayMode::refine): 23 * dfg/DFGFixupPhase.cpp: 24 (JSC::DFG::FixupPhase::fixupNode): 25 * dfg/DFGSpeculativeJIT.cpp: 26 (JSC::DFG::SpeculativeJIT::compileGetByValOnArguments): 27 (JSC::DFG::SpeculativeJIT::compileGetArgumentsLength): 28 * tests/stress/array-length-array-storage-plain-object.js: Added. 29 (foo): 30 * tests/stress/array-length-plain-object.js: Added. 31 (foo): 32 1 33 2015-02-25 Filip Pizlo <fpizlo@apple.com> 2 34 -
trunk/Source/JavaScriptCore/bytecode/ExitKind.cpp
r180279 r180703 65 65 case ArgumentsEscaped: 66 66 return "ArgumentsEscaped"; 67 case ExoticObjectMode: 68 return "ExoticObjectMode"; 67 69 case NotStringObject: 68 70 return "NotStringObject"; -
trunk/Source/JavaScriptCore/bytecode/ExitKind.h
r180279 r180703 45 45 InadequateCoverage, // We exited because we ended up in code that didn't have profiling coverage. 46 46 ArgumentsEscaped, // We exited because arguments escaped but we didn't expect them to. 47 ExoticObjectMode, // We exited because some exotic object that we were accessing was in an exotic mode (like Arguments with slow arguments). 47 48 NotStringObject, // We exited because we shouldn't have attempted to optimize string object access. 48 49 VarargsOverflow, // We exited because a varargs call passed more arguments than we expected. -
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r171380 r180703 1 1 /* 2 * Copyright (C) 2012 , 2013, 2014Apple Inc. All rights reserved.2 * Copyright (C) 2012-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 146 146 147 147 if (!isInt32Speculation(index)) 148 return ArrayMode(Array::Generic); 149 150 // If we had exited because of an exotic object behavior, then don't try to specialize. 151 if (graph.hasExitSite(node->origin.semantic, ExoticObjectMode)) 148 152 return ArrayMode(Array::Generic); 149 153 -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r180691 r180703 920 920 if (!node->child1()->shouldSpeculateCell()) 921 921 break; 922 StringImpl* impl = m_graph.identifiers()[node->identifierNumber()]; 923 if (impl == vm().propertyNames->length.impl()) { 924 attemptToMakeGetArrayLength(node); 925 break; 926 } 927 if (impl == vm().propertyNames->byteLength.impl()) { 928 attemptToMakeGetTypedArrayByteLength(node); 929 break; 930 } 931 if (impl == vm().propertyNames->byteOffset.impl()) { 932 attemptToMakeGetTypedArrayByteOffset(node); 933 break; 922 923 // If we hadn't exited because of BadCache, BadIndexingType, or ExoticObjectMode, then 924 // leave this as a GetById. 925 if (!m_graph.hasExitSite(node->origin.semantic, BadCache) 926 && !m_graph.hasExitSite(node->origin.semantic, BadIndexingType) 927 && !m_graph.hasExitSite(node->origin.semantic, ExoticObjectMode)) { 928 StringImpl* impl = m_graph.identifiers()[node->identifierNumber()]; 929 if (impl == vm().propertyNames->length.impl()) { 930 attemptToMakeGetArrayLength(node); 931 break; 932 } 933 if (impl == vm().propertyNames->byteLength.impl()) { 934 attemptToMakeGetTypedArrayByteLength(node); 935 break; 936 } 937 if (impl == vm().propertyNames->byteOffset.impl()) { 938 attemptToMakeGetTypedArrayByteOffset(node); 939 break; 940 } 934 941 } 935 942 fixEdge<CellUse>(node->child1()); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r180587 r180703 4114 4114 // Two really lame checks. 4115 4115 speculationCheck( 4116 Uncountable, JSValueSource(), 0,4116 ExoticObjectMode, JSValueSource(), 0, 4117 4117 m_jit.branch32( 4118 4118 MacroAssembler::AboveOrEqual, propertyReg, 4119 4119 MacroAssembler::Address(baseReg, Arguments::offsetOfNumArguments()))); 4120 4120 speculationCheck( 4121 Uncountable, JSValueSource(), 0,4121 ExoticObjectMode, JSValueSource(), 0, 4122 4122 m_jit.branchTestPtr( 4123 4123 MacroAssembler::NonZero, … … 4169 4169 4170 4170 speculationCheck( 4171 Uncountable, JSValueSource(), 0,4171 ExoticObjectMode, JSValueSource(), 0, 4172 4172 m_jit.branchTest8( 4173 4173 MacroAssembler::NonZero,
Note:
See TracChangeset
for help on using the changeset viewer.