| 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_BYTECODE_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/compiler/bytecode-analysis.h" | 8 #include "src/compiler/bytecode-analysis.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/liveness-analyzer.h" | 10 #include "src/compiler/liveness-analyzer.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 254 } |
| 255 | 255 |
| 256 const BytecodeAnalysis* bytecode_analysis() const { | 256 const BytecodeAnalysis* bytecode_analysis() const { |
| 257 return bytecode_analysis_; | 257 return bytecode_analysis_; |
| 258 } | 258 } |
| 259 | 259 |
| 260 void set_bytecode_analysis(const BytecodeAnalysis* bytecode_analysis) { | 260 void set_bytecode_analysis(const BytecodeAnalysis* bytecode_analysis) { |
| 261 bytecode_analysis_ = bytecode_analysis; | 261 bytecode_analysis_ = bytecode_analysis; |
| 262 } | 262 } |
| 263 | 263 |
| 264 bool IsLivenessAnalysisEnabled() const { | |
| 265 return this->is_liveness_analysis_enabled_; | |
| 266 } | |
| 267 | |
| 268 #define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name(); | 264 #define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name(); |
| 269 BYTECODE_LIST(DECLARE_VISIT_BYTECODE) | 265 BYTECODE_LIST(DECLARE_VISIT_BYTECODE) |
| 270 #undef DECLARE_VISIT_BYTECODE | 266 #undef DECLARE_VISIT_BYTECODE |
| 271 | 267 |
| 272 Zone* local_zone_; | 268 Zone* local_zone_; |
| 273 JSGraph* jsgraph_; | 269 JSGraph* jsgraph_; |
| 274 float const invocation_frequency_; | 270 float const invocation_frequency_; |
| 275 Handle<BytecodeArray> bytecode_array_; | 271 Handle<BytecodeArray> bytecode_array_; |
| 276 Handle<HandlerTable> exception_handler_table_; | 272 Handle<HandlerTable> exception_handler_table_; |
| 277 Handle<TypeFeedbackVector> feedback_vector_; | 273 Handle<TypeFeedbackVector> feedback_vector_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 296 Node** input_buffer_; | 292 Node** input_buffer_; |
| 297 | 293 |
| 298 // Nodes representing values in the activation record. | 294 // Nodes representing values in the activation record. |
| 299 SetOncePointer<Node> function_context_; | 295 SetOncePointer<Node> function_context_; |
| 300 SetOncePointer<Node> function_closure_; | 296 SetOncePointer<Node> function_closure_; |
| 301 SetOncePointer<Node> new_target_; | 297 SetOncePointer<Node> new_target_; |
| 302 | 298 |
| 303 // Control nodes that exit the function body. | 299 // Control nodes that exit the function body. |
| 304 ZoneVector<Node*> exit_controls_; | 300 ZoneVector<Node*> exit_controls_; |
| 305 | 301 |
| 306 bool const is_liveness_analysis_enabled_; | |
| 307 | |
| 308 StateValuesCache state_values_cache_; | 302 StateValuesCache state_values_cache_; |
| 309 | 303 |
| 310 // The source position table, to be populated. | 304 // The source position table, to be populated. |
| 311 SourcePositionTable* source_positions_; | 305 SourcePositionTable* source_positions_; |
| 312 | 306 |
| 313 SourcePosition const start_position_; | 307 SourcePosition const start_position_; |
| 314 | 308 |
| 315 static int const kBinaryOperationHintIndex = 1; | 309 static int const kBinaryOperationHintIndex = 1; |
| 316 static int const kCountOperationHintIndex = 0; | 310 static int const kCountOperationHintIndex = 0; |
| 317 static int const kBinaryOperationSmiHintIndex = 2; | 311 static int const kBinaryOperationSmiHintIndex = 2; |
| 318 | 312 |
| 319 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); | 313 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); |
| 320 }; | 314 }; |
| 321 | 315 |
| 322 } // namespace compiler | 316 } // namespace compiler |
| 323 } // namespace internal | 317 } // namespace internal |
| 324 } // namespace v8 | 318 } // namespace v8 |
| 325 | 319 |
| 326 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 320 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
| OLD | NEW |