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 59023003: Generate TypedArrayInitialize builtin in hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR feedback Created 7 years 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 static bool SetupArrayBufferAllocatingData( 823 static bool SetupArrayBufferAllocatingData(
824 Isolate* isolate, 824 Isolate* isolate,
825 Handle<JSArrayBuffer> array_buffer, 825 Handle<JSArrayBuffer> array_buffer,
826 size_t allocated_length, 826 size_t allocated_length,
827 bool initialize = true); 827 bool initialize = true);
828 828
829 static void FreeArrayBuffer( 829 static void FreeArrayBuffer(
830 Isolate* isolate, 830 Isolate* isolate,
831 JSArrayBuffer* phantom_array_buffer); 831 JSArrayBuffer* phantom_array_buffer);
832 832
833 enum TypedArrayId {
834 // arrayIds below should be synchromized with typedarray.js natives.
835 ARRAY_ID_UINT8 = 1,
836 ARRAY_ID_INT8 = 2,
837 ARRAY_ID_UINT16 = 3,
838 ARRAY_ID_INT16 = 4,
839 ARRAY_ID_UINT32 = 5,
840 ARRAY_ID_INT32 = 6,
841 ARRAY_ID_FLOAT32 = 7,
842 ARRAY_ID_FLOAT64 = 8,
843 ARRAY_ID_UINT8C = 9
844 };
845
846 static void ArrayIdToTypeAndSize(int array_id,
847 ExternalArrayType *type, size_t *element_size);
848
833 // Helper functions used stubs. 849 // Helper functions used stubs.
834 static void PerformGC(Object* result, Isolate* isolate); 850 static void PerformGC(Object* result, Isolate* isolate);
835 851
836 // Used in runtime.cc and hydrogen's VisitArrayLiteral. 852 // Used in runtime.cc and hydrogen's VisitArrayLiteral.
837 static Handle<Object> CreateArrayLiteralBoilerplate( 853 static Handle<Object> CreateArrayLiteralBoilerplate(
838 Isolate* isolate, 854 Isolate* isolate,
839 Handle<FixedArray> literals, 855 Handle<FixedArray> literals,
840 Handle<FixedArray> elements); 856 Handle<FixedArray> elements);
841 }; 857 };
842 858
843 859
844 //--------------------------------------------------------------------------- 860 //---------------------------------------------------------------------------
845 // Constants used by interface to runtime functions. 861 // Constants used by interface to runtime functions.
846 862
847 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 863 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
848 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 864 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
849 865
850 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 866 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
851 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 867 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
852 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {}; 868 class DeclareGlobalsLanguageMode: public BitField<LanguageMode, 2, 2> {};
853 869
854 } } // namespace v8::internal 870 } } // namespace v8::internal
855 871
856 #endif // V8_RUNTIME_H_ 872 #endif // V8_RUNTIME_H_
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/property-details.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698