Capture receiver in generator object
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Apr 2013 10:59:09 +0000 (10:59 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Apr 2013 10:59:09 +0000 (10:59 +0000)
commit71dc9e165fb7007d0cb3ebe2ba382eb9799fa900
treed71608648bf01ad7b0769aafe94d4917075ac2ab
parent1ad3d57d9d9fa905316d5c072d22463abd0fee94
Capture receiver in generator object

Previously there has been no reason to context-allocate the receiver, so
access to the receiver always goes through the stack.  This was failing
with generators, which assumed that forcing context allocation would
relieve the need of storing anything but the context and the function on
the stack.

This CL adds a slot in generator objects to capture the receiver, and
restores it when resuming a generator.

BUG=v8:2355
TEST=mjsunit/harmony/generators-iteration

Review URL: https://codereview.chromium.org/14158006

Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/full-codegen-arm.cc
src/ia32/full-codegen-ia32.cc
src/objects-debug.cc
src/objects-inl.h
src/objects.h
src/runtime.cc
src/x64/full-codegen-x64.cc
test/mjsunit/harmony/generators-iteration.js