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