aboutsummaryrefslogtreecommitdiff
path: root/buildtools/nasgen
diff options
context:
space:
mode:
authorsundar <none@none>2013-07-26 20:10:47 +0530
committersundar <none@none>2013-07-26 20:10:47 +0530
commit7418552d5ecb8e1659a806b6363f6fff5b026047 (patch)
tree7703f4b0ba0ab5272f3a6a5d6273771702170846 /buildtools/nasgen
parentceeb785e97f5c5b492c34652fb64d2572e636b87 (diff)
downloadnashorn-7418552d5ecb8e1659a806b6363f6fff5b026047.tar.gz
8021571: @fork tests should use VM options passed from project.properties
Reviewed-by: lagergren, hannesw, jlaskey
Diffstat (limited to 'buildtools/nasgen')
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java4
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java3
-rw-r--r--buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java3
3 files changed, 6 insertions, 4 deletions
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
index 3425e9fd..69c28b29 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java
@@ -152,14 +152,14 @@ public class ClassGenerator {
}
static MethodGenerator makeStaticInitializer(final ClassVisitor cv, final String name) {
- final int access = ACC_PUBLIC | ACC_STATIC;
+ final int access = ACC_PUBLIC | ACC_STATIC;
final String desc = DEFAULT_INIT_DESC;
final MethodVisitor mv = cv.visitMethod(access, name, desc, null, null);
return new MethodGenerator(mv, access, name, desc);
}
static MethodGenerator makeConstructor(final ClassVisitor cv) {
- final int access = ACC_PUBLIC;
+ final int access = 0;
final String name = INIT;
final String desc = DEFAULT_INIT_DESC;
final MethodVisitor mv = cv.visitMethod(access, name, desc, null, null);
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
index e90b53ec..7f45eab4 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java
@@ -25,6 +25,7 @@
package jdk.nashorn.internal.tools.nasgen;
+import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
import static jdk.internal.org.objectweb.asm.Opcodes.H_INVOKESTATIC;
@@ -80,7 +81,7 @@ public class ConstructorGenerator extends ClassGenerator {
byte[] getClassBytes() {
// new class extensing from ScriptObject
final String superClass = (constructor != null)? SCRIPTFUNCTIONIMPL_TYPE : SCRIPTOBJECT_TYPE;
- cw.visit(V1_7, ACC_PUBLIC | ACC_SUPER, className, null, superClass, null);
+ cw.visit(V1_7, ACC_FINAL, className, null, superClass, null);
if (memberCount > 0) {
// add fields
emitFields();
diff --git a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
index 98048a29..8bb1de5c 100644
--- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
+++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java
@@ -25,6 +25,7 @@
package jdk.nashorn.internal.tools.nasgen;
+import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
import static jdk.internal.org.objectweb.asm.Opcodes.V1_7;
@@ -60,7 +61,7 @@ public class PrototypeGenerator extends ClassGenerator {
byte[] getClassBytes() {
// new class extensing from ScriptObject
- cw.visit(V1_7, ACC_PUBLIC | ACC_SUPER, className, null, PROTOTYPEOBJECT_TYPE, null);
+ cw.visit(V1_7, ACC_FINAL | ACC_SUPER, className, null, PROTOTYPEOBJECT_TYPE, null);
if (memberCount > 0) {
// add fields
emitFields();