Revision: 23193
Author: [email protected]
Date: Tue Aug 19 11:24:24 2014 UTC
Log: Set ScopeInfo when compiling for unit tests.
This is required to correctly treat eval in unit tests.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/453953002
http://code.google.com/p/v8/source/detail?r=23193
Modified:
/branches/bleeding_edge/test/cctest/compiler/function-tester.h
/branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
/branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
/branches/bleeding_edge/test/cctest/compiler/test-run-jscalls.cc
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/function-tester.h Wed Jul
30 13:54:45 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/function-tester.h Tue Aug
19 11:24:24 2014 UTC
@@ -46,6 +46,8 @@
CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info));
CHECK_NE(NULL, info.scope());
+ Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(),
info.zone());
+ info.shared_info()->set_scope_info(*scope_info);
EnsureDeoptimizationSupport(&info);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
Thu Aug 14 12:24:37 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-changes-lowering.cc
Tue Aug 19 11:24:24 2014 UTC
@@ -59,6 +59,9 @@
CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info));
CHECK_NE(NULL, info.scope());
+ Handle<ScopeInfo> scope_info =
+ ScopeInfo::Create(info.scope(), info.zone());
+ info.shared_info()->set_scope_info(*scope_info);
Pipeline pipeline(&info);
Linkage linkage(&info);
Handle<Code> code =
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Thu
Aug 14 09:19:54 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Tue
Aug 19 11:24:24 2014 UTC
@@ -50,6 +50,8 @@
CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info));
CHECK_NE(NULL, info.scope());
+ Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(),
info.zone());
+ info.shared_info()->set_scope_info(*scope_info);
FunctionTester::EnsureDeoptimizationSupport(&info);
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-run-jscalls.cc Wed
Jul 30 13:54:45 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-run-jscalls.cc Tue
Aug 19 11:24:24 2014 UTC
@@ -233,3 +233,15 @@
Handle<JSObject>
g(T.function->context()->global_object()->global_proxy());
T.CheckCall(g, T.undefined());
}
+
+
+TEST(CallEval) {
+ FunctionTester T(
+ "var x = 42;"
+ "(function () {"
+ "function bar() { return eval('x') };"
+ "return bar;"
+ "})();");
+
+ T.CheckCall(T.Val(42), T.Val("x"), T.undefined());
+}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.