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

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: CR feedback 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 F(ArrayBufferIsView, 1, 1) \ 368 F(ArrayBufferIsView, 1, 1) \
369 F(ArrayBufferNeuter, 1, 1) \ 369 F(ArrayBufferNeuter, 1, 1) \
370 \ 370 \
371 F(TypedArrayInitialize, 5, 1) \ 371 F(TypedArrayInitialize, 5, 1) \
372 F(TypedArrayInitializeFromArrayLike, 4, 1) \ 372 F(TypedArrayInitializeFromArrayLike, 4, 1) \
373 F(TypedArrayGetBuffer, 1, 1) \ 373 F(TypedArrayGetBuffer, 1, 1) \
374 F(TypedArrayGetByteLength, 1, 1) \ 374 F(TypedArrayGetByteLength, 1, 1) \
375 F(TypedArrayGetByteOffset, 1, 1) \ 375 F(TypedArrayGetByteOffset, 1, 1) \
376 F(TypedArrayGetLength, 1, 1) \ 376 F(TypedArrayGetLength, 1, 1) \
377 F(TypedArraySetFastCases, 3, 1) \ 377 F(TypedArraySetFastCases, 3, 1) \
378 F(TypedArrayMaxSizeInHeap, 0, 1) \
378 \ 379 \
379 F(DataViewInitialize, 4, 1) \ 380 F(DataViewInitialize, 4, 1) \
380 F(DataViewGetBuffer, 1, 1) \ 381 F(DataViewGetBuffer, 1, 1) \
381 F(DataViewGetByteLength, 1, 1) \ 382 F(DataViewGetByteLength, 1, 1) \
382 F(DataViewGetByteOffset, 1, 1) \ 383 F(DataViewGetByteOffset, 1, 1) \
383 F(DataViewGetInt8, 3, 1) \ 384 F(DataViewGetInt8, 3, 1) \
384 F(DataViewGetUint8, 3, 1) \ 385 F(DataViewGetUint8, 3, 1) \
385 F(DataViewGetInt16, 3, 1) \ 386 F(DataViewGetInt16, 3, 1) \
386 F(DataViewGetUint16, 3, 1) \ 387 F(DataViewGetUint16, 3, 1) \
387 F(DataViewGetInt32, 3, 1) \ 388 F(DataViewGetInt32, 3, 1) \
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 F(HasExternalUint8ClampedElements, 1, 1) \ 464 F(HasExternalUint8ClampedElements, 1, 1) \
464 F(HasExternalArrayElements, 1, 1) \ 465 F(HasExternalArrayElements, 1, 1) \
465 F(HasExternalInt8Elements, 1, 1) \ 466 F(HasExternalInt8Elements, 1, 1) \
466 F(HasExternalUint8Elements, 1, 1) \ 467 F(HasExternalUint8Elements, 1, 1) \
467 F(HasExternalInt16Elements, 1, 1) \ 468 F(HasExternalInt16Elements, 1, 1) \
468 F(HasExternalUint16Elements, 1, 1) \ 469 F(HasExternalUint16Elements, 1, 1) \
469 F(HasExternalInt32Elements, 1, 1) \ 470 F(HasExternalInt32Elements, 1, 1) \
470 F(HasExternalUint32Elements, 1, 1) \ 471 F(HasExternalUint32Elements, 1, 1) \
471 F(HasExternalFloat32Elements, 1, 1) \ 472 F(HasExternalFloat32Elements, 1, 1) \
472 F(HasExternalFloat64Elements, 1, 1) \ 473 F(HasExternalFloat64Elements, 1, 1) \
474 F(HasFixedUint8ClampedElements, 1, 1) \
475 F(HasFixedInt8Elements, 1, 1) \
476 F(HasFixedUint8Elements, 1, 1) \
477 F(HasFixedInt16Elements, 1, 1) \
478 F(HasFixedUint16Elements, 1, 1) \
479 F(HasFixedInt32Elements, 1, 1) \
480 F(HasFixedUint32Elements, 1, 1) \
481 F(HasFixedFloat32Elements, 1, 1) \
482 F(HasFixedFloat64Elements, 1, 1) \
473 F(HasFastProperties, 1, 1) \ 483 F(HasFastProperties, 1, 1) \
474 F(TransitionElementsKind, 2, 1) \ 484 F(TransitionElementsKind, 2, 1) \
475 F(HaveSameMap, 2, 1) \ 485 F(HaveSameMap, 2, 1) \
476 F(IsAccessCheckNeeded, 1, 1) 486 F(IsAccessCheckNeeded, 1, 1)
477 487
478 488
479 #ifdef ENABLE_DEBUGGER_SUPPORT 489 #ifdef ENABLE_DEBUGGER_SUPPORT
480 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ 490 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
481 /* Debugger support*/ \ 491 /* Debugger support*/ \
482 F(DebugBreak, 0, 1) \ 492 F(DebugBreak, 0, 1) \
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 ARRAY_ID_UINT16 = 3, 854 ARRAY_ID_UINT16 = 3,
845 ARRAY_ID_INT16 = 4, 855 ARRAY_ID_INT16 = 4,
846 ARRAY_ID_UINT32 = 5, 856 ARRAY_ID_UINT32 = 5,
847 ARRAY_ID_INT32 = 6, 857 ARRAY_ID_INT32 = 6,
848 ARRAY_ID_FLOAT32 = 7, 858 ARRAY_ID_FLOAT32 = 7,
849 ARRAY_ID_FLOAT64 = 8, 859 ARRAY_ID_FLOAT64 = 8,
850 ARRAY_ID_UINT8_CLAMPED = 9 860 ARRAY_ID_UINT8_CLAMPED = 9
851 }; 861 };
852 862
853 static void ArrayIdToTypeAndSize(int array_id, 863 static void ArrayIdToTypeAndSize(int array_id,
854 ExternalArrayType *type, size_t *element_size); 864 ExternalArrayType *type,
865 ElementsKind* external_elements_kind,
866 ElementsKind* fixed_elements_kind,
867 size_t *element_size);
855 868
856 // Helper functions used stubs. 869 // Helper functions used stubs.
857 static void PerformGC(Object* result, Isolate* isolate); 870 static void PerformGC(Object* result, Isolate* isolate);
858 871
859 // Used in runtime.cc and hydrogen's VisitArrayLiteral. 872 // Used in runtime.cc and hydrogen's VisitArrayLiteral.
860 static Handle<Object> CreateArrayLiteralBoilerplate( 873 static Handle<Object> CreateArrayLiteralBoilerplate(
861 Isolate* isolate, 874 Isolate* isolate,
862 Handle<FixedArray> literals, 875 Handle<FixedArray> literals,
863 Handle<FixedArray> elements); 876 Handle<FixedArray> elements);
864 }; 877 };
865 878
866 879
867 //--------------------------------------------------------------------------- 880 //---------------------------------------------------------------------------
868 // Constants used by interface to runtime functions. 881 // Constants used by interface to runtime functions.
869 882
870 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 883 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
871 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 884 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
872 885
873 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 886 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
874 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 887 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
875 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; 888 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {};
876 889
877 } } // namespace v8::internal 890 } } // namespace v8::internal
878 891
879 #endif // V8_RUNTIME_H_ 892 #endif // V8_RUNTIME_H_
OLDNEW
« src/hydrogen.cc ('K') | « src/objects-inl.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698