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

Side by Side Diff: src/compiler/simplified-operator-reducer.h

Issue 638853004: [turbofan] Eliminate typed array bounds checks if both key and length are constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « src/compiler/pipeline.cc ('k') | src/compiler/simplified-operator-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_SIMPLIFIED_OPERATOR_REDUCER_H_ 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
7 7
8 #include "src/compiler/graph-reducer.h" 8 #include "src/compiler/graph-reducer.h"
9 #include "src/compiler/simplified-operator.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 13
13 // Forward declarations. 14 // Forward declarations.
14 class Heap; 15 class Heap;
15 16
16 namespace compiler { 17 namespace compiler {
17 18
18 // Forward declarations. 19 // Forward declarations.
19 class JSGraph; 20 class JSGraph;
20 class MachineOperatorBuilder; 21 class MachineOperatorBuilder;
21 22
22 class SimplifiedOperatorReducer FINAL : public Reducer { 23 class SimplifiedOperatorReducer FINAL : public Reducer {
23 public: 24 public:
24 explicit SimplifiedOperatorReducer(JSGraph* jsgraph) : jsgraph_(jsgraph) {} 25 explicit SimplifiedOperatorReducer(JSGraph* jsgraph);
25 virtual ~SimplifiedOperatorReducer(); 26 virtual ~SimplifiedOperatorReducer();
26 27
27 virtual Reduction Reduce(Node* node) OVERRIDE; 28 virtual Reduction Reduce(Node* node) OVERRIDE;
28 29
29 private: 30 private:
30 Reduction Change(Node* node, const Operator* op, Node* a); 31 Reduction Change(Node* node, const Operator* op, Node* a);
31 Reduction ReplaceFloat64(double value); 32 Reduction ReplaceFloat64(double value);
32 Reduction ReplaceInt32(int32_t value); 33 Reduction ReplaceInt32(int32_t value);
33 Reduction ReplaceUint32(uint32_t value) { 34 Reduction ReplaceUint32(uint32_t value) {
34 return ReplaceInt32(bit_cast<int32_t>(value)); 35 return ReplaceInt32(bit_cast<int32_t>(value));
35 } 36 }
36 Reduction ReplaceNumber(double value); 37 Reduction ReplaceNumber(double value);
37 Reduction ReplaceNumber(int32_t value); 38 Reduction ReplaceNumber(int32_t value);
38 39
39 Graph* graph() const; 40 Graph* graph() const;
40 Factory* factory() const; 41 Factory* factory() const;
41 JSGraph* jsgraph() const { return jsgraph_; } 42 JSGraph* jsgraph() const { return jsgraph_; }
42 MachineOperatorBuilder* machine() const; 43 MachineOperatorBuilder* machine() const;
44 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
43 45
44 JSGraph* jsgraph_; 46 JSGraph* jsgraph_;
47 SimplifiedOperatorBuilder simplified_;
45 48
46 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); 49 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer);
47 }; 50 };
48 51
49 } // namespace compiler 52 } // namespace compiler
50 } // namespace internal 53 } // namespace internal
51 } // namespace v8 54 } // namespace v8
52 55
53 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ 56 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/simplified-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698