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

Side by Side Diff: vm/ic_data_test.cc

Issue 8404009: Restructure instance calls in optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 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
« no previous file with comments | « vm/ic_data.cc ('k') | vm/opt_code_generator_ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include "vm/ic_data.h" 5 #include "vm/ic_data.h"
6 #include "vm/code_index_table.h" 6 #include "vm/code_index_table.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 classes.Add(&smi_class); 47 classes.Add(&smi_class);
48 ic_data.AddCheck(classes, target); 48 ic_data.AddCheck(classes, target);
49 49
50 EXPECT_EQ(1, ic_data.NumberOfArgumentsChecked()); 50 EXPECT_EQ(1, ic_data.NumberOfArgumentsChecked());
51 EXPECT_EQ(1, ic_data.NumberOfChecks()); 51 EXPECT_EQ(1, ic_data.NumberOfChecks());
52 EXPECT_EQ(name.raw(), ic_data.FunctionName()); 52 EXPECT_EQ(name.raw(), ic_data.FunctionName());
53 53
54 GrowableArray<const Class*> test_classes; 54 GrowableArray<const Class*> test_classes;
55 Function& test_target = Function::Handle(); 55 Function& test_target = Function::Handle();
56 ic_data.GetCheckAt(0, &test_classes, &test_target); 56 ic_data.GetCheckAt(0, &test_classes, &test_target);
57 Class& test_class_1 = Class::Handle();
58 Function& test_target_1 = Function::Handle();
59 ic_data.GetOneClassCheckAt(0, &test_class_1, &test_target_1);
57 60
58 EXPECT(SameClassArrays(classes, test_classes)); 61 EXPECT(SameClassArrays(classes, test_classes));
62 EXPECT_EQ(test_classes[0]->raw(), test_class_1.raw());
59 EXPECT_EQ(target.raw(), test_target.raw()); 63 EXPECT_EQ(target.raw(), test_target.raw());
64 EXPECT_EQ(test_target.raw(), test_target_1.raw());
60 65
61 const Function& new_target = 66 const Function& new_target =
62 Function::Handle(GetDummyTarget(name.ToCString())); 67 Function::Handle(GetDummyTarget(name.ToCString()));
63 ic_data.SetCheckAt(0, classes, new_target); 68 ic_data.SetCheckAt(0, classes, new_target);
64 ic_data.GetCheckAt(0, &test_classes, &test_target); 69 ic_data.GetCheckAt(0, &test_classes, &test_target);
65 70
66 EXPECT(SameClassArrays(classes, test_classes)); 71 EXPECT(SameClassArrays(classes, test_classes));
67 EXPECT_EQ(new_target.raw(), test_target.raw()); 72 EXPECT_EQ(new_target.raw(), test_target.raw());
68 } 73 }
69 74
70 } // namespace dart 75 } // namespace dart
OLDNEW
« no previous file with comments | « vm/ic_data.cc ('k') | vm/opt_code_generator_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698