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

Unified Diff: src/full-codegen.h

Issue 1157213004: Drop computed handler count and index from AST. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 6 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/ast.h ('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 ef4bf1f15f6cec7e6aaeff9552d3a2edaba7d673..ecab4f9bc0060c3553064bed70f3f9eb72aa8e04 100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -77,6 +77,7 @@ class FullCodeGenerator: public AstVisitor {
: 0,
info->zone()),
back_edges_(2, info->zone()),
+ handler_table_(info->zone()),
ic_total_count_(0) {
DCHECK(!info->IsStub());
Initialize();
@@ -750,13 +751,14 @@ class FullCodeGenerator: public AstVisitor {
void Generate();
void PopulateDeoptimizationData(Handle<Code> code);
void PopulateTypeFeedbackInfo(Handle<Code> code);
+ void PopulateHandlerTable(Handle<Code> code);
bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const;
bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const;
void EmitLoadStoreICSlot(FeedbackVectorICSlot slot);
- Handle<HandlerTable> handler_table() { return handler_table_; }
+ int NewHandlerTableEntry();
struct BailoutEntry {
BailoutId id;
@@ -769,6 +771,14 @@ class FullCodeGenerator: public AstVisitor {
uint32_t loop_depth;
};
+ struct HandlerTableEntry {
+ unsigned range_start;
+ unsigned range_end;
+ unsigned handler_offset;
+ int stack_depth;
+ int try_catch_depth;
+ };
+
class ExpressionContext BASE_EMBEDDED {
public:
explicit ExpressionContext(FullCodeGenerator* codegen)
@@ -974,8 +984,8 @@ class FullCodeGenerator: public AstVisitor {
const ExpressionContext* context_;
ZoneList<BailoutEntry> bailout_entries_;
ZoneList<BackEdgeEntry> back_edges_;
+ ZoneVector<HandlerTableEntry> handler_table_;
int ic_total_count_;
- Handle<HandlerTable> handler_table_;
Handle<Cell> profiling_counter_;
bool generate_debug_code_;
« no previous file with comments | « src/ast.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698