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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 1154073004: Change more JS foreign methods to JS_GET_NAME. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix long lines. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_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/compiler/js_lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index fbc74d3cb3131bdc6a62d0e027a493aa8f31d10b..3fa9543f459ca54f68cb2acb0816363b774222fb 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -2318,7 +2318,8 @@ abstract class Closure implements Function {
throw 'Error in reflectionInfo.';
}
- JS('', '#[#] = #', prototype, JS_GET_NAME(JsGetName.SIGNATURE_NAME), signatureFunction);
+ JS('', '#[#] = #', prototype, JS_GET_NAME(JsGetName.SIGNATURE_NAME),
+ signatureFunction);
JS('', '#[#] = #', prototype, callName, trampoline);
for (int i = 1; i < functions.length; i++) {
@@ -3221,7 +3222,8 @@ class RuntimeFunctionType extends RuntimeType {
_extractFunctionTypeObjectFrom(o) {
var interceptor = getInterceptor(o);
- return JS('bool', '# in #', JS_GET_NAME(JsGetName.SIGNATURE_NAME), interceptor)
+ var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME);
+ return JS('bool', '# in #', signatureName, interceptor)
? JS('', '#[#]()', interceptor, JS_GET_NAME(JsGetName.SIGNATURE_NAME))
: null;
}
@@ -3229,20 +3231,24 @@ class RuntimeFunctionType extends RuntimeType {
toRti() {
var result = createDartFunctionTypeRti();
if (isVoid) {
- JS('', '#[#] = true', result, JS_GET_NAME(JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG));
+ JS('', '#[#] = true', result,
+ JS_GET_NAME(JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG));
} else {
if (returnType is! DynamicRuntimeType) {
- JS('', '#[#] = #', result, JS_GET_NAME(JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG),
+ JS('', '#[#] = #', result,
+ JS_GET_NAME(JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG),
returnType.toRti());
}
}
if (parameterTypes != null && !parameterTypes.isEmpty) {
- JS('', '#[#] = #', result, JS_GET_NAME(JsGetName.FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG),
+ JS('', '#[#] = #', result,
+ JS_GET_NAME(JsGetName.FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG),
listToRti(parameterTypes));
}
if (optionalParameterTypes != null && !optionalParameterTypes.isEmpty) {
- JS('', '#[#] = #', result, JS_GET_NAME(JsGetName.FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG),
+ JS('', '#[#] = #', result,
+ JS_GET_NAME(JsGetName.FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG),
listToRti(optionalParameterTypes));
}
@@ -3254,7 +3260,8 @@ class RuntimeFunctionType extends RuntimeType {
var rti = JS('', '#[#]', namedParameters, name).toRti();
JS('', '#[#] = #', namedRti, name, rti);
}
- JS('', '#[#] = #', result, JS_GET_NAME(JsGetName.FUNCTION_TYPE_NAMED_PARAMETERS_TAG),
+ JS('', '#[#] = #', result,
+ JS_GET_NAME(JsGetName.FUNCTION_TYPE_NAMED_PARAMETERS_TAG),
namedRti);
}
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/js_lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698