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

Side by Side Diff: src/objects.cc

Issue 13542002: Calling a generator function returns a generator object (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Link generator iterator definitions and uses through local variable 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 accumulator->Put(str); 1279 accumulator->Put(str);
1280 accumulator->Put('>'); 1280 accumulator->Put('>');
1281 printed = true; 1281 printed = true;
1282 } 1282 }
1283 } 1283 }
1284 if (!printed) { 1284 if (!printed) {
1285 accumulator->Add("<JS Function>"); 1285 accumulator->Add("<JS Function>");
1286 } 1286 }
1287 break; 1287 break;
1288 } 1288 }
1289 case JS_GENERATOR_ITERATOR_TYPE: {
1290 accumulator->Add("<JS Generator Iterator>");
Michael Starzinger 2013/04/08 13:14:05 The debug representation should just be "<JS Gener
1291 break;
1292 }
1289 case JS_MODULE_TYPE: { 1293 case JS_MODULE_TYPE: {
1290 accumulator->Add("<JS Module>"); 1294 accumulator->Add("<JS Module>");
1291 break; 1295 break;
1292 } 1296 }
1293 // All other JSObjects are rather similar to each other (JSObject, 1297 // All other JSObjects are rather similar to each other (JSObject,
1294 // JSGlobalProxy, JSGlobalObject, JSUndetectableObject, JSValue). 1298 // JSGlobalProxy, JSGlobalObject, JSUndetectableObject, JSValue).
1295 default: { 1299 default: {
1296 Map* map_of_this = map(); 1300 Map* map_of_this = map();
1297 Heap* heap = GetHeap(); 1301 Heap* heap = GetHeap();
1298 Object* constructor = map_of_this->constructor(); 1302 Object* constructor = map_of_this->constructor();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 } 1539 }
1536 1540
1537 switch (type) { 1541 switch (type) {
1538 case FIXED_ARRAY_TYPE: 1542 case FIXED_ARRAY_TYPE:
1539 FixedArray::BodyDescriptor::IterateBody(this, object_size, v); 1543 FixedArray::BodyDescriptor::IterateBody(this, object_size, v);
1540 break; 1544 break;
1541 case FIXED_DOUBLE_ARRAY_TYPE: 1545 case FIXED_DOUBLE_ARRAY_TYPE:
1542 break; 1546 break;
1543 case JS_OBJECT_TYPE: 1547 case JS_OBJECT_TYPE:
1544 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 1548 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
1549 case JS_GENERATOR_ITERATOR_TYPE:
1545 case JS_MODULE_TYPE: 1550 case JS_MODULE_TYPE:
1546 case JS_VALUE_TYPE: 1551 case JS_VALUE_TYPE:
1547 case JS_DATE_TYPE: 1552 case JS_DATE_TYPE:
1548 case JS_ARRAY_TYPE: 1553 case JS_ARRAY_TYPE:
1549 case JS_ARRAY_BUFFER_TYPE: 1554 case JS_ARRAY_BUFFER_TYPE:
1550 case JS_SET_TYPE: 1555 case JS_SET_TYPE:
1551 case JS_MAP_TYPE: 1556 case JS_MAP_TYPE:
1552 case JS_WEAK_MAP_TYPE: 1557 case JS_WEAK_MAP_TYPE:
1553 case JS_REGEXP_TYPE: 1558 case JS_REGEXP_TYPE:
1554 case JS_GLOBAL_PROXY_TYPE: 1559 case JS_GLOBAL_PROXY_TYPE:
(...skipping 12815 matching lines...) Expand 10 before | Expand all | Expand 10 after
14370 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14375 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14371 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14376 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14372 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14377 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14373 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14378 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14374 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14379 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14375 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14380 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14376 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14381 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14377 } 14382 }
14378 14383
14379 } } // namespace v8::internal 14384 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698