| Index: test/mjsunit/mjsunit.js
|
| diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
|
| index a5f65e24e75cc6279a3650407134ab493fea85bc..121b7e0a0e2043952017a02759706806bddaaf4d 100644
|
| --- a/test/mjsunit/mjsunit.js
|
| +++ b/test/mjsunit/mjsunit.js
|
| @@ -371,11 +371,18 @@ var assertUnoptimized;
|
| throw new MjsUnitAssertionError(message);
|
| };
|
|
|
| + var OptimizationStatusImpl = undefined;
|
| +
|
| var OptimizationStatus = function(fun, sync_opt) {
|
| - try {
|
| - return eval("%GetOptimizationStatus(fun, sync_opt);");
|
| - } catch (e) {
|
| - throw new Error("natives syntax not allowed");
|
| + if (OptimizationStatusImpl === undefined) {
|
| + try {
|
| + OptimizationStatusImpl = new Function(
|
| + "fun", "sync", "return %GetOptimizationStatus(fun, sync);");
|
| + } catch (e) {
|
| + throw new Error("natives syntax not allowed");
|
| + }
|
| + } else {
|
| + OptimizationStatusImpl(fun, sync_opt);
|
| }
|
| }
|
|
|
|
|