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

Unified Diff: src/full-codegen.h

Issue 8932004: Implement target cache for constructor calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov and ported to x64 & ARM. Created 8 years, 11 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/code-stubs.cc ('k') | src/full-codegen.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index fbb697924627935aa6536c2d27471219b8f80cc8..bf0e4d67cfde9c9b4653dbf32b8fd36757a4dce9 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -85,13 +85,15 @@ class FullCodeGenerator: public AstVisitor {
loop_depth_(0),
context_(NULL),
bailout_entries_(0),
- stack_checks_(2) { // There's always at least one.
+ stack_checks_(2), // There's always at least one.
+ cache_cells_(0) {
}
static bool MakeCode(CompilationInfo* info);
void Generate(CompilationInfo* info);
void PopulateDeoptimizationData(Handle<Code> code);
+ void PopulateCacheCells(Handle<Code> code);
Handle<FixedArray> handler_table() { return handler_table_; }
@@ -392,6 +394,10 @@ class FullCodeGenerator: public AstVisitor {
void PrepareForBailout(Expression* node, State state);
void PrepareForBailoutForId(unsigned id, State state);
+ // Cache cell support. This associates AST ids with global property cells
+ // that will be cleared during GC and collected by the type-feedback oracle.
+ void RecordCacheCell(unsigned id, Handle<JSGlobalPropertyCell> cell);
+
// Record a call's return site offset, used to rebuild the frame if the
// called function was inlined at the site.
void RecordJSReturnSite(Call* call);
@@ -571,6 +577,11 @@ class FullCodeGenerator: public AstVisitor {
unsigned pc_and_state;
};
+ struct CacheCellEntry {
+ unsigned id;
Vyacheslav Egorov (Chromium) 2012/01/25 15:51:55 id -> ast_id ?
Michael Starzinger 2012/01/27 13:03:51 Done.
+ Handle<JSGlobalPropertyCell> cell;
+ };
+
class ExpressionContext BASE_EMBEDDED {
public:
@@ -757,6 +768,7 @@ class FullCodeGenerator: public AstVisitor {
const ExpressionContext* context_;
ZoneList<BailoutEntry> bailout_entries_;
ZoneList<BailoutEntry> stack_checks_;
+ ZoneList<CacheCellEntry> cache_cells_;
Handle<FixedArray> handler_table_;
friend class NestedStatement;
« no previous file with comments | « src/code-stubs.cc ('k') | src/full-codegen.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698