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

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

Issue 590993003: Extend JSBuiltinReducer to cover Math.max as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.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 #ifndef V8_COMPILER_JS_BUILTIN_REDUCER_H_ 5 #ifndef V8_COMPILER_JS_BUILTIN_REDUCER_H_
6 #define V8_COMPILER_JS_BUILTIN_REDUCER_H_ 6 #define V8_COMPILER_JS_BUILTIN_REDUCER_H_
7 7
8 #include "src/compiler/graph-reducer.h" 8 #include "src/compiler/graph-reducer.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
11 #include "src/compiler/node.h" 11 #include "src/compiler/node.h"
12 #include "src/compiler/simplified-operator.h" 12 #include "src/compiler/simplified-operator.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace compiler { 16 namespace compiler {
17 17
18 class JSBuiltinReducer FINAL : public Reducer { 18 class JSBuiltinReducer FINAL : public Reducer {
19 public: 19 public:
20 explicit JSBuiltinReducer(JSGraph* jsgraph) 20 explicit JSBuiltinReducer(JSGraph* jsgraph)
21 : jsgraph_(jsgraph), simplified_(jsgraph->zone()) {} 21 : jsgraph_(jsgraph), simplified_(jsgraph->zone()) {}
22 virtual ~JSBuiltinReducer() {} 22 virtual ~JSBuiltinReducer() {}
23 23
24 virtual Reduction Reduce(Node* node) OVERRIDE; 24 virtual Reduction Reduce(Node* node) OVERRIDE;
25 25
26 private: 26 private:
27 Graph* graph() { return jsgraph_->graph(); } 27 JSGraph* jsgraph() const { return jsgraph_; }
28 CommonOperatorBuilder* common() { return jsgraph_->common(); } 28 Graph* graph() const { return jsgraph_->graph(); }
29 MachineOperatorBuilder* machine() { return jsgraph_->machine(); } 29 CommonOperatorBuilder* common() const { return jsgraph_->common(); }
30 MachineOperatorBuilder* machine() const { return jsgraph_->machine(); }
30 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 31 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
31 32
33 Reduction ReduceMathMax(Node* node);
32 Reduction ReduceMathImul(Node* node); 34 Reduction ReduceMathImul(Node* node);
33 35
34 JSGraph* jsgraph_; 36 JSGraph* jsgraph_;
35 SimplifiedOperatorBuilder simplified_; 37 SimplifiedOperatorBuilder simplified_;
36 }; 38 };
37 39
38 } // namespace compiler 40 } // namespace compiler
39 } // namespace internal 41 } // namespace internal
40 } // namespace v8 42 } // namespace v8
41 43
42 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ 44 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698