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

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

Issue 1870343002: - Refactor Symbol allocation to expect a thread parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 "vm/compiler.h" 5 #include "vm/compiler.h"
6 #include "vm/dart_api_impl.h" 6 #include "vm/dart_api_impl.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 RawFunction* GetFunction(const Class& cls, const char* name) { 278 RawFunction* GetFunction(const Class& cls, const char* name) {
279 const Function& result = Function::Handle(cls.LookupFunctionAllowPrivate( 279 const Function& result = Function::Handle(cls.LookupFunctionAllowPrivate(
280 String::Handle(String::New(name)))); 280 String::Handle(String::New(name))));
281 EXPECT(!result.IsNull()); 281 EXPECT(!result.IsNull());
282 return result.raw(); 282 return result.raw();
283 } 283 }
284 284
285 RawClass* GetClass(const Library& lib, const char* name) { 285 RawClass* GetClass(const Library& lib, const char* name) {
286 const Class& cls = Class::Handle( 286 const Class& cls = Class::Handle(
287 lib.LookupClass(String::Handle(Symbols::New(name)))); 287 lib.LookupClass(String::Handle(Symbols::New(thread_, name))));
288 EXPECT(!cls.IsNull()); // No ambiguity error expected. 288 EXPECT(!cls.IsNull()); // No ambiguity error expected.
289 return cls.raw(); 289 return cls.raw();
290 } 290 }
291 291
292 Thread* thread_; 292 Thread* thread_;
293 Isolate* isolate_; 293 Isolate* isolate_;
294 const char* script_; 294 const char* script_;
295 Library& root_lib_; 295 Library& root_lib_;
296 Script& root_script_; 296 Script& root_script_;
297 const char* graph_name_; 297 const char* graph_name_;
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 EXPECT(!TokenPosition(-1).FromSynthetic().IsSynthetic()); 802 EXPECT(!TokenPosition(-1).FromSynthetic().IsSynthetic());
803 EXPECT(!TokenPosition::kNoSource.IsSynthetic()); 803 EXPECT(!TokenPosition::kNoSource.IsSynthetic());
804 EXPECT(!TokenPosition::kLast.IsSynthetic()); 804 EXPECT(!TokenPosition::kLast.IsSynthetic());
805 EXPECT(SyntheticRoundTripTest(TokenPosition(0))); 805 EXPECT(SyntheticRoundTripTest(TokenPosition(0)));
806 EXPECT(SyntheticRoundTripTest(TokenPosition::kMaxSource)); 806 EXPECT(SyntheticRoundTripTest(TokenPosition::kMaxSource));
807 EXPECT(SyntheticRoundTripTest(TokenPosition::kMinSource)); 807 EXPECT(SyntheticRoundTripTest(TokenPosition::kMinSource));
808 } 808 }
809 809
810 } // namespace dart 810 } // namespace dart
811 811
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698