| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_RUNTIME_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
| 6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 #include "src/zone.h" | 10 #include "src/zone.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 F(ThrowUnsupportedSuperError, 0, 1) \ | 71 F(ThrowUnsupportedSuperError, 0, 1) \ |
| 72 F(ThrowConstructorNonCallableError, 0, 1) \ | 72 F(ThrowConstructorNonCallableError, 0, 1) \ |
| 73 F(ThrowArrayNotSubclassableError, 0, 1) \ | 73 F(ThrowArrayNotSubclassableError, 0, 1) \ |
| 74 F(ThrowStaticPrototypeError, 0, 1) \ | 74 F(ThrowStaticPrototypeError, 0, 1) \ |
| 75 F(ThrowIfStaticPrototype, 1, 1) \ | 75 F(ThrowIfStaticPrototype, 1, 1) \ |
| 76 F(ToMethod, 2, 1) \ | 76 F(ToMethod, 2, 1) \ |
| 77 F(HomeObjectSymbol, 0, 1) \ | 77 F(HomeObjectSymbol, 0, 1) \ |
| 78 F(DefineClass, 6, 1) \ | 78 F(DefineClass, 6, 1) \ |
| 79 F(DefineClassMethod, 3, 1) \ | 79 F(DefineClassMethod, 3, 1) \ |
| 80 F(ClassGetSourceCode, 1, 1) \ | 80 F(ClassGetSourceCode, 1, 1) \ |
| 81 F(LoadFromSuper, 3, 1) \ | 81 F(LoadFromSuper, 4, 1) \ |
| 82 F(LoadKeyedFromSuper, 3, 1) \ | 82 F(LoadKeyedFromSuper, 4, 1) \ |
| 83 F(StoreToSuper_Strict, 4, 1) \ | 83 F(StoreToSuper_Strict, 4, 1) \ |
| 84 F(StoreToSuper_Sloppy, 4, 1) \ | 84 F(StoreToSuper_Sloppy, 4, 1) \ |
| 85 F(StoreKeyedToSuper_Strict, 4, 1) \ | 85 F(StoreKeyedToSuper_Strict, 4, 1) \ |
| 86 F(StoreKeyedToSuper_Sloppy, 4, 1) \ | 86 F(StoreKeyedToSuper_Sloppy, 4, 1) \ |
| 87 F(HandleStepInForDerivedConstructors, 1, 1) \ | 87 F(HandleStepInForDerivedConstructors, 1, 1) \ |
| 88 F(DefaultConstructorCallSuper, 2, 1) \ | 88 F(DefaultConstructorCallSuper, 2, 1) \ |
| 89 F(CallSuperWithSpread, 1, 1) | 89 F(CallSuperWithSpread, 1, 1) |
| 90 | 90 |
| 91 | 91 |
| 92 #define FOR_EACH_INTRINSIC_COLLECTIONS(F) \ | 92 #define FOR_EACH_INTRINSIC_COLLECTIONS(F) \ |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 F(SetPrototype, 2, 1) \ | 423 F(SetPrototype, 2, 1) \ |
| 424 F(IsInPrototypeChain, 2, 1) \ | 424 F(IsInPrototypeChain, 2, 1) \ |
| 425 F(GetOwnProperty, 2, 1) \ | 425 F(GetOwnProperty, 2, 1) \ |
| 426 F(PreventExtensions, 1, 1) \ | 426 F(PreventExtensions, 1, 1) \ |
| 427 F(IsExtensible, 1, 1) \ | 427 F(IsExtensible, 1, 1) \ |
| 428 F(DisableAccessChecks, 1, 1) \ | 428 F(DisableAccessChecks, 1, 1) \ |
| 429 F(EnableAccessChecks, 1, 1) \ | 429 F(EnableAccessChecks, 1, 1) \ |
| 430 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ | 430 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ |
| 431 F(ObjectFreeze, 1, 1) \ | 431 F(ObjectFreeze, 1, 1) \ |
| 432 F(ObjectSeal, 1, 1) \ | 432 F(ObjectSeal, 1, 1) \ |
| 433 F(GetProperty, 2, 1) \ | 433 F(GetProperty, 3, 1) \ |
| 434 F(KeyedGetProperty, 2, 1) \ | 434 F(KeyedGetProperty, 3, 1) \ |
| 435 F(AddNamedProperty, 4, 1) \ | 435 F(AddNamedProperty, 4, 1) \ |
| 436 F(SetProperty, 4, 1) \ | 436 F(SetProperty, 4, 1) \ |
| 437 F(AddElement, 4, 1) \ | 437 F(AddElement, 4, 1) \ |
| 438 F(AppendElement, 2, 1) \ | 438 F(AppendElement, 2, 1) \ |
| 439 F(DeleteProperty, 3, 1) \ | 439 F(DeleteProperty, 3, 1) \ |
| 440 F(HasOwnProperty, 2, 1) \ | 440 F(HasOwnProperty, 2, 1) \ |
| 441 F(HasProperty, 2, 1) \ | 441 F(HasProperty, 2, 1) \ |
| 442 F(HasElement, 2, 1) \ | 442 F(HasElement, 2, 1) \ |
| 443 F(IsPropertyEnumerable, 2, 1) \ | 443 F(IsPropertyEnumerable, 2, 1) \ |
| 444 F(GetPropertyNames, 1, 1) \ | 444 F(GetPropertyNames, 1, 1) \ |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 | 809 |
| 810 // Get the intrinsic function with the given function entry address. | 810 // Get the intrinsic function with the given function entry address. |
| 811 static const Function* FunctionForEntry(Address ref); | 811 static const Function* FunctionForEntry(Address ref); |
| 812 | 812 |
| 813 // TODO(1240886): Some of the following methods are *not* handle safe, but | 813 // TODO(1240886): Some of the following methods are *not* handle safe, but |
| 814 // accept handle arguments. This seems fragile. | 814 // accept handle arguments. This seems fragile. |
| 815 | 815 |
| 816 // Support getting the characters in a string using [] notation as | 816 // Support getting the characters in a string using [] notation as |
| 817 // in Firefox/SpiderMonkey, Safari and Opera. | 817 // in Firefox/SpiderMonkey, Safari and Opera. |
| 818 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( | 818 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( |
| 819 Isolate* isolate, Handle<Object> object, uint32_t index); | 819 Isolate* isolate, Handle<Object> object, uint32_t index, |
| 820 Strength strength = Strength::WEAK); |
| 820 | 821 |
| 821 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( | 822 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( |
| 822 Isolate* isolate, Handle<Object> object, Handle<Object> key, | 823 Isolate* isolate, Handle<Object> object, Handle<Object> key, |
| 823 Handle<Object> value, LanguageMode language_mode); | 824 Handle<Object> value, LanguageMode language_mode); |
| 824 | 825 |
| 825 MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty( | 826 MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty( |
| 826 Handle<JSObject> object, Handle<Object> key, Handle<Object> value, | 827 Handle<JSObject> object, Handle<Object> key, Handle<Object> value, |
| 827 PropertyAttributes attr); | 828 PropertyAttributes attr); |
| 828 | 829 |
| 829 MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty( | 830 MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty( |
| 830 Isolate* isolate, Handle<Object> object, Handle<Object> key); | 831 Isolate* isolate, Handle<Object> object, Handle<Object> key, |
| 832 Strength strength = Strength::WEAK); |
| 833 |
| 834 MUST_USE_RESULT static MaybeHandle<Object> KeyedGetObjectProperty( |
| 835 Isolate* isolate, Handle<Object> receiver_obj, Handle<Object> key_obj, |
| 836 Strength strength); |
| 831 | 837 |
| 832 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( | 838 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( |
| 833 Isolate* isolate, Handle<Object> object); | 839 Isolate* isolate, Handle<Object> object); |
| 834 | 840 |
| 835 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, | 841 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, |
| 836 Handle<Object> key); | 842 Handle<Object> key); |
| 837 | 843 |
| 838 static void SetupArrayBuffer(Isolate* isolate, | 844 static void SetupArrayBuffer(Isolate* isolate, |
| 839 Handle<JSArrayBuffer> array_buffer, | 845 Handle<JSArrayBuffer> array_buffer, |
| 840 bool is_external, void* data, | 846 bool is_external, void* data, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 inline bool Runtime::AtomicIsLockFree(uint32_t size) { | 935 inline bool Runtime::AtomicIsLockFree(uint32_t size) { |
| 930 return size == 1 || size == 2 || size == 4; | 936 return size == 1 || size == 2 || size == 4; |
| 931 } | 937 } |
| 932 | 938 |
| 933 #endif | 939 #endif |
| 934 | 940 |
| 935 } // namespace internal | 941 } // namespace internal |
| 936 } // namespace v8 | 942 } // namespace v8 |
| 937 | 943 |
| 938 #endif // V8_RUNTIME_RUNTIME_H_ | 944 #endif // V8_RUNTIME_RUNTIME_H_ |
| OLD | NEW |