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

Side by Side Diff: src/runtime.cc

Issue 1697: This change makes the runtime function %DebugPrint()... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | « no previous file | 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 3203 matching lines...) Expand 10 before | Expand all | Expand 10 after
3214 // and print some interesting cpu debugging info. 3214 // and print some interesting cpu debugging info.
3215 JavaScriptFrameIterator it; 3215 JavaScriptFrameIterator it;
3216 JavaScriptFrame* frame = it.frame(); 3216 JavaScriptFrame* frame = it.frame();
3217 PrintF("fp = %p, sp = %p, pp = %p: ", 3217 PrintF("fp = %p, sp = %p, pp = %p: ",
3218 frame->fp(), frame->sp(), frame->pp()); 3218 frame->fp(), frame->sp(), frame->pp());
3219 } else { 3219 } else {
3220 PrintF("DebugPrint: "); 3220 PrintF("DebugPrint: ");
3221 } 3221 }
3222 args[0]->Print(); 3222 args[0]->Print();
3223 #else 3223 #else
3224 PrintF("DebugPrint: %p", args[0]); 3224 // ShortPrint is available in release mode. Print is not.
3225 args[0]->ShortPrint();
3225 #endif 3226 #endif
3226 PrintF("\n"); 3227 PrintF("\n");
3227 3228
3228 return args[0]; // return TOS 3229 return args[0]; // return TOS
3229 } 3230 }
3230 3231
3231 3232
3232 static Object* Runtime_DebugTrace(Arguments args) { 3233 static Object* Runtime_DebugTrace(Arguments args) {
3233 ASSERT(args.length() == 1); 3234 ASSERT(args.length() == 1);
3234 NoHandleAllocation ha; 3235 NoHandleAllocation ha;
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
4991 4992
4992 void Runtime::PerformGC(Object* result) { 4993 void Runtime::PerformGC(Object* result) {
4993 Failure* failure = Failure::cast(result); 4994 Failure* failure = Failure::cast(result);
4994 // Try to do a garbage collection; ignore it if it fails. The C 4995 // Try to do a garbage collection; ignore it if it fails. The C
4995 // entry stub will throw an out-of-memory exception in that case. 4996 // entry stub will throw an out-of-memory exception in that case.
4996 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); 4997 Heap::CollectGarbage(failure->requested(), failure->allocation_space());
4997 } 4998 }
4998 4999
4999 5000
5000 } } // namespace v8::internal 5001 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698