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

Unified Diff: runtime/bin/vmservice_impl.cc

Issue 1536003002: VM: Remove non-existent/unused functions from precompiled entry points. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice_impl.cc
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index f46a66aa918d1b84c77b6b39b3c6d68301812924..2715abc26f2cde2119c284ce166fecae98ed6054 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -89,14 +89,6 @@ class Resources {
};
-void TriggerResourceLoad(Dart_NativeArguments args) {
rmacnak 2015/12/18 18:49:57 Remove also the friend declaration from bin/vmserv
Florian Schneider 2016/01/04 11:20:53 Done.
- Dart_Handle library = Dart_RootLibrary();
- ASSERT(!Dart_IsError(library));
- Dart_Handle result = VmService::LoadResources(library);
- ASSERT(!Dart_IsError(result));
-}
-
-
void NotifyServerState(Dart_NativeArguments args) {
Dart_EnterScope();
const char* ip_chars;
@@ -131,7 +123,6 @@ struct VmServiceIONativeEntry {
static VmServiceIONativeEntry _VmServiceIONativeEntries[] = {
- {"VMServiceIO_TriggerResourceLoad", 0, TriggerResourceLoad},
{"VMServiceIO_NotifyServerState", 2, NotifyServerState},
};
@@ -327,63 +318,6 @@ Dart_Handle VmService::LoadSource(Dart_Handle library, const char* name) {
}
-Dart_Handle VmService::LoadResource(Dart_Handle library,
- const char* resource_name) {
- // Prepare for invoke call.
- Dart_Handle name = Dart_NewStringFromCString(resource_name);
- RETURN_ERROR_HANDLE(name);
- const char* data_buffer = NULL;
- int data_buffer_length = Resources::ResourceLookup(resource_name,
- &data_buffer);
- if (data_buffer_length == Resources::kNoSuchInstance) {
- printf("Could not find %s %s\n", resource_name, resource_name);
- }
- ASSERT(data_buffer_length != Resources::kNoSuchInstance);
- Dart_Handle data_list = Dart_NewTypedData(Dart_TypedData_kUint8,
- data_buffer_length);
- RETURN_ERROR_HANDLE(data_list);
- Dart_TypedData_Type type = Dart_TypedData_kInvalid;
- void* data_list_buffer = NULL;
- intptr_t data_list_buffer_length = 0;
- Dart_Handle result = Dart_TypedDataAcquireData(data_list, &type,
- &data_list_buffer,
- &data_list_buffer_length);
- RETURN_ERROR_HANDLE(result);
- ASSERT(data_buffer_length == data_list_buffer_length);
- ASSERT(data_list_buffer != NULL);
- ASSERT(type == Dart_TypedData_kUint8);
- memmove(data_list_buffer, &data_buffer[0], data_buffer_length);
- result = Dart_TypedDataReleaseData(data_list);
- RETURN_ERROR_HANDLE(result);
-
- // Make invoke call.
- const intptr_t kNumArgs = 3;
- Dart_Handle compressed = Dart_True();
- Dart_Handle args[kNumArgs] = { name, data_list, compressed };
- result = Dart_Invoke(library, Dart_NewStringFromCString("_addResource"),
- kNumArgs, args);
- return result;
-}
-
-
-Dart_Handle VmService::LoadResources(Dart_Handle library) {
- Dart_Handle result = Dart_Null();
- intptr_t prefixLen = strlen(kLibrarySourceNamePrefix);
- for (intptr_t i = 0; Resources::Path(i) != NULL; i++) {
- const char* path = Resources::Path(i);
- // If it doesn't begin with kLibrarySourceNamePrefix it is a frontend
- // resource.
- if (strncmp(path, kLibrarySourceNamePrefix, prefixLen) != 0) {
- result = LoadResource(library, path);
- if (Dart_IsError(result)) {
- break;
- }
- }
- }
- return result;
-}
-
-
Dart_Handle VmService::LibraryTagHandler(Dart_LibraryTag tag,
Dart_Handle library,
Dart_Handle url) {
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698