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

Side by Side Diff: lib/runtime/dart_core.js

Issue 1034273003: fix for static methods and names banned in strict mode (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 var core;
6 (function (core) {
7 'use strict';
8
9 // TODO(jmesserly): for now this is copy+paste from dart/core.js
10 class Object {
11 constructor() {
12 var name = this.constructor.name;
13 var init = this[name];
14 var result = void 0;
15 if (init)
16 result = init.apply(this, arguments);
17 return result === void 0 ? this : result;
18 }
19 ['=='](other) {
20 return identical(this, other);
21 }
22 get hashCode() {
23 return _js_helper.Primitives.objectHashCode(this);
24 }
25 toString() {
26 return _js_helper.Primitives.objectToString(this);
27 }
28 noSuchMethod(invocation) {
29 throw new NoSuchMethodError(this, invocation.memberName, invocation.positi onalArguments, invocation.namedArguments);
30 }
31 get runtimeType() {
32 return _js_helper.getRuntimeType(this);
33 }
34 }
35 core.Object = Object;
36
37 // Function identical: (Object, Object) → bool
38 function identical(a, b) {
39 return _js_helper.Primitives.identicalImplementation(a, b);
40 }
41 core.identical = identical;
42
43 // Function print: (Object) → void
44 function print(obj) {
45 console.log(obj.toString());
46 }
47 core.print = print;
48
49 // Class NoSuchMethodError
50 var NoSuchMethodError = (function () {
51 // TODO(vsm): Implement.
52 function NoSuchMethodError(f, args) {
53 }
54 return NoSuchMethodError;
55 })();
56 core.NoSuchMethodError = NoSuchMethodError;
57
58 // Class UnimplementedError
59 var UnimplementedError = (function () {
60 // TODO(vsm): Implement.
61 function UnimplementedError(message) {
62 this.message = (message != void 0) ? message : null;
63 }
64 return UnimplementedError;
65 })();
66 core.UnimplementedError = UnimplementedError;
67 })(core || (core = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698