Explorar el Código

kernel: small cleanings

Herbert Vojčík hace 7 años
padre
commit
4f2abfee58
Se han modificado 2 ficheros con 5 adiciones y 10 borrados
  1. 0 2
      support/kernel-fundamentals.js
  2. 5 8
      support/kernel-runtime.js

+ 0 - 2
support/kernel-fundamentals.js

@@ -195,8 +195,6 @@ define(['./compatibility'], function () {
         var addOrganizationElement = brikz.organize.addOrganizationElement;
         var removeOrganizationElement = brikz.organize.removeOrganizationElement;
         var globals = brikz.smalltalkGlobals.globals;
-        var SmalltalkObject = brikz.root.Object;
-        var coreFns = brikz.root.coreFns;
         var addElement = brikz.arraySet.addElement;
         var removeElement = brikz.arraySet.removeElement;
 

+ 5 - 8
support/kernel-runtime.js

@@ -316,11 +316,9 @@ define(function () {
         var thisContext = null;
 
         st.withContext = function (worker, setup) {
-            if (thisContext) {
-                return inContext(worker, setup);
-            } else {
-                return inContextWithErrorHandling(worker, setup);
-            }
+            return thisContext ?
+                inContext(worker, setup) :
+                inContextWithErrorHandling(worker, setup);
         };
 
         /*
@@ -456,7 +454,7 @@ define(function () {
          an uppercase character (we probably want to answer the function itself in this
          case and send it #new from Amber).
          */
-        function accessJavaScript (self, propertyName, args) {
+        st.accessJavaScript = function accessJavaScript (self, propertyName, args) {
             var propertyValue = self[propertyName];
             if (typeof propertyValue === "function" && !/^[A-Z]/.test(propertyName)) {
                 return propertyValue.apply(self, args || []);
@@ -466,9 +464,8 @@ define(function () {
             } else {
                 return propertyValue;
             }
-        }
+        };
 
-        st.accessJavaScript = accessJavaScript;
         this.messageNotUnderstood = messageNotUnderstood;
     }