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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart

Issue 1137883002: dart2js: compile metadata lazily in the lazy emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.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 library dart2js.new_js_emitter.emitter; 5 library dart2js.new_js_emitter.emitter;
6 6
7 import 'package:_internal/compiler/js_lib/shared/embedded_names.dart' show 7 import 'package:_internal/compiler/js_lib/shared/embedded_names.dart' show
8 JsBuiltin, 8 JsBuiltin,
9 METADATA, 9 METADATA,
10 TYPES; 10 TYPES;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return _backend.rti.representationGenerator 164 return _backend.rti.representationGenerator
165 .templateForCreateFunctionType; 165 .templateForCreateFunctionType;
166 166
167 case JsBuiltin.isSubtype: 167 case JsBuiltin.isSubtype:
168 // TODO(floitsch): move this closer to where is-check properties are 168 // TODO(floitsch): move this closer to where is-check properties are
169 // built. 169 // built.
170 String isPrefix = namer.operatorIsPrefix; 170 String isPrefix = namer.operatorIsPrefix;
171 return js.js.expressionTemplateFor("('$isPrefix' + #) in #.prototype"); 171 return js.js.expressionTemplateFor("('$isPrefix' + #) in #.prototype");
172 172
173 case JsBuiltin.getMetadata: 173 case JsBuiltin.getMetadata:
174 String metadataAccess = 174 return _emitter.templateForReadMetadata;
175 _emitter.generateEmbeddedGlobalAccessString(METADATA);
176 return js.js.expressionTemplateFor("$metadataAccess[#]");
177 175
178 case JsBuiltin.getType: 176 case JsBuiltin.getType:
179 return _emitter.templateForReadType; 177 return _emitter.templateForReadType;
180 178
181 default: 179 default:
182 _compiler.internalError(NO_LOCATION_SPANNABLE, 180 _compiler.internalError(NO_LOCATION_SPANNABLE,
183 "Unhandled Builtin: $builtin"); 181 "Unhandled Builtin: $builtin");
184 return null; 182 return null;
185 } 183 }
186 } 184 }
187 185
188 @override 186 @override
189 void invalidateCaches() { 187 void invalidateCaches() {
190 } 188 }
191 } 189 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698