OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // Don't use PC when in external callback code, as it can point | 358 // Don't use PC when in external callback code, as it can point |
359 // inside callback's code, and we will erroneously report | 359 // inside callback's code, and we will erroneously report |
360 // that a callback calls itself. Instead we use tos_or_external_callback, | 360 // that a callback calls itself. Instead we use tos_or_external_callback, |
361 // as simply resetting PC will produce unaccounted ticks. | 361 // as simply resetting PC will produce unaccounted ticks. |
362 pc = tos_or_external_callback; | 362 pc = tos_or_external_callback; |
363 tos_or_external_callback = 0; | 363 tos_or_external_callback = 0; |
364 } else if (tos_or_external_callback) { | 364 } else if (tos_or_external_callback) { |
365 // Find out, if top of stack was pointing inside a JS function | 365 // Find out, if top of stack was pointing inside a JS function |
366 // meaning that we have encountered a frameless invocation. | 366 // meaning that we have encountered a frameless invocation. |
367 var funcEntry = this.profile_.findEntry(tos_or_external_callback); | 367 var funcEntry = this.profile_.findEntry(tos_or_external_callback); |
368 if (!funcEntry) { | 368 if (!funcEntry || !funcEntry.isJSFunction || !funcEntry.isJSFunction()) { |
369 tos_or_external_callback = 0; | 369 tos_or_external_callback = 0; |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 this.profile_.recordTick( | 373 this.profile_.recordTick( |
374 ns_since_start, vmState, | 374 ns_since_start, vmState, |
375 this.processStack(pc, tos_or_external_callback, stack)); | 375 this.processStack(pc, tos_or_external_callback, stack)); |
376 }; | 376 }; |
377 | 377 |
378 | 378 |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 for (var synArg in this.argsDispatch_) { | 968 for (var synArg in this.argsDispatch_) { |
969 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { | 969 if (arg !== synArg && dispatch === this.argsDispatch_[synArg]) { |
970 synonyms.push(synArg); | 970 synonyms.push(synArg); |
971 delete this.argsDispatch_[synArg]; | 971 delete this.argsDispatch_[synArg]; |
972 } | 972 } |
973 } | 973 } |
974 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); | 974 print(' ' + padRight(synonyms.join(', '), 20) + " " + dispatch[2]); |
975 } | 975 } |
976 quit(2); | 976 quit(2); |
977 }; | 977 }; |
OLD | NEW |