Version 1.3.0-dev.7.6
svn merge -c 34500 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 34545 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
git-svn-id: http://dart.googlecode.com/svn/trunk@34549 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 771e6e8..c8c2e6a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2448,13 +2448,12 @@
function ^= code.function();
// If function uses dependent code switch it to unoptimized.
- if (function.CurrentCode() == code.raw()) {
+ if (code.is_optimized() && (function.CurrentCode() == code.raw())) {
ReportSwitchingCode(code);
- if (code.is_optimized()) {
- function.SwitchToUnoptimizedCode();
- } else {
- function.ClearCode();
- }
+ function.SwitchToUnoptimizedCode();
+ } else if (function.unoptimized_code() == code.raw()) {
+ ReportSwitchingCode(code);
+ function.ClearCode();
}
}
}
@@ -9235,8 +9234,9 @@
virtual void ReportSwitchingCode(const Code& code) {
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
- OS::PrintErr("Prefix '%s': deleting code for function '%s'\n",
+ OS::PrintErr("Prefix '%s': deleting %s code for function '%s'\n",
String::Handle(prefix_.name()).ToCString(),
+ code.is_optimized() ? "optimized" : "unoptimized",
Function::Handle(code.function()).ToCString());
}
}
diff --git a/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart
index 72d73e2..3bd0f6f 100644
--- a/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/dictionary_type_mask.dart
@@ -90,7 +90,7 @@
}
});
return new DictionaryTypeMask(newForwardTo, null, null,
- keyType, valueType, mappings);
+ newKeyType, newValueType, mappings);
} else if (other.isMap &&
(other.keyType != null) &&
(other.valueType != null)) {
diff --git a/tests/compiler/dart2js_extra/17856_test.dart b/tests/compiler/dart2js_extra/17856_test.dart
new file mode 100644
index 0000000..1e6fa63
--- /dev/null
+++ b/tests/compiler/dart2js_extra/17856_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Regression test for Issue 17856.
+
+void main() {
+ var all = { "a": new A(), "b": new B() };
+
+ A a = all["a"];
+ a.load();
+}
+
+class A {
+ Loader _loader = new Loader();
+
+ load() => _loader.loadAll({
+ 'a1': {}
+ });
+}
+
+class B {
+ Loader _loader = new Loader();
+
+ load() => _loader.loadAll({
+ 'a2': new DateTime.now(),
+ });
+}
+
+class Loader {
+ loadAll(Map assets) {
+ for(String key in assets.keys) {
+ Expect.isTrue(assets[key] is Map);
+ }
+ }
+}
diff --git a/tools/VERSION b/tools/VERSION
index c121fd1..3db5927 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 3
PATCH 0
PRERELEASE 7
-PRERELEASE_PATCH 5
+PRERELEASE_PATCH 6