OLD | NEW |
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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 * @extends Mirror | 1401 * @extends Mirror |
1402 */ | 1402 */ |
1403 function GeneratorMirror(value) { | 1403 function GeneratorMirror(value) { |
1404 %_Call(ObjectMirror, this, value, MirrorType.GENERATOR_TYPE); | 1404 %_Call(ObjectMirror, this, value, MirrorType.GENERATOR_TYPE); |
1405 } | 1405 } |
1406 inherits(GeneratorMirror, ObjectMirror); | 1406 inherits(GeneratorMirror, ObjectMirror); |
1407 | 1407 |
1408 | 1408 |
1409 function GeneratorGetStatus_(value) { | 1409 function GeneratorGetStatus_(value) { |
1410 var continuation = %GeneratorGetContinuation(value); | 1410 var continuation = %GeneratorGetContinuation(value); |
1411 if (continuation < 0) return "running"; | 1411 if (continuation < -1) return "running"; |
1412 if (continuation == 0) return "closed"; | 1412 if (continuation == -1) return "closed"; |
1413 return "suspended"; | 1413 return "suspended"; |
1414 } | 1414 } |
1415 | 1415 |
1416 | 1416 |
1417 GeneratorMirror.prototype.status = function() { | 1417 GeneratorMirror.prototype.status = function() { |
1418 return GeneratorGetStatus_(this.value_); | 1418 return GeneratorGetStatus_(this.value_); |
1419 }; | 1419 }; |
1420 | 1420 |
1421 | 1421 |
1422 GeneratorMirror.prototype.sourcePosition_ = function() { | 1422 GeneratorMirror.prototype.sourcePosition_ = function() { |
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 // Functions needed by the debugger runtime. | 3043 // Functions needed by the debugger runtime. |
3044 utils.InstallFunctions(utils, DONT_ENUM, [ | 3044 utils.InstallFunctions(utils, DONT_ENUM, [ |
3045 "ClearMirrorCache", ClearMirrorCache | 3045 "ClearMirrorCache", ClearMirrorCache |
3046 ]); | 3046 ]); |
3047 | 3047 |
3048 // Export to debug.js | 3048 // Export to debug.js |
3049 utils.Export(function(to) { | 3049 utils.Export(function(to) { |
3050 to.MirrorType = MirrorType; | 3050 to.MirrorType = MirrorType; |
3051 }); | 3051 }); |
3052 }) | 3052 }) |
OLD | NEW |