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

Unified Diff: src/full-codegen.h

Issue 13811014: Fix OSR for nested loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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/disassembler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
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 c4f3fcc722b3252ce6970c87abb02b3a8a4423f7..b9647c2ea398524fc4485e7bb1d6ea34180b08bd 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -92,7 +92,7 @@ class FullCodeGenerator: public AstVisitor {
bailout_entries_(info->HasDeoptimizationSupport()
? info->function()->ast_node_count() : 0,
info->zone()),
- stack_checks_(2, info->zone()), // There's always at least one.
+ back_edges_(2, info->zone()),
type_feedback_cells_(info->HasDeoptimizationSupport()
? info->function()->ast_node_count() : 0,
info->zone()),
@@ -135,6 +135,7 @@ class FullCodeGenerator: public AstVisitor {
#error Unsupported target architecture.
#endif
+ static const int kBackEdgeEntrySize = 2 * kIntSize + kOneByteSize;
private:
class Breakable;
@@ -459,9 +460,9 @@ class FullCodeGenerator: public AstVisitor {
Label* back_edge_target);
// Record the OSR AST id corresponding to a back edge in the code.
void RecordBackEdge(BailoutId osr_ast_id);
- // Emit a table of stack check ids and pcs into the code stream. Return
- // the offset of the start of the table.
- unsigned EmitStackCheckTable();
+ // Emit a table of back edge ids, pcs and loop depths into the code stream.
+ // Return the offset of the start of the table.
+ unsigned EmitBackEdgeTable();
void EmitProfilingCounterDecrement(int delta);
void EmitProfilingCounterReset();
@@ -624,6 +625,12 @@ class FullCodeGenerator: public AstVisitor {
unsigned pc_and_state;
};
+ struct BackEdgeEntry {
+ BailoutId id;
+ unsigned pc;
+ uint8_t loop_depth;
+ };
+
struct TypeFeedbackCellEntry {
TypeFeedbackId ast_id;
Handle<JSGlobalPropertyCell> cell;
@@ -818,9 +825,7 @@ class FullCodeGenerator: public AstVisitor {
const ExpressionContext* context_;
ZoneList<BailoutEntry> bailout_entries_;
GrowableBitVector prepared_bailout_ids_;
- // TODO(svenpanne) Rename this to something like back_edges_ and rename
- // related functions accordingly.
- ZoneList<BailoutEntry> stack_checks_;
+ ZoneList<BackEdgeEntry> back_edges_;
ZoneList<TypeFeedbackCellEntry> type_feedback_cells_;
int ic_total_count_;
Handle<FixedArray> handler_table_;
« no previous file with comments | « src/disassembler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698