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 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 } | 2044 } |
2045 if (this.includeSource_()) { | 2045 if (this.includeSource_()) { |
2046 content.source = mirror.source(); | 2046 content.source = mirror.source(); |
2047 } else { | 2047 } else { |
2048 var sourceStart = mirror.source().substring(0, 80); | 2048 var sourceStart = mirror.source().substring(0, 80); |
2049 content.sourceStart = sourceStart; | 2049 content.sourceStart = sourceStart; |
2050 } | 2050 } |
2051 content.sourceLength = mirror.source().length; | 2051 content.sourceLength = mirror.source().length; |
2052 content.scriptType = mirror.scriptType(); | 2052 content.scriptType = mirror.scriptType(); |
2053 content.compilationType = mirror.compilationType(); | 2053 content.compilationType = mirror.compilationType(); |
2054 if (mirror.compilationType() == 1) { // Compilation type eval. | 2054 // For compilation type eval emit information on the script from which |
| 2055 // eval was called if a script is present. |
| 2056 if (mirror.compilationType() == 1 && |
| 2057 mirror.evalFromFunction().script()) { |
2055 content.evalFromScript = | 2058 content.evalFromScript = |
2056 this.serializeReference(mirror.evalFromFunction().script()); | 2059 this.serializeReference(mirror.evalFromFunction().script()); |
2057 var evalFromLocation = mirror.evalFromLocation() | 2060 var evalFromLocation = mirror.evalFromLocation() |
2058 content.evalFromLocation = { line: evalFromLocation.line, | 2061 content.evalFromLocation = { line: evalFromLocation.line, |
2059 column: evalFromLocation.column} | 2062 column: evalFromLocation.column} |
2060 } | 2063 } |
2061 if (mirror.context()) { | 2064 if (mirror.context()) { |
2062 content.context = this.serializeReference(mirror.context()); | 2065 content.context = this.serializeReference(mirror.context()); |
2063 } | 2066 } |
2064 break; | 2067 break; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 } | 2258 } |
2256 if (!isFinite(value)) { | 2259 if (!isFinite(value)) { |
2257 if (value > 0) { | 2260 if (value > 0) { |
2258 return 'Infinity'; | 2261 return 'Infinity'; |
2259 } else { | 2262 } else { |
2260 return '-Infinity'; | 2263 return '-Infinity'; |
2261 } | 2264 } |
2262 } | 2265 } |
2263 return value; | 2266 return value; |
2264 } | 2267 } |
OLD | NEW |