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

Side by Side Diff: vm/dart_api_impl.cc

Issue 9965042: - Add a class index to the classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
11 #include "vm/dart_api_impl.h" 11 #include "vm/dart_api_impl.h"
12 #include "vm/dart_api_message.h" 12 #include "vm/dart_api_message.h"
13 #include "vm/dart_api_state.h" 13 #include "vm/dart_api_state.h"
14 #include "vm/dart_entry.h" 14 #include "vm/dart_entry.h"
15 #include "vm/debuginfo.h" 15 #include "vm/debuginfo.h"
16 #include "vm/exceptions.h" 16 #include "vm/exceptions.h"
17 #include "vm/flags.h"
17 #include "vm/growable_array.h" 18 #include "vm/growable_array.h"
18 #include "vm/message.h" 19 #include "vm/message.h"
19 #include "vm/native_entry.h" 20 #include "vm/native_entry.h"
20 #include "vm/native_message_handler.h" 21 #include "vm/native_message_handler.h"
21 #include "vm/object.h" 22 #include "vm/object.h"
22 #include "vm/object_store.h" 23 #include "vm/object_store.h"
23 #include "vm/port.h" 24 #include "vm/port.h"
24 #include "vm/resolver.h" 25 #include "vm/resolver.h"
25 #include "vm/stack_frame.h" 26 #include "vm/stack_frame.h"
26 #include "vm/timer.h" 27 #include "vm/timer.h"
27 #include "vm/verifier.h" 28 #include "vm/verifier.h"
28 29
29 namespace dart { 30 namespace dart {
30 31
32 DECLARE_FLAG(bool, print_class_table);
33
31 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey; 34 ThreadLocalKey Api::api_native_key_ = Thread::kUnsetThreadLocalKey;
32 35
33 const char* CanonicalFunction(const char* func) { 36 const char* CanonicalFunction(const char* func) {
34 if (strncmp(func, "dart::", 6) == 0) { 37 if (strncmp(func, "dart::", 6) == 0) {
35 return func + 6; 38 return func + 6;
36 } else { 39 } else {
37 return func; 40 return func;
38 } 41 }
39 } 42 }
40 43
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 while (!data.done) { 804 while (!data.done) {
802 ml.Wait(); 805 ml.Wait();
803 } 806 }
804 } 807 }
805 const Object& obj = Object::Handle(isolate->object_store()->sticky_error()); 808 const Object& obj = Object::Handle(isolate->object_store()->sticky_error());
806 isolate->object_store()->clear_sticky_error(); 809 isolate->object_store()->clear_sticky_error();
807 if (obj.IsError()) { 810 if (obj.IsError()) {
808 return Api::NewHandle(isolate, obj.raw()); 811 return Api::NewHandle(isolate, obj.raw());
809 } 812 }
810 ASSERT(obj.IsNull()); 813 ASSERT(obj.IsNull());
814 if (FLAG_print_class_table) {
815 isolate->class_table()->Print();
816 }
811 return Api::Success(isolate); 817 return Api::Success(isolate);
812 } 818 }
813 819
814 820
815 DART_EXPORT Dart_Handle Dart_HandleMessage() { 821 DART_EXPORT Dart_Handle Dart_HandleMessage() {
816 Isolate* isolate = Isolate::Current(); 822 Isolate* isolate = Isolate::Current();
817 CHECK_ISOLATE(isolate); 823 CHECK_ISOLATE(isolate);
818 if (!isolate->message_handler()->HandleNextMessage()) { 824 if (!isolate->message_handler()->HandleNextMessage()) {
819 // TODO(turnidge): Clear sticky error here? 825 // TODO(turnidge): Clear sticky error here?
820 return Api::NewHandle(isolate, isolate->object_store()->sticky_error()); 826 return Api::NewHandle(isolate, isolate->object_store()->sticky_error());
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3286 *buffer = NULL; 3292 *buffer = NULL;
3287 } 3293 }
3288 delete debug_region; 3294 delete debug_region;
3289 } else { 3295 } else {
3290 *buffer = NULL; 3296 *buffer = NULL;
3291 *buffer_size = 0; 3297 *buffer_size = 0;
3292 } 3298 }
3293 } 3299 }
3294 3300
3295 } // namespace dart 3301 } // namespace dart
OLDNEW
« no previous file with comments | « vm/dart.cc ('k') | vm/intrinsifier_ia32.cc » ('j') | vm/raw_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698