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

Issue 2215133003: Avoid modifying the set returned by getInterceptorsOn() (Closed)

Created:
4 years, 4 months ago by sra1
Modified:
4 years, 4 months ago
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Avoid modifying the set returned by getInterceptorsOn() The returned set is shared. This program generates a broken short-circuit interceptor ($n -> $din) due to modifying the cached shared set {n} to {d,i,n} -------- J.toInt$0$n = function(receiver) { return J.getInterceptor$din(receiver).toInt$0(receiver); }; -------- import 'package:expect/expect.dart'; @NoInline() @AssumeDynamic() confuse(x) => x; @NoInline() foo(x) { print(x.toInt()); bar(x); } @NoInline() bar(x) { print(x.toInt()); print(x.runtimeType); } main() { int i = confuse(1); foo(i); double d = confuse(2.3); foo(d); } -------- TBR=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/36f52dd43f1111cbc5b51796ab51d8136bac6b9f

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
M pkg/compiler/lib/src/ssa/interceptor_simplifier.dart View 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (4 generated)
sra1
4 years, 4 months ago (2016-08-05 01:32:06 UTC) #3
sra1
Committed patchset #1 (id:1) manually as 36f52dd43f1111cbc5b51796ab51d8136bac6b9f (presubmit successful).
4 years, 4 months ago (2016-08-05 23:13:15 UTC) #6
Siggi Cherem (dart-lang)
4 years, 4 months ago (2016-08-08 15:50:49 UTC) #7
Message was sent while issue was closed.
lgtm - would you like to add a test with the code in the description?

Powered by Google App Engine
This is Rietveld 408576698