1/*
2 * reserved comment block
3 * DO NOT REMOVE OR ALTER!
4 */
5/*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements.  See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License.  You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22
23package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
24import com.sun.org.apache.bcel.internal.generic.Instruction;
25
26/**
27 * <p>This pseudo-instruction marks the beginning of a region of byte code that
28 * can be copied into a new method, termed an "outlineable" chunk.  The size of
29 * the Java stack must be the same at the start of the region as it is at the
30 * end of the region, any value on the stack at the start of the region must not
31 * be consumed by an instruction in the region of code, the region must not
32 * contain a return instruction, no branch instruction in the region is
33 * permitted to have a target that is outside the region, and no branch
34 * instruction outside the region is permitted to have a target that is inside
35 * the region.</p>
36 * <p>The end of the region is marked by an {@link OutlineableChunkEnd}
37 * pseudo-instruction.</p>
38 * <p>Such a region of code may contain other outlineable regions.</p>
39 */
40class OutlineableChunkStart extends MarkerInstruction {
41    /**
42     * A constant instance of {@link OutlineableChunkStart}.  As it has no fields,
43     * there should be no need to create an instance of this class.
44     */
45    public static final Instruction OUTLINEABLECHUNKSTART =
46                                                new OutlineableChunkStart();
47
48    /**
49     * Private default constructor.  As it has no fields,
50     * there should be no need to create an instance of this class.  See
51     * {@link OutlineableChunkStart#OUTLINEABLECHUNKSTART}.
52     */
53    private OutlineableChunkStart() {
54    }
55
56    /**
57     * Get the name of this instruction.  Used for debugging.
58     * @return the instruction name
59     */
60    public String getName() {
61        return OutlineableChunkStart.class.getName();
62    }
63
64    /**
65     * Get the name of this instruction.  Used for debugging.
66     * @return the instruction name
67     */
68    public String toString() {
69        return getName();
70    }
71
72    /**
73     * Get the name of this instruction.  Used for debugging.
74     * @return the instruction name
75     */
76    public String toString(boolean verbose) {
77        return getName();
78    }
79}
80