Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: runtime/vm/compiler_test.cc

Issue 566853005: Fix to allocation stub invalidation: we cannot just remove it as it will be collected even though c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler_test.cc
===================================================================
--- runtime/vm/compiler_test.cc (revision 40325)
+++ runtime/vm/compiler_test.cc (working copy)
@@ -13,6 +13,8 @@
namespace dart {
+DECLARE_FLAG(bool, enable_type_checks);
+
TEST_CASE(CompileScript) {
const char* kScriptChars =
"class A {\n"
@@ -75,10 +77,12 @@
"}\n"
"unOpt() => new A(); \n"
"optIt() => new A(); \n"
- "main() {\n"
+ "A main() {\n"
" return unOpt();\n"
"}\n";
+ bool old_enable_type_checks = FLAG_enable_type_checks;
+ FLAG_enable_type_checks = true;
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
@@ -94,9 +98,10 @@
stub_code->GetAllocationStubForClass(cls));
Class& owner = Class::Handle();
owner ^= stub.owner();
- owner.DisableAllocationStub();
+ owner.SwitchAllocationStub();
result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
+ FLAG_enable_type_checks = old_enable_type_checks;
}
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698