OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 10730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10741 cache_handle->set(index + 1, *value); | 10741 cache_handle->set(index + 1, *value); |
10742 cache_handle->set_finger_index(index); | 10742 cache_handle->set_finger_index(index); |
10743 | 10743 |
10744 #ifdef DEBUG | 10744 #ifdef DEBUG |
10745 cache_handle->JSFunctionResultCacheVerify(); | 10745 cache_handle->JSFunctionResultCacheVerify(); |
10746 #endif | 10746 #endif |
10747 | 10747 |
10748 return *value; | 10748 return *value; |
10749 } | 10749 } |
10750 | 10750 |
| 10751 |
| 10752 static MaybeObject* Runtime_NewMessageObject(Arguments args) { |
| 10753 HandleScope scope; |
| 10754 CONVERT_ARG_CHECKED(String, type, 0); |
| 10755 CONVERT_ARG_CHECKED(JSArray, arguments, 1); |
| 10756 return *Factory::NewJSMessageObject(type, |
| 10757 arguments, |
| 10758 0, |
| 10759 0, |
| 10760 Factory::undefined_value(), |
| 10761 Factory::undefined_value(), |
| 10762 Factory::undefined_value()); |
| 10763 } |
| 10764 |
| 10765 |
| 10766 static MaybeObject* Runtime_MessageGetType(Arguments args) { |
| 10767 CONVERT_CHECKED(JSMessageObject, message, args[0]); |
| 10768 return message->type(); |
| 10769 } |
| 10770 |
| 10771 |
| 10772 static MaybeObject* Runtime_MessageGetArguments(Arguments args) { |
| 10773 CONVERT_CHECKED(JSMessageObject, message, args[0]); |
| 10774 return message->arguments(); |
| 10775 } |
| 10776 |
| 10777 |
| 10778 static MaybeObject* Runtime_MessageGetStartPosition(Arguments args) { |
| 10779 CONVERT_CHECKED(JSMessageObject, message, args[0]); |
| 10780 return Smi::FromInt(message->start_position()); |
| 10781 } |
| 10782 |
| 10783 |
| 10784 static MaybeObject* Runtime_MessageGetScript(Arguments args) { |
| 10785 CONVERT_CHECKED(JSMessageObject, message, args[0]); |
| 10786 return message->script(); |
| 10787 } |
| 10788 |
| 10789 |
10751 #ifdef DEBUG | 10790 #ifdef DEBUG |
10752 // ListNatives is ONLY used by the fuzz-natives.js in debug mode | 10791 // ListNatives is ONLY used by the fuzz-natives.js in debug mode |
10753 // Exclude the code in release mode. | 10792 // Exclude the code in release mode. |
10754 static MaybeObject* Runtime_ListNatives(Arguments args) { | 10793 static MaybeObject* Runtime_ListNatives(Arguments args) { |
10755 ASSERT(args.length() == 0); | 10794 ASSERT(args.length() == 0); |
10756 HandleScope scope; | 10795 HandleScope scope; |
10757 Handle<JSArray> result = Factory::NewJSArray(0); | 10796 Handle<JSArray> result = Factory::NewJSArray(0); |
10758 int index = 0; | 10797 int index = 0; |
10759 bool inline_runtime_functions = false; | 10798 bool inline_runtime_functions = false; |
10760 #define ADD_ENTRY(Name, argc, ressize) \ | 10799 #define ADD_ENTRY(Name, argc, ressize) \ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10870 } else { | 10909 } else { |
10871 // Handle last resort GC and make sure to allow future allocations | 10910 // Handle last resort GC and make sure to allow future allocations |
10872 // to grow the heap without causing GCs (if possible). | 10911 // to grow the heap without causing GCs (if possible). |
10873 Counters::gc_last_resort_from_js.Increment(); | 10912 Counters::gc_last_resort_from_js.Increment(); |
10874 Heap::CollectAllGarbage(false); | 10913 Heap::CollectAllGarbage(false); |
10875 } | 10914 } |
10876 } | 10915 } |
10877 | 10916 |
10878 | 10917 |
10879 } } // namespace v8::internal | 10918 } } // namespace v8::internal |
OLD | NEW |