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

Unified Diff: src/x64/virtual-frame-x64.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
« src/ia32/codegen-ia32.h ('K') | « src/x64/codegen-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/virtual-frame-x64.h
===================================================================
--- src/x64/virtual-frame-x64.h (revision 1913)
+++ src/x64/virtual-frame-x64.h (working copy)
@@ -50,13 +50,27 @@
// generator is being transformed.
class SpilledScope BASE_EMBEDDED {
public:
- explicit SpilledScope(CodeGenerator* cgen);
+ explicit SpilledScope(CodeGenerator* cgen) {
+#ifdef DEBUG
+ cgen_ = cgen;
+ previous_state_ = cgen->in_spilled_code();
+ cgen->set_in_spilled_code(true);
+#endif
+ ASSERT(cgen->has_valid_frame());
+ cgen->frame()->SpillAll();
+ }
- ~SpilledScope();
+ ~SpilledScope() {
+#ifdef DEBUG
+ cgen_->set_in_spilled_code(previous_state_);
+#endif
+ }
private:
+#ifdef DEBUG
CodeGenerator* cgen_;
bool previous_state_;
+#endif
};
// An illegal index into the virtual frame.
« src/ia32/codegen-ia32.h ('K') | « src/x64/codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698