OLD | NEW |
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 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3200 frame->fp(), frame->sp(), frame->pp()); | 3200 frame->fp(), frame->sp(), frame->pp()); |
3201 } else { | 3201 } else { |
3202 PrintF("DebugPrint: "); | 3202 PrintF("DebugPrint: "); |
3203 } | 3203 } |
3204 args[0]->Print(); | 3204 args[0]->Print(); |
3205 #else | 3205 #else |
3206 // ShortPrint is available in release mode. Print is not. | 3206 // ShortPrint is available in release mode. Print is not. |
3207 args[0]->ShortPrint(); | 3207 args[0]->ShortPrint(); |
3208 #endif | 3208 #endif |
3209 PrintF("\n"); | 3209 PrintF("\n"); |
| 3210 Flush(); |
3210 | 3211 |
3211 return args[0]; // return TOS | 3212 return args[0]; // return TOS |
3212 } | 3213 } |
3213 | 3214 |
3214 | 3215 |
3215 static Object* Runtime_DebugTrace(Arguments args) { | 3216 static Object* Runtime_DebugTrace(Arguments args) { |
3216 ASSERT(args.length() == 1); | 3217 ASSERT(args.length() == 1); |
3217 NoHandleAllocation ha; | 3218 NoHandleAllocation ha; |
3218 Top::PrintStack(); | 3219 Top::PrintStack(); |
3219 return args[0]; // return TOS | 3220 return args[0]; // return TOS |
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4960 | 4961 |
4961 void Runtime::PerformGC(Object* result) { | 4962 void Runtime::PerformGC(Object* result) { |
4962 Failure* failure = Failure::cast(result); | 4963 Failure* failure = Failure::cast(result); |
4963 // Try to do a garbage collection; ignore it if it fails. The C | 4964 // Try to do a garbage collection; ignore it if it fails. The C |
4964 // entry stub will throw an out-of-memory exception in that case. | 4965 // entry stub will throw an out-of-memory exception in that case. |
4965 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); | 4966 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); |
4966 } | 4967 } |
4967 | 4968 |
4968 | 4969 |
4969 } } // namespace v8::internal | 4970 } } // namespace v8::internal |
OLD | NEW |