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

Unified Diff: dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart

Issue 764533002: Incremental compiler: Use addStubs for adding methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
diff --git a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
index a1d3610313a000087529643d0c114996f2b51616..011e52f257a223599006434551c07bbaa0757398 100644
--- a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
+++ b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
@@ -274,15 +274,29 @@ jsAst.Expression getReflectionDataParser(String classesCollector,
mangledNamesAccess,
mangledGlobalNamesAccess]);
+ List<jsAst.Statement> incrementalSupport = <jsAst.Statement>[];
+ if (compiler.hasIncrementalSupport) {
+ incrementalSupport.add(
+ js.statement(
+ r'self.$dart_unsafe_eval.addStubs = addStubs;'));
+ }
+
return js('''
(function (reflectionData) {
"use strict";
- #; // header
- #; // processStatics
- #; // addStubs
- #; // tearOffCode
- #; // init
-})''', [header, processStatics, addStubs, tearOffCode, init]);
+ #header;
+ #processStatics;
+ #addStubs;
+ #tearOffCode;
+ #incrementalSupport;
+ #init;
+})''', {
+ 'header': header,
+ 'processStatics': processStatics,
+ 'incrementalSupport': incrementalSupport,
+ 'addStubs': addStubs,
+ 'tearOffCode': tearOffCode,
+ 'init': init});
}

Powered by Google App Engine
This is Rietveld 408576698