| 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 | 820 |
| 821 // TODO(1240886): Some of the following methods are *not* handle safe, but | 821 // TODO(1240886): Some of the following methods are *not* handle safe, but |
| 822 // accept handle arguments. This seems fragile. | 822 // accept handle arguments. This seems fragile. |
| 823 | 823 |
| 824 // Support getting the characters in a string using [] notation as | 824 // Support getting the characters in a string using [] notation as |
| 825 // in Firefox/SpiderMonkey, Safari and Opera. | 825 // in Firefox/SpiderMonkey, Safari and Opera. |
| 826 static Handle<Object> GetElementOrCharAt(Isolate* isolate, | 826 static Handle<Object> GetElementOrCharAt(Isolate* isolate, |
| 827 Handle<Object> object, | 827 Handle<Object> object, |
| 828 uint32_t index); | 828 uint32_t index); |
| 829 | 829 |
| 830 static Handle<Object> SetObjectProperty( | 830 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( |
| 831 Isolate* isolate, | 831 Isolate* isolate, |
| 832 Handle<Object> object, | 832 Handle<Object> object, |
| 833 Handle<Object> key, | 833 Handle<Object> key, |
| 834 Handle<Object> value, | 834 Handle<Object> value, |
| 835 PropertyAttributes attr, | 835 PropertyAttributes attr, |
| 836 StrictMode strict_mode); | 836 StrictMode strict_mode); |
| 837 | 837 |
| 838 static Handle<Object> ForceSetObjectProperty( | 838 MUST_USE_RESULT static MaybeHandle<Object> ForceSetObjectProperty( |
| 839 Isolate* isolate, | |
| 840 Handle<JSObject> object, | 839 Handle<JSObject> object, |
| 841 Handle<Object> key, | 840 Handle<Object> key, |
| 842 Handle<Object> value, | 841 Handle<Object> value, |
| 843 PropertyAttributes attr); | 842 PropertyAttributes attr); |
| 844 | 843 |
| 845 MUST_USE_RESULT static MaybeObject* DeleteObjectProperty( | 844 MUST_USE_RESULT static MaybeObject* DeleteObjectProperty( |
| 846 Isolate* isolate, | 845 Isolate* isolate, |
| 847 Handle<JSReceiver> object, | 846 Handle<JSReceiver> object, |
| 848 Handle<Object> key, | 847 Handle<Object> key, |
| 849 JSReceiver::DeleteMode mode); | 848 JSReceiver::DeleteMode mode); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 ExternalArrayType *type, | 891 ExternalArrayType *type, |
| 893 ElementsKind* external_elements_kind, | 892 ElementsKind* external_elements_kind, |
| 894 ElementsKind* fixed_elements_kind, | 893 ElementsKind* fixed_elements_kind, |
| 895 size_t *element_size); | 894 size_t *element_size); |
| 896 | 895 |
| 897 // Helper functions used stubs. | 896 // Helper functions used stubs. |
| 898 static void PerformGC(Object* result, Isolate* isolate); | 897 static void PerformGC(Object* result, Isolate* isolate); |
| 899 static void OutOfMemory(); | 898 static void OutOfMemory(); |
| 900 | 899 |
| 901 // Used in runtime.cc and hydrogen's VisitArrayLiteral. | 900 // Used in runtime.cc and hydrogen's VisitArrayLiteral. |
| 902 static Handle<Object> CreateArrayLiteralBoilerplate( | 901 MUST_USE_RESULT static MaybeHandle<Object> CreateArrayLiteralBoilerplate( |
| 903 Isolate* isolate, | 902 Isolate* isolate, |
| 904 Handle<FixedArray> literals, | 903 Handle<FixedArray> literals, |
| 905 Handle<FixedArray> elements); | 904 Handle<FixedArray> elements); |
| 906 }; | 905 }; |
| 907 | 906 |
| 908 | 907 |
| 909 //--------------------------------------------------------------------------- | 908 //--------------------------------------------------------------------------- |
| 910 // Constants used by interface to runtime functions. | 909 // Constants used by interface to runtime functions. |
| 911 | 910 |
| 912 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 911 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; |
| 913 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 912 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; |
| 914 | 913 |
| 915 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 914 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; |
| 916 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 915 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; |
| 917 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 916 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; |
| 918 | 917 |
| 919 } } // namespace v8::internal | 918 } } // namespace v8::internal |
| 920 | 919 |
| 921 #endif // V8_RUNTIME_H_ | 920 #endif // V8_RUNTIME_H_ |
| OLD | NEW |