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

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

Issue 1640393002: [turbofan] Add support for Math.round to the JSBuiltinReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/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 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12
13 // Forward declarations.
14 class TypeCache;
15
12 namespace compiler { 16 namespace compiler {
13 17
14 // Forward declarations. 18 // Forward declarations.
15 class CommonOperatorBuilder; 19 class CommonOperatorBuilder;
16 class JSGraph; 20 class JSGraph;
17 class MachineOperatorBuilder; 21 class MachineOperatorBuilder;
18 class SimplifiedOperatorBuilder; 22 class SimplifiedOperatorBuilder;
19 23
20 24
21 class JSBuiltinReducer final : public AdvancedReducer { 25 class JSBuiltinReducer final : public AdvancedReducer {
22 public: 26 public:
23 explicit JSBuiltinReducer(Editor* editor, JSGraph* jsgraph); 27 explicit JSBuiltinReducer(Editor* editor, JSGraph* jsgraph);
24 ~JSBuiltinReducer() final {} 28 ~JSBuiltinReducer() final {}
25 29
26 Reduction Reduce(Node* node) final; 30 Reduction Reduce(Node* node) final;
27 31
28 private: 32 private:
29 Reduction ReduceFunctionCall(Node* node); 33 Reduction ReduceFunctionCall(Node* node);
30 Reduction ReduceMathMax(Node* node); 34 Reduction ReduceMathMax(Node* node);
31 Reduction ReduceMathImul(Node* node); 35 Reduction ReduceMathImul(Node* node);
32 Reduction ReduceMathFround(Node* node); 36 Reduction ReduceMathFround(Node* node);
37 Reduction ReduceMathRound(Node* node);
33 38
34 Graph* graph() const; 39 Graph* graph() const;
35 JSGraph* jsgraph() const { return jsgraph_; } 40 JSGraph* jsgraph() const { return jsgraph_; }
36 Isolate* isolate() const; 41 Isolate* isolate() const;
37 CommonOperatorBuilder* common() const; 42 CommonOperatorBuilder* common() const;
38 MachineOperatorBuilder* machine() const; 43 MachineOperatorBuilder* machine() const;
39 SimplifiedOperatorBuilder* simplified() const; 44 SimplifiedOperatorBuilder* simplified() const;
40 45
41 JSGraph* jsgraph_; 46 JSGraph* const jsgraph_;
47 TypeCache const& type_cache_;
42 }; 48 };
43 49
44 } // namespace compiler 50 } // namespace compiler
45 } // namespace internal 51 } // namespace internal
46 } // namespace v8 52 } // namespace v8
47 53
48 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ 54 #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