| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 */ | 502 */ |
| 503 Profile.DynamicFuncCodeEntry = function(size, type, func, state) { | 503 Profile.DynamicFuncCodeEntry = function(size, type, func, state) { |
| 504 CodeMap.CodeEntry.call(this, size, '', type); | 504 CodeMap.CodeEntry.call(this, size, '', type); |
| 505 this.func = func; | 505 this.func = func; |
| 506 this.state = state; | 506 this.state = state; |
| 507 }; | 507 }; |
| 508 | 508 |
| 509 Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"]; | 509 Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"]; |
| 510 | 510 |
| 511 /** | 511 /** |
| 512 * Returns state. |
| 513 */ |
| 514 Profile.DynamicFuncCodeEntry.prototype.getState = function() { |
| 515 return Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state]; |
| 516 }; |
| 517 |
| 518 /** |
| 512 * Returns node name. | 519 * Returns node name. |
| 513 */ | 520 */ |
| 514 Profile.DynamicFuncCodeEntry.prototype.getName = function() { | 521 Profile.DynamicFuncCodeEntry.prototype.getName = function() { |
| 515 var name = this.func.getName(); | 522 var name = this.func.getName(); |
| 516 return this.type + ': ' + Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state
] + name; | 523 return this.type + ': ' + this.getState() + name; |
| 517 }; | 524 }; |
| 518 | 525 |
| 519 | 526 |
| 520 /** | 527 /** |
| 521 * Returns raw node name (without type decoration). | 528 * Returns raw node name (without type decoration). |
| 522 */ | 529 */ |
| 523 Profile.DynamicFuncCodeEntry.prototype.getRawName = function() { | 530 Profile.DynamicFuncCodeEntry.prototype.getRawName = function() { |
| 524 return this.func.getName(); | 531 return this.func.getName(); |
| 525 }; | 532 }; |
| 526 | 533 |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 write(' ' + JSON.stringify(this.ticks_[i])); | 1018 write(' ' + JSON.stringify(this.ticks_[i])); |
| 1012 if (i < this.ticks_.length - 1) { | 1019 if (i < this.ticks_.length - 1) { |
| 1013 write(',\n'); | 1020 write(',\n'); |
| 1014 } else { | 1021 } else { |
| 1015 write('\n'); | 1022 write('\n'); |
| 1016 } | 1023 } |
| 1017 } | 1024 } |
| 1018 write(' ]\n'); | 1025 write(' ]\n'); |
| 1019 write('}\n'); | 1026 write('}\n'); |
| 1020 }; | 1027 }; |
| OLD | NEW |