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

Side by Side Diff: src/objects.h

Issue 1912103002: [wasm] Store function names in the wasm object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-2
Patch Set: fix gcmole and signed/unsigned comparison issue Created 4 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 V(JS_DATA_VIEW_TYPE) \ 428 V(JS_DATA_VIEW_TYPE) \
429 V(JS_PROXY_TYPE) \ 429 V(JS_PROXY_TYPE) \
430 V(JS_SET_TYPE) \ 430 V(JS_SET_TYPE) \
431 V(JS_MAP_TYPE) \ 431 V(JS_MAP_TYPE) \
432 V(JS_SET_ITERATOR_TYPE) \ 432 V(JS_SET_ITERATOR_TYPE) \
433 V(JS_MAP_ITERATOR_TYPE) \ 433 V(JS_MAP_ITERATOR_TYPE) \
434 V(JS_WEAK_MAP_TYPE) \ 434 V(JS_WEAK_MAP_TYPE) \
435 V(JS_WEAK_SET_TYPE) \ 435 V(JS_WEAK_SET_TYPE) \
436 V(JS_PROMISE_TYPE) \ 436 V(JS_PROMISE_TYPE) \
437 V(JS_REGEXP_TYPE) \ 437 V(JS_REGEXP_TYPE) \
438 V(JS_WASM_TYPE) \
Michael Starzinger 2016/04/22 11:59:35 As discussed offline: Let's try to get by without
Clemens Hammacher 2016/04/22 14:38:40 Definitely! :)
438 \ 439 \
439 V(JS_BOUND_FUNCTION_TYPE) \ 440 V(JS_BOUND_FUNCTION_TYPE) \
440 V(JS_FUNCTION_TYPE) \ 441 V(JS_FUNCTION_TYPE) \
441 V(DEBUG_INFO_TYPE) \ 442 V(DEBUG_INFO_TYPE) \
442 V(BREAK_POINT_INFO_TYPE) 443 V(BREAK_POINT_INFO_TYPE)
443 444
444 // Since string types are not consecutive, this macro is used to 445 // Since string types are not consecutive, this macro is used to
445 // iterate over them. 446 // iterate over them.
446 #define STRING_TYPE_LIST(V) \ 447 #define STRING_TYPE_LIST(V) \
447 V(STRING_TYPE, kVariableSizeSentinel, string, String) \ 448 V(STRING_TYPE, kVariableSizeSentinel, string, String) \
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 JS_DATA_VIEW_TYPE, 722 JS_DATA_VIEW_TYPE,
722 JS_SET_TYPE, 723 JS_SET_TYPE,
723 JS_MAP_TYPE, 724 JS_MAP_TYPE,
724 JS_SET_ITERATOR_TYPE, 725 JS_SET_ITERATOR_TYPE,
725 JS_MAP_ITERATOR_TYPE, 726 JS_MAP_ITERATOR_TYPE,
726 JS_WEAK_MAP_TYPE, 727 JS_WEAK_MAP_TYPE,
727 JS_WEAK_SET_TYPE, 728 JS_WEAK_SET_TYPE,
728 JS_PROMISE_TYPE, 729 JS_PROMISE_TYPE,
729 JS_REGEXP_TYPE, 730 JS_REGEXP_TYPE,
730 JS_BOUND_FUNCTION_TYPE, 731 JS_BOUND_FUNCTION_TYPE,
732 JS_WASM_TYPE,
731 JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE 733 JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE
732 734
733 // Pseudo-types 735 // Pseudo-types
734 FIRST_TYPE = 0x0, 736 FIRST_TYPE = 0x0,
735 LAST_TYPE = JS_FUNCTION_TYPE, 737 LAST_TYPE = JS_FUNCTION_TYPE,
736 FIRST_NAME_TYPE = FIRST_TYPE, 738 FIRST_NAME_TYPE = FIRST_TYPE,
737 LAST_NAME_TYPE = SYMBOL_TYPE, 739 LAST_NAME_TYPE = SYMBOL_TYPE,
738 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE, 740 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE,
739 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE, 741 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE,
740 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, 742 FIRST_NONSTRING_TYPE = SYMBOL_TYPE,
(...skipping 3670 matching lines...) Expand 10 before | Expand all | Expand 10 after
4411 4413
4412 4414
4413 // ByteArray represents fixed sized byte arrays. Used for the relocation info 4415 // ByteArray represents fixed sized byte arrays. Used for the relocation info
4414 // that is attached to code objects. 4416 // that is attached to code objects.
4415 class ByteArray: public FixedArrayBase { 4417 class ByteArray: public FixedArrayBase {
4416 public: 4418 public:
4417 inline int Size(); 4419 inline int Size();
4418 4420
4419 // Setter and getter. 4421 // Setter and getter.
4420 inline byte get(int index); 4422 inline byte get(int index);
4423 inline void get(int index, byte* buffer, int length);
4421 inline void set(int index, byte value); 4424 inline void set(int index, byte value);
4425 inline void set(int index, const byte* buffer, int length);
4422 4426
4423 // Treat contents as an int array. 4427 // Treat contents as an int array.
4424 inline int get_int(int index); 4428 inline int get_int(int index);
4429 inline void set_int(int index, int value);
4425 4430
4426 static int SizeFor(int length) { 4431 static int SizeFor(int length) {
4427 return OBJECT_POINTER_ALIGN(kHeaderSize + length); 4432 return OBJECT_POINTER_ALIGN(kHeaderSize + length);
4428 } 4433 }
4429 // We use byte arrays for free blocks in the heap. Given a desired size in 4434 // We use byte arrays for free blocks in the heap. Given a desired size in
4430 // bytes that is a multiple of the word size and big enough to hold a byte 4435 // bytes that is a multiple of the word size and big enough to hold a byte
4431 // array, this function returns the number of elements a byte array should 4436 // array, this function returns the number of elements a byte array should
4432 // have. 4437 // have.
4433 static int LengthFor(int size_in_bytes) { 4438 static int LengthFor(int size_in_bytes) {
4434 DCHECK(IsAligned(size_in_bytes, kPointerSize)); 4439 DCHECK(IsAligned(size_in_bytes, kPointerSize));
(...skipping 6362 matching lines...) Expand 10 before | Expand all | Expand 10 after
10797 } 10802 }
10798 return value; 10803 return value;
10799 } 10804 }
10800 }; 10805 };
10801 10806
10802 10807
10803 } // NOLINT, false-positive due to second-order macros. 10808 } // NOLINT, false-positive due to second-order macros.
10804 } // NOLINT, false-positive due to second-order macros. 10809 } // NOLINT, false-positive due to second-order macros.
10805 10810
10806 #endif // V8_OBJECTS_H_ 10811 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698