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

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

Issue 59933004: In preparation of inlining remainder and modulo binary Smi operations: (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/lib/integers.dart ('k') | runtime/vm/flow_graph_builder.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 20 matching lines...) Expand all
31 #include "vm/symbols.h" 31 #include "vm/symbols.h"
32 #include "vm/timer.h" 32 #include "vm/timer.h"
33 #include "vm/unicode.h" 33 #include "vm/unicode.h"
34 #include "vm/verifier.h" 34 #include "vm/verifier.h"
35 #include "vm/version.h" 35 #include "vm/version.h"
36 36
37 namespace dart { 37 namespace dart {
38 38
39 DECLARE_FLAG(bool, print_class_table); 39 DECLARE_FLAG(bool, print_class_table);
40 DECLARE_FLAG(bool, verify_handles); 40 DECLARE_FLAG(bool, verify_handles);
41 DEFINE_FLAG(bool, check_function_fingerprints, false,
42 "Check function fingerprints");
41 DEFINE_FLAG(bool, trace_api, false, 43 DEFINE_FLAG(bool, trace_api, false,
42 "Trace invocation of API calls (debug mode only)"); 44 "Trace invocation of API calls (debug mode only)");
43 45
44 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; 46 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey;
45 Dart_Handle Api::true_handle_ = NULL; 47 Dart_Handle Api::true_handle_ = NULL;
46 Dart_Handle Api::false_handle_ = NULL; 48 Dart_Handle Api::false_handle_ = NULL;
47 Dart_Handle Api::null_handle_ = NULL; 49 Dart_Handle Api::null_handle_ = NULL;
48 50
49 51
50 const char* CanonicalFunction(const char* func) { 52 const char* CanonicalFunction(const char* func) {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 char* isolate_name = BuildIsolateName(script_uri, main); 814 char* isolate_name = BuildIsolateName(script_uri, main);
813 Isolate* isolate = Dart::CreateIsolate(isolate_name); 815 Isolate* isolate = Dart::CreateIsolate(isolate_name);
814 free(isolate_name); 816 free(isolate_name);
815 { 817 {
816 StackZone zone(isolate); 818 StackZone zone(isolate);
817 HANDLESCOPE(isolate); 819 HANDLESCOPE(isolate);
818 const Error& error_obj = 820 const Error& error_obj =
819 Error::Handle(isolate, 821 Error::Handle(isolate,
820 Dart::InitializeIsolate(snapshot, callback_data)); 822 Dart::InitializeIsolate(snapshot, callback_data));
821 if (error_obj.IsNull()) { 823 if (error_obj.IsNull()) {
824 if (FLAG_check_function_fingerprints) {
825 Library::CheckFunctionFingerprints();
826 }
822 START_TIMER(time_total_runtime); 827 START_TIMER(time_total_runtime);
823 return reinterpret_cast<Dart_Isolate>(isolate); 828 return reinterpret_cast<Dart_Isolate>(isolate);
824 } 829 }
825 *error = strdup(error_obj.ToErrorCString()); 830 *error = strdup(error_obj.ToErrorCString());
826 } 831 }
827 Dart::ShutdownIsolate(); 832 Dart::ShutdownIsolate();
828 return reinterpret_cast<Dart_Isolate>(NULL); 833 return reinterpret_cast<Dart_Isolate>(NULL);
829 } 834 }
830 835
831 836
(...skipping 3590 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 } 4427 }
4423 { 4428 {
4424 NoGCScope no_gc; 4429 NoGCScope no_gc;
4425 RawObject* raw_obj = obj.raw(); 4430 RawObject* raw_obj = obj.raw();
4426 isolate->heap()->SetPeer(raw_obj, peer); 4431 isolate->heap()->SetPeer(raw_obj, peer);
4427 } 4432 }
4428 return Api::Success(); 4433 return Api::Success();
4429 } 4434 }
4430 4435
4431 } // namespace dart 4436 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/integers.dart ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698