Browse Source

Move to use three-param $core.addClass; part 2.

Forgotten in 2019 when instvar-to-slots kernel reorganization was made.

Use three-part addClass with possible setSlots in .js files.
Herby Vojčík 3 years ago
parent
commit
013a949c51

+ 10 - 6
cli/src/AmberCli.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("AmberCli");
 $pkg.transport = {"type":"amd","amdNamespace":"amber_cli"};
 
-$core.addClass("AmberCli", $globals.Object, [], "AmberCli");
+$core.addClass("AmberCli", $globals.Object, "AmberCli");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmberCli.comment="I am the Amber CLI (CommandLine Interface) tool which runs on Node.js.\x0a\x0aMy responsibility is to start different Amber programs like the FileServer or the Repl.\x0aWhich program to start is determined by the first commandline parameters passed to the AmberCli executable.\x0aUse `help` to get a list of all available options.\x0aAny further commandline parameters are passed to the specific program.\x0a\x0a## Commands\x0a\x0aNew commands can be added by creating a class side method in the `commands` protocol which takes one parameter.\x0aThis parameter is an array of all commandline options + values passed on to the program.\x0aAny `camelCaseCommand` is transformed into a commandline parameter of the form `camel-case-command` and vice versa.";
 //>>excludeEnd("ide");
@@ -352,7 +352,8 @@ return self;
 $globals.AmberCli.a$cls);
 
 
-$core.addClass("BaseFileManipulator", $globals.Object, ["path", "fs"], "AmberCli");
+$core.addClass("BaseFileManipulator", $globals.Object, "AmberCli");
+$core.setSlots($globals.BaseFileManipulator, ["path", "fs"]);
 $core.addMethod(
 $core.method({
 selector: "dirname",
@@ -440,7 +441,7 @@ $globals.BaseFileManipulator);
 
 
 
-$core.addClass("Configurator", $globals.BaseFileManipulator, [], "AmberCli");
+$core.addClass("Configurator", $globals.BaseFileManipulator, "AmberCli");
 $core.addMethod(
 $core.method({
 selector: "initialize",
@@ -535,7 +536,8 @@ $globals.Configurator);
 
 
 
-$core.addClass("FileServer", $globals.BaseFileManipulator, ["http", "url", "host", "port", "basePath", "util", "username", "password", "fallbackPage"], "AmberCli");
+$core.addClass("FileServer", $globals.BaseFileManipulator, "AmberCli");
+$core.setSlots($globals.FileServer, ["http", "url", "host", "port", "basePath", "util", "username", "password", "fallbackPage"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.FileServer.comment="I am the Amber Smalltalk FileServer.\x0aMy runtime requirement is a functional Node.js executable.\x0a\x0aTo start a FileServer instance on port `4000` use the following code:\x0a\x0a    FileServer new start\x0a\x0aA parameterized instance can be created with the following code:\x0a\x0a    FileServer createServerWithArguments: options\x0a\x0aHere, `options` is an array of commandline style strings each followed by a value e.g. `#('--port', '6000', '--host', '0.0.0.0')`.\x0aA list of all available parameters can be printed to the commandline by passing `--help` as parameter.\x0aSee the `Options` section for further details on how options are mapped to instance methods.\x0a\x0aAfter startup FileServer checks if the directory layout required by Amber is present and logs a warning on absence.\x0a\x0a\x0a## Options\x0a\x0aEach option is of the form `--some-option-string` which is transformed into a selector of the format `someOptionString:`.\x0aThe trailing `--` gets removed, each `-[a-z]` gets transformed into the according uppercase letter, and a `:` is appended to create a selector which takes a single argument.\x0aAfterwards, the selector gets executed on the `FileServer` instance with the value following in the options array as parameter.\x0a\x0a## Adding new commandline parameters\x0a\x0aAdding new commandline parameters to `FileServer` is as easy as adding a new single parameter method to the `accessing` protocol.";
 //>>excludeEnd("ide");
@@ -2155,7 +2157,8 @@ return $recv($recv(each)._second())._asUppercase();
 $globals.FileServer.a$cls);
 
 
-$core.addClass("Initer", $globals.BaseFileManipulator, ["childProcess", "nmPath"], "AmberCli");
+$core.addClass("Initer", $globals.BaseFileManipulator, "AmberCli");
+$core.setSlots($globals.Initer, ["childProcess", "nmPath"]);
 $core.addMethod(
 $core.method({
 selector: "finishMessage",
@@ -2412,7 +2415,8 @@ $globals.Initer);
 
 
 
-$core.addClass("Repl", $globals.Object, ["readline", "interface", "util", "session", "resultCount", "commands"], "AmberCli");
+$core.addClass("Repl", $globals.Object, "AmberCli");
+$core.setSlots($globals.Repl, ["readline", "interface", "util", "session", "resultCount", "commands"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Repl.comment="I am a class representing a REPL (Read Evaluate Print Loop) and provide a command line interface to Amber Smalltalk.\x0aOn the prompt you can type Amber statements which will be evaluated after pressing <Enter>.\x0aThe evaluation is comparable with executing a 'DoIt' in a workspace.\x0a\x0aMy runtime requirement is a functional Node.js executable with working Readline support.";
 //>>excludeEnd("ide");

+ 33 - 20
lang/src/Compiler-AST.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-AST");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ASTNode", $globals.DagParentNode, ["parent", "position", "source"], "Compiler-AST");
+$core.addClass("ASTNode", $globals.DagParentNode, "Compiler-AST");
+$core.setSlots($globals.ASTNode, ["parent", "position", "source"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTNode.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file.";
 //>>excludeEnd("ide");
@@ -391,7 +392,8 @@ $globals.ASTNode);
 
 
 
-$core.addClass("ExpressionNode", $globals.ASTNode, ["shouldBeAliased"], "Compiler-AST");
+$core.addClass("ExpressionNode", $globals.ASTNode, "Compiler-AST");
+$core.setSlots($globals.ExpressionNode, ["shouldBeAliased"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExpressionNode.comment="I am the abstract root class for expression nodes.";
 //>>excludeEnd("ide");
@@ -543,7 +545,8 @@ $globals.ExpressionNode);
 
 
 
-$core.addClass("AssignmentNode", $globals.ExpressionNode, ["left", "right"], "Compiler-AST");
+$core.addClass("AssignmentNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.AssignmentNode, ["left", "right"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AssignmentNode.comment="I represent an assignment node.";
 //>>excludeEnd("ide");
@@ -669,7 +672,8 @@ $globals.AssignmentNode);
 
 
 
-$core.addClass("BlockNode", $globals.ExpressionNode, ["parameters", "scope", "sequenceNode"], "Compiler-AST");
+$core.addClass("BlockNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.BlockNode, ["parameters", "scope", "sequenceNode"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BlockNode.comment="I represent an block closure node.";
 //>>excludeEnd("ide");
@@ -844,7 +848,8 @@ $globals.BlockNode);
 
 
 
-$core.addClass("CascadeNode", $globals.ExpressionNode, ["receiver"], "Compiler-AST");
+$core.addClass("CascadeNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.CascadeNode, ["receiver"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.CascadeNode.comment="I represent an cascade node.";
 //>>excludeEnd("ide");
@@ -910,7 +915,7 @@ $globals.CascadeNode);
 
 
 
-$core.addClass("DynamicArrayNode", $globals.ExpressionNode, [], "Compiler-AST");
+$core.addClass("DynamicArrayNode", $globals.ExpressionNode, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DynamicArrayNode.comment="I represent an dynamic array node.";
 //>>excludeEnd("ide");
@@ -939,7 +944,7 @@ $globals.DynamicArrayNode);
 
 
 
-$core.addClass("DynamicDictionaryNode", $globals.ExpressionNode, [], "Compiler-AST");
+$core.addClass("DynamicDictionaryNode", $globals.ExpressionNode, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DynamicDictionaryNode.comment="I represent an dynamic dictionary node.";
 //>>excludeEnd("ide");
@@ -968,7 +973,8 @@ $globals.DynamicDictionaryNode);
 
 
 
-$core.addClass("SendNode", $globals.ExpressionNode, ["selector", "arguments", "receiver", "index", "javaScriptSelector", "argumentSwitcher", "isSideEffect"], "Compiler-AST");
+$core.addClass("SendNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.SendNode, ["selector", "arguments", "receiver", "index", "javaScriptSelector", "argumentSwitcher", "isSideEffect"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SendNode.comment="I represent an message send node.";
 //>>excludeEnd("ide");
@@ -1389,7 +1395,8 @@ $globals.SendNode);
 
 
 
-$core.addClass("ValueNode", $globals.ExpressionNode, ["value"], "Compiler-AST");
+$core.addClass("ValueNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.ValueNode, ["value"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ValueNode.comment="I represent a value node.";
 //>>excludeEnd("ide");
@@ -1478,7 +1485,8 @@ $globals.ValueNode);
 
 
 
-$core.addClass("VariableNode", $globals.ExpressionNode, ["identifier", "assigned", "binding"], "Compiler-AST");
+$core.addClass("VariableNode", $globals.ExpressionNode, "Compiler-AST");
+$core.setSlots($globals.VariableNode, ["identifier", "assigned", "binding"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.VariableNode.comment="I represent an variable node.";
 //>>excludeEnd("ide");
@@ -1835,7 +1843,7 @@ $globals.VariableNode);
 
 
 
-$core.addClass("JSStatementNode", $globals.ASTNode, [], "Compiler-AST");
+$core.addClass("JSStatementNode", $globals.ASTNode, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.JSStatementNode.comment="I represent an JavaScript statement node.";
 //>>excludeEnd("ide");
@@ -1864,7 +1872,8 @@ $globals.JSStatementNode);
 
 
 
-$core.addClass("MethodNode", $globals.ASTNode, ["selector", "arguments", "pragmas", "scope", "classReferences", "sendIndexes", "sequenceNode"], "Compiler-AST");
+$core.addClass("MethodNode", $globals.ASTNode, "Compiler-AST");
+$core.setSlots($globals.MethodNode, ["selector", "arguments", "pragmas", "scope", "classReferences", "sendIndexes", "sequenceNode"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST.";
 //>>excludeEnd("ide");
@@ -2238,7 +2247,8 @@ $globals.MethodNode);
 
 
 
-$core.addClass("ReturnNode", $globals.ASTNode, ["scope", "expression"], "Compiler-AST");
+$core.addClass("ReturnNode", $globals.ASTNode, "Compiler-AST");
+$core.setSlots($globals.ReturnNode, ["scope", "expression"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return.";
 //>>excludeEnd("ide");
@@ -2416,7 +2426,8 @@ $globals.ReturnNode);
 
 
 
-$core.addClass("SequenceNode", $globals.ASTNode, ["temps"], "Compiler-AST");
+$core.addClass("SequenceNode", $globals.ASTNode, "Compiler-AST");
+$core.setSlots($globals.SequenceNode, ["temps"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SequenceNode.comment="I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope).";
 //>>excludeEnd("ide");
@@ -2493,7 +2504,7 @@ $globals.SequenceNode);
 
 
 
-$core.addClass("BlockSequenceNode", $globals.SequenceNode, [], "Compiler-AST");
+$core.addClass("BlockSequenceNode", $globals.SequenceNode, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BlockSequenceNode.comment="I represent an special sequence node for block scopes.";
 //>>excludeEnd("ide");
@@ -2522,7 +2533,8 @@ $globals.BlockSequenceNode);
 
 
 
-$core.addClass("AstPragmator", $globals.Object, ["methodNode"], "Compiler-AST");
+$core.addClass("AstPragmator", $globals.Object, "Compiler-AST");
+$core.setSlots($globals.AstPragmator, ["methodNode"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AstPragmator.comment="I am abstract superclass for pragma-processing transformer.\x0a\x0aMy subclasses should implement messages for each pragma\x0athey process. Pragma processing checks if a message is known\x0ato a class but not to its superclass. IOW, each and only those\x0apragmas are processed which are defined as methods in the subclass.\x0a\x0aThese messages can access sequence node in which\x0aa pragma occurred and its containing method node\x0aas `self sequenceNode` and `self methodNode`.\x0a\x0aSee `EarlyPragmator` for an example.";
 //>>excludeEnd("ide");
@@ -2590,7 +2602,7 @@ $globals.AstPragmator);
 
 
 
-$core.addClass("AstSemanticPragmator", $globals.AstPragmator, [], "Compiler-AST");
+$core.addClass("AstSemanticPragmator", $globals.AstPragmator, "Compiler-AST");
 $core.addMethod(
 $core.method({
 selector: "inlineJS:",
@@ -2638,13 +2650,14 @@ $globals.AstSemanticPragmator);
 
 
 
-$core.addClass("CompilerError", $globals.Error, [], "Compiler-AST");
+$core.addClass("CompilerError", $globals.Error, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.CompilerError.comment="I am the common superclass of all compiling errors.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ParentFakingPathDagVisitor", $globals.PathDagVisitor, ["setParentSelector"], "Compiler-AST");
+$core.addClass("ParentFakingPathDagVisitor", $globals.PathDagVisitor, "Compiler-AST");
+$core.setSlots($globals.ParentFakingPathDagVisitor, ["setParentSelector"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ParentFakingPathDagVisitor.comment="I am base class of `DagNode` visitor.\x0a\x0aI hold the path of ancestors up to actual node\x0ain `self path`.";
 //>>excludeEnd("ide");
@@ -2690,7 +2703,7 @@ $globals.ParentFakingPathDagVisitor);
 
 
 
-$core.addClass("NodeVisitor", $globals.ParentFakingPathDagVisitor, [], "Compiler-AST");
+$core.addClass("NodeVisitor", $globals.ParentFakingPathDagVisitor, "Compiler-AST");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.NodeVisitor.comment="I am the abstract super class of all AST node visitors.";
 //>>excludeEnd("ide");

+ 10 - 7
lang/src/Compiler-Core.js

@@ -9,7 +9,8 @@ $pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber/parser
 //>>excludeEnd("imports");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AbstractCodeGenerator", $globals.Object, ["currentClass", "currentPackage", "source"], "Compiler-Core");
+$core.addClass("AbstractCodeGenerator", $globals.Object, "Compiler-Core");
+$core.setSlots($globals.AbstractCodeGenerator, ["currentClass", "currentPackage", "source"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AbstractCodeGenerator.comment="I am the abstract super class of all code generators and provide their common API.";
 //>>excludeEnd("ide");
@@ -248,7 +249,8 @@ $globals.AbstractCodeGenerator);
 
 
 
-$core.addClass("AstGenerator", $globals.AbstractCodeGenerator, ["transformersDictionary"], "Compiler-Core");
+$core.addClass("AstGenerator", $globals.AbstractCodeGenerator, "Compiler-Core");
+$core.setSlots($globals.AstGenerator, ["transformersDictionary"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AstGenerator.comment="I am a very basic code generator.\x0aI generate semantically augmented abstract syntax tree,\x0aSome initial pragmas (eg. #inlineJS:) are applied to transform the tree.";
 //>>excludeEnd("ide");
@@ -340,7 +342,7 @@ $globals.AstGenerator);
 
 
 
-$core.addClass("CodeGenerator", $globals.AstGenerator, [], "Compiler-Core");
+$core.addClass("CodeGenerator", $globals.AstGenerator, "Compiler-Core");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.CodeGenerator.comment="I am a basic code generator. I generate a valid JavaScript output, but do not perform any inlining.\x0aSee `InliningCodeGenerator` for an optimized JavaScript code generation.";
 //>>excludeEnd("ide");
@@ -490,7 +492,8 @@ $globals.CodeGenerator);
 
 
 
-$core.addClass("Compiler", $globals.Object, ["currentPackage", "codeGeneratorClass", "codeGenerator"], "Compiler-Core");
+$core.addClass("Compiler", $globals.Object, "Compiler-Core");
+$core.setSlots($globals.Compiler, ["currentPackage", "codeGeneratorClass", "codeGenerator"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Compiler.comment="I provide the public interface for compiling Amber source code into JavaScript.\x0a\x0aThe code generator used to produce JavaScript can be plugged with `#codeGeneratorClass`.\x0aThe default code generator is an instance of `InlinedCodeGenerator`";
 //>>excludeEnd("ide");
@@ -1404,13 +1407,13 @@ return self;
 $globals.Compiler.a$cls);
 
 
-$core.addClass("DoIt", $globals.Object, [], "Compiler-Core");
+$core.addClass("DoIt", $globals.Object, "Compiler-Core");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DoIt.comment="`DoIt` is the class used to compile and evaluate expressions. See `Compiler >> evaluateExpression:`.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("Evaluator", $globals.Object, [], "Compiler-Core");
+$core.addClass("Evaluator", $globals.Object, "Compiler-Core");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Evaluator.comment="I evaluate code against a receiver, dispatching #evaluate:on: to the receiver.";
 //>>excludeEnd("ide");
@@ -1508,7 +1511,7 @@ return $recv($self._new())._evaluate_for_(aString,anObject);
 $globals.Evaluator.a$cls);
 
 
-$core.addClass("ParseError", $globals.Error, [], "Compiler-Core");
+$core.addClass("ParseError", $globals.Error, "Compiler-Core");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ParseError.comment="Instance of ParseError are signaled on any parsing error.\x0aSee `Compiler >> #parse:`";
 //>>excludeEnd("ide");

+ 39 - 25
lang/src/Compiler-IR.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-IR");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("IRASTTranslator", $globals.NodeVisitor, ["source", "theClass", "method", "sequence"], "Compiler-IR");
+$core.addClass("IRASTTranslator", $globals.NodeVisitor, "Compiler-IR");
+$core.setSlots($globals.IRASTTranslator, ["source", "theClass", "method", "sequence"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.";
 //>>excludeEnd("ide");
@@ -1017,7 +1018,8 @@ $globals.IRASTTranslator);
 
 
 
-$core.addClass("IRAliasFactory", $globals.Object, ["counter"], "Compiler-IR");
+$core.addClass("IRAliasFactory", $globals.Object, "Compiler-IR");
+$core.setSlots($globals.IRAliasFactory, ["counter"]);
 $core.addMethod(
 $core.method({
 selector: "initialize",
@@ -1080,7 +1082,8 @@ $globals.IRAliasFactory);
 
 
 
-$core.addClass("IRInstruction", $globals.DagParentNode, ["parent"], "Compiler-IR");
+$core.addClass("IRInstruction", $globals.DagParentNode, "Compiler-IR");
+$core.setSlots($globals.IRInstruction, ["parent"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInstruction.comment="I am the abstract root class of the IR (intermediate representation) instructions class hierarchy.\x0aThe IR graph is used to emit JavaScript code using a JSStream.";
 //>>excludeEnd("ide");
@@ -1507,7 +1510,7 @@ return $recv($1)._yourself();
 $globals.IRInstruction.a$cls);
 
 
-$core.addClass("IRAssignment", $globals.IRInstruction, [], "Compiler-IR");
+$core.addClass("IRAssignment", $globals.IRInstruction, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -1579,7 +1582,7 @@ $globals.IRAssignment);
 
 
 
-$core.addClass("IRDynamicArray", $globals.IRInstruction, [], "Compiler-IR");
+$core.addClass("IRDynamicArray", $globals.IRInstruction, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -1605,7 +1608,7 @@ $globals.IRDynamicArray);
 
 
 
-$core.addClass("IRDynamicDictionary", $globals.IRInstruction, [], "Compiler-IR");
+$core.addClass("IRDynamicDictionary", $globals.IRInstruction, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -1631,7 +1634,8 @@ $globals.IRDynamicDictionary);
 
 
 
-$core.addClass("IRScopedInstruction", $globals.IRInstruction, ["scope"], "Compiler-IR");
+$core.addClass("IRScopedInstruction", $globals.IRInstruction, "Compiler-IR");
+$core.setSlots($globals.IRScopedInstruction, ["scope"]);
 $core.addMethod(
 $core.method({
 selector: "scope",
@@ -1671,7 +1675,8 @@ $globals.IRScopedInstruction);
 
 
 
-$core.addClass("IRClosureInstruction", $globals.IRScopedInstruction, ["arguments", "requiresSmalltalkContext"], "Compiler-IR");
+$core.addClass("IRClosureInstruction", $globals.IRScopedInstruction, "Compiler-IR");
+$core.setSlots($globals.IRClosureInstruction, ["arguments", "requiresSmalltalkContext"]);
 $core.addMethod(
 $core.method({
 selector: "arguments",
@@ -1865,7 +1870,7 @@ $globals.IRClosureInstruction);
 
 
 
-$core.addClass("IRClosure", $globals.IRClosureInstruction, [], "Compiler-IR");
+$core.addClass("IRClosure", $globals.IRClosureInstruction, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -1932,7 +1937,8 @@ $globals.IRClosure);
 
 
 
-$core.addClass("IRMethod", $globals.IRClosureInstruction, ["theClass", "source", "compiledSource", "attachments", "selector", "pragmas", "classReferences", "sendIndexes", "internalVariables", "aliasFactory"], "Compiler-IR");
+$core.addClass("IRMethod", $globals.IRClosureInstruction, "Compiler-IR");
+$core.setSlots($globals.IRMethod, ["theClass", "source", "compiledSource", "attachments", "selector", "pragmas", "classReferences", "sendIndexes", "internalVariables", "aliasFactory"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRMethod.comment="I am a method instruction";
 //>>excludeEnd("ide");
@@ -2417,7 +2423,7 @@ $globals.IRMethod);
 
 
 
-$core.addClass("IRReturn", $globals.IRScopedInstruction, [], "Compiler-IR");
+$core.addClass("IRReturn", $globals.IRScopedInstruction, "Compiler-IR");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRReturn.comment="I am a local return instruction.";
 //>>excludeEnd("ide");
@@ -2516,7 +2522,7 @@ $globals.IRReturn);
 
 
 
-$core.addClass("IRBlockReturn", $globals.IRReturn, [], "Compiler-IR");
+$core.addClass("IRBlockReturn", $globals.IRReturn, "Compiler-IR");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRBlockReturn.comment="Smalltalk blocks return their last statement. I am a implicit block return instruction.";
 //>>excludeEnd("ide");
@@ -2545,7 +2551,7 @@ $globals.IRBlockReturn);
 
 
 
-$core.addClass("IRNonLocalReturn", $globals.IRReturn, [], "Compiler-IR");
+$core.addClass("IRNonLocalReturn", $globals.IRReturn, "Compiler-IR");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRNonLocalReturn.comment="I am a non local return instruction.\x0aNon local returns are handled using a try/catch JavaScript statement.\x0a\x0aSee `IRNonLocalReturnHandling` class.";
 //>>excludeEnd("ide");
@@ -2574,7 +2580,8 @@ $globals.IRNonLocalReturn);
 
 
 
-$core.addClass("IRTempDeclaration", $globals.IRScopedInstruction, ["name"], "Compiler-IR");
+$core.addClass("IRTempDeclaration", $globals.IRScopedInstruction, "Compiler-IR");
+$core.setSlots($globals.IRTempDeclaration, ["name"]);
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -2655,7 +2662,8 @@ $globals.IRTempDeclaration);
 
 
 
-$core.addClass("IRSend", $globals.IRInstruction, ["selector", "javaScriptSelector", "argumentSwitcher", "index"], "Compiler-IR");
+$core.addClass("IRSend", $globals.IRInstruction, "Compiler-IR");
+$core.setSlots($globals.IRSend, ["selector", "javaScriptSelector", "argumentSwitcher", "index"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRSend.comment="I am a message send instruction.";
 //>>excludeEnd("ide");
@@ -2908,7 +2916,7 @@ $globals.IRSend);
 
 
 
-$core.addClass("IRSequence", $globals.IRInstruction, [], "Compiler-IR");
+$core.addClass("IRSequence", $globals.IRInstruction, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -2952,7 +2960,7 @@ $globals.IRSequence);
 
 
 
-$core.addClass("IRBlockSequence", $globals.IRSequence, [], "Compiler-IR");
+$core.addClass("IRBlockSequence", $globals.IRSequence, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -2978,7 +2986,8 @@ $globals.IRBlockSequence);
 
 
 
-$core.addClass("IRValue", $globals.IRInstruction, ["value"], "Compiler-IR");
+$core.addClass("IRValue", $globals.IRInstruction, "Compiler-IR");
+$core.setSlots($globals.IRValue, ["value"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRValue.comment="I am the simplest possible instruction. I represent a value.";
 //>>excludeEnd("ide");
@@ -3062,7 +3071,8 @@ $globals.IRValue);
 
 
 
-$core.addClass("IRVariable", $globals.IRInstruction, ["variable"], "Compiler-IR");
+$core.addClass("IRVariable", $globals.IRInstruction, "Compiler-IR");
+$core.setSlots($globals.IRVariable, ["variable"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRVariable.comment="I am a variable instruction.";
 //>>excludeEnd("ide");
@@ -3222,7 +3232,8 @@ $globals.IRVariable);
 
 
 
-$core.addClass("IRVerbatim", $globals.IRInstruction, ["source"], "Compiler-IR");
+$core.addClass("IRVerbatim", $globals.IRInstruction, "Compiler-IR");
+$core.setSlots($globals.IRVerbatim, ["source"]);
 $core.addMethod(
 $core.method({
 selector: "acceptDagVisitor:",
@@ -3285,7 +3296,8 @@ $globals.IRVerbatim);
 
 
 
-$core.addClass("IRPragmator", $globals.Object, ["irMethod"], "Compiler-IR");
+$core.addClass("IRPragmator", $globals.Object, "Compiler-IR");
+$core.setSlots($globals.IRPragmator, ["irMethod"]);
 $core.addMethod(
 $core.method({
 selector: "irMethod",
@@ -3350,7 +3362,7 @@ $globals.IRPragmator);
 
 
 
-$core.addClass("IRLatePragmator", $globals.IRPragmator, [], "Compiler-IR");
+$core.addClass("IRLatePragmator", $globals.IRPragmator, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "jsOverride:",
@@ -3482,7 +3494,7 @@ $globals.IRLatePragmator);
 
 
 
-$core.addClass("IRVisitor", $globals.ParentFakingPathDagVisitor, [], "Compiler-IR");
+$core.addClass("IRVisitor", $globals.ParentFakingPathDagVisitor, "Compiler-IR");
 $core.addMethod(
 $core.method({
 selector: "visitDagNode:",
@@ -3876,7 +3888,8 @@ $globals.IRVisitor);
 
 
 
-$core.addClass("IRJSTranslator", $globals.IRVisitor, ["stream", "currentClass"], "Compiler-IR");
+$core.addClass("IRJSTranslator", $globals.IRVisitor, "Compiler-IR");
+$core.setSlots($globals.IRJSTranslator, ["stream", "currentClass"]);
 $core.addMethod(
 $core.method({
 selector: "contents",
@@ -4859,7 +4872,8 @@ $globals.IRJSTranslator);
 
 
 
-$core.addClass("JSStream", $globals.Object, ["stream", "omitSemicolon"], "Compiler-IR");
+$core.addClass("JSStream", $globals.Object, "Compiler-IR");
+$core.setSlots($globals.JSStream, ["stream", "omitSemicolon"]);
 $core.addMethod(
 $core.method({
 selector: "contents",

+ 18 - 16
lang/src/Compiler-Inlining.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-Inlining");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ASTPreInliner", $globals.NodeVisitor, [], "Compiler-Inlining");
+$core.addClass("ASTPreInliner", $globals.NodeVisitor, "Compiler-Inlining");
 $core.addMethod(
 $core.method({
 selector: "visitSendNode:",
@@ -65,7 +65,7 @@ $globals.ASTPreInliner);
 
 
 
-$core.addClass("IRInlinedClosure", $globals.IRClosure, [], "Compiler-Inlining");
+$core.addClass("IRInlinedClosure", $globals.IRClosure, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedClosure.comment="I represent an inlined closure instruction.";
 //>>excludeEnd("ide");
@@ -113,7 +113,7 @@ $globals.IRInlinedClosure);
 
 
 
-$core.addClass("IRInlinedSend", $globals.IRSend, [], "Compiler-Inlining");
+$core.addClass("IRInlinedSend", $globals.IRSend, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedSend.comment="I am the abstract super class of inlined message send instructions.";
 //>>excludeEnd("ide");
@@ -179,7 +179,7 @@ $globals.IRInlinedSend);
 
 
 
-$core.addClass("IRInlinedIfFalse", $globals.IRInlinedSend, [], "Compiler-Inlining");
+$core.addClass("IRInlinedIfFalse", $globals.IRInlinedSend, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedIfFalse.comment="I represent an inlined `#ifFalse:` message send instruction.";
 //>>excludeEnd("ide");
@@ -209,7 +209,7 @@ $globals.IRInlinedIfFalse);
 
 
 
-$core.addClass("IRInlinedIfNilIfNotNil", $globals.IRInlinedSend, [], "Compiler-Inlining");
+$core.addClass("IRInlinedIfNilIfNotNil", $globals.IRInlinedSend, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedIfNilIfNotNil.comment="I represent an inlined `#ifNil:ifNotNil:` message send instruction.";
 //>>excludeEnd("ide");
@@ -239,7 +239,7 @@ $globals.IRInlinedIfNilIfNotNil);
 
 
 
-$core.addClass("IRInlinedIfTrue", $globals.IRInlinedSend, [], "Compiler-Inlining");
+$core.addClass("IRInlinedIfTrue", $globals.IRInlinedSend, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedIfTrue.comment="I represent an inlined `#ifTrue:` message send instruction.";
 //>>excludeEnd("ide");
@@ -269,7 +269,7 @@ $globals.IRInlinedIfTrue);
 
 
 
-$core.addClass("IRInlinedIfTrueIfFalse", $globals.IRInlinedSend, [], "Compiler-Inlining");
+$core.addClass("IRInlinedIfTrueIfFalse", $globals.IRInlinedSend, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedIfTrueIfFalse.comment="I represent an inlined `#ifTrue:ifFalse:` message send instruction.";
 //>>excludeEnd("ide");
@@ -299,7 +299,7 @@ $globals.IRInlinedIfTrueIfFalse);
 
 
 
-$core.addClass("IRInlinedSequence", $globals.IRBlockSequence, [], "Compiler-Inlining");
+$core.addClass("IRInlinedSequence", $globals.IRBlockSequence, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInlinedSequence.comment="I represent a (block) sequence inside an inlined closure instruction (instance of `IRInlinedClosure`).";
 //>>excludeEnd("ide");
@@ -347,7 +347,7 @@ $globals.IRInlinedSequence);
 
 
 
-$core.addClass("IRInliner", $globals.IRVisitor, [], "Compiler-Inlining");
+$core.addClass("IRInliner", $globals.IRVisitor, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInliner.comment="I visit an IR tree, inlining message sends and block closures.\x0a\x0aMessage selectors that can be inlined are answered by `IRSendInliner >> #inlinedSelectors`";
 //>>excludeEnd("ide");
@@ -746,7 +746,7 @@ $globals.IRInliner);
 
 
 
-$core.addClass("IRInliningJSTranslator", $globals.IRJSTranslator, [], "Compiler-Inlining");
+$core.addClass("IRInliningJSTranslator", $globals.IRJSTranslator, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRInliningJSTranslator.comment="I am a specialized JavaScript translator able to write inlined IR instructions to JavaScript stream (`JSStream` instance).";
 //>>excludeEnd("ide");
@@ -1078,7 +1078,8 @@ $globals.IRInliningJSTranslator);
 
 
 
-$core.addClass("IRSendInliner", $globals.Object, ["send", "translator"], "Compiler-Inlining");
+$core.addClass("IRSendInliner", $globals.Object, "Compiler-Inlining");
+$core.setSlots($globals.IRSendInliner, ["send", "translator"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRSendInliner.comment="I inline some message sends and block closure arguments. I heavily rely on #perform: to dispatch inlining methods.";
 //>>excludeEnd("ide");
@@ -2079,7 +2080,8 @@ return false;
 $globals.IRSendInliner.a$cls);
 
 
-$core.addClass("IRAssignmentInliner", $globals.IRSendInliner, ["target"], "Compiler-Inlining");
+$core.addClass("IRAssignmentInliner", $globals.IRSendInliner, "Compiler-Inlining");
+$core.setSlots($globals.IRAssignmentInliner, ["target"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRAssignmentInliner.comment="I inline message sends together with assignments by moving them around into the inline closure instructions.\x0a\x0a##Example\x0a\x0a\x09foo\x0a\x09\x09| a |\x0a\x09\x09a := true ifTrue: [ 1 ]\x0a\x0aWill produce:\x0a\x0a\x09if($core.assert(true) {\x0a\x09\x09a = 1;\x0a\x09};";
 //>>excludeEnd("ide");
@@ -2193,7 +2195,7 @@ $globals.IRAssignmentInliner);
 
 
 
-$core.addClass("IRNonLocalReturnInliner", $globals.IRSendInliner, [], "Compiler-Inlining");
+$core.addClass("IRNonLocalReturnInliner", $globals.IRSendInliner, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRNonLocalReturnInliner.comment="I inline message sends with inlined closure together with a return instruction.";
 //>>excludeEnd("ide");
@@ -2264,7 +2266,7 @@ $globals.IRNonLocalReturnInliner);
 
 
 
-$core.addClass("IRReturnInliner", $globals.IRSendInliner, [], "Compiler-Inlining");
+$core.addClass("IRReturnInliner", $globals.IRSendInliner, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRReturnInliner.comment="I inline message sends with inlined closure together with a return instruction.";
 //>>excludeEnd("ide");
@@ -2335,7 +2337,7 @@ $globals.IRReturnInliner);
 
 
 
-$core.addClass("InliningCodeGenerator", $globals.CodeGenerator, [], "Compiler-Inlining");
+$core.addClass("InliningCodeGenerator", $globals.CodeGenerator, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InliningCodeGenerator.comment="I am a specialized code generator that uses inlining to produce more optimized JavaScript output";
 //>>excludeEnd("ide");
@@ -2455,7 +2457,7 @@ $globals.InliningCodeGenerator);
 
 
 
-$core.addClass("InliningError", $globals.SemanticError, [], "Compiler-Inlining");
+$core.addClass("InliningError", $globals.SemanticError, "Compiler-Inlining");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InliningError.comment="Instances of InliningError are signaled when using an `InliningCodeGenerator`in a `Compiler`.";
 //>>excludeEnd("ide");

+ 17 - 9
lang/src/Compiler-Interpreter.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-Interpreter");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AIBlockClosure", $globals.BlockClosure, ["node", "outerContext"], "Compiler-Interpreter");
+$core.addClass("AIBlockClosure", $globals.BlockClosure, "Compiler-Interpreter");
+$core.setSlots($globals.AIBlockClosure, ["node", "outerContext"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AIBlockClosure.comment="I am a special `BlockClosure` subclass used by an interpreter to interpret a block node.\x0a\x0aWhile I am polymorphic with `BlockClosure`, some methods such as `#new` will raise interpretation errors. Unlike a `BlockClosure`, my instance are not JavaScript functions.\x0a\x0aEvaluating an instance will result in interpreting the `node` instance variable (instance of `BlockNode`).";
 //>>excludeEnd("ide");
@@ -328,7 +329,8 @@ return $recv($1)._yourself();
 $globals.AIBlockClosure.a$cls);
 
 
-$core.addClass("AIContext", $globals.Object, ["outerContext", "innerContext", "pc", "locals", "selector", "index", "sendIndexes", "evaluatedSelector", "ast", "interpreter", "supercall"], "Compiler-Interpreter");
+$core.addClass("AIContext", $globals.Object, "Compiler-Interpreter");
+$core.setSlots($globals.AIContext, ["outerContext", "innerContext", "pc", "locals", "selector", "index", "sendIndexes", "evaluatedSelector", "ast", "interpreter", "supercall"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AIContext.comment="I am like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, my instances are not read-only.\x0a\x0aWhen debugging, my instances are created by copying the current `MethodContext` (thisContext)";
 //>>excludeEnd("ide");
@@ -1498,7 +1500,8 @@ return $recv($1)._yourself();
 $globals.AIContext.a$cls);
 
 
-$core.addClass("AISemanticAnalyzer", $globals.SemanticAnalyzer, ["context"], "Compiler-Interpreter");
+$core.addClass("AISemanticAnalyzer", $globals.SemanticAnalyzer, "Compiler-Interpreter");
+$core.setSlots($globals.AISemanticAnalyzer, ["context"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AISemanticAnalyzer.comment="I perform the same semantic analysis than `SemanticAnalyzer`, with the difference that provided an `AIContext` context, variables are bound with the context variables.";
 //>>excludeEnd("ide");
@@ -1586,7 +1589,8 @@ $globals.AISemanticAnalyzer);
 
 
 
-$core.addClass("ASTContextVar", $globals.ScopeVar, ["context"], "Compiler-Interpreter");
+$core.addClass("ASTContextVar", $globals.ScopeVar, "Compiler-Interpreter");
+$core.setSlots($globals.ASTContextVar, ["context"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTContextVar.comment="I am a variable defined in a `context`.";
 //>>excludeEnd("ide");
@@ -1629,7 +1633,8 @@ $globals.ASTContextVar);
 
 
 
-$core.addClass("ASTDebugger", $globals.Object, ["interpreter", "context", "result"], "Compiler-Interpreter");
+$core.addClass("ASTDebugger", $globals.Object, "Compiler-Interpreter");
+$core.setSlots($globals.ASTDebugger, ["interpreter", "context", "result"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTDebugger.comment="I am a stepping debugger interface for Amber code.\x0aI internally use an instance of `ASTInterpreter` to actually step through node and interpret them.\x0a\x0aMy instances are created from an `AIContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0a## API\x0a\x0aUse the methods of the `'stepping'` protocol to do stepping.";
 //>>excludeEnd("ide");
@@ -2027,7 +2032,8 @@ return $recv($1)._yourself();
 $globals.ASTDebugger.a$cls);
 
 
-$core.addClass("ASTEnterNode", $globals.NodeVisitor, ["interpreter"], "Compiler-Interpreter");
+$core.addClass("ASTEnterNode", $globals.NodeVisitor, "Compiler-Interpreter");
+$core.setSlots($globals.ASTEnterNode, ["interpreter"]);
 $core.addMethod(
 $core.method({
 selector: "interpreter",
@@ -2185,7 +2191,8 @@ return $recv($1)._yourself();
 $globals.ASTEnterNode.a$cls);
 
 
-$core.addClass("ASTInterpreter", $globals.NodeVisitor, ["node", "context", "stack", "returnValue", "returned", "forceAtEnd"], "Compiler-Interpreter");
+$core.addClass("ASTInterpreter", $globals.NodeVisitor, "Compiler-Interpreter");
+$core.setSlots($globals.ASTInterpreter, ["node", "context", "stack", "returnValue", "returned", "forceAtEnd"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTInterpreter.comment="I visit an AST, interpreting (evaluating) nodes one after the other, using a small stack machine.\x0a\x0a## API\x0a\x0aWhile my instances should be used from within an `ASTDebugger`, which provides a more high level interface,\x0ayou can use methods from the `interpreting` protocol:\x0a\x0a- `#step` evaluates the current `node` only\x0a- `#stepOver` evaluates the AST from the current `node` up to the next stepping node (most likely the next send node)\x0a- `#proceed` evaluates eagerly the AST\x0a- `#restart` select the first node of the AST\x0a- `#skip` skips the current node, moving to the next one if any";
 //>>excludeEnd("ide");
@@ -3489,13 +3496,14 @@ $globals.ASTInterpreter);
 
 
 
-$core.addClass("ASTInterpreterError", $globals.Error, [], "Compiler-Interpreter");
+$core.addClass("ASTInterpreterError", $globals.Error, "Compiler-Interpreter");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTInterpreterError.comment="I get signaled when an AST interpreter is unable to interpret a node.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ASTPCNodeVisitor", $globals.NodeVisitor, ["index", "trackedIndex", "selector", "currentNode"], "Compiler-Interpreter");
+$core.addClass("ASTPCNodeVisitor", $globals.NodeVisitor, "Compiler-Interpreter");
+$core.setSlots($globals.ASTPCNodeVisitor, ["index", "trackedIndex", "selector", "currentNode"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ASTPCNodeVisitor.comment="I visit an AST until I get to the current node for the `context` and answer it.\x0a\x0a## API\x0a\x0aMy instances must be filled with a context object using `#context:`.\x0a\x0aAfter visiting the AST the current node is answered by `#currentNode`";
 //>>excludeEnd("ide");

+ 27 - 19
lang/src/Compiler-Semantic.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-Semantic");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("JSSuperSendVisitor", $globals.NodeVisitor, ["selector", "arguments", "property", "args"], "Compiler-Semantic");
+$core.addClass("JSSuperSendVisitor", $globals.NodeVisitor, "Compiler-Semantic");
+$core.setSlots($globals.JSSuperSendVisitor, ["selector", "arguments", "property", "args"]);
 $core.addMethod(
 $core.method({
 selector: "args",
@@ -286,7 +287,8 @@ $globals.JSSuperSendVisitor);
 
 
 
-$core.addClass("LexicalScope", $globals.Object, ["node", "instruction", "temps", "args", "outerScope", "blockIndex"], "Compiler-Semantic");
+$core.addClass("LexicalScope", $globals.Object, "Compiler-Semantic");
+$core.setSlots($globals.LexicalScope, ["node", "instruction", "temps", "args", "outerScope", "blockIndex"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.LexicalScope.comment="I represent a lexical scope where variable names are associated with ScopeVars\x0aInstances are used for block scopes. Method scopes are instances of MethodLexicalScope.\x0a\x0aI am attached to a ScopeVar and method/block nodes.\x0aEach context (method/closure) get a fresh scope that inherits from its outer scope.";
 //>>excludeEnd("ide");
@@ -911,7 +913,8 @@ $globals.LexicalScope);
 
 
 
-$core.addClass("MethodLexicalScope", $globals.LexicalScope, ["iVars", "pseudoVars", "localReturn", "nonLocalReturns"], "Compiler-Semantic");
+$core.addClass("MethodLexicalScope", $globals.LexicalScope, "Compiler-Semantic");
+$core.setSlots($globals.MethodLexicalScope, ["iVars", "pseudoVars", "localReturn", "nonLocalReturns"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodLexicalScope.comment="I represent a method scope.";
 //>>excludeEnd("ide");
@@ -1317,7 +1320,8 @@ $globals.MethodLexicalScope);
 
 
 
-$core.addClass("ScopeVar", $globals.Object, ["scope", "name"], "Compiler-Semantic");
+$core.addClass("ScopeVar", $globals.Object, "Compiler-Semantic");
+$core.setSlots($globals.ScopeVar, ["scope", "name"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ScopeVar.comment="I am an entry in a LexicalScope that gets associated with variable nodes of the same name.\x0aThere are 4 different subclasses of vars: temp vars, local vars, args, and unknown/global vars.";
 //>>excludeEnd("ide");
@@ -1524,7 +1528,7 @@ return $recv($1)._yourself();
 $globals.ScopeVar.a$cls);
 
 
-$core.addClass("AliasVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("AliasVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AliasVar.comment="I am an internally defined variable by the compiler";
 //>>excludeEnd("ide");
@@ -1572,7 +1576,7 @@ $globals.AliasVar);
 
 
 
-$core.addClass("ArgVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("ArgVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ArgVar.comment="I am an argument of a method or block.";
 //>>excludeEnd("ide");
@@ -1596,7 +1600,7 @@ $globals.ArgVar);
 
 
 
-$core.addClass("ClassRefVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("ClassRefVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassRefVar.comment="I am an class reference variable";
 //>>excludeEnd("ide");
@@ -1625,13 +1629,13 @@ $globals.ClassRefVar);
 
 
 
-$core.addClass("ExternallyKnownVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("ExternallyKnownVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExternallyKnownVar.comment="I am a variable known externally (not in method scope).";
 //>>excludeEnd("ide");
 
 
-$core.addClass("InstanceVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("InstanceVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InstanceVar.comment="I am an instance variable of a method or block.";
 //>>excludeEnd("ide");
@@ -1678,7 +1682,7 @@ $globals.InstanceVar);
 
 
 
-$core.addClass("PseudoVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("PseudoVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PseudoVar.comment="I am an pseudo variable.\x0a\x0aThe five Smalltalk pseudo variables are: 'self', 'super', 'nil', 'true' and 'false'";
 //>>excludeEnd("ide");
@@ -1825,7 +1829,7 @@ return $1;
 $globals.PseudoVar.a$cls);
 
 
-$core.addClass("SuperVar", $globals.PseudoVar, [], "Compiler-Semantic");
+$core.addClass("SuperVar", $globals.PseudoVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SuperVar.comment="I am a 'super' pseudo variable.";
 //>>excludeEnd("ide");
@@ -1867,7 +1871,7 @@ $globals.SuperVar);
 
 
 
-$core.addClass("JavaScriptSuperVar", $globals.SuperVar, [], "Compiler-Semantic");
+$core.addClass("JavaScriptSuperVar", $globals.SuperVar, "Compiler-Semantic");
 $core.addMethod(
 $core.method({
 selector: "lookupAsJavaScriptSource",
@@ -1888,7 +1892,7 @@ $globals.JavaScriptSuperVar);
 
 
 
-$core.addClass("ThisContextVar", $globals.PseudoVar, [], "Compiler-Semantic");
+$core.addClass("ThisContextVar", $globals.PseudoVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ThisContextVar.comment="I am a 'thisContext' pseudo variable.";
 //>>excludeEnd("ide");
@@ -1912,7 +1916,7 @@ $globals.ThisContextVar);
 
 
 
-$core.addClass("TempVar", $globals.ScopeVar, [], "Compiler-Semantic");
+$core.addClass("TempVar", $globals.ScopeVar, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TempVar.comment="I am an temporary variable of a method or block.";
 //>>excludeEnd("ide");
@@ -1936,7 +1940,8 @@ $globals.TempVar);
 
 
 
-$core.addClass("SemanticAnalyzer", $globals.NodeVisitor, ["currentScope", "blockIndex", "thePackage", "theClass", "classReferences", "messageSends"], "Compiler-Semantic");
+$core.addClass("SemanticAnalyzer", $globals.NodeVisitor, "Compiler-Semantic");
+$core.setSlots($globals.SemanticAnalyzer, ["currentScope", "blockIndex", "thePackage", "theClass", "classReferences", "messageSends"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SemanticAnalyzer.comment="I semantically analyze the abstract syntax tree and annotate it with informations such as non local returns and variable scopes.";
 //>>excludeEnd("ide");
@@ -2821,13 +2826,14 @@ return $recv($1)._yourself();
 $globals.SemanticAnalyzer.a$cls);
 
 
-$core.addClass("SemanticError", $globals.CompilerError, [], "Compiler-Semantic");
+$core.addClass("SemanticError", $globals.CompilerError, "Compiler-Semantic");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SemanticError.comment="I represent an abstract semantic error thrown by the SemanticAnalyzer.\x0aSemantic errors can be unknown variable errors, etc.\x0aSee my subclasses for concrete errors.\x0a\x0aThe IDE should catch instances of Semantic error to deal with them when compiling";
 //>>excludeEnd("ide");
 
 
-$core.addClass("InvalidAssignmentError", $globals.SemanticError, ["variableName"], "Compiler-Semantic");
+$core.addClass("InvalidAssignmentError", $globals.SemanticError, "Compiler-Semantic");
+$core.setSlots($globals.InvalidAssignmentError, ["variableName"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.InvalidAssignmentError.comment="I get signaled when a pseudo variable gets assigned.";
 //>>excludeEnd("ide");
@@ -2893,7 +2899,8 @@ $globals.InvalidAssignmentError);
 
 
 
-$core.addClass("ShadowingVariableError", $globals.SemanticError, ["variableName"], "Compiler-Semantic");
+$core.addClass("ShadowingVariableError", $globals.SemanticError, "Compiler-Semantic");
+$core.setSlots($globals.ShadowingVariableError, ["variableName"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ShadowingVariableError.comment="I get signaled when a variable in a block or method scope shadows a variable of the same name in an outer scope.";
 //>>excludeEnd("ide");
@@ -2963,7 +2970,8 @@ $globals.ShadowingVariableError);
 
 
 
-$core.addClass("UnknownVariableError", $globals.SemanticError, ["variableName"], "Compiler-Semantic");
+$core.addClass("UnknownVariableError", $globals.SemanticError, "Compiler-Semantic");
+$core.setSlots($globals.UnknownVariableError, ["variableName"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.UnknownVariableError.comment="I get signaled when a variable is not defined.\x0aThe default behavior is to allow it, as this is how Amber currently is able to seamlessly send messages to JavaScript objects.";
 //>>excludeEnd("ide");

+ 23 - 19
lang/src/Compiler-Tests.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Compiler-Tests");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ASTMethodRunningTest", $globals.TestCase, ["receiver", "arguments"], "Compiler-Tests");
+$core.addClass("ASTMethodRunningTest", $globals.TestCase, "Compiler-Tests");
+$core.setSlots($globals.ASTMethodRunningTest, ["receiver", "arguments"]);
 $core.addMethod(
 $core.method({
 selector: "arguments",
@@ -190,7 +191,7 @@ $globals.ASTMethodRunningTest);
 
 
 
-$core.addClass("AbstractCompilerTest", $globals.ASTMethodRunningTest, [], "Compiler-Tests");
+$core.addClass("AbstractCompilerTest", $globals.ASTMethodRunningTest, "Compiler-Tests");
 $core.addMethod(
 $core.method({
 selector: "testAfterInliningNonLocalBlockReturnIndexSend",
@@ -1842,19 +1843,20 @@ return $recv([$self._name()
 $globals.AbstractCompilerTest.a$cls);
 
 
-$core.addClass("ASTDebuggerTest", $globals.AbstractCompilerTest, [], "Compiler-Tests");
+$core.addClass("ASTDebuggerTest", $globals.AbstractCompilerTest, "Compiler-Tests");
 
 
-$core.addClass("ASTInterpreterTest", $globals.AbstractCompilerTest, [], "Compiler-Tests");
+$core.addClass("ASTInterpreterTest", $globals.AbstractCompilerTest, "Compiler-Tests");
 
 
-$core.addClass("CodeGeneratorTest", $globals.AbstractCompilerTest, [], "Compiler-Tests");
+$core.addClass("CodeGeneratorTest", $globals.AbstractCompilerTest, "Compiler-Tests");
 
 
-$core.addClass("InliningCodeGeneratorTest", $globals.AbstractCompilerTest, [], "Compiler-Tests");
+$core.addClass("InliningCodeGeneratorTest", $globals.AbstractCompilerTest, "Compiler-Tests");
 
 
-$core.addClass("AbstractJavaScriptGatewayTest", $globals.ASTMethodRunningTest, ["theClass"], "Compiler-Tests");
+$core.addClass("AbstractJavaScriptGatewayTest", $globals.ASTMethodRunningTest, "Compiler-Tests");
+$core.setSlots($globals.AbstractJavaScriptGatewayTest, ["theClass"]);
 $core.addMethod(
 $core.method({
 selector: "jsConstructor",
@@ -2172,19 +2174,19 @@ return $recv([$self._name()
 $globals.AbstractJavaScriptGatewayTest.a$cls);
 
 
-$core.addClass("DebuggedJSGTest", $globals.AbstractJavaScriptGatewayTest, [], "Compiler-Tests");
+$core.addClass("DebuggedJSGTest", $globals.AbstractJavaScriptGatewayTest, "Compiler-Tests");
 
 
-$core.addClass("InlinedJSGTest", $globals.AbstractJavaScriptGatewayTest, [], "Compiler-Tests");
+$core.addClass("InlinedJSGTest", $globals.AbstractJavaScriptGatewayTest, "Compiler-Tests");
 
 
-$core.addClass("InterpretedJSGTest", $globals.AbstractJavaScriptGatewayTest, [], "Compiler-Tests");
+$core.addClass("InterpretedJSGTest", $globals.AbstractJavaScriptGatewayTest, "Compiler-Tests");
 
 
-$core.addClass("PlainJSGTest", $globals.AbstractJavaScriptGatewayTest, [], "Compiler-Tests");
+$core.addClass("PlainJSGTest", $globals.AbstractJavaScriptGatewayTest, "Compiler-Tests");
 
 
-$core.addClass("ASTPCNodeVisitorTest", $globals.TestCase, [], "Compiler-Tests");
+$core.addClass("ASTPCNodeVisitorTest", $globals.TestCase, "Compiler-Tests");
 $core.addMethod(
 $core.method({
 selector: "astPCNodeVisitor",
@@ -2456,7 +2458,7 @@ $globals.ASTPCNodeVisitorTest);
 
 
 
-$core.addClass("ASTPositionTest", $globals.TestCase, [], "Compiler-Tests");
+$core.addClass("ASTPositionTest", $globals.TestCase, "Compiler-Tests");
 $core.addMethod(
 $core.method({
 selector: "testNodeAtPosition",
@@ -2534,7 +2536,8 @@ $globals.ASTPositionTest);
 
 
 
-$core.addClass("AbstractCodeGeneratorInstallTest", $globals.TestCase, ["receiver"], "Compiler-Tests");
+$core.addClass("AbstractCodeGeneratorInstallTest", $globals.TestCase, "Compiler-Tests");
+$core.setSlots($globals.AbstractCodeGeneratorInstallTest, ["receiver"]);
 $core.addMethod(
 $core.method({
 selector: "receiver",
@@ -3363,13 +3366,13 @@ return $recv([$self._name()
 $globals.AbstractCodeGeneratorInstallTest.a$cls);
 
 
-$core.addClass("CodeGeneratorInstallTest", $globals.AbstractCodeGeneratorInstallTest, [], "Compiler-Tests");
+$core.addClass("CodeGeneratorInstallTest", $globals.AbstractCodeGeneratorInstallTest, "Compiler-Tests");
 
 
-$core.addClass("InliningCodeGeneratorInstallTest", $globals.AbstractCodeGeneratorInstallTest, [], "Compiler-Tests");
+$core.addClass("InliningCodeGeneratorInstallTest", $globals.AbstractCodeGeneratorInstallTest, "Compiler-Tests");
 
 
-$core.addClass("ScopeVarTest", $globals.TestCase, [], "Compiler-Tests");
+$core.addClass("ScopeVarTest", $globals.TestCase, "Compiler-Tests");
 $core.addMethod(
 $core.method({
 selector: "testClassRefVar",
@@ -3656,7 +3659,8 @@ $globals.ScopeVarTest);
 
 
 
-$core.addClass("SemanticAnalyzerTest", $globals.TestCase, ["analyzer"], "Compiler-Tests");
+$core.addClass("SemanticAnalyzerTest", $globals.TestCase, "Compiler-Tests");
+$core.setSlots($globals.SemanticAnalyzerTest, ["analyzer"]);
 $core.addMethod(
 $core.method({
 selector: "setUp",
@@ -4329,7 +4333,7 @@ $globals.SemanticAnalyzerTest);
 
 
 
-$core.addClass("AISemanticAnalyzerTest", $globals.SemanticAnalyzerTest, [], "Compiler-Tests");
+$core.addClass("AISemanticAnalyzerTest", $globals.SemanticAnalyzerTest, "Compiler-Tests");
 $core.addMethod(
 $core.method({
 selector: "setUp",

+ 37 - 26
lang/src/Kernel-Announcements.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Announcements");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AnnouncementSubscription", $globals.Object, ["valuable", "announcementClass"], "Kernel-Announcements");
+$core.addClass("AnnouncementSubscription", $globals.Object, "Kernel-Announcements");
+$core.setSlots($globals.AnnouncementSubscription, ["valuable", "announcementClass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AnnouncementSubscription.comment="I am a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible.";
 //>>excludeEnd("ide");
@@ -160,7 +161,8 @@ $globals.AnnouncementSubscription);
 
 
 
-$core.addClass("AnnouncementValuable", $globals.Object, ["valuable", "receiver"], "Kernel-Announcements");
+$core.addClass("AnnouncementValuable", $globals.Object, "Kernel-Announcements");
+$core.setSlots($globals.AnnouncementValuable, ["valuable", "receiver"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AnnouncementValuable.comment="I wrap `valuable` objects (typically instances of `BlockClosure`) with a `receiver` to be able to unregister subscriptions based on a `receiver`.";
 //>>excludeEnd("ide");
@@ -286,7 +288,8 @@ $globals.AnnouncementValuable);
 
 
 
-$core.addClass("Announcer", $globals.Object, ["registry", "subscriptions"], "Kernel-Announcements");
+$core.addClass("Announcer", $globals.Object, "Kernel-Announcements");
+$core.setSlots($globals.Announcer, ["registry", "subscriptions"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Announcer.comment="I hold annoncement subscriptions (instances of `AnnouncementSubscription`) in a private registry.\x0aI announce (trigger) announces, which are then dispatched to all subscriptions.\x0a\x0aThe code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0a\x0a## API\x0a\x0aUse `#announce:` to trigger an announcement.\x0a\x0aUse `#on:do:` or `#on:send:to:` to register subscriptions.\x0a\x0aWhen using `#on:send:to:`, unregistration can be done with `#unregister:`.\x0a\x0a## Usage example:\x0a\x0a    SystemAnnouncer current\x0a        on: ClassAdded\x0a        do: [ :ann | window alert: ann theClass name, ' added' ].";
 //>>excludeEnd("ide");
@@ -536,7 +539,7 @@ $globals.Announcer);
 
 
 
-$core.addClass("SystemAnnouncer", $globals.Announcer, [], "Kernel-Announcements");
+$core.addClass("SystemAnnouncer", $globals.Announcer, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SystemAnnouncer.comment="My unique instance is the global announcer handling all Amber system-related announces.\x0a\x0a## API\x0a\x0aAccess to the unique instance is done via `#current`";
 //>>excludeEnd("ide");
@@ -605,7 +608,7 @@ return self;
 $globals.SystemAnnouncer.a$cls);
 
 
-$core.addClass("SystemAnnouncement", $globals.Object, [], "Kernel-Announcements");
+$core.addClass("SystemAnnouncement", $globals.Object, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SystemAnnouncement.comment="I am the superclass of all system announcements";
 //>>excludeEnd("ide");
@@ -629,7 +632,8 @@ return "announcement";
 $globals.SystemAnnouncement.a$cls);
 
 
-$core.addClass("ClassAnnouncement", $globals.SystemAnnouncement, ["theClass"], "Kernel-Announcements");
+$core.addClass("ClassAnnouncement", $globals.SystemAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.ClassAnnouncement, ["theClass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassAnnouncement.comment="I am the abstract superclass of class-related announcements.";
 //>>excludeEnd("ide");
@@ -672,25 +676,26 @@ $globals.ClassAnnouncement);
 
 
 
-$core.addClass("ClassAdded", $globals.ClassAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ClassAdded", $globals.ClassAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ClassCommentChanged", $globals.ClassAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ClassCommentChanged", $globals.ClassAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ClassDefinitionChanged", $globals.ClassAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ClassDefinitionChanged", $globals.ClassAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassDefinitionChanged.comment="I am emitted when the definition of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ClassMigrated", $globals.ClassAnnouncement, ["oldClass"], "Kernel-Announcements");
+$core.addClass("ClassMigrated", $globals.ClassAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.ClassMigrated, ["oldClass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassMigrated.comment="I am emitted when a class is migrated.";
 //>>excludeEnd("ide");
@@ -733,7 +738,8 @@ $globals.ClassMigrated);
 
 
 
-$core.addClass("ClassMoved", $globals.ClassAnnouncement, ["oldPackage"], "Kernel-Announcements");
+$core.addClass("ClassMoved", $globals.ClassAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.ClassMoved, ["oldPackage"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassMoved.comment="I am emitted when a class is moved from one package to another.";
 //>>excludeEnd("ide");
@@ -776,19 +782,20 @@ $globals.ClassMoved);
 
 
 
-$core.addClass("ClassRemoved", $globals.ClassAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ClassRemoved", $globals.ClassAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ClassRenamed", $globals.ClassAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ClassRenamed", $globals.ClassAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:";
 //>>excludeEnd("ide");
 
 
-$core.addClass("MethodAnnouncement", $globals.SystemAnnouncement, ["method"], "Kernel-Announcements");
+$core.addClass("MethodAnnouncement", $globals.SystemAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.MethodAnnouncement, ["method"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodAnnouncement.comment="I am the abstract superclass of method-related announcements.";
 //>>excludeEnd("ide");
@@ -831,13 +838,14 @@ $globals.MethodAnnouncement);
 
 
 
-$core.addClass("MethodAdded", $globals.MethodAnnouncement, [], "Kernel-Announcements");
+$core.addClass("MethodAdded", $globals.MethodAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodAdded.comment="I am emitted when a `CompiledMethod` is added to a class.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("MethodModified", $globals.MethodAnnouncement, ["oldMethod"], "Kernel-Announcements");
+$core.addClass("MethodModified", $globals.MethodAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.MethodModified, ["oldMethod"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodModified.comment="I am emitted when a `CompiledMethod` is modified (a new method is installed). I hold a reference to the old method being replaced.";
 //>>excludeEnd("ide");
@@ -880,7 +888,8 @@ $globals.MethodModified);
 
 
 
-$core.addClass("MethodMoved", $globals.MethodAnnouncement, ["oldProtocol"], "Kernel-Announcements");
+$core.addClass("MethodMoved", $globals.MethodAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.MethodMoved, ["oldProtocol"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodMoved.comment="I am emitted when a `CompiledMethod` is moved to another protocol. I hold a refernce to the old protocol of the method.";
 //>>excludeEnd("ide");
@@ -923,13 +932,14 @@ $globals.MethodMoved);
 
 
 
-$core.addClass("MethodRemoved", $globals.MethodAnnouncement, [], "Kernel-Announcements");
+$core.addClass("MethodRemoved", $globals.MethodAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodRemoved.comment="I am emitted when a `CompiledMethod` is removed from a class.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("PackageAnnouncement", $globals.SystemAnnouncement, ["package"], "Kernel-Announcements");
+$core.addClass("PackageAnnouncement", $globals.SystemAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.PackageAnnouncement, ["package"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageAnnouncement.comment="I am the abstract superclass of package-related announcements.";
 //>>excludeEnd("ide");
@@ -972,31 +982,32 @@ $globals.PackageAnnouncement);
 
 
 
-$core.addClass("PackageAdded", $globals.PackageAnnouncement, [], "Kernel-Announcements");
+$core.addClass("PackageAdded", $globals.PackageAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageAdded.comment="I am emitted when a `Package` is added to the system.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("PackageClean", $globals.PackageAnnouncement, [], "Kernel-Announcements");
+$core.addClass("PackageClean", $globals.PackageAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageClean.comment="I am emitted when a package is committed and becomes clean.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("PackageDirty", $globals.PackageAnnouncement, [], "Kernel-Announcements");
+$core.addClass("PackageDirty", $globals.PackageAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageDirty.comment="I am emitted when a package becomes dirty.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("PackageRemoved", $globals.PackageAnnouncement, [], "Kernel-Announcements");
+$core.addClass("PackageRemoved", $globals.PackageAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageRemoved.comment="I am emitted when a `Package` is removed from the system.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ProtocolAnnouncement", $globals.SystemAnnouncement, ["theClass", "protocol"], "Kernel-Announcements");
+$core.addClass("ProtocolAnnouncement", $globals.SystemAnnouncement, "Kernel-Announcements");
+$core.setSlots($globals.ProtocolAnnouncement, ["theClass", "protocol"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolAnnouncement.comment="I am the abstract superclass of protocol-related announcements.";
 //>>excludeEnd("ide");
@@ -1107,13 +1118,13 @@ $globals.ProtocolAnnouncement);
 
 
 
-$core.addClass("ProtocolAdded", $globals.ProtocolAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ProtocolAdded", $globals.ProtocolAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolAdded.comment="I am emitted when a protocol is added to a class.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("ProtocolRemoved", $globals.ProtocolAnnouncement, [], "Kernel-Announcements");
+$core.addClass("ProtocolRemoved", $globals.ProtocolAnnouncement, "Kernel-Announcements");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class.";
 //>>excludeEnd("ide");

+ 11 - 6
lang/src/Kernel-Classes.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Classes");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("Behavior", $globals.Object, ["organization", "slots", "fn", "superclass"], "Kernel-Classes");
+$core.addClass("Behavior", $globals.Object, "Kernel-Classes");
+$core.setSlots($globals.Behavior, ["organization", "slots", "fn", "superclass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Behavior.comment="I am the superclass of all class objects.\x0a\x0aIn addition to BehaviorBody, I define superclass/subclass relationships and instantiation.\x0a\x0aI define the protocol for creating instances of a class with `#basicNew` and `#new` (see `boot.js` for class constructors details).\x0a\x0aMy instances know about the subclass/superclass relationships between classes and contain the description that instances are created from.\x0a\x0aI also provide iterating over the class hierarchy.";
 //>>excludeEnd("ide");
@@ -783,7 +784,8 @@ $globals.Behavior);
 
 
 
-$core.addClass("Class", $globals.Behavior, ["package", "subclasses"], "Kernel-Classes");
+$core.addClass("Class", $globals.Behavior, "Kernel-Classes");
+$core.setSlots($globals.Class, ["package", "subclasses"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Class.comment="I am __the__ class object.\x0a\x0aMy instances are the classes of the system.\x0aClass creation is done throught a `ClassBuilder` instance.";
 //>>excludeEnd("ide");
@@ -1065,7 +1067,8 @@ $globals.Class);
 
 
 
-$core.addClass("Metaclass", $globals.Behavior, ["instanceClass"], "Kernel-Classes");
+$core.addClass("Metaclass", $globals.Behavior, "Kernel-Classes");
+$core.setSlots($globals.Metaclass, ["instanceClass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Metaclass.comment="I am the root of the class hierarchy.\x0a\x0aMy instances are metaclasses, one for each real class, and have a single instance, which they hold onto: the class that they are the metaclass of.";
 //>>excludeEnd("ide");
@@ -1395,7 +1398,7 @@ $globals.Metaclass);
 
 
 
-$core.addClass("ClassBuilder", $globals.Object, [], "Kernel-Classes");
+$core.addClass("ClassBuilder", $globals.Object, "Kernel-Classes");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassBuilder.comment="I am responsible for compiling new classes or modifying existing classes in the system.\x0a\x0aRather than using me directly to compile a class, use `Class >> subclass:instanceVariableNames:package:`.";
 //>>excludeEnd("ide");
@@ -3566,7 +3569,8 @@ return self;
 $globals.TMasterBehavior);
 
 
-$core.addClass("Trait", $globals.Object, ["organization", "package", "traitUsers"], "Kernel-Classes");
+$core.addClass("Trait", $globals.Object, "Kernel-Classes");
+$core.setSlots($globals.Trait, ["organization", "package", "traitUsers"]);
 $core.addMethod(
 $core.method({
 selector: "-",
@@ -3904,7 +3908,8 @@ return trait;
 $globals.Trait.a$cls);
 
 
-$core.addClass("TraitTransformation", $globals.Object, ["trait", "aliases", "exclusions"], "Kernel-Classes");
+$core.addClass("TraitTransformation", $globals.Object, "Kernel-Classes");
+$core.setSlots($globals.TraitTransformation, ["trait", "aliases", "exclusions"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TraitTransformation.comment="I am a single step in trait composition.\x0a\x0aI represent one trait including its aliases and exclusions.";
 //>>excludeEnd("ide");

+ 22 - 16
lang/src/Kernel-Collections.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Collections");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("Association", $globals.Object, ["key", "value"], "Kernel-Collections");
+$core.addClass("Association", $globals.Object, "Kernel-Collections");
+$core.setSlots($globals.Association, ["key", "value"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Association.comment="I represent a pair of associated objects, a key and a value. My instances can serve as entries in a dictionary.\x0a\x0aInstances can be created with the class-side method `#key:value:`";
 //>>excludeEnd("ide");
@@ -191,7 +192,8 @@ return $recv($1)._yourself();
 $globals.Association.a$cls);
 
 
-$core.addClass("BucketStore", $globals.Object, ["buckets", "hashBlock"], "Kernel-Collections");
+$core.addClass("BucketStore", $globals.Object, "Kernel-Collections");
+$core.setSlots($globals.BucketStore, ["buckets", "hashBlock"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BucketStore.comment="I am an helper class for hash-based stores.\x0a\x0aI hold buckets which are selected by a hash, specified using `#hashBlock:`.\x0aThe hash can be any object, and\x0ait is used as a JS property (that is, in ES5\x0aits toString() value counts).\x0a\x0a## API\x0aI maintain a list of buckets. Client code can use this API:\x0a - `#bucketOfElement:` (to ask a bucket for element, I can return JS null if n/a)\x0a - `#do:` (to enumerate all elements of all buckets)\x0a - `#removeAll` (to remove all buckets)\x0a\x0aClient code itself should add/remove elements\x0ain a bucket. The `nil` object should not be put into any bucket.\x0a\x0aTypes of buckets are the responsibility of subclasses via `#newBucket`.";
 //>>excludeEnd("ide");
@@ -382,7 +384,7 @@ return $recv($1)._yourself();
 $globals.BucketStore.a$cls);
 
 
-$core.addClass("ArrayBucketStore", $globals.BucketStore, [], "Kernel-Collections");
+$core.addClass("ArrayBucketStore", $globals.BucketStore, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ArrayBucketStore.comment="I am a concrete `BucketStore` with buckets being instance of `Array`.";
 //>>excludeEnd("ide");
@@ -406,7 +408,7 @@ $globals.ArrayBucketStore);
 
 
 
-$core.addClass("Collection", $globals.Object, [], "Kernel-Collections");
+$core.addClass("Collection", $globals.Object, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Collection.comment="I am the abstract superclass of all classes that represent a group of elements.\x0a\x0aI provide a set of useful methods to the Collection hierarchy such as enumerating and converting methods.";
 //>>excludeEnd("ide");
@@ -1918,7 +1920,7 @@ return $recv($1)._yourself();
 $globals.Collection.a$cls);
 
 
-$core.addClass("AssociativeCollection", $globals.Collection, [], "Kernel-Collections");
+$core.addClass("AssociativeCollection", $globals.Collection, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AssociativeCollection.comment="I am a base class for object-indexed collections (Dictionary et.al.).";
 //>>excludeEnd("ide");
@@ -3088,7 +3090,8 @@ return newCollection;
 $globals.AssociativeCollection.a$cls);
 
 
-$core.addClass("Dictionary", $globals.AssociativeCollection, ["keys", "values"], "Kernel-Collections");
+$core.addClass("Dictionary", $globals.AssociativeCollection, "Kernel-Collections");
+$core.setSlots($globals.Dictionary, ["keys", "values"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Dictionary.comment="I represent a set of elements that can be viewed from one of two perspectives: a set of associations,\x0aor a container of values that are externally named where the name can be any object that responds to `=`.\x0a\x0aThe external name is referred to as the key.";
 //>>excludeEnd("ide");
@@ -3450,7 +3453,7 @@ $globals.Dictionary);
 
 
 
-$core.addClass("HashedCollection", $globals.AssociativeCollection, [], "Kernel-Collections");
+$core.addClass("HashedCollection", $globals.AssociativeCollection, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.HashedCollection.comment="I am a traditional JavaScript object, or a Smalltalk `Dictionary`.\x0a\x0aUnlike a `Dictionary`, I can only have strings as keys.";
 //>>excludeEnd("ide");
@@ -3735,7 +3738,7 @@ $globals.HashedCollection);
 
 
 
-$core.addClass("SequenceableCollection", $globals.Collection, [], "Kernel-Collections");
+$core.addClass("SequenceableCollection", $globals.Collection, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SequenceableCollection.comment="I am an IndexableCollection\x0awith numeric indexes starting with 1.";
 //>>excludeEnd("ide");
@@ -4519,7 +4522,7 @@ return $recv(stream)._contents();
 $globals.SequenceableCollection.a$cls);
 
 
-$core.addClass("Array", $globals.SequenceableCollection, [], "Kernel-Collections");
+$core.addClass("Array", $globals.SequenceableCollection, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Array.comment="I represent a collection of objects ordered by the collector. The size of arrays is dynamic.\x0a\x0aI am directly mapped to JavaScript Number.\x0a\x0a*Note* In Amber, `OrderedCollection` is an alias for `Array`.";
 //>>excludeEnd("ide");
@@ -5323,7 +5326,7 @@ return instance;
 $globals.Array.a$cls);
 
 
-$core.addClass("String", $globals.SequenceableCollection, [], "Kernel-Collections");
+$core.addClass("String", $globals.SequenceableCollection, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.String.comment="I am an indexed collection of Characters. Unlike most Smalltalk dialects, Amber doesn't provide the Character class. Instead, elements of a String are single character strings.\x0a\x0aString inherits many useful methods from its hierarchy, such as\x0a\x09`Collection >> #,`";
 //>>excludeEnd("ide");
@@ -7645,7 +7648,8 @@ return self;
 $globals.String.a$cls);
 
 
-$core.addClass("Set", $globals.Collection, ["defaultBucket", "slowBucketStores", "fastBuckets", "size"], "Kernel-Collections");
+$core.addClass("Set", $globals.Collection, "Kernel-Collections");
+$core.setSlots($globals.Set, ["defaultBucket", "slowBucketStores", "fastBuckets", "size"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Set.comment="I represent an unordered set of objects without duplicates.\x0a\x0a## Implementation notes\x0a\x0aI put elements into different stores based on their type.\x0aThe goal is to store some elements into native JS object property names to be fast.\x0a\x0aIf an unboxed element has typeof 'string', 'boolean' or 'number', or an element is nil, null or undefined,\x0aI store it as a property name in an empty (== Object.create(null)) JS object, different for each type\x0a(for simplicity, nil/null/undefined is treated as one and included with the two booleans).\x0a\x0aIf element happen to be an object, I try to store them in `ArrayBucketStore`. I have two of them by default,\x0aone hashed using the Smalltalk class name, the other one using the JS constructor name. It is possible to have more or less\x0ainstances of `ArrayBucketStores`, see `#initializeSlowBucketStores`.\x0a\x0aAs a last resort, if none of the `ArrayBucketStore` instances can find a suitable bucket, the `defaultBucket` is used,\x0awhich is an `Array`.";
 //>>excludeEnd("ide");
@@ -8347,7 +8351,7 @@ $globals.Set);
 
 
 
-$core.addClass("ProtoStream", $globals.Object, [], "Kernel-Collections");
+$core.addClass("ProtoStream", $globals.Object, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtoStream.comment="I am the abstract base for different accessor for a sequence of objects. This sequence is referred to as my \x22contents\x22.\x0aMy instances are read/write streams modifying the contents.";
 //>>excludeEnd("ide");
@@ -8797,7 +8801,8 @@ return $recv($1)._yourself();
 $globals.ProtoStream.a$cls);
 
 
-$core.addClass("Stream", $globals.ProtoStream, ["collection", "position", "streamSize"], "Kernel-Collections");
+$core.addClass("Stream", $globals.ProtoStream, "Kernel-Collections");
+$core.setSlots($globals.Stream, ["collection", "position", "streamSize"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Stream.comment="I represent an accessor for a sequence of objects. This sequence is referred to as my \x22contents\x22.\x0aMy instances are read/write streams to the contents sequence collection.";
 //>>excludeEnd("ide");
@@ -9328,7 +9333,7 @@ return $recv($1)._yourself();
 $globals.Stream.a$cls);
 
 
-$core.addClass("StringStream", $globals.Stream, [], "Kernel-Collections");
+$core.addClass("StringStream", $globals.Stream, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.StringStream.comment="I am a Stream specific to `String` objects.";
 //>>excludeEnd("ide");
@@ -9684,7 +9689,8 @@ $globals.StringStream);
 
 
 
-$core.addClass("Queue", $globals.Object, ["read", "readIndex", "write"], "Kernel-Collections");
+$core.addClass("Queue", $globals.Object, "Kernel-Collections");
+$core.setSlots($globals.Queue, ["read", "readIndex", "write"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Queue.comment="I am a one-sided queue.\x0a\x0a## Usage\x0a\x0aUse `#nextPut:` to add items to the queue.\x0aUse `#next` or `#nextIfAbsent:` to get (and remove) the next item in the queue.\x0a\x0a## Implementation notes\x0a\x0aA Queue uses two OrderedCollections inside,\x0a`read` is at the front, is not modified and only read using `readIndex`.\x0a`write` is at the back and is appended new items.\x0aWhen `read` is exhausted, `write` is promoted to `read` and new `write` is created.\x0a\x0aAs a consequence, no data moving is done by me, write appending may do data moving\x0awhen growing `write`, but this is left to engine to implement as good as it chooses to.";
 //>>excludeEnd("ide");
@@ -9840,7 +9846,7 @@ $globals.Queue);
 
 
 
-$core.addClass("RegularExpression", $globals.Object, [], "Kernel-Collections");
+$core.addClass("RegularExpression", $globals.Object, "Kernel-Collections");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.RegularExpression.comment="I represent a regular expression object. My instances are JavaScript `RegExp` object.";
 //>>excludeEnd("ide");

+ 7 - 5
lang/src/Kernel-Dag.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Dag");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AbstractDagVisitor", $globals.Object, [], "Kernel-Dag");
+$core.addClass("AbstractDagVisitor", $globals.Object, "Kernel-Dag");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AbstractDagVisitor.comment="I am base class of `DagNode` visitor.\x0a\x0aConcrete classes should implement `visitDagNode:`,\x0athey can reuse possible variants of implementation\x0aoffered directly: `visitDagNodeVariantSimple:`\x0aand `visitDagNodeVariantRedux:`.";
 //>>excludeEnd("ide");
@@ -191,7 +191,8 @@ $globals.AbstractDagVisitor);
 
 
 
-$core.addClass("PathDagVisitor", $globals.AbstractDagVisitor, ["path"], "Kernel-Dag");
+$core.addClass("PathDagVisitor", $globals.AbstractDagVisitor, "Kernel-Dag");
+$core.setSlots($globals.PathDagVisitor, ["path"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PathDagVisitor.comment="I am base class of `DagNode` visitor.\x0a\x0aI hold the path of ancestors up to actual node\x0ain `self path`.";
 //>>excludeEnd("ide");
@@ -333,7 +334,7 @@ $globals.PathDagVisitor);
 
 
 
-$core.addClass("DagNode", $globals.Object, [], "Kernel-Dag");
+$core.addClass("DagNode", $globals.Object, "Kernel-Dag");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DagNode.comment="I am the abstract root class of any directed acyclic graph.\x0a\x0aConcrete classes should implement `dagChildren` and `dagChildren:`\x0ato get / set direct successor nodes (aka child nodes / subnodes).";
 //>>excludeEnd("ide");
@@ -466,7 +467,8 @@ $globals.DagNode);
 
 
 
-$core.addClass("DagParentNode", $globals.DagNode, ["nodes"], "Kernel-Dag");
+$core.addClass("DagParentNode", $globals.DagNode, "Kernel-Dag");
+$core.setSlots($globals.DagParentNode, ["nodes"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DagParentNode.comment="I am `DagNode` that stores a collection of its children,\x0alazy initialized to empty array.\x0a\x0aI can `addDagChild:` to add a child.";
 //>>excludeEnd("ide");
@@ -545,7 +547,7 @@ $globals.DagParentNode);
 
 
 
-$core.addClass("DagSink", $globals.DagNode, [], "Kernel-Dag");
+$core.addClass("DagSink", $globals.DagNode, "Kernel-Dag");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DagSink.comment="I am `DagNode` with no direct successors.\x0a\x0aSending `dagChildren:` with empty collection is legal.";
 //>>excludeEnd("ide");

+ 9 - 5
lang/src/Kernel-Exceptions.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Exceptions");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("Error", $globals.Object, ["message", "stack", "amberHandled", "context", "smalltalkError"], "Kernel-Exceptions");
+$core.addClass("Error", $globals.Object, "Kernel-Exceptions");
+$core.setSlots($globals.Error, ["message", "stack", "amberHandled", "context", "smalltalkError"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
 //>>excludeEnd("ide");
@@ -483,7 +484,7 @@ return $recv($self._new())._signal_(aString);
 $globals.Error.a$cls);
 
 
-$core.addClass("Halt", $globals.Error, [], "Kernel-Exceptions");
+$core.addClass("Halt", $globals.Error, "Kernel-Exceptions");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Halt.comment="I am provided to support `Object>>#halt`.";
 //>>excludeEnd("ide");
@@ -556,7 +557,8 @@ $globals.Halt);
 
 
 
-$core.addClass("JavaScriptException", $globals.Error, ["exception"], "Kernel-Exceptions");
+$core.addClass("JavaScriptException", $globals.Error, "Kernel-Exceptions");
+$core.setSlots($globals.JavaScriptException, ["exception"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`";
 //>>excludeEnd("ide");
@@ -676,7 +678,8 @@ return $recv($1)._yourself();
 $globals.JavaScriptException.a$cls);
 
 
-$core.addClass("MessageNotUnderstood", $globals.Error, ["smalltalkMessage", "receiver"], "Kernel-Exceptions");
+$core.addClass("MessageNotUnderstood", $globals.Error, "Kernel-Exceptions");
+$core.setSlots($globals.MessageNotUnderstood, ["smalltalkMessage", "receiver"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`.";
 //>>excludeEnd("ide");
@@ -783,7 +786,8 @@ $globals.MessageNotUnderstood);
 
 
 
-$core.addClass("NonBooleanReceiver", $globals.Error, ["object"], "Kernel-Exceptions");
+$core.addClass("NonBooleanReceiver", $globals.Error, "Kernel-Exceptions");
+$core.setSlots($globals.NonBooleanReceiver, ["object"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver.";
 //>>excludeEnd("ide");

+ 15 - 9
lang/src/Kernel-Infrastructure.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Infrastructure");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AmberBootstrapInitialization", $globals.Object, [], "Kernel-Infrastructure");
+$core.addClass("AmberBootstrapInitialization", $globals.Object, "Kernel-Infrastructure");
 
 $core.addMethod(
 $core.method({
@@ -108,7 +108,8 @@ return $recv($globals.Smalltalk)._postLoad();
 $globals.AmberBootstrapInitialization.a$cls);
 
 
-$core.addClass("JSObjectProxy", $globals.ProtoObject, ["jsObject"], "Kernel-Infrastructure");
+$core.addClass("JSObjectProxy", $globals.ProtoObject, "Kernel-Infrastructure");
+$core.setSlots($globals.JSObjectProxy, ["jsObject"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.JSObjectProxy.comment="I handle sending messages to JavaScript objects, making  JavaScript object accessing from Amber fully transparent.\x0aMy instances make intensive use of `#doesNotUnderstand:`.\x0a\x0aMy instances are automatically created by Amber whenever a message is sent to a JavaScript object.\x0a\x0a## Usage examples\x0a\x0aJSObjectProxy objects are instanciated by Amber when a Smalltalk message is sent to a JavaScript object.\x0a\x0a\x09window alert: 'hello world'.\x0a\x09window inspect.\x0a\x09(window jQuery: 'body') append: 'hello world'\x0a\x0aAmber messages sends are converted to JavaScript function calls or object property access _(in this order)_. If n one of them match, a `MessageNotUnderstood` error will be thrown.\x0a\x0a## Message conversion rules\x0a\x0a- `someUser name` becomes `someUser.name`\x0a- `someUser name: 'John'` becomes `someUser name = \x22John\x22`\x0a- `console log: 'hello world'` becomes `console.log('hello world')`\x0a- `(window jQuery: 'foo') css: 'background' color: 'red'` becomes `window.jQuery('foo').css('background', 'red')`\x0a\x0a__Note:__ For keyword-based messages, only the first keyword is kept: `window foo: 1 bar: 2` is equivalent to `window foo: 1 baz: 2`.";
 //>>excludeEnd("ide");
@@ -843,7 +844,8 @@ return self;
 $globals.JSObjectProxy.a$cls);
 
 
-$core.addClass("Organizer", $globals.Object, ["elements"], "Kernel-Infrastructure");
+$core.addClass("Organizer", $globals.Object, "Kernel-Infrastructure");
+$core.setSlots($globals.Organizer, ["elements"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Organizer.comment="I represent categorization information. \x0a\x0a## API\x0a\x0aUse `#addElement:` and `#removeElement:` to manipulate instances.";
 //>>excludeEnd("ide");
@@ -950,7 +952,8 @@ $globals.Organizer);
 
 
 
-$core.addClass("ClassOrganizer", $globals.Organizer, ["traitOrBehavior"], "Kernel-Infrastructure");
+$core.addClass("ClassOrganizer", $globals.Organizer, "Kernel-Infrastructure");
+$core.setSlots($globals.ClassOrganizer, ["traitOrBehavior"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassOrganizer.comment="I am an organizer specific to classes. I hold method categorization information for classes.";
 //>>excludeEnd("ide");
@@ -1095,13 +1098,14 @@ return $recv($1)._yourself();
 $globals.ClassOrganizer.a$cls);
 
 
-$core.addClass("PackageOrganizer", $globals.Organizer, [], "Kernel-Infrastructure");
+$core.addClass("PackageOrganizer", $globals.Organizer, "Kernel-Infrastructure");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageOrganizer.comment="I am an organizer specific to packages. I hold classes categorization information.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("Package", $globals.Object, ["contextBlock", "basicTransport", "name", "transport", "imports", "dirty", "organization", "isReady"], "Kernel-Infrastructure");
+$core.addClass("Package", $globals.Object, "Kernel-Infrastructure");
+$core.setSlots($globals.Package, ["contextBlock", "basicTransport", "name", "transport", "imports", "dirty", "organization", "isReady"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Package.comment="I am similar to a \x22class category\x22 typically found in other Smalltalks like Pharo or Squeak. Amber does not have class categories anymore, it had in the beginning but now each class in the system knows which package it belongs to.\x0a\x0aEach package has a name and can be queried for its classes, but it will then resort to a reverse scan of all classes to find them.\x0a\x0a## API\x0a\x0aPackages are manipulated through \x22Smalltalk current\x22, like for example finding one based on a name or with `Package class >> #name` directly:\x0a\x0a    Smalltalk current packageAt: 'Kernel'\x0a    Package named: 'Kernel'\x0a\x0aA package differs slightly from a Monticello package which can span multiple class categories using a naming convention based on hyphenation. But just as in Monticello a package supports \x22class extensions\x22 so a package can define behaviors in foreign classes using a naming convention for method categories where the category starts with an asterisk and then the name of the owning package follows.\x0a\x0aYou can fetch a package from the server:\x0a\x0a\x09Package load: 'Additional-Examples'";
 //>>excludeEnd("ide");
@@ -2577,7 +2581,7 @@ return $recv(stream).__lt_lt($recv($globals.ClassBuilder)._sortClasses_(classes)
 $globals.Package.a$cls);
 
 
-$core.addClass("PackageStateObserver", $globals.Object, [], "Kernel-Infrastructure");
+$core.addClass("PackageStateObserver", $globals.Object, "Kernel-Infrastructure");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageStateObserver.comment="My current instance listens for any changes in the system that might affect the state of a package (being dirty).";
 //>>excludeEnd("ide");
@@ -2822,7 +2826,8 @@ return self;
 $globals.PackageStateObserver.a$cls);
 
 
-$core.addClass("Setting", $globals.Object, ["key", "defaultValue"], "Kernel-Infrastructure");
+$core.addClass("Setting", $globals.Object, "Kernel-Infrastructure");
+$core.setSlots($globals.Setting, ["key", "defaultValue"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Setting.comment="I represent a setting **stored** at `Smalltalk settings`. \x0aIn the current implementation, `Smalltalk settings` is an object persisted in the localStorage.\x0a\x0a## API\x0a\x0aA `Setting` value can be read using `value` and set using `value:`.\x0a\x0aSettings are accessed with `'key' asSetting` or `'key' asSettingIfAbsent: aDefaultValue`.\x0a\x0aTo read the value of a setting you can also use the convenience:\x0a\x0a`theValueSet :=  'any.characteristic' settingValue` \x0a\x0aor with a default using:\x0a\x0a `theEnsuredValueSet := 'any.characteristic' settingValueIfAbsent: true`";
 //>>excludeEnd("ide");
@@ -3015,7 +3020,8 @@ return self;
 $globals.Setting.a$cls);
 
 
-$core.addClass("SmalltalkImage", $globals.Object, ["globalJsVariables", "packageDictionary"], "Kernel-Infrastructure");
+$core.addClass("SmalltalkImage", $globals.Object, "Kernel-Infrastructure");
+$core.setSlots($globals.SmalltalkImage, ["globalJsVariables", "packageDictionary"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SmalltalkImage.comment="I represent the Smalltalk system, wrapping\x0aoperations of variable `$core` declared in `base/boot.js`.\x0a\x0a## API\x0a\x0aI have only one instance, accessed with global variable `Smalltalk`.\x0a\x0a## Classes\x0a\x0aClasses can be accessed using the following methods:\x0a\x0a- `#classes` answers the full list of Smalltalk classes in the system\x0a- `#globals #at:` answers a specific global (usually, a class) or `nil`\x0a\x0a## Packages\x0a\x0aPackages can be accessed using the following methods:\x0a\x0a- `#packages` answers the full list of packages\x0a- `#packageAt:` answers a specific package or `nil`\x0a\x0a## Parsing\x0a\x0aThe `#parse:` method is used to parse Amber source code.\x0aIt requires the `Compiler` package and the `base/parser.js` parser file in order to work.";
 //>>excludeEnd("ide");

+ 15 - 8
lang/src/Kernel-Methods.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Methods");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("BlockClosure", $globals.Object, ["prototype", "length"], "Kernel-Methods");
+$core.addClass("BlockClosure", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.BlockClosure, ["prototype", "length"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BlockClosure.comment="I represent a lexical closure.\x0aI am is directly mapped to JavaScript Function.\x0a\x0a## API\x0a\x0a1. Evaluation\x0a\x0a    My instances get evaluated with the `#value*` methods in the 'evaluating' protocol.\x0a\x0a    Example: ` [ :x | x + 1 ] value: 3 \x22Answers 4\x22 `\x0a\x0a2. Control structures\x0a\x0a    Blocks are used (together with `Boolean`) for control structures (methods in the `controlling` protocol).\x0a\x0a    Example: `aBlock whileTrue: [ ... ]`\x0a\x0a3. Error handling\x0a\x0a    I provide the `#on:do:` method for handling exceptions.\x0a\x0a    Example: ` aBlock on: MessageNotUnderstood do: [ :ex | ... ] `";
 //>>excludeEnd("ide");
@@ -822,7 +823,8 @@ return self;
 $globals.BlockClosure.a$cls);
 
 
-$core.addClass("CompiledMethod", $globals.Object, ["args", "instantiateFn", "fn", "messageSends", "pragmas", "owner", "methodClass", "protocol", "referencedClasses", "selector", "source"], "Kernel-Methods");
+$core.addClass("CompiledMethod", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.CompiledMethod, ["args", "instantiateFn", "fn", "messageSends", "pragmas", "owner", "methodClass", "protocol", "referencedClasses", "selector", "source"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.CompiledMethod.comment="I represent a class method of the system. I hold the source and compiled code of a class method.\x0a\x0a## API\x0aMy instances can be accessed using `Behavior >> #methodAt:`\x0a\x0a    Object methodAt: 'asString'\x0a\x0aSource code access:\x0a\x0a\x09(String methodAt: 'lines') source\x0a\x0aReferenced classes:\x0a\x0a\x09(String methodAt: 'lines') referencedClasses\x0a\x0aMessages sent from an instance:\x0a\x09\x0a\x09(String methodAt: 'lines') messageSends";
 //>>excludeEnd("ide");
@@ -1590,7 +1592,8 @@ $globals.CompiledMethod);
 
 
 
-$core.addClass("ForkPool", $globals.Object, ["poolSize", "maxPoolSize", "queue", "worker"], "Kernel-Methods");
+$core.addClass("ForkPool", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.ForkPool, ["poolSize", "maxPoolSize", "queue", "worker"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ForkPool.comment="I am responsible for handling forked blocks.\x0aThe pool size sets the maximum concurrent forked blocks.\x0a\x0a## API\x0a\x0aThe default instance is accessed with `#default`.\x0aThe maximum concurrent forked blocks can be set with `#maxPoolSize:`.\x0a\x0aForking is done via `BlockClosure >> #fork`";
 //>>excludeEnd("ide");
@@ -1879,7 +1882,8 @@ return self;
 $globals.ForkPool.a$cls);
 
 
-$core.addClass("Message", $globals.Object, ["selector", "arguments"], "Kernel-Methods");
+$core.addClass("Message", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.Message, ["selector", "arguments"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Message.comment="In general, the system does not use instances of me for efficiency reasons.\x0aHowever, when a message is not understood by its receiver, the interpreter will make up an instance of it in order to capture the information involved in an actual message transmission.\x0aThis instance is sent it as an argument with the message `#doesNotUnderstand:` to the receiver.\x0a\x0aSee boot.js, `messageNotUnderstood` and its counterpart `Object >> #doesNotUnderstand:`\x0a\x0a## API\x0a\x0aBesides accessing methods, `#sendTo:` provides a convenient way to send a message to an object.";
 //>>excludeEnd("ide");
@@ -2075,7 +2079,8 @@ return $recv(anObject)._doesNotUnderstand_($self._selector_arguments_(aString,an
 $globals.Message.a$cls);
 
 
-$core.addClass("MessageSend", $globals.Object, ["receiver", "message"], "Kernel-Methods");
+$core.addClass("MessageSend", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.MessageSend, ["receiver", "message"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MessageSend.comment="I encapsulate message sends to objects. Arguments can be either predefined or supplied when the message send is performed. \x0a\x0a## API\x0a\x0aUse `#value` to perform a message send with its predefined arguments and `#value:*` if additonal arguments have to supplied.";
 //>>excludeEnd("ide");
@@ -2423,7 +2428,8 @@ $globals.MessageSend);
 
 
 
-$core.addClass("MethodContext", $globals.Object, ["receiver", "evaluatedSelector", "homeContext", "index", "locals", "outerContext", "selector", "sendIdx", "supercall"], "Kernel-Methods");
+$core.addClass("MethodContext", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.MethodContext, ["receiver", "evaluatedSelector", "homeContext", "index", "locals", "outerContext", "selector", "sendIdx", "supercall"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.MethodContext.comment="I hold all the dynamic state associated with the execution of either a method activation resulting from a message send. I am used to build the call stack while debugging.\x0a\x0aMy instances are JavaScript `SmalltalkMethodContext` objects defined in `boot.js`.";
 //>>excludeEnd("ide");
@@ -2668,7 +2674,7 @@ $globals.MethodContext);
 
 
 
-$core.addClass("NativeFunction", $globals.Object, [], "Kernel-Methods");
+$core.addClass("NativeFunction", $globals.Object, "Kernel-Methods");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.NativeFunction.comment="I am a wrapper around native functions, such as `WebSocket`.\x0aFor 'normal' functions (whose constructor is the JavaScript `Function` object), use `BlockClosure`.\x0a\x0a## API\x0a\x0aSee the class-side `instance creation` methods for instance creation.\x0a\x0aCreated instances will most probably be instance of `JSObjectProxy`.\x0a\x0a## Usage example:\x0a\x0a\x09| ws |\x0a\x09ws := NativeFunction constructor: 'WebSocket' value: 'ws://localhost'.\x0a\x09ws at: 'onopen' put: [ ws send: 'hey there from Amber' ]";
 //>>excludeEnd("ide");
@@ -3817,7 +3823,8 @@ return self;
 $globals.TMethodContext);
 
 
-$core.addClass("Timeout", $globals.Object, ["rawTimeout"], "Kernel-Methods");
+$core.addClass("Timeout", $globals.Object, "Kernel-Methods");
+$core.setSlots($globals.Timeout, ["rawTimeout"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Timeout.comment="I am wrapping the returns from `set{Timeout,Interval}`.\x0a\x0a## Motivation\x0a\x0aNumber suffices in browsers, but node.js returns an object.";
 //>>excludeEnd("ide");

+ 11 - 9
lang/src/Kernel-Objects.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Objects");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ProtoObject", null, [], "Kernel-Objects");
+$core.addClass("ProtoObject", null, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProtoObject.comment="I implement the basic behavior required for any object in Amber.\x0a\x0aIn most cases, subclassing `ProtoObject` is wrong and `Object` should be used instead. However subclassing `ProtoObject` can be useful in some special cases like proxy implementations.";
 //>>excludeEnd("ide");
@@ -650,7 +650,7 @@ return self;
 $globals.ProtoObject.a$cls);
 
 
-$core.addClass("Object", $globals.ProtoObject, [], "Kernel-Objects");
+$core.addClass("Object", $globals.ProtoObject, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Object.comment="**I am the root of the Smalltalk class system**. With the exception of unual subclasses of `ProtoObject`, all other classes in the system are subclasses of me.\x0a\x0aI provide default behavior common to all normal objects (some of it inherited from `ProtoObject`), such as:\x0a\x0a- accessing\x0a- copying\x0a- comparison\x0a- error handling\x0a- message sending\x0a- reflection\x0a\x0aAlso utility messages that all objects should respond to are defined here.\x0a\x0aI have no instance variable.\x0a\x0a##Access\x0a\x0aInstance variables can be accessed with `#instVarAt:` and `#instVarAt:put:`. `#instanceVariableNames` answers a collection of all instance variable names.\x0aAccessing JavaScript properties of an object is done through `#basicAt:`, `#basicAt:put:` and `basicDelete:`.\x0a\x0a##Copying\x0a\x0aCopying an object is handled by `#copy` and `#deepCopy`. The first one performs a shallow copy of the receiver, while the second one performs a deep copy.\x0aThe hook method `#postCopy` can be overriden in subclasses to copy fields as necessary to complete the full copy. It will be sent by the copy of the receiver.\x0a\x0a##Comparison\x0a\x0aI understand equality `#=` and identity `#==` comparison.\x0a\x0a##Error handling\x0a\x0a- `#halt` is the typical message to use for inserting breakpoints during debugging.\x0a- `#error:` throws a generic error exception\x0a- `#doesNotUnderstand:` handles the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message.\x0a\x09Overriding this message can be useful to implement proxies for example.";
 //>>excludeEnd("ide");
@@ -1881,7 +1881,7 @@ return self;
 $globals.Object.a$cls);
 
 
-$core.addClass("Boolean", $globals.Object, [], "Kernel-Objects");
+$core.addClass("Boolean", $globals.Object, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Boolean.comment="I define the protocol for logic testing operations and conditional control structures for the logical values (see the `controlling` protocol).\x0a\x0aI have two instances, `true` and `false`.\x0a\x0aI am directly mapped to JavaScript Boolean. The `true` and `false` objects are the JavaScript boolean objects.\x0a\x0a## Usage Example:\x0a\x0a    aBoolean not ifTrue: [ ... ] ifFalse: [ ... ]";
 //>>excludeEnd("ide");
@@ -2342,7 +2342,7 @@ $globals.Boolean);
 
 
 
-$core.addClass("Date", $globals.Object, [], "Kernel-Objects");
+$core.addClass("Date", $globals.Object, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Date.comment="I am used to work with both dates and times. Therefore `Date today` and `Date now` are both valid in\x0aAmber and answer the same date object.\x0a\x0aDate directly maps to the `Date()` JavaScript constructor, and Amber date objects are JavaScript date objects.\x0a\x0a## API\x0a\x0aThe class-side `instance creation` protocol contains some convenience methods for creating date/time objects such as `#fromSeconds:`.\x0a\x0aArithmetic and comparison is supported (see the `comparing` and `arithmetic` protocols).\x0a\x0aThe `converting` protocol provides convenience methods for various convertions (to numbers, strings, etc.).";
 //>>excludeEnd("ide");
@@ -3363,7 +3363,7 @@ return $self._new();
 $globals.Date.a$cls);
 
 
-$core.addClass("Number", $globals.Object, [], "Kernel-Objects");
+$core.addClass("Number", $globals.Object, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Number.comment="I am the Amber representation for all numbers.\x0aI am directly mapped to JavaScript Number.\x0a\x0a## API\x0a\x0aI provide all necessary methods for arithmetic operations, comparison, conversion and so on with numbers.\x0a\x0aMy instances can also be used to evaluate a block a fixed number of times:\x0a\x0a\x095 timesRepeat: [ Transcript show: 'This will be printed 5 times'; cr ].\x0a\x09\x0a\x091 to: 5 do: [ :aNumber| Transcript show: aNumber asString; cr ].\x0a\x09\x0a\x091 to: 10 by: 2 do: [ :aNumber| Transcript show: aNumber asString; cr ].";
 //>>excludeEnd("ide");
@@ -5713,7 +5713,8 @@ return $recv($self._pi()).__slash((180));
 $globals.Number.a$cls);
 
 
-$core.addClass("Point", $globals.Object, ["x", "y"], "Kernel-Objects");
+$core.addClass("Point", $globals.Object, "Kernel-Objects");
+$core.setSlots($globals.Point, ["x", "y"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Point.comment="I represent an x-y pair of numbers usually designating a geometric coordinate.\x0a\x0a## API\x0a\x0aInstances are traditionally created using the binary `#@` message to a number:\x0a\x0a\x09100@120\x0a\x0aPoints can then be arithmetically manipulated:\x0a\x0a\x09100@100 + (10@10)\x0a\x0a...or for example:\x0a\x0a\x09(100@100) * 2\x0a\x0a**NOTE:** Creating a point with a negative y-value will need a space after `@` in order to avoid a parsing error:\x0a\x0a\x09100@ -100 \x22but 100@-100 would not parse\x22";
 //>>excludeEnd("ide");
@@ -6544,7 +6545,7 @@ return $recv($1)._yourself();
 $globals.Point.a$cls);
 
 
-$core.addClass("Random", $globals.Object, [], "Kernel-Objects");
+$core.addClass("Random", $globals.Object, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Random.comment="I an used to generate a random number and I am implemented as a trivial wrapper around javascript `Math.random()`.\x0a\x0a## API\x0a\x0aThe typical use case it to use the `#next` method like the following:\x0a\x0a\x09Random new next\x0a\x0aThis will return a float x where x < 1 and x > 0. If you want a random integer from 1 to 10 you can use `#atRandom`\x0a\x0a\x0910 atRandom\x0a\x0aA random number in a specific interval can be obtained with the following:\x0a\x0a\x09(3 to: 7) atRandom\x0a\x0aBe aware that `#to:` does not create an Interval as in other Smalltalk implementations but in fact an `Array` of numbers, so it's better to use:\x0a\x0a\x095 atRandom + 2\x0a\x0aSince `#atRandom` is implemented in `SequencableCollection` you can easy pick an element at random:\x0a\x0a\x09#('a' 'b' 'c') atRandom\x0a\x0aAs well as letter from a `String`:\x0a\x0a\x09'abc' atRandom\x0a\x0aSince Amber does not have Characters this will return a `String` of length 1 like for example `'b'`.";
 //>>excludeEnd("ide");
@@ -6605,7 +6606,8 @@ $globals.Random);
 
 
 
-$core.addClass("Rectangle", $globals.Object, ["origin", "corner"], "Kernel-Objects");
+$core.addClass("Rectangle", $globals.Object, "Kernel-Objects");
+$core.setSlots($globals.Rectangle, ["origin", "corner"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Rectangle.comment="I represent a Rectangle defined by my two corners.\x0a\x0aThe simplest way to create an instance is using Point methods:\x0a\x0a    1@1 corner: 2@2\x0a\x0aWIll create a rectangle with 1@1 as the top left and 2@2 at the bottom right.\x0a\x0a    1@1 extent: 1@1\x0a\x0aWill create the same rectangle, defining an origin and a size instead of an origin and a corner.";
 //>>excludeEnd("ide");
@@ -6892,7 +6894,7 @@ return $recv($self._basicNew())._setPoint_point_(anOrigin,aCorner);
 $globals.Rectangle.a$cls);
 
 
-$core.addClass("UndefinedObject", $globals.Object, [], "Kernel-Objects");
+$core.addClass("UndefinedObject", $globals.Object, "Kernel-Objects");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.UndefinedObject.comment="I describe the behavior of my sole instance, `nil`. `nil` represents a prior value for variables that have not been initialized, or for results which are meaningless.\x0a\x0a`nil` is the Smalltalk equivalent of the `undefined` JavaScript object.\x0a\x0a__note:__ When sending messages to the `undefined` JavaScript object, it will be replaced by `nil`.";
 //>>excludeEnd("ide");

+ 1 - 1
lang/src/Kernel-Promises.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Promises");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("Promise", $globals.Object, [], "Kernel-Promises");
+$core.addClass("Promise", $globals.Object, "Kernel-Promises");
 
 $core.addMethod(
 $core.method({

+ 36 - 31
lang/src/Kernel-Tests.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Kernel-Tests");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AnnouncementSubscriptionTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("AnnouncementSubscriptionTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testAddExtensionMethod",
@@ -137,7 +137,7 @@ $globals.AnnouncementSubscriptionTest);
 
 
 
-$core.addClass("AnnouncerTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("AnnouncerTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testOnDo",
@@ -323,7 +323,7 @@ $globals.AnnouncerTest);
 
 
 
-$core.addClass("BlockClosureTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("BlockClosureTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "localReturnOnDoCatch",
@@ -1115,7 +1115,7 @@ $globals.BlockClosureTest);
 
 
 
-$core.addClass("BooleanTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("BooleanTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testEquality",
@@ -1929,7 +1929,8 @@ $globals.BooleanTest);
 
 
 
-$core.addClass("ClassBuilderTest", $globals.TestCase, ["builder", "theClass"], "Kernel-Tests");
+$core.addClass("ClassBuilderTest", $globals.TestCase, "Kernel-Tests");
+$core.setSlots($globals.ClassBuilderTest, ["builder", "theClass"]);
 $core.addMethod(
 $core.method({
 selector: "setUp",
@@ -2314,7 +2315,8 @@ $globals.ClassBuilderTest);
 
 
 
-$core.addClass("ClassTest", $globals.TestCase, ["builder", "theClass"], "Kernel-Tests");
+$core.addClass("ClassTest", $globals.TestCase, "Kernel-Tests");
+$core.setSlots($globals.ClassTest, ["builder", "theClass"]);
 $core.addMethod(
 $core.method({
 selector: "augmentMethodInstantiationOf:withAttachments:",
@@ -3092,7 +3094,8 @@ $globals.ClassTest);
 
 
 
-$core.addClass("CollectionTest", $globals.TestCase, ["sampleBlock"], "Kernel-Tests");
+$core.addClass("CollectionTest", $globals.TestCase, "Kernel-Tests");
+$core.setSlots($globals.CollectionTest, ["sampleBlock"]);
 $core.addMethod(
 $core.method({
 selector: "assertSameContents:as:",
@@ -5379,7 +5382,7 @@ return $recv($self._collectionClass())._isNil();
 $globals.CollectionTest.a$cls);
 
 
-$core.addClass("AssociativeCollectionTest", $globals.CollectionTest, [], "Kernel-Tests");
+$core.addClass("AssociativeCollectionTest", $globals.CollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collectionKeys",
@@ -6132,7 +6135,7 @@ $globals.AssociativeCollectionTest);
 
 
 
-$core.addClass("DictionaryTest", $globals.AssociativeCollectionTest, [], "Kernel-Tests");
+$core.addClass("DictionaryTest", $globals.AssociativeCollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collection",
@@ -6620,7 +6623,7 @@ return $globals.Dictionary;
 $globals.DictionaryTest.a$cls);
 
 
-$core.addClass("HashedCollectionTest", $globals.AssociativeCollectionTest, [], "Kernel-Tests");
+$core.addClass("HashedCollectionTest", $globals.AssociativeCollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collection",
@@ -6809,7 +6812,7 @@ return $globals.HashedCollection;
 $globals.HashedCollectionTest.a$cls);
 
 
-$core.addClass("SequenceableCollectionTest", $globals.CollectionTest, [], "Kernel-Tests");
+$core.addClass("SequenceableCollectionTest", $globals.CollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collectionFirst",
@@ -7510,7 +7513,7 @@ $globals.SequenceableCollectionTest);
 
 
 
-$core.addClass("ArrayTest", $globals.SequenceableCollectionTest, [], "Kernel-Tests");
+$core.addClass("ArrayTest", $globals.SequenceableCollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collection",
@@ -8099,7 +8102,7 @@ return $globals.Array;
 $globals.ArrayTest.a$cls);
 
 
-$core.addClass("StringTest", $globals.SequenceableCollectionTest, [], "Kernel-Tests");
+$core.addClass("StringTest", $globals.SequenceableCollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collection",
@@ -9298,7 +9301,7 @@ return $globals.String;
 $globals.StringTest.a$cls);
 
 
-$core.addClass("SetTest", $globals.CollectionTest, [], "Kernel-Tests");
+$core.addClass("SetTest", $globals.CollectionTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collection",
@@ -10199,7 +10202,7 @@ return $globals.Set;
 $globals.SetTest.a$cls);
 
 
-$core.addClass("ConsoleTranscriptTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("ConsoleTranscriptTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testShow",
@@ -10259,7 +10262,7 @@ $globals.ConsoleTranscriptTest);
 
 
 
-$core.addClass("DateTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("DateTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testEquality",
@@ -10515,7 +10518,7 @@ $globals.DateTest);
 
 
 
-$core.addClass("JSObjectProxyTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("JSObjectProxyTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "jsObject",
@@ -11374,7 +11377,7 @@ $globals.JSObjectProxyTest);
 
 
 
-$core.addClass("JavaScriptExceptionTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("JavaScriptExceptionTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testCatchingException",
@@ -11473,7 +11476,7 @@ $globals.JavaScriptExceptionTest);
 
 
 
-$core.addClass("MessageSendTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("MessageSendTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testValue",
@@ -11545,7 +11548,8 @@ $globals.MessageSendTest);
 
 
 
-$core.addClass("MethodInheritanceTest", $globals.TestCase, ["receiverTop", "receiverMiddle", "receiverBottom", "method", "performBlock"], "Kernel-Tests");
+$core.addClass("MethodInheritanceTest", $globals.TestCase, "Kernel-Tests");
+$core.setSlots($globals.MethodInheritanceTest, ["receiverTop", "receiverMiddle", "receiverBottom", "method", "performBlock"]);
 $core.addMethod(
 $core.method({
 selector: "codeGeneratorClass",
@@ -12246,7 +12250,7 @@ $globals.MethodInheritanceTest);
 
 
 
-$core.addClass("NumberTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("NumberTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testAbs",
@@ -14419,7 +14423,8 @@ $globals.NumberTest);
 
 
 
-$core.addClass("ObjectMock", $globals.Object, ["foo", "bar"], "Kernel-Tests");
+$core.addClass("ObjectMock", $globals.Object, "Kernel-Tests");
+$core.setSlots($globals.ObjectMock, ["foo", "bar"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ObjectMock.comment="ObjectMock is there only to perform tests on classes.";
 //>>excludeEnd("ide");
@@ -14462,7 +14467,7 @@ $globals.ObjectMock);
 
 
 
-$core.addClass("ObjectTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("ObjectTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "notDefined",
@@ -14927,7 +14932,7 @@ $globals.ObjectTest);
 
 
 
-$core.addClass("PointTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("PointTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testAccessing",
@@ -15666,7 +15671,7 @@ $globals.PointTest);
 
 
 
-$core.addClass("QueueTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("QueueTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testNextIfAbsent",
@@ -15761,7 +15766,7 @@ $globals.QueueTest);
 
 
 
-$core.addClass("RandomTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("RandomTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testAtRandomNumber",
@@ -15894,7 +15899,7 @@ $globals.RandomTest);
 
 
 
-$core.addClass("RectangleTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("RectangleTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testContainsPoint",
@@ -16060,7 +16065,7 @@ $globals.RectangleTest);
 
 
 
-$core.addClass("StreamTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("StreamTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "collectionClass",
@@ -16512,7 +16517,7 @@ return $recv($self._collectionClass())._isNil();
 $globals.StreamTest.a$cls);
 
 
-$core.addClass("ArrayStreamTest", $globals.StreamTest, [], "Kernel-Tests");
+$core.addClass("ArrayStreamTest", $globals.StreamTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "newCollection",
@@ -16556,7 +16561,7 @@ return $globals.Array;
 $globals.ArrayStreamTest.a$cls);
 
 
-$core.addClass("StringStreamTest", $globals.StreamTest, [], "Kernel-Tests");
+$core.addClass("StringStreamTest", $globals.StreamTest, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "newCollection",
@@ -17489,7 +17494,7 @@ return self;
 $globals.TKeyValueCollectionTest);
 
 
-$core.addClass("UndefinedTest", $globals.TestCase, [], "Kernel-Tests");
+$core.addClass("UndefinedTest", $globals.TestCase, "Kernel-Tests");
 $core.addMethod(
 $core.method({
 selector: "testCopying",

+ 2 - 2
lang/src/Platform-Browser.js

@@ -7,7 +7,7 @@ $pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber/core/P
 //>>excludeEnd("imports");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("BrowserPlatform", $globals.Object, [], "Platform-Browser");
+$core.addClass("BrowserPlatform", $globals.Object, "Platform-Browser");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BrowserPlatform.comment="I am `Platform` service implementation for browser.";
 //>>excludeEnd("ide");
@@ -240,7 +240,7 @@ return self;
 $globals.BrowserPlatform.a$cls);
 
 
-$core.addClass("BrowserTerminal", $globals.Object, [], "Platform-Browser");
+$core.addClass("BrowserTerminal", $globals.Object, "Platform-Browser");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.BrowserTerminal.comment="I am `Terminal` service implementation for browser.";
 //>>excludeEnd("ide");

+ 2 - 1
lang/src/Platform-DOM-Tests.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Platform-DOM-Tests");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("PlatformDomTest", $globals.TestCase, ["fixtureDiv"], "Platform-DOM-Tests");
+$core.addClass("PlatformDomTest", $globals.TestCase, "Platform-DOM-Tests");
+$core.setSlots($globals.PlatformDomTest, ["fixtureDiv"]);
 $core.addMethod(
 $core.method({
 selector: "testEntityConversion",

+ 1 - 1
lang/src/Platform-DOM.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Platform-DOM");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("PlatformDom", $globals.Object, [], "Platform-DOM");
+$core.addClass("PlatformDom", $globals.Object, "Platform-DOM");
 
 $core.addMethod(
 $core.method({

+ 67 - 33
lang/src/Platform-ImportExport.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Platform-ImportExport");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("AbstractExporter", $globals.Object, [], "Platform-ImportExport");
+$core.addClass("AbstractExporter", $globals.Object, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AbstractExporter.comment="I am an abstract exporter for Amber source code.\x0a\x0a## API\x0a\x0aUse `#exportPackage:on:` to export a given package on a Stream.";
 //>>excludeEnd("ide");
@@ -128,7 +128,7 @@ $globals.AbstractExporter);
 
 
 
-$core.addClass("ChunkExporter", $globals.AbstractExporter, [], "Platform-ImportExport");
+$core.addClass("ChunkExporter", $globals.AbstractExporter, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ChunkExporter.comment="I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.\x0a\x0aI do not output any compiled code.";
 //>>excludeEnd("ide");
@@ -1069,7 +1069,7 @@ $globals.ChunkExporter);
 
 
 
-$core.addClass("Exporter", $globals.AbstractExporter, [], "Platform-ImportExport");
+$core.addClass("Exporter", $globals.AbstractExporter, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Exporter.comment="I am responsible for outputting Amber code into a JavaScript string.\x0a\x0aThe generated output is enough to reconstruct the exported data, including Smalltalk source code and other metadata.\x0a\x0a## Use case\x0a\x0aI am typically used to save code outside of the Amber runtime (committing to disk, etc.).";
 //>>excludeEnd("ide");
@@ -1112,11 +1112,11 @@ selector: "exportDefinitionOf:on:",
 protocol: "output",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aStream"],
-source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09write: {\x0a\x09\x09\x09'$core.addClass('.\x0a\x09\x09\x09aClass name asJavaScriptSource. ', '.\x0a\x09\x09\x09aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavaScriptSource ]. ', '.\x0a\x09\x09\x09aClass instanceVariableNames asJavaScriptSource. ', '.\x0a\x09\x09\x09aClass category asJavaScriptSource.\x0a\x09\x09\x09');' }.\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09\x09write: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);'; lf;\x0a\x09\x09\x09write: { aClass asJavaScriptSource. '.comment='. aClass comment crlfSanitized asJavaScriptSource. ';' }; lf;\x0a\x09\x09\x09write: '//>>excludeEnd(\x22ide\x22);' ].\x0a\x09aStream lf",
+source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09write: {\x0a\x09\x09\x09'$core.addClass('.\x0a\x09\x09\x09aClass name asJavaScriptSource. ', '.\x0a\x09\x09\x09aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavaScriptSource ]. ', '.\x0a\x09\x09\x09aClass category asJavaScriptSource.\x0a\x09\x09\x09');' };\x0a\x09\x09lf.\x0a\x09aClass instanceVariableNames ifNotEmpty: [ :ivars | aStream\x0a\x09\x09write: { '$core.setSlots('. aClass asJavaScriptSource. ', '. ivars asJavaScriptSource. ');' };\x0a\x09\x09lf ].\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09aStream\x0a\x09\x09\x09write: '//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);'; lf;\x0a\x09\x09\x09write: { aClass asJavaScriptSource. '.comment='. aClass comment crlfSanitized asJavaScriptSource. ';' }; lf;\x0a\x09\x09\x09write: '//>>excludeEnd(\x22ide\x22);';\x0a\x09\x09\x09lf ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["lf", "write:", "asJavaScriptSource", "name", "ifNil:ifNotNil:", "superclass", "instanceVariableNames", "category", "ifNotEmpty:", "comment", "crlfSanitized"]
+messageSends: ["lf", "write:", "asJavaScriptSource", "name", "ifNil:ifNotNil:", "superclass", "category", "ifNotEmpty:", "instanceVariableNames", "comment", "crlfSanitized"]
 }, function ($methodClass){ return function (aClass,aStream){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1145,17 +1145,48 @@ $3=[$recv(superclass)._asJavaScriptSource()
 //>>excludeEnd("ctx");
 ][0];
 }
-[$recv(aStream)._write_(["$core.addClass(",$1,", ",$3,", ",[$recv($recv(aClass)._instanceVariableNames())._asJavaScriptSource()
+[$recv(aStream)._write_(["$core.addClass(",$1,", ",$3,", ",[$recv($recv(aClass)._category())._asJavaScriptSource()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["asJavaScriptSource"]=3
 //>>excludeEnd("ctx");
-][0],", ",[$recv($recv(aClass)._category())._asJavaScriptSource()
+][0],");"])
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["asJavaScriptSource"]=4
+,$ctx1.sendIdx["write:"]=1
+//>>excludeEnd("ctx");
+][0];
+[$recv(aStream)._lf()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["lf"]=2
+//>>excludeEnd("ctx");
+][0];
+[$recv($recv(aClass)._instanceVariableNames())._ifNotEmpty_((function(ivars){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+[$recv(aStream)._write_(["$core.setSlots(",[$recv(aClass)._asJavaScriptSource()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx2.sendIdx["asJavaScriptSource"]=4
+//>>excludeEnd("ctx");
+][0],", ",[$recv(ivars)._asJavaScriptSource()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx2.sendIdx["asJavaScriptSource"]=5
 //>>excludeEnd("ctx");
 ][0],");"])
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["write:"]=1
+,$ctx2.sendIdx["write:"]=2
+//>>excludeEnd("ctx");
+][0];
+return [$recv(aStream)._lf()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx2.sendIdx["lf"]=3
+//>>excludeEnd("ctx");
+][0];
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({ivars:ivars},$ctx1,3)});
+//>>excludeEnd("ctx");
+}))
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["ifNotEmpty:"]=1
 //>>excludeEnd("ctx");
 ][0];
 $recv([$recv(aClass)._comment()
@@ -1166,41 +1197,36 @@ $recv([$recv(aClass)._comment()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-[$recv(aStream)._lf()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["lf"]=2
-//>>excludeEnd("ctx");
-][0];
 [$recv(aStream)._write_("//>>excludeStart(\x22ide\x22, pragmas.excludeIdeData);")
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["write:"]=2
+,$ctx2.sendIdx["write:"]=3
 //>>excludeEnd("ctx");
 ][0];
 [$recv(aStream)._lf()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["lf"]=3
+,$ctx2.sendIdx["lf"]=4
 //>>excludeEnd("ctx");
 ][0];
 [$recv(aStream)._write_([[$recv(aClass)._asJavaScriptSource()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["asJavaScriptSource"]=5
+,$ctx2.sendIdx["asJavaScriptSource"]=6
 //>>excludeEnd("ctx");
 ][0],".comment=",$recv($recv($recv(aClass)._comment())._crlfSanitized())._asJavaScriptSource(),";"])
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["write:"]=3
+,$ctx2.sendIdx["write:"]=4
 //>>excludeEnd("ctx");
 ][0];
 [$recv(aStream)._lf()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["lf"]=4
+,$ctx2.sendIdx["lf"]=5
 //>>excludeEnd("ctx");
 ][0];
-return $recv(aStream)._write_("//>>excludeEnd(\x22ide\x22);");
+$recv(aStream)._write_("//>>excludeEnd(\x22ide\x22);");
+return $recv(aStream)._lf();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
 //>>excludeEnd("ctx");
 }));
-$recv(aStream)._lf();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream})});
@@ -1944,7 +1970,8 @@ $globals.Exporter);
 
 
 
-$core.addClass("AmdExporter", $globals.Exporter, ["namespace"], "Platform-ImportExport");
+$core.addClass("AmdExporter", $globals.Exporter, "Platform-ImportExport");
+$core.setSlots($globals.AmdExporter, ["namespace"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdExporter.comment="I am used to export Packages in an AMD (Asynchronous Module Definition) JavaScript format.";
 //>>excludeEnd("ide");
@@ -2292,7 +2319,8 @@ $globals.AmdExporter);
 
 
 
-$core.addClass("ChunkParser", $globals.Object, ["stream", "last"], "Platform-ImportExport");
+$core.addClass("ChunkParser", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.ChunkParser, ["stream", "last"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ChunkParser.comment="I am responsible for parsing aStream contents in the chunk format.\x0a\x0a## API\x0a\x0a    ChunkParser new\x0a        stream: aStream;\x0a        nextChunk";
 //>>excludeEnd("ide");
@@ -2422,7 +2450,8 @@ return $recv($self._new())._stream_(aStream);
 $globals.ChunkParser.a$cls);
 
 
-$core.addClass("ClassCommentReader", $globals.Object, ["class"], "Platform-ImportExport");
+$core.addClass("ClassCommentReader", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.ClassCommentReader, ["class"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassCommentReader.comment="I provide a mechanism for retrieving class comments stored on a file.\x0a\x0aSee also `ClassCategoryReader`.";
 //>>excludeEnd("ide");
@@ -2537,7 +2566,8 @@ $globals.ClassCommentReader);
 
 
 
-$core.addClass("ClassProtocolReader", $globals.Object, ["class", "category"], "Platform-ImportExport");
+$core.addClass("ClassProtocolReader", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.ClassProtocolReader, ["class", "category"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassProtocolReader.comment="I provide a mechanism for retrieving class descriptions stored on a file in the Smalltalk chunk format.";
 //>>excludeEnd("ide");
@@ -2661,7 +2691,8 @@ $globals.ClassProtocolReader);
 
 
 
-$core.addClass("ExportMethodProtocol", $globals.Object, ["name", "theClass"], "Platform-ImportExport");
+$core.addClass("ExportMethodProtocol", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.ExportMethodProtocol, ["name", "theClass"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExportMethodProtocol.comment="I am an abstraction for a method protocol in a class / metaclass.\x0a\x0aI know of my class, name and methods.\x0aI am used when exporting a package.";
 //>>excludeEnd("ide");
@@ -2838,7 +2869,8 @@ return $recv($1)._yourself();
 $globals.ExportMethodProtocol.a$cls);
 
 
-$core.addClass("Importer", $globals.Object, ["lastSection", "lastChunk"], "Platform-ImportExport");
+$core.addClass("Importer", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.Importer, ["lastSection", "lastChunk"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Importer.comment="I can import Amber code from a string in the chunk format.\x0a\x0a## API\x0a\x0a    Importer new import: aString";
 //>>excludeEnd("ide");
@@ -2962,13 +2994,13 @@ $globals.Importer);
 
 
 
-$core.addClass("PackageCommitError", $globals.Error, [], "Platform-ImportExport");
+$core.addClass("PackageCommitError", $globals.Error, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("PackageHandler", $globals.Object, [], "Platform-ImportExport");
+$core.addClass("PackageHandler", $globals.Object, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods.";
 //>>excludeEnd("ide");
@@ -3445,7 +3477,7 @@ $globals.PackageHandler);
 
 
 
-$core.addClass("AmdPackageHandler", $globals.PackageHandler, [], "Platform-ImportExport");
+$core.addClass("AmdPackageHandler", $globals.PackageHandler, "Platform-ImportExport");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdPackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods.";
 //>>excludeEnd("ide");
@@ -3710,7 +3742,8 @@ return self;
 $globals.AmdPackageHandler.a$cls);
 
 
-$core.addClass("PackageTransport", $globals.Object, ["package"], "Platform-ImportExport");
+$core.addClass("PackageTransport", $globals.Object, "Platform-ImportExport");
+$core.setSlots($globals.PackageTransport, ["package"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageTransport.comment="I represent the transport mechanism used to commit a package.\x0a\x0aMy concrete subclasses have a `#handler` to which committing is delegated.";
 //>>excludeEnd("ide");
@@ -4204,7 +4237,8 @@ return nil;
 $globals.PackageTransport.a$cls);
 
 
-$core.addClass("AmdPackageTransport", $globals.PackageTransport, ["namespace"], "Platform-ImportExport");
+$core.addClass("AmdPackageTransport", $globals.PackageTransport, "Platform-ImportExport");
+$core.setSlots($globals.AmdPackageTransport, ["namespace"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdPackageTransport.comment="I am the default transport for committing packages.\x0a\x0aSee `AmdExporter` and `AmdPackageHandler`.";
 //>>excludeEnd("ide");

+ 7 - 5
lang/src/Platform-ImportExport.st

@@ -310,16 +310,18 @@ exportDefinitionOf: aClass on: aStream
 			'$core.addClass('.
 			aClass name asJavaScriptSource. ', '.
 			aClass superclass ifNil: [ 'null' ] ifNotNil: [ :superclass | superclass asJavaScriptSource ]. ', '.
-			aClass instanceVariableNames asJavaScriptSource. ', '.
 			aClass category asJavaScriptSource.
-			');' }.
+			');' };
+		lf.
+	aClass instanceVariableNames ifNotEmpty: [ :ivars | aStream
+		write: { '$core.setSlots('. aClass asJavaScriptSource. ', '. ivars asJavaScriptSource. ');' };
+		lf ].
 	aClass comment ifNotEmpty: [
 		aStream
-			lf;
 			write: '//>>excludeStart("ide", pragmas.excludeIdeData);'; lf;
 			write: { aClass asJavaScriptSource. '.comment='. aClass comment crlfSanitized asJavaScriptSource. ';' }; lf;
-			write: '//>>excludeEnd("ide");' ].
-	aStream lf
+			write: '//>>excludeEnd("ide");';
+			lf ]
 !
 
 exportMetaDefinitionOf: aClass on: aStream

+ 13 - 12
lang/src/Platform-Services.js

@@ -3,7 +3,7 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("Platform-Services");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ConsoleErrorHandler", $globals.Object, [], "Platform-Services");
+$core.addClass("ConsoleErrorHandler", $globals.Object, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ConsoleErrorHandler.comment="I am manage Smalltalk errors, displaying the stack in the console.";
 //>>excludeEnd("ide");
@@ -190,7 +190,8 @@ return self;
 $globals.ConsoleErrorHandler.a$cls);
 
 
-$core.addClass("ConsoleTranscript", $globals.Object, ["textarea"], "Platform-Services");
+$core.addClass("ConsoleTranscript", $globals.Object, "Platform-Services");
+$core.setSlots($globals.ConsoleTranscript, ["textarea"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
 //>>excludeEnd("ide");
@@ -298,7 +299,7 @@ return self;
 $globals.ConsoleTranscript.a$cls);
 
 
-$core.addClass("Environment", $globals.Object, [], "Platform-Services");
+$core.addClass("Environment", $globals.Object, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Environment.comment="I provide an unified entry point to manipulate Amber packages, classes and methods.\x0a\x0aTypical use cases include IDEs, remote access and restricting browsing.";
 //>>excludeEnd("ide");
@@ -1242,7 +1243,7 @@ $globals.Environment);
 
 
 
-$core.addClass("NullProgressHandler", $globals.Object, [], "Platform-Services");
+$core.addClass("NullProgressHandler", $globals.Object, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.NullProgressHandler.comment="I am the default progress handler. I do not display any progress, and simply iterate over the collection.";
 //>>excludeEnd("ide");
@@ -1297,7 +1298,7 @@ return self;
 $globals.NullProgressHandler.a$cls);
 
 
-$core.addClass("Service", $globals.Object, [], "Platform-Services");
+$core.addClass("Service", $globals.Object, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Service.comment="I implement the basic behavior for class registration to a service.\x0a\x0aSee the `Transcript` class for a concrete service.\x0a\x0a## API\x0a\x0aUse class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.";
 //>>excludeEnd("ide");
@@ -1395,7 +1396,7 @@ return self;
 $globals.Service.a$cls);
 
 
-$core.addClass("ErrorHandler", $globals.Service, [], "Platform-Services");
+$core.addClass("ErrorHandler", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ErrorHandler.comment="I am the service used to handle Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aRegistered service instances must implement `#handleError:` to perform an action on the thrown exception.";
 //>>excludeEnd("ide");
@@ -1461,7 +1462,7 @@ return self;
 $globals.ErrorHandler.a$cls);
 
 
-$core.addClass("Finder", $globals.Service, [], "Platform-Services");
+$core.addClass("Finder", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Finder.comment="I am the service responsible for finding classes/methods.\x0a__There is no default finder.__\x0a\x0a## API\x0a\x0aUse `#browse` on an object to find it.";
 //>>excludeEnd("ide");
@@ -1536,7 +1537,7 @@ return $recv($self._current())._findString_(aString);
 $globals.Finder.a$cls);
 
 
-$core.addClass("Inspector", $globals.Service, [], "Platform-Services");
+$core.addClass("Inspector", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Inspector.comment="I am the service responsible for inspecting objects.\x0a\x0aThe default inspector object is the transcript.";
 //>>excludeEnd("ide");
@@ -1565,7 +1566,7 @@ return $recv($self._current())._inspect_(anObject);
 $globals.Inspector.a$cls);
 
 
-$core.addClass("Platform", $globals.Service, [], "Platform-Services");
+$core.addClass("Platform", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Platform.comment="I am bridge to JS environment.\x0a\x0a## API\x0a\x0a    Platform globals. \x22JS global object\x22\x0a    Platform newXHR \x22new XMLHttpRequest() or its shim\x22";
 //>>excludeEnd("ide");
@@ -1692,7 +1693,7 @@ return $recv($self._current())._newXhr();
 $globals.Platform.a$cls);
 
 
-$core.addClass("ProgressHandler", $globals.Service, [], "Platform-Services");
+$core.addClass("ProgressHandler", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aRegistered instances must implement `#do:on:displaying:`.\x0a\x0aThe default behavior is to simply iterate over the collection, using `NullProgressHandler`.";
 //>>excludeEnd("ide");
@@ -1722,7 +1723,7 @@ return self;
 $globals.ProgressHandler.a$cls);
 
 
-$core.addClass("Terminal", $globals.Service, [], "Platform-Services");
+$core.addClass("Terminal", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Terminal.comment="I am UI interface service.\x0a\x0a## API\x0a\x0a    Terminal alert: 'Hey, there is a problem'.\x0a    Terminal confirm: 'Affirmative?'.\x0a    Terminal prompt: 'Your name:'.";
 //>>excludeEnd("ide");
@@ -1820,7 +1821,7 @@ return $recv($self._current())._prompt_default_(aString,defaultString);
 $globals.Terminal.a$cls);
 
 
-$core.addClass("Transcript", $globals.Service, [], "Platform-Services");
+$core.addClass("Transcript", $globals.Service, "Platform-Services");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.";
 //>>excludeEnd("ide");

+ 4 - 2
lang/src/SUnit-Tests.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("SUnit-Tests");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ExampleSetTest", $globals.TestCase, ["empty", "full"], "SUnit-Tests");
+$core.addClass("ExampleSetTest", $globals.TestCase, "SUnit-Tests");
+$core.setSlots($globals.ExampleSetTest, ["empty", "full"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExampleSetTest.comment="ExampleSetTest is taken from Pharo 1.4.\x0a\x0aTHe purpose of this class is to demonstrate a simple use case of the test framework.";
 //>>excludeEnd("ide");
@@ -235,7 +236,8 @@ $globals.ExampleSetTest);
 
 
 
-$core.addClass("SUnitAsyncTest", $globals.TestCase, ["flag"], "SUnit-Tests");
+$core.addClass("SUnitAsyncTest", $globals.TestCase, "SUnit-Tests");
+$core.setSlots($globals.SUnitAsyncTest, ["flag"]);
 $core.addMethod(
 $core.method({
 selector: "fakeError",

+ 17 - 9
lang/src/SUnit.js

@@ -3,7 +3,8 @@ var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.as
 var $pkg = $core.addPackage("SUnit");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/core"};
 
-$core.addClass("ResultAnnouncement", $globals.Object, ["result"], "SUnit");
+$core.addClass("ResultAnnouncement", $globals.Object, "SUnit");
+$core.setSlots($globals.ResultAnnouncement, ["result"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ResultAnnouncement.comment="I get signaled when a `TestCase` has been run.\x0a\x0aMy instances hold the result (instance of `TestResult`) of the test run.";
 //>>excludeEnd("ide");
@@ -46,7 +47,8 @@ $globals.ResultAnnouncement);
 
 
 
-$core.addClass("Teachable", $globals.Object, ["learnings"], "SUnit");
+$core.addClass("Teachable", $globals.Object, "SUnit");
+$core.setSlots($globals.Teachable, ["learnings"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Teachable.comment="An object you can teach how to behave. Have a look at the \x0aclass side for an example.\x0a\x0aFor more infos have a look at: http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-April/038170.html";
 //>>excludeEnd("ide");
@@ -255,7 +257,8 @@ return self;
 $globals.Teachable.a$cls);
 
 
-$core.addClass("TestCase", $globals.Object, ["testSelector", "asyncTimeout", "context"], "SUnit");
+$core.addClass("TestCase", $globals.Object, "SUnit");
+$core.setSlots($globals.TestCase, ["testSelector", "asyncTimeout", "context"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TestCase.comment="I am an implementation of the command pattern to run a test.\x0a\x0a## API\x0a\x0aMy instances are created with the class method `#selector:`,\x0apassing the symbol that names the method to be executed when the test case runs.\x0a\x0aWhen you discover a new fixture, subclass `TestCase` and create a `#test...` method for the first test.\x0aAs that method develops and more `#test...` methods are added, you will find yourself refactoring temps\x0ainto instance variables for the objects in the fixture and overriding `#setUp` to initialize these variables.\x0aAs required, override `#tearDown` to nil references, release objects and deallocate.";
 //>>excludeEnd("ide");
@@ -1033,7 +1036,8 @@ return $recv(each)._match_("^test");
 $globals.TestCase.a$cls);
 
 
-$core.addClass("TestContext", $globals.Object, ["testCase"], "SUnit");
+$core.addClass("TestContext", $globals.Object, "SUnit");
+$core.setSlots($globals.TestContext, ["testCase"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TestContext.comment="I govern running a particular test case.\x0a\x0aMy main added value is `#execute:` method which runs a block as a part of test case (restores context, nilling it afterwards, cleaning/calling `#tearDown` as appropriate for sync/async scenario).";
 //>>excludeEnd("ide");
@@ -1182,7 +1186,8 @@ return $recv($1)._yourself();
 $globals.TestContext.a$cls);
 
 
-$core.addClass("DebugTestContext", $globals.TestContext, ["finished", "result"], "SUnit");
+$core.addClass("DebugTestContext", $globals.TestContext, "SUnit");
+$core.setSlots($globals.DebugTestContext, ["finished", "result"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.DebugTestContext.comment="I add error debugging to `TestContext`.\x0a\x0aErrors are caught and explicitly passed to `ErrorHandler`.\x0aI am used in `TestCase >> debugCase`.";
 //>>excludeEnd("ide");
@@ -1295,7 +1300,8 @@ return $recv($1)._yourself();
 $globals.DebugTestContext.a$cls);
 
 
-$core.addClass("ReportingTestContext", $globals.TestContext, ["finished", "result"], "SUnit");
+$core.addClass("ReportingTestContext", $globals.TestContext, "SUnit");
+$core.setSlots($globals.ReportingTestContext, ["finished", "result"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ReportingTestContext.comment="I add `TestResult` reporting to `TestContext`.\x0a\x0aErrors are caught and save into a `TestResult`,\x0aWhen test case is finished (which can be later for async tests), a callback block is executed; this is used by a `TestSuiteRunner`.";
 //>>excludeEnd("ide");
@@ -1485,13 +1491,14 @@ return $recv($1)._yourself();
 $globals.ReportingTestContext.a$cls);
 
 
-$core.addClass("TestFailure", $globals.Error, [], "SUnit");
+$core.addClass("TestFailure", $globals.Error, "SUnit");
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TestFailure.comment="I am raised when the boolean parameter of an #`assert:` or `#deny:` call is the opposite of what the assertion claims.\x0a\x0aThe test framework distinguishes between failures and errors.\x0aA failure is an event whose possibiity is explicitly anticipated and checked for in an assertion,\x0awhereas an error is an unanticipated problem like a division by 0 or an index out of bounds.";
 //>>excludeEnd("ide");
 
 
-$core.addClass("TestResult", $globals.Object, ["timestamp", "runs", "errors", "failures", "total"], "SUnit");
+$core.addClass("TestResult", $globals.Object, "SUnit");
+$core.setSlots($globals.TestResult, ["timestamp", "runs", "errors", "failures", "total"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TestResult.comment="I implement the collecting parameter pattern for running a bunch of tests.\x0a\x0aMy instances hold tests that have run, sorted into the result categories of passed, failures and errors.\x0a\x0a`TestResult` is an interesting object to subclass or substitute. `#runCase:` is the external protocol you need to reproduce";
 //>>excludeEnd("ide");
@@ -1853,7 +1860,8 @@ $globals.TestResult);
 
 
 
-$core.addClass("TestSuiteRunner", $globals.Object, ["suite", "result", "announcer", "runNextTest"], "SUnit");
+$core.addClass("TestSuiteRunner", $globals.Object, "SUnit");
+$core.setSlots($globals.TestSuiteRunner, ["suite", "result", "announcer", "runNextTest"]);
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.TestSuiteRunner.comment="I am responsible for running a collection (`suite`) of tests.\x0a\x0a## API\x0a\x0aInstances should be created using the class-side `#on:` method, taking a collection of tests to run as parameter.\x0aTo run the test suite, use `#run`.";
 //>>excludeEnd("ide");