Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: runtime/lib/invocation_mirror_patch.dart

Issue 177633008: Better error message for assignment to final local variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 class _InvocationMirror implements Invocation { 5 class _InvocationMirror implements Invocation {
6 // Constants describing the invocation type. 6 // Constants describing the invocation type.
7 // _FIELD cannot be generated by regular invocation mirrors. 7 // _FIELD cannot be generated by regular invocation mirrors.
8 static const int _METHOD = 0; 8 static const int _METHOD = 0;
9 static const int _GETTER = 1; 9 static const int _GETTER = 1;
10 static const int _SETTER = 2; 10 static const int _SETTER = 2;
11 static const int _FIELD = 3; 11 static const int _FIELD = 3;
12 static const int _LOCAL_VAR = 4;
12 static const int _TYPE_SHIFT = 0; 13 static const int _TYPE_SHIFT = 0;
13 static const int _TYPE_BITS = 2; 14 static const int _TYPE_BITS = 3;
14 static const int _TYPE_MASK = (1 << _TYPE_BITS) - 1; 15 static const int _TYPE_MASK = (1 << _TYPE_BITS) - 1;
15 16
16 // These values, except _DYNAMIC and _SUPER, are only used when throwing 17 // These values, except _DYNAMIC and _SUPER, are only used when throwing
17 // NoSuchMethodError for compile-time resolution failures. 18 // NoSuchMethodError for compile-time resolution failures.
18 static const int _DYNAMIC = 0; 19 static const int _DYNAMIC = 0;
19 static const int _SUPER = 1; 20 static const int _SUPER = 1;
20 static const int _STATIC = 2; 21 static const int _STATIC = 2;
21 static const int _CONSTRUCTOR = 3; 22 static const int _CONSTRUCTOR = 3;
22 static const int _TOP_LEVEL = 4; 23 static const int _TOP_LEVEL = 4;
23 static const int _CALL_SHIFT = _TYPE_BITS; 24 static const int _CALL_SHIFT = _TYPE_BITS;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static _allocateInvocationMirror(String functionName, 129 static _allocateInvocationMirror(String functionName,
129 List argumentsDescriptor, 130 List argumentsDescriptor,
130 List arguments, 131 List arguments,
131 bool isSuperInvocation) { 132 bool isSuperInvocation) {
132 return new _InvocationMirror(functionName, 133 return new _InvocationMirror(functionName,
133 argumentsDescriptor, 134 argumentsDescriptor,
134 arguments, 135 arguments,
135 isSuperInvocation); 136 isSuperInvocation);
136 } 137 }
137 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698