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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 1311613005: Add ParameterMirror.isInitializingFormal to dart:mirrors Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | sdk/lib/_internal/js_runtime/lib/js_mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 2a91a2e34eb8247d1cd3d27c368125f8aa4b176a..c64fc17b670f6e52c69090036761cfd8439b8511 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -614,6 +614,15 @@ class ReflectionInfo {
}
}
+ bool isFieldInitializerParameter(int parameter) {
+ if (!JS_GET_FLAG('MUST_RETAIN_METADATA')) {
+ throw new StateError('metadata has not been preserved');
+ } else {
+ return JS('bool', '#[2 * # + 2*# + # + # + 1]', data, parameter,
+ optionalParameterCount, requiredParameterCount, FIRST_DEFAULT_ARGUMENT);
+ }
+ }
+
int defaultValue(int parameter) {
if (parameter < requiredParameterCount) return null;
return JS('int', '#[# + # - #]', data,
« no previous file with comments | « runtime/vm/parser.cc ('k') | sdk/lib/_internal/js_runtime/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698