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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 11416007: Fix this longstanding bug that luckily did not bite us yet: Use Class.prototype.foo$bailout.call(th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 class SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 10
(...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 // the same parameter index. 2619 // the same parameter index.
2620 int i = 0; 2620 int i = 0;
2621 for (; i < target.inputs.length; i++) { 2621 for (; i < target.inputs.length; i++) {
2622 assert(guard.inputs.indexOf(target.inputs[i]) >= 0); 2622 assert(guard.inputs.indexOf(target.inputs[i]) >= 0);
2623 use(target.inputs[i]); 2623 use(target.inputs[i]);
2624 arguments.add(pop()); 2624 arguments.add(pop());
2625 } 2625 }
2626 2626
2627 js.Expression bailoutTarget; 2627 js.Expression bailoutTarget;
2628 if (element.isInstanceMember()) { 2628 if (element.isInstanceMember()) {
2629 // TODO(ngeoffray): This does not work in case we come from a
2630 // super call. We must make bailout names unique.
2631 String bailoutName = namer.getBailoutName(element); 2629 String bailoutName = namer.getBailoutName(element);
2632 bailoutTarget = new js.PropertyAccess.field(new js.This(), bailoutName); 2630 bailoutTarget = new js.PropertyAccess.field(new js.This(), bailoutName);
2633 } else { 2631 } else {
2634 assert(!element.isField()); 2632 assert(!element.isField());
2635 bailoutTarget = new js.VariableUse(namer.isolateBailoutAccess(element)); 2633 bailoutTarget = new js.VariableUse(namer.isolateBailoutAccess(element));
2636 } 2634 }
2637 js.Call call = new js.Call(bailoutTarget, arguments); 2635 js.Call call = new js.Call(bailoutTarget, arguments);
2638 attachLocation(call, guard); 2636 attachLocation(call, guard);
2639 return new js.Return(call); 2637 return new js.Return(call);
2640 } 2638 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 if (leftType.canBeNull() && rightType.canBeNull()) { 3103 if (leftType.canBeNull() && rightType.canBeNull()) {
3106 if (left.isConstantNull() || right.isConstantNull() || 3104 if (left.isConstantNull() || right.isConstantNull() ||
3107 (leftType.isPrimitive() && leftType == rightType)) { 3105 (leftType.isPrimitive() && leftType == rightType)) {
3108 return '=='; 3106 return '==';
3109 } 3107 }
3110 return null; 3108 return null;
3111 } else { 3109 } else {
3112 return '==='; 3110 return '===';
3113 } 3111 }
3114 } 3112 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/namer.dart ('k') | tests/language/bailout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698