| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 void Shell::OnExit() { | 280 void Shell::OnExit() { |
| 281 if (i::FLAG_dump_counters) { | 281 if (i::FLAG_dump_counters) { |
| 282 ::printf("+----------------------------------------+----------+\n"); | 282 ::printf("+----------------------------------------+----------+\n"); |
| 283 ::printf("| Name | Value |\n"); | 283 ::printf("| Name | Value |\n"); |
| 284 ::printf("+----------------------------------------+----------+\n"); | 284 ::printf("+----------------------------------------+----------+\n"); |
| 285 for (CounterMap::iterator i = counter_map_.begin(); | 285 for (CounterMap::iterator i = counter_map_.begin(); |
| 286 i != counter_map_.end(); | 286 i != counter_map_.end(); |
| 287 i++) { | 287 i++) { |
| 288 Counter* counter = (*i).second; | 288 Counter* counter = (*i).second; |
| 289 ::printf("| %-38ls | %8i |\n", counter->name(), counter->value()); | 289 ::printf("| %-38s | %8i |\n", counter->name(), counter->value()); |
| 290 } | 290 } |
| 291 ::printf("+----------------------------------------+----------+\n"); | 291 ::printf("+----------------------------------------+----------+\n"); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 | 295 |
| 296 // Reads a file into a v8 string. | 296 // Reads a file into a v8 string. |
| 297 Handle<String> Shell::ReadFile(const char* name) { | 297 Handle<String> Shell::ReadFile(const char* name) { |
| 298 FILE* file = i::OS::FOpen(name, "rb"); | 298 FILE* file = i::OS::FOpen(name, "rb"); |
| 299 if (file == NULL) return Handle<String>(); | 299 if (file == NULL) return Handle<String>(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 return 0; | 376 return 0; |
| 377 } | 377 } |
| 378 | 378 |
| 379 | 379 |
| 380 } // namespace v8 | 380 } // namespace v8 |
| 381 | 381 |
| 382 | 382 |
| 383 int main(int argc, char* argv[]) { | 383 int main(int argc, char* argv[]) { |
| 384 return v8::Shell::Main(argc, argv); | 384 return v8::Shell::Main(argc, argv); |
| 385 } | 385 } |
| OLD | NEW |