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

Unified Diff: src/codegen.h

Issue 113895: Simplify deferred code by removing some unneeded or redundant stuff. (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
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.h
===================================================================
--- src/codegen.h (revision 2063)
+++ src/codegen.h (working copy)
@@ -52,7 +52,6 @@
// CodeGenerator
// ~CodeGenerator
// ProcessDeferred
-// ClearDeferred
// GenCode
// BuildBoilerplate
// ComputeCallInitialize
@@ -116,34 +115,18 @@
};
-// Use lazy compilation; defaults to true.
-// NOTE: Do not remove non-lazy compilation until we can properly
-// install extensions with lazy compilation enabled. At the
-// moment, this doesn't work for the extensions in Google3,
-// and we can only run the tests with --nolazy.
-
-
// Deferred code objects are small pieces of code that are compiled
// out of line. They are used to defer the compilation of uncommon
// paths thereby avoiding expensive jumps around uncommon code parts.
class DeferredCode: public ZoneObject {
public:
- explicit DeferredCode(CodeGenerator* generator);
+ DeferredCode();
virtual ~DeferredCode() { }
virtual void Generate() = 0;
- // Unuse the entry and exit targets, deallocating all virtual frames
- // held by them. It will be impossible to emit a (correct) jump
- // into or out of the deferred code after clearing.
- void Clear() {
- enter_.Unuse();
- exit_.Unuse();
- }
+ CodeGenerator* cgen() const { return CodeGeneratorScope::Current(); }
- MacroAssembler* masm() const { return masm_; }
- CodeGenerator* generator() const { return generator_; }
-
// Set the virtual frame for entry to the deferred code as a
// snapshot of the code generator's current frame (plus additional
// results). This is optional, but should be done before branching
@@ -169,13 +152,11 @@
void set_comment(const char* comment) { comment_ = comment; }
const char* comment() const { return comment_; }
#else
- inline void set_comment(const char* comment) { }
+ void set_comment(const char* comment) { }
const char* comment() const { return ""; }
#endif
protected:
- CodeGenerator* const generator_;
- MacroAssembler* const masm_;
JumpTarget enter_;
JumpTarget exit_;
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698