Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-455380.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var gTestfile = 'regress-455380.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 455380;
9 var summary = 'Do not assert with JIT: !lhs->isQuad() && !rhs->isQuad()';
10 var actual = 'No Crash';
11 var expect = 'No Crash';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 jit(true);
17
18 const IS_TOKEN_ARRAY =
19 [0, 0, 0, 0, 0, 0, 0, 0, // 0
20 0, 0, 0, 0, 0, 0, 0, 0, // 8
21 0, 0, 0, 0, 0, 0, 0, 0, // 16
22 0, 0, 0, 0, 0, 0, 0, 0, // 24
23
24 0, 1, 0, 1, 1, 1, 1, 1, // 32
25 0, 0, 1, 1, 0, 1, 1, 0, // 40
26 1, 1, 1, 1, 1, 1, 1, 1, // 48
27 1, 1, 0, 0, 0, 0, 0, 0, // 56
28
29 0, 1, 1, 1, 1, 1, 1, 1, // 64
30 1, 1, 1, 1, 1, 1, 1, 1, // 72
31 1, 1, 1, 1, 1, 1, 1, 1, // 80
32 1, 1, 1, 0, 0, 0, 1, 1, // 88
33
34 1, 1, 1, 1, 1, 1, 1, 1, // 96
35 1, 1, 1, 1, 1, 1, 1, 1, // 104
36 1, 1, 1, 1, 1, 1, 1, 1, // 112
37 1, 1, 1, 0, 1, 0, 1]; // 120
38
39 const headerUtils = {
40 normalizeFieldName: function(fieldName)
41 {
42 if (fieldName == "")
43 throw "error: empty string";
44
45 for (var i = 0, sz = fieldName.length; i < sz; i++)
46 {
47 if (!IS_TOKEN_ARRAY[fieldName.charCodeAt(i)])
48 {
49 throw (fieldName + " is not a valid header field name!");
50 }
51 }
52
53 return fieldName.toLowerCase();
54 }
55 };
56
57 headerUtils.normalizeFieldName("Host");
58
59 jit(false);
60
61 reportCompare(expect, actual, summary);