OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
7 | 7 |
8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 HBasicBlock* loop_header_; | 290 HBasicBlock* loop_header_; |
291 ZoneList<HBasicBlock*> blocks_; | 291 ZoneList<HBasicBlock*> blocks_; |
292 HStackCheck* stack_check_; | 292 HStackCheck* stack_check_; |
293 }; | 293 }; |
294 | 294 |
295 | 295 |
296 class BoundsCheckTable; | 296 class BoundsCheckTable; |
297 class InductionVariableBlocksTable; | 297 class InductionVariableBlocksTable; |
298 class HGraph final : public ZoneObject { | 298 class HGraph final : public ZoneObject { |
299 public: | 299 public: |
300 explicit HGraph(CompilationInfo* info); | 300 explicit HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor); |
301 | 301 |
302 Isolate* isolate() const { return isolate_; } | 302 Isolate* isolate() const { return isolate_; } |
303 Zone* zone() const { return zone_; } | 303 Zone* zone() const { return zone_; } |
304 CompilationInfo* info() const { return info_; } | 304 CompilationInfo* info() const { return info_; } |
| 305 CallInterfaceDescriptor descriptor() const { return descriptor_; } |
305 | 306 |
306 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } | 307 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } |
307 const ZoneList<HPhi*>* phi_list() const { return phi_list_; } | 308 const ZoneList<HPhi*>* phi_list() const { return phi_list_; } |
308 HBasicBlock* entry_block() const { return entry_block_; } | 309 HBasicBlock* entry_block() const { return entry_block_; } |
309 HEnvironment* start_environment() const { return start_environment_; } | 310 HEnvironment* start_environment() const { return start_environment_; } |
310 | 311 |
311 void FinalizeUniqueness(); | 312 void FinalizeUniqueness(); |
312 void OrderBlocks(); | 313 void OrderBlocks(); |
313 void AssignDominators(); | 314 void AssignDominators(); |
314 void RestoreActualValues(); | 315 void RestoreActualValues(); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 SetOncePointer<HConstant> constant_true_; | 480 SetOncePointer<HConstant> constant_true_; |
480 SetOncePointer<HConstant> constant_false_; | 481 SetOncePointer<HConstant> constant_false_; |
481 SetOncePointer<HConstant> constant_the_hole_; | 482 SetOncePointer<HConstant> constant_the_hole_; |
482 SetOncePointer<HConstant> constant_null_; | 483 SetOncePointer<HConstant> constant_null_; |
483 SetOncePointer<HConstant> constant_invalid_context_; | 484 SetOncePointer<HConstant> constant_invalid_context_; |
484 SetOncePointer<HArgumentsObject> arguments_object_; | 485 SetOncePointer<HArgumentsObject> arguments_object_; |
485 | 486 |
486 HOsrBuilder* osr_; | 487 HOsrBuilder* osr_; |
487 | 488 |
488 CompilationInfo* info_; | 489 CompilationInfo* info_; |
| 490 CallInterfaceDescriptor descriptor_; |
489 Zone* zone_; | 491 Zone* zone_; |
490 | 492 |
491 bool is_recursive_; | 493 bool is_recursive_; |
492 bool use_optimistic_licm_; | 494 bool use_optimistic_licm_; |
493 bool depends_on_empty_array_proto_elements_; | 495 bool depends_on_empty_array_proto_elements_; |
494 int type_change_checksum_; | 496 int type_change_checksum_; |
495 int maximum_environment_size_; | 497 int maximum_environment_size_; |
496 int no_side_effects_scope_count_; | 498 int no_side_effects_scope_count_; |
497 bool disallow_adding_new_values_; | 499 bool disallow_adding_new_values_; |
498 | 500 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 | 1001 |
1000 private: | 1002 private: |
1001 HValue* current_site_; | 1003 HValue* current_site_; |
1002 Handle<AllocationSite> feedback_site_; | 1004 Handle<AllocationSite> feedback_site_; |
1003 PretenureFlag pretenure_flag_; | 1005 PretenureFlag pretenure_flag_; |
1004 }; | 1006 }; |
1005 | 1007 |
1006 | 1008 |
1007 class HGraphBuilder { | 1009 class HGraphBuilder { |
1008 public: | 1010 public: |
1009 explicit HGraphBuilder(CompilationInfo* info) | 1011 explicit HGraphBuilder(CompilationInfo* info, |
| 1012 CallInterfaceDescriptor descriptor) |
1010 : info_(info), | 1013 : info_(info), |
| 1014 descriptor_(descriptor), |
1011 graph_(NULL), | 1015 graph_(NULL), |
1012 current_block_(NULL), | 1016 current_block_(NULL), |
1013 scope_(info->scope()), | 1017 scope_(info->scope()), |
1014 position_(SourcePosition::Unknown()), | 1018 position_(SourcePosition::Unknown()), |
1015 start_position_(0) {} | 1019 start_position_(0) {} |
1016 virtual ~HGraphBuilder() {} | 1020 virtual ~HGraphBuilder() {} |
1017 | 1021 |
1018 Scope* scope() const { return scope_; } | 1022 Scope* scope() const { return scope_; } |
1019 void set_scope(Scope* scope) { scope_ = scope; } | 1023 void set_scope(Scope* scope) { scope_ = scope; } |
1020 | 1024 |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1905 | 1909 |
1906 private: | 1910 private: |
1907 HGraphBuilder(); | 1911 HGraphBuilder(); |
1908 | 1912 |
1909 template <class I> | 1913 template <class I> |
1910 I* AddInstructionTyped(I* instr) { | 1914 I* AddInstructionTyped(I* instr) { |
1911 return I::cast(AddInstruction(instr)); | 1915 return I::cast(AddInstruction(instr)); |
1912 } | 1916 } |
1913 | 1917 |
1914 CompilationInfo* info_; | 1918 CompilationInfo* info_; |
| 1919 CallInterfaceDescriptor descriptor_; |
1915 HGraph* graph_; | 1920 HGraph* graph_; |
1916 HBasicBlock* current_block_; | 1921 HBasicBlock* current_block_; |
1917 Scope* scope_; | 1922 Scope* scope_; |
1918 SourcePosition position_; | 1923 SourcePosition position_; |
1919 int start_position_; | 1924 int start_position_; |
1920 }; | 1925 }; |
1921 | 1926 |
1922 | 1927 |
1923 template <> | 1928 template <> |
1924 inline HDeoptimize* HGraphBuilder::Add<HDeoptimize>( | 1929 inline HDeoptimize* HGraphBuilder::Add<HDeoptimize>( |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3057 | 3062 |
3058 private: | 3063 private: |
3059 HGraphBuilder* builder_; | 3064 HGraphBuilder* builder_; |
3060 }; | 3065 }; |
3061 | 3066 |
3062 | 3067 |
3063 } // namespace internal | 3068 } // namespace internal |
3064 } // namespace v8 | 3069 } // namespace v8 |
3065 | 3070 |
3066 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3071 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
OLD | NEW |