OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Script::CompilationType in objects.h. | 95 // Script::CompilationType in objects.h. |
96 Debug.ScriptCompilationType = { Host: 0, | 96 Debug.ScriptCompilationType = { Host: 0, |
97 Eval: 1, | 97 Eval: 1, |
98 JSON: 2 }; | 98 JSON: 2 }; |
99 | 99 |
100 | 100 |
101 // The different types of scopes matching constants runtime.cc. | 101 // The different types of scopes matching constants runtime.cc. |
102 Debug.ScopeType = { Global: 0, | 102 Debug.ScopeType = { Global: 0, |
103 Local: 1, | 103 Local: 1, |
104 With: 2, | 104 With: 2, |
105 Closure: 3 }; | 105 Closure: 3, |
| 106 Catch: 4 }; |
106 | 107 |
107 | 108 |
108 // Current debug state. | 109 // Current debug state. |
109 const kNoFrame = -1; | 110 const kNoFrame = -1; |
110 Debug.State = { | 111 Debug.State = { |
111 currentFrame: kNoFrame, | 112 currentFrame: kNoFrame, |
112 currentSourceLine: -1 | 113 currentSourceLine: -1 |
113 } | 114 } |
114 var trace_compile = false; // Tracing all compile events? | 115 var trace_compile = false; // Tracing all compile events? |
115 | 116 |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 result += 'Global, '; | 894 result += 'Global, '; |
894 result += '#' + scope.object.ref + '#'; | 895 result += '#' + scope.object.ref + '#'; |
895 break; | 896 break; |
896 case Debug.ScopeType.Local: | 897 case Debug.ScopeType.Local: |
897 result += 'Local'; | 898 result += 'Local'; |
898 break; | 899 break; |
899 case Debug.ScopeType.With: | 900 case Debug.ScopeType.With: |
900 result += 'With, '; | 901 result += 'With, '; |
901 result += '#' + scope.object.ref + '#'; | 902 result += '#' + scope.object.ref + '#'; |
902 break; | 903 break; |
| 904 case Debug.ScopeType.Catch: |
| 905 result += 'Catch, '; |
| 906 result += '#' + scope.object.ref + '#'; |
| 907 break; |
903 case Debug.ScopeType.Closure: | 908 case Debug.ScopeType.Closure: |
904 result += 'Closure'; | 909 result += 'Closure'; |
905 break; | 910 break; |
906 default: | 911 default: |
907 result += 'UNKNOWN'; | 912 result += 'UNKNOWN'; |
908 } | 913 } |
909 return result; | 914 return result; |
910 } | 915 } |
911 | 916 |
912 | 917 |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 json += NumberToJSON_(elem); | 1616 json += NumberToJSON_(elem); |
1612 } else if (typeof(elem) === 'string') { | 1617 } else if (typeof(elem) === 'string') { |
1613 json += StringToJSON_(elem); | 1618 json += StringToJSON_(elem); |
1614 } else { | 1619 } else { |
1615 json += elem; | 1620 json += elem; |
1616 } | 1621 } |
1617 } | 1622 } |
1618 json += ']'; | 1623 json += ']'; |
1619 return json; | 1624 return json; |
1620 } | 1625 } |
OLD | NEW |