Changeset 213876 in webkit
- Timestamp:
- Mar 13, 2017 3:52:41 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r213873 r213876 1 2017-03-13 Filip Pizlo <fpizlo@apple.com> 2 3 FTL should not flush strict arguments unless it really needs to 4 https://bugs.webkit.org/show_bug.cgi?id=169519 5 6 Reviewed by Mark Lam. 7 8 This is a refinement that we should have done ages ago. This kills some pointless PutStacks 9 in DFG SSA IR. It can sometimes unlock other optimizations. 10 11 Relanding after I fixed the special cases for CreateArguments-style nodes. 12 13 * dfg/DFGPreciseLocalClobberize.h: 14 (JSC::DFG::PreciseLocalClobberizeAdaptor::readTop): 15 1 16 2017-03-13 Devin Rousso <webkit@devinrousso.com> 2 17 -
trunk/Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h
r213860 r213876 1 1 /* 2 * Copyright (C) 2014-201 6Apple Inc. All rights reserved.2 * Copyright (C) 2014-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 138 138 }; 139 139 140 bool isForwardingNode = false;141 140 switch (m_node->op()) { 142 141 case ForwardVarargs: … … 145 144 case TailCallForwardVarargs: 146 145 case TailCallForwardVarargsInlinedCaller: 147 isForwardingNode = true;148 FALLTHROUGH;149 146 case GetMyArgumentByVal: 150 case GetMyArgumentByValOutOfBounds: { 151 147 case GetMyArgumentByValOutOfBounds: 148 case CreateDirectArguments: 149 case CreateScopedArguments: 150 case CreateClonedArguments: 151 case PhantomDirectArguments: 152 case PhantomClonedArguments: 153 case GetRestLength: 154 case CreateRest: { 155 bool isForwardingNode = false; 156 bool isPhantomNode = false; 157 switch (m_node->op()) { 158 case ForwardVarargs: 159 case CallForwardVarargs: 160 case ConstructForwardVarargs: 161 case TailCallForwardVarargs: 162 case TailCallForwardVarargsInlinedCaller: 163 isForwardingNode = true; 164 break; 165 case PhantomDirectArguments: 166 case PhantomClonedArguments: 167 isPhantomNode = true; 168 break; 169 default: 170 break; 171 } 172 173 if (isPhantomNode && isFTL(m_graph.m_plan.mode)) 174 break; 175 152 176 if (isForwardingNode && m_node->hasArgumentsChild() && m_node->argumentsChild() && m_node->argumentsChild()->op() == PhantomNewArrayWithSpread) { 153 177 Node* arrayWithSpread = m_node->argumentsChild().node(); … … 195 219 break; 196 220 } 197 198 221 199 222 default: { 200 // All of the outermost arguments, except this, are definitely read. 201 for (unsigned i = m_graph.m_codeBlock->numParameters(); i-- > 1;) 202 m_read(virtualRegisterForArgument(i)); 223 // All of the outermost arguments, except this, are read in sloppy mode. 224 if (!m_graph.m_codeBlock->isStrictMode()) { 225 for (unsigned i = m_graph.m_codeBlock->numParameters(); i-- > 1;) 226 m_read(virtualRegisterForArgument(i)); 227 } 203 228 204 229 // The stack header is read. … … 208 233 // Read all of the inline arguments and call frame headers that we didn't already capture. 209 234 for (InlineCallFrame* inlineCallFrame = m_node->origin.semantic.inlineCallFrame; inlineCallFrame; inlineCallFrame = inlineCallFrame->getCallerInlineFrameSkippingTailCalls()) { 210 for (unsigned i = inlineCallFrame->arguments.size(); i-- > 1;) 211 m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgument(i).offset())); 235 if (!inlineCallFrame->isStrictMode()) { 236 for (unsigned i = inlineCallFrame->arguments.size(); i-- > 1;) 237 m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgument(i).offset())); 238 } 212 239 if (inlineCallFrame->isClosureCall) 213 240 m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::callee));
Note: See TracChangeset
for help on using the changeset viewer.