Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: src/hydrogen.h

Issue 7857031: Add a function to compute loop nesting level to HBasicBlock. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void DetachLoopInformation(); 95 void DetachLoopInformation();
96 bool IsLoopHeader() const { return loop_information() != NULL; } 96 bool IsLoopHeader() const { return loop_information() != NULL; }
97 bool IsStartBlock() const { return block_id() == 0; } 97 bool IsStartBlock() const { return block_id() == 0; }
98 void PostProcessLoopHeader(IterationStatement* stmt); 98 void PostProcessLoopHeader(IterationStatement* stmt);
99 99
100 bool IsFinished() const { return end_ != NULL; } 100 bool IsFinished() const { return end_ != NULL; }
101 void AddPhi(HPhi* phi); 101 void AddPhi(HPhi* phi);
102 void RemovePhi(HPhi* phi); 102 void RemovePhi(HPhi* phi);
103 void AddInstruction(HInstruction* instr); 103 void AddInstruction(HInstruction* instr);
104 bool Dominates(HBasicBlock* other) const; 104 bool Dominates(HBasicBlock* other) const;
105 int LoopNestingDepth() const;
105 106
106 void SetInitialEnvironment(HEnvironment* env); 107 void SetInitialEnvironment(HEnvironment* env);
107 void ClearEnvironment() { last_environment_ = NULL; } 108 void ClearEnvironment() { last_environment_ = NULL; }
108 bool HasEnvironment() const { return last_environment_ != NULL; } 109 bool HasEnvironment() const { return last_environment_ != NULL; }
109 void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; } 110 void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; }
110 HBasicBlock* parent_loop_header() const { return parent_loop_header_; } 111 HBasicBlock* parent_loop_header() const { return parent_loop_header_; }
111 112
112 void set_parent_loop_header(HBasicBlock* block) { 113 void set_parent_loop_header(HBasicBlock* block) {
113 ASSERT(parent_loop_header_ == NULL); 114 ASSERT(parent_loop_header_ == NULL);
114 parent_loop_header_ = block; 115 parent_loop_header_ = block;
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 const char* filename_; 1232 const char* filename_;
1232 HeapStringAllocator string_allocator_; 1233 HeapStringAllocator string_allocator_;
1233 StringStream trace_; 1234 StringStream trace_;
1234 int indent_; 1235 int indent_;
1235 }; 1236 };
1236 1237
1237 1238
1238 } } // namespace v8::internal 1239 } } // namespace v8::internal
1239 1240
1240 #endif // V8_HYDROGEN_H_ 1241 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698