Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 95f3c8c0615af6a1aad13c21ecb5afcaba770f2f..9a01faddc1f42738518b1dcac7b70d6d8f04562b 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -105,10 +105,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()); |
@@ -2207,7 +2203,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
// re-boxing. |
__ bind(&l_try); |
__ pop(r0); // result |
- EnterTryBlock(expr->index(), &l_catch); |
+ int handler_index = NewHandlerTableEntry(); |
+ EnterTryBlock(handler_index, &l_catch); |
const int try_block_size = TryCatch::kElementCount * kPointerSize; |
__ push(r0); // result |
__ jmp(&l_suspend); |
@@ -2217,7 +2214,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
const int generator_object_depth = kPointerSize + try_block_size; |
__ ldr(r0, MemOperand(sp, generator_object_depth)); |
__ push(r0); // 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(r1, Operand(Smi::FromInt(l_continuation.pos()))); |
__ str(r1, FieldMemOperand(r0, JSGeneratorObject::kContinuationOffset)); |
@@ -2230,7 +2227,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ pop(r0); // result |
EmitReturnSequence(); |
__ bind(&l_resume); // received in r0 |
- ExitTryBlock(expr->index()); |
+ ExitTryBlock(handler_index); |
// receiver = iter; f = 'next'; arg = received; |
__ bind(&l_next); |