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

Side by Side Diff: samples/lineprocessor.cc

Issue 125133002: ARM: Enable the subnormal floats on QNX. Base URL: git://github.com/v8/v8.git@master
Patch Set: Reworked CL Created 6 years, 11 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
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 v8::String::Utf8Value str(result); 319 v8::String::Utf8Value str(result);
320 const char* cstr = ToCString(str); 320 const char* cstr = ToCString(str);
321 printf("%s\n", cstr); 321 printf("%s\n", cstr);
322 } 322 }
323 323
324 return true; 324 return true;
325 } 325 }
326 326
327 327
328 int main(int argc, char* argv[]) { 328 int main(int argc, char* argv[]) {
329 v8::V8::PerThreadSetUp();
329 v8::V8::InitializeICU(); 330 v8::V8::InitializeICU();
330 int result = RunMain(argc, argv); 331 int result = RunMain(argc, argv);
331 v8::V8::Dispose(); 332 v8::V8::Dispose();
332 return result; 333 return result;
333 } 334 }
334 335
335 336
336 // Extracts a C string from a V8 Utf8Value. 337 // Extracts a C string from a V8 Utf8Value.
337 const char* ToCString(const v8::String::Utf8Value& value) { 338 const char* ToCString(const v8::String::Utf8Value& value) {
338 return *value ? *value : "<string conversion failed>"; 339 return *value ? *value : "<string conversion failed>";
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 447 }
447 // Remove newline char 448 // Remove newline char
448 for (char* pos = buffer; *pos != '\0'; pos++) { 449 for (char* pos = buffer; *pos != '\0'; pos++) {
449 if (*pos == '\n') { 450 if (*pos == '\n') {
450 *pos = '\0'; 451 *pos = '\0';
451 break; 452 break;
452 } 453 }
453 } 454 }
454 return v8::String::NewFromUtf8(isolate, buffer); 455 return v8::String::NewFromUtf8(isolate, buffer);
455 } 456 }
OLDNEW
« include/v8.h ('K') | « include/v8.h ('k') | samples/process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698