|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* |
|
3 * Any copyright is dedicated to the Public Domain. |
|
4 * http://creativecommons.org/licenses/publicdomain/ |
|
5 * Contributor: Robert Sayre |
|
6 */ |
|
7 |
|
8 //----------------------------------------------------------------------------- |
|
9 var BUGNUMBER = 455380; |
|
10 var summary = 'Do not assert with JIT: !lhs->isQuad() && !rhs->isQuad()'; |
|
11 var actual = 'No Crash'; |
|
12 var expect = 'No Crash'; |
|
13 |
|
14 printBugNumber(BUGNUMBER); |
|
15 printStatus (summary); |
|
16 |
|
17 jit(true); |
|
18 |
|
19 const IS_TOKEN_ARRAY = |
|
20 [0, 0, 0, 0, 0, 0, 0, 0, // 0 |
|
21 0, 0, 0, 0, 0, 0, 0, 0, // 8 |
|
22 0, 0, 0, 0, 0, 0, 0, 0, // 16 |
|
23 0, 0, 0, 0, 0, 0, 0, 0, // 24 |
|
24 |
|
25 0, 1, 0, 1, 1, 1, 1, 1, // 32 |
|
26 0, 0, 1, 1, 0, 1, 1, 0, // 40 |
|
27 1, 1, 1, 1, 1, 1, 1, 1, // 48 |
|
28 1, 1, 0, 0, 0, 0, 0, 0, // 56 |
|
29 |
|
30 0, 1, 1, 1, 1, 1, 1, 1, // 64 |
|
31 1, 1, 1, 1, 1, 1, 1, 1, // 72 |
|
32 1, 1, 1, 1, 1, 1, 1, 1, // 80 |
|
33 1, 1, 1, 0, 0, 0, 1, 1, // 88 |
|
34 |
|
35 1, 1, 1, 1, 1, 1, 1, 1, // 96 |
|
36 1, 1, 1, 1, 1, 1, 1, 1, // 104 |
|
37 1, 1, 1, 1, 1, 1, 1, 1, // 112 |
|
38 1, 1, 1, 0, 1, 0, 1]; // 120 |
|
39 |
|
40 const headerUtils = { |
|
41 normalizeFieldName: function(fieldName) |
|
42 { |
|
43 if (fieldName == "") |
|
44 throw "error: empty string"; |
|
45 |
|
46 for (var i = 0, sz = fieldName.length; i < sz; i++) |
|
47 { |
|
48 if (!IS_TOKEN_ARRAY[fieldName.charCodeAt(i)]) |
|
49 { |
|
50 throw (fieldName + " is not a valid header field name!"); |
|
51 } |
|
52 } |
|
53 |
|
54 return fieldName.toLowerCase(); |
|
55 } |
|
56 }; |
|
57 |
|
58 headerUtils.normalizeFieldName("Host"); |
|
59 |
|
60 jit(false); |
|
61 |
|
62 reportCompare(expect, actual, summary); |