OLD | NEW |
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/globals.h" | 5 #include "platform/globals.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 4164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4175 const String& name = String::Handle(String::New(TestCase::url())); | 4175 const String& name = String::Handle(String::New(TestCase::url())); |
4176 const Library& vmlib = Library::Handle(Library::LookupLibrary(name)); | 4176 const Library& vmlib = Library::Handle(Library::LookupLibrary(name)); |
4177 EXPECT(!vmlib.IsNull()); | 4177 EXPECT(!vmlib.IsNull()); |
4178 const Class& class_a = Class::Handle( | 4178 const Class& class_a = Class::Handle( |
4179 vmlib.LookupClass(String::Handle(Symbols::New("A")))); | 4179 vmlib.LookupClass(String::Handle(Symbols::New("A")))); |
4180 const Function& func_b = | 4180 const Function& func_b = |
4181 Function::Handle(GetFunction(class_a, "b")); | 4181 Function::Handle(GetFunction(class_a, "b")); |
4182 EXPECT(func_b.CanBeInlined()); | 4182 EXPECT(func_b.CanBeInlined()); |
4183 | 4183 |
4184 // After setting a breakpoint in a function A.b, it is no longer inlineable. | 4184 // After setting a breakpoint in a function A.b, it is no longer inlineable. |
| 4185 ASSERT(Isolate::Current()->debugger() != NULL); |
4185 Breakpoint* bpt = | 4186 Breakpoint* bpt = |
4186 Isolate::Current()->debugger()->SetBreakpointAtLine(name, | 4187 Isolate::Current()->debugger()->SetBreakpointAtLine(name, |
4187 kBreakpointLine); | 4188 kBreakpointLine); |
4188 ASSERT(bpt != NULL); | 4189 ASSERT(bpt != NULL); |
4189 EXPECT(!func_b.CanBeInlined()); | 4190 EXPECT(!func_b.CanBeInlined()); |
4190 } | 4191 } |
4191 | 4192 |
4192 | 4193 |
4193 TEST_CASE(SpecialClassesHaveEmptyArrays) { | 4194 TEST_CASE(SpecialClassesHaveEmptyArrays) { |
4194 ObjectStore* object_store = Isolate::Current()->object_store(); | 4195 ObjectStore* object_store = Isolate::Current()->object_store(); |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4743 EXPECT(iterator.MoveNext()); | 4744 EXPECT(iterator.MoveNext()); |
4744 object = iterator.CurrentKey(); | 4745 object = iterator.CurrentKey(); |
4745 EXPECT_STREQ("z", object.ToCString()); | 4746 EXPECT_STREQ("z", object.ToCString()); |
4746 object = iterator.CurrentValue(); | 4747 object = iterator.CurrentValue(); |
4747 EXPECT_STREQ("5", object.ToCString()); | 4748 EXPECT_STREQ("5", object.ToCString()); |
4748 | 4749 |
4749 EXPECT(!iterator.MoveNext()); | 4750 EXPECT(!iterator.MoveNext()); |
4750 } | 4751 } |
4751 | 4752 |
4752 } // namespace dart | 4753 } // namespace dart |
OLD | NEW |