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, 4, 1) \ | 81 F(LoadFromSuper, 3, 1) \ |
82 F(LoadKeyedFromSuper, 4, 1) \ | 82 F(LoadKeyedFromSuper, 3, 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 F(SetPrototype, 2, 1) \ | 424 F(SetPrototype, 2, 1) \ |
425 F(IsInPrototypeChain, 2, 1) \ | 425 F(IsInPrototypeChain, 2, 1) \ |
426 F(GetOwnProperty, 2, 1) \ | 426 F(GetOwnProperty, 2, 1) \ |
427 F(PreventExtensions, 1, 1) \ | 427 F(PreventExtensions, 1, 1) \ |
428 F(IsExtensible, 1, 1) \ | 428 F(IsExtensible, 1, 1) \ |
429 F(DisableAccessChecks, 1, 1) \ | 429 F(DisableAccessChecks, 1, 1) \ |
430 F(EnableAccessChecks, 1, 1) \ | 430 F(EnableAccessChecks, 1, 1) \ |
431 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ | 431 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \ |
432 F(ObjectFreeze, 1, 1) \ | 432 F(ObjectFreeze, 1, 1) \ |
433 F(ObjectSeal, 1, 1) \ | 433 F(ObjectSeal, 1, 1) \ |
434 F(GetProperty, 3, 1) \ | 434 F(GetProperty, 2, 1) \ |
435 F(KeyedGetProperty, 3, 1) \ | 435 F(KeyedGetProperty, 2, 1) \ |
436 F(AddNamedProperty, 4, 1) \ | 436 F(AddNamedProperty, 4, 1) \ |
437 F(SetProperty, 4, 1) \ | 437 F(SetProperty, 4, 1) \ |
438 F(AddElement, 3, 1) \ | 438 F(AddElement, 3, 1) \ |
439 F(AppendElement, 2, 1) \ | 439 F(AppendElement, 2, 1) \ |
440 F(DeleteProperty, 3, 1) \ | 440 F(DeleteProperty, 3, 1) \ |
441 F(HasOwnProperty, 2, 1) \ | 441 F(HasOwnProperty, 2, 1) \ |
442 F(HasProperty, 2, 1) \ | 442 F(HasProperty, 2, 1) \ |
443 F(HasElement, 2, 1) \ | 443 F(HasElement, 2, 1) \ |
444 F(IsPropertyEnumerable, 2, 1) \ | 444 F(IsPropertyEnumerable, 2, 1) \ |
445 F(GetPropertyNames, 1, 1) \ | 445 F(GetPropertyNames, 1, 1) \ |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 // Get the intrinsic function with the given function entry address. | 809 // Get the intrinsic function with the given function entry address. |
810 static const Function* FunctionForEntry(Address ref); | 810 static const Function* FunctionForEntry(Address ref); |
811 | 811 |
812 // TODO(1240886): Some of the following methods are *not* handle safe, but | 812 // TODO(1240886): Some of the following methods are *not* handle safe, but |
813 // accept handle arguments. This seems fragile. | 813 // accept handle arguments. This seems fragile. |
814 | 814 |
815 // Support getting the characters in a string using [] notation as | 815 // Support getting the characters in a string using [] notation as |
816 // in Firefox/SpiderMonkey, Safari and Opera. | 816 // in Firefox/SpiderMonkey, Safari and Opera. |
817 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( | 817 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( |
818 Isolate* isolate, Handle<Object> object, uint32_t index, | 818 Isolate* isolate, Handle<Object> object, uint32_t index); |
819 LanguageMode language_mode = SLOPPY); | |
820 | 819 |
821 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( | 820 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( |
822 Isolate* isolate, Handle<Object> object, Handle<Object> key, | 821 Isolate* isolate, Handle<Object> object, Handle<Object> key, |
823 Handle<Object> value, LanguageMode language_mode); | 822 Handle<Object> value, LanguageMode language_mode); |
824 | 823 |
825 MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty( | 824 MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty( |
826 Isolate* isolate, Handle<Object> object, Handle<Object> key, | 825 Isolate* isolate, Handle<Object> object, Handle<Object> key); |
827 LanguageMode language_mode = SLOPPY); | |
828 | |
829 MUST_USE_RESULT static MaybeHandle<Object> KeyedGetObjectProperty( | |
830 Isolate* isolate, Handle<Object> receiver_obj, Handle<Object> key_obj, | |
831 LanguageMode language_mode); | |
832 | 826 |
833 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( | 827 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( |
834 Isolate* isolate, Handle<Object> object); | 828 Isolate* isolate, Handle<Object> object); |
835 | 829 |
836 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, | 830 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, |
837 Handle<Object> key); | 831 Handle<Object> key); |
838 | 832 |
839 static void SetupArrayBuffer(Isolate* isolate, | 833 static void SetupArrayBuffer(Isolate* isolate, |
840 Handle<JSArrayBuffer> array_buffer, | 834 Handle<JSArrayBuffer> array_buffer, |
841 bool is_external, void* data, | 835 bool is_external, void* data, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 inline bool Runtime::AtomicIsLockFree(uint32_t size) { | 924 inline bool Runtime::AtomicIsLockFree(uint32_t size) { |
931 return size == 1 || size == 2 || size == 4; | 925 return size == 1 || size == 2 || size == 4; |
932 } | 926 } |
933 | 927 |
934 #endif | 928 #endif |
935 | 929 |
936 } // namespace internal | 930 } // namespace internal |
937 } // namespace v8 | 931 } // namespace v8 |
938 | 932 |
939 #endif // V8_RUNTIME_RUNTIME_H_ | 933 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |