| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 253 |
| 254 private: | 254 private: |
| 255 void AddBlock(HBasicBlock* block); | 255 void AddBlock(HBasicBlock* block); |
| 256 | 256 |
| 257 ZoneList<HBasicBlock*> back_edges_; | 257 ZoneList<HBasicBlock*> back_edges_; |
| 258 HBasicBlock* loop_header_; | 258 HBasicBlock* loop_header_; |
| 259 ZoneList<HBasicBlock*> blocks_; | 259 ZoneList<HBasicBlock*> blocks_; |
| 260 HStackCheck* stack_check_; | 260 HStackCheck* stack_check_; |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 | |
| 264 class BoundsCheckTable; | 263 class BoundsCheckTable; |
| 265 class HGraph: public ZoneObject { | 264 class HGraph: public ZoneObject { |
| 266 public: | 265 public: |
| 267 explicit HGraph(CompilationInfo* info); | 266 explicit HGraph(CompilationInfo* info); |
| 268 | 267 |
| 269 Isolate* isolate() const { return isolate_; } | 268 Isolate* isolate() const { return isolate_; } |
| 270 Zone* zone() const { return zone_; } | 269 Zone* zone() const { return zone_; } |
| 271 CompilationInfo* info() const { return info_; } | 270 CompilationInfo* info() const { return info_; } |
| 272 | 271 |
| 273 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } | 272 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 void MarkDependsOnEmptyArrayProtoElements() { | 404 void MarkDependsOnEmptyArrayProtoElements() { |
| 406 // Add map dependency if not already added. | 405 // Add map dependency if not already added. |
| 407 if (depends_on_empty_array_proto_elements_) return; | 406 if (depends_on_empty_array_proto_elements_) return; |
| 408 isolate()->initial_object_prototype()->map()->AddDependentCompilationInfo( | 407 isolate()->initial_object_prototype()->map()->AddDependentCompilationInfo( |
| 409 DependentCode::kElementsCantBeAddedGroup, info()); | 408 DependentCode::kElementsCantBeAddedGroup, info()); |
| 410 isolate()->initial_array_prototype()->map()->AddDependentCompilationInfo( | 409 isolate()->initial_array_prototype()->map()->AddDependentCompilationInfo( |
| 411 DependentCode::kElementsCantBeAddedGroup, info()); | 410 DependentCode::kElementsCantBeAddedGroup, info()); |
| 412 depends_on_empty_array_proto_elements_ = true; | 411 depends_on_empty_array_proto_elements_ = true; |
| 413 } | 412 } |
| 414 | 413 |
| 415 bool depends_on_empty_array_proto_elements() { | |
| 416 return depends_on_empty_array_proto_elements_; | |
| 417 } | |
| 418 | |
| 419 void RecordUint32Instruction(HInstruction* instr) { | 414 void RecordUint32Instruction(HInstruction* instr) { |
| 420 if (uint32_instructions_ == NULL) { | 415 if (uint32_instructions_ == NULL) { |
| 421 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); | 416 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); |
| 422 } | 417 } |
| 423 uint32_instructions_->Add(instr, zone()); | 418 uint32_instructions_->Add(instr, zone()); |
| 424 } | 419 } |
| 425 | 420 |
| 426 private: | 421 private: |
| 427 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, | 422 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, |
| 428 int32_t integer_value); | 423 int32_t integer_value); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 void ClearInlinedTestContext() { | 869 void ClearInlinedTestContext() { |
| 875 delete test_context_; | 870 delete test_context_; |
| 876 test_context_ = NULL; | 871 test_context_ = NULL; |
| 877 } | 872 } |
| 878 | 873 |
| 879 FunctionState* outer() { return outer_; } | 874 FunctionState* outer() { return outer_; } |
| 880 | 875 |
| 881 HEnterInlined* entry() { return entry_; } | 876 HEnterInlined* entry() { return entry_; } |
| 882 void set_entry(HEnterInlined* entry) { entry_ = entry; } | 877 void set_entry(HEnterInlined* entry) { entry_ = entry; } |
| 883 | 878 |
| 884 HArgumentsObject* arguments_object() { return arguments_object_; } | |
| 885 void set_arguments_object(HArgumentsObject* arguments_object) { | |
| 886 arguments_object_ = arguments_object; | |
| 887 } | |
| 888 | |
| 889 HArgumentsElements* arguments_elements() { return arguments_elements_; } | 879 HArgumentsElements* arguments_elements() { return arguments_elements_; } |
| 890 void set_arguments_elements(HArgumentsElements* arguments_elements) { | 880 void set_arguments_elements(HArgumentsElements* arguments_elements) { |
| 891 arguments_elements_ = arguments_elements; | 881 arguments_elements_ = arguments_elements; |
| 892 } | 882 } |
| 893 | 883 |
| 894 bool arguments_pushed() { return arguments_elements() != NULL; } | 884 bool arguments_pushed() { return arguments_elements() != NULL; } |
| 895 | 885 |
| 896 private: | 886 private: |
| 897 HOptimizedGraphBuilder* owner_; | 887 HOptimizedGraphBuilder* owner_; |
| 898 | 888 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 912 HBasicBlock* function_return_; | 902 HBasicBlock* function_return_; |
| 913 | 903 |
| 914 // When inlining a call in a test context, a context containing a pair of | 904 // When inlining a call in a test context, a context containing a pair of |
| 915 // return blocks. NULL in all other cases. | 905 // return blocks. NULL in all other cases. |
| 916 TestContext* test_context_; | 906 TestContext* test_context_; |
| 917 | 907 |
| 918 // When inlining HEnterInlined instruction corresponding to the function | 908 // When inlining HEnterInlined instruction corresponding to the function |
| 919 // entry. | 909 // entry. |
| 920 HEnterInlined* entry_; | 910 HEnterInlined* entry_; |
| 921 | 911 |
| 922 HArgumentsObject* arguments_object_; | |
| 923 HArgumentsElements* arguments_elements_; | 912 HArgumentsElements* arguments_elements_; |
| 924 | 913 |
| 925 FunctionState* outer_; | 914 FunctionState* outer_; |
| 926 }; | 915 }; |
| 927 | 916 |
| 928 | 917 |
| 929 class HIfContinuation { | 918 class HIfContinuation { |
| 930 public: | 919 public: |
| 931 HIfContinuation() { continuation_captured_ = false; } | 920 HIfContinuation() { continuation_captured_ = false; } |
| 932 ~HIfContinuation() { ASSERT(!continuation_captured_); } | 921 ~HIfContinuation() { ASSERT(!continuation_captured_); } |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 EmbeddedVector<char, 64> filename_; | 2023 EmbeddedVector<char, 64> filename_; |
| 2035 HeapStringAllocator string_allocator_; | 2024 HeapStringAllocator string_allocator_; |
| 2036 StringStream trace_; | 2025 StringStream trace_; |
| 2037 int indent_; | 2026 int indent_; |
| 2038 }; | 2027 }; |
| 2039 | 2028 |
| 2040 | 2029 |
| 2041 } } // namespace v8::internal | 2030 } } // namespace v8::internal |
| 2042 | 2031 |
| 2043 #endif // V8_HYDROGEN_H_ | 2032 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |