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

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

Issue 10827288: - Support for patching of class methods and fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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"
(...skipping 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 Isolate* isolate = Isolate::Current(); 2679 Isolate* isolate = Isolate::Current();
2680 DARTSCOPE(isolate); 2680 DARTSCOPE(isolate);
2681 const Function& func = Api::UnwrapFunctionHandle(isolate, function); 2681 const Function& func = Api::UnwrapFunctionHandle(isolate, function);
2682 if (func.IsNull()) { 2682 if (func.IsNull()) {
2683 RETURN_TYPE_ERROR(isolate, function, Function); 2683 RETURN_TYPE_ERROR(isolate, function, Function);
2684 } 2684 }
2685 if (func.IsNonImplicitClosureFunction()) { 2685 if (func.IsNonImplicitClosureFunction()) {
2686 RawFunction* parent_function = func.parent_function(); 2686 RawFunction* parent_function = func.parent_function();
2687 return Api::NewHandle(isolate, parent_function); 2687 return Api::NewHandle(isolate, parent_function);
2688 } 2688 }
2689 const Class& owner = Class::Handle(func.owner()); 2689 const Class& owner = Class::Handle(func.Owner());
2690 ASSERT(!owner.IsNull()); 2690 ASSERT(!owner.IsNull());
2691 if (owner.IsTopLevel()) { 2691 if (owner.IsTopLevel()) {
2692 // Top-level functions are implemented as members of a hidden class. We hide 2692 // Top-level functions are implemented as members of a hidden class. We hide
2693 // that class here and instead answer the library. 2693 // that class here and instead answer the library.
2694 #if defined(DEBUG) 2694 #if defined(DEBUG)
2695 const Library& lib = Library::Handle(owner.library()); 2695 const Library& lib = Library::Handle(owner.library());
2696 if (lib.IsNull()) { 2696 if (lib.IsNull()) {
2697 ASSERT(owner.IsDynamicClass() || owner.IsVoidClass()); 2697 ASSERT(owner.IsDynamicClass() || owner.IsVoidClass());
2698 } 2698 }
2699 #endif 2699 #endif
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
4081 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { 4081 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) {
4082 Dart::set_perf_events_writer(function); 4082 Dart::set_perf_events_writer(function);
4083 } 4083 }
4084 4084
4085 4085
4086 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { 4086 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) {
4087 Dart::set_flow_graph_writer(function); 4087 Dart::set_flow_graph_writer(function);
4088 } 4088 }
4089 4089
4090 } // namespace dart 4090 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698