OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of service; | 5 part of service; |
6 | 6 |
7 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
9 // object ring. | 9 // object ring. |
10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 case 'List': | 2544 case 'List': |
2545 return M.InstanceKind.list; | 2545 return M.InstanceKind.list; |
2546 case 'Map': | 2546 case 'Map': |
2547 return M.InstanceKind.map; | 2547 return M.InstanceKind.map; |
2548 case 'Float32x4': | 2548 case 'Float32x4': |
2549 return M.InstanceKind.float32x4; | 2549 return M.InstanceKind.float32x4; |
2550 case 'Float64x2': | 2550 case 'Float64x2': |
2551 return M.InstanceKind.float64x2; | 2551 return M.InstanceKind.float64x2; |
2552 case 'Int32x4': | 2552 case 'Int32x4': |
2553 return M.InstanceKind.int32x4; | 2553 return M.InstanceKind.int32x4; |
2554 case 'Uint8ClampedList': | 2554 case '_Uint8ClampedList': |
2555 return M.InstanceKind.uint8ClampedList; | 2555 return M.InstanceKind.uint8ClampedList; |
2556 case 'Uint8List': | 2556 case '_Uint8List': |
2557 return M.InstanceKind.uint8List; | 2557 return M.InstanceKind.uint8List; |
2558 case 'Uint16List': | 2558 case '_Uint16List': |
2559 return M.InstanceKind.uint16List; | 2559 return M.InstanceKind.uint16List; |
2560 case 'Uint32List': | 2560 case '_Uint32List': |
2561 return M.InstanceKind.uint32List; | 2561 return M.InstanceKind.uint32List; |
2562 case 'Uint64List': | 2562 case '_Uint64List': |
2563 return M.InstanceKind.uint64List; | 2563 return M.InstanceKind.uint64List; |
2564 case 'Int8List': | 2564 case '_Int8List': |
2565 return M.InstanceKind.int8List; | 2565 return M.InstanceKind.int8List; |
2566 case 'Int16List': | 2566 case '_Int16List': |
2567 return M.InstanceKind.int16List; | 2567 return M.InstanceKind.int16List; |
2568 case 'Int32List': | 2568 case '_Int32List': |
2569 return M.InstanceKind.int32List; | 2569 return M.InstanceKind.int32List; |
2570 case 'Int64List': | 2570 case '_Int64List': |
2571 return M.InstanceKind.int64List; | 2571 return M.InstanceKind.int64List; |
2572 case 'Float32List': | 2572 case '_Float32List': |
2573 return M.InstanceKind.float32List; | 2573 return M.InstanceKind.float32List; |
2574 case 'Float64List': | 2574 case '_Float64List': |
2575 return M.InstanceKind.float64List; | 2575 return M.InstanceKind.float64List; |
2576 case 'Int32x4List': | 2576 case '_Int32x4List': |
2577 return M.InstanceKind.int32x4List; | 2577 return M.InstanceKind.int32x4List; |
2578 case 'Float32x4List': | 2578 case '_Float32x4List': |
2579 return M.InstanceKind.float32x4List; | 2579 return M.InstanceKind.float32x4List; |
2580 case 'Float64x2List': | 2580 case '_Float64x2List': |
2581 return M.InstanceKind.float64x2List; | 2581 return M.InstanceKind.float64x2List; |
2582 case 'StackTrace': | 2582 case 'StackTrace': |
2583 return M.InstanceKind.stackTrace; | 2583 return M.InstanceKind.stackTrace; |
2584 case 'Closure': | 2584 case 'Closure': |
2585 return M.InstanceKind.closure; | 2585 return M.InstanceKind.closure; |
2586 case 'MirrorReference': | 2586 case 'MirrorReference': |
2587 return M.InstanceKind.mirrorReference; | 2587 return M.InstanceKind.mirrorReference; |
2588 case 'RegExp': | 2588 case 'RegExp': |
2589 return M.InstanceKind.regExp; | 2589 return M.InstanceKind.regExp; |
2590 case 'WeakProperty': | 2590 case 'WeakProperty': |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2784 associations = map['associations'] | 2784 associations = map['associations'] |
2785 .map((a) => new MapAssociation(a['key'], a['value'])) | 2785 .map((a) => new MapAssociation(a['key'], a['value'])) |
2786 .toList(); | 2786 .toList(); |
2787 } else { | 2787 } else { |
2788 associations = null; | 2788 associations = null; |
2789 } | 2789 } |
2790 ; | 2790 ; |
2791 if (map['bytes'] != null) { | 2791 if (map['bytes'] != null) { |
2792 Uint8List bytes = BASE64.decode(map['bytes']); | 2792 Uint8List bytes = BASE64.decode(map['bytes']); |
2793 switch (map['kind']) { | 2793 switch (map['kind']) { |
2794 case "Uint8ClampedList": | 2794 case "_Uint8ClampedList": |
2795 typedElements = bytes.buffer.asUint8ClampedList(); | 2795 typedElements = bytes.buffer.asUint8ClampedList(); |
2796 break; | 2796 break; |
2797 case "Uint8List": | 2797 case "_Uint8List": |
2798 typedElements = bytes.buffer.asUint8List(); | 2798 typedElements = bytes.buffer.asUint8List(); |
2799 break; | 2799 break; |
2800 case "Uint16List": | 2800 case "_Uint16List": |
2801 typedElements = bytes.buffer.asUint16List(); | 2801 typedElements = bytes.buffer.asUint16List(); |
2802 break; | 2802 break; |
2803 case "Uint32List": | 2803 case "_Uint32List": |
2804 typedElements = bytes.buffer.asUint32List(); | 2804 typedElements = bytes.buffer.asUint32List(); |
2805 break; | 2805 break; |
2806 case "Uint64List": | 2806 case "_Uint64List": |
2807 typedElements = bytes.buffer.asUint64List(); | 2807 typedElements = bytes.buffer.asUint64List(); |
2808 break; | 2808 break; |
2809 case "Int8List": | 2809 case "_Int8List": |
2810 typedElements = bytes.buffer.asInt8List(); | 2810 typedElements = bytes.buffer.asInt8List(); |
2811 break; | 2811 break; |
2812 case "Int16List": | 2812 case "_Int16List": |
2813 typedElements = bytes.buffer.asInt16List(); | 2813 typedElements = bytes.buffer.asInt16List(); |
2814 break; | 2814 break; |
2815 case "Int32List": | 2815 case "_Int32List": |
2816 typedElements = bytes.buffer.asInt32List(); | 2816 typedElements = bytes.buffer.asInt32List(); |
2817 break; | 2817 break; |
2818 case "Int64List": | 2818 case "_Int64List": |
2819 typedElements = bytes.buffer.asInt64List(); | 2819 typedElements = bytes.buffer.asInt64List(); |
2820 break; | 2820 break; |
2821 case "Float32List": | 2821 case "_Float32List": |
2822 typedElements = bytes.buffer.asFloat32List(); | 2822 typedElements = bytes.buffer.asFloat32List(); |
2823 break; | 2823 break; |
2824 case "Float64List": | 2824 case "_Float64List": |
2825 typedElements = bytes.buffer.asFloat64List(); | 2825 typedElements = bytes.buffer.asFloat64List(); |
2826 break; | 2826 break; |
2827 case "Int32x4List": | 2827 case "_Int32x4List": |
2828 typedElements = bytes.buffer.asInt32x4List(); | 2828 typedElements = bytes.buffer.asInt32x4List(); |
2829 break; | 2829 break; |
2830 case "Float32x4List": | 2830 case "_Float32x4List": |
2831 typedElements = bytes.buffer.asFloat32x4List(); | 2831 typedElements = bytes.buffer.asFloat32x4List(); |
2832 break; | 2832 break; |
2833 case "Float64x2List": | 2833 case "_Float64x2List": |
2834 typedElements = bytes.buffer.asFloat64x2List(); | 2834 typedElements = bytes.buffer.asFloat64x2List(); |
2835 break; | 2835 break; |
2836 } | 2836 } |
2837 } else { | 2837 } else { |
2838 typedElements = null; | 2838 typedElements = null; |
2839 } | 2839 } |
2840 parameterizedClass = map['parameterizedClass']; | 2840 parameterizedClass = map['parameterizedClass']; |
2841 typeArguments = map['typeArguments']; | 2841 typeArguments = map['typeArguments']; |
2842 parameterIndex = map['parameterIndex']; | 2842 parameterIndex = map['parameterIndex']; |
2843 targetType = map['targetType']; | 2843 targetType = map['targetType']; |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4483 var v = list[i]; | 4483 var v = list[i]; |
4484 if ((v is Map) && _isServiceMap(v)) { | 4484 if ((v is Map) && _isServiceMap(v)) { |
4485 list[i] = owner.getFromMap(v); | 4485 list[i] = owner.getFromMap(v); |
4486 } else if (v is List) { | 4486 } else if (v is List) { |
4487 _upgradeList(v, owner); | 4487 _upgradeList(v, owner); |
4488 } else if (v is Map) { | 4488 } else if (v is Map) { |
4489 _upgradeMap(v, owner); | 4489 _upgradeMap(v, owner); |
4490 } | 4490 } |
4491 } | 4491 } |
4492 } | 4492 } |
OLD | NEW |