This commit is contained in:
Andreas Gal 2014-07-12 12:10:09 -07:00
Родитель 076c674dac
Коммит ba14a89d6e
2 изменённых файлов: 50 добавлений и 21 удалений

Просмотреть файл

@ -3,27 +3,28 @@
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="zipfile.js"></script>
<script type="text/javascript" src="util.js"></script>
<script type="text/javascript" src="gLong.js"></script>
<script type="text/javascript" src="classfile/reader.js"></script>
<script type="text/javascript" src="classfile/accessflags.js"></script>
<script type="text/javascript" src="classfile/attributetypes.js"></script>
<script type="text/javascript" src="classfile/classdata.js"></script>
<script type="text/javascript" src="classfile/signature.js"></script>
<script type="text/javascript" src="classfile/tags.js"></script>
<script type="text/javascript" src="logger.js"></script>
<script type="text/javascript" src="arraytypes.js"></script>
<script type="text/javascript" src="signature.js"></script>
<script type="text/javascript" src="opcodes.js"></script>
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript" src="native.js"></script>
<script type="text/javascript" src="frame.js"></script>
<script type="text/javascript" src="scheduler.js"></script>
<script type="text/javascript" src="thread.js"></script>
<script type="text/javascript" src="threads.js"></script>
<script type="text/javascript" src="jvm.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="zipfile.js" defer></script>
<script type="text/javascript" src="util.js" defer></script>
<script type="text/javascript" src="gLong.js" defer></script>
<script type="text/javascript" src="classfile/reader.js" defer></script>
<script type="text/javascript" src="classfile/accessflags.js" defer></script>
<script type="text/javascript" src="classfile/attributetypes.js" defer></script>
<script type="text/javascript" src="classfile/classdata.js" defer></script>
<script type="text/javascript" src="classfile/signature.js" defer></script>
<script type="text/javascript" src="classfile/tags.js" defer></script>
<script type="text/javascript" src="logger.js" defer></script>
<script type="text/javascript" src="arraytypes.js" defer></script>
<script type="text/javascript" src="signature.js" defer></script>
<script type="text/javascript" src="opcodes.js" defer></script>
<script type="text/javascript" src="classes.js" defer></script>
<script type="text/javascript" src="native.js" defer></script>
<script type="text/javascript" src="stack" defer></script>
<script type="text/javascript" src="frame.js" defer></script>
<script type="text/javascript" src="scheduler.js" defer></script>
<script type="text/javascript" src="thread.js" defer></script>
<script type="text/javascript" src="threads.js" defer></script>
<script type="text/javascript" src="jvm.js" defer></script>
<script type="text/javascript" src="main.js" defer></script>
</head>
<body>

28
stack.js Normal file
Просмотреть файл

@ -0,0 +1,28 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set shiftwidth=4 tabstop=4 autoindent cindent expandtab: */
'use strict';
var Stack = function() {
this.array = [];
}
Stack.prototype.push = function (value) {
this.array.push(value);
}
Stack.prototype.pop = function (value) {
return this.array.pop();
}
Stack.prototype.push2 = function (value) {
this.array.push(null);
this.array.push(value);
}
Stack.prototype.pop2 = function (value) {
var result = this.array.pop();
this.array.pop();
return result;
}