Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: runtime/vm/service_test.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/runtime_entry_list.h ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry_list.h ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698