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

Side by Side Diff: samples/shell.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void Quit(const v8::FunctionCallbackInfo<v8::Value>& args); 59 void Quit(const v8::FunctionCallbackInfo<v8::Value>& args);
60 void Version(const v8::FunctionCallbackInfo<v8::Value>& args); 60 void Version(const v8::FunctionCallbackInfo<v8::Value>& args);
61 v8::Handle<v8::String> ReadFile(v8::Isolate* isolate, const char* name); 61 v8::Handle<v8::String> ReadFile(v8::Isolate* isolate, const char* name);
62 void ReportException(v8::Isolate* isolate, v8::TryCatch* handler); 62 void ReportException(v8::Isolate* isolate, v8::TryCatch* handler);
63 63
64 64
65 static bool run_shell; 65 static bool run_shell;
66 66
67 67
68 int main(int argc, char* argv[]) { 68 int main(int argc, char* argv[]) {
69 v8::V8::PerThreadSetUp();
69 v8::V8::InitializeICU(); 70 v8::V8::InitializeICU();
70 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); 71 v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
71 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 72 v8::Isolate* isolate = v8::Isolate::GetCurrent();
72 run_shell = (argc == 1); 73 run_shell = (argc == 1);
73 int result; 74 int result;
74 { 75 {
75 v8::HandleScope handle_scope(isolate); 76 v8::HandleScope handle_scope(isolate);
76 v8::Handle<v8::Context> context = CreateShellContext(isolate); 77 v8::Handle<v8::Context> context = CreateShellContext(isolate);
77 if (context.IsEmpty()) { 78 if (context.IsEmpty()) {
78 fprintf(stderr, "Error creating context\n"); 79 fprintf(stderr, "Error creating context\n");
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 fprintf(stderr, "^"); 363 fprintf(stderr, "^");
363 } 364 }
364 fprintf(stderr, "\n"); 365 fprintf(stderr, "\n");
365 v8::String::Utf8Value stack_trace(try_catch->StackTrace()); 366 v8::String::Utf8Value stack_trace(try_catch->StackTrace());
366 if (stack_trace.length() > 0) { 367 if (stack_trace.length() > 0) {
367 const char* stack_trace_string = ToCString(stack_trace); 368 const char* stack_trace_string = ToCString(stack_trace);
368 fprintf(stderr, "%s\n", stack_trace_string); 369 fprintf(stderr, "%s\n", stack_trace_string);
369 } 370 }
370 } 371 }
371 } 372 }
OLDNEW
« include/v8.h ('K') | « samples/process.cc ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698