v8/test/mjsunit/regress/regress-eval-cache.js
yangguo@chromium.org 0dfbf83468 Use shared function info for eval cache key.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/678843004

Cr-Commit-Position: refs/heads/master@{#24927}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 10:01:44 +00:00

20 lines
456 B
JavaScript

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function f() {
try {
throw 1;
} catch (e) {
var a = 0;
var b = 0;
var c = 0;
var x = 1;
var result = eval('eval("x")').toString();
assertEquals("1", result);
}
var x = 2;
var result = eval('eval("x")').toString();
assertEquals("2", result);
})();