Skip to content

Commit 89c6628

Browse files
author
Michal Medvecky
committed
rm scope qualified names functions and caching
1 parent f628a60 commit 89c6628

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/bytecode_dsl/BytecodeDSLCompiler.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public static class BytecodeDSLCompilerContext {
9898
public final int futureLineNumber;
9999
public final ParserCallbacksImpl errorCallback;
100100
public final ScopeEnvironment scopeEnvironment;
101-
// public final Map<Scope, String> qualifiedNames;
102101

103102
public BytecodeDSLCompilerContext(PythonLanguage language, PythonContext context, ModTy mod, Source source, int optimizationLevel,
104103
EnumSet<FutureFeature> futureFeatures, int futureLineNumber, ParserCallbacksImpl errorCallback, ScopeEnvironment scopeEnvironment) {
@@ -111,7 +110,6 @@ public BytecodeDSLCompilerContext(PythonLanguage language, PythonContext context
111110
this.futureLineNumber = futureLineNumber;
112111
this.errorCallback = errorCallback;
113112
this.scopeEnvironment = scopeEnvironment;
114-
// this.qualifiedNames = new HashMap<>();
115113
}
116114

117115
public String maybeMangle(String privateName, Scope scope, String name) {
@@ -132,43 +130,5 @@ String getClassName(Scope s) {
132130
}
133131
return null;
134132
}
135-
136-
// String getQualifiedName(Scope scope) {
137-
// if (qualifiedNames.containsKey(scope)) {
138-
// return qualifiedNames.get(scope);
139-
// } else {
140-
// String qualifiedName = computeQualifiedName(scope);
141-
// qualifiedNames.put(scope, qualifiedName);
142-
// return qualifiedName;
143-
// }
144-
// }
145-
//
146-
// private String computeQualifiedName(Scope scope) {
147-
// return computeQualifiedName(scope.getName(), scope);
148-
// }
149-
//
150-
// private String computeQualifiedName(String qualifiedName, Scope scope) {
151-
// Scope parentScope = scopeEnvironment.lookupParent(scope);
152-
// if (parentScope != null && parentScope != scopeEnvironment.getTopScope()) {
153-
// if (parentScope.isTypeParam()) {
154-
// parentScope = scopeEnvironment.lookupParent(parentScope);
155-
// if (parentScope == null || scopeEnvironment.lookupParent(parentScope) == null) {
156-
// return qualifiedName;
157-
// }
158-
// }
159-
// if (!((scope.isFunction() || scope.isClass()) && parentScope.getUseOfName(mangle(scope, qualifiedName)).contains(Scope.DefUse.GlobalExplicit))) {
160-
// // Qualify the name, unless it's a function/class and the parent declared the
161-
// // name as a global (in which case the function/class doesn't belong to the
162-
// // parent).
163-
// if (parentScope.isFunction()) {
164-
// qualifiedName = getQualifiedName(parentScope) + ".<locals>." + qualifiedName;
165-
// } else {
166-
// qualifiedName = getQualifiedName(parentScope) + "." + qualifiedName;
167-
// }
168-
// }
169-
// }
170-
//
171-
// return qualifiedName;
172-
// }
173133
}
174134
}

0 commit comments

Comments
 (0)