| 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 4066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4077 const String& name = String::Handle(String::New(TestCase::url())); | 4077 const String& name = String::Handle(String::New(TestCase::url())); |
| 4078 const Library& vmlib = Library::Handle(Library::LookupLibrary(thread, name)); | 4078 const Library& vmlib = Library::Handle(Library::LookupLibrary(thread, name)); |
| 4079 EXPECT(!vmlib.IsNull()); | 4079 EXPECT(!vmlib.IsNull()); |
| 4080 const Class& class_a = Class::Handle( | 4080 const Class& class_a = Class::Handle( |
| 4081 vmlib.LookupClass(String::Handle(Symbols::New(thread, "A")))); | 4081 vmlib.LookupClass(String::Handle(Symbols::New(thread, "A")))); |
| 4082 const Function& func_b = | 4082 const Function& func_b = |
| 4083 Function::Handle(GetFunction(class_a, "b")); | 4083 Function::Handle(GetFunction(class_a, "b")); |
| 4084 EXPECT(func_b.CanBeInlined()); | 4084 EXPECT(func_b.CanBeInlined()); |
| 4085 | 4085 |
| 4086 // After setting a breakpoint in a function A.b, it is no longer inlineable. | 4086 // After setting a breakpoint in a function A.b, it is no longer inlineable. |
| 4087 Breakpoint* bpt = | 4087 result = Dart_SetBreakpoint(NewString(TestCase::url()), kBreakpointLine); |
| 4088 Isolate::Current()->debugger()->SetBreakpointAtLine(name, | 4088 EXPECT_VALID(result); |
| 4089 kBreakpointLine); | |
| 4090 ASSERT(bpt != NULL); | |
| 4091 EXPECT(!func_b.CanBeInlined()); | 4089 EXPECT(!func_b.CanBeInlined()); |
| 4092 } | 4090 } |
| 4093 | 4091 |
| 4094 | 4092 |
| 4095 VM_TEST_CASE(SpecialClassesHaveEmptyArrays) { | 4093 VM_TEST_CASE(SpecialClassesHaveEmptyArrays) { |
| 4096 ObjectStore* object_store = Isolate::Current()->object_store(); | 4094 ObjectStore* object_store = Isolate::Current()->object_store(); |
| 4097 Class& cls = Class::Handle(); | 4095 Class& cls = Class::Handle(); |
| 4098 Object& array = Object::Handle(); | 4096 Object& array = Object::Handle(); |
| 4099 | 4097 |
| 4100 cls = object_store->null_class(); | 4098 cls = object_store->null_class(); |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4725 String& test = String::Handle(); | 4723 String& test = String::Handle(); |
| 4726 String& result = String::Handle(); | 4724 String& result = String::Handle(); |
| 4727 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { | 4725 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { |
| 4728 test = String::New(tests[i].in); | 4726 test = String::New(tests[i].in); |
| 4729 result = String::ScrubName(test); | 4727 result = String::ScrubName(test); |
| 4730 EXPECT_STREQ(tests[i].out, result.ToCString()); | 4728 EXPECT_STREQ(tests[i].out, result.ToCString()); |
| 4731 } | 4729 } |
| 4732 } | 4730 } |
| 4733 | 4731 |
| 4734 } // namespace dart | 4732 } // namespace dart |
| OLD | NEW |