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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart

Issue 13876004: Remove some unused functions from Object.prototype (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index d3229e63127b8dfe8e8b137da7425660d6033818..0865c2db8e0926afe7cc73365cb73f2afb9c1509 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -496,34 +496,9 @@ class NativeEmitter {
}
emitIsChecks();
- jsAst.Expression makeCallOnThis(String functionName) {
- // Because we know the function is intercepted, we need an extra
- // parameter.
- return js.fun(['_'], js.return_(js('$functionName(this)')));
- }
-
if (!nativeClasses.isEmpty) {
emitDynamicDispatchMetadata();
- // In order to have the toString method on every native class,
- // we must patch the JS Object prototype with a helper method.
- String toStringName = backend.namer.publicInstanceMethodNameByArity(
- const SourceString('toString'), 0);
- addProperty(toStringName, makeCallOnThis(toStringHelperName));
-
- // Same as above, but for hashCode.
- String hashCodeName =
- backend.namer.publicGetterName(const SourceString('hashCode'));
- addProperty(hashCodeName, makeCallOnThis(hashCodeHelperName));
-
- // Same as above, but for operator==.
- String equalsName = backend.namer.publicInstanceMethodNameByArity(
- const SourceString('=='), 1);
- // Because we know the function is intercepted, we need an extra
- // parameter.
- addProperty(equalsName, js.fun(['_', 'a'],
- js.return_(js('this === a'))));
-
// If the native emitter has been asked to take care of the
// noSuchMethod handlers, we do that now.
if (handleNoSuchMethod) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698