Chromium Code Reviews| Index: src/hydrogen-escape-analysis.h |
| diff --git a/src/vm-state.h b/src/hydrogen-escape-analysis.h |
| similarity index 75% |
| copy from src/vm-state.h |
| copy to src/hydrogen-escape-analysis.h |
| index 765b5701595b7f9637da05b0783662d603506463..a015eb77e30e77944425747ad8b772cc42876bee 100644 |
| --- a/src/vm-state.h |
| +++ b/src/hydrogen-escape-analysis.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright 2010 the V8 project authors. All rights reserved. |
| +// Copyright 2013 the V8 project authors. All rights reserved. |
| // Redistribution and use in source and binary forms, with or without |
| // modification, are permitted provided that the following conditions are |
| // met: |
| @@ -25,37 +25,33 @@ |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| -#ifndef V8_VM_STATE_H_ |
| -#define V8_VM_STATE_H_ |
| +#ifndef V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
| +#define V8_HYDROGEN_ESCAPE_ANALYSIS_H_ |
| #include "allocation.h" |
| -#include "isolate.h" |
| +#include "hydrogen.h" |
| namespace v8 { |
| namespace internal { |
| -template <StateTag Tag> |
| -class VMState BASE_EMBEDDED { |
| - public: |
| - explicit inline VMState(Isolate* isolate); |
| - inline ~VMState(); |
| - private: |
| - Isolate* isolate_; |
| - StateTag previous_tag_; |
| -}; |
| +class HEscapeAnalysis BASE_EMBEDDED { |
| + public: |
| + explicit HEscapeAnalysis(HGraph* graph) |
| + : graph_(graph), zone_(graph->zone()), captured_(0, zone_) { } |
| + void Analyze(); |
| -class ExternalCallbackScope BASE_EMBEDDED { |
| - public: |
| - inline ExternalCallbackScope(Isolate* isolate, Address callback); |
| - inline ~ExternalCallbackScope(); |
| private: |
| - Isolate* isolate_; |
| - Address previous_callback_; |
| + void CollectCapturedValues(); |
| + void CollectIfNoEscapingUses(HInstruction* instr); |
| + |
| + HGraph* graph_; |
| + Zone* zone_; |
| + ZoneList<HValue*> captured_; |
| }; |
| -} } // namespace v8::internal |
| +} } // namespace v8::internal |
| -#endif // V8_VM_STATE_H_ |
| +#endif /* V8_HYDROGEN_ESCAPE_ANALYSIS_H_ */ |
|
Jakob Kummerow
2013/06/28 12:34:26
nit: // instead of /*...*/
Michael Starzinger
2013/06/28 12:39:37
Done.
|