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

Side by Side Diff: src/compiler/node-matchers.cc

Issue 807693003: [turbofan] Unify custom node matchers. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Win64 Created 6 years 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/node-matchers.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/compiler/node-matchers.h"
6
7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/node-properties-inl.h"
9
10 namespace v8 {
11 namespace internal {
12 namespace compiler {
13
14 Node* JSCallFunctionMatcher::frame_state() const {
15 DCHECK(OperatorProperties::HasFrameStateInput(op()));
16 return NodeProperties::GetFrameStateInput(node());
17 }
18
19
20 JSCallFunctionMatcher::const_iterator JSCallFunctionMatcher::begin() const {
21 // Skip the function input.
22 return node()->inputs().begin() + 1;
23 }
24
25
26 JSCallFunctionMatcher::const_iterator JSCallFunctionMatcher::end() const {
27 return begin() + size();
28 }
29
30
31 size_t JSCallFunctionMatcher::size() const {
32 // The value input count includes function and receiver.
33 size_t const value_input_count = op()->ValueInputCount();
34 DCHECK_LE(2, value_input_count);
35 return value_input_count - 1;
36 }
37
38
39 const Runtime::Function* JSCallRuntimeMatcher::function() const {
40 return Runtime::FunctionForId(CallRuntimeParametersOf(node()->op()).id());
41 }
42
43 } // namespace compiler
44 } // namespace internal
45 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-matchers.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698