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

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

Issue 24975002: - Implement a first cut for const String.env in the VM to allow (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
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 3771 matching lines...) Expand 10 before | Expand all | Expand 10 after
3782 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3782 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3783 Isolate* isolate = arguments->isolate(); 3783 Isolate* isolate = arguments->isolate();
3784 CHECK_ISOLATE(isolate); 3784 CHECK_ISOLATE(isolate);
3785 ASSERT(isolate->api_state() != NULL && 3785 ASSERT(isolate->api_state() != NULL &&
3786 (isolate->api_state()->IsValidWeakPersistentHandle(rval) || 3786 (isolate->api_state()->IsValidWeakPersistentHandle(rval) ||
3787 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval))); 3787 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval)));
3788 Api::SetWeakHandleReturnValue(arguments, rval); 3788 Api::SetWeakHandleReturnValue(arguments, rval);
3789 } 3789 }
3790 3790
3791 3791
3792 // --- Configurations ---
3793 DART_EXPORT Dart_Handle Dart_SetConfigCallback(
3794 Dart_ConfigCallback callback) {
3795 Isolate* isolate = Isolate::Current();
3796 CHECK_ISOLATE(isolate);
3797 isolate->set_config_callback(callback);
3798 return Api::Success();
3799 }
3800
3801
3802 // --- Scripts and Libraries ---
3792 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 3803 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
3793 bool retval) { 3804 bool retval) {
3794 TRACE_API_CALL(CURRENT_FUNC); 3805 TRACE_API_CALL(CURRENT_FUNC);
3795 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3806 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3796 arguments->SetReturn(Bool::Get(retval)); 3807 arguments->SetReturn(Bool::Get(retval));
3797 } 3808 }
3798 3809
3799 3810
3800 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, 3811 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args,
3801 int64_t retval) { 3812 int64_t retval) {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
4284 } 4295 }
4285 { 4296 {
4286 NoGCScope no_gc; 4297 NoGCScope no_gc;
4287 RawObject* raw_obj = obj.raw(); 4298 RawObject* raw_obj = obj.raw();
4288 isolate->heap()->SetPeer(raw_obj, peer); 4299 isolate->heap()->SetPeer(raw_obj, peer);
4289 } 4300 }
4290 return Api::Success(); 4301 return Api::Success();
4291 } 4302 }
4292 4303
4293 } // namespace dart 4304 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698