Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 1890763002: [turbofan] Remove unused PlainPrimitiveToNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compilation-dependencies.h" 6 #include "src/compilation-dependencies.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 frame_state->InputAt(kFrameStateContextInput), 240 frame_state->InputAt(kFrameStateContextInput),
241 frame_state->InputAt(kFrameStateFunctionInput), 241 frame_state->InputAt(kFrameStateFunctionInput),
242 frame_state->InputAt(kFrameStateOuterStateInput)); 242 frame_state->InputAt(kFrameStateOuterStateInput));
243 } 243 }
244 244
245 Node* ConvertPlainPrimitiveToNumber(Node* node) { 245 Node* ConvertPlainPrimitiveToNumber(Node* node) {
246 DCHECK(NodeProperties::GetType(node)->Is(Type::PlainPrimitive())); 246 DCHECK(NodeProperties::GetType(node)->Is(Type::PlainPrimitive()));
247 // Avoid inserting too many eager ToNumber() operations. 247 // Avoid inserting too many eager ToNumber() operations.
248 Reduction const reduction = lowering_->ReduceJSToNumberInput(node); 248 Reduction const reduction = lowering_->ReduceJSToNumberInput(node);
249 if (reduction.Changed()) return reduction.replacement(); 249 if (reduction.Changed()) return reduction.replacement();
250 // TODO(jarin) Use PlainPrimitiveToNumber once we have it.
251 return graph()->NewNode( 250 return graph()->NewNode(
252 javascript()->ToNumber(), node, jsgraph()->NoContextConstant(), 251 javascript()->ToNumber(), node, jsgraph()->NoContextConstant(),
253 jsgraph()->EmptyFrameState(), graph()->start(), graph()->start()); 252 jsgraph()->EmptyFrameState(), graph()->start(), graph()->start());
254 } 253 }
255 254
256 Node* ConvertSingleInputToNumber(Node* node, Node* frame_state) { 255 Node* ConvertSingleInputToNumber(Node* node, Node* frame_state) {
257 DCHECK(!NodeProperties::GetType(node)->Is(Type::PlainPrimitive())); 256 DCHECK(!NodeProperties::GetType(node)->Is(Type::PlainPrimitive()));
258 Node* const n = graph()->NewNode(javascript()->ToNumber(), node, context(), 257 Node* const n = graph()->NewNode(javascript()->ToNumber(), node, context(),
259 frame_state, effect(), control()); 258 frame_state, effect(), control());
260 NodeProperties::ReplaceUses(node_, node_, node_, n, n); 259 NodeProperties::ReplaceUses(node_, node_, node_, n, n);
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 } 1813 }
1815 1814
1816 1815
1817 CompilationDependencies* JSTypedLowering::dependencies() const { 1816 CompilationDependencies* JSTypedLowering::dependencies() const {
1818 return dependencies_; 1817 return dependencies_;
1819 } 1818 }
1820 1819
1821 } // namespace compiler 1820 } // namespace compiler
1822 } // namespace internal 1821 } // namespace internal
1823 } // namespace v8 1822 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698