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

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, 1 month 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/bootstrap_natives.h ('k') | runtime/vm/isolate.h » ('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 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after
3907 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3907 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3908 Isolate* isolate = arguments->isolate(); 3908 Isolate* isolate = arguments->isolate();
3909 CHECK_ISOLATE(isolate); 3909 CHECK_ISOLATE(isolate);
3910 ASSERT(isolate->api_state() != NULL && 3910 ASSERT(isolate->api_state() != NULL &&
3911 (isolate->api_state()->IsValidWeakPersistentHandle(rval) || 3911 (isolate->api_state()->IsValidWeakPersistentHandle(rval) ||
3912 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval))); 3912 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval)));
3913 Api::SetWeakHandleReturnValue(arguments, rval); 3913 Api::SetWeakHandleReturnValue(arguments, rval);
3914 } 3914 }
3915 3915
3916 3916
3917 // --- Configurations ---
3918 DART_EXPORT Dart_Handle Dart_SetEnvironmentCallback(
3919 Dart_EnvironmentCallback callback) {
3920 Isolate* isolate = Isolate::Current();
3921 CHECK_ISOLATE(isolate);
3922 isolate->set_environment_callback(callback);
3923 return Api::Success();
3924 }
3925
3926
3927 // --- Scripts and Libraries ---
3917 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 3928 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
3918 bool retval) { 3929 bool retval) {
3919 TRACE_API_CALL(CURRENT_FUNC); 3930 TRACE_API_CALL(CURRENT_FUNC);
3920 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3931 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3921 arguments->SetReturn(Bool::Get(retval)); 3932 arguments->SetReturn(Bool::Get(retval));
3922 } 3933 }
3923 3934
3924 3935
3925 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, 3936 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args,
3926 int64_t retval) { 3937 int64_t retval) {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 } 4420 }
4410 { 4421 {
4411 NoGCScope no_gc; 4422 NoGCScope no_gc;
4412 RawObject* raw_obj = obj.raw(); 4423 RawObject* raw_obj = obj.raw();
4413 isolate->heap()->SetPeer(raw_obj, peer); 4424 isolate->heap()->SetPeer(raw_obj, peer);
4414 } 4425 }
4415 return Api::Success(); 4426 return Api::Success();
4416 } 4427 }
4417 4428
4418 } // namespace dart 4429 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698