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

Unified Diff: runtime/vm/flow_graph_range_analysis_test.cc

Issue 442293002: Consolidate all range analysis related code in a separate file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/flow_graph_range_analysis.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_range_analysis_test.cc
diff --git a/runtime/vm/intermediate_language_test.cc b/runtime/vm/flow_graph_range_analysis_test.cc
similarity index 96%
copy from runtime/vm/intermediate_language_test.cc
copy to runtime/vm/flow_graph_range_analysis_test.cc
index 67f304efbbce2263b050fdc47a4fc109b486d9b4..0471748860663b637f5f621c33b52959d0ec2633 100644
--- a/runtime/vm/intermediate_language_test.cc
+++ b/runtime/vm/flow_graph_range_analysis_test.cc
@@ -1,44 +1,12 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// 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.
-#include "vm/intermediate_language.h"
+#include "vm/flow_graph_range_analysis.h"
#include "vm/unit_test.h"
namespace dart {
-TEST_CASE(InstructionTests) {
- TargetEntryInstr* target_instr =
- new TargetEntryInstr(1, CatchClauseNode::kInvalidTryIndex);
- EXPECT(target_instr->IsBlockEntry());
- EXPECT(!target_instr->IsDefinition());
- CurrentContextInstr* context = new CurrentContextInstr();
- EXPECT(context->IsDefinition());
- EXPECT(!context->IsBlockEntry());
-}
-
-
-TEST_CASE(OptimizationTests) {
- JoinEntryInstr* join =
- new JoinEntryInstr(1, CatchClauseNode::kInvalidTryIndex);
-
- Definition* def1 = new PhiInstr(join, 0);
- Definition* def2 = new PhiInstr(join, 0);
- Value* use1a = new Value(def1);
- Value* use1b = new Value(def1);
- EXPECT(use1a->Equals(use1b));
- Value* use2 = new Value(def2);
- EXPECT(!use2->Equals(use1a));
-
- ConstantInstr* c1 = new ConstantInstr(Bool::True());
- ConstantInstr* c2 = new ConstantInstr(Bool::True());
- EXPECT(c1->Equals(c2));
- ConstantInstr* c3 = new ConstantInstr(Object::ZoneHandle());
- ConstantInstr* c4 = new ConstantInstr(Object::ZoneHandle());
- EXPECT(c3->Equals(c4));
- EXPECT(!c3->Equals(c1));
-}
-
TEST_CASE(RangeTests) {
Range* zero = new Range(
@@ -670,4 +638,5 @@ TEST_CASE(RangeMinMax) {
RangeBoundary::kRangeBoundaryInt64).ConstantValue() == kMaxInt64);
}
+
} // namespace dart
« no previous file with comments | « runtime/vm/flow_graph_range_analysis.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698