Skip to content

Commit

Permalink
Annotated authors of each file.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Dec 16, 2009
1 parent 752bc86 commit 293fb0d
Show file tree
Hide file tree
Showing 104 changed files with 264 additions and 47 deletions.
1 change: 1 addition & 0 deletions engines/browser/lib/binary.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// Tom Robinson
exports.ByteString = String;
exports.ByteArray = Array;
2 changes: 2 additions & 0 deletions engines/browser/lib/reactor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var active = false;
var pending = [];
var run = function () {
Expand Down
3 changes: 3 additions & 0 deletions engines/browser/lib/system.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Christoph Dorn

exports.print = function () {
system.print.apply(system, arguments);
};
3 changes: 3 additions & 0 deletions engines/default/lib/binary-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Tom Robinson

exports.B_LENGTH = function(bytes) {
return bytes.length;
}
Expand Down
2 changes: 2 additions & 0 deletions engines/default/lib/binary.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

/* Binary */
// Tom Robinson

var engine = require("binary-engine"),
B_ALLOC = engine.B_ALLOC,
Expand Down
3 changes: 3 additions & 0 deletions engines/default/lib/file-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Tom Robinson
// Kris Kowal

// HACK: use "fs.read" and "fs.isFile" until properly implemented.
// save "fs" here since it will be replaced in "system" later.
var fs = system.fs;
Expand Down
2 changes: 2 additions & 0 deletions engines/default/lib/global-commonjs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

// https://wiki.mozilla.org/ServerJS/Binary/B
if (!String.prototype.toByteString)
String.prototype.toByteString = function(charset) {
Expand Down
3 changes: 3 additions & 0 deletions engines/default/lib/global-es5.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// Tom Robinson

/*!
Copyright (c) 2009, 280 North Inc. http://280north.com/
MIT License. http://github.com/280north/narwhal/blob/master/README.md
Expand Down
2 changes: 2 additions & 0 deletions engines/default/lib/global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Tom Robinson

require("./global-es5");
require("./global-commonjs");

Expand Down
2 changes: 2 additions & 0 deletions engines/default/lib/io-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// IO: default
// Tom Robinson

var IO = exports.IO = function(inputStream, outputStream) {
this.inputStream = inputStream;
Expand Down
1 change: 1 addition & 0 deletions engines/default/lib/os-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Christoph Dorn
exports.exit = function(status) {
throw new Error("Exiting with status="+status);
}
2 changes: 2 additions & 0 deletions engines/default/lib/reactor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var tasks = [];

require('unload').when(function () {
Expand Down
3 changes: 3 additions & 0 deletions engines/default/lib/system.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Tom Robinson
// Kris Kowal

var IO = require("./io").IO;

exports.print = function () {
Expand Down
3 changes: 3 additions & 0 deletions engines/default/lib/worker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Kris Zyp

var queue = require("event-queue");
var workerEngine = require("worker-engine");

Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(function(global, evalGlobal) {
// Tom Robinson
// Kris Kowal

/*
this is a minimal engine-specific thunk for narwhal.js
Expand Down
3 changes: 3 additions & 0 deletions engines/rhino/lib/binary-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Tom Robinson

exports.B_LENGTH = function(bytes) {
return bytes.length;
}
Expand Down
5 changes: 4 additions & 1 deletion engines/rhino/lib/event-queue.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Kris Zyp

/**
* Represents the event queue for a vat
* The API is modeled after https://developer.mozilla.org/en/nsIThread
Expand Down Expand Up @@ -79,4 +82,4 @@ exports.shutdown = function(){

exports.defaultErrorReporter = function(e){
print((e.rhinoException && e.rhinoException.printStackTrace()) || (e.name + ": " + e.message));
};
};
3 changes: 3 additions & 0 deletions engines/rhino/lib/file-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Tom Robinson
// Kris Kowal

// use the "file" module as the exports object.
var exports = require('./file');

Expand Down
3 changes: 3 additions & 0 deletions engines/rhino/lib/http-client-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Isaac Schleuter

var IO = require("io").IO,
HashP = require("hashp").HashP;

Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/http-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var IO = require('./io').IO;

exports.IO = function (url) {
Expand Down
4 changes: 4 additions & 0 deletions engines/rhino/lib/io-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

// Tom Robinson
// Kris Kowal

// IO: Rhino

var IO = exports.IO = function(inputStream, outputStream) {
Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/md5-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// George Moschovitis

var binary = require("./binary");

var JString = Packages.java.lang.String,
Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/os-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var io = require('io');

var cLib;
Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/packages-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var fs = require('./file');
var system = require('./system');

Expand Down
3 changes: 3 additions & 0 deletions engines/rhino/lib/sandbox-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// STATUS: never really worked.

/* shared, sealed global context */

var blacklist = [
Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/system.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Tom Robinson

var io = require("./io");

exports.print = function () {
Expand Down
8 changes: 6 additions & 2 deletions engines/rhino/lib/uuid.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

// Kris Zyp

exports.randomUUID = function(){
return java.util.UUID.randomUUID().toString()
};
return String(java.util.UUID.randomUUID())
};

3 changes: 3 additions & 0 deletions engines/rhino/lib/worker-engine.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Kris Zyp

exports.createEnvironment = function(){
var workerQueue,
workerGlobal = new org.mozilla.javascript.tools.shell.Global();
Expand Down
2 changes: 2 additions & 0 deletions engines/rhino/lib/zip.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var io = require('io');

var javaZip = Packages.java.util.zip;
Expand Down
2 changes: 2 additions & 0 deletions engines/secure/lib/file.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

for (var name in system.fs) {
if (Object.prototype.hasOwnProperty.call(system.fs, name))
exports[name] = system.fs[name];
Expand Down
2 changes: 2 additions & 0 deletions engines/secure/lib/system.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

for (var name in system) {
if (Object.prototype.hasOwnProperty.call(system, name)) {
exports[name] = system[name];
Expand Down
1 change: 1 addition & 0 deletions engines/template/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function (evalGlobal) {
// Kris Kowal

var read = /*TODO*/; // function(path:string):string

Expand Down
3 changes: 3 additions & 0 deletions engines/template/lib/file-engine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// Christoph Dorn

var exports = require('./file');

exports.SEPARATOR = '/';
Expand Down
2 changes: 2 additions & 0 deletions engines/template/lib/system.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Tom Robinson

var IO = require("./io").IO;

exports.stdin = /*TODO*/
Expand Down
1 change: 1 addition & 0 deletions lib/args.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// kriskowal, Kris Kowal

var os = require('os');
var util = require('util');
Expand Down
2 changes: 2 additions & 0 deletions lib/base16.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var util = require('util');
var binary = require('binary');
var struct = require('struct');
Expand Down
8 changes: 0 additions & 8 deletions lib/codec/base64.js

This file was deleted.

11 changes: 2 additions & 9 deletions lib/crc32.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// from http://www.webtoolkit.info/ Javascript crc32
// ported by Kris Kowal

var util = require('./util');

Expand Down Expand Up @@ -49,12 +51,3 @@ exports.hash = function (bin, table) {
return ~crc;
};

/*
References
==========
http://www.webtoolkit.info/
Javascript crc32
*/
3 changes: 3 additions & 0 deletions lib/file-bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// Tom Robinson

// NOTE: this file is used is the bootstrapping process,
// so any "requires" must be accounted for in narwhal.js

Expand Down
3 changes: 3 additions & 0 deletions lib/file.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// Tom Robinson

// NOTE: portions of the "file" module are implemented in "file-bootstrap" and "file-engine",
// which are loaded at the bottom of this file to allow for overriding default implementations

Expand Down
2 changes: 2 additions & 0 deletions lib/hash.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

// Tom Robinson
// Hash object

var Hash = exports.Hash = {};
Expand Down
3 changes: 3 additions & 0 deletions lib/hashp.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Tom Robinson

var Hash = require("hash").Hash;

// HashP : Case Preserving hash, used for headers
Expand Down
5 changes: 4 additions & 1 deletion lib/html.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// gmosx, George Moschovitis

/**
* Escape HTML characters.
*/
Expand All @@ -13,4 +16,4 @@ exports.escapeHTML = function(str) {
*/
exports.stripTags = function (str) {
return str.replace(/<([^>]+)>/g, "");
}
}
5 changes: 4 additions & 1 deletion lib/http-client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// isaacs, Isaac Schleuter

var IO = require("io").IO,
HashP = require("hashp").HashP,
engine = require("http-client-engine");
Expand Down Expand Up @@ -131,4 +134,4 @@ HttpClient.print = function HttpClient_print (resp) {
resp.body.forEach(function (p) { out.push(p) });
print(out.join(""));
};


2 changes: 2 additions & 0 deletions lib/http.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var implementation = require('http-engine');

exports.open = function (url, mode, options) {
Expand Down
2 changes: 2 additions & 0 deletions lib/http/fs-store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

var FS = require("file");
var HTTP = require("http");
var URI = require("uri");
Expand Down
3 changes: 3 additions & 0 deletions lib/io.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

// Tom Robinson

// IO: engine independent

var engine = require("io-engine");
Expand Down
2 changes: 2 additions & 0 deletions lib/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// kriskowal, Kris Kowal

// NOTE: this file is used is the bootstrapping process,
// so any "requires" must be accounted for in narwhal.js

Expand Down
2 changes: 2 additions & 0 deletions lib/loader/attenuated.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

exports.AttenuatedLoader = function (loader) {
var self = {};

Expand Down
3 changes: 3 additions & 0 deletions lib/loader/multi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

// Kris Kowal
// Tom Robinson

// NOTE: this file is used is the bootstrapping process,
// so any "requires" must be accounted for in narwhal.js

Expand Down
2 changes: 2 additions & 0 deletions lib/loader/prefix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

// Kris Kowal

exports.PrefixLoader = function (prefix, loader) {
var self = this || {};

Expand Down
Loading

0 comments on commit 293fb0d

Please sign in to comment.