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 2522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 case 'List': | 2533 case 'List': |
2534 return M.InstanceKind.list; | 2534 return M.InstanceKind.list; |
2535 case 'Map': | 2535 case 'Map': |
2536 return M.InstanceKind.map; | 2536 return M.InstanceKind.map; |
2537 case 'Float32x4': | 2537 case 'Float32x4': |
2538 return M.InstanceKind.float32x4; | 2538 return M.InstanceKind.float32x4; |
2539 case 'Float64x2': | 2539 case 'Float64x2': |
2540 return M.InstanceKind.float64x2; | 2540 return M.InstanceKind.float64x2; |
2541 case 'Int32x4': | 2541 case 'Int32x4': |
2542 return M.InstanceKind.int32x4; | 2542 return M.InstanceKind.int32x4; |
2543 case 'Uint8ClampedList': | 2543 case '_Uint8ClampedList': |
2544 return M.InstanceKind.uint8ClampedList; | 2544 return M.InstanceKind.uint8ClampedList; |
2545 case 'Uint8List': | 2545 case '_Uint8List': |
2546 return M.InstanceKind.uint8List; | 2546 return M.InstanceKind.uint8List; |
2547 case 'Uint16List': | 2547 case '_Uint16List': |
2548 return M.InstanceKind.uint16List; | 2548 return M.InstanceKind.uint16List; |
2549 case 'Uint32List': | 2549 case '_Uint32List': |
2550 return M.InstanceKind.uint32List; | 2550 return M.InstanceKind.uint32List; |
2551 case 'Uint64List': | 2551 case '_Uint64List': |
2552 return M.InstanceKind.uint64List; | 2552 return M.InstanceKind.uint64List; |
2553 case 'Int8List': | 2553 case '_Int8List': |
2554 return M.InstanceKind.int8List; | 2554 return M.InstanceKind.int8List; |
2555 case 'Int16List': | 2555 case '_Int16List': |
2556 return M.InstanceKind.int16List; | 2556 return M.InstanceKind.int16List; |
2557 case 'Int32List': | 2557 case '_Int32List': |
2558 return M.InstanceKind.int32List; | 2558 return M.InstanceKind.int32List; |
2559 case 'Int64List': | 2559 case '_Int64List': |
2560 return M.InstanceKind.int64List; | 2560 return M.InstanceKind.int64List; |
2561 case 'Float32List': | 2561 case '_Float32List': |
2562 return M.InstanceKind.float32List; | 2562 return M.InstanceKind.float32List; |
2563 case 'Float64List': | 2563 case '_Float64List': |
2564 return M.InstanceKind.float64List; | 2564 return M.InstanceKind.float64List; |
2565 case 'Int32x4List': | 2565 case '_Int32x4List': |
2566 return M.InstanceKind.int32x4List; | 2566 return M.InstanceKind.int32x4List; |
2567 case 'Float32x4List': | 2567 case '_Float32x4List': |
2568 return M.InstanceKind.float32x4List; | 2568 return M.InstanceKind.float32x4List; |
2569 case 'Float64x2List': | 2569 case '_Float64x2List': |
2570 return M.InstanceKind.float64x2List; | 2570 return M.InstanceKind.float64x2List; |
2571 case 'StackTrace': | 2571 case 'StackTrace': |
2572 return M.InstanceKind.stackTrace; | 2572 return M.InstanceKind.stackTrace; |
2573 case 'Closure': | 2573 case 'Closure': |
2574 return M.InstanceKind.closure; | 2574 return M.InstanceKind.closure; |
2575 case 'MirrorReference': | 2575 case 'MirrorReference': |
2576 return M.InstanceKind.mirrorReference; | 2576 return M.InstanceKind.mirrorReference; |
2577 case 'RegExp': | 2577 case 'RegExp': |
2578 return M.InstanceKind.regExp; | 2578 return M.InstanceKind.regExp; |
2579 case 'WeakProperty': | 2579 case 'WeakProperty': |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2773 associations = map['associations'] | 2773 associations = map['associations'] |
2774 .map((a) => new MapAssociation(a['key'], a['value'])) | 2774 .map((a) => new MapAssociation(a['key'], a['value'])) |
2775 .toList(); | 2775 .toList(); |
2776 } else { | 2776 } else { |
2777 associations = null; | 2777 associations = null; |
2778 } | 2778 } |
2779 ; | 2779 ; |
2780 if (map['bytes'] != null) { | 2780 if (map['bytes'] != null) { |
2781 Uint8List bytes = BASE64.decode(map['bytes']); | 2781 Uint8List bytes = BASE64.decode(map['bytes']); |
2782 switch (map['kind']) { | 2782 switch (map['kind']) { |
2783 case "Uint8ClampedList": | 2783 case "_Uint8ClampedList": |
2784 typedElements = bytes.buffer.asUint8ClampedList(); | 2784 typedElements = bytes.buffer.asUint8ClampedList(); |
2785 break; | 2785 break; |
2786 case "Uint8List": | 2786 case "_Uint8List": |
2787 typedElements = bytes.buffer.asUint8List(); | 2787 typedElements = bytes.buffer.asUint8List(); |
2788 break; | 2788 break; |
2789 case "Uint16List": | 2789 case "_Uint16List": |
2790 typedElements = bytes.buffer.asUint16List(); | 2790 typedElements = bytes.buffer.asUint16List(); |
2791 break; | 2791 break; |
2792 case "Uint32List": | 2792 case "_Uint32List": |
2793 typedElements = bytes.buffer.asUint32List(); | 2793 typedElements = bytes.buffer.asUint32List(); |
2794 break; | 2794 break; |
2795 case "Uint64List": | 2795 case "_Uint64List": |
2796 typedElements = bytes.buffer.asUint64List(); | 2796 typedElements = bytes.buffer.asUint64List(); |
2797 break; | 2797 break; |
2798 case "Int8List": | 2798 case "_Int8List": |
2799 typedElements = bytes.buffer.asInt8List(); | 2799 typedElements = bytes.buffer.asInt8List(); |
2800 break; | 2800 break; |
2801 case "Int16List": | 2801 case "_Int16List": |
2802 typedElements = bytes.buffer.asInt16List(); | 2802 typedElements = bytes.buffer.asInt16List(); |
2803 break; | 2803 break; |
2804 case "Int32List": | 2804 case "_Int32List": |
2805 typedElements = bytes.buffer.asInt32List(); | 2805 typedElements = bytes.buffer.asInt32List(); |
2806 break; | 2806 break; |
2807 case "Int64List": | 2807 case "_Int64List": |
2808 typedElements = bytes.buffer.asInt64List(); | 2808 typedElements = bytes.buffer.asInt64List(); |
2809 break; | 2809 break; |
2810 case "Float32List": | 2810 case "_Float32List": |
2811 typedElements = bytes.buffer.asFloat32List(); | 2811 typedElements = bytes.buffer.asFloat32List(); |
2812 break; | 2812 break; |
2813 case "Float64List": | 2813 case "_Float64List": |
2814 typedElements = bytes.buffer.asFloat64List(); | 2814 typedElements = bytes.buffer.asFloat64List(); |
2815 break; | 2815 break; |
2816 case "Int32x4List": | 2816 case "_Int32x4List": |
2817 typedElements = bytes.buffer.asInt32x4List(); | 2817 typedElements = bytes.buffer.asInt32x4List(); |
2818 break; | 2818 break; |
2819 case "Float32x4List": | 2819 case "_Float32x4List": |
2820 typedElements = bytes.buffer.asFloat32x4List(); | 2820 typedElements = bytes.buffer.asFloat32x4List(); |
2821 break; | 2821 break; |
2822 case "Float64x2List": | 2822 case "_Float64x2List": |
2823 typedElements = bytes.buffer.asFloat64x2List(); | 2823 typedElements = bytes.buffer.asFloat64x2List(); |
2824 break; | 2824 break; |
2825 } | 2825 } |
2826 } else { | 2826 } else { |
2827 typedElements = null; | 2827 typedElements = null; |
2828 } | 2828 } |
2829 parameterizedClass = map['parameterizedClass']; | 2829 parameterizedClass = map['parameterizedClass']; |
2830 typeArguments = map['typeArguments']; | 2830 typeArguments = map['typeArguments']; |
2831 parameterIndex = map['parameterIndex']; | 2831 parameterIndex = map['parameterIndex']; |
2832 targetType = map['targetType']; | 2832 targetType = map['targetType']; |
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4420 var v = list[i]; | 4420 var v = list[i]; |
4421 if ((v is Map) && _isServiceMap(v)) { | 4421 if ((v is Map) && _isServiceMap(v)) { |
4422 list[i] = owner.getFromMap(v); | 4422 list[i] = owner.getFromMap(v); |
4423 } else if (v is List) { | 4423 } else if (v is List) { |
4424 _upgradeList(v, owner); | 4424 _upgradeList(v, owner); |
4425 } else if (v is Map) { | 4425 } else if (v is Map) { |
4426 _upgradeMap(v, owner); | 4426 _upgradeMap(v, owner); |
4427 } | 4427 } |
4428 } | 4428 } |
4429 } | 4429 } |
OLD | NEW |