OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "include/dart_tools_api.h" | 7 #include "include/dart_tools_api.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 EXPECT(!vmlib.IsNull()); | 221 EXPECT(!vmlib.IsNull()); |
222 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); | 222 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); |
223 EXPECT_VALID(result); | 223 EXPECT_VALID(result); |
224 const Class& class_a = Class::Handle(GetClass(vmlib, "A")); | 224 const Class& class_a = Class::Handle(GetClass(vmlib, "A")); |
225 EXPECT(!class_a.IsNull()); | 225 EXPECT(!class_a.IsNull()); |
226 const Function& function_c = Function::Handle(GetFunction(class_a, "c")); | 226 const Function& function_c = Function::Handle(GetFunction(class_a, "c")); |
227 EXPECT(!function_c.IsNull()); | 227 EXPECT(!function_c.IsNull()); |
228 const Code& code_c = Code::Handle(function_c.CurrentCode()); | 228 const Code& code_c = Code::Handle(function_c.CurrentCode()); |
229 EXPECT(!code_c.IsNull()); | 229 EXPECT(!code_c.IsNull()); |
230 // Use the entry of the code object as it's reference. | 230 // Use the entry of the code object as it's reference. |
231 uword entry = code_c.EntryPoint(); | 231 uword entry = code_c.PayloadStart(); |
232 int64_t compile_timestamp = code_c.compile_timestamp(); | 232 int64_t compile_timestamp = code_c.compile_timestamp(); |
233 EXPECT_GT(code_c.Size(), 16); | 233 EXPECT_GT(code_c.Size(), 16); |
234 uword last = entry + code_c.Size(); | 234 uword last = entry + code_c.Size(); |
235 | 235 |
236 // Build a mock message handler and wrap it in a dart port. | 236 // Build a mock message handler and wrap it in a dart port. |
237 ServiceTestMessageHandler handler; | 237 ServiceTestMessageHandler handler; |
238 Dart_Port port_id = PortMap::CreatePort(&handler); | 238 Dart_Port port_id = PortMap::CreatePort(&handler); |
239 Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id)); | 239 Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id)); |
240 EXPECT_VALID(port); | 240 EXPECT_VALID(port); |
241 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); | 241 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); | 765 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); |
766 // Expect error. | 766 // Expect error. |
767 EXPECT_SUBSTRING("\"error\"", handler.msg()); | 767 EXPECT_SUBSTRING("\"error\"", handler.msg()); |
768 } | 768 } |
769 | 769 |
770 #endif // !defined(TARGET_ARCH_ARM64) | 770 #endif // !defined(TARGET_ARCH_ARM64) |
771 | 771 |
772 #endif // !PRODUCT | 772 #endif // !PRODUCT |
773 | 773 |
774 } // namespace dart | 774 } // namespace dart |
OLD | NEW |