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

Side by Side Diff: src/compiler/escape-analysis-reducer.h

Issue 2692753004: [turbofan] escape analysis supports arguments object and rest elements (Closed)
Patch Set: handle the case where Deoptimizer::function_ is a Smi Created 3 years, 9 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 | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/escape-analysis-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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_ESCAPE_ANALYSIS_REDUCER_H_ 5 #ifndef V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
6 #define V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_ 6 #define V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/bit-vector.h" 9 #include "src/bit-vector.h"
10 #include "src/compiler/escape-analysis.h" 10 #include "src/compiler/escape-analysis.h"
11 #include "src/compiler/graph-reducer.h" 11 #include "src/compiler/graph-reducer.h"
12 #include "src/globals.h" 12 #include "src/globals.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace compiler { 16 namespace compiler {
17 17
18 // Forward declarations. 18 // Forward declarations.
19 class JSGraph; 19 class JSGraph;
20 20
21 class V8_EXPORT_PRIVATE EscapeAnalysisReducer final 21 class V8_EXPORT_PRIVATE EscapeAnalysisReducer final
22 : public NON_EXPORTED_BASE(AdvancedReducer) { 22 : public NON_EXPORTED_BASE(AdvancedReducer) {
23 public: 23 public:
24 EscapeAnalysisReducer(Editor* editor, JSGraph* jsgraph, 24 EscapeAnalysisReducer(Editor* editor, JSGraph* jsgraph,
25 EscapeAnalysis* escape_analysis, Zone* zone); 25 EscapeAnalysis* escape_analysis, Zone* zone);
26 26
27 Reduction Reduce(Node* node) final; 27 Reduction Reduce(Node* node) final;
28 28
29 void Finalize() override;
30
29 // Verifies that all virtual allocation nodes have been dealt with. Run it 31 // Verifies that all virtual allocation nodes have been dealt with. Run it
30 // after this reducer has been applied. Has no effect in release mode. 32 // after this reducer has been applied. Has no effect in release mode.
31 void VerifyReplacement() const; 33 void VerifyReplacement() const;
32 34
33 bool compilation_failed() const { return compilation_failed_; } 35 bool compilation_failed() const { return compilation_failed_; }
34 36
35 private: 37 private:
36 Reduction ReduceNode(Node* node); 38 Reduction ReduceNode(Node* node);
37 Reduction ReduceLoad(Node* node); 39 Reduction ReduceLoad(Node* node);
38 Reduction ReduceStore(Node* node); 40 Reduction ReduceStore(Node* node);
(...skipping 11 matching lines...) Expand all
50 EscapeAnalysis* escape_analysis() const { return escape_analysis_; } 52 EscapeAnalysis* escape_analysis() const { return escape_analysis_; }
51 Zone* zone() const { return zone_; } 53 Zone* zone() const { return zone_; }
52 54
53 JSGraph* const jsgraph_; 55 JSGraph* const jsgraph_;
54 EscapeAnalysis* escape_analysis_; 56 EscapeAnalysis* escape_analysis_;
55 Zone* const zone_; 57 Zone* const zone_;
56 // This bit vector marks nodes we already processed (allocs, loads, stores) 58 // This bit vector marks nodes we already processed (allocs, loads, stores)
57 // and nodes that do not need a visit from ReduceDeoptState etc. 59 // and nodes that do not need a visit from ReduceDeoptState etc.
58 BitVector fully_reduced_; 60 BitVector fully_reduced_;
59 bool exists_virtual_allocate_; 61 bool exists_virtual_allocate_;
62 std::set<Node*> arguments_elements_;
60 bool compilation_failed_ = false; 63 bool compilation_failed_ = false;
61 64
62 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer); 65 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer);
63 }; 66 };
64 67
65 } // namespace compiler 68 } // namespace compiler
66 } // namespace internal 69 } // namespace internal
67 } // namespace v8 70 } // namespace v8
68 71
69 #endif // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_ 72 #endif // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/escape-analysis-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698