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

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

Issue 719443002: Incremental compilation: set up inheritance. (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/emitter.dart
diff --git a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index f8740569495da8f5613a8cd160ace7ccb50ad7ca..5ecfa8f905c7071f2a780aed180e84fe3b2063f4 100644
--- a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -304,8 +304,8 @@ class OldEmitter implements Emitter {
/** Needs defineClass to be defined. */
jsAst.Expression buildInheritFrom() {
- return js(r'''
- var inheritFrom = function() {
+ jsAst.Expression result = js(r'''
+ function() {
function tmp() {}
var hasOwnProperty = Object.prototype.hasOwnProperty;
return function (constructor, superConstructor) {
@@ -323,6 +323,10 @@ class OldEmitter implements Emitter {
};
}()
''');
+ if (compiler.hasIncrementalSupport) {
+ result = js(r'self.$dart_unsafe_eval.inheritFrom = #', [result]);
+ }
+ return js(r'var inheritFrom = #', [result]);
}
/// Code that needs to be run before first invocation of
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/ssa/codegen.dart » ('j') | dart/pkg/compiler/lib/src/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698