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 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 ASSERT(args.length() == 1); | 2910 ASSERT(args.length() == 1); |
2911 | 2911 |
2912 Object* constructor = args[0]; | 2912 Object* constructor = args[0]; |
2913 if (constructor->IsJSFunction()) { | 2913 if (constructor->IsJSFunction()) { |
2914 JSFunction* function = JSFunction::cast(constructor); | 2914 JSFunction* function = JSFunction::cast(constructor); |
2915 | 2915 |
2916 // Handle steping into constructors. | 2916 // Handle steping into constructors. |
2917 if (Debug::StepInActive()) { | 2917 if (Debug::StepInActive()) { |
2918 StackFrameIterator it; | 2918 StackFrameIterator it; |
2919 it.Advance(); | 2919 it.Advance(); |
2920 ASSERT(InternalFrame::cast(it.frame())->is_construct_trampoline()); | 2920 ASSERT(it.frame()->is_construct()); |
2921 it.Advance(); | 2921 it.Advance(); |
2922 if (it.frame()->fp() == Debug::step_in_fp()) { | 2922 if (it.frame()->fp() == Debug::step_in_fp()) { |
2923 HandleScope scope; | 2923 HandleScope scope; |
2924 Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); | 2924 Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared())); |
2925 } | 2925 } |
2926 } | 2926 } |
2927 | 2927 |
2928 if (function->has_initial_map() && | 2928 if (function->has_initial_map() && |
2929 function->initial_map()->instance_type() == JS_FUNCTION_TYPE) { | 2929 function->initial_map()->instance_type() == JS_FUNCTION_TYPE) { |
2930 // The 'Function' function ignores the receiver object when | 2930 // The 'Function' function ignores the receiver object when |
(...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5199 | 5199 |
5200 void Runtime::PerformGC(Object* result) { | 5200 void Runtime::PerformGC(Object* result) { |
5201 Failure* failure = Failure::cast(result); | 5201 Failure* failure = Failure::cast(result); |
5202 // Try to do a garbage collection; ignore it if it fails. The C | 5202 // Try to do a garbage collection; ignore it if it fails. The C |
5203 // entry stub will throw an out-of-memory exception in that case. | 5203 // entry stub will throw an out-of-memory exception in that case. |
5204 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); | 5204 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); |
5205 } | 5205 } |
5206 | 5206 |
5207 | 5207 |
5208 } } // namespace v8::internal | 5208 } } // namespace v8::internal |
OLD | NEW |