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

Side by Side Diff: runtime/vm/compiler_test.cc

Issue 1737693003: - Remove Isolate::Flags structure and store flags directly in isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 TEST_CASE(RegenerateAllocStubs) { 116 TEST_CASE(RegenerateAllocStubs) {
117 const char* kScriptChars = 117 const char* kScriptChars =
118 "class A {\n" 118 "class A {\n"
119 "}\n" 119 "}\n"
120 "unOpt() => new A(); \n" 120 "unOpt() => new A(); \n"
121 "optIt() => new A(); \n" 121 "optIt() => new A(); \n"
122 "A main() {\n" 122 "A main() {\n"
123 " return unOpt();\n" 123 " return unOpt();\n"
124 "}\n"; 124 "}\n";
125 125
126 // Isolate::Current()->flags().set_checked(true);
127 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); 126 Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
128 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); 127 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
129 EXPECT_VALID(result); 128 EXPECT_VALID(result);
130 RawLibrary* raw_library = Library::RawCast(Api::UnwrapHandle(lib)); 129 RawLibrary* raw_library = Library::RawCast(Api::UnwrapHandle(lib));
131 Library& lib_handle = Library::ZoneHandle(raw_library); 130 Library& lib_handle = Library::ZoneHandle(raw_library);
132 Class& cls = Class::Handle( 131 Class& cls = Class::Handle(
133 lib_handle.LookupClass(String::Handle(Symbols::New("A")))); 132 lib_handle.LookupClass(String::Handle(Symbols::New("A"))));
134 EXPECT(!cls.IsNull()); 133 EXPECT(!cls.IsNull());
135 134
136 Zone* zone = thread->zone(); 135 Zone* zone = thread->zone();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EXPECT(val.IsInteger()); 221 EXPECT(val.IsInteger());
223 EXPECT_EQ(7, Integer::Cast(val).AsInt64Value()); 222 EXPECT_EQ(7, Integer::Cast(val).AsInt64Value());
224 223
225 intptr_t final_class_table_size = 224 intptr_t final_class_table_size =
226 Isolate::Current()->class_table()->NumCids(); 225 Isolate::Current()->class_table()->NumCids();
227 // Eval should not eat into this non-renewable resource. 226 // Eval should not eat into this non-renewable resource.
228 EXPECT_EQ(initial_class_table_size, final_class_table_size); 227 EXPECT_EQ(initial_class_table_size, final_class_table_size);
229 } 228 }
230 229
231 } // namespace dart 230 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698