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

Unified Diff: src/arm64/full-codegen-arm64.cc

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/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/full-codegen-arm64.cc
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
index cdc615ea5a2c1e81affebbea57cb01f104d41a3d..90b57784d9eb75708bd45229ee63f3874c0ef067 100644
--- a/src/arm64/full-codegen-arm64.cc
+++ b/src/arm64/full-codegen-arm64.cc
@@ -103,10 +103,6 @@ class JumpPatchSite BASE_EMBEDDED {
// frames-arm.h for its layout.
void FullCodeGenerator::Generate() {
CompilationInfo* info = info_;
- handler_table_ =
- Handle<HandlerTable>::cast(isolate()->factory()->NewFixedArray(
- HandlerTable::LengthForRange(function()->handler_count()), TENURED));
-
profiling_counter_ = isolate()->factory()->NewCell(
Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
SetFunctionPosition(function());
@@ -5141,7 +5137,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// re-boxing.
__ Bind(&l_try);
__ Pop(x0); // result
- EnterTryBlock(expr->index(), &l_catch);
+ int handler_index = NewHandlerTableEntry();
+ EnterTryBlock(handler_index, &l_catch);
const int try_block_size = TryCatch::kElementCount * kPointerSize;
__ Push(x0); // result
__ B(&l_suspend);
@@ -5156,7 +5153,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
const int generator_object_depth = kPointerSize + try_block_size;
__ Peek(x0, generator_object_depth);
__ Push(x0); // g
- __ Push(Smi::FromInt(expr->index())); // handler-index
+ __ Push(Smi::FromInt(handler_index)); // handler-index
DCHECK((l_continuation.pos() > 0) && Smi::IsValid(l_continuation.pos()));
__ Mov(x1, Smi::FromInt(l_continuation.pos()));
__ Str(x1, FieldMemOperand(x0, JSGeneratorObject::kContinuationOffset));
@@ -5169,7 +5166,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ Pop(x0); // result
EmitReturnSequence();
__ Bind(&l_resume); // received in x0
- ExitTryBlock(expr->index());
+ ExitTryBlock(handler_index);
// receiver = iter; f = 'next'; arg = received;
__ Bind(&l_next);
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698