| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |