| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.testing.element_factory; | 8 library engine.testing.element_factory; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 for (int i = 0; i < constantCount; i++) { | 115 for (int i = 0; i < constantCount; i++) { |
| 116 String constantName = constantNames[i]; | 116 String constantName = constantNames[i]; |
| 117 FieldElementImpl constantElement = new ConstFieldElementImpl.con2(constant
Name, -1); | 117 FieldElementImpl constantElement = new ConstFieldElementImpl.con2(constant
Name, -1); |
| 118 constantElement.static = true; | 118 constantElement.static = true; |
| 119 constantElement.const3 = true; | 119 constantElement.const3 = true; |
| 120 constantElement.type = enumType; | 120 constantElement.type = enumType; |
| 121 HashMap<String, DartObjectImpl> fieldMap = new HashMap<String, DartObjectI
mpl>(); | 121 HashMap<String, DartObjectImpl> fieldMap = new HashMap<String, DartObjectI
mpl>(); |
| 122 fieldMap[indexFieldName] = new DartObjectImpl(intType, new IntState(i)); | 122 fieldMap[indexFieldName] = new DartObjectImpl(intType, new IntState(i)); |
| 123 fieldMap[nameFieldName] = new DartObjectImpl(stringType, new StringState(c
onstantName)); | 123 fieldMap[nameFieldName] = new DartObjectImpl(stringType, new StringState(c
onstantName)); |
| 124 DartObjectImpl value = new DartObjectImpl(enumType, new GenericState(field
Map)); | 124 DartObjectImpl value = new DartObjectImpl(enumType, new GenericState(field
Map)); |
| 125 constantElement.evaluationResult = new ValidResult(value); | 125 constantElement.evaluationResult = new EvaluationResultImpl.con1(value); |
| 126 fields.add(constantElement); | 126 fields.add(constantElement); |
| 127 } | 127 } |
| 128 // | 128 // |
| 129 // Finish building the enum. | 129 // Finish building the enum. |
| 130 // | 130 // |
| 131 enumElement.fields = new List.from(fields); | 131 enumElement.fields = new List.from(fields); |
| 132 // Client code isn't allowed to invoke the constructor, so we do not model i
t. | 132 // Client code isn't allowed to invoke the constructor, so we do not model i
t. |
| 133 return enumElement; | 133 return enumElement; |
| 134 } | 134 } |
| 135 | 135 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 setter.synthetic = true; | 423 setter.synthetic = true; |
| 424 setter.variable = variable; | 424 setter.variable = variable; |
| 425 setter.parameters = <ParameterElement> [requiredParameter2("_${name}", typ
e)]; | 425 setter.parameters = <ParameterElement> [requiredParameter2("_${name}", typ
e)]; |
| 426 setter.returnType = VoidTypeImpl.instance; | 426 setter.returnType = VoidTypeImpl.instance; |
| 427 setter.type = new FunctionTypeImpl.con1(setter); | 427 setter.type = new FunctionTypeImpl.con1(setter); |
| 428 variable.setter = setter; | 428 variable.setter = setter; |
| 429 } | 429 } |
| 430 return variable; | 430 return variable; |
| 431 } | 431 } |
| 432 } | 432 } |
| OLD | NEW |