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

Unified Diff: src/full-codegen/full-codegen.h

Issue 2521233002: [fullcodegen] Remove exception handling support. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.h
diff --git a/src/full-codegen/full-codegen.h b/src/full-codegen/full-codegen.h
index 558dae18ddd45d68e7a77cee76eda6f6fbc718cf..74753cce439d51d547df3534008a39413d09a144 100644
--- a/src/full-codegen/full-codegen.h
+++ b/src/full-codegen/full-codegen.h
@@ -82,7 +82,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
class Breakable;
class Iteration;
- class TryFinally;
class TestContext;
@@ -103,11 +102,9 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
virtual Breakable* AsBreakable() { return nullptr; }
virtual Iteration* AsIteration() { return nullptr; }
- virtual TryFinally* AsTryFinally() { return nullptr; }
virtual bool IsContinueTarget(Statement* target) { return false; }
virtual bool IsBreakTarget(Statement* target) { return false; }
- virtual bool IsTryFinally() { return false; }
// Notify the statement that we are exiting it via break, continue, or
// return and give it a chance to generate cleanup code. Return the
@@ -185,60 +182,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
}
};
- class DeferredCommands {
- public:
- enum Command { kReturn, kThrow, kBreak, kContinue };
- typedef int TokenId;
- struct DeferredCommand {
- Command command;
- TokenId token;
- Statement* target;
- };
-
- DeferredCommands(FullCodeGenerator* codegen, Label* finally_entry)
- : codegen_(codegen),
- commands_(codegen->zone()),
- return_token_(TokenDispenserForFinally::kInvalidToken),
- throw_token_(TokenDispenserForFinally::kInvalidToken),
- finally_entry_(finally_entry) {}
-
- void EmitCommands();
-
- void RecordBreak(Statement* target);
- void RecordContinue(Statement* target);
- void RecordReturn();
- void RecordThrow();
- void EmitFallThrough();
-
- private:
- MacroAssembler* masm() { return codegen_->masm(); }
- void EmitJumpToFinally(TokenId token);
-
- FullCodeGenerator* codegen_;
- ZoneVector<DeferredCommand> commands_;
- TokenDispenserForFinally dispenser_;
- TokenId return_token_;
- TokenId throw_token_;
- Label* finally_entry_;
- };
-
- // The try block of a try/finally statement.
- class TryFinally : public NestedStatement {
- public:
- TryFinally(FullCodeGenerator* codegen, DeferredCommands* commands)
- : NestedStatement(codegen), deferred_commands_(commands) {}
-
- NestedStatement* Exit(int* context_length) override;
-
- bool IsTryFinally() override { return true; }
- TryFinally* AsTryFinally() override { return this; }
-
- DeferredCommands* deferred_commands() { return deferred_commands_; }
-
- private:
- DeferredCommands* deferred_commands_;
- };
-
// The body of a with or catch.
class WithOrCatch : public NestedStatement {
public:
@@ -648,14 +591,7 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
void RecordStatementPosition(int pos);
void RecordPosition(int pos);
- // Non-local control flow support.
- void EnterTryBlock(int handler_index, Label* handler,
- HandlerTable::CatchPrediction catch_prediction);
- void ExitTryBlock(int handler_index);
- void EnterFinallyBlock();
- void ExitFinallyBlock();
- void ClearPendingMessage();
-
+ // Local control flow support.
void EmitContinue(Statement* target);
void EmitBreak(Statement* target);
@@ -714,13 +650,10 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
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;
- int NewHandlerTableEntry();
-
struct BailoutEntry {
BailoutId id;
unsigned pc_and_state;
@@ -732,14 +665,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
uint32_t loop_depth;
};
- struct HandlerTableEntry {
- unsigned range_start;
- unsigned range_end;
- unsigned handler_offset;
- int stack_depth;
- HandlerTable::CatchPrediction catch_prediction;
- };
-
class ExpressionContext BASE_EMBEDDED {
public:
explicit ExpressionContext(FullCodeGenerator* codegen)
@@ -937,7 +862,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
const ExpressionContext* context_;
ZoneList<BailoutEntry> bailout_entries_;
ZoneList<BackEdgeEntry> back_edges_;
- ZoneVector<HandlerTableEntry> handler_table_;
SourcePositionTableBuilder source_position_table_builder_;
int ic_total_count_;
Handle<Cell> profiling_counter_;
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698