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

Unified Diff: test/generated_sdk/lib/core/function.dart

Issue 1162723007: remove generated_sdk from checked in code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 | « test/generated_sdk/lib/core/expando.dart ('k') | test/generated_sdk/lib/core/identical.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/generated_sdk/lib/core/function.dart
diff --git a/test/generated_sdk/lib/core/function.dart b/test/generated_sdk/lib/core/function.dart
deleted file mode 100644
index cdd298791c52cbd1df712a495dda9e37975587d0..0000000000000000000000000000000000000000
--- a/test/generated_sdk/lib/core/function.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.core;
-
-/**
- * The base class for all function types.
- *
- * A function value, or an instance of a class with a "call" method, is a
- * subtype of a function type, and as such, a subtype of [Function].
- */
-abstract class Function {
- /**
- * Dynamically call [function] with the specified arguments.
- *
- * Acts the same as calling function with positional arguments
- * corresponding to the elements of [positionalArguments] and
- * named arguments corresponding to the elements of [namedArguments].
- *
- * This includes giving the same errors if [function] isn't callable or
- * if it expects different parameters.
- *
- * Example:
- * Map<Symbol, dynamic> namedArguments = new Map<Symbol, dynamic>();
- * namedArguments[const Symbol("f")] = 4;
- * namedArguments[const Symbol("g")] = 5;
- * Function.apply(foo, [1,2,3], namedArguments);
- *
- * gives exactly the same result as
- * foo(1, 2, 3, f: 4, g: 5).
- *
- * If [positionalArguments] is null, it's considered an empty list.
- * If [namedArguments] is omitted or null, it is considered an empty map.
- */
- static apply(Function f,
- List positionalArguments,
- [Map<Symbol, dynamic> namedArguments]) {
- // TODO(vsm): Handle named args.
- // See: https://github.com/dart-lang/dev_compiler/issues/176
- return JS('', 'dart.dcall.apply(null, [#].concat(#))', f, positionalArguments);
- }
-
- /**
- * Returns a hash code value that is compatible with `operator==`.
- */
- int get hashCode;
-
- /**
- * Test whether another object is equal to this function.
- *
- * System-created function objects are only equal to other functions.
- *
- * Two function objects are known to represent the same function if
- *
- * - It is the same object. Static and top-level functions are compile time
- * constants when used as values, so referring to the same function twice
- * always give the same object,
- * - or if they refer to the same member method extracted from the same object.
- * Extracting a member method as a function value twice gives equal, but
- * not necessarily identical, function values.
- *
- * Function expressions never give rise to equal function objects. Each time
- * a function expression is evaluated, it creates a new closure value that
- * is not known to be equal to other closures created by the same expression.
- *
- * Classes implementing `Function` by having a `call` method should have their
- * own `operator==` and `hashCode` depending on the object.
- */
- bool operator==(Object other);
-
- static Map<String, dynamic> _toMangledNames(
- Map<Symbol, dynamic> namedArguments) {
- Map<String, dynamic> result = {};
- namedArguments.forEach((symbol, value) {
- result[_symbolToString(symbol)] = value;
- });
- return result;
- }
-}
« no previous file with comments | « test/generated_sdk/lib/core/expando.dart ('k') | test/generated_sdk/lib/core/identical.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698