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 SourceBreakpoint* bpt = | 4185 Breakpoint* bpt = |
4186 Isolate::Current()->debugger()->SetBreakpointAtLine(name, | 4186 Isolate::Current()->debugger()->SetBreakpointAtLine(name, |
4187 kBreakpointLine); | 4187 kBreakpointLine); |
4188 ASSERT(bpt != NULL); | 4188 ASSERT(bpt != NULL); |
4189 EXPECT(!func_b.CanBeInlined()); | 4189 EXPECT(!func_b.CanBeInlined()); |
4190 } | 4190 } |
4191 | 4191 |
4192 | 4192 |
4193 TEST_CASE(SpecialClassesHaveEmptyArrays) { | 4193 TEST_CASE(SpecialClassesHaveEmptyArrays) { |
4194 ObjectStore* object_store = Isolate::Current()->object_store(); | 4194 ObjectStore* object_store = Isolate::Current()->object_store(); |
4195 Class& cls = Class::Handle(); | 4195 Class& cls = Class::Handle(); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4593 EXPECT_VALID(h_result); | 4593 EXPECT_VALID(h_result); |
4594 Integer& result = Integer::Handle(); | 4594 Integer& result = Integer::Handle(); |
4595 result ^= Api::UnwrapHandle(h_result); | 4595 result ^= Api::UnwrapHandle(h_result); |
4596 String& foo = String::Handle(String::New("foo")); | 4596 String& foo = String::Handle(String::New("foo")); |
4597 Integer& expected = Integer::Handle(); | 4597 Integer& expected = Integer::Handle(); |
4598 expected ^= foo.HashCode(); | 4598 expected ^= foo.HashCode(); |
4599 EXPECT(result.IsIdenticalTo(expected)); | 4599 EXPECT(result.IsIdenticalTo(expected)); |
4600 } | 4600 } |
4601 | 4601 |
4602 } // namespace dart | 4602 } // namespace dart |
OLD | NEW |