Revision: 20012
Author: [email protected]
Date: Mon Mar 17 17:29:03 2014 UTC
Log: Update constant pool correctly when resuming a generator
This CL depends on the following CLs landing first:
https://codereview.chromium.org/188063002/
https://codereview.chromium.org/190793002/
[email protected]
Review URL: https://codereview.chromium.org/190823002
http://code.google.com/p/v8/source/detail?r=20012
Modified:
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/runtime.cc
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Mon Mar 17 10:21:01
2014 UTC
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Mon Mar 17 17:29:03
2014 UTC
@@ -2188,12 +2188,21 @@
__ cmp(r3, Operand(0));
__ b(ne, &slow_resume);
__ ldr(r3, FieldMemOperand(r4, JSFunction::kCodeEntryOffset));
- __ ldr(r2, FieldMemOperand(r1,
JSGeneratorObject::kContinuationOffset));
- __ SmiUntag(r2);
- __ add(r3, r3, r2);
- __ mov(r2,
Operand(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)));
- __ str(r2, FieldMemOperand(r1,
JSGeneratorObject::kContinuationOffset));
- __ Jump(r3);
+
+ { ConstantPoolUnavailableScope constant_pool_unavailable(masm_);
+ if (FLAG_enable_ool_constant_pool) {
+ // Load the new code object's constant pool pointer.
+ __ ldr(pp,
+ MemOperand(r3, Code::kConstantPoolOffset -
Code::kHeaderSize));
+ }
+
+ __ ldr(r2, FieldMemOperand(r1,
JSGeneratorObject::kContinuationOffset));
+ __ SmiUntag(r2);
+ __ add(r3, r3, r2);
+ __ mov(r2,
Operand(Smi::FromInt(JSGeneratorObject::kGeneratorExecuting)));
+ __ str(r2, FieldMemOperand(r1,
JSGeneratorObject::kContinuationOffset));
+ __ Jump(r3);
+ }
__ bind(&slow_resume);
}
=======================================
--- /branches/bleeding_edge/src/runtime.cc Mon Mar 17 15:01:45 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc Mon Mar 17 17:29:03 2014 UTC
@@ -3089,6 +3089,10 @@
int offset = generator_object->continuation();
ASSERT(offset > 0);
frame->set_pc(pc + offset);
+ if (FLAG_enable_ool_constant_pool) {
+ frame->set_constant_pool(
+ generator_object->function()->code()->constant_pool());
+ }
generator_object->set_continuation(JSGeneratorObject::kGeneratorExecuting);
FixedArray* operand_stack = generator_object->operand_stack();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.