OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; | 5 package com.google.dart.compiler.resolver; |
6 | 6 |
| 7 import com.google.dart.compiler.ast.DartMetadata; |
7 import com.google.dart.compiler.ast.DartNode; | 8 import com.google.dart.compiler.ast.DartNode; |
8 import com.google.dart.compiler.ast.Modifiers; | 9 import com.google.dart.compiler.ast.Modifiers; |
9 import com.google.dart.compiler.common.SourceInfo; | 10 import com.google.dart.compiler.common.SourceInfo; |
10 import com.google.dart.compiler.type.Type; | 11 import com.google.dart.compiler.type.Type; |
11 | 12 |
12 import java.util.ArrayList; | 13 import java.util.ArrayList; |
13 import java.util.List; | 14 import java.util.List; |
14 | 15 |
15 /** | 16 /** |
16 * A more efficient version of {@link com.google.common.collect.Multimap} specif
ically for | 17 * A more efficient version of {@link com.google.common.collect.Multimap} specif
ically for |
(...skipping 28 matching lines...) Expand all Loading... |
45 public EnclosingElement getEnclosingElement() { | 46 public EnclosingElement getEnclosingElement() { |
46 throw new AssertionError(INTERNAL_ONLY_ERROR); | 47 throw new AssertionError(INTERNAL_ONLY_ERROR); |
47 } | 48 } |
48 | 49 |
49 @Override | 50 @Override |
50 public ElementKind getKind() { | 51 public ElementKind getKind() { |
51 throw new AssertionError(INTERNAL_ONLY_ERROR); | 52 throw new AssertionError(INTERNAL_ONLY_ERROR); |
52 } | 53 } |
53 | 54 |
54 @Override | 55 @Override |
| 56 public DartMetadata getMetadata() { |
| 57 throw new AssertionError(INTERNAL_ONLY_ERROR); |
| 58 } |
| 59 |
| 60 @Override |
55 public Modifiers getModifiers() { | 61 public Modifiers getModifiers() { |
56 throw new AssertionError(INTERNAL_ONLY_ERROR); | 62 throw new AssertionError(INTERNAL_ONLY_ERROR); |
57 } | 63 } |
58 | 64 |
59 @Override | 65 @Override |
60 public String getName() { | 66 public String getName() { |
61 return name; | 67 return name; |
62 } | 68 } |
63 | 69 |
64 @Override | 70 @Override |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 int probe = name.hashCode() & mask; | 250 int probe = name.hashCode() & mask; |
245 for (int i = probe; i < probe + mask + 1; i++) { | 251 for (int i = probe; i < probe + mask + 1; i++) { |
246 element = elements[i & mask]; | 252 element = elements[i & mask]; |
247 if (element == null || element.getName().equals(name)) { | 253 if (element == null || element.getName().equals(name)) { |
248 return element; | 254 return element; |
249 } | 255 } |
250 } | 256 } |
251 throw new AssertionError("overfilled array"); | 257 throw new AssertionError("overfilled array"); |
252 } | 258 } |
253 } | 259 } |
OLD | NEW |