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

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

Issue 227433004: Add runtime and native entry tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after
4579 const Script& script = Script::Handle( 4579 const Script& script = Script::Handle(
4580 isolate, Script::New(url_str, source_str, RawScript::kPatchTag)); 4580 isolate, Script::New(url_str, source_str, RawScript::kPatchTag));
4581 Dart_Handle result; 4581 Dart_Handle result;
4582 CompileSource(isolate, lib, script, &result); 4582 CompileSource(isolate, lib, script, &result);
4583 return result; 4583 return result;
4584 } 4584 }
4585 4585
4586 4586
4587 DART_EXPORT Dart_Handle Dart_SetNativeResolver( 4587 DART_EXPORT Dart_Handle Dart_SetNativeResolver(
4588 Dart_Handle library, 4588 Dart_Handle library,
4589 Dart_NativeEntryResolver resolver) { 4589 Dart_NativeEntryResolver resolver,
4590 Dart_NativeEntrySymbol symbol) {
4590 Isolate* isolate = Isolate::Current(); 4591 Isolate* isolate = Isolate::Current();
4591 DARTSCOPE(isolate); 4592 DARTSCOPE(isolate);
4592 const Library& lib = Api::UnwrapLibraryHandle(isolate, library); 4593 const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
4593 if (lib.IsNull()) { 4594 if (lib.IsNull()) {
4594 RETURN_TYPE_ERROR(isolate, library, Library); 4595 RETURN_TYPE_ERROR(isolate, library, Library);
4595 } 4596 }
4596 lib.set_native_entry_resolver(resolver); 4597 lib.set_native_entry_resolver(resolver);
4598 lib.set_native_entry_symbol_resolver(symbol);
4597 return Api::Success(); 4599 return Api::Success();
4598 } 4600 }
4599 4601
4600 4602
4601 // --- Peer support --- 4603 // --- Peer support ---
4602 4604
4603 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) { 4605 DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer) {
4604 if (peer == NULL) { 4606 if (peer == NULL) {
4605 RETURN_NULL_ERROR(peer); 4607 RETURN_NULL_ERROR(peer);
4606 } 4608 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
4664 4666
4665 4667
4666 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 4668 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
4667 const char* name, 4669 const char* name,
4668 Dart_ServiceRequestCallback callback, 4670 Dart_ServiceRequestCallback callback,
4669 void* user_data) { 4671 void* user_data) {
4670 Service::RegisterRootEmbedderCallback(name, callback, user_data); 4672 Service::RegisterRootEmbedderCallback(name, callback, user_data);
4671 } 4673 }
4672 4674
4673 } // namespace dart 4675 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698