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

Side by Side Diff: src/compiler/js-typed-lowering.h

Issue 564823003: Fix typed lowering of JSAdd on non-number inputs. (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-typed-lowering.cc » ('j') | src/compiler/js-typed-lowering.cc » ('J')
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_OPERATOR_REDUCERS_H_ 5 #ifndef V8_COMPILER_OPERATOR_REDUCERS_H_
6 #define V8_COMPILER_OPERATOR_REDUCERS_H_ 6 #define V8_COMPILER_OPERATOR_REDUCERS_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 // Lowers JS-level operators to simplified operators based on types. 18 // Lowers JS-level operators to simplified operators based on types.
19 class JSTypedLowering FINAL : public Reducer { 19 class JSTypedLowering FINAL : public Reducer {
20 public: 20 public:
21 explicit JSTypedLowering(JSGraph* jsgraph) 21 explicit JSTypedLowering(JSGraph* jsgraph)
22 : jsgraph_(jsgraph), simplified_(jsgraph->zone()) {} 22 : jsgraph_(jsgraph), simplified_(jsgraph->zone()) {}
23 virtual ~JSTypedLowering(); 23 virtual ~JSTypedLowering();
24 24
25 virtual Reduction Reduce(Node* node) OVERRIDE; 25 virtual Reduction Reduce(Node* node) OVERRIDE;
26 26
27 JSGraph* jsgraph() { return jsgraph_; } 27 JSGraph* jsgraph() { return jsgraph_; }
28 Graph* graph() { return jsgraph_->graph(); } 28 Graph* graph() { return jsgraph_->graph(); }
29 Zone* zone() { return jsgraph_->zone(); }
29 30
30 private: 31 private:
31 friend class JSBinopReduction; 32 friend class JSBinopReduction;
32 33
33 Reduction ReplaceEagerly(Node* old, Node* node); 34 Reduction ReplaceEagerly(Node* old, Node* node);
34 Reduction ReplaceWith(Node* node) { return Reducer::Replace(node); } 35 Reduction ReplaceWith(Node* node) { return Reducer::Replace(node); }
35 Reduction ReduceJSAdd(Node* node); 36 Reduction ReduceJSAdd(Node* node);
36 Reduction ReduceJSComparison(Node* node); 37 Reduction ReduceJSComparison(Node* node);
37 Reduction ReduceJSLoadProperty(Node* node); 38 Reduction ReduceJSLoadProperty(Node* node);
38 Reduction ReduceJSStoreProperty(Node* node); 39 Reduction ReduceJSStoreProperty(Node* node);
(...skipping 16 matching lines...) Expand all
55 JSGraph* jsgraph_; 56 JSGraph* jsgraph_;
56 SimplifiedOperatorBuilder simplified_; 57 SimplifiedOperatorBuilder simplified_;
57 MachineOperatorBuilder machine_; 58 MachineOperatorBuilder machine_;
58 }; 59 };
59 60
60 } // namespace compiler 61 } // namespace compiler
61 } // namespace internal 62 } // namespace internal
62 } // namespace v8 63 } // namespace v8
63 64
64 #endif // V8_COMPILER_OPERATOR_REDUCERS_H_ 65 #endif // V8_COMPILER_OPERATOR_REDUCERS_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | src/compiler/js-typed-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698