Disable the use of __proto__ in incremental mode.
BUG= TBR=floitsch@google.com Review URL: https://codereview.chromium.org//1004183002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44460 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -1193,15 +1193,23 @@ class OldEmitter implements Emitter {
|
||||
}
|
||||
|
||||
void emitSupportsDirectProtoAccess(CodeOutput output) {
|
||||
jsAst.Statement supportsDirectProtoAccess = js.statement(r'''
|
||||
var supportsDirectProtoAccess = (function () {
|
||||
var cls = function () {};
|
||||
cls.prototype = {'p': {}};
|
||||
var object = new cls();
|
||||
return object.__proto__ &&
|
||||
object.__proto__.p === cls.prototype.p;
|
||||
})();
|
||||
''');
|
||||
jsAst.Statement supportsDirectProtoAccess;
|
||||
|
||||
if (compiler.hasIncrementalSupport) {
|
||||
supportsDirectProtoAccess = js.statement(r'''
|
||||
var supportsDirectProtoAccess = false;
|
||||
''');
|
||||
} else {
|
||||
supportsDirectProtoAccess = js.statement(r'''
|
||||
var supportsDirectProtoAccess = (function () {
|
||||
var cls = function () {};
|
||||
cls.prototype = {'p': {}};
|
||||
var object = new cls();
|
||||
return object.__proto__ &&
|
||||
object.__proto__.p === cls.prototype.p;
|
||||
})();
|
||||
''');
|
||||
}
|
||||
|
||||
output.addBuffer(jsAst.prettyPrint(supportsDirectProtoAccess, compiler));
|
||||
output.add(N);
|
||||
|
||||
Reference in New Issue
Block a user