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

Side by Side Diff: samples/shell.cc

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 4 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 | « preparser/preparser-process.cc ('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 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 SourceGroup() : 88 SourceGroup() :
89 #if !(defined(USING_V8_SHARED) || defined(V8_SHARED)) 89 #if !(defined(USING_V8_SHARED) || defined(V8_SHARED))
90 next_semaphore_(v8::internal::OS::CreateSemaphore(0)), 90 next_semaphore_(v8::internal::OS::CreateSemaphore(0)),
91 done_semaphore_(v8::internal::OS::CreateSemaphore(0)), 91 done_semaphore_(v8::internal::OS::CreateSemaphore(0)),
92 thread_(NULL), 92 thread_(NULL),
93 #endif // USING_V8_SHARED 93 #endif // USING_V8_SHARED
94 argv_(NULL), 94 argv_(NULL),
95 begin_offset_(0), 95 begin_offset_(0),
96 end_offset_(0) { } 96 end_offset_(0) { }
97 97
98 #if !(defined(USING_V8_SHARED) || defined(V8_SHARED))
99 ~SourceGroup() {
100 delete next_semaphore_;
101 delete done_semaphore_;
102 }
103 #endif // USING_V8_SHARED
104
98 void Begin(char** argv, int offset) { 105 void Begin(char** argv, int offset) {
99 argv_ = const_cast<const char**>(argv); 106 argv_ = const_cast<const char**>(argv);
100 begin_offset_ = offset; 107 begin_offset_ = offset;
101 } 108 }
102 109
103 void End(int offset) { end_offset_ = offset; } 110 void End(int offset) { end_offset_ = offset; }
104 111
105 void Execute() { 112 void Execute() {
106 for (int i = begin_offset_; i < end_offset_; ++i) { 113 for (int i = begin_offset_; i < end_offset_; ++i) {
107 const char* arg = argv_[i]; 114 const char* arg = argv_[i];
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 printf("^"); 711 printf("^");
705 } 712 }
706 printf("\n"); 713 printf("\n");
707 v8::String::Utf8Value stack_trace(try_catch->StackTrace()); 714 v8::String::Utf8Value stack_trace(try_catch->StackTrace());
708 if (stack_trace.length() > 0) { 715 if (stack_trace.length() > 0) {
709 const char* stack_trace_string = ToCString(stack_trace); 716 const char* stack_trace_string = ToCString(stack_trace);
710 printf("%s\n", stack_trace_string); 717 printf("%s\n", stack_trace_string);
711 } 718 }
712 } 719 }
713 } 720 }
OLDNEW
« no previous file with comments | « preparser/preparser-process.cc ('k') | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698