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

Side by Side Diff: src/top.cc

Issue 6720017: Add inline non-transcendental cache version of log to lithium. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 | « src/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 11 matching lines...) Expand all
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "bootstrapper.h" 31 #include "bootstrapper.h"
32 #include "compiler.h"
32 #include "debug.h" 33 #include "debug.h"
33 #include "execution.h" 34 #include "execution.h"
34 #include "messages.h" 35 #include "messages.h"
35 #include "platform.h" 36 #include "platform.h"
36 #include "simulator.h" 37 #include "simulator.h"
37 #include "string-stream.h" 38 #include "string-stream.h"
38 #include "vm-state-inl.h" 39 #include "vm-state-inl.h"
39 40
41
40 // TODO(isolates): move to isolate.cc. This stuff is kept here to 42 // TODO(isolates): move to isolate.cc. This stuff is kept here to
41 // simplify merging. 43 // simplify merging.
42 44
43 namespace v8 { 45 namespace v8 {
44 namespace internal { 46 namespace internal {
45 47
46 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { 48 v8::TryCatch* ThreadLocalTop::TryCatchHandler() {
47 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); 49 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address());
48 } 50 }
49 51
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 factory()->LookupAsciiSymbol("scriptNameOrSourceURL"); 203 factory()->LookupAsciiSymbol("scriptNameOrSourceURL");
202 Handle<String> function_key = factory()->LookupAsciiSymbol("functionName"); 204 Handle<String> function_key = factory()->LookupAsciiSymbol("functionName");
203 Handle<String> eval_key = factory()->LookupAsciiSymbol("isEval"); 205 Handle<String> eval_key = factory()->LookupAsciiSymbol("isEval");
204 Handle<String> constructor_key = 206 Handle<String> constructor_key =
205 factory()->LookupAsciiSymbol("isConstructor"); 207 factory()->LookupAsciiSymbol("isConstructor");
206 208
207 StackTraceFrameIterator it; 209 StackTraceFrameIterator it;
208 int frames_seen = 0; 210 int frames_seen = 0;
209 while (!it.done() && (frames_seen < limit)) { 211 while (!it.done() && (frames_seen < limit)) {
210 JavaScriptFrame* frame = it.frame(); 212 JavaScriptFrame* frame = it.frame();
211 213 // Set initial size to the maximum inlining level + 1 for the outermost
212 List<FrameSummary> frames(3); // Max 2 levels of inlining. 214 // function.
215 List<FrameSummary> frames(Compiler::kMaxInliningLevels + 1);
213 frame->Summarize(&frames); 216 frame->Summarize(&frames);
214 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) { 217 for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) {
215 // Create a JSObject to hold the information for the StackFrame. 218 // Create a JSObject to hold the information for the StackFrame.
216 Handle<JSObject> stackFrame = factory()->NewJSObject(object_function()); 219 Handle<JSObject> stackFrame = factory()->NewJSObject(object_function());
217 220
218 Handle<JSFunction> fun = frames[i].function(); 221 Handle<JSFunction> fun = frames[i].function();
219 Handle<Script> script(Script::cast(fun->shared()->script())); 222 Handle<Script> script(Script::cast(fun->shared()->script()));
220 223
221 if (options & StackTrace::kLineNumber) { 224 if (options & StackTrace::kLineNumber) {
222 int script_line_offset = script->line_offset()->value(); 225 int script_line_offset = script->line_offset()->value();
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 thread_local_top()->simulator_ = Simulator::current(this); 974 thread_local_top()->simulator_ = Simulator::current(this);
972 #endif 975 #endif
973 #endif 976 #endif
974 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { 977 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) {
975 RuntimeProfiler::IsolateEnteredJS(this); 978 RuntimeProfiler::IsolateEnteredJS(this);
976 } 979 }
977 return from + sizeof(ThreadLocalTop); 980 return from + sizeof(ThreadLocalTop);
978 } 981 }
979 982
980 } } // namespace v8::internal 983 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698