| OLD | NEW | 
|---|
| 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" | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 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   // Verifies that all virtual allocation nodes have been dealt with. Run it | 29   // 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. | 30   // after this reducer has been applied. Has no effect in release mode. | 
| 31   void VerifyReplacement() const; | 31   void VerifyReplacement() const; | 
| 32 | 32 | 
|  | 33   bool compilation_failed() const { return compilation_failed_; } | 
|  | 34 | 
| 33  private: | 35  private: | 
| 34   Reduction ReduceLoad(Node* node); | 36   Reduction ReduceLoad(Node* node); | 
| 35   Reduction ReduceStore(Node* node); | 37   Reduction ReduceStore(Node* node); | 
| 36   Reduction ReduceAllocate(Node* node); | 38   Reduction ReduceAllocate(Node* node); | 
| 37   Reduction ReduceFinishRegion(Node* node); | 39   Reduction ReduceFinishRegion(Node* node); | 
| 38   Reduction ReduceReferenceEqual(Node* node); | 40   Reduction ReduceReferenceEqual(Node* node); | 
| 39   Reduction ReduceObjectIsSmi(Node* node); | 41   Reduction ReduceObjectIsSmi(Node* node); | 
| 40   Reduction ReduceFrameStateUses(Node* node); | 42   Reduction ReduceFrameStateUses(Node* node); | 
| 41   Node* ReduceDeoptState(Node* node, Node* effect, bool multiple_users); | 43   Node* ReduceDeoptState(Node* node, Node* effect, bool multiple_users); | 
| 42   Node* ReduceStateValueInput(Node* node, int node_index, Node* effect, | 44   Node* ReduceStateValueInput(Node* node, int node_index, Node* effect, | 
| 43                               bool node_multiused, bool already_cloned, | 45                               bool node_multiused, bool already_cloned, | 
| 44                               bool multiple_users); | 46                               bool multiple_users); | 
| 45 | 47 | 
| 46   JSGraph* jsgraph() const { return jsgraph_; } | 48   JSGraph* jsgraph() const { return jsgraph_; } | 
| 47   EscapeAnalysis* escape_analysis() const { return escape_analysis_; } | 49   EscapeAnalysis* escape_analysis() const { return escape_analysis_; } | 
| 48   Zone* zone() const { return zone_; } | 50   Zone* zone() const { return zone_; } | 
| 49   Isolate* isolate() const; | 51   Isolate* isolate() const; | 
| 50 | 52 | 
| 51   JSGraph* const jsgraph_; | 53   JSGraph* const jsgraph_; | 
| 52   EscapeAnalysis* escape_analysis_; | 54   EscapeAnalysis* escape_analysis_; | 
| 53   Zone* const zone_; | 55   Zone* const zone_; | 
| 54   // This bit vector marks nodes we already processed (allocs, loads, stores) | 56   // This bit vector marks nodes we already processed (allocs, loads, stores) | 
| 55   // and nodes that do not need a visit from ReduceDeoptState etc. | 57   // and nodes that do not need a visit from ReduceDeoptState etc. | 
| 56   BitVector fully_reduced_; | 58   BitVector fully_reduced_; | 
| 57   bool exists_virtual_allocate_; | 59   bool exists_virtual_allocate_; | 
|  | 60   bool compilation_failed_ = false; | 
| 58 | 61 | 
| 59   DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer); | 62   DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer); | 
| 60 }; | 63 }; | 
| 61 | 64 | 
| 62 }  // namespace compiler | 65 }  // namespace compiler | 
| 63 }  // namespace internal | 66 }  // namespace internal | 
| 64 }  // namespace v8 | 67 }  // namespace v8 | 
| 65 | 68 | 
| 66 #endif  // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_ | 69 #endif  // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_ | 
| OLD | NEW | 
|---|