OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_BYTECODE_ANALYSIS_H_ | 5 #ifndef V8_COMPILER_BYTECODE_ANALYSIS_H_ |
6 #define V8_COMPILER_BYTECODE_ANALYSIS_H_ | 6 #define V8_COMPILER_BYTECODE_ANALYSIS_H_ |
7 | 7 |
8 #include "src/base/hashmap.h" | 8 #include "src/base/hashmap.h" |
9 #include "src/bit-vector.h" | 9 #include "src/bit-vector.h" |
10 #include "src/compiler/bytecode-liveness-map.h" | 10 #include "src/compiler/bytecode-liveness-map.h" |
11 #include "src/handles.h" | 11 #include "src/handles.h" |
12 #include "src/interpreter/bytecode-register.h" | 12 #include "src/interpreter/bytecode-register.h" |
13 #include "src/zone/zone-containers.h" | 13 #include "src/zone/zone-containers.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 class BytecodeArray; | 18 class BytecodeArray; |
19 | 19 |
20 namespace compiler { | 20 namespace compiler { |
21 | 21 |
22 class V8_EXPORT_PRIVATE BytecodeLoopAssignments { | 22 class V8_EXPORT_PRIVATE BytecodeLoopAssignments { |
23 public: | 23 public: |
24 BytecodeLoopAssignments(int parameter_count, int register_count, Zone* zone); | 24 BytecodeLoopAssignments(int parameter_count, int register_count, Zone* zone); |
25 | 25 |
26 void Add(interpreter::Register r); | 26 void Add(interpreter::Register r); |
27 void AddPair(interpreter::Register r); | 27 void AddList(interpreter::Register r, uint32_t count); |
28 void AddTriple(interpreter::Register r); | |
29 void AddAll(); | 28 void AddAll(); |
30 void Union(const BytecodeLoopAssignments& other); | 29 void Union(const BytecodeLoopAssignments& other); |
31 | 30 |
32 bool ContainsParameter(int index) const; | 31 bool ContainsParameter(int index) const; |
33 bool ContainsLocal(int index) const; | 32 bool ContainsLocal(int index) const; |
34 bool ContainsAccumulator() const; | 33 bool ContainsAccumulator() const; |
35 | 34 |
36 int parameter_count() const { return parameter_count_; } | 35 int parameter_count() const { return parameter_count_; } |
37 int local_count() const { return bit_vector_->length() - parameter_count_; } | 36 int local_count() const { return bit_vector_->length() - parameter_count_; } |
38 | 37 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 BytecodeLivenessMap liveness_map_; | 122 BytecodeLivenessMap liveness_map_; |
124 | 123 |
125 DISALLOW_COPY_AND_ASSIGN(BytecodeAnalysis); | 124 DISALLOW_COPY_AND_ASSIGN(BytecodeAnalysis); |
126 }; | 125 }; |
127 | 126 |
128 } // namespace compiler | 127 } // namespace compiler |
129 } // namespace internal | 128 } // namespace internal |
130 } // namespace v8 | 129 } // namespace v8 |
131 | 130 |
132 #endif // V8_COMPILER_BYTECODE_ANALYSIS_H_ | 131 #endif // V8_COMPILER_BYTECODE_ANALYSIS_H_ |
OLD | NEW |