eee4bbc1ef
- Implement hashCode in the VM. - Mark hashCode as unimplemented in dart2js. - Update test using the identity hashcode. Review URL: https://codereview.chromium.org//10956026 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12669 260f80e4-7a28-3924-810f-c04153c831b5
28 lines
634 B
Dart
28 lines
634 B
Dart
// Copyright (c) 2012, 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.
|
|
|
|
/**
|
|
* Everything in Dart is an [Object].
|
|
*/
|
|
class Object {
|
|
const Object();
|
|
|
|
bool operator ==(other) => identical(this, other);
|
|
|
|
external int hashCode();
|
|
|
|
external String toString();
|
|
|
|
external void noSuchMethod(String name, List args);
|
|
|
|
external Type runtimeType();
|
|
}
|
|
|
|
abstract class Type {}
|
|
|
|
/**
|
|
* Check whether two references are to the same object.
|
|
*/
|
|
bool identical(Object a, Object b) => a === b;
|