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

Side by Side Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 790023004: Remove static state. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 native; 5 part of native;
6 6
7 /// This class is a temporary work-around until we get a more powerful DartType. 7 /// This class is a temporary work-around until we get a more powerful DartType.
8 class SpecialType { 8 class SpecialType {
9 final String name; 9 final String name;
10 const SpecialType._(this.name); 10 const SpecialType._(this.name);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 /// [DartType]s or [SpecialType]s instantiated by the native element. 53 /// [DartType]s or [SpecialType]s instantiated by the native element.
54 final List typesInstantiated = []; 54 final List typesInstantiated = [];
55 55
56 // If this behavior is for a JS expression, [codeTemplate] contains the 56 // If this behavior is for a JS expression, [codeTemplate] contains the
57 // parsed tree. 57 // parsed tree.
58 js.Template codeTemplate; 58 js.Template codeTemplate;
59 59
60 final SideEffects sideEffects = new SideEffects.empty(); 60 final SideEffects sideEffects = new SideEffects.empty();
61 61
62 static NativeBehavior NONE = new NativeBehavior();
63
64 /// Processes the type specification string of a call to JS and stores the 62 /// Processes the type specification string of a call to JS and stores the
65 /// result in the [typesReturned] and [typesInstantiated]. 63 /// result in the [typesReturned] and [typesInstantiated].
66 /// 64 ///
67 /// Two forms of the string is supported: 65 /// Two forms of the string is supported:
68 /// 1) A single type string of the form 'void', '', 'var' or 'T1|...|Tn' 66 /// 1) A single type string of the form 'void', '', 'var' or 'T1|...|Tn'
69 /// which defines the types returned and for the later form also created by 67 /// which defines the types returned and for the later form also created by
70 /// the call to JS. 68 /// the call to JS.
71 /// 2) A sequence of the form '<tag>:<type-string>;' where <tag> is either 69 /// 2) A sequence of the form '<tag>:<type-string>;' where <tag> is either
72 /// 'returns' or 'creates' and where <type-string> is a type string like in 70 /// 'returns' or 'creates' and where <type-string> is a type string like in
73 /// 1). The type string marked by 'returns' defines the types returned and 71 /// 1). The type string marked by 'returns' defines the types returned and
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 compiler.internalError( 427 compiler.internalError(
430 _errorNode(locationNodeOrElement, compiler), 428 _errorNode(locationNodeOrElement, compiler),
431 "Type '$typeString' not found."); 429 "Type '$typeString' not found.");
432 } 430 }
433 431
434 static _errorNode(locationNodeOrElement, compiler) { 432 static _errorNode(locationNodeOrElement, compiler) {
435 if (locationNodeOrElement is Node) return locationNodeOrElement; 433 if (locationNodeOrElement is Node) return locationNodeOrElement;
436 return locationNodeOrElement.parseNode(compiler); 434 return locationNodeOrElement.parseNode(compiler);
437 } 435 }
438 } 436 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698