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

Unified Diff: src/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-493290.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index 4d66a874fa9b694b279690ca93f5ad472d216917..3af7ce6a7d0c7753e55bd68f0d83704ae3e5d060 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -93,10 +93,6 @@ class JumpPatchSite BASE_EMBEDDED {
// frames-x87.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());
@@ -2101,7 +2097,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// re-boxing.
__ bind(&l_try);
__ pop(eax); // result
- EnterTryBlock(expr->index(), &l_catch);
+ int handler_index = NewHandlerTableEntry();
+ EnterTryBlock(handler_index, &l_catch);
const int try_block_size = TryCatch::kElementCount * kPointerSize;
__ push(eax); // result
__ jmp(&l_suspend);
@@ -2111,7 +2108,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
const int generator_object_depth = kPointerSize + try_block_size;
__ mov(eax, Operand(esp, generator_object_depth));
__ push(eax); // g
- __ push(Immediate(Smi::FromInt(expr->index()))); // handler-index
+ __ push(Immediate(Smi::FromInt(handler_index))); // handler-index
DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos()));
__ mov(FieldOperand(eax, JSGeneratorObject::kContinuationOffset),
Immediate(Smi::FromInt(l_continuation.pos())));
@@ -2125,7 +2122,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ pop(eax); // result
EmitReturnSequence();
__ bind(&l_resume); // received in eax
- ExitTryBlock(expr->index());
+ ExitTryBlock(handler_index);
// receiver = iter; f = iter.next; arg = received;
__ bind(&l_next);
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-493290.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698