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

Unified Diff: runtime/lib/mirrors.cc

Issue 2632253002: VM: [Kernel] Partial support for metadata annotations (Closed)
Patch Set: Address comments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/analyzer/ast_from_analyzer.dart ('k') | runtime/vm/kernel_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index a64dbed58cb89daa738b43516aaf357b4470175b..8a4078a984b75d3b6e0a98a15d05bfae2b292cb6 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -11,6 +11,7 @@
#include "vm/dart_entry.h"
#include "vm/exceptions.h"
#include "vm/flags.h"
+#include "vm/kernel_to_il.h"
#include "vm/object_store.h"
#include "vm/parser.h"
#include "vm/port.h"
@@ -150,8 +151,15 @@ static RawInstance* CreateParameterMirrorList(const Function& func,
// * The default value of a parameter.
// * Whether a parameters has been declared as final.
// * Any metadata associated with the parameter.
- const Object& result =
- Object::Handle(Parser::ParseFunctionParameters(func));
+ Object& result = Object::Handle();
+
+ kernel::TreeNode* kernel_node =
+ reinterpret_cast<kernel::TreeNode*>(func.kernel_function());
+ if (kernel_node != NULL) {
+ result = kernel::BuildParameterDescriptor(kernel_node);
+ } else {
+ result = Parser::ParseFunctionParameters(func);
+ }
if (result.IsError()) {
Exceptions::PropagateError(Error::Cast(result));
UNREACHABLE();
« no previous file with comments | « pkg/kernel/lib/analyzer/ast_from_analyzer.dart ('k') | runtime/vm/kernel_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698