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

Unified Diff: runtime/vm/optimizer.h

Issue 2904543002: Fix misoptimization of 'is' test (Closed)
Patch Set: Feedback from Slava, do same optimization on AOT and JIT Created 3 years, 7 months 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
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/optimizer.h
diff --git a/runtime/vm/optimizer.h b/runtime/vm/optimizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..89d1379233d8dbd28e6cf431823f308d7ea42bac
--- /dev/null
+++ b/runtime/vm/optimizer.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2017, 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.
+
+#ifndef RUNTIME_VM_OPTIMIZER_H_
+#define RUNTIME_VM_OPTIMIZER_H_
+
+#include "vm/globals.h"
+
+#include "vm/growable_array.h"
+
+namespace dart {
+
+class Optimizer {
+ public:
+ // Tries to add cid tests to 'results' so that no deoptimization is
+ // necessary for common number-related type tests. Unconditionally adds an
+ // entry for the Smi type to the start of the array.
+ // TODO(srdjan): Do also for other than numeric types.
+ static bool SpecializeTestCidsForNumericTypes(
+ ZoneGrowableArray<intptr_t>* results,
+ const AbstractType& type);
+};
+
+} // namespace dart
+
+#endif // RUNTIME_VM_OPTIMIZER_H_
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698