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

Unified Diff: src/heap.cc

Issue 13542002: Calling a generator function returns a generator object (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Fix generator construction via `new' Created 7 years, 8 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/full-codegen.cc ('k') | src/objects.h » ('j') | src/objects-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 76f0a3c9a86e052add7782f4600217d317fc5a44..a01a8b2c3aaffc4ce8c04c9231987b42e5517e91 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4089,9 +4089,8 @@ MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) {
int instance_size;
int in_object_properties;
if (fun->shared()->is_generator()) {
- // TODO(wingo): Replace with JS_GENERATOR_OBJECT_TYPE.
- instance_type = JS_OBJECT_TYPE;
- instance_size = JSObject::kHeaderSize;
+ instance_type = JS_GENERATOR_OBJECT_TYPE;
+ instance_size = JSGeneratorObject::kSize;
in_object_properties = 0;
} else {
instance_type = JS_OBJECT_TYPE;
« no previous file with comments | « src/full-codegen.cc ('k') | src/objects.h » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698