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 4779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4790 | 4790 |
4791 | 4791 |
4792 static Object* Runtime_ReThrow(Arguments args) { | 4792 static Object* Runtime_ReThrow(Arguments args) { |
4793 HandleScope scope; | 4793 HandleScope scope; |
4794 ASSERT(args.length() == 1); | 4794 ASSERT(args.length() == 1); |
4795 | 4795 |
4796 return Top::ReThrow(args[0]); | 4796 return Top::ReThrow(args[0]); |
4797 } | 4797 } |
4798 | 4798 |
4799 | 4799 |
| 4800 static Object* Runtime_PromoteScheduledException(Arguments args) { |
| 4801 ASSERT_EQ(0, args.length()); |
| 4802 return Top::PromoteScheduledException(); |
| 4803 } |
| 4804 |
| 4805 |
4800 static Object* Runtime_ThrowReferenceError(Arguments args) { | 4806 static Object* Runtime_ThrowReferenceError(Arguments args) { |
4801 HandleScope scope; | 4807 HandleScope scope; |
4802 ASSERT(args.length() == 1); | 4808 ASSERT(args.length() == 1); |
4803 | 4809 |
4804 Handle<Object> name(args[0]); | 4810 Handle<Object> name(args[0]); |
4805 Handle<Object> reference_error = | 4811 Handle<Object> reference_error = |
4806 Factory::NewReferenceError("not_defined", HandleVector(&name, 1)); | 4812 Factory::NewReferenceError("not_defined", HandleVector(&name, 1)); |
4807 return Top::Throw(*reference_error); | 4813 return Top::Throw(*reference_error); |
4808 } | 4814 } |
4809 | 4815 |
(...skipping 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7751 ASSERT(args.length() == 2); | 7757 ASSERT(args.length() == 2); |
7752 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) + | 7758 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) + |
7753 Smi::cast(args[1])->value()); | 7759 Smi::cast(args[1])->value()); |
7754 Top::PrintStack(); | 7760 Top::PrintStack(); |
7755 OS::Abort(); | 7761 OS::Abort(); |
7756 UNREACHABLE(); | 7762 UNREACHABLE(); |
7757 return NULL; | 7763 return NULL; |
7758 } | 7764 } |
7759 | 7765 |
7760 | 7766 |
| 7767 static Object* Runtime_DeleteHandleScopeExtensions(Arguments args) { |
| 7768 ASSERT(args.length() == 0); |
| 7769 HandleScope::DeleteExtensions(); |
| 7770 return Heap::undefined_value(); |
| 7771 } |
| 7772 |
| 7773 |
7761 #ifdef DEBUG | 7774 #ifdef DEBUG |
7762 // ListNatives is ONLY used by the fuzz-natives.js in debug mode | 7775 // ListNatives is ONLY used by the fuzz-natives.js in debug mode |
7763 // Exclude the code in release mode. | 7776 // Exclude the code in release mode. |
7764 static Object* Runtime_ListNatives(Arguments args) { | 7777 static Object* Runtime_ListNatives(Arguments args) { |
7765 ASSERT(args.length() == 0); | 7778 ASSERT(args.length() == 0); |
7766 HandleScope scope; | 7779 HandleScope scope; |
7767 Handle<JSArray> result = Factory::NewJSArray(0); | 7780 Handle<JSArray> result = Factory::NewJSArray(0); |
7768 int index = 0; | 7781 int index = 0; |
7769 #define ADD_ENTRY(Name, argc, ressize) \ | 7782 #define ADD_ENTRY(Name, argc, ressize) \ |
7770 { \ | 7783 { \ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7839 } else { | 7852 } else { |
7840 // Handle last resort GC and make sure to allow future allocations | 7853 // Handle last resort GC and make sure to allow future allocations |
7841 // to grow the heap without causing GCs (if possible). | 7854 // to grow the heap without causing GCs (if possible). |
7842 Counters::gc_last_resort_from_js.Increment(); | 7855 Counters::gc_last_resort_from_js.Increment(); |
7843 Heap::CollectAllGarbage(false); | 7856 Heap::CollectAllGarbage(false); |
7844 } | 7857 } |
7845 } | 7858 } |
7846 | 7859 |
7847 | 7860 |
7848 } } // namespace v8::internal | 7861 } } // namespace v8::internal |
OLD | NEW |