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

Unified Diff: src/codegen-inl.h

Issue 113259: Inline the code dealing with entering spilled scopes and maintaining a... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
Index: src/codegen-inl.h
===================================================================
--- src/codegen-inl.h (revision 1913)
+++ src/codegen-inl.h (working copy)
@@ -30,10 +30,61 @@
#define V8_CODEGEN_INL_H_
#include "codegen.h"
+#include "virtual-frame.h"
namespace v8 { namespace internal {
+void CodeGenerator::LoadAndSpill(Expression* expression,
+ TypeofState typeof_state) {
+ ASSERT(in_spilled_code());
+#ifdef DEBUG
+ set_in_spilled_code(false);
+#endif
+
+ Load(expression, typeof_state);
+ frame_->SpillAll();
+
+#ifdef DEBUG
+ set_in_spilled_code(true);
+#endif
+}
+
+
+void CodeGenerator::VisitAndSpill(Statement* statement) {
+ ASSERT(in_spilled_code());
+#ifdef DEBUG
+ set_in_spilled_code(false);
+#endif
+
+ Visit(statement);
+ if (frame_ != NULL) {
+ frame_->SpillAll();
+ }
+
+#ifdef DEBUG
+ set_in_spilled_code(true);
+#endif
+}
+
+
+void CodeGenerator::VisitStatementsAndSpill(ZoneList<Statement*>* statements) {
+ ASSERT(in_spilled_code());
+#ifdef DEBUG
+ set_in_spilled_code(false);
+#endif
+
+ VisitStatements(statements);
+ if (frame_ != NULL) {
+ frame_->SpillAll();
+ }
+
+#ifdef DEBUG
+ set_in_spilled_code(true);
+#endif
+}
+
+
// -----------------------------------------------------------------------------
// Support for "structured" code comments.
//
« no previous file with comments | « src/codegen.h ('k') | src/ia32/codegen-ia32.h » ('j') | src/ia32/codegen-ia32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698