Introducing 'opcode counter' type for 'meta' opcode; replacing 'jmp_down' opcodes that are used as pointers only with 'meta' opcodes of the introduced type.

This commit is contained in:
Ruben Ayrapetyan
2014-08-28 15:17:49 +04:00
parent 5d2b535cec
commit 9d45f68370
6 changed files with 81 additions and 31 deletions
+3 -2
View File
@@ -30,16 +30,17 @@ function f1(x)
assert(t === false);
}
var i;
var t = true;
for(var i = 1; i <= 10; i++)
for(i = 1; i <= 10; i++)
{
f1(i);
}
t = false;
for(var i = 11; i <= 20; i++)
for(i = 11; i <= 20; i++)
{
f1(i);
}
+8 -7
View File
@@ -12,14 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
var k;
function f1()
{
k = 17;
f2();
function f2()
{
assert(k > 0);
@@ -32,9 +26,16 @@ function f1()
f2();
}
k = 17;
f2();
}
for(var i = 0; i < 10000; i++)
var k;
var i;
for(i = 0; i < 10000; i++)
{
f1();
}