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