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

Side by Side Diff: samples/lineprocessor.cc

Issue 660095: Merge revision 3813 to 3930 from bleeding_edge to partial snapshots branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/SConscript » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 continue; 145 continue;
146 } else if (strcmp(str, "--callback") == 0) { 146 } else if (strcmp(str, "--callback") == 0) {
147 support_callback = true; 147 support_callback = true;
148 } else if (strcmp(str, "--wait-for-connection") == 0) { 148 } else if (strcmp(str, "--wait-for-connection") == 0) {
149 wait_for_connection = true; 149 wait_for_connection = true;
150 } else if (strcmp(str, "--main-cycle-in-cpp") == 0) { 150 } else if (strcmp(str, "--main-cycle-in-cpp") == 0) {
151 cycle_type = CycleInCpp; 151 cycle_type = CycleInCpp;
152 } else if (strcmp(str, "--main-cycle-in-js") == 0) { 152 } else if (strcmp(str, "--main-cycle-in-js") == 0) {
153 cycle_type = CycleInJs; 153 cycle_type = CycleInJs;
154 } else if (strcmp(str, "-p") == 0 && i + 1 < argc) { 154 } else if (strcmp(str, "-p") == 0 && i + 1 < argc) {
155 port_number = atoi(argv[i + 1]); 155 port_number = atoi(argv[i + 1]); // NOLINT
156 i++; 156 i++;
157 } else if (strncmp(str, "--", 2) == 0) { 157 } else if (strncmp(str, "--", 2) == 0) {
158 printf("Warning: unknown flag %s.\nTry --help for options\n", str); 158 printf("Warning: unknown flag %s.\nTry --help for options\n", str);
159 } else if (strcmp(str, "-e") == 0 && i + 1 < argc) { 159 } else if (strcmp(str, "-e") == 0 && i + 1 < argc) {
160 script_source = v8::String::New(argv[i + 1]); 160 script_source = v8::String::New(argv[i + 1]);
161 script_name = v8::String::New("unnamed"); 161 script_name = v8::String::New("unnamed");
162 i++; 162 i++;
163 script_param_counter++; 163 script_param_counter++;
164 } else { 164 } else {
165 // Use argument as a name of file to load. 165 // Use argument as a name of file to load.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 // remove newline char 417 // remove newline char
418 for (char* pos = buffer; *pos != '\0'; pos++) { 418 for (char* pos = buffer; *pos != '\0'; pos++) {
419 if (*pos == '\n') { 419 if (*pos == '\n') {
420 *pos = '\0'; 420 *pos = '\0';
421 break; 421 break;
422 } 422 }
423 } 423 }
424 return v8::String::New(buffer); 424 return v8::String::New(buffer);
425 } 425 }
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698