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

Side by Side Diff: samples/process.cc

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Rebaseline previous CL Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « samples/lineprocessor.cc ('k') | samples/shell.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 void PrintMap(map<string, string>* m) { 637 void PrintMap(map<string, string>* m) {
638 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) { 638 for (map<string, string>::iterator i = m->begin(); i != m->end(); i++) {
639 pair<string, string> entry = *i; 639 pair<string, string> entry = *i;
640 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str()); 640 printf("%s: %s\n", entry.first.c_str(), entry.second.c_str());
641 } 641 }
642 } 642 }
643 643
644 644
645 int main(int argc, char* argv[]) { 645 int main(int argc, char* argv[]) {
646 v8::V8::PerformPerThreadSetup();
646 v8::V8::InitializeICU(); 647 v8::V8::InitializeICU();
647 map<string, string> options; 648 map<string, string> options;
648 string file; 649 string file;
649 ParseOptions(argc, argv, &options, &file); 650 ParseOptions(argc, argv, &options, &file);
650 if (file.empty()) { 651 if (file.empty()) {
651 fprintf(stderr, "No script was specified.\n"); 652 fprintf(stderr, "No script was specified.\n");
652 return 1; 653 return 1;
653 } 654 }
654 Isolate* isolate = Isolate::New(); 655 Isolate* isolate = Isolate::New();
655 Isolate::Scope isolate_scope(isolate); 656 Isolate::Scope isolate_scope(isolate);
656 HandleScope scope(isolate); 657 HandleScope scope(isolate);
657 Handle<String> source = ReadFile(isolate, file); 658 Handle<String> source = ReadFile(isolate, file);
658 if (source.IsEmpty()) { 659 if (source.IsEmpty()) {
659 fprintf(stderr, "Error reading '%s'.\n", file.c_str()); 660 fprintf(stderr, "Error reading '%s'.\n", file.c_str());
660 return 1; 661 return 1;
661 } 662 }
662 JsHttpRequestProcessor processor(isolate, source); 663 JsHttpRequestProcessor processor(isolate, source);
663 map<string, string> output; 664 map<string, string> output;
664 if (!processor.Initialize(&options, &output)) { 665 if (!processor.Initialize(&options, &output)) {
665 fprintf(stderr, "Error initializing processor.\n"); 666 fprintf(stderr, "Error initializing processor.\n");
666 return 1; 667 return 1;
667 } 668 }
668 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests)) 669 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests))
669 return 1; 670 return 1;
670 PrintMap(&output); 671 PrintMap(&output);
671 } 672 }
OLDNEW
« no previous file with comments | « samples/lineprocessor.cc ('k') | samples/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698