OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 return true; | 181 return true; |
182 } | 182 } |
183 } | 183 } |
184 } | 184 } |
185 | 185 |
186 | 186 |
187 Handle<Value> Shell::Print(const Arguments& args) { | 187 Handle<Value> Shell::Print(const Arguments& args) { |
188 Handle<Value> val = Write(args); | 188 Handle<Value> val = Write(args); |
189 printf("\n"); | 189 printf("\n"); |
| 190 fflush(stdout); |
190 return val; | 191 return val; |
191 } | 192 } |
192 | 193 |
193 | 194 |
194 Handle<Value> Shell::Write(const Arguments& args) { | 195 Handle<Value> Shell::Write(const Arguments& args) { |
195 for (int i = 0; i < args.Length(); i++) { | 196 for (int i = 0; i < args.Length(); i++) { |
196 HandleScope handle_scope; | 197 HandleScope handle_scope; |
197 if (i != 0) { | 198 if (i != 0) { |
198 printf(" "); | 199 printf(" "); |
199 } | 200 } |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 } | 1281 } |
1281 | 1282 |
1282 } // namespace v8 | 1283 } // namespace v8 |
1283 | 1284 |
1284 | 1285 |
1285 #ifndef GOOGLE3 | 1286 #ifndef GOOGLE3 |
1286 int main(int argc, char* argv[]) { | 1287 int main(int argc, char* argv[]) { |
1287 return v8::Shell::Main(argc, argv); | 1288 return v8::Shell::Main(argc, argv); |
1288 } | 1289 } |
1289 #endif | 1290 #endif |
OLD | NEW |