Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Side by Side Diff: src/runtime/runtime.h

Issue 1069883002: WIP SharedArrayBuffer implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 F(HasFixedUint16Elements, 1, 1) \ 609 F(HasFixedUint16Elements, 1, 1) \
610 F(HasFixedInt16Elements, 1, 1) \ 610 F(HasFixedInt16Elements, 1, 1) \
611 F(HasFixedUint32Elements, 1, 1) \ 611 F(HasFixedUint32Elements, 1, 1) \
612 F(HasFixedInt32Elements, 1, 1) \ 612 F(HasFixedInt32Elements, 1, 1) \
613 F(HasFixedFloat32Elements, 1, 1) \ 613 F(HasFixedFloat32Elements, 1, 1) \
614 F(HasFixedFloat64Elements, 1, 1) \ 614 F(HasFixedFloat64Elements, 1, 1) \
615 F(HasFixedUint8ClampedElements, 1, 1) 615 F(HasFixedUint8ClampedElements, 1, 1)
616 616
617 617
618 #define FOR_EACH_INTRINSIC_TYPEDARRAY(F) \ 618 #define FOR_EACH_INTRINSIC_TYPEDARRAY(F) \
619 F(ArrayBufferInitialize, 2, 1) \ 619 F(ArrayBufferInitialize, 3, 1) \
620 F(ArrayBufferGetByteLength, 1, 1) \ 620 F(ArrayBufferGetByteLength, 1, 1) \
621 F(ArrayBufferSliceImpl, 3, 1) \ 621 F(ArrayBufferSliceImpl, 3, 1) \
622 F(ArrayBufferIsView, 1, 1) \ 622 F(ArrayBufferIsView, 1, 1) \
623 F(ArrayBufferNeuter, 1, 1) \ 623 F(ArrayBufferNeuter, 1, 1) \
624 F(TypedArrayInitialize, 5, 1) \ 624 F(ArrayBufferIsShared, 1, 1) \
625 F(TypedArrayInitialize, 6, 1) \
625 F(TypedArrayInitializeFromArrayLike, 4, 1) \ 626 F(TypedArrayInitializeFromArrayLike, 4, 1) \
626 F(ArrayBufferViewGetByteLength, 1, 1) \ 627 F(ArrayBufferViewGetByteLength, 1, 1) \
627 F(ArrayBufferViewGetByteOffset, 1, 1) \ 628 F(ArrayBufferViewGetByteOffset, 1, 1) \
628 F(TypedArrayGetLength, 1, 1) \ 629 F(TypedArrayGetLength, 1, 1) \
629 F(DataViewGetBuffer, 1, 1) \ 630 F(DataViewGetBuffer, 1, 1) \
630 F(TypedArrayGetBuffer, 1, 1) \ 631 F(TypedArrayGetBuffer, 1, 1) \
631 F(TypedArraySetFastCases, 3, 1) \ 632 F(TypedArraySetFastCases, 3, 1) \
632 F(TypedArrayMaxSizeInHeap, 0, 1) \ 633 F(TypedArrayMaxSizeInHeap, 0, 1) \
633 F(IsTypedArray, 1, 1) \ 634 F(IsTypedArray, 1, 1) \
634 F(DataViewInitialize, 4, 1) \ 635 F(DataViewInitialize, 4, 1) \
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 792
792 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype( 793 MUST_USE_RESULT static MaybeHandle<Object> GetPrototype(
793 Isolate* isolate, Handle<Object> object); 794 Isolate* isolate, Handle<Object> object);
794 795
795 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate, 796 MUST_USE_RESULT static MaybeHandle<Name> ToName(Isolate* isolate,
796 Handle<Object> key); 797 Handle<Object> key);
797 798
798 static void SetupArrayBuffer(Isolate* isolate, 799 static void SetupArrayBuffer(Isolate* isolate,
799 Handle<JSArrayBuffer> array_buffer, 800 Handle<JSArrayBuffer> array_buffer,
800 bool is_external, void* data, 801 bool is_external, void* data,
801 size_t allocated_length); 802 size_t allocated_length, bool is_shared = false);
802 803
803 static bool SetupArrayBufferAllocatingData(Isolate* isolate, 804 static bool SetupArrayBufferAllocatingData(Isolate* isolate,
804 Handle<JSArrayBuffer> array_buffer, 805 Handle<JSArrayBuffer> array_buffer,
805 size_t allocated_length, 806 size_t allocated_length,
806 bool initialize = true); 807 bool initialize = true,
808 bool is_shared = false);
807 809
808 static void NeuterArrayBuffer(Handle<JSArrayBuffer> array_buffer); 810 static void NeuterArrayBuffer(Handle<JSArrayBuffer> array_buffer);
809 811
810 static void FreeArrayBuffer(Isolate* isolate, 812 static void FreeArrayBuffer(Isolate* isolate,
811 JSArrayBuffer* phantom_array_buffer); 813 JSArrayBuffer* phantom_array_buffer);
812 814
813 static int FindIndexedNonNativeFrame(JavaScriptFrameIterator* it, int index); 815 static int FindIndexedNonNativeFrame(JavaScriptFrameIterator* it, int index);
814 816
815 enum TypedArrayId { 817 enum TypedArrayId {
816 // arrayIds below should be synchromized with typedarray.js natives. 818 // arrayIds below should be synchromized with typedarray.js natives.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 858
857 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {}; 859 class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {};
858 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {}; 860 class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {};
859 STATIC_ASSERT(LANGUAGE_END == 3); 861 STATIC_ASSERT(LANGUAGE_END == 3);
860 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {}; 862 class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 2> {};
861 863
862 } // namespace internal 864 } // namespace internal
863 } // namespace v8 865 } // namespace v8
864 866
865 #endif // V8_RUNTIME_RUNTIME_H_ 867 #endif // V8_RUNTIME_RUNTIME_H_
OLDNEW
« src/objects.h ('K') | « src/objects-printer.cc ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698