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

Unified Diff: src/code-stubs.h

Issue 472002: Fix a crash caused by garbage collection during generation of a... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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 | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
===================================================================
--- src/code-stubs.h (revision 3434)
+++ src/code-stubs.h (working copy)
@@ -83,6 +83,11 @@
// Retrieve the code for the stub. Generate the code if needed.
Handle<Code> GetCode();
+ // Retrieve the code for the stub if already generated. Do not
+ // generate the code if not already generated and instead return a
+ // retry after GC Failure object.
+ Object* TryGetCode();
+
static Major MajorKeyFromKey(uint32_t key) {
return static_cast<Major>(MajorKeyBits::decode(key));
};
@@ -104,9 +109,20 @@
static const int kMinorBits = kBitsPerInt - kSmiTagSize - kMajorBits;
private:
+ // Lookup the code in the (possibly custom) cache.
+ bool FindCodeInCache(Code** code_out);
+
+ // Nonvirtual wrapper around the stub-specific Generate function. Call
+ // this function to set up the macro assembler and generate the code.
+ void GenerateCode(MacroAssembler* masm);
+
// Generates the assembler code for the stub.
virtual void Generate(MacroAssembler* masm) = 0;
+ // Perform bookkeeping required after code generation when stub code is
+ // initially generated.
+ void RecordCodeGeneration(Code* code, MacroAssembler* masm);
+
// Returns information for computing the number key.
virtual Major MajorKey() = 0;
virtual int MinorKey() = 0;
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698