|
| 1 | +// Autogenerated by hob |
| 2 | +window.cls || (window.cls = {}); |
| 3 | +cls.EcmascriptDebugger || (cls.EcmascriptDebugger = {}); |
| 4 | +cls.EcmascriptDebugger["6.14"] || (cls.EcmascriptDebugger["6.14"] = {}); |
| 5 | + |
| 6 | +/** |
| 7 | + * Frames are in innermost-first order. |
| 8 | + */ |
| 9 | +cls.EcmascriptDebugger["6.14"].BacktraceFrameList = function(arr) |
| 10 | +{ |
| 11 | + this.frameList = (arr[0] || []).map(function(item) |
| 12 | + { |
| 13 | + return new cls.EcmascriptDebugger["6.14"].BacktraceFrame(item); |
| 14 | + }); |
| 15 | + /** |
| 16 | + * The list of return values that were returned from the most recent |
| 17 | + * function calls. List is cleared upon calling a function. |
| 18 | + * Most recently returned value is first in the list. |
| 19 | + * |
| 20 | + * @since 6.10 |
| 21 | + */ |
| 22 | + this.returnValueList = (arr[1] || []).map(function(item) |
| 23 | + { |
| 24 | + return new cls.EcmascriptDebugger["6.14"].ReturnValue(item); |
| 25 | + }); |
| 26 | +}; |
| 27 | + |
| 28 | +cls.EcmascriptDebugger["6.14"].BacktraceFrame = function(arr) |
| 29 | +{ |
| 30 | + this.functionID = arr[0]; |
| 31 | + this.argumentObject = arr[1]; |
| 32 | + this.variableObject = arr[2]; |
| 33 | + this.thisObject = arr[3]; |
| 34 | + /** |
| 35 | + * TODO: Spec says repeated, while the code only assumes one (required) |
| 36 | + */ |
| 37 | + this.objectValue = arr[4] ? new cls.EcmascriptDebugger["6.14"].ObjectValue(arr[4], this) : null; |
| 38 | + this.scriptID = arr[5]; |
| 39 | + this.lineNumber = arr[6]; |
| 40 | + /** |
| 41 | + * The variable objects in the scope chain of the function. The first |
| 42 | + * element in the list is the innermost scope (the scope of the function |
| 43 | + * itself). The list includes the global scope. |
| 44 | + * |
| 45 | + * @since 6.1 |
| 46 | + */ |
| 47 | + this.scopeList = arr[7] || []; |
| 48 | + /** |
| 49 | + * The full value of the 'arguments' object. |
| 50 | + * |
| 51 | + * @since 6.2 |
| 52 | + */ |
| 53 | + this.argumentValue = arr[8] ? new cls.EcmascriptDebugger["6.14"].ObjectValue(arr[8], this) : null; |
| 54 | + /** |
| 55 | + * The full value of the 'this' object. |
| 56 | + * |
| 57 | + * @since 6.2 |
| 58 | + */ |
| 59 | + this.thisValue = arr[9] ? new cls.EcmascriptDebugger["6.14"].ObjectValue(arr[9], this) : null; |
| 60 | +}; |
| 61 | + |
| 62 | +cls.EcmascriptDebugger["6.14"].ObjectValue = function(arr) |
| 63 | +{ |
| 64 | + this.objectID = arr[0]; |
| 65 | + this.isCallable = arr[1]; |
| 66 | + /** |
| 67 | + * type, function or object |
| 68 | + */ |
| 69 | + this.type = arr[2]; |
| 70 | + this.prototypeID = arr[3]; |
| 71 | + /** |
| 72 | + * The class of the object. |
| 73 | + */ |
| 74 | + this.className = arr[4]; |
| 75 | + /** |
| 76 | + * If the object is a function, this is the name of |
| 77 | + * the variable associated with that function (if any). |
| 78 | + */ |
| 79 | + this.functionName = arr[5]; |
| 80 | +}; |
| 81 | + |
| 82 | +/** |
| 83 | + * The object representing return value of a function. Includes context |
| 84 | + * information indicating where from and where to the value was returned (script |
| 85 | + * id, line number), returned value and function object itself that returned |
| 86 | + * the value. |
| 87 | + * |
| 88 | + * @since 6.10 |
| 89 | + */ |
| 90 | +cls.EcmascriptDebugger["6.14"].ReturnValue = function(arr) |
| 91 | +{ |
| 92 | + /** |
| 93 | + * The value that was returned. |
| 94 | + */ |
| 95 | + this.value = arr[0] ? new cls.EcmascriptDebugger["6.14"].Value(arr[0], this) : null; |
| 96 | + /** |
| 97 | + * The function object from which the value was returned. |
| 98 | + */ |
| 99 | + this.functionFrom = arr[1] ? new cls.EcmascriptDebugger["6.14"].ObjectValue(arr[1], this) : null; |
| 100 | + /** |
| 101 | + * The position where the value was returned from. |
| 102 | + */ |
| 103 | + this.positionFrom = arr[2] ? new cls.EcmascriptDebugger["6.14"].Position(arr[2], this) : null; |
| 104 | + /** |
| 105 | + * The position where the value was returned to. |
| 106 | + */ |
| 107 | + this.positionTo = arr[3] ? new cls.EcmascriptDebugger["6.14"].Position(arr[3], this) : null; |
| 108 | +}; |
| 109 | + |
| 110 | +/** |
| 111 | + * Represents an ECMAScript value, a value is either one of the primitives |
| 112 | + * like string or boolean or an object. |
| 113 | + */ |
| 114 | +cls.EcmascriptDebugger["6.14"].Value = function(arr) |
| 115 | +{ |
| 116 | + /** |
| 117 | + * The type of value. |
| 118 | + * |
| 119 | + * @note Booleans are encoded as either TRUE or FALSE to shorten the number |
| 120 | + * fields in use. |
| 121 | + */ |
| 122 | + // cls.EcmascriptDebugger["6.14"].Value.Type |
| 123 | + this.type = arr[0]; |
| 124 | + /** |
| 125 | + * The numeric value, set if type = NUMBER. |
| 126 | + */ |
| 127 | + this.number = arr[1]; |
| 128 | + /** |
| 129 | + * The string, set if type = STRING. |
| 130 | + */ |
| 131 | + this.str = arr[2]; |
| 132 | + /** |
| 133 | + * Object information, set if type = OBJECT. |
| 134 | + */ |
| 135 | + this.object = arr[3] ? new cls.EcmascriptDebugger["6.14"].ObjectValue(arr[3], this) : null; |
| 136 | +}; |
| 137 | +cls.EcmascriptDebugger["6.14"].Value.Type = |
| 138 | +{ |
| 139 | + /** |
| 140 | + * The undefined type, returned when no value was found or "undefined" |
| 141 | + * was referenced. |
| 142 | + */ |
| 143 | + 0: "UNDEFINED", |
| 144 | + /** |
| 145 | + * A null value. |
| 146 | + */ |
| 147 | + 1: "NULL", |
| 148 | + /** |
| 149 | + * Boolean value true. |
| 150 | + */ |
| 151 | + 2: "TRUE", |
| 152 | + /** |
| 153 | + * Boolean value false. |
| 154 | + */ |
| 155 | + 3: "FALSE", |
| 156 | + /** |
| 157 | + * NaN value which cannot be exported to JSON directly. |
| 158 | + * Should be treated like a number. |
| 159 | + * |
| 160 | + * ECMAScript users should use this code to get the value natively:: |
| 161 | + * |
| 162 | + * parseFloat("NaN") |
| 163 | + */ |
| 164 | + 4: "NAN", |
| 165 | + /** |
| 166 | + * Plus infinity value which cannot be export to JSON directly. |
| 167 | + * Should be treated like a number. |
| 168 | + * |
| 169 | + * ECMAScript users should use this code to get the value natively:: |
| 170 | + * |
| 171 | + * parseFloat("Infinity") |
| 172 | + */ |
| 173 | + 5: "PLUS_INFINITY", |
| 174 | + /** |
| 175 | + * Minus infinity value which cannot be export to JSON directly. |
| 176 | + * Should be treated like a number. |
| 177 | + * |
| 178 | + * ECMAScript users should use this code to get the value natively:: |
| 179 | + * |
| 180 | + * parseFloat("-Infinity") |
| 181 | + */ |
| 182 | + 6: "MINUS_INFINITY", |
| 183 | + /** |
| 184 | + * A number, use the field 'number' for the actual value. |
| 185 | + */ |
| 186 | + 7: "NUMBER", |
| 187 | + /** |
| 188 | + * A string, use the field 'str' for the actual string data. |
| 189 | + */ |
| 190 | + 8: "STRING", |
| 191 | + /** |
| 192 | + * An object, the field 'object' contains object details. |
| 193 | + */ |
| 194 | + 9: "OBJECT", |
| 195 | +}; |
| 196 | + |
| 197 | +/** |
| 198 | + * Defines the position in a script. The position is identified by the ID of |
| 199 | + * the script and the line number in the script. |
| 200 | + */ |
| 201 | +cls.EcmascriptDebugger["6.14"].Position = function(arr) |
| 202 | +{ |
| 203 | + /** |
| 204 | + * ID of the script which contains the position. |
| 205 | + * The ID will be set in the ScriptInfo message when a new script appears. |
| 206 | + */ |
| 207 | + this.scriptID = arr[0]; |
| 208 | + /** |
| 209 | + * The line number in the script. |
| 210 | + */ |
| 211 | + this.lineNumber = arr[1]; |
| 212 | +}; |
| 213 | + |
0 commit comments