1 /* |
|
2 * Permission is hereby granted, free of charge, to any person obtaining a copy of |
|
3 * this software and associated documentation files (the "Software"), to deal in |
|
4 * the Software without restriction, including without limitation the rights to |
|
5 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies |
|
6 * of the Software, and to permit persons to whom the Software is furnished to do |
|
7 * so, subject to the following conditions: |
|
8 * |
|
9 * The above copyright notice and this permission notice shall be included in all |
|
10 * copies or substantial portions of the Software. |
|
11 * |
|
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
18 * SOFTWARE. |
|
19 */ |
|
20 package jdk.nashorn.internal.runtime.regexp.joni; |
|
21 |
|
22 import jdk.nashorn.internal.runtime.regexp.joni.ast.AnchorNode; |
|
23 import jdk.nashorn.internal.runtime.regexp.joni.ast.BackRefNode; |
|
24 import jdk.nashorn.internal.runtime.regexp.joni.ast.CClassNode; |
|
25 import jdk.nashorn.internal.runtime.regexp.joni.ast.CTypeNode; |
|
26 import jdk.nashorn.internal.runtime.regexp.joni.ast.CallNode; |
|
27 import jdk.nashorn.internal.runtime.regexp.joni.ast.ConsAltNode; |
|
28 import jdk.nashorn.internal.runtime.regexp.joni.ast.EncloseNode; |
|
29 import jdk.nashorn.internal.runtime.regexp.joni.ast.QuantifierNode; |
|
30 |
|
31 final class AsmCompiler extends AsmCompilerSupport { |
|
32 |
|
33 public AsmCompiler(Analyser analyser) { |
|
34 super(analyser); |
|
35 } |
|
36 |
|
37 @Override |
|
38 protected void prepare() { |
|
39 REG_NUM++; |
|
40 prepareMachine(); |
|
41 prepareMachineInit(); |
|
42 prepareMachineMatch(); |
|
43 |
|
44 prepareFactory(); |
|
45 prepareFactoryInit(); |
|
46 } |
|
47 |
|
48 @Override |
|
49 protected void finish() { |
|
50 setupFactoryInit(); |
|
51 |
|
52 setupMachineInit(); |
|
53 setupMachineMatch(); |
|
54 |
|
55 setupClasses(); |
|
56 } |
|
57 |
|
58 @Override |
|
59 protected void compileAltNode(ConsAltNode node) { |
|
60 } |
|
61 |
|
62 @Override |
|
63 protected void addCompileString(char[] chars, int p, int mbLength, int strLength, boolean ignoreCase) { |
|
64 String template = installTemplate(chars, p, strLength); |
|
65 } |
|
66 |
|
67 @Override |
|
68 protected void compileCClassNode(CClassNode node) { |
|
69 if (node.bs != null) { |
|
70 String bitsetName = installBitSet(node.bs.bits); |
|
71 } |
|
72 } |
|
73 |
|
74 @Override |
|
75 protected void compileCTypeNode(CTypeNode node) { |
|
76 } |
|
77 |
|
78 @Override |
|
79 protected void compileAnyCharNode() { |
|
80 } |
|
81 |
|
82 @Override |
|
83 protected void compileBackrefNode(BackRefNode node) { |
|
84 } |
|
85 |
|
86 @Override |
|
87 protected void compileCallNode(CallNode node) { |
|
88 } |
|
89 |
|
90 @Override |
|
91 protected void compileCECQuantifierNode(QuantifierNode node) { |
|
92 } |
|
93 |
|
94 @Override |
|
95 protected void compileNonCECQuantifierNode(QuantifierNode node) { |
|
96 } |
|
97 |
|
98 @Override |
|
99 protected void compileOptionNode(EncloseNode node) { |
|
100 } |
|
101 |
|
102 @Override |
|
103 protected void compileEncloseNode(EncloseNode node) { |
|
104 } |
|
105 |
|
106 @Override |
|
107 protected void compileAnchorNode(AnchorNode node) { |
|
108 } |
|
109 } |
|