[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp roadlet.cpp roadlet.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 4 17:29:12 PDT 2004
Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/city:
main.cpp updated: 1.3 -> 1.4
roadlet.cpp updated: 1.2 -> 1.3
roadlet.h updated: 1.3 -> 1.4
---
Log message:
Finish making this work, woo...
---
Diffs of the changes: (+13 -5)
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.3 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.4
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.3 Mon Oct 4 16:19:30 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp Mon Oct 4 19:29:01 2004
@@ -71,13 +71,13 @@
broken_light l(3,1,4,1);
- for(i = 0; i < 100000; i++)
+ for(i = 0; i < 100; i++)
{
cout << l << "\n";
l.tick();
}
- for(i=0; i< 100000; i++)
+ for(i=0; i< 100; i++)
{
i1.get_light()->tick();
}
@@ -94,7 +94,7 @@
i1.connectEout(r3, r1);
- for(i=0; i< 100000; i++)
+ for(i=0; i< 100; i++)
{
cout << '\n' << i << ' ' << c << '\n';
c.tick();
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.cpp
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.cpp:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.cpp:1.3
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.cpp:1.2 Mon Oct 4 16:08:35 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.cpp Mon Oct 4 19:29:01 2004
@@ -5,6 +5,10 @@
void roadlet::init(char *n)
{
+ occupant = 0;
+ neighbors[0] = neighbors[1] = neighbors[2] = neighbors[3] = 0;
+ neighbors[4] = neighbors[5] = neighbors[6] = neighbors[7] = 0;
+
name = n;
for(int i=0;i<8;i++)
the_moves[i] = return_null;
Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.h
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.h:1.3 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.h:1.4
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.h:1.3 Mon Oct 4 16:19:30 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/roadlet.h Mon Oct 4 19:29:01 2004
@@ -24,8 +24,12 @@
move_function the_moves[8];
public:
- roadlet() : occupant(NULL) { neighbors[0] = neighbors[1] = neighbors[2] = neighbors[3] = neighbors[4] = neighbors[5] = neighbors[6] = neighbors[7] = 0; init("unnamed");};
- roadlet(char *n) { init(n);};
+ roadlet() {
+ init("unnamed");
+ };
+ roadlet(char *n) {
+ init(n);
+ };
int occupied() { return(occupiedby() != NULL);};
vehicle *occupiedby() {return(occupant);};
void arrive(vehicle *v) {occupant = v;};
More information about the llvm-commits
mailing list