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

Unified Diff: tool/input_sdk/private/ddc_runtime/classes.dart

Issue 2061373003: implement user-defined nSM, Object members on functions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix Created 4 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 side-by-side diff with in-line comments
Download patch
Index: tool/input_sdk/private/ddc_runtime/classes.dart
diff --git a/tool/input_sdk/private/ddc_runtime/classes.dart b/tool/input_sdk/private/ddc_runtime/classes.dart
index 07987cffcac0608488f692099b40b9986ac57aec..6c63f76621895eae493cfc79cb372b52f84c2af8 100644
--- a/tool/input_sdk/private/ddc_runtime/classes.dart
+++ b/tool/input_sdk/private/ddc_runtime/classes.dart
@@ -337,12 +337,9 @@ void _installPropertiesForObject(jsProto, coreObjProto) {
return;
}
-
-///
/// Copy symbols from the prototype of the source to destination.
/// These are the only properties safe to copy onto an existing public
/// JavaScript class.
-///
registerExtension(jsType, dartExtType) => JS('', '''(() => {
// TODO(vsm): Not all registered js types are real.
if (!jsType) return;
@@ -404,18 +401,6 @@ defineExtensionMembers(type, methodNames) => JS('', '''(() => {
});
})()''');
-canonicalMember(obj, name) => JS('', '''(() => {
- // Private names are symbols and are already canonical.
- if (typeof name === 'symbol') return name;
-
- if ($obj != null && $obj[$_extensionType]) return $dartx[$name];
- // Check for certain names that we can't use in JS
- if ($name == 'constructor' || $name == 'prototype') {
- $name = '+' + $name;
- }
- return $name;
-})()''');
-
/// Sets the type of `obj` to be `type`
setType(obj, type) {
JS('', '#.__proto__ = #.prototype', obj, type);

Powered by Google App Engine
This is Rietveld 408576698