Browse Source

kernel: small cleanings

Herbert Vojčík 7 years ago
parent
commit
4f2abfee58
2 changed files with 5 additions and 10 deletions
  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;
     }