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

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: Fix nits; generator object fields are undefined if not set 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
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 accumulator->Put(str); 1283 accumulator->Put(str);
1284 accumulator->Put('>'); 1284 accumulator->Put('>');
1285 printed = true; 1285 printed = true;
1286 } 1286 }
1287 } 1287 }
1288 if (!printed) { 1288 if (!printed) {
1289 accumulator->Add("<JS Function>"); 1289 accumulator->Add("<JS Function>");
1290 } 1290 }
1291 break; 1291 break;
1292 } 1292 }
1293 case JS_GENERATOR_OBJECT_TYPE: {
1294 accumulator->Add("<JS Generator>");
1295 break;
1296 }
1293 case JS_MODULE_TYPE: { 1297 case JS_MODULE_TYPE: {
1294 accumulator->Add("<JS Module>"); 1298 accumulator->Add("<JS Module>");
1295 break; 1299 break;
1296 } 1300 }
1297 // All other JSObjects are rather similar to each other (JSObject, 1301 // All other JSObjects are rather similar to each other (JSObject,
1298 // JSGlobalProxy, JSGlobalObject, JSUndetectableObject, JSValue). 1302 // JSGlobalProxy, JSGlobalObject, JSUndetectableObject, JSValue).
1299 default: { 1303 default: {
1300 Map* map_of_this = map(); 1304 Map* map_of_this = map();
1301 Heap* heap = GetHeap(); 1305 Heap* heap = GetHeap();
1302 Object* constructor = map_of_this->constructor(); 1306 Object* constructor = map_of_this->constructor();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 } 1543 }
1540 1544
1541 switch (type) { 1545 switch (type) {
1542 case FIXED_ARRAY_TYPE: 1546 case FIXED_ARRAY_TYPE:
1543 FixedArray::BodyDescriptor::IterateBody(this, object_size, v); 1547 FixedArray::BodyDescriptor::IterateBody(this, object_size, v);
1544 break; 1548 break;
1545 case FIXED_DOUBLE_ARRAY_TYPE: 1549 case FIXED_DOUBLE_ARRAY_TYPE:
1546 break; 1550 break;
1547 case JS_OBJECT_TYPE: 1551 case JS_OBJECT_TYPE:
1548 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 1552 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
1553 case JS_GENERATOR_OBJECT_TYPE:
1549 case JS_MODULE_TYPE: 1554 case JS_MODULE_TYPE:
1550 case JS_VALUE_TYPE: 1555 case JS_VALUE_TYPE:
1551 case JS_DATE_TYPE: 1556 case JS_DATE_TYPE:
1552 case JS_ARRAY_TYPE: 1557 case JS_ARRAY_TYPE:
1553 case JS_ARRAY_BUFFER_TYPE: 1558 case JS_ARRAY_BUFFER_TYPE:
1554 case JS_SET_TYPE: 1559 case JS_SET_TYPE:
1555 case JS_MAP_TYPE: 1560 case JS_MAP_TYPE:
1556 case JS_WEAK_MAP_TYPE: 1561 case JS_WEAK_MAP_TYPE:
1557 case JS_REGEXP_TYPE: 1562 case JS_REGEXP_TYPE:
1558 case JS_GLOBAL_PROXY_TYPE: 1563 case JS_GLOBAL_PROXY_TYPE:
(...skipping 12914 matching lines...) Expand 10 before | Expand all | Expand 10 after
14473 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 14478 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
14474 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 14479 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
14475 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 14480 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
14476 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 14481 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
14477 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 14482 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
14478 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 14483 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
14479 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 14484 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
14480 } 14485 }
14481 14486
14482 } } // namespace v8::internal 14487 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698