OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 5410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5421 | 5421 |
5422 #ifdef ENABLE_DEBUGGER_SUPPORT | 5422 #ifdef ENABLE_DEBUGGER_SUPPORT |
5423 static Object* Runtime_DebugBreak(Arguments args) { | 5423 static Object* Runtime_DebugBreak(Arguments args) { |
5424 ASSERT(args.length() == 0); | 5424 ASSERT(args.length() == 0); |
5425 return Execution::DebugBreakHelper(); | 5425 return Execution::DebugBreakHelper(); |
5426 } | 5426 } |
5427 | 5427 |
5428 | 5428 |
5429 // Helper functions for wrapping and unwrapping stack frame ids. | 5429 // Helper functions for wrapping and unwrapping stack frame ids. |
5430 static Smi* WrapFrameId(StackFrame::Id id) { | 5430 static Smi* WrapFrameId(StackFrame::Id id) { |
5431 ASSERT(IsAligned(OffsetFrom(id), 4)); | 5431 ASSERT(IsAligned(OffsetFrom(id), static_cast<intptr_t>(4))); |
5432 return Smi::FromInt(id >> 2); | 5432 return Smi::FromInt(id >> 2); |
5433 } | 5433 } |
5434 | 5434 |
5435 | 5435 |
5436 static StackFrame::Id UnwrapFrameId(Smi* wrapped) { | 5436 static StackFrame::Id UnwrapFrameId(Smi* wrapped) { |
5437 return static_cast<StackFrame::Id>(wrapped->value() << 2); | 5437 return static_cast<StackFrame::Id>(wrapped->value() << 2); |
5438 } | 5438 } |
5439 | 5439 |
5440 | 5440 |
5441 // Adds a JavaScript function as a debug event listener. | 5441 // Adds a JavaScript function as a debug event listener. |
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7029 } else { | 7029 } else { |
7030 // Handle last resort GC and make sure to allow future allocations | 7030 // Handle last resort GC and make sure to allow future allocations |
7031 // to grow the heap without causing GCs (if possible). | 7031 // to grow the heap without causing GCs (if possible). |
7032 Counters::gc_last_resort_from_js.Increment(); | 7032 Counters::gc_last_resort_from_js.Increment(); |
7033 Heap::CollectAllGarbage(); | 7033 Heap::CollectAllGarbage(); |
7034 } | 7034 } |
7035 } | 7035 } |
7036 | 7036 |
7037 | 7037 |
7038 } } // namespace v8::internal | 7038 } } // namespace v8::internal |
OLD | NEW |