Changeset 170034 in webkit
- Timestamp:
- Jun 16, 2014 4:19:29 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r170010 r170034 1 2014-06-12 Mark Lam <mark.lam@apple.com> 2 3 Parser statementDepth accounting needs to account for when a function body excludes its braces. 4 <https://webkit.org/b/133832> 5 6 Reviewed by Oliver Hunt. 7 8 * js/parser-syntax-check-expected.txt: 9 * js/script-tests/parser-syntax-check.js: 10 - Added cases for declaring functions in strict mode. 11 - Added caught error to the test result logging if it's not a SyntaxError. 12 This helps catch the issue in this bug which was erroneously throwing 13 RangeErrors. 14 1 15 2014-06-16 Radu Stavila <stavila@adobe.com> 2 16 -
trunk/LayoutTests/js/parser-syntax-check-expected.txt
r166392 r170034 19 19 PASS Invalid: "a.'l'" 20 20 PASS Invalid: "function f() { a.'l' }" 21 PASS Valid: "a: +~!new a" 21 PASS Valid: "a: +~!new a" with ReferenceError 22 22 PASS Valid: "function f() { a: +~!new a }" 23 23 PASS Invalid: "new -a" 24 24 PASS Invalid: "function f() { new -a }" 25 PASS Valid: "new (-1)" 25 PASS Valid: "new (-1)" with TypeError 26 26 PASS Valid: "function f() { new (-1) }" 27 PASS Valid: "a: b: c: new f(x++)++" 27 PASS Valid: "a: b: c: new f(x++)++" with ReferenceError 28 28 PASS Valid: "function f() { a: b: c: new f(x++)++ }" 29 PASS Valid: "(a)++" 29 PASS Valid: "(a)++" with ReferenceError 30 30 PASS Valid: "function f() { (a)++ }" 31 PASS Valid: "(1--).x" 31 PASS Valid: "(1--).x" with ReferenceError 32 32 PASS Valid: "function f() { (1--).x }" 33 33 PASS Invalid: "a-- ++" … … 35 35 PASS Invalid: "(a:) --b" 36 36 PASS Invalid: "function f() { (a:) --b }" 37 PASS Valid: "++ -- ++ a" 37 PASS Valid: "++ -- ++ a" with ReferenceError 38 38 PASS Valid: "function f() { ++ -- ++ a }" 39 PASS Valid: "++ new new a ++" 39 PASS Valid: "++ new new a ++" with ReferenceError 40 40 PASS Valid: "function f() { ++ new new a ++ }" 41 41 PASS Valid: "delete void 0" … … 45 45 PASS Invalid: "(a++" 46 46 PASS Invalid: "function f() { (a++ }" 47 PASS Valid: "++a--" 47 PASS Valid: "++a--" with ReferenceError 48 48 PASS Valid: "function f() { ++a-- }" 49 PASS Valid: "++((a))--" 49 PASS Valid: "++((a))--" with ReferenceError 50 50 PASS Valid: "function f() { ++((a))-- }" 51 PASS Valid: "(a.x++)++" 51 PASS Valid: "(a.x++)++" with ReferenceError 52 52 PASS Valid: "function f() { (a.x++)++ }" 53 53 PASS Invalid: "1: null" … … 68 68 PASS Valid: "function f() { 1 .l }" 69 69 Binary and conditional operators 70 PASS Valid: "a + + typeof this" 70 PASS Valid: "a + + typeof this" with ReferenceError 71 71 PASS Valid: "function f() { a + + typeof this }" 72 72 PASS Invalid: "a + * b" … … 80 80 PASS Invalid: "a-" 81 81 PASS Invalid: "function f() { a- }" 82 PASS Valid: "a = b ? b = c : d = e" 82 PASS Valid: "a = b ? b = c : d = e" with ReferenceError 83 83 PASS Valid: "function f() { a = b ? b = c : d = e }" 84 PASS Valid: "s: a[1].l ? b.l['s'] ? c++ : d : true" 84 PASS Valid: "s: a[1].l ? b.l['s'] ? c++ : d : true" with ReferenceError 85 85 PASS Valid: "function f() { s: a[1].l ? b.l['s'] ? c++ : d : true }" 86 PASS Valid: "a ? b + 1 ? c + 3 * d.l : d[5][6] : e" 86 PASS Valid: "a ? b + 1 ? c + 3 * d.l : d[5][6] : e" with ReferenceError 87 87 PASS Valid: "function f() { a ? b + 1 ? c + 3 * d.l : d[5][6] : e }" 88 PASS Valid: "a in b instanceof delete -c" 88 PASS Valid: "a in b instanceof delete -c" with ReferenceError 89 89 PASS Valid: "function f() { a in b instanceof delete -c }" 90 90 PASS Invalid: "a in instanceof b.l" … … 94 94 PASS Invalid: "- false = 3" 95 95 PASS Invalid: "function f() { - false = 3 }" 96 PASS Valid: "a: b: c: (1 + null) = 3" 96 PASS Valid: "a: b: c: (1 + null) = 3" with ReferenceError 97 97 PASS Valid: "function f() { a: b: c: (1 + null) = 3 }" 98 PASS Valid: "a[2] = b.l += c /= 4 * 7 ^ !6" 98 PASS Valid: "a[2] = b.l += c /= 4 * 7 ^ !6" with ReferenceError 99 99 PASS Valid: "function f() { a[2] = b.l += c /= 4 * 7 ^ !6 }" 100 100 PASS Invalid: "a + typeof b += c in d" … … 102 102 PASS Invalid: "typeof a &= typeof b" 103 103 PASS Invalid: "function f() { typeof a &= typeof b }" 104 PASS Valid: "a: ((typeof (a))) >>>= a || b.l && c" 104 PASS Valid: "a: ((typeof (a))) >>>= a || b.l && c" with ReferenceError 105 105 PASS Valid: "function f() { a: ((typeof (a))) >>>= a || b.l && c }" 106 PASS Valid: "a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g" 106 PASS Valid: "a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g" with ReferenceError 107 107 PASS Valid: "function f() { a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g }" 108 PASS Valid: "-void+x['y'].l == x.l != 5 - f[7]" 108 PASS Valid: "-void+x['y'].l == x.l != 5 - f[7]" with ReferenceError 109 109 PASS Valid: "function f() { -void+x['y'].l == x.l != 5 - f[7] }" 110 110 Function calls (and new with arguments) 111 PASS Valid: "a()()()" 111 PASS Valid: "a()()()" with ReferenceError 112 112 PASS Valid: "function f() { a()()() }" 113 PASS Valid: "s: l: a[2](4 == 6, 5 = 6)(f[4], 6)" 113 PASS Valid: "s: l: a[2](4 == 6, 5 = 6)(f[4], 6)" with ReferenceError 114 114 PASS Valid: "function f() { s: l: a[2](4 == 6, 5 = 6)(f[4], 6) }" 115 PASS Valid: "s: eval(a.apply(), b.call(c[5] - f[7]))" 115 PASS Valid: "s: eval(a.apply(), b.call(c[5] - f[7]))" with ReferenceError 116 116 PASS Valid: "function f() { s: eval(a.apply(), b.call(c[5] - f[7])) }" 117 117 PASS Invalid: "a(" … … 125 125 PASS Invalid: "a(5,6" 126 126 PASS Invalid: "function f() { a(5,6 }" 127 PASS Valid: "a(b[7], c <d> e.l, new a() > b)" 127 PASS Valid: "a(b[7], c <d> e.l, new a() > b)" with ReferenceError 128 128 PASS Valid: "function f() { a(b[7], c <d> e.l, new a() > b) }" 129 129 PASS Invalid: "a(b[5)" … … 131 131 PASS Invalid: "a(b.)" 132 132 PASS Invalid: "function f() { a(b.) }" 133 PASS Valid: "~new new a(1)(i++)(c[l])" 133 PASS Valid: "~new new a(1)(i++)(c[l])" with ReferenceError 134 134 PASS Valid: "function f() { ~new new a(1)(i++)(c[l]) }" 135 135 PASS Invalid: "a(*a)" 136 136 PASS Invalid: "function f() { a(*a) }" 137 PASS Valid: "((((a))((b)()).l))()" 137 PASS Valid: "((((a))((b)()).l))()" with ReferenceError 138 138 PASS Valid: "function f() { ((((a))((b)()).l))() }" 139 PASS Valid: "(a)[b + (c) / (d())].l--" 139 PASS Valid: "(a)[b + (c) / (d())].l--" with ReferenceError 140 140 PASS Valid: "function f() { (a)[b + (c) / (d())].l-- }" 141 PASS Valid: "new (5)" 141 PASS Valid: "new (5)" with TypeError 142 142 PASS Valid: "function f() { new (5) }" 143 143 PASS Invalid: "new a(5" 144 144 PASS Invalid: "function f() { new a(5 }" 145 PASS Valid: "new (f + 5)(6, (g)() - 'l'() - true(false))" 145 PASS Valid: "new (f + 5)(6, (g)() - 'l'() - true(false))" with ReferenceError 146 146 PASS Valid: "function f() { new (f + 5)(6, (g)() - 'l'() - true(false)) }" 147 147 PASS Invalid: "a(.length)" … … 170 170 PASS Invalid: "(function this(){})" 171 171 PASS Invalid: "function f() { (function this(){}) }" 172 PASS Valid: "(delete new function f(){} + function(a,b){}(5)(6))" 172 PASS Valid: "(delete new function f(){} + function(a,b){}(5)(6))" with TypeError 173 173 PASS Valid: "function f() { (delete new function f(){} + function(a,b){}(5)(6)) }" 174 174 PASS Valid: "6 - function (m) { function g() {} }" … … 179 179 PASS Invalid: "function f() { function l++(){} }" 180 180 Array and object literal, comma operator 181 PASS Valid: "[] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,]" 181 PASS Valid: "[] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,]" with TypeError 182 182 PASS Valid: "function f() { [] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,] }" 183 183 PASS Invalid: "[5," … … 187 187 PASS Invalid: "(a,)" 188 188 PASS Invalid: "function f() { (a,) }" 189 PASS Valid: "1 + {get get(){}, set set(a){}, get1:4, set1:get-set, }" 189 PASS Valid: "1 + {get get(){}, set set(a){}, get1:4, set1:get-set, }" with ReferenceError 190 190 PASS Valid: "function f() { 1 + {get get(){}, set set(a){}, get1:4, set1:get-set, } }" 191 191 PASS Invalid: "1 + {a" … … 197 197 PASS Invalid: ",a" 198 198 PASS Invalid: "function f() { ,a }" 199 PASS Valid: "(4,(5,a(3,4))),f[4,a-6]" 199 PASS Valid: "(4,(5,a(3,4))),f[4,a-6]" with ReferenceError 200 200 PASS Valid: "function f() { (4,(5,a(3,4))),f[4,a-6] }" 201 201 PASS Invalid: "(,f)" … … 216 216 PASS Invalid: "{ a: }" 217 217 PASS Invalid: "function f() { { a: } }" 218 PASS Valid: "{} f; { 6 + f() }" 218 PASS Valid: "{} f; { 6 + f() }" with ReferenceError 219 219 PASS Valid: "function f() { {} f; { 6 + f() } }" 220 PASS Valid: "{ a[5],6; {} ++b-new (-5)() } c().l++" 220 PASS Valid: "{ a[5],6; {} ++b-new (-5)() } c().l++" with ReferenceError 221 221 PASS Valid: "function f() { { a[5],6; {} ++b-new (-5)() } c().l++ }" 222 PASS Valid: "{ l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } }" 222 PASS Valid: "{ l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } }" with ReferenceError 223 223 PASS Valid: "function f() { { l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } } }" 224 224 PASS Valid: "if (a) ;" … … 236 236 PASS Invalid: "else {}" 237 237 PASS Invalid: "function f() { else {} }" 238 PASS Valid: "if (a) if (b) y; else {} else ;" 238 PASS Valid: "if (a) if (b) y; else {} else ;" with ReferenceError 239 239 PASS Valid: "function f() { if (a) if (b) y; else {} else ; }" 240 240 PASS Invalid: "if (a) {} else x; else" … … 242 242 PASS Invalid: "if (a) { else }" 243 243 PASS Invalid: "function f() { if (a) { else } }" 244 PASS Valid: "if (a.l + new b()) 4 + 5 - f()" 244 PASS Valid: "if (a.l + new b()) 4 + 5 - f()" with ReferenceError 245 245 PASS Valid: "function f() { if (a.l + new b()) 4 + 5 - f() }" 246 PASS Valid: "if (a) with (x) ; else with (y) ;" 246 PASS Valid: "if (a) with (x) ; else with (y) ;" with ReferenceError 247 247 PASS Valid: "function f() { if (a) with (x) ; else with (y) ; }" 248 248 PASS Invalid: "with a.b { }" 249 249 PASS Invalid: "function f() { with a.b { } }" 250 PASS Valid: "while (a() - new b) ;" 250 PASS Valid: "while (a() - new b) ;" with TypeError 251 251 PASS Valid: "function f() { while (a() - new b) ; }" 252 252 PASS Invalid: "while a {}" 253 253 PASS Invalid: "function f() { while a {} }" 254 PASS Valid: "do ; while(0) i++" 254 PASS Valid: "do ; while(0) i++" with ReferenceError 255 255 PASS Valid: "function f() { do ; while(0) i++ }" 256 PASS Valid: "do if (a) x; else y; while(z)" 256 PASS Valid: "do if (a) x; else y; while(z)" with ReferenceError 257 257 PASS Valid: "function f() { do if (a) x; else y; while(z) }" 258 258 PASS Invalid: "do g; while 4" … … 264 264 PASS Valid: "do while (0) if (a) {} else y; while(0)" 265 265 PASS Valid: "function f() { do while (0) if (a) {} else y; while(0) }" 266 PASS Valid: "if (a) while (b) if (c) with(d) {} else e; else f" 266 PASS Valid: "if (a) while (b) if (c) with(d) {} else e; else f" with ReferenceError 267 267 PASS Valid: "function f() { if (a) while (b) if (c) with(d) {} else e; else f }" 268 268 PASS Invalid: "break ; break your_limits ; continue ; continue living ; debugger" … … 278 278 PASS Valid: "while (1) break" 279 279 PASS Valid: "function f() { while (1) break }" 280 PASS Valid: "do if (a) with (b) continue; else debugger; while (false)" 280 PASS Valid: "do if (a) with (b) continue; else debugger; while (false)" with ReferenceError 281 281 PASS Valid: "function f() { do if (a) with (b) continue; else debugger; while (false) }" 282 282 PASS Invalid: "do if (a) while (false) else debugger" … … 286 286 PASS Valid: "if (a) function f() {} else function g() {}" 287 287 PASS Valid: "function f() { if (a) function f() {} else function g() {} }" 288 PASS Valid: "if (a()) while(0) function f() {} else function g() {}" 288 PASS Valid: "if (a()) while(0) function f() {} else function g() {}" with TypeError 289 289 PASS Valid: "function f() { if (a()) while(0) function f() {} else function g() {} }" 290 290 PASS Invalid: "if (a()) function f() { else function g() }" … … 294 294 PASS Invalid: "if (a) if (b) ; else function (){}" 295 295 PASS Invalid: "function f() { if (a) if (b) ; else function (){} }" 296 PASS Valid: "throw a" 296 PASS Valid: "throw a" with 32 297 297 PASS Valid: "function f() { throw a }" 298 PASS Valid: "throw a + b in void c" 298 PASS Valid: "throw a + b in void c" with ReferenceError 299 299 PASS Valid: "function f() { throw a + b in void c }" 300 300 PASS Invalid: "throw" … … 321 321 PASS Invalid: "var a = var b" 322 322 PASS Invalid: "function f() { var a = var b }" 323 PASS Valid: "const a = b += c, a, a, a = (b - f())" 323 PASS Valid: "const a = b += c, a, a, a = (b - f())" with ReferenceError 324 324 PASS Valid: "function f() { const a = b += c, a, a, a = (b - f()) }" 325 325 PASS Invalid: "var a %= b | 5" … … 333 333 PASS Invalid: "var var = 3" 334 334 PASS Invalid: "function f() { var var = 3 }" 335 PASS Valid: "var varr = 3 in 1" 335 PASS Valid: "var varr = 3 in 1" with TypeError 336 336 PASS Valid: "function f() { var varr = 3 in 1 }" 337 337 PASS Valid: "const a, a, a = void 7 - typeof 8, a = 8" 338 338 PASS Valid: "function f() { const a, a, a = void 7 - typeof 8, a = 8 }" 339 PASS Valid: "const x_x = 6 /= 7 ? e : f" 339 PASS Valid: "const x_x = 6 /= 7 ? e : f" with ReferenceError 340 340 PASS Valid: "function f() { const x_x = 6 /= 7 ? e : f }" 341 341 PASS Invalid: "var a = ?" … … 345 345 PASS Invalid: "var a = :)" 346 346 PASS Invalid: "function f() { var a = :) }" 347 PASS Valid: "var a = a in b in c instanceof d" 347 PASS Valid: "var a = a in b in c instanceof d" with ReferenceError 348 348 PASS Valid: "function f() { var a = a in b in c instanceof d }" 349 349 PASS Invalid: "var a = b ? c, b" … … 408 408 PASS Valid: "for (var a = b, b = a ; ; ) break" 409 409 PASS Valid: "function f() { for (var a = b, b = a ; ; ) break }" 410 PASS Valid: "for (var a = b, c, d, b = a ; x in b ; ) { break }" 410 PASS Valid: "for (var a = b, c, d, b = a ; x in b ; ) { break }" with ReferenceError 411 411 PASS Valid: "function f() { for (var a = b, c, d, b = a ; x in b ; ) { break } }" 412 PASS Valid: "for (var a = b, c, d ; ; 1 in a()) break" 412 PASS Valid: "for (var a = b, c, d ; ; 1 in a()) break" with ReferenceError 413 413 PASS Valid: "function f() { for (var a = b, c, d ; ; 1 in a()) break }" 414 414 PASS Invalid: "for ( ; var a ; ) break" … … 418 418 PASS Invalid: "for ( %a ; ; ) { }" 419 419 PASS Invalid: "function f() { for ( %a ; ; ) { } }" 420 PASS Valid: "for (a in b) break" 420 PASS Valid: "for (a in b) break" with ReferenceError 421 421 PASS Valid: "function f() { for (a in b) break }" 422 PASS Valid: "for (a() in b) break" 422 PASS Valid: "for (a() in b) break" with ReferenceError 423 423 PASS Valid: "function f() { for (a() in b) break }" 424 PASS Valid: "for (a().l[4] in b) break" 424 PASS Valid: "for (a().l[4] in b) break" with ReferenceError 425 425 PASS Valid: "function f() { for (a().l[4] in b) break }" 426 PASS Valid: "for (new a in b in c in d) break" 426 PASS Valid: "for (new a in b in c in d) break" with ReferenceError 427 427 PASS Valid: "function f() { for (new a in b in c in d) break }" 428 PASS Valid: "for (new new new a in b) break" 428 PASS Valid: "for (new new new a in b) break" with ReferenceError 429 429 PASS Valid: "function f() { for (new new new a in b) break }" 430 430 PASS Invalid: "for (delete new a() in b) break" … … 432 432 PASS Invalid: "for (a * a in b) break" 433 433 PASS Invalid: "function f() { for (a * a in b) break }" 434 PASS Valid: "for ((a * a) in b) break" 434 PASS Valid: "for ((a * a) in b) break" with ReferenceError 435 435 PASS Valid: "function f() { for ((a * a) in b) break }" 436 436 PASS Invalid: "for (a++ in b) break" 437 437 PASS Invalid: "function f() { for (a++ in b) break }" 438 PASS Valid: "for ((a++) in b) break" 438 PASS Valid: "for ((a++) in b) break" with ReferenceError 439 439 PASS Valid: "function f() { for ((a++) in b) break }" 440 440 PASS Invalid: "for (++a in b) break" 441 441 PASS Invalid: "function f() { for (++a in b) break }" 442 PASS Valid: "for ((++a) in b) break" 442 PASS Valid: "for ((++a) in b) break" with ReferenceError 443 443 PASS Valid: "function f() { for ((++a) in b) break }" 444 444 PASS Invalid: "for (a, b in c) break" … … 446 446 PASS Invalid: "for (a,b in c ;;) break" 447 447 PASS Invalid: "function f() { for (a,b in c ;;) break }" 448 PASS Valid: "for (a,(b in c) ;;) break" 448 PASS Valid: "for (a,(b in c) ;;) break" with ReferenceError 449 449 PASS Valid: "function f() { for (a,(b in c) ;;) break }" 450 PASS Valid: "for ((a, b) in c) break" 450 PASS Valid: "for ((a, b) in c) break" with ReferenceError 451 451 PASS Valid: "function f() { for ((a, b) in c) break }" 452 452 PASS Invalid: "for (a ? b : c in c) break" 453 453 PASS Invalid: "function f() { for (a ? b : c in c) break }" 454 PASS Valid: "for ((a ? b : c) in c) break" 454 PASS Valid: "for ((a ? b : c) in c) break" with ReferenceError 455 455 PASS Valid: "function f() { for ((a ? b : c) in c) break }" 456 PASS Valid: "for (var a in b in c) break" 456 PASS Valid: "for (var a in b in c) break" with ReferenceError 457 457 PASS Valid: "function f() { for (var a in b in c) break }" 458 PASS Valid: "for (var a = 5 += 6 in b) break" 458 PASS Valid: "for (var a = 5 += 6 in b) break" with ReferenceError 459 459 PASS Valid: "function f() { for (var a = 5 += 6 in b) break }" 460 PASS Valid: "for (var a = debug('should not be hit') in b) break" 460 PASS Valid: "for (var a = debug('should not be hit') in b) break" with ReferenceError 461 461 PASS Valid: "function f() { for (var a = debug('should not be hit') in b) break }" 462 462 PASS Invalid: "for (var a += 5 in b) break" … … 470 470 PASS Invalid: "for (var a, b = 8 in b) break" 471 471 PASS Invalid: "function f() { for (var a, b = 8 in b) break }" 472 PASS Valid: "for (var a = (b in c) in d) break" 472 PASS Valid: "for (var a = (b in c) in d) break" with ReferenceError 473 473 PASS Valid: "function f() { for (var a = (b in c) in d) break }" 474 474 PASS Invalid: "for (var a = (b in c in d) break" … … 476 476 PASS Invalid: "for (var (a) in b) { }" 477 477 PASS Invalid: "function f() { for (var (a) in b) { } }" 478 PASS Valid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}" 478 PASS Valid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}" with ReferenceError 479 479 PASS Valid: "function f() { for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {} }" 480 480 try statement 481 481 PASS Invalid: "try { break } catch(e) {}" 482 482 PASS Invalid: "function f() { try { break } catch(e) {} }" 483 PASS Valid: "try {} finally { c++ }" 483 PASS Valid: "try {} finally { c++ }" with ReferenceError 484 484 PASS Valid: "function f() { try {} finally { c++ } }" 485 485 PASS Valid: "try { with (x) { } } catch(e) {} finally { if (a) ; }" … … 509 509 PASS Valid: "if (a) try {} finally {} else b;" 510 510 PASS Valid: "function f() { if (a) try {} finally {} else b; }" 511 PASS Valid: "if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}" 511 PASS Valid: "if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}" with ReferenceError 512 512 PASS Valid: "function f() { if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {} }" 513 513 PASS Invalid: "if (a) try {} else b; catch (e) { }" … … 528 528 PASS Invalid: "switch (a) case 3: b;" 529 529 PASS Invalid: "function f() { switch (a) case 3: b; }" 530 PASS Valid: "switch (f()) { case 5 * f(): default: case '6' - 9: ++i }" 530 PASS Valid: "switch (f()) { case 5 * f(): default: case '6' - 9: ++i }" with ReferenceError 531 531 PASS Valid: "function f() { switch (f()) { case 5 * f(): default: case '6' - 9: ++i } }" 532 532 PASS Invalid: "switch (true) { default: case 6: default: }" … … 536 536 PASS Invalid: "switch (l) { case 1: ; a: case 5: }" 537 537 PASS Invalid: "function f() { switch (l) { case 1: ; a: case 5: } }" 538 PASS Valid: "switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f }" 538 PASS Valid: "switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f }" with ReferenceError 539 539 PASS Valid: "function f() { switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f } }" 540 540 PASS Invalid: "switch (g) { case 1: a: }" … … 546 546 PASS Invalid: "switch (g) { case 1:" 547 547 PASS Invalid: "function f() { switch (g) { case 1: }" 548 PASS Valid: "switch (l) { case a = b ? c : d : }" 548 PASS Valid: "switch (l) { case a = b ? c : d : }" with ReferenceError 549 549 PASS Valid: "function f() { switch (l) { case a = b ? c : d : } }" 550 PASS Valid: "switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : }" 550 PASS Valid: "switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : }" with ReferenceError 551 551 PASS Valid: "function f() { switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : } }" 552 552 PASS Invalid: "switch (l) { case b ? c : }" 553 553 PASS Invalid: "function f() { switch (l) { case b ? c : } }" 554 PASS Valid: "switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: }" 554 PASS Valid: "switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: }" with ReferenceError 555 555 PASS Valid: "function f() { switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: } }" 556 556 PASS Invalid: "switch (4 - ) { }" … … 576 576 PASS Valid: "'use strict'; (function __proto__(){})" 577 577 PASS Valid: "function f() { 'use strict'; (function __proto__(){}) }" 578 PASS Valid: "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } f1(5);" 579 PASS Valid: "function f() { 'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } f1(5); }" 580 PASS Valid: "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } f1(5);" 581 PASS Valid: "function f() { 'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } f1(5); }" 582 PASS Invalid: "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } f1(5);" 583 PASS Invalid: "function f() { 'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } f1(5); }" 584 PASS Invalid: "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5);" 585 PASS Invalid: "function f() { 'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5); }" 586 PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" 587 PASS Valid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" 588 PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" 589 PASS Valid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" 590 PASS Invalid: "var str = "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" 591 FAIL Invalid: "function f() { var str = "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" but did not throw 592 PASS Invalid: "var str = "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" 593 FAIL Invalid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" but did not throw 578 594 PASS Valid: "if (0) $foo; " 579 595 PASS Valid: "function f() { if (0) $foo; }" … … 606 622 PASS Invalid: "var a.b;" 607 623 PASS Invalid: "function f() { var a.b; }" 608 PASS Valid: "for (of of of){}" 624 PASS Valid: "for (of of of){}" with ReferenceError 609 625 PASS Valid: "function f() { for (of of of){} }" 610 PASS Valid: "for (of; of; of){}" 626 PASS Valid: "for (of; of; of){}" with ReferenceError 611 627 PASS Valid: "function f() { for (of; of; of){} }" 612 PASS Valid: "for (var of of of){}" 628 PASS Valid: "for (var of of of){}" with TypeError 613 629 PASS Valid: "function f() { for (var of of of){} }" 614 630 PASS Valid: "for (var of; of; of){}" … … 618 634 PASS Invalid: "for (var of[of] of of){}" 619 635 PASS Invalid: "function f() { for (var of[of] of of){} }" 620 PASS Valid: "for (of.of of of){}" 636 PASS Valid: "for (of.of of of){}" with ReferenceError 621 637 PASS Valid: "function f() { for (of.of of of){} }" 622 PASS Valid: "for (of[of] of of){}" 638 PASS Valid: "for (of[of] of of){}" with ReferenceError 623 639 PASS Valid: "function f() { for (of[of] of of){} }" 624 PASS Valid: "for (var [of] of of){}" 640 PASS Valid: "for (var [of] of of){}" with TypeError 625 641 PASS Valid: "function f() { for (var [of] of of){} }" 626 PASS Valid: "for (var {of} of of){}" 642 PASS Valid: "for (var {of} of of){}" with TypeError 627 643 PASS Valid: "function f() { for (var {of} of of){} }" 628 PASS Valid: "for (of in of){}" 644 PASS Valid: "for (of in of){}" with ReferenceError 629 645 PASS Valid: "function f() { for (of in of){} }" 630 646 PASS Valid: "for (var of in of){}" … … 632 648 PASS Invalid: "for (var of.of in of){}" 633 649 PASS Invalid: "function f() { for (var of.of in of){} }" 634 PASS Valid: "for (of.of in of){}" 650 PASS Valid: "for (of.of in of){}" with ReferenceError 635 651 PASS Valid: "function f() { for (of.of in of){} }" 636 PASS Valid: "for (of[of] in of){}" 652 PASS Valid: "for (of[of] in of){}" with ReferenceError 637 653 PASS Valid: "function f() { for (of[of] in of){} }" 638 654 PASS Invalid: "for (var of[of] in of){}" … … 642 658 PASS Valid: "for (var {of} in of){}" 643 659 PASS Valid: "function f() { for (var {of} in of){} }" 644 PASS Valid: "for ([of] in of){}" 660 PASS Valid: "for ([of] in of){}" with ReferenceError 645 661 PASS Valid: "function f() { for ([of] in of){} }" 646 PASS Valid: "for ({of} in of){}" 662 PASS Valid: "for ({of} in of){}" with ReferenceError 647 663 PASS Valid: "function f() { for ({of} in of){} }" 648 664 PASS Invalid: "for (of of of of){}" … … 663 679 PASS Invalid: "function f() { for (var of in){} }" 664 680 spread operator 665 PASS Valid: "foo(...bar)" 681 PASS Valid: "foo(...bar)" with ReferenceError 666 682 PASS Valid: "function f() { foo(...bar) }" 667 PASS Valid: "o.foo(...bar)" 683 PASS Valid: "o.foo(...bar)" with ReferenceError 668 684 PASS Valid: "function f() { o.foo(...bar) }" 669 PASS Valid: "o[foo](...bar)" 685 PASS Valid: "o[foo](...bar)" with ReferenceError 670 686 PASS Valid: "function f() { o[foo](...bar) }" 671 PASS Valid: "new foo(...bar)" 687 PASS Valid: "new foo(...bar)" with ReferenceError 672 688 PASS Valid: "function f() { new foo(...bar) }" 673 PASS Valid: "new o.foo(...bar)" 689 PASS Valid: "new o.foo(...bar)" with ReferenceError 674 690 PASS Valid: "function f() { new o.foo(...bar) }" 675 PASS Valid: "new o[foo](...bar)" 691 PASS Valid: "new o[foo](...bar)" with ReferenceError 676 692 PASS Valid: "function f() { new o[foo](...bar) }" 677 693 PASS Invalid: "foo(...)" … … 699 715 PASS Invalid: "o[foo](...bar, a)" 700 716 PASS Invalid: "function f() { o[foo](...bar, a) }" 701 PASS Valid: "[...bar]" 717 PASS Valid: "[...bar]" with ReferenceError 702 718 PASS Valid: "function f() { [...bar] }" 703 PASS Valid: "[a, ...bar]" 719 PASS Valid: "[a, ...bar]" with ReferenceError 704 720 PASS Valid: "function f() { [a, ...bar] }" 705 PASS Valid: "[...bar, a]" 721 PASS Valid: "[...bar, a]" with ReferenceError 706 722 PASS Valid: "function f() { [...bar, a] }" 707 PASS Valid: "[...bar,,,,]" 723 PASS Valid: "[...bar,,,,]" with ReferenceError 708 724 PASS Valid: "function f() { [...bar,,,,] }" 709 PASS Valid: "[,,,,...bar]" 725 PASS Valid: "[,,,,...bar]" with ReferenceError 710 726 PASS Valid: "function f() { [,,,,...bar] }" 711 PASS Valid: "({1: x})" 727 PASS Valid: "({1: x})" with ReferenceError 712 728 PASS Valid: "function f() { ({1: x}) }" 713 729 PASS Valid: "({1: x}=1)" 714 730 PASS Valid: "function f() { ({1: x}=1) }" 715 PASS Valid: "({1: x}=null)" 731 PASS Valid: "({1: x}=null)" with TypeError 716 732 PASS Valid: "function f() { ({1: x}=null) }" 717 733 PASS Valid: "({1: x})" … … 719 735 PASS Valid: "({1: x}=1)" 720 736 PASS Valid: "function f() { ({1: x}=1) }" 721 PASS Valid: "({1: x}=null)" 737 PASS Valid: "({1: x}=null)" with TypeError 722 738 PASS Valid: "function f() { ({1: x}=null) }" 723 PASS Valid: "({a: b}=null)" 739 PASS Valid: "({a: b}=null)" with TypeError 724 740 PASS Valid: "function f() { ({a: b}=null) }" 725 741 PASS Valid: "'use strict'; ({1: x})" … … 727 743 PASS Valid: "'use strict'; ({1: x}=1)" 728 744 PASS Valid: "function f() { 'use strict'; ({1: x}=1) }" 729 PASS Valid: "'use strict'; ({1: x}=null)" 745 PASS Valid: "'use strict'; ({1: x}=null)" with TypeError 730 746 PASS Valid: "function f() { 'use strict'; ({1: x}=null) }" 731 PASS Valid: "'use strict'; ({a: b}=null)" 747 PASS Valid: "'use strict'; ({a: b}=null)" with TypeError 732 748 PASS Valid: "function f() { 'use strict'; ({a: b}=null) }" 733 749 PASS Valid: "var {1:x}=1" … … 743 759 PASS Valid: "delete ({a:a}=1)" 744 760 PASS Valid: "function f() { delete ({a:a}=1) }" 745 PASS Valid: "({a}=1)()" 761 PASS Valid: "({a}=1)()" with TypeError 746 762 PASS Valid: "function f() { ({a}=1)() }" 747 PASS Valid: "({a:a}=1)()" 763 PASS Valid: "({a:a}=1)()" with TypeError 748 764 PASS Valid: "function f() { ({a:a}=1)() }" 749 PASS Valid: "({a}=1)=1" 765 PASS Valid: "({a}=1)=1" with ReferenceError 750 766 PASS Valid: "function f() { ({a}=1)=1 }" 751 PASS Valid: "({a:a}=1)=1" 767 PASS Valid: "({a:a}=1)=1" with ReferenceError 752 768 PASS Valid: "function f() { ({a:a}=1)=1 }" 753 PASS Valid: "({a}=1=1)" 769 PASS Valid: "({a}=1=1)" with ReferenceError 754 770 PASS Valid: "function f() { ({a}=1=1) }" 755 PASS Valid: "({a:a}=1=1)" 771 PASS Valid: "({a:a}=1=1)" with ReferenceError 756 772 PASS Valid: "function f() { ({a:a}=1=1) }" 757 773 PASS Invalid: "({get [x](){}})" -
trunk/LayoutTests/js/script-tests/parser-syntax-check.js
r166392 r170034 3 3 ); 4 4 5 function runTest(_a, e rrorType)5 function runTest(_a, expectSyntaxError) 6 6 { 7 var success; 7 var error; 8 8 9 if (typeof _a != "string") 9 10 testFailed("runTest expects string argument: " + _a); 10 11 try { 11 12 eval(_a); 12 success = true;13 13 } catch (e) { 14 success = !(e instanceof SyntaxError);14 error = e; 15 15 } 16 if ((!!errorType) == !success) { 17 if (errorType) 16 17 if (expectSyntaxError) { 18 if (error && error instanceof SyntaxError) 18 19 testPassed('Invalid: "' + _a + '"'); 20 else if (error) 21 testFailed('Invalid: "' + _a + '" should throw SyntaxError but got ' + (error.name || error)); 19 22 else 23 testFailed('Invalid: "' + _a + '" but did not throw'); 24 } else { 25 if (!error) 20 26 testPassed('Valid: "' + _a + '"'); 21 } else { 22 if (errorType) 23 testFailed('Invalid: "' + _a + '" should throw ' + errorType.name); 27 else if (!(error instanceof SyntaxError)) 28 testPassed('Valid: "' + _a + '" with ' + (error.name || error)); 24 29 else 25 testFailed('Valid: "' + _a + '" should NOT throw ');30 testFailed('Valid: "' + _a + '" should NOT throw but got ' + (error.name || error)); 26 31 } 27 32 } … … 34 39 } 35 40 36 function invalid(_a , _type)41 function invalid(_a) 37 42 { 38 _type = _type || SyntaxError;39 43 // Test both the grammar and the syntax checker 40 44 runTest(_a, true); … … 366 370 valid("'use strict'; function __proto__(){}") 367 371 valid("'use strict'; (function __proto__(){})") 372 373 valid("'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } f1(5);") 374 valid("'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } f1(5);") 375 invalid("'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } f1(5);") 376 invalid("'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5);") 377 378 valid("var str = \"'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);\"; var foo = new Function(str); foo(5);") 379 valid("var str = \"'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);\"; var foo = new Function(str); foo(5);") 380 invalid("var str = \"'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } return f1(arguments[0]);\"; var foo = new Function(str); foo(5);", SyntaxError, undefined) 381 invalid("var str = \"'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } return f1(arguments[0]);\"; var foo = new Function(str); foo(5);", SyntaxError, undefined) 368 382 369 383 valid("if (0) $foo; ") -
trunk/Source/JavaScriptCore/ChangeLog
r170022 r170034 1 2014-06-16 Mark Lam <mark.lam@apple.com> 2 3 Parser statementDepth accounting needs to account for when a function body excludes its braces. 4 <https://webkit.org/b/133832> 5 6 Reviewed by Oliver Hunt. 7 8 In some cases (e.g. when a Function object is instantiated from a string), the 9 function body source may not include its braces. The parser needs to account 10 for this when calculating its statementDepth. 11 12 * bytecode/UnlinkedCodeBlock.cpp: 13 (JSC::generateFunctionCodeBlock): 14 (JSC::UnlinkedFunctionExecutable::codeBlockFor): 15 * bytecode/UnlinkedCodeBlock.h: 16 * parser/Parser.cpp: 17 (JSC::Parser<LexerType>::parseStatement): 18 - Also fixed the error message for declaring nested functions in strict mode 19 to be more accurate. 20 * parser/Parser.h: 21 (JSC::Parser<LexerType>::parse): 22 (JSC::parse): 23 * runtime/Executable.cpp: 24 (JSC::ScriptExecutable::newCodeBlockFor): 25 1 26 2014-06-16 Juergen Ributzka <juergen@apple.com> 2 27 -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
r169920 r170034 50 50 const ClassInfo UnlinkedFunctionCodeBlock::s_info = { "UnlinkedFunctionCodeBlock", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(UnlinkedFunctionCodeBlock) }; 51 51 52 static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, ParserError& error)53 { 54 RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable->toStrictness(), JSParseFunctionCode, error );52 static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunctionExecutable* executable, const SourceCode& source, CodeSpecializationKind kind, DebuggerMode debuggerMode, ProfilerMode profilerMode, UnlinkedFunctionKind functionKind, bool bodyIncludesBraces, ParserError& error) 53 { 54 RefPtr<FunctionBodyNode> body = parse<FunctionBodyNode>(&vm, source, executable->parameters(), executable->name(), executable->toStrictness(), JSParseFunctionCode, error, 0, bodyIncludesBraces); 55 55 56 56 if (!body) { … … 153 153 } 154 154 155 UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, ParserError& error)155 UnlinkedFunctionCodeBlock* UnlinkedFunctionExecutable::codeBlockFor(VM& vm, const SourceCode& source, CodeSpecializationKind specializationKind, DebuggerMode debuggerMode, ProfilerMode profilerMode, bool bodyIncludesBraces, ParserError& error) 156 156 { 157 157 switch (specializationKind) { … … 166 166 } 167 167 168 UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, error);168 UnlinkedFunctionCodeBlock* result = generateFunctionCodeBlock(vm, this, source, specializationKind, debuggerMode, profilerMode, isBuiltinFunction() ? UnlinkedBuiltinFunction : UnlinkedNormalFunction, bodyIncludesBraces, error); 169 169 170 170 if (error.m_type != ParserError::ErrorNone) -
trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
r169920 r170034 129 129 String paramString() const; 130 130 131 UnlinkedFunctionCodeBlock* codeBlockFor(VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, ParserError&);131 UnlinkedFunctionCodeBlock* codeBlockFor(VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode, bool bodyIncludesBraces, ParserError&); 132 132 133 133 static UnlinkedFunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception); -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r168107 r170034 1127 1127 return parseConstDeclaration(context); 1128 1128 case FUNCTION: 1129 failIfFalseIfStrict(m_statementDepth == 1, " Nested functions cannot be declared in strict mode");1129 failIfFalseIfStrict(m_statementDepth == 1, "Strict mode does not allow function declarations in a lexically nested statement"); 1130 1130 return parseFunctionDeclaration(context); 1131 1131 case SEMICOLON: { -
trunk/Source/JavaScriptCore/parser/Parser.h
r169920 r170034 399 399 400 400 template <class ParsedNode> 401 PassRefPtr<ParsedNode> parse(ParserError& );401 PassRefPtr<ParsedNode> parse(ParserError&, bool needReparsingAdjustment); 402 402 403 403 JSTextPosition positionBeforeLastNewline() const { return m_lexer->positionBeforeLastNewline(); } … … 858 858 template <typename LexerType> 859 859 template <class ParsedNode> 860 PassRefPtr<ParsedNode> Parser<LexerType>::parse(ParserError& error )860 PassRefPtr<ParsedNode> Parser<LexerType>::parse(ParserError& error, bool needReparsingAdjustment) 861 861 { 862 862 int errLine; 863 863 String errMsg; 864 864 865 if (ParsedNode::scopeIsFunction )865 if (ParsedNode::scopeIsFunction && needReparsingAdjustment) 866 866 m_lexer->setIsReparsing(); 867 867 … … 938 938 939 939 template <class ParsedNode> 940 PassRefPtr<ParsedNode> parse(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, ParserError& error, JSTextPosition* positionBeforeLastNewline = 0 )940 PassRefPtr<ParsedNode> parse(VM* vm, const SourceCode& source, FunctionParameters* parameters, const Identifier& name, JSParserStrictness strictness, JSParserMode parserMode, ParserError& error, JSTextPosition* positionBeforeLastNewline = 0, bool needReparsingAdjustment = false) 941 941 { 942 942 SamplingRegion samplingRegion("Parsing"); … … 945 945 if (source.provider()->source().is8Bit()) { 946 946 Parser<Lexer<LChar>> parser(vm, source, parameters, name, strictness, parserMode); 947 RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error );947 RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error, needReparsingAdjustment); 948 948 if (positionBeforeLastNewline) 949 949 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); … … 957 957 } 958 958 Parser<Lexer<UChar>> parser(vm, source, parameters, name, strictness, parserMode); 959 RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error );959 RefPtr<ParsedNode> result = parser.parse<ParsedNode>(error, needReparsingAdjustment); 960 960 if (positionBeforeLastNewline) 961 961 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r168459 r170034 224 224 UnlinkedFunctionCodeBlock* unlinkedCodeBlock = 225 225 executable->m_unlinkedExecutable->codeBlockFor( 226 *vm, executable->m_source, kind, debuggerMode, profilerMode, e rror);226 *vm, executable->m_source, kind, debuggerMode, profilerMode, executable->bodyIncludesBraces(), error); 227 227 recordParse(executable->m_unlinkedExecutable->features(), executable->m_unlinkedExecutable->hasCapturedVariables(), lineNo(), lastLine(), startColumn(), endColumn()); 228 228 if (!unlinkedCodeBlock) {
Note: See TracChangeset
for help on using the changeset viewer.