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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 735583003: Remove ambiguous getter for operator value counts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/operator.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/ast.h" 5 #include "src/ast.h"
6 #include "src/ast-numbering.h" 6 #include "src/ast-numbering.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/ast-graph-builder.h" 8 #include "src/compiler/ast-graph-builder.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/generic-node-inl.h" 10 #include "src/compiler/generic-node-inl.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return NodeProperties::GetValueInput(unique_return(), 0); 80 return NodeProperties::GetValueInput(unique_return(), 0);
81 } 81 }
82 // Return the unique return statement of the graph. 82 // Return the unique return statement of the graph.
83 Node* unique_return() { 83 Node* unique_return() {
84 Node* unique_return = NodeProperties::GetControlInput(end_); 84 Node* unique_return = NodeProperties::GetControlInput(end_);
85 DCHECK_EQ(IrOpcode::kReturn, unique_return->opcode()); 85 DCHECK_EQ(IrOpcode::kReturn, unique_return->opcode());
86 return unique_return; 86 return unique_return;
87 } 87 }
88 88
89 // Counts JSFunction, Receiver, arguments, context but not effect, control. 89 // Counts JSFunction, Receiver, arguments, context but not effect, control.
90 size_t total_parameters() { return start_->op()->OutputCount(); } 90 size_t total_parameters() { return start_->op()->ValueOutputCount(); }
91 91
92 // Counts only formal parameters. 92 // Counts only formal parameters.
93 size_t formal_parameters() { 93 size_t formal_parameters() {
94 DCHECK_GE(total_parameters(), 3); 94 DCHECK_GE(total_parameters(), 3);
95 return total_parameters() - 3; 95 return total_parameters() - 3;
96 } 96 }
97 97
98 // Inline this graph at {call}, use {jsgraph} and its zone to create 98 // Inline this graph at {call}, use {jsgraph} and its zone to create
99 // any new nodes. 99 // any new nodes.
100 void InlineAtCall(JSGraph* jsgraph, Node* call); 100 void InlineAtCall(JSGraph* jsgraph, Node* call);
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 info_->shared_info()->DebugName()->ToCString().get()); 487 info_->shared_info()->DebugName()->ToCString().get());
488 } 488 }
489 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); 489 NodeProperties::ReplaceWithValue(call_node, r.first, r.second);
490 call_node->RemoveAllInputs(); 490 call_node->RemoveAllInputs();
491 DCHECK_EQ(0, call_node->UseCount()); 491 DCHECK_EQ(0, call_node->UseCount());
492 } 492 }
493 } 493 }
494 } 494 }
495 } 495 }
496 } // namespace v8::internal::compiler 496 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698