Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart |
| index 6c266153502120b97a67edcb207ad9877eaddfc2..0a4eea8fa1a12bcdd43dda03841b4814886277c4 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart |
| @@ -312,9 +312,16 @@ class OldEmitter implements Emitter { |
| tmp.prototype = superConstructor.prototype; |
| var object = new tmp(); |
| var properties = constructor.prototype; |
| - for (var member in properties) |
| - if (hasOwnProperty.call(properties, member)) |
| - object[member] = properties[member]; |
| + for (var member in properties) { |
| + if (hasOwnProperty.call(properties, member)) { |
| + var s = member.split(':'); |
| + if (s.length > 1) { |
| + object[s[0]] = object[s[1]] = properties[member]; |
| + } else { |
| + object[member] = properties[member]; |
| + } |
| + } |
| + } |
| object.constructor = constructor; |
| constructor.prototype = object; |
| return object; |
| @@ -373,8 +380,8 @@ class OldEmitter implements Emitter { |
| if (desc instanceof Array) desc = desc[1]; |
| /* The 'fields' are either a constructor function or a |
| - * string encoding fields, constructor and superclass. Get |
| - * the superclass and the fields in the format |
| + * string encoding fields, constructor and superclass. Get the |
|
floitsch
2014/11/04 13:35:21
Gets
herhut
2014/11/04 13:55:37
Done.
|
| + * superclass and fields in the format |
| * '[name/]Super;field1,field2' |
| * from the CLASS_DESCRIPTOR_PROPERTY property on the descriptor. |
| * The 'name/' is optional and contains the name that should be used |