OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // name has that string value. | 459 // name has that string value. |
460 Debug.scriptSource = function(func_or_script_name) { | 460 Debug.scriptSource = function(func_or_script_name) { |
461 return this.findScript(func_or_script_name).source; | 461 return this.findScript(func_or_script_name).source; |
462 }; | 462 }; |
463 | 463 |
464 Debug.source = function(f) { | 464 Debug.source = function(f) { |
465 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); | 465 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); |
466 return %FunctionGetSourceCode(f); | 466 return %FunctionGetSourceCode(f); |
467 }; | 467 }; |
468 | 468 |
469 Debug.disassemble = function(f) { | 469 Debug.assembler = function(f) { |
470 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); | 470 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); |
471 return %DebugDisassembleFunction(f); | 471 return %FunctionGetAssemblerCode(f); |
472 }; | |
473 | |
474 Debug.disassembleConstructor = function(f) { | |
475 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); | |
476 return %DebugDisassembleConstructor(f); | |
477 }; | 472 }; |
478 | 473 |
479 Debug.sourcePosition = function(f) { | 474 Debug.sourcePosition = function(f) { |
480 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); | 475 if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); |
481 return %FunctionGetScriptSourcePosition(f); | 476 return %FunctionGetScriptSourcePosition(f); |
482 }; | 477 }; |
483 | 478 |
484 | 479 |
485 Debug.findFunctionSourceLocation = function(func, opt_line, opt_column) { | 480 Debug.findFunctionSourceLocation = function(func, opt_line, opt_column) { |
486 var script = %FunctionGetScript(func); | 481 var script = %FunctionGetScript(func); |
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 case 'string': | 2023 case 'string': |
2029 case 'number': | 2024 case 'number': |
2030 json = value; | 2025 json = value; |
2031 break | 2026 break |
2032 | 2027 |
2033 default: | 2028 default: |
2034 json = null; | 2029 json = null; |
2035 } | 2030 } |
2036 return json; | 2031 return json; |
2037 } | 2032 } |
OLD | NEW |