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

Unified Diff: src/hydrogen-escape-analysis.h

Issue 17914002: First simplistic implementation of escape analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ben Titzer. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1d31f3dce7e789320c7fdd8439a9f11e1bb35236 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_
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698