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

Side by Side Diff: src/compiler/js-builtin-reducer.cc

Issue 686213002: Inline trivial OperatorProperties methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-inlining.cc » ('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/compiler/graph-inl.h" 5 #include "src/compiler/graph-inl.h"
6 #include "src/compiler/js-builtin-reducer.h" 6 #include "src/compiler/js-builtin-reducer.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/types.h" 9 #include "src/types.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 return true; 74 return true;
75 } 75 }
76 76
77 Node* left() { return GetJSCallInput(0); } 77 Node* left() { return GetJSCallInput(0); }
78 Node* right() { return GetJSCallInput(1); } 78 Node* right() { return GetJSCallInput(1); }
79 79
80 int GetJSCallArity() { 80 int GetJSCallArity() {
81 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); 81 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode());
82 // Skip first (i.e. callee) and second (i.e. receiver) operand. 82 // Skip first (i.e. callee) and second (i.e. receiver) operand.
83 return OperatorProperties::GetValueInputCount(node_->op()) - 2; 83 return node_->op()->ValueInputCount() - 2;
84 } 84 }
85 85
86 Node* GetJSCallInput(int index) { 86 Node* GetJSCallInput(int index) {
87 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); 87 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode());
88 DCHECK_LT(index, GetJSCallArity()); 88 DCHECK_LT(index, GetJSCallArity());
89 // Skip first (i.e. callee) and second (i.e. receiver) operand. 89 // Skip first (i.e. callee) and second (i.e. receiver) operand.
90 return NodeProperties::GetValueInput(node_, index + 2); 90 return NodeProperties::GetValueInput(node_, index + 2);
91 } 91 }
92 92
93 private: 93 private:
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return ReplaceWithPureReduction(node, ReduceMathFround(node)); 209 return ReplaceWithPureReduction(node, ReduceMathFround(node));
210 default: 210 default:
211 break; 211 break;
212 } 212 }
213 return NoChange(); 213 return NoChange();
214 } 214 }
215 215
216 } // namespace compiler 216 } // namespace compiler
217 } // namespace internal 217 } // namespace internal
218 } // namespace v8 218 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698