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

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: . 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 EXPECT(!vmlib.IsNull()); 177 EXPECT(!vmlib.IsNull());
178 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL); 178 Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
179 EXPECT_VALID(result); 179 EXPECT_VALID(result);
180 const Class& class_a = Class::Handle(GetClass(vmlib, "A")); 180 const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
181 EXPECT(!class_a.IsNull()); 181 EXPECT(!class_a.IsNull());
182 const Function& function_c = Function::Handle(GetFunction(class_a, "c")); 182 const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
183 EXPECT(!function_c.IsNull()); 183 EXPECT(!function_c.IsNull());
184 const Code& code_c = Code::Handle(function_c.CurrentCode()); 184 const Code& code_c = Code::Handle(function_c.CurrentCode());
185 EXPECT(!code_c.IsNull()); 185 EXPECT(!code_c.IsNull());
186 // Use the entry of the code object as it's reference. 186 // Use the entry of the code object as it's reference.
187 uword entry = code_c.EntryPoint(); 187 uword entry = code_c.PayloadStart();
188 int64_t compile_timestamp = code_c.compile_timestamp(); 188 int64_t compile_timestamp = code_c.compile_timestamp();
189 EXPECT_GT(code_c.Size(), 16); 189 EXPECT_GT(code_c.Size(), 16);
190 uword last = entry + code_c.Size(); 190 uword last = entry + code_c.Size();
191 191
192 // Build a mock message handler and wrap it in a dart port. 192 // Build a mock message handler and wrap it in a dart port.
193 ServiceTestMessageHandler handler; 193 ServiceTestMessageHandler handler;
194 Dart_Port port_id = PortMap::CreatePort(&handler); 194 Dart_Port port_id = PortMap::CreatePort(&handler);
195 Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id)); 195 Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
196 EXPECT_VALID(port); 196 EXPECT_VALID(port);
197 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); 197 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); 721 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage());
722 // Expect error. 722 // Expect error.
723 EXPECT_SUBSTRING("\"error\"", handler.msg()); 723 EXPECT_SUBSTRING("\"error\"", handler.msg());
724 } 724 }
725 725
726 #endif // !defined(TARGET_ARCH_ARM64) 726 #endif // !defined(TARGET_ARCH_ARM64)
727 727
728 #endif // !PRODUCT 728 #endif // !PRODUCT
729 729
730 } // namespace dart 730 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698