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

Side by Side Diff: src/debug/mirrors.js

Issue 1968263002: Remove unused 'receiver' field from generators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: weaken dcheck Created 4 years, 7 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/arm64/builtins-arm64.cc ('k') | src/ia32/builtins-ia32.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 2006-2012 the V8 project authors. All rights reserved. 1 // Copyright 2006-2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 1436
1437 1437
1438 GeneratorMirror.prototype.func = function() { 1438 GeneratorMirror.prototype.func = function() {
1439 if (!this.func_) { 1439 if (!this.func_) {
1440 this.func_ = MakeMirror(%GeneratorGetFunction(this.value_)); 1440 this.func_ = MakeMirror(%GeneratorGetFunction(this.value_));
1441 } 1441 }
1442 return this.func_; 1442 return this.func_;
1443 }; 1443 };
1444 1444
1445 1445
1446 GeneratorMirror.prototype.receiver = function() {
1447 if (!this.receiver_) {
1448 this.receiver_ = MakeMirror(%GeneratorGetReceiver(this.value_));
1449 }
1450 return this.receiver_;
1451 };
1452
1453
1454 /** 1446 /**
1455 * Base mirror object for properties. 1447 * Base mirror object for properties.
1456 * @param {ObjectMirror} mirror The mirror object having this property 1448 * @param {ObjectMirror} mirror The mirror object having this property
1457 * @param {string} name The name of the property 1449 * @param {string} name The name of the property
1458 * @param {Array} details Details about the property 1450 * @param {Array} details Details about the property
1459 * @constructor 1451 * @constructor
1460 * @extends Mirror 1452 * @extends Mirror
1461 */ 1453 */
1462 function PropertyMirror(mirror, name, details) { 1454 function PropertyMirror(mirror, name, details) {
1463 %_Call(Mirror, this, MirrorType.PROPERTY_TYPE); 1455 %_Call(Mirror, this, MirrorType.PROPERTY_TYPE);
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 } 2764 }
2773 } 2765 }
2774 2766
2775 if (mirror.isGenerator()) { 2767 if (mirror.isGenerator()) {
2776 // Add generator specific properties. 2768 // Add generator specific properties.
2777 2769
2778 // Either 'running', 'closed', or 'suspended'. 2770 // Either 'running', 'closed', or 'suspended'.
2779 content.status = mirror.status(); 2771 content.status = mirror.status();
2780 2772
2781 content.func = this.serializeReference(mirror.func()) 2773 content.func = this.serializeReference(mirror.func())
2782 content.receiver = this.serializeReference(mirror.receiver())
2783 2774
2784 // If the generator is suspended, the content add line/column properties. 2775 // If the generator is suspended, the content add line/column properties.
2785 serializeLocationFields(mirror.sourceLocation(), content); 2776 serializeLocationFields(mirror.sourceLocation(), content);
2786 2777
2787 // TODO(wingo): Also serialize a reference to the context (scope chain). 2778 // TODO(wingo): Also serialize a reference to the context (scope chain).
2788 } 2779 }
2789 2780
2790 if (mirror.isDate()) { 2781 if (mirror.isDate()) {
2791 // Add date specific properties. 2782 // Add date specific properties.
2792 content.value = mirror.value(); 2783 content.value = mirror.value();
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
3038 // Functions needed by the debugger runtime. 3029 // Functions needed by the debugger runtime.
3039 utils.InstallFunctions(utils, DONT_ENUM, [ 3030 utils.InstallFunctions(utils, DONT_ENUM, [
3040 "ClearMirrorCache", ClearMirrorCache 3031 "ClearMirrorCache", ClearMirrorCache
3041 ]); 3032 ]);
3042 3033
3043 // Export to debug.js 3034 // Export to debug.js
3044 utils.Export(function(to) { 3035 utils.Export(function(to) {
3045 to.MirrorType = MirrorType; 3036 to.MirrorType = MirrorType;
3046 }); 3037 });
3047 }) 3038 })
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698