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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 17825002: Remove support for 'argument definitions test' from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove SentinelConstant. Created 7 years, 6 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 part of js_backend; 5 part of js_backend;
6 6
7 /** 7 /**
8 * A function element that represents a closure call. The signature is copied 8 * A function element that represents a closure call. The signature is copied
9 * from the given element. 9 * from the given element.
10 */ 10 */
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 argumentsBuffer[count] = js(jsName); 1002 argumentsBuffer[count] = js(jsName);
1003 } else { 1003 } else {
1004 int index = names.indexOf(element.name); 1004 int index = names.indexOf(element.name);
1005 if (index != -1) { 1005 if (index != -1) {
1006 indexOfLastOptionalArgumentInParameters = count; 1006 indexOfLastOptionalArgumentInParameters = count;
1007 // The order of the named arguments is not the same as the 1007 // The order of the named arguments is not the same as the
1008 // one in the real method (which is in Dart source order). 1008 // one in the real method (which is in Dart source order).
1009 argumentsBuffer[count] = js(jsName); 1009 argumentsBuffer[count] = js(jsName);
1010 parametersBuffer[optionalParameterStart + index] = 1010 parametersBuffer[optionalParameterStart + index] =
1011 new jsAst.Parameter(jsName); 1011 new jsAst.Parameter(jsName);
1012 // Note that [elements] may be null for a synthesized [member].
1013 } else if (elements != null && elements.isParameterChecked(element)) {
1014 argumentsBuffer[count] = constantReference(SentinelConstant.SENTINEL);
1015 } else { 1012 } else {
1016 Constant value = handler.initialVariableValues[element]; 1013 Constant value = handler.initialVariableValues[element];
1017 if (value == null) { 1014 if (value == null) {
1018 argumentsBuffer[count] = constantReference(new NullConstant()); 1015 argumentsBuffer[count] = constantReference(new NullConstant());
1019 } else { 1016 } else {
1020 if (!value.isNull()) { 1017 if (!value.isNull()) {
1021 // If the value is the null constant, we should not pass it 1018 // If the value is the null constant, we should not pass it
1022 // down to the native method. 1019 // down to the native method.
1023 indexOfLastOptionalArgumentInParameters = count; 1020 indexOfLastOptionalArgumentInParameters = count;
1024 } 1021 }
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after
3642 3639
3643 const String HOOKS_API_USAGE = """ 3640 const String HOOKS_API_USAGE = """
3644 // The code supports the following hooks: 3641 // The code supports the following hooks:
3645 // dartPrint(message) - if this function is defined it is called 3642 // dartPrint(message) - if this function is defined it is called
3646 // instead of the Dart [print] method. 3643 // instead of the Dart [print] method.
3647 // dartMainRunner(main) - if this function is defined, the Dart [main] 3644 // dartMainRunner(main) - if this function is defined, the Dart [main]
3648 // method will not be invoked directly. 3645 // method will not be invoked directly.
3649 // Instead, a closure that will invoke [main] is 3646 // Instead, a closure that will invoke [main] is
3650 // passed to [dartMainRunner]. 3647 // passed to [dartMainRunner].
3651 """; 3648 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698