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

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 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3934 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3934 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3935 Isolate* isolate = arguments->isolate(); 3935 Isolate* isolate = arguments->isolate();
3936 CHECK_ISOLATE(isolate); 3936 CHECK_ISOLATE(isolate);
3937 ASSERT(isolate->api_state() != NULL && 3937 ASSERT(isolate->api_state() != NULL &&
3938 (isolate->api_state()->IsValidWeakPersistentHandle(rval) || 3938 (isolate->api_state()->IsValidWeakPersistentHandle(rval) ||
3939 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval))); 3939 isolate->api_state()->IsValidPrologueWeakPersistentHandle(rval)));
3940 Api::SetWeakHandleReturnValue(arguments, rval); 3940 Api::SetWeakHandleReturnValue(arguments, rval);
3941 } 3941 }
3942 3942
3943 3943
3944 // --- Configurations ---
3945 DART_EXPORT Dart_Handle Dart_SetConfigCallback(
3946 Dart_ConfigCallback callback) {
3947 Isolate* isolate = Isolate::Current();
3948 CHECK_ISOLATE(isolate);
3949 isolate->set_config_callback(callback);
3950 return Api::Success();
3951 }
3952
3953
3954 // --- Scripts and Libraries ---
3944 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 3955 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
3945 bool retval) { 3956 bool retval) {
3946 TRACE_API_CALL(CURRENT_FUNC); 3957 TRACE_API_CALL(CURRENT_FUNC);
3947 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3958 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3948 arguments->SetReturn(Bool::Get(retval)); 3959 arguments->SetReturn(Bool::Get(retval));
3949 } 3960 }
3950 3961
3951 3962
3952 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, 3963 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args,
3953 int64_t retval) { 3964 int64_t retval) {
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
4436 } 4447 }
4437 { 4448 {
4438 NoGCScope no_gc; 4449 NoGCScope no_gc;
4439 RawObject* raw_obj = obj.raw(); 4450 RawObject* raw_obj = obj.raw();
4440 isolate->heap()->SetPeer(raw_obj, peer); 4451 isolate->heap()->SetPeer(raw_obj, peer);
4441 } 4452 }
4442 return Api::Success(); 4453 return Api::Success();
4443 } 4454 }
4444 4455
4445 } // namespace dart 4456 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate.h » ('j') | sdk/lib/core/int.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698