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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 // a variable number of arguments. | 791 // a variable number of arguments. |
792 int nargs; | 792 int nargs; |
793 // Size of result. Most functions return a single pointer, size 1. | 793 // Size of result. Most functions return a single pointer, size 1. |
794 int result_size; | 794 int result_size; |
795 }; | 795 }; |
796 | 796 |
797 static const int kNotFound = -1; | 797 static const int kNotFound = -1; |
798 | 798 |
799 // Add internalized strings for all the intrinsic function names to a | 799 // Add internalized strings for all the intrinsic function names to a |
800 // StringDictionary. | 800 // StringDictionary. |
801 // Returns failure if an allocation fails. In this case, it must be | 801 static void InitializeIntrinsicFunctionNames(Isolate* isolate, |
802 // retried with a new, empty StringDictionary, not with the same one. | 802 Handle<NameDictionary> dict); |
803 // Alternatively, heap initialization can be completely restarted. | |
804 MUST_USE_RESULT static MaybeObject* InitializeIntrinsicFunctionNames( | |
805 Heap* heap, Object* dictionary); | |
806 | 803 |
807 // Get the intrinsic function with the given name, which must be internalized. | 804 // Get the intrinsic function with the given name, which must be internalized. |
808 static const Function* FunctionForName(Handle<String> name); | 805 static const Function* FunctionForName(Handle<String> name); |
809 | 806 |
810 // Get the intrinsic function with the given FunctionId. | 807 // Get the intrinsic function with the given FunctionId. |
811 static const Function* FunctionForId(FunctionId id); | 808 static const Function* FunctionForId(FunctionId id); |
812 | 809 |
813 // General-purpose helper functions for runtime system. | 810 // General-purpose helper functions for runtime system. |
814 static int StringMatch(Isolate* isolate, | 811 static int StringMatch(Isolate* isolate, |
815 Handle<String> sub, | 812 Handle<String> sub, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 910 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
914 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 911 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
915 | 912 |
916 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 913 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
917 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 914 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
918 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 915 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
919 | 916 |
920 } } // namespace v8::internal | 917 } } // namespace v8::internal |
921 | 918 |
922 #endif // V8_RUNTIME_H_ | 919 #endif // V8_RUNTIME_H_ |
OLD | NEW |