OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 10704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10715 JavaScriptFrame* frame) { | 10715 JavaScriptFrame* frame) { |
10716 SaveContext* save = isolate->save_context(); | 10716 SaveContext* save = isolate->save_context(); |
10717 while (save != NULL && !save->IsBelowFrame(frame)) { | 10717 while (save != NULL && !save->IsBelowFrame(frame)) { |
10718 save = save->prev(); | 10718 save = save->prev(); |
10719 } | 10719 } |
10720 ASSERT(save != NULL); | 10720 ASSERT(save != NULL); |
10721 return save; | 10721 return save; |
10722 } | 10722 } |
10723 | 10723 |
10724 | 10724 |
10725 RUNTIME_FUNCTION(MaybeObject*, Runtime_IsConstructCall) { | |
10726 NoHandleAllocation ha; | |
10727 ASSERT(args.length() == 0); | |
10728 JavaScriptFrameIterator it(isolate); | |
10729 JavaScriptFrame* frame = it.frame(); | |
10730 FrameInspector frame_inspector(frame, frame->GetInlineCount() - 1, isolate); | |
10731 return isolate->heap()->ToBoolean(frame_inspector.IsConstructor()); | |
10732 } | |
10733 | |
10734 | |
10735 // Return an array with frame details | 10725 // Return an array with frame details |
10736 // args[0]: number: break id | 10726 // args[0]: number: break id |
10737 // args[1]: number: frame index | 10727 // args[1]: number: frame index |
10738 // | 10728 // |
10739 // The array returned contains the following information: | 10729 // The array returned contains the following information: |
10740 // 0: Frame id | 10730 // 0: Frame id |
10741 // 1: Receiver | 10731 // 1: Receiver |
10742 // 2: Function | 10732 // 2: Function |
10743 // 3: Argument count | 10733 // 3: Argument count |
10744 // 4: Local count | 10734 // 4: Local count |
(...skipping 2878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13623 // Handle last resort GC and make sure to allow future allocations | 13613 // Handle last resort GC and make sure to allow future allocations |
13624 // to grow the heap without causing GCs (if possible). | 13614 // to grow the heap without causing GCs (if possible). |
13625 isolate->counters()->gc_last_resort_from_js()->Increment(); | 13615 isolate->counters()->gc_last_resort_from_js()->Increment(); |
13626 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, | 13616 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, |
13627 "Runtime::PerformGC"); | 13617 "Runtime::PerformGC"); |
13628 } | 13618 } |
13629 } | 13619 } |
13630 | 13620 |
13631 | 13621 |
13632 } } // namespace v8::internal | 13622 } } // namespace v8::internal |
OLD | NEW |