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

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

Issue 1249023002: dart2js: support isolates in the startup-emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix typo. Created 5 years, 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/lazy_emitter/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.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:collection' show HashMap; 8 import 'dart:collection' show HashMap;
9 9
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 case JsBuiltin.getMetadata: 393 case JsBuiltin.getMetadata:
394 String metadataAccess = 394 String metadataAccess =
395 generateEmbeddedGlobalAccessString(embeddedNames.METADATA); 395 generateEmbeddedGlobalAccessString(embeddedNames.METADATA);
396 return jsAst.js.expressionTemplateFor("$metadataAccess[#]"); 396 return jsAst.js.expressionTemplateFor("$metadataAccess[#]");
397 397
398 case JsBuiltin.getType: 398 case JsBuiltin.getType:
399 String typesAccess = 399 String typesAccess =
400 generateEmbeddedGlobalAccessString(embeddedNames.TYPES); 400 generateEmbeddedGlobalAccessString(embeddedNames.TYPES);
401 return jsAst.js.expressionTemplateFor("$typesAccess[#]"); 401 return jsAst.js.expressionTemplateFor("$typesAccess[#]");
402 402
403 case JsBuiltin.createDartClosureFromNameOfStaticFunction:
404 // The global-functions map contains a map from name to tear-off
405 // getters.
406 String functionGettersMap =
407 generateEmbeddedGlobalAccessString(embeddedNames.GLOBAL_FUNCTIONS);
408 return jsAst.js.expressionTemplateFor("$functionGettersMap[#]()");
409
403 default: 410 default:
404 compiler.internalError(NO_LOCATION_SPANNABLE, 411 compiler.internalError(NO_LOCATION_SPANNABLE,
405 "Unhandled Builtin: $builtin"); 412 "Unhandled Builtin: $builtin");
406 return null; 413 return null;
407 } 414 }
408 } 415 }
409 416
410 List<jsAst.Statement> buildTrivialNsmHandlers(){ 417 List<jsAst.Statement> buildTrivialNsmHandlers(){
411 return nsmEmitter.buildTrivialNsmHandlers(); 418 return nsmEmitter.buildTrivialNsmHandlers();
412 } 419 }
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2107 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2101 if (element.isInstanceMember) { 2108 if (element.isInstanceMember) {
2102 cachedClassBuilders.remove(element.enclosingClass); 2109 cachedClassBuilders.remove(element.enclosingClass);
2103 2110
2104 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2111 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2105 2112
2106 } 2113 }
2107 } 2114 }
2108 } 2115 }
2109 } 2116 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698