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

Side by Side Diff: src/runtime.h

Issue 150813004: In-heap small typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for review Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 F(ArrayBufferSliceImpl, 3, 1) \ 375 F(ArrayBufferSliceImpl, 3, 1) \
376 F(ArrayBufferIsView, 1, 1) \ 376 F(ArrayBufferIsView, 1, 1) \
377 \ 377 \
378 F(TypedArrayInitialize, 5, 1) \ 378 F(TypedArrayInitialize, 5, 1) \
379 F(TypedArrayInitializeFromArrayLike, 4, 1) \ 379 F(TypedArrayInitializeFromArrayLike, 4, 1) \
380 F(TypedArrayGetBuffer, 1, 1) \ 380 F(TypedArrayGetBuffer, 1, 1) \
381 F(TypedArrayGetByteLength, 1, 1) \ 381 F(TypedArrayGetByteLength, 1, 1) \
382 F(TypedArrayGetByteOffset, 1, 1) \ 382 F(TypedArrayGetByteOffset, 1, 1) \
383 F(TypedArrayGetLength, 1, 1) \ 383 F(TypedArrayGetLength, 1, 1) \
384 F(TypedArraySetFastCases, 3, 1) \ 384 F(TypedArraySetFastCases, 3, 1) \
385 F(TypedArrayInHeapThreshold, 0, 1) \
385 \ 386 \
386 F(DataViewInitialize, 4, 1) \ 387 F(DataViewInitialize, 4, 1) \
387 F(DataViewGetBuffer, 1, 1) \ 388 F(DataViewGetBuffer, 1, 1) \
388 F(DataViewGetByteLength, 1, 1) \ 389 F(DataViewGetByteLength, 1, 1) \
389 F(DataViewGetByteOffset, 1, 1) \ 390 F(DataViewGetByteOffset, 1, 1) \
390 F(DataViewGetInt8, 3, 1) \ 391 F(DataViewGetInt8, 3, 1) \
391 F(DataViewGetUint8, 3, 1) \ 392 F(DataViewGetUint8, 3, 1) \
392 F(DataViewGetInt16, 3, 1) \ 393 F(DataViewGetInt16, 3, 1) \
393 F(DataViewGetUint16, 3, 1) \ 394 F(DataViewGetUint16, 3, 1) \
394 F(DataViewGetInt32, 3, 1) \ 395 F(DataViewGetInt32, 3, 1) \
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 F(HasExternalUint8ClampedElements, 1, 1) \ 474 F(HasExternalUint8ClampedElements, 1, 1) \
474 F(HasExternalArrayElements, 1, 1) \ 475 F(HasExternalArrayElements, 1, 1) \
475 F(HasExternalInt8Elements, 1, 1) \ 476 F(HasExternalInt8Elements, 1, 1) \
476 F(HasExternalUint8Elements, 1, 1) \ 477 F(HasExternalUint8Elements, 1, 1) \
477 F(HasExternalInt16Elements, 1, 1) \ 478 F(HasExternalInt16Elements, 1, 1) \
478 F(HasExternalUint16Elements, 1, 1) \ 479 F(HasExternalUint16Elements, 1, 1) \
479 F(HasExternalInt32Elements, 1, 1) \ 480 F(HasExternalInt32Elements, 1, 1) \
480 F(HasExternalUint32Elements, 1, 1) \ 481 F(HasExternalUint32Elements, 1, 1) \
481 F(HasExternalFloat32Elements, 1, 1) \ 482 F(HasExternalFloat32Elements, 1, 1) \
482 F(HasExternalFloat64Elements, 1, 1) \ 483 F(HasExternalFloat64Elements, 1, 1) \
484 F(HasFixedUint8ClampedElements, 1, 1) \
485 F(HasFixedInt8Elements, 1, 1) \
486 F(HasFixedUint8Elements, 1, 1) \
487 F(HasFixedInt16Elements, 1, 1) \
488 F(HasFixedUint16Elements, 1, 1) \
489 F(HasFixedInt32Elements, 1, 1) \
490 F(HasFixedUint32Elements, 1, 1) \
491 F(HasFixedFloat32Elements, 1, 1) \
492 F(HasFixedFloat64Elements, 1, 1) \
483 F(HasFastProperties, 1, 1) \ 493 F(HasFastProperties, 1, 1) \
484 F(TransitionElementsKind, 2, 1) \ 494 F(TransitionElementsKind, 2, 1) \
485 F(HaveSameMap, 2, 1) \ 495 F(HaveSameMap, 2, 1) \
486 F(IsAccessCheckNeeded, 1, 1) 496 F(IsAccessCheckNeeded, 1, 1)
487 497
488 498
489 #ifdef ENABLE_DEBUGGER_SUPPORT 499 #ifdef ENABLE_DEBUGGER_SUPPORT
490 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ 500 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
491 /* Debugger support*/ \ 501 /* Debugger support*/ \
492 F(DebugBreak, 0, 1) \ 502 F(DebugBreak, 0, 1) \
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 ARRAY_ID_UINT16 = 3, 857 ARRAY_ID_UINT16 = 3,
848 ARRAY_ID_INT16 = 4, 858 ARRAY_ID_INT16 = 4,
849 ARRAY_ID_UINT32 = 5, 859 ARRAY_ID_UINT32 = 5,
850 ARRAY_ID_INT32 = 6, 860 ARRAY_ID_INT32 = 6,
851 ARRAY_ID_FLOAT32 = 7, 861 ARRAY_ID_FLOAT32 = 7,
852 ARRAY_ID_FLOAT64 = 8, 862 ARRAY_ID_FLOAT64 = 8,
853 ARRAY_ID_UINT8_CLAMPED = 9 863 ARRAY_ID_UINT8_CLAMPED = 9
854 }; 864 };
855 865
856 static void ArrayIdToTypeAndSize(int array_id, 866 static void ArrayIdToTypeAndSize(int array_id,
857 ExternalArrayType *type, size_t *element_size); 867 ExternalArrayType *type,
868 ElementsKind* external_elements_kind,
869 ElementsKind* fixed_elements_kind,
870 size_t *element_size);
858 871
859 // Helper functions used stubs. 872 // Helper functions used stubs.
860 static void PerformGC(Object* result, Isolate* isolate); 873 static void PerformGC(Object* result, Isolate* isolate);
861 874
862 // Used in runtime.cc and hydrogen's VisitArrayLiteral. 875 // Used in runtime.cc and hydrogen's VisitArrayLiteral.
863 static Handle<Object> CreateArrayLiteralBoilerplate( 876 static Handle<Object> CreateArrayLiteralBoilerplate(
864 Isolate* isolate, 877 Isolate* isolate,
865 Handle<FixedArray> literals, 878 Handle<FixedArray> literals,
866 Handle<FixedArray> elements); 879 Handle<FixedArray> elements);
867 }; 880 };
868 881
869 882
870 //--------------------------------------------------------------------------- 883 //---------------------------------------------------------------------------
871 // Constants used by interface to runtime functions. 884 // Constants used by interface to runtime functions.
872 885
873 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 886 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
874 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 887 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
875 888
876 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 889 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
877 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 890 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
878 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; 891 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {};
879 892
880 } } // namespace v8::internal 893 } } // namespace v8::internal
881 894
882 #endif // V8_RUNTIME_H_ 895 #endif // V8_RUNTIME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698