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/objects.h

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: 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
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 30
31 #include "allocation.h" 31 #include "allocation.h"
32 #include "assert-scope.h" 32 #include "assert-scope.h"
33 #include "builtins.h" 33 #include "builtins.h"
34 #include "elements-kind.h" 34 #include "elements-kind.h"
35 #include "flags.h" 35 #include "flags.h"
36 #include "list.h" 36 #include "list.h"
37 #include "property-details.h" 37 #include "property-details.h"
38 #include "smart-pointers.h" 38 #include "smart-pointers.h"
39 #include "unicode-inl.h" 39 #include "unicode-inl.h"
40 #if V8_TARGET_ARCH_ARM 40 #if V8_TARGET_ARCH_A64
41 #include "a64/constants-a64.h"
42 #elif V8_TARGET_ARCH_ARM
41 #include "arm/constants-arm.h" 43 #include "arm/constants-arm.h"
42 #elif V8_TARGET_ARCH_MIPS 44 #elif V8_TARGET_ARCH_MIPS
43 #include "mips/constants-mips.h" 45 #include "mips/constants-mips.h"
44 #endif 46 #endif
45 #include "v8checks.h" 47 #include "v8checks.h"
46 #include "zone.h" 48 #include "zone.h"
47 49
48 50
49 // 51 //
50 // Most object types in the V8 JavaScript are described in this file. 52 // Most object types in the V8 JavaScript are described in this file.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // - StringTable 91 // - StringTable
90 // - CompilationCacheTable 92 // - CompilationCacheTable
91 // - CodeCacheHashTable 93 // - CodeCacheHashTable
92 // - MapCache 94 // - MapCache
93 // - Context 95 // - Context
94 // - JSFunctionResultCache 96 // - JSFunctionResultCache
95 // - ScopeInfo 97 // - ScopeInfo
96 // - TransitionArray 98 // - TransitionArray
97 // - FixedDoubleArray 99 // - FixedDoubleArray
98 // - ExternalArray 100 // - ExternalArray
99 // - ExternalPixelArray 101 // - ExternalUint8ClampedArray
100 // - ExternalByteArray 102 // - ExternalInt8Array
101 // - ExternalUnsignedByteArray 103 // - ExternalUint8Array
102 // - ExternalShortArray 104 // - ExternalInt16Array
103 // - ExternalUnsignedShortArray 105 // - ExternalUint16Array
104 // - ExternalIntArray 106 // - ExternalInt32Array
105 // - ExternalUnsignedIntArray 107 // - ExternalUint32Array
106 // - ExternalFloatArray 108 // - ExternalFloat32Array
107 // - Name 109 // - Name
108 // - String 110 // - String
109 // - SeqString 111 // - SeqString
110 // - SeqOneByteString 112 // - SeqOneByteString
111 // - SeqTwoByteString 113 // - SeqTwoByteString
112 // - SlicedString 114 // - SlicedString
113 // - ConsString 115 // - ConsString
114 // - ExternalString 116 // - ExternalString
115 // - ExternalAsciiString 117 // - ExternalAsciiString
116 // - ExternalTwoByteString 118 // - ExternalTwoByteString
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 V(CELL_TYPE) \ 372 V(CELL_TYPE) \
371 V(PROPERTY_CELL_TYPE) \ 373 V(PROPERTY_CELL_TYPE) \
372 \ 374 \
373 V(HEAP_NUMBER_TYPE) \ 375 V(HEAP_NUMBER_TYPE) \
374 V(FOREIGN_TYPE) \ 376 V(FOREIGN_TYPE) \
375 V(BYTE_ARRAY_TYPE) \ 377 V(BYTE_ARRAY_TYPE) \
376 V(FREE_SPACE_TYPE) \ 378 V(FREE_SPACE_TYPE) \
377 /* Note: the order of these external array */ \ 379 /* Note: the order of these external array */ \
378 /* types is relied upon in */ \ 380 /* types is relied upon in */ \
379 /* Object::IsExternalArray(). */ \ 381 /* Object::IsExternalArray(). */ \
380 V(EXTERNAL_BYTE_ARRAY_TYPE) \ 382 V(EXTERNAL_INT8_ARRAY_TYPE) \
381 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \ 383 V(EXTERNAL_UINT8_ARRAY_TYPE) \
382 V(EXTERNAL_SHORT_ARRAY_TYPE) \ 384 V(EXTERNAL_INT16_ARRAY_TYPE) \
383 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \ 385 V(EXTERNAL_UINT16_ARRAY_TYPE) \
384 V(EXTERNAL_INT_ARRAY_TYPE) \ 386 V(EXTERNAL_INT32_ARRAY_TYPE) \
385 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \ 387 V(EXTERNAL_UINT32_ARRAY_TYPE) \
386 V(EXTERNAL_FLOAT_ARRAY_TYPE) \ 388 V(EXTERNAL_FLOAT32_ARRAY_TYPE) \
387 V(EXTERNAL_DOUBLE_ARRAY_TYPE) \ 389 V(EXTERNAL_FLOAT64_ARRAY_TYPE) \
388 V(EXTERNAL_PIXEL_ARRAY_TYPE) \ 390 V(EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE) \
389 \ 391 \
390 V(FIXED_INT8_ARRAY_TYPE) \ 392 V(FIXED_INT8_ARRAY_TYPE) \
391 V(FIXED_UINT8_ARRAY_TYPE) \ 393 V(FIXED_UINT8_ARRAY_TYPE) \
392 V(FIXED_INT16_ARRAY_TYPE) \ 394 V(FIXED_INT16_ARRAY_TYPE) \
393 V(FIXED_UINT16_ARRAY_TYPE) \ 395 V(FIXED_UINT16_ARRAY_TYPE) \
394 V(FIXED_INT32_ARRAY_TYPE) \ 396 V(FIXED_INT32_ARRAY_TYPE) \
395 V(FIXED_UINT32_ARRAY_TYPE) \ 397 V(FIXED_UINT32_ARRAY_TYPE) \
396 V(FIXED_FLOAT32_ARRAY_TYPE) \ 398 V(FIXED_FLOAT32_ARRAY_TYPE) \
397 V(FIXED_FLOAT64_ARRAY_TYPE) \ 399 V(FIXED_FLOAT64_ARRAY_TYPE) \
398 V(FIXED_UINT8_CLAMPED_ARRAY_TYPE) \ 400 V(FIXED_UINT8_CLAMPED_ARRAY_TYPE) \
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 V(EXTERNAL_STRING_TYPE, \ 484 V(EXTERNAL_STRING_TYPE, \
483 ExternalTwoByteString::kSize, \ 485 ExternalTwoByteString::kSize, \
484 external_string, \ 486 external_string, \
485 ExternalString) \ 487 ExternalString) \
486 V(EXTERNAL_ASCII_STRING_TYPE, \ 488 V(EXTERNAL_ASCII_STRING_TYPE, \
487 ExternalAsciiString::kSize, \ 489 ExternalAsciiString::kSize, \
488 external_ascii_string, \ 490 external_ascii_string, \
489 ExternalAsciiString) \ 491 ExternalAsciiString) \
490 V(EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \ 492 V(EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \
491 ExternalTwoByteString::kSize, \ 493 ExternalTwoByteString::kSize, \
492 external_string_with_one_bytei_data, \ 494 external_string_with_one_byte_data, \
493 ExternalStringWithOneByteData) \ 495 ExternalStringWithOneByteData) \
494 V(SHORT_EXTERNAL_STRING_TYPE, \ 496 V(SHORT_EXTERNAL_STRING_TYPE, \
495 ExternalTwoByteString::kShortSize, \ 497 ExternalTwoByteString::kShortSize, \
496 short_external_string, \ 498 short_external_string, \
497 ShortExternalString) \ 499 ShortExternalString) \
498 V(SHORT_EXTERNAL_ASCII_STRING_TYPE, \ 500 V(SHORT_EXTERNAL_ASCII_STRING_TYPE, \
499 ExternalAsciiString::kShortSize, \ 501 ExternalAsciiString::kShortSize, \
500 short_external_ascii_string, \ 502 short_external_ascii_string, \
501 ShortExternalAsciiString) \ 503 ShortExternalAsciiString) \
502 V(SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \ 504 V(SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE, \
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 ODDBALL_TYPE, 717 ODDBALL_TYPE,
716 CELL_TYPE, 718 CELL_TYPE,
717 PROPERTY_CELL_TYPE, 719 PROPERTY_CELL_TYPE,
718 720
719 // "Data", objects that cannot contain non-map-word pointers to heap 721 // "Data", objects that cannot contain non-map-word pointers to heap
720 // objects. 722 // objects.
721 HEAP_NUMBER_TYPE, 723 HEAP_NUMBER_TYPE,
722 FOREIGN_TYPE, 724 FOREIGN_TYPE,
723 BYTE_ARRAY_TYPE, 725 BYTE_ARRAY_TYPE,
724 FREE_SPACE_TYPE, 726 FREE_SPACE_TYPE,
725 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE 727
726 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, 728 EXTERNAL_INT8_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE
727 EXTERNAL_SHORT_ARRAY_TYPE, 729 EXTERNAL_UINT8_ARRAY_TYPE,
728 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, 730 EXTERNAL_INT16_ARRAY_TYPE,
729 EXTERNAL_INT_ARRAY_TYPE, 731 EXTERNAL_UINT16_ARRAY_TYPE,
730 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, 732 EXTERNAL_INT32_ARRAY_TYPE,
731 EXTERNAL_FLOAT_ARRAY_TYPE, 733 EXTERNAL_UINT32_ARRAY_TYPE,
732 EXTERNAL_DOUBLE_ARRAY_TYPE, 734 EXTERNAL_FLOAT32_ARRAY_TYPE,
733 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE 735 EXTERNAL_FLOAT64_ARRAY_TYPE,
736 EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE
734 737
735 FIXED_INT8_ARRAY_TYPE, // FIRST_FIXED_TYPED_ARRAY_TYPE 738 FIXED_INT8_ARRAY_TYPE, // FIRST_FIXED_TYPED_ARRAY_TYPE
736 FIXED_UINT8_ARRAY_TYPE, 739 FIXED_UINT8_ARRAY_TYPE,
737 FIXED_INT16_ARRAY_TYPE, 740 FIXED_INT16_ARRAY_TYPE,
738 FIXED_UINT16_ARRAY_TYPE, 741 FIXED_UINT16_ARRAY_TYPE,
739 FIXED_INT32_ARRAY_TYPE, 742 FIXED_INT32_ARRAY_TYPE,
740 FIXED_UINT32_ARRAY_TYPE, 743 FIXED_UINT32_ARRAY_TYPE,
741 FIXED_FLOAT32_ARRAY_TYPE, 744 FIXED_FLOAT32_ARRAY_TYPE,
742 FIXED_FLOAT64_ARRAY_TYPE, 745 FIXED_FLOAT64_ARRAY_TYPE,
743 FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE 746 FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 813
811 // Pseudo-types 814 // Pseudo-types
812 FIRST_TYPE = 0x0, 815 FIRST_TYPE = 0x0,
813 LAST_TYPE = JS_FUNCTION_TYPE, 816 LAST_TYPE = JS_FUNCTION_TYPE,
814 FIRST_NAME_TYPE = FIRST_TYPE, 817 FIRST_NAME_TYPE = FIRST_TYPE,
815 LAST_NAME_TYPE = SYMBOL_TYPE, 818 LAST_NAME_TYPE = SYMBOL_TYPE,
816 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE, 819 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE,
817 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE, 820 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE,
818 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, 821 FIRST_NONSTRING_TYPE = SYMBOL_TYPE,
819 // Boundaries for testing for an external array. 822 // Boundaries for testing for an external array.
820 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, 823 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_INT8_ARRAY_TYPE,
821 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, 824 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_UINT8_CLAMPED_ARRAY_TYPE,
822 // Boundaries for testing for a fixed typed array. 825 // Boundaries for testing for a fixed typed array.
823 FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE, 826 FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE,
824 LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE, 827 LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE,
825 // Boundary for promotion to old data space/old pointer space. 828 // Boundary for promotion to old data space/old pointer space.
826 LAST_DATA_TYPE = FILLER_TYPE, 829 LAST_DATA_TYPE = FILLER_TYPE,
827 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy). 830 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy).
828 // Note that there is no range for JSObject or JSProxy, since their subtypes 831 // Note that there is no range for JSObject or JSProxy, since their subtypes
829 // are not continuous in this enum! The enum ranges instead reflect the 832 // are not continuous in this enum! The enum ranges instead reflect the
830 // external class names, where proxies are treated as either ordinary objects, 833 // external class names, where proxies are treated as either ordinary objects,
831 // or functions. 834 // or functions.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 class AllocationSite; 902 class AllocationSite;
900 class AllocationSiteCreationContext; 903 class AllocationSiteCreationContext;
901 class AllocationSiteUsageContext; 904 class AllocationSiteUsageContext;
902 class DictionaryElementsAccessor; 905 class DictionaryElementsAccessor;
903 class ElementsAccessor; 906 class ElementsAccessor;
904 class Failure; 907 class Failure;
905 class FixedArrayBase; 908 class FixedArrayBase;
906 class GlobalObject; 909 class GlobalObject;
907 class ObjectVisitor; 910 class ObjectVisitor;
908 class StringStream; 911 class StringStream;
909 // We cannot just say "class Type;" if it is created from a template... =8-? 912 // We cannot just say "class HeapType;" if it is created from a template... =8-?
910 template<class> class TypeImpl; 913 template<class> class TypeImpl;
911 struct HeapTypeConfig; 914 struct HeapTypeConfig;
912 typedef TypeImpl<HeapTypeConfig> Type; 915 typedef TypeImpl<HeapTypeConfig> HeapType;
913 916
914 917
915 // A template-ized version of the IsXXX functions. 918 // A template-ized version of the IsXXX functions.
916 template <class C> inline bool Is(Object* obj); 919 template <class C> inline bool Is(Object* obj);
917 920
918 #ifdef VERIFY_HEAP 921 #ifdef VERIFY_HEAP
919 #define DECLARE_VERIFIER(Name) void Name##Verify(); 922 #define DECLARE_VERIFIER(Name) void Name##Verify();
920 #else 923 #else
921 #define DECLARE_VERIFIER(Name) 924 #define DECLARE_VERIFIER(Name)
922 #endif 925 #endif
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 V(ConsString) \ 1001 V(ConsString) \
999 V(SlicedString) \ 1002 V(SlicedString) \
1000 V(ExternalTwoByteString) \ 1003 V(ExternalTwoByteString) \
1001 V(ExternalAsciiString) \ 1004 V(ExternalAsciiString) \
1002 V(SeqTwoByteString) \ 1005 V(SeqTwoByteString) \
1003 V(SeqOneByteString) \ 1006 V(SeqOneByteString) \
1004 V(InternalizedString) \ 1007 V(InternalizedString) \
1005 V(Symbol) \ 1008 V(Symbol) \
1006 \ 1009 \
1007 V(ExternalArray) \ 1010 V(ExternalArray) \
1008 V(ExternalByteArray) \ 1011 V(ExternalInt8Array) \
1009 V(ExternalUnsignedByteArray) \ 1012 V(ExternalUint8Array) \
1010 V(ExternalShortArray) \ 1013 V(ExternalInt16Array) \
1011 V(ExternalUnsignedShortArray) \ 1014 V(ExternalUint16Array) \
1012 V(ExternalIntArray) \ 1015 V(ExternalInt32Array) \
1013 V(ExternalUnsignedIntArray) \ 1016 V(ExternalUint32Array) \
1014 V(ExternalFloatArray) \ 1017 V(ExternalFloat32Array) \
1015 V(ExternalDoubleArray) \ 1018 V(ExternalFloat64Array) \
1016 V(ExternalPixelArray) \ 1019 V(ExternalUint8ClampedArray) \
1017 V(FixedTypedArrayBase) \ 1020 V(FixedTypedArrayBase) \
1018 V(FixedUint8Array) \ 1021 V(FixedUint8Array) \
1019 V(FixedInt8Array) \ 1022 V(FixedInt8Array) \
1020 V(FixedUint16Array) \ 1023 V(FixedUint16Array) \
1021 V(FixedInt16Array) \ 1024 V(FixedInt16Array) \
1022 V(FixedUint32Array) \ 1025 V(FixedUint32Array) \
1023 V(FixedInt32Array) \ 1026 V(FixedInt32Array) \
1024 V(FixedFloat32Array) \ 1027 V(FixedFloat32Array) \
1025 V(FixedFloat64Array) \ 1028 V(FixedFloat64Array) \
1026 V(FixedUint8ClampedArray) \ 1029 V(FixedUint8ClampedArray) \
1027 V(ByteArray) \ 1030 V(ByteArray) \
1028 V(FreeSpace) \ 1031 V(FreeSpace) \
1029 V(JSReceiver) \ 1032 V(JSReceiver) \
1030 V(JSObject) \ 1033 V(JSObject) \
1031 V(JSContextExtensionObject) \ 1034 V(JSContextExtensionObject) \
1032 V(JSGeneratorObject) \ 1035 V(JSGeneratorObject) \
1033 V(JSModule) \ 1036 V(JSModule) \
1034 V(Map) \ 1037 V(Map) \
1035 V(DescriptorArray) \ 1038 V(DescriptorArray) \
1036 V(TransitionArray) \ 1039 V(TransitionArray) \
1037 V(DeoptimizationInputData) \ 1040 V(DeoptimizationInputData) \
1038 V(DeoptimizationOutputData) \ 1041 V(DeoptimizationOutputData) \
1039 V(DependentCode) \ 1042 V(DependentCode) \
1040 V(TypeFeedbackCells) \
1041 V(FixedArray) \ 1043 V(FixedArray) \
1042 V(FixedDoubleArray) \ 1044 V(FixedDoubleArray) \
1043 V(ConstantPoolArray) \ 1045 V(ConstantPoolArray) \
1044 V(Context) \ 1046 V(Context) \
1045 V(NativeContext) \ 1047 V(NativeContext) \
1046 V(ScopeInfo) \ 1048 V(ScopeInfo) \
1047 V(JSFunction) \ 1049 V(JSFunction) \
1048 V(Code) \ 1050 V(Code) \
1049 V(Oddball) \ 1051 V(Oddball) \
1050 V(SharedFunctionInfo) \ 1052 V(SharedFunctionInfo) \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 V(kBothRegistersWereSmisInSelectNonSmi, \ 1123 V(kBothRegistersWereSmisInSelectNonSmi, \
1122 "Both registers were smis in SelectNonSmi") \ 1124 "Both registers were smis in SelectNonSmi") \
1123 V(kCallToAJavaScriptRuntimeFunction, \ 1125 V(kCallToAJavaScriptRuntimeFunction, \
1124 "Call to a JavaScript runtime function") \ 1126 "Call to a JavaScript runtime function") \
1125 V(kCannotTranslatePositionInChangedArea, \ 1127 V(kCannotTranslatePositionInChangedArea, \
1126 "Cannot translate position in changed area") \ 1128 "Cannot translate position in changed area") \
1127 V(kCodeGenerationFailed, "Code generation failed") \ 1129 V(kCodeGenerationFailed, "Code generation failed") \
1128 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \ 1130 V(kCodeObjectNotProperlyPatched, "Code object not properly patched") \
1129 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \ 1131 V(kCompoundAssignmentToLookupSlot, "Compound assignment to lookup slot") \
1130 V(kContextAllocatedArguments, "Context-allocated arguments") \ 1132 V(kContextAllocatedArguments, "Context-allocated arguments") \
1133 V(kCopyBuffersOverlap, "Copy buffers overlap") \
1134 V(kCouldNotGenerateZero, "Could not generate +0.0") \
1135 V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \
1131 V(kDebuggerIsActive, "Debugger is active") \ 1136 V(kDebuggerIsActive, "Debugger is active") \
1132 V(kDebuggerStatement, "DebuggerStatement") \ 1137 V(kDebuggerStatement, "DebuggerStatement") \
1133 V(kDeclarationInCatchContext, "Declaration in catch context") \ 1138 V(kDeclarationInCatchContext, "Declaration in catch context") \
1134 V(kDeclarationInWithContext, "Declaration in with context") \ 1139 V(kDeclarationInWithContext, "Declaration in with context") \
1135 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \ 1140 V(kDefaultNaNModeNotSet, "Default NaN mode not set") \
1136 V(kDeleteWithGlobalVariable, "Delete with global variable") \ 1141 V(kDeleteWithGlobalVariable, "Delete with global variable") \
1137 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \ 1142 V(kDeleteWithNonGlobalVariable, "Delete with non-global variable") \
1138 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \ 1143 V(kDestinationOfCopyNotAligned, "Destination of copy not aligned") \
1139 V(kDontDeleteCellsCannotContainTheHole, \ 1144 V(kDontDeleteCellsCannotContainTheHole, \
1140 "DontDelete cells can't contain the hole") \ 1145 "DontDelete cells can't contain the hole") \
1141 V(kDoPushArgumentNotImplementedForDoubleType, \ 1146 V(kDoPushArgumentNotImplementedForDoubleType, \
1142 "DoPushArgument not implemented for double type") \ 1147 "DoPushArgument not implemented for double type") \
1148 V(kEliminatedBoundsCheckFailed, "Eliminated bounds check failed") \
1143 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \ 1149 V(kEmitLoadRegisterUnsupportedDoubleImmediate, \
1144 "EmitLoadRegister: Unsupported double immediate") \ 1150 "EmitLoadRegister: Unsupported double immediate") \
1145 V(kEval, "eval") \ 1151 V(kEval, "eval") \
1146 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \ 1152 V(kExpected0AsASmiSentinel, "Expected 0 as a Smi sentinel") \
1147 V(kExpectedAlignmentMarker, "expected alignment marker") \ 1153 V(kExpectedAlignmentMarker, "Expected alignment marker") \
1148 V(kExpectedAllocationSite, "expected allocation site") \ 1154 V(kExpectedAllocationSite, "Expected allocation site") \
1155 V(kExpectedFunctionObject, "Expected function object in register") \
1156 V(kExpectedHeapNumber, "Expected HeapNumber") \
1157 V(kExpectedNativeContext, "Expected native context") \
1158 V(kExpectedNonIdenticalObjects, "Expected non-identical objects") \
1159 V(kExpectedNonNullContext, "Expected non-null context") \
1160 V(kExpectedPositiveZero, "Expected +0.0") \
1149 V(kExpectedAllocationSiteInCell, \ 1161 V(kExpectedAllocationSiteInCell, \
1150 "Expected AllocationSite in property cell") \ 1162 "Expected AllocationSite in property cell") \
1151 V(kExpectedPropertyCellInRegisterA2, \ 1163 V(kExpectedFixedArrayInFeedbackVector, \
1152 "Expected property cell in register a2") \ 1164 "Expected fixed array in feedback vector") \
1153 V(kExpectedPropertyCellInRegisterEbx, \ 1165 V(kExpectedFixedArrayInRegisterA2, \
1154 "Expected property cell in register ebx") \ 1166 "Expected fixed array in register a2") \
1155 V(kExpectedPropertyCellInRegisterRbx, \ 1167 V(kExpectedFixedArrayInRegisterEbx, \
1156 "Expected property cell in register rbx") \ 1168 "Expected fixed array in register ebx") \
1169 V(kExpectedFixedArrayInRegisterR2, \
1170 "Expected fixed array in register r2") \
1171 V(kExpectedFixedArrayInRegisterRbx, \
1172 "Expected fixed array in register rbx") \
1173 V(kExpectedSmiOrHeapNumber, "Expected smi or HeapNumber") \
1157 V(kExpectingAlignmentForCopyBytes, \ 1174 V(kExpectingAlignmentForCopyBytes, \
1158 "Expecting alignment for CopyBytes") \ 1175 "Expecting alignment for CopyBytes") \
1159 V(kExportDeclaration, "Export declaration") \ 1176 V(kExportDeclaration, "Export declaration") \
1160 V(kExternalStringExpectedButNotFound, \ 1177 V(kExternalStringExpectedButNotFound, \
1161 "External string expected, but not found") \ 1178 "External string expected, but not found") \
1162 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \ 1179 V(kFailedBailedOutLastTime, "Failed/bailed out last time") \
1163 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \ 1180 V(kForInStatementIsNotFastCase, "ForInStatement is not fast case") \
1164 V(kForInStatementOptimizationIsDisabled, \ 1181 V(kForInStatementOptimizationIsDisabled, \
1165 "ForInStatement optimization is disabled") \ 1182 "ForInStatement optimization is disabled") \
1166 V(kForInStatementWithNonLocalEachVariable, \ 1183 V(kForInStatementWithNonLocalEachVariable, \
(...skipping 19 matching lines...) Expand all
1186 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \ 1203 V(kInlinedRuntimeFunctionFastAsciiArrayJoin, \
1187 "Inlined runtime function: FastAsciiArrayJoin") \ 1204 "Inlined runtime function: FastAsciiArrayJoin") \
1188 V(kInlinedRuntimeFunctionGeneratorNext, \ 1205 V(kInlinedRuntimeFunctionGeneratorNext, \
1189 "Inlined runtime function: GeneratorNext") \ 1206 "Inlined runtime function: GeneratorNext") \
1190 V(kInlinedRuntimeFunctionGeneratorThrow, \ 1207 V(kInlinedRuntimeFunctionGeneratorThrow, \
1191 "Inlined runtime function: GeneratorThrow") \ 1208 "Inlined runtime function: GeneratorThrow") \
1192 V(kInlinedRuntimeFunctionGetFromCache, \ 1209 V(kInlinedRuntimeFunctionGetFromCache, \
1193 "Inlined runtime function: GetFromCache") \ 1210 "Inlined runtime function: GetFromCache") \
1194 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \ 1211 V(kInlinedRuntimeFunctionIsNonNegativeSmi, \
1195 "Inlined runtime function: IsNonNegativeSmi") \ 1212 "Inlined runtime function: IsNonNegativeSmi") \
1196 V(kInlinedRuntimeFunctionIsRegExpEquivalent, \
1197 "Inlined runtime function: IsRegExpEquivalent") \
1198 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \ 1213 V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \
1199 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \ 1214 "Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \
1200 V(kInliningBailedOut, "Inlining bailed out") \ 1215 V(kInliningBailedOut, "Inlining bailed out") \
1201 V(kInputGPRIsExpectedToHaveUpper32Cleared, \ 1216 V(kInputGPRIsExpectedToHaveUpper32Cleared, \
1202 "Input GPR is expected to have upper32 cleared") \ 1217 "Input GPR is expected to have upper32 cleared") \
1218 V(kInputStringTooLong, "Input string too long") \
1203 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \ 1219 V(kInstanceofStubUnexpectedCallSiteCacheCheck, \
1204 "InstanceofStub unexpected call site cache (check)") \ 1220 "InstanceofStub unexpected call site cache (check)") \
1205 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \ 1221 V(kInstanceofStubUnexpectedCallSiteCacheCmp1, \
1206 "InstanceofStub unexpected call site cache (cmp 1)") \ 1222 "InstanceofStub unexpected call site cache (cmp 1)") \
1207 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \ 1223 V(kInstanceofStubUnexpectedCallSiteCacheCmp2, \
1208 "InstanceofStub unexpected call site cache (cmp 2)") \ 1224 "InstanceofStub unexpected call site cache (cmp 2)") \
1209 V(kInstanceofStubUnexpectedCallSiteCacheMov, \ 1225 V(kInstanceofStubUnexpectedCallSiteCacheMov, \
1210 "InstanceofStub unexpected call site cache (mov)") \ 1226 "InstanceofStub unexpected call site cache (mov)") \
1211 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \ 1227 V(kInteger32ToSmiFieldWritingToNonSmiLocation, \
1212 "Integer32ToSmiField writing to non-smi location") \ 1228 "Integer32ToSmiField writing to non-smi location") \
1213 V(kInvalidCaptureReferenced, "Invalid capture referenced") \ 1229 V(kInvalidCaptureReferenced, "Invalid capture referenced") \
1214 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \ 1230 V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
1215 "Invalid ElementsKind for InternalArray or InternalPackedArray") \ 1231 "Invalid ElementsKind for InternalArray or InternalPackedArray") \
1232 V(kInvalidFullCodegenState, "invalid full-codegen state") \
1216 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \ 1233 V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
1217 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \ 1234 V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \
1218 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \ 1235 V(kInvalidLhsInCompoundAssignment, "Invalid lhs in compound assignment") \
1219 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \ 1236 V(kInvalidLhsInCountOperation, "Invalid lhs in count operation") \
1220 V(kInvalidMinLength, "Invalid min_length") \ 1237 V(kInvalidMinLength, "Invalid min_length") \
1221 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \ 1238 V(kJSGlobalObjectNativeContextShouldBeANativeContext, \
1222 "JSGlobalObject::native_context should be a native context") \ 1239 "JSGlobalObject::native_context should be a native context") \
1223 V(kJSGlobalProxyContextShouldNotBeNull, \ 1240 V(kJSGlobalProxyContextShouldNotBeNull, \
1224 "JSGlobalProxy::context() should not be null") \ 1241 "JSGlobalProxy::context() should not be null") \
1225 V(kJSObjectWithFastElementsMapHasSlowElements, \ 1242 V(kJSObjectWithFastElementsMapHasSlowElements, \
1226 "JSObject with fast elements map has slow elements") \ 1243 "JSObject with fast elements map has slow elements") \
1227 V(kLetBindingReInitialization, "Let binding re-initialization") \ 1244 V(kLetBindingReInitialization, "Let binding re-initialization") \
1245 V(kLhsHasBeenClobbered, "lhs has been clobbered") \
1228 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \ 1246 V(kLiveBytesCountOverflowChunkSize, "Live Bytes Count overflow chunk size") \
1247 V(kLiveEditFrameDroppingIsNotSupportedOnA64, \
1248 "LiveEdit frame dropping is not supported on a64") \
1229 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \ 1249 V(kLiveEditFrameDroppingIsNotSupportedOnArm, \
1230 "LiveEdit frame dropping is not supported on arm") \ 1250 "LiveEdit frame dropping is not supported on arm") \
1231 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \ 1251 V(kLiveEditFrameDroppingIsNotSupportedOnMips, \
1232 "LiveEdit frame dropping is not supported on mips") \ 1252 "LiveEdit frame dropping is not supported on mips") \
1233 V(kLiveEdit, "LiveEdit") \ 1253 V(kLiveEdit, "LiveEdit") \
1234 V(kLookupVariableInCountOperation, \ 1254 V(kLookupVariableInCountOperation, \
1235 "Lookup variable in count operation") \ 1255 "Lookup variable in count operation") \
1236 V(kMapIsNoLongerInEax, "Map is no longer in eax") \ 1256 V(kMapIsNoLongerInEax, "Map is no longer in eax") \
1237 V(kModuleDeclaration, "Module declaration") \ 1257 V(kModuleDeclaration, "Module declaration") \
1238 V(kModuleLiteral, "Module literal") \ 1258 V(kModuleLiteral, "Module literal") \
(...skipping 15 matching lines...) Expand all
1254 "Not enough virtual registers for values") \ 1274 "Not enough virtual registers for values") \
1255 V(kNotEnoughSpillSlotsForOsr, \ 1275 V(kNotEnoughSpillSlotsForOsr, \
1256 "Not enough spill slots for OSR") \ 1276 "Not enough spill slots for OSR") \
1257 V(kNotEnoughVirtualRegistersRegalloc, \ 1277 V(kNotEnoughVirtualRegistersRegalloc, \
1258 "Not enough virtual registers (regalloc)") \ 1278 "Not enough virtual registers (regalloc)") \
1259 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \ 1279 V(kObjectFoundInSmiOnlyArray, "Object found in smi-only array") \
1260 V(kObjectLiteralWithComplexProperty, \ 1280 V(kObjectLiteralWithComplexProperty, \
1261 "Object literal with complex property") \ 1281 "Object literal with complex property") \
1262 V(kOddballInStringTableIsNotUndefinedOrTheHole, \ 1282 V(kOddballInStringTableIsNotUndefinedOrTheHole, \
1263 "Oddball in string table is not undefined or the hole") \ 1283 "Oddball in string table is not undefined or the hole") \
1284 V(kOffsetOutOfRange, "Offset out of range") \
1264 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \ 1285 V(kOperandIsASmiAndNotAName, "Operand is a smi and not a name") \
1265 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \ 1286 V(kOperandIsASmiAndNotAString, "Operand is a smi and not a string") \
1266 V(kOperandIsASmi, "Operand is a smi") \ 1287 V(kOperandIsASmi, "Operand is a smi") \
1267 V(kOperandIsNotAName, "Operand is not a name") \ 1288 V(kOperandIsNotAName, "Operand is not a name") \
1268 V(kOperandIsNotANumber, "Operand is not a number") \ 1289 V(kOperandIsNotANumber, "Operand is not a number") \
1269 V(kOperandIsNotASmi, "Operand is not a smi") \ 1290 V(kOperandIsNotASmi, "Operand is not a smi") \
1270 V(kOperandIsNotAString, "Operand is not a string") \ 1291 V(kOperandIsNotAString, "Operand is not a string") \
1271 V(kOperandIsNotSmi, "Operand is not smi") \ 1292 V(kOperandIsNotSmi, "Operand is not smi") \
1272 V(kOperandNotANumber, "Operand not a number") \ 1293 V(kOperandNotANumber, "Operand not a number") \
1273 V(kOptimizationDisabled, "Optimization is disabled") \ 1294 V(kOptimizationDisabled, "Optimization is disabled") \
1274 V(kOptimizedTooManyTimes, "Optimized too many times") \ 1295 V(kOptimizedTooManyTimes, "Optimized too many times") \
1275 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \ 1296 V(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister, \
1276 "Out of virtual registers while trying to allocate temp register") \ 1297 "Out of virtual registers while trying to allocate temp register") \
1277 V(kParseScopeError, "Parse/scope error") \ 1298 V(kParseScopeError, "Parse/scope error") \
1278 V(kPossibleDirectCallToEval, "Possible direct call to eval") \ 1299 V(kPossibleDirectCallToEval, "Possible direct call to eval") \
1300 V(kPreconditionsWereNotMet, "Preconditions were not met") \
1279 V(kPropertyAllocationCountFailed, "Property allocation count failed") \ 1301 V(kPropertyAllocationCountFailed, "Property allocation count failed") \
1280 V(kReceivedInvalidReturnAddress, "Received invalid return address") \ 1302 V(kReceivedInvalidReturnAddress, "Received invalid return address") \
1281 V(kReferenceToAVariableWhichRequiresDynamicLookup, \ 1303 V(kReferenceToAVariableWhichRequiresDynamicLookup, \
1282 "Reference to a variable which requires dynamic lookup") \ 1304 "Reference to a variable which requires dynamic lookup") \
1283 V(kReferenceToGlobalLexicalVariable, \ 1305 V(kReferenceToGlobalLexicalVariable, \
1284 "Reference to global lexical variable") \ 1306 "Reference to global lexical variable") \
1285 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \ 1307 V(kReferenceToUninitializedVariable, "Reference to uninitialized variable") \
1286 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ 1308 V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \
1287 V(kRegisterWasClobbered, "Register was clobbered") \ 1309 V(kRegisterWasClobbered, "Register was clobbered") \
1310 V(kRememberedSetPointerInNewSpace, "Remembered set pointer is in new space") \
1311 V(kReturnAddressNotFoundInFrame, "Return address not found in frame") \
1312 V(kRhsHasBeenClobbered, "Rhs has been clobbered") \
1288 V(kScopedBlock, "ScopedBlock") \ 1313 V(kScopedBlock, "ScopedBlock") \
1289 V(kSmiAdditionOverflow, "Smi addition overflow") \ 1314 V(kSmiAdditionOverflow, "Smi addition overflow") \
1290 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ 1315 V(kSmiSubtractionOverflow, "Smi subtraction overflow") \
1316 V(kStackAccessBelowStackPointer, "Stack access below stack pointer") \
1291 V(kStackFrameTypesMustMatch, "Stack frame types must match") \ 1317 V(kStackFrameTypesMustMatch, "Stack frame types must match") \
1292 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \ 1318 V(kSwitchStatementMixedOrNonLiteralSwitchLabels, \
1293 "SwitchStatement: mixed or non-literal switch labels") \ 1319 "SwitchStatement: mixed or non-literal switch labels") \
1294 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \ 1320 V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses") \
1321 V(kTheCurrentStackPointerIsBelowCsp, \
1322 "The current stack pointer is below csp") \
1295 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \ 1323 V(kTheInstructionShouldBeALui, "The instruction should be a lui") \
1296 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \ 1324 V(kTheInstructionShouldBeAnOri, "The instruction should be an ori") \
1297 V(kTheInstructionToPatchShouldBeALoadFromPc, \ 1325 V(kTheInstructionToPatchShouldBeALoadFromPc, \
1298 "The instruction to patch should be a load from pc") \ 1326 "The instruction to patch should be a load from pc") \
1327 V(kTheInstructionToPatchShouldBeAnLdrLiteral, \
1328 "The instruction to patch should be a ldr literal") \
1299 V(kTheInstructionToPatchShouldBeALui, \ 1329 V(kTheInstructionToPatchShouldBeALui, \
1300 "The instruction to patch should be a lui") \ 1330 "The instruction to patch should be a lui") \
1301 V(kTheInstructionToPatchShouldBeAnOri, \ 1331 V(kTheInstructionToPatchShouldBeAnOri, \
1302 "The instruction to patch should be an ori") \ 1332 "The instruction to patch should be an ori") \
1333 V(kTheSourceAndDestinationAreTheSame, \
1334 "The source and destination are the same") \
1335 V(kTheStackPointerIsNotAligned, "The stack pointer is not aligned.") \
1336 V(kTheStackWasCorruptedByMacroAssemblerCall, \
1337 "The stack was corrupted by MacroAssembler::Call()") \
1303 V(kTooManyParametersLocals, "Too many parameters/locals") \ 1338 V(kTooManyParametersLocals, "Too many parameters/locals") \
1304 V(kTooManyParameters, "Too many parameters") \ 1339 V(kTooManyParameters, "Too many parameters") \
1305 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \ 1340 V(kTooManySpillSlotsNeededForOSR, "Too many spill slots needed for OSR") \
1341 V(kToOperand32UnsupportedImmediate, "ToOperand32 unsupported immediate.") \
1306 V(kToOperandIsDoubleRegisterUnimplemented, \ 1342 V(kToOperandIsDoubleRegisterUnimplemented, \
1307 "ToOperand IsDoubleRegister unimplemented") \ 1343 "ToOperand IsDoubleRegister unimplemented") \
1308 V(kToOperandUnsupportedDoubleImmediate, \ 1344 V(kToOperandUnsupportedDoubleImmediate, \
1309 "ToOperand Unsupported double immediate") \ 1345 "ToOperand Unsupported double immediate") \
1310 V(kTryCatchStatement, "TryCatchStatement") \ 1346 V(kTryCatchStatement, "TryCatchStatement") \
1311 V(kTryFinallyStatement, "TryFinallyStatement") \ 1347 V(kTryFinallyStatement, "TryFinallyStatement") \
1312 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \ 1348 V(kUnableToEncodeValueAsSmi, "Unable to encode value as smi") \
1313 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \ 1349 V(kUnalignedAllocationInNewSpace, "Unaligned allocation in new space") \
1350 V(kUnalignedCellInWriteBarrier, "Unaligned cell in write barrier") \
1314 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \ 1351 V(kUndefinedValueNotLoaded, "Undefined value not loaded") \
1315 V(kUndoAllocationOfNonAllocatedMemory, \ 1352 V(kUndoAllocationOfNonAllocatedMemory, \
1316 "Undo allocation of non allocated memory") \ 1353 "Undo allocation of non allocated memory") \
1317 V(kUnexpectedAllocationTop, "Unexpected allocation top") \ 1354 V(kUnexpectedAllocationTop, "Unexpected allocation top") \
1355 V(kUnexpectedColorFound, "Unexpected color bit pattern found") \
1318 V(kUnexpectedElementsKindInArrayConstructor, \ 1356 V(kUnexpectedElementsKindInArrayConstructor, \
1319 "Unexpected ElementsKind in array constructor") \ 1357 "Unexpected ElementsKind in array constructor") \
1320 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \ 1358 V(kUnexpectedFallthroughFromCharCodeAtSlowCase, \
1321 "Unexpected fallthrough from CharCodeAt slow case") \ 1359 "Unexpected fallthrough from CharCodeAt slow case") \
1322 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \ 1360 V(kUnexpectedFallthroughFromCharFromCodeSlowCase, \
1323 "Unexpected fallthrough from CharFromCode slow case") \ 1361 "Unexpected fallthrough from CharFromCode slow case") \
1324 V(kUnexpectedFallThroughFromStringComparison, \ 1362 V(kUnexpectedFallThroughFromStringComparison, \
1325 "Unexpected fall-through from string comparison") \ 1363 "Unexpected fall-through from string comparison") \
1326 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \ 1364 V(kUnexpectedFallThroughInBinaryStubGenerateFloatingPointCode, \
1327 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \ 1365 "Unexpected fall-through in BinaryStub_GenerateFloatingPointCode") \
1328 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \ 1366 V(kUnexpectedFallthroughToCharCodeAtSlowCase, \
1329 "Unexpected fallthrough to CharCodeAt slow case") \ 1367 "Unexpected fallthrough to CharCodeAt slow case") \
1330 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \ 1368 V(kUnexpectedFallthroughToCharFromCodeSlowCase, \
1331 "Unexpected fallthrough to CharFromCode slow case") \ 1369 "Unexpected fallthrough to CharFromCode slow case") \
1332 V(kUnexpectedFPUStackDepthAfterInstruction, \ 1370 V(kUnexpectedFPUStackDepthAfterInstruction, \
1333 "Unexpected FPU stack depth after instruction") \ 1371 "Unexpected FPU stack depth after instruction") \
1334 V(kUnexpectedInitialMapForArrayFunction1, \ 1372 V(kUnexpectedInitialMapForArrayFunction1, \
1335 "Unexpected initial map for Array function (1)") \ 1373 "Unexpected initial map for Array function (1)") \
1336 V(kUnexpectedInitialMapForArrayFunction2, \ 1374 V(kUnexpectedInitialMapForArrayFunction2, \
1337 "Unexpected initial map for Array function (2)") \ 1375 "Unexpected initial map for Array function (2)") \
1338 V(kUnexpectedInitialMapForArrayFunction, \ 1376 V(kUnexpectedInitialMapForArrayFunction, \
1339 "Unexpected initial map for Array function") \ 1377 "Unexpected initial map for Array function") \
1340 V(kUnexpectedInitialMapForInternalArrayFunction, \ 1378 V(kUnexpectedInitialMapForInternalArrayFunction, \
1341 "Unexpected initial map for InternalArray function") \ 1379 "Unexpected initial map for InternalArray function") \
1342 V(kUnexpectedLevelAfterReturnFromApiCall, \ 1380 V(kUnexpectedLevelAfterReturnFromApiCall, \
1343 "Unexpected level after return from api call") \ 1381 "Unexpected level after return from api call") \
1382 V(kUnexpectedNegativeValue, "Unexpected negative value") \
1344 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \ 1383 V(kUnexpectedNumberOfPreAllocatedPropertyFields, \
1345 "Unexpected number of pre-allocated property fields") \ 1384 "Unexpected number of pre-allocated property fields") \
1385 V(kUnexpectedSmi, "Unexpected smi value") \
1346 V(kUnexpectedStringFunction, "Unexpected String function") \ 1386 V(kUnexpectedStringFunction, "Unexpected String function") \
1347 V(kUnexpectedStringType, "Unexpected string type") \ 1387 V(kUnexpectedStringType, "Unexpected string type") \
1348 V(kUnexpectedStringWrapperInstanceSize, \ 1388 V(kUnexpectedStringWrapperInstanceSize, \
1349 "Unexpected string wrapper instance size") \ 1389 "Unexpected string wrapper instance size") \
1350 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \ 1390 V(kUnexpectedTypeForRegExpDataFixedArrayExpected, \
1351 "Unexpected type for RegExp data, FixedArray expected") \ 1391 "Unexpected type for RegExp data, FixedArray expected") \
1392 V(kUnexpectedValue, "Unexpected value") \
1352 V(kUnexpectedUnusedPropertiesOfStringWrapper, \ 1393 V(kUnexpectedUnusedPropertiesOfStringWrapper, \
1353 "Unexpected unused properties of string wrapper") \ 1394 "Unexpected unused properties of string wrapper") \
1395 V(kUnimplemented, "unimplemented") \
1354 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \ 1396 V(kUninitializedKSmiConstantRegister, "Uninitialized kSmiConstantRegister") \
1355 V(kUnknown, "Unknown") \ 1397 V(kUnknown, "Unknown") \
1356 V(kUnsupportedConstCompoundAssignment, \ 1398 V(kUnsupportedConstCompoundAssignment, \
1357 "Unsupported const compound assignment") \ 1399 "Unsupported const compound assignment") \
1358 V(kUnsupportedCountOperationWithConst, \ 1400 V(kUnsupportedCountOperationWithConst, \
1359 "Unsupported count operation with const") \ 1401 "Unsupported count operation with const") \
1360 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \ 1402 V(kUnsupportedDoubleImmediate, "Unsupported double immediate") \
1361 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \ 1403 V(kUnsupportedLetCompoundAssignment, "Unsupported let compound assignment") \
1362 V(kUnsupportedLookupSlotInDeclaration, \ 1404 V(kUnsupportedLookupSlotInDeclaration, \
1363 "Unsupported lookup slot in declaration") \ 1405 "Unsupported lookup slot in declaration") \
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 inline bool HasFastElements(); 2180 inline bool HasFastElements();
2139 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS 2181 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS
2140 // ElementsKind. 2182 // ElementsKind.
2141 inline bool HasFastDoubleElements(); 2183 inline bool HasFastDoubleElements();
2142 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS 2184 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS
2143 // ElementsKind. 2185 // ElementsKind.
2144 inline bool HasFastHoleyElements(); 2186 inline bool HasFastHoleyElements();
2145 inline bool HasNonStrictArgumentsElements(); 2187 inline bool HasNonStrictArgumentsElements();
2146 inline bool HasDictionaryElements(); 2188 inline bool HasDictionaryElements();
2147 2189
2148 inline bool HasExternalPixelElements(); 2190 inline bool HasExternalUint8ClampedElements();
2149 inline bool HasExternalArrayElements(); 2191 inline bool HasExternalArrayElements();
2150 inline bool HasExternalByteElements(); 2192 inline bool HasExternalInt8Elements();
2151 inline bool HasExternalUnsignedByteElements(); 2193 inline bool HasExternalUint8Elements();
2152 inline bool HasExternalShortElements(); 2194 inline bool HasExternalInt16Elements();
2153 inline bool HasExternalUnsignedShortElements(); 2195 inline bool HasExternalUint16Elements();
2154 inline bool HasExternalIntElements(); 2196 inline bool HasExternalInt32Elements();
2155 inline bool HasExternalUnsignedIntElements(); 2197 inline bool HasExternalUint32Elements();
2156 inline bool HasExternalFloatElements(); 2198 inline bool HasExternalFloat32Elements();
2157 inline bool HasExternalDoubleElements(); 2199 inline bool HasExternalFloat64Elements();
2158 2200
2159 inline bool HasFixedTypedArrayElements(); 2201 inline bool HasFixedTypedArrayElements();
2160 2202
2161 bool HasFastArgumentsElements(); 2203 bool HasFastArgumentsElements();
2162 bool HasDictionaryArgumentsElements(); 2204 bool HasDictionaryArgumentsElements();
2163 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. 2205 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
2164 2206
2165 inline void set_map_and_elements( 2207 inline void set_map_and_elements(
2166 Map* map, 2208 Map* map,
2167 FixedArrayBase* value, 2209 FixedArrayBase* value,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 // Migrates the given object to a map whose field representations are the 2278 // Migrates the given object to a map whose field representations are the
2237 // lowest upper bound of all known representations for that field. 2279 // lowest upper bound of all known representations for that field.
2238 static void MigrateInstance(Handle<JSObject> instance); 2280 static void MigrateInstance(Handle<JSObject> instance);
2239 2281
2240 // Migrates the given object only if the target map is already available, 2282 // Migrates the given object only if the target map is already available,
2241 // or returns an empty handle if such a map is not yet available. 2283 // or returns an empty handle if such a map is not yet available.
2242 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance); 2284 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance);
2243 2285
2244 // Retrieve a value in a normalized object given a lookup result. 2286 // Retrieve a value in a normalized object given a lookup result.
2245 // Handles the special representation of JS global objects. 2287 // Handles the special representation of JS global objects.
2246 Object* GetNormalizedProperty(LookupResult* result); 2288 Object* GetNormalizedProperty(const LookupResult* result);
2247 2289
2248 // Sets the property value in a normalized object given a lookup result. 2290 // Sets the property value in a normalized object given a lookup result.
2249 // Handles the special representation of JS global objects. 2291 // Handles the special representation of JS global objects.
2250 static void SetNormalizedProperty(Handle<JSObject> object, 2292 static void SetNormalizedProperty(Handle<JSObject> object,
2251 LookupResult* result, 2293 const LookupResult* result,
2252 Handle<Object> value); 2294 Handle<Object> value);
2253 2295
2254 // Sets the property value in a normalized object given (key, value, details). 2296 // Sets the property value in a normalized object given (key, value, details).
2255 // Handles the special representation of JS global objects. 2297 // Handles the special representation of JS global objects.
2256 static void SetNormalizedProperty(Handle<JSObject> object, 2298 static void SetNormalizedProperty(Handle<JSObject> object,
2257 Handle<Name> key, 2299 Handle<Name> key,
2258 Handle<Object> value, 2300 Handle<Object> value,
2259 PropertyDetails details); 2301 PropertyDetails details);
2260 2302
2261 static void OptimizeAsPrototype(Handle<JSObject> object); 2303 static void OptimizeAsPrototype(Handle<JSObject> object);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 static const uint32_t kMaxGap = 1024; 2700 static const uint32_t kMaxGap = 1024;
2659 2701
2660 // Maximal length of fast elements array that won't be checked for 2702 // Maximal length of fast elements array that won't be checked for
2661 // being dense enough on expansion. 2703 // being dense enough on expansion.
2662 static const int kMaxUncheckedFastElementsLength = 5000; 2704 static const int kMaxUncheckedFastElementsLength = 5000;
2663 2705
2664 // Same as above but for old arrays. This limit is more strict. We 2706 // Same as above but for old arrays. This limit is more strict. We
2665 // don't want to be wasteful with long lived objects. 2707 // don't want to be wasteful with long lived objects.
2666 static const int kMaxUncheckedOldFastElementsLength = 500; 2708 static const int kMaxUncheckedOldFastElementsLength = 500;
2667 2709
2668 // Note that Heap::MaxRegularSpaceAllocationSize() puts a limit on 2710 // Note that Page::kMaxRegularHeapObjectSize puts a limit on
2669 // permissible values (see the ASSERT in heap.cc). 2711 // permissible values (see the ASSERT in heap.cc).
2670 static const int kInitialMaxFastElementArray = 100000; 2712 static const int kInitialMaxFastElementArray = 100000;
2671 2713
2672 static const int kFastPropertiesSoftLimit = 12; 2714 static const int kFastPropertiesSoftLimit = 12;
2673 static const int kMaxFastProperties = 64; 2715 static const int kMaxFastProperties = 64;
2674 static const int kMaxInstanceSize = 255 * kPointerSize; 2716 static const int kMaxInstanceSize = 255 * kPointerSize;
2675 // When extending the backing storage for property values, we increase 2717 // When extending the backing storage for property values, we increase
2676 // its size by more than the 1 entry necessary, so sequentially adding fields 2718 // its size by more than the 1 entry necessary, so sequentially adding fields
2677 // to the same object requires fewer allocations and copies. 2719 // to the same object requires fewer allocations and copies.
2678 static const int kFieldsAdded = 3; 2720 static const int kFieldsAdded = 3;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 inline void set_undefined(int index); 3015 inline void set_undefined(int index);
2974 inline void set_null(int index); 3016 inline void set_null(int index);
2975 inline void set_the_hole(int index); 3017 inline void set_the_hole(int index);
2976 3018
2977 inline Object** GetFirstElementAddress(); 3019 inline Object** GetFirstElementAddress();
2978 inline bool ContainsOnlySmisOrHoles(); 3020 inline bool ContainsOnlySmisOrHoles();
2979 3021
2980 // Gives access to raw memory which stores the array's data. 3022 // Gives access to raw memory which stores the array's data.
2981 inline Object** data_start(); 3023 inline Object** data_start();
2982 3024
3025 // Shrink length and insert filler objects.
3026 void Shrink(int length);
3027
2983 // Copy operations. 3028 // Copy operations.
2984 MUST_USE_RESULT inline MaybeObject* Copy(); 3029 MUST_USE_RESULT inline MaybeObject* Copy();
2985 MUST_USE_RESULT MaybeObject* CopySize(int new_length, 3030 MUST_USE_RESULT MaybeObject* CopySize(int new_length,
2986 PretenureFlag pretenure = NOT_TENURED); 3031 PretenureFlag pretenure = NOT_TENURED);
2987 3032
2988 // Add the elements of a JSArray to this FixedArray. 3033 // Add the elements of a JSArray to this FixedArray.
2989 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); 3034 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array);
2990 3035
2991 // Compute the union of this and other. 3036 // Compute the union of this and other.
2992 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); 3037 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other);
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
4560 static const int kSizeOffset = HeapObject::kHeaderSize; 4605 static const int kSizeOffset = HeapObject::kHeaderSize;
4561 static const int kHeaderSize = kSizeOffset + kPointerSize; 4606 static const int kHeaderSize = kSizeOffset + kPointerSize;
4562 4607
4563 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); 4608 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
4564 4609
4565 private: 4610 private:
4566 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace); 4611 DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace);
4567 }; 4612 };
4568 4613
4569 4614
4615 // V has parameters (Type, type, TYPE, C type, element_size)
4616 #define TYPED_ARRAYS(V) \
4617 V(Uint8, uint8, UINT8, uint8_t, 1) \
4618 V(Int8, int8, INT8, int8_t, 1) \
4619 V(Uint16, uint16, UINT16, uint16_t, 2) \
4620 V(Int16, int16, INT16, int16_t, 2) \
4621 V(Uint32, uint32, UINT32, uint32_t, 4) \
4622 V(Int32, int32, INT32, int32_t, 4) \
4623 V(Float32, float32, FLOAT32, float, 4) \
4624 V(Float64, float64, FLOAT64, double, 8) \
4625 V(Uint8Clamped, uint8_clamped, UINT8_CLAMPED, uint8_t, 1)
4626
4627
4628
4570 // An ExternalArray represents a fixed-size array of primitive values 4629 // An ExternalArray represents a fixed-size array of primitive values
4571 // which live outside the JavaScript heap. Its subclasses are used to 4630 // which live outside the JavaScript heap. Its subclasses are used to
4572 // implement the CanvasArray types being defined in the WebGL 4631 // implement the CanvasArray types being defined in the WebGL
4573 // specification. As of this writing the first public draft is not yet 4632 // specification. As of this writing the first public draft is not yet
4574 // available, but Khronos members can access the draft at: 4633 // available, but Khronos members can access the draft at:
4575 // https://cvs.khronos.org/svn/repos/3dweb/trunk/doc/spec/WebGL-spec.html 4634 // https://cvs.khronos.org/svn/repos/3dweb/trunk/doc/spec/WebGL-spec.html
4576 // 4635 //
4577 // The semantics of these arrays differ from CanvasPixelArray. 4636 // The semantics of these arrays differ from CanvasPixelArray.
4578 // Out-of-range values passed to the setter are converted via a C 4637 // Out-of-range values passed to the setter are converted via a C
4579 // cast, not clamping. Out-of-range indices cause exceptions to be 4638 // cast, not clamping. Out-of-range indices cause exceptions to be
(...skipping 16 matching lines...) Expand all
4596 static const int kExternalPointerOffset = 4655 static const int kExternalPointerOffset =
4597 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); 4656 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize);
4598 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; 4657 static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
4599 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); 4658 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
4600 4659
4601 private: 4660 private:
4602 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); 4661 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray);
4603 }; 4662 };
4604 4663
4605 4664
4606 // A ExternalPixelArray represents a fixed-size byte array with special 4665 // A ExternalUint8ClampedArray represents a fixed-size byte array with special
4607 // semantics used for implementing the CanvasPixelArray object. Please see the 4666 // semantics used for implementing the CanvasPixelArray object. Please see the
4608 // specification at: 4667 // specification at:
4609 4668
4610 // http://www.whatwg.org/specs/web-apps/current-work/ 4669 // http://www.whatwg.org/specs/web-apps/current-work/
4611 // multipage/the-canvas-element.html#canvaspixelarray 4670 // multipage/the-canvas-element.html#canvaspixelarray
4612 // In particular, write access clamps the value written to 0 or 255 if the 4671 // In particular, write access clamps the value written to 0 or 255 if the
4613 // value written is outside this range. 4672 // value written is outside this range.
4614 class ExternalPixelArray: public ExternalArray { 4673 class ExternalUint8ClampedArray: public ExternalArray {
4615 public: 4674 public:
4616 inline uint8_t* external_pixel_pointer(); 4675 inline uint8_t* external_uint8_clamped_pointer();
4617 4676
4618 // Setter and getter. 4677 // Setter and getter.
4619 inline uint8_t get_scalar(int index); 4678 inline uint8_t get_scalar(int index);
4620 MUST_USE_RESULT inline MaybeObject* get(int index); 4679 MUST_USE_RESULT inline MaybeObject* get(int index);
4621 inline void set(int index, uint8_t value); 4680 inline void set(int index, uint8_t value);
4622 4681
4623 // This accessor applies the correct conversion from Smi, HeapNumber and 4682 // This accessor applies the correct conversion from Smi, HeapNumber and
4624 // undefined and clamps the converted value between 0 and 255. 4683 // undefined and clamps the converted value between 0 and 255.
4625 Object* SetValue(uint32_t index, Object* value); 4684 Object* SetValue(uint32_t index, Object* value);
4626 4685
4686 static Handle<Object> SetValue(Handle<ExternalUint8ClampedArray> array,
4687 uint32_t index,
4688 Handle<Object> value);
4689
4627 // Casting. 4690 // Casting.
4628 static inline ExternalPixelArray* cast(Object* obj); 4691 static inline ExternalUint8ClampedArray* cast(Object* obj);
4629 4692
4630 // Dispatched behavior. 4693 // Dispatched behavior.
4631 DECLARE_PRINTER(ExternalPixelArray) 4694 DECLARE_PRINTER(ExternalUint8ClampedArray)
4632 DECLARE_VERIFIER(ExternalPixelArray) 4695 DECLARE_VERIFIER(ExternalUint8ClampedArray)
4633 4696
4634 private: 4697 private:
4635 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalPixelArray); 4698 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8ClampedArray);
4636 }; 4699 };
4637 4700
4638 4701
4639 class ExternalByteArray: public ExternalArray { 4702 class ExternalInt8Array: public ExternalArray {
4640 public: 4703 public:
4641 // Setter and getter. 4704 // Setter and getter.
4642 inline int8_t get_scalar(int index); 4705 inline int8_t get_scalar(int index);
4643 MUST_USE_RESULT inline MaybeObject* get(int index); 4706 MUST_USE_RESULT inline MaybeObject* get(int index);
4644 inline void set(int index, int8_t value); 4707 inline void set(int index, int8_t value);
4645 4708
4646 static Handle<Object> SetValue(Handle<ExternalByteArray> array, 4709 static Handle<Object> SetValue(Handle<ExternalInt8Array> array,
4647 uint32_t index, 4710 uint32_t index,
4648 Handle<Object> value); 4711 Handle<Object> value);
4649 4712
4650 // This accessor applies the correct conversion from Smi, HeapNumber 4713 // This accessor applies the correct conversion from Smi, HeapNumber
4651 // and undefined. 4714 // and undefined.
4652 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4715 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4653 4716
4654 // Casting. 4717 // Casting.
4655 static inline ExternalByteArray* cast(Object* obj); 4718 static inline ExternalInt8Array* cast(Object* obj);
4656 4719
4657 // Dispatched behavior. 4720 // Dispatched behavior.
4658 DECLARE_PRINTER(ExternalByteArray) 4721 DECLARE_PRINTER(ExternalInt8Array)
4659 DECLARE_VERIFIER(ExternalByteArray) 4722 DECLARE_VERIFIER(ExternalInt8Array)
4660 4723
4661 private: 4724 private:
4662 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalByteArray); 4725 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt8Array);
4663 }; 4726 };
4664 4727
4665 4728
4666 class ExternalUnsignedByteArray: public ExternalArray { 4729 class ExternalUint8Array: public ExternalArray {
4667 public: 4730 public:
4668 // Setter and getter. 4731 // Setter and getter.
4669 inline uint8_t get_scalar(int index); 4732 inline uint8_t get_scalar(int index);
4670 MUST_USE_RESULT inline MaybeObject* get(int index); 4733 MUST_USE_RESULT inline MaybeObject* get(int index);
4671 inline void set(int index, uint8_t value); 4734 inline void set(int index, uint8_t value);
4672 4735
4673 static Handle<Object> SetValue(Handle<ExternalUnsignedByteArray> array, 4736 static Handle<Object> SetValue(Handle<ExternalUint8Array> array,
4674 uint32_t index, 4737 uint32_t index,
4675 Handle<Object> value); 4738 Handle<Object> value);
4676 4739
4677 // This accessor applies the correct conversion from Smi, HeapNumber 4740 // This accessor applies the correct conversion from Smi, HeapNumber
4678 // and undefined. 4741 // and undefined.
4679 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4742 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4680 4743
4681 // Casting. 4744 // Casting.
4682 static inline ExternalUnsignedByteArray* cast(Object* obj); 4745 static inline ExternalUint8Array* cast(Object* obj);
4683 4746
4684 // Dispatched behavior. 4747 // Dispatched behavior.
4685 DECLARE_PRINTER(ExternalUnsignedByteArray) 4748 DECLARE_PRINTER(ExternalUint8Array)
4686 DECLARE_VERIFIER(ExternalUnsignedByteArray) 4749 DECLARE_VERIFIER(ExternalUint8Array)
4687 4750
4688 private: 4751 private:
4689 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedByteArray); 4752 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8Array);
4690 }; 4753 };
4691 4754
4692 4755
4693 class ExternalShortArray: public ExternalArray { 4756 class ExternalInt16Array: public ExternalArray {
4694 public: 4757 public:
4695 // Setter and getter. 4758 // Setter and getter.
4696 inline int16_t get_scalar(int index); 4759 inline int16_t get_scalar(int index);
4697 MUST_USE_RESULT inline MaybeObject* get(int index); 4760 MUST_USE_RESULT inline MaybeObject* get(int index);
4698 inline void set(int index, int16_t value); 4761 inline void set(int index, int16_t value);
4699 4762
4700 static Handle<Object> SetValue(Handle<ExternalShortArray> array, 4763 static Handle<Object> SetValue(Handle<ExternalInt16Array> array,
4701 uint32_t index, 4764 uint32_t index,
4702 Handle<Object> value); 4765 Handle<Object> value);
4703 4766
4704 // This accessor applies the correct conversion from Smi, HeapNumber 4767 // This accessor applies the correct conversion from Smi, HeapNumber
4705 // and undefined. 4768 // and undefined.
4706 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4769 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4707 4770
4708 // Casting. 4771 // Casting.
4709 static inline ExternalShortArray* cast(Object* obj); 4772 static inline ExternalInt16Array* cast(Object* obj);
4710 4773
4711 // Dispatched behavior. 4774 // Dispatched behavior.
4712 DECLARE_PRINTER(ExternalShortArray) 4775 DECLARE_PRINTER(ExternalInt16Array)
4713 DECLARE_VERIFIER(ExternalShortArray) 4776 DECLARE_VERIFIER(ExternalInt16Array)
4714 4777
4715 private: 4778 private:
4716 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalShortArray); 4779 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt16Array);
4717 }; 4780 };
4718 4781
4719 4782
4720 class ExternalUnsignedShortArray: public ExternalArray { 4783 class ExternalUint16Array: public ExternalArray {
4721 public: 4784 public:
4722 // Setter and getter. 4785 // Setter and getter.
4723 inline uint16_t get_scalar(int index); 4786 inline uint16_t get_scalar(int index);
4724 MUST_USE_RESULT inline MaybeObject* get(int index); 4787 MUST_USE_RESULT inline MaybeObject* get(int index);
4725 inline void set(int index, uint16_t value); 4788 inline void set(int index, uint16_t value);
4726 4789
4727 static Handle<Object> SetValue(Handle<ExternalUnsignedShortArray> array, 4790 static Handle<Object> SetValue(Handle<ExternalUint16Array> array,
4728 uint32_t index, 4791 uint32_t index,
4729 Handle<Object> value); 4792 Handle<Object> value);
4730 4793
4731 // This accessor applies the correct conversion from Smi, HeapNumber 4794 // This accessor applies the correct conversion from Smi, HeapNumber
4732 // and undefined. 4795 // and undefined.
4733 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4796 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4734 4797
4735 // Casting. 4798 // Casting.
4736 static inline ExternalUnsignedShortArray* cast(Object* obj); 4799 static inline ExternalUint16Array* cast(Object* obj);
4737 4800
4738 // Dispatched behavior. 4801 // Dispatched behavior.
4739 DECLARE_PRINTER(ExternalUnsignedShortArray) 4802 DECLARE_PRINTER(ExternalUint16Array)
4740 DECLARE_VERIFIER(ExternalUnsignedShortArray) 4803 DECLARE_VERIFIER(ExternalUint16Array)
4741 4804
4742 private: 4805 private:
4743 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedShortArray); 4806 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint16Array);
4744 }; 4807 };
4745 4808
4746 4809
4747 class ExternalIntArray: public ExternalArray { 4810 class ExternalInt32Array: public ExternalArray {
4748 public: 4811 public:
4749 // Setter and getter. 4812 // Setter and getter.
4750 inline int32_t get_scalar(int index); 4813 inline int32_t get_scalar(int index);
4751 MUST_USE_RESULT inline MaybeObject* get(int index); 4814 MUST_USE_RESULT inline MaybeObject* get(int index);
4752 inline void set(int index, int32_t value); 4815 inline void set(int index, int32_t value);
4753 4816
4754 static Handle<Object> SetValue(Handle<ExternalIntArray> array, 4817 static Handle<Object> SetValue(Handle<ExternalInt32Array> array,
4755 uint32_t index, 4818 uint32_t index,
4756 Handle<Object> value); 4819 Handle<Object> value);
4757 4820
4758 // This accessor applies the correct conversion from Smi, HeapNumber 4821 // This accessor applies the correct conversion from Smi, HeapNumber
4759 // and undefined. 4822 // and undefined.
4760 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4823 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4761 4824
4762 // Casting. 4825 // Casting.
4763 static inline ExternalIntArray* cast(Object* obj); 4826 static inline ExternalInt32Array* cast(Object* obj);
4764 4827
4765 // Dispatched behavior. 4828 // Dispatched behavior.
4766 DECLARE_PRINTER(ExternalIntArray) 4829 DECLARE_PRINTER(ExternalInt32Array)
4767 DECLARE_VERIFIER(ExternalIntArray) 4830 DECLARE_VERIFIER(ExternalInt32Array)
4768 4831
4769 private: 4832 private:
4770 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalIntArray); 4833 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt32Array);
4771 }; 4834 };
4772 4835
4773 4836
4774 class ExternalUnsignedIntArray: public ExternalArray { 4837 class ExternalUint32Array: public ExternalArray {
4775 public: 4838 public:
4776 // Setter and getter. 4839 // Setter and getter.
4777 inline uint32_t get_scalar(int index); 4840 inline uint32_t get_scalar(int index);
4778 MUST_USE_RESULT inline MaybeObject* get(int index); 4841 MUST_USE_RESULT inline MaybeObject* get(int index);
4779 inline void set(int index, uint32_t value); 4842 inline void set(int index, uint32_t value);
4780 4843
4781 static Handle<Object> SetValue(Handle<ExternalUnsignedIntArray> array, 4844 static Handle<Object> SetValue(Handle<ExternalUint32Array> array,
4782 uint32_t index, 4845 uint32_t index,
4783 Handle<Object> value); 4846 Handle<Object> value);
4784 4847
4785 // This accessor applies the correct conversion from Smi, HeapNumber 4848 // This accessor applies the correct conversion from Smi, HeapNumber
4786 // and undefined. 4849 // and undefined.
4787 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4850 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4788 4851
4789 // Casting. 4852 // Casting.
4790 static inline ExternalUnsignedIntArray* cast(Object* obj); 4853 static inline ExternalUint32Array* cast(Object* obj);
4791 4854
4792 // Dispatched behavior. 4855 // Dispatched behavior.
4793 DECLARE_PRINTER(ExternalUnsignedIntArray) 4856 DECLARE_PRINTER(ExternalUint32Array)
4794 DECLARE_VERIFIER(ExternalUnsignedIntArray) 4857 DECLARE_VERIFIER(ExternalUint32Array)
4795 4858
4796 private: 4859 private:
4797 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUnsignedIntArray); 4860 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint32Array);
4798 }; 4861 };
4799 4862
4800 4863
4801 class ExternalFloatArray: public ExternalArray { 4864 class ExternalFloat32Array: public ExternalArray {
4802 public: 4865 public:
4803 // Setter and getter. 4866 // Setter and getter.
4804 inline float get_scalar(int index); 4867 inline float get_scalar(int index);
4805 MUST_USE_RESULT inline MaybeObject* get(int index); 4868 MUST_USE_RESULT inline MaybeObject* get(int index);
4806 inline void set(int index, float value); 4869 inline void set(int index, float value);
4807 4870
4808 static Handle<Object> SetValue(Handle<ExternalFloatArray> array, 4871 static Handle<Object> SetValue(Handle<ExternalFloat32Array> array,
4809 uint32_t index, 4872 uint32_t index,
4810 Handle<Object> value); 4873 Handle<Object> value);
4811 4874
4812 // This accessor applies the correct conversion from Smi, HeapNumber 4875 // This accessor applies the correct conversion from Smi, HeapNumber
4813 // and undefined. 4876 // and undefined.
4814 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4877 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4815 4878
4816 // Casting. 4879 // Casting.
4817 static inline ExternalFloatArray* cast(Object* obj); 4880 static inline ExternalFloat32Array* cast(Object* obj);
4818 4881
4819 // Dispatched behavior. 4882 // Dispatched behavior.
4820 DECLARE_PRINTER(ExternalFloatArray) 4883 DECLARE_PRINTER(ExternalFloat32Array)
4821 DECLARE_VERIFIER(ExternalFloatArray) 4884 DECLARE_VERIFIER(ExternalFloat32Array)
4822 4885
4823 private: 4886 private:
4824 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); 4887 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat32Array);
4825 }; 4888 };
4826 4889
4827 4890
4828 class ExternalDoubleArray: public ExternalArray { 4891 class ExternalFloat64Array: public ExternalArray {
4829 public: 4892 public:
4830 // Setter and getter. 4893 // Setter and getter.
4831 inline double get_scalar(int index); 4894 inline double get_scalar(int index);
4832 MUST_USE_RESULT inline MaybeObject* get(int index); 4895 MUST_USE_RESULT inline MaybeObject* get(int index);
4833 inline void set(int index, double value); 4896 inline void set(int index, double value);
4834 4897
4835 static Handle<Object> SetValue(Handle<ExternalDoubleArray> array, 4898 static Handle<Object> SetValue(Handle<ExternalFloat64Array> array,
4836 uint32_t index, 4899 uint32_t index,
4837 Handle<Object> value); 4900 Handle<Object> value);
4838 4901
4839 // This accessor applies the correct conversion from Smi, HeapNumber 4902 // This accessor applies the correct conversion from Smi, HeapNumber
4840 // and undefined. 4903 // and undefined.
4841 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4904 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4842 4905
4843 // Casting. 4906 // Casting.
4844 static inline ExternalDoubleArray* cast(Object* obj); 4907 static inline ExternalFloat64Array* cast(Object* obj);
4845 4908
4846 // Dispatched behavior. 4909 // Dispatched behavior.
4847 DECLARE_PRINTER(ExternalDoubleArray) 4910 DECLARE_PRINTER(ExternalFloat64Array)
4848 DECLARE_VERIFIER(ExternalDoubleArray) 4911 DECLARE_VERIFIER(ExternalFloat64Array)
4849 4912
4850 private: 4913 private:
4851 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalDoubleArray); 4914 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat64Array);
4852 }; 4915 };
4853 4916
4854 4917
4855 class FixedTypedArrayBase: public FixedArrayBase { 4918 class FixedTypedArrayBase: public FixedArrayBase {
4856 public: 4919 public:
4857 // Casting: 4920 // Casting:
4858 static inline FixedTypedArrayBase* cast(Object* obj); 4921 static inline FixedTypedArrayBase* cast(Object* obj);
4859 4922
4860 static const int kDataOffset = kHeaderSize; 4923 static const int kDataOffset = kHeaderSize;
4861 4924
4862 inline int size(); 4925 inline int size();
4863 4926
4864 private: 4927 private:
4865 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArrayBase); 4928 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArrayBase);
4866 }; 4929 };
4867 4930
4868 4931
4869 template <class Traits> 4932 template <class Traits>
4870 class FixedTypedArray: public FixedTypedArrayBase { 4933 class FixedTypedArray: public FixedTypedArrayBase {
4871 public: 4934 public:
4872 typedef typename Traits::ElementType ElementType; 4935 typedef typename Traits::ElementType ElementType;
4873 static const InstanceType kInstanceType = Traits::kInstanceType; 4936 static const InstanceType kInstanceType = Traits::kInstanceType;
4874 4937
4875 // Casting: 4938 // Casting:
4876 static inline FixedTypedArray<Traits>* cast(Object* obj); 4939 static inline FixedTypedArray<Traits>* cast(Object* obj);
4877 4940
4941 static inline int ElementOffset(int index) {
4942 return kDataOffset + index * sizeof(ElementType);
4943 }
4944
4878 static inline int SizeFor(int length) { 4945 static inline int SizeFor(int length) {
4879 return kDataOffset + length * sizeof(ElementType); 4946 return ElementOffset(length);
4880 } 4947 }
4881 4948
4882 inline ElementType get_scalar(int index); 4949 inline ElementType get_scalar(int index);
4883 MUST_USE_RESULT inline MaybeObject* get(int index); 4950 MUST_USE_RESULT inline MaybeObject* get(int index);
4884 inline void set(int index, ElementType value); 4951 inline void set(int index, ElementType value);
4885 4952
4886 // This accessor applies the correct conversion from Smi, HeapNumber 4953 // This accessor applies the correct conversion from Smi, HeapNumber
4887 // and undefined. 4954 // and undefined.
4888 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); 4955 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4889 4956
4890 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array, 4957 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array,
4891 uint32_t index, 4958 uint32_t index,
4892 Handle<Object> value); 4959 Handle<Object> value);
4893 4960
4894 DECLARE_PRINTER(FixedTypedArray) 4961 DECLARE_PRINTER(FixedTypedArray)
4895 DECLARE_VERIFIER(FixedTypedArray) 4962 DECLARE_VERIFIER(FixedTypedArray)
4896 4963
4897 private: 4964 private:
4898 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); 4965 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray);
4899 }; 4966 };
4900 4967
4901 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType) \ 4968 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \
4902 class Type##ArrayTraits { \ 4969 class Type##ArrayTraits { \
4903 public: \ 4970 public: \
4904 typedef elementType ElementType; \ 4971 typedef elementType ElementType; \
4905 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \ 4972 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \
4906 static const char* Designator() { return #type " array"; } \ 4973 static const char* Designator() { return #type " array"; } \
4907 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \ 4974 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \
4908 static elementType defaultValue() { return 0; } \ 4975 static elementType defaultValue() { return 0; } \
4909 }; \ 4976 }; \
4910 \ 4977 \
4911 typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array; 4978 typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array;
4912 4979
4913 FIXED_TYPED_ARRAY_TRAITS(Uint8, uint8, UINT8, uint8_t) 4980 TYPED_ARRAYS(FIXED_TYPED_ARRAY_TRAITS)
4914 FIXED_TYPED_ARRAY_TRAITS(Int8, int8, INT8, int8_t)
4915 FIXED_TYPED_ARRAY_TRAITS(Uint16, uint16, UINT16, uint16_t)
4916 FIXED_TYPED_ARRAY_TRAITS(Int16, int16, INT16, int16_t)
4917 FIXED_TYPED_ARRAY_TRAITS(Uint32, uint32, UINT32, uint32_t)
4918 FIXED_TYPED_ARRAY_TRAITS(Int32, int32, INT32, int32_t)
4919 FIXED_TYPED_ARRAY_TRAITS(Float32, float32, FLOAT32, float)
4920 FIXED_TYPED_ARRAY_TRAITS(Float64, float64, FLOAT64, double)
4921 FIXED_TYPED_ARRAY_TRAITS(Uint8Clamped, uint8_clamped, UINT8_CLAMPED, uint8_t)
4922 4981
4923 #undef FIXED_TYPED_ARRAY_TRAITS 4982 #undef FIXED_TYPED_ARRAY_TRAITS
4924 4983
4925 // DeoptimizationInputData is a fixed array used to hold the deoptimization 4984 // DeoptimizationInputData is a fixed array used to hold the deoptimization
4926 // data for code generated by the Hydrogen/Lithium compiler. It also 4985 // data for code generated by the Hydrogen/Lithium compiler. It also
4927 // contains information about functions that were inlined. If N different 4986 // contains information about functions that were inlined. If N different
4928 // functions were inlined then first N elements of the literal array will 4987 // functions were inlined then first N elements of the literal array will
4929 // contain these functions. 4988 // contain these functions.
4930 // 4989 //
4931 // It can be empty. 4990 // It can be empty.
4932 class DeoptimizationInputData: public FixedArray { 4991 class DeoptimizationInputData: public FixedArray {
4933 public: 4992 public:
4934 // Layout description. Indices in the array. 4993 // Layout description. Indices in the array.
4935 static const int kTranslationByteArrayIndex = 0; 4994 static const int kTranslationByteArrayIndex = 0;
4936 static const int kInlinedFunctionCountIndex = 1; 4995 static const int kInlinedFunctionCountIndex = 1;
4937 static const int kLiteralArrayIndex = 2; 4996 static const int kLiteralArrayIndex = 2;
4938 static const int kOsrAstIdIndex = 3; 4997 static const int kOsrAstIdIndex = 3;
4939 static const int kOsrPcOffsetIndex = 4; 4998 static const int kOsrPcOffsetIndex = 4;
4940 static const int kFirstDeoptEntryIndex = 5; 4999 static const int kOptimizationIdIndex = 5;
5000 static const int kSharedFunctionInfoIndex = 6;
5001 static const int kFirstDeoptEntryIndex = 7;
4941 5002
4942 // Offsets of deopt entry elements relative to the start of the entry. 5003 // Offsets of deopt entry elements relative to the start of the entry.
4943 static const int kAstIdRawOffset = 0; 5004 static const int kAstIdRawOffset = 0;
4944 static const int kTranslationIndexOffset = 1; 5005 static const int kTranslationIndexOffset = 1;
4945 static const int kArgumentsStackHeightOffset = 2; 5006 static const int kArgumentsStackHeightOffset = 2;
4946 static const int kPcOffset = 3; 5007 static const int kPcOffset = 3;
4947 static const int kDeoptEntrySize = 4; 5008 static const int kDeoptEntrySize = 4;
4948 5009
4949 // Simple element accessors. 5010 // Simple element accessors.
4950 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ 5011 #define DEFINE_ELEMENT_ACCESSORS(name, type) \
4951 type* name() { \ 5012 type* name() { \
4952 return type::cast(get(k##name##Index)); \ 5013 return type::cast(get(k##name##Index)); \
4953 } \ 5014 } \
4954 void Set##name(type* value) { \ 5015 void Set##name(type* value) { \
4955 set(k##name##Index, value); \ 5016 set(k##name##Index, value); \
4956 } 5017 }
4957 5018
4958 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) 5019 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray)
4959 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) 5020 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi)
4960 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) 5021 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray)
4961 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) 5022 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi)
4962 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) 5023 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi)
5024 DEFINE_ELEMENT_ACCESSORS(OptimizationId, Smi)
5025 DEFINE_ELEMENT_ACCESSORS(SharedFunctionInfo, Object)
4963 5026
4964 #undef DEFINE_ELEMENT_ACCESSORS 5027 #undef DEFINE_ELEMENT_ACCESSORS
4965 5028
4966 // Accessors for elements of the ith deoptimization entry. 5029 // Accessors for elements of the ith deoptimization entry.
4967 #define DEFINE_ENTRY_ACCESSORS(name, type) \ 5030 #define DEFINE_ENTRY_ACCESSORS(name, type) \
4968 type* name(int i) { \ 5031 type* name(int i) { \
4969 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ 5032 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \
4970 } \ 5033 } \
4971 void Set##name(int i, type* value) { \ 5034 void Set##name(int i, type* value) { \
4972 set(IndexForEntry(i) + k##name##Offset, value); \ 5035 set(IndexForEntry(i) + k##name##Offset, value); \
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5048 5111
5049 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) 5112 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
5050 void DeoptimizationOutputDataPrint(FILE* out); 5113 void DeoptimizationOutputDataPrint(FILE* out);
5051 #endif 5114 #endif
5052 }; 5115 };
5053 5116
5054 5117
5055 // Forward declaration. 5118 // Forward declaration.
5056 class Cell; 5119 class Cell;
5057 class PropertyCell; 5120 class PropertyCell;
5058
5059 // TypeFeedbackCells is a fixed array used to hold the association between
5060 // cache cells and AST ids for code generated by the full compiler.
5061 // The format of the these objects is
5062 // [i * 2]: Global property cell of ith cache cell.
5063 // [i * 2 + 1]: Ast ID for ith cache cell.
5064 class TypeFeedbackCells: public FixedArray {
5065 public:
5066 int CellCount() { return length() / 2; }
5067 static int LengthOfFixedArray(int cell_count) { return cell_count * 2; }
5068
5069 // Accessors for AST ids associated with cache values.
5070 inline TypeFeedbackId AstId(int index);
5071 inline void SetAstId(int index, TypeFeedbackId id);
5072
5073 // Accessors for global property cells holding the cache values.
5074 inline Cell* GetCell(int index);
5075 inline void SetCell(int index, Cell* cell);
5076
5077 // The object that indicates an uninitialized cache.
5078 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
5079
5080 // The object that indicates a megamorphic state.
5081 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
5082
5083 // The object that indicates a monomorphic state of Array with
5084 // ElementsKind
5085 static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
5086 ElementsKind elements_kind);
5087
5088 // A raw version of the uninitialized sentinel that's safe to read during
5089 // garbage collection (e.g., for patching the cache).
5090 static inline Object* RawUninitializedSentinel(Heap* heap);
5091
5092 // Casting.
5093 static inline TypeFeedbackCells* cast(Object* obj);
5094
5095 static const int kForInFastCaseMarker = 0;
5096 static const int kForInSlowCaseMarker = 1;
5097 };
5098
5099
5100 // Forward declaration.
5101 class SafepointEntry; 5121 class SafepointEntry;
5102 class TypeFeedbackInfo; 5122 class TypeFeedbackInfo;
5103 5123
5104 // Code describes objects with on-the-fly generated machine code. 5124 // Code describes objects with on-the-fly generated machine code.
5105 class Code: public HeapObject { 5125 class Code: public HeapObject {
5106 public: 5126 public:
5107 // Opaque data type for encapsulating code flags like kind, inline 5127 // Opaque data type for encapsulating code flags like kind, inline
5108 // cache state, and arguments count. 5128 // cache state, and arguments count.
5109 typedef uint32_t Flags; 5129 typedef uint32_t Flags;
5110 5130
5111 #define NON_IC_KIND_LIST(V) \ 5131 #define NON_IC_KIND_LIST(V) \
5112 V(FUNCTION) \ 5132 V(FUNCTION) \
5113 V(OPTIMIZED_FUNCTION) \ 5133 V(OPTIMIZED_FUNCTION) \
5114 V(STUB) \ 5134 V(STUB) \
5115 V(HANDLER) \ 5135 V(HANDLER) \
5116 V(BUILTIN) \ 5136 V(BUILTIN) \
5117 V(REGEXP) 5137 V(REGEXP)
5118 5138
5119 #define IC_KIND_LIST(V) \ 5139 #define IC_KIND_LIST(V) \
5120 V(LOAD_IC) \ 5140 V(LOAD_IC) \
5121 V(KEYED_LOAD_IC) \ 5141 V(KEYED_LOAD_IC) \
5122 V(CALL_IC) \
5123 V(KEYED_CALL_IC) \
5124 V(STORE_IC) \ 5142 V(STORE_IC) \
5125 V(KEYED_STORE_IC) \ 5143 V(KEYED_STORE_IC) \
5126 V(BINARY_OP_IC) \ 5144 V(BINARY_OP_IC) \
5127 V(COMPARE_IC) \ 5145 V(COMPARE_IC) \
5128 V(COMPARE_NIL_IC) \ 5146 V(COMPARE_NIL_IC) \
5129 V(TO_BOOLEAN_IC) 5147 V(TO_BOOLEAN_IC)
5130 5148
5131 #define CODE_KIND_LIST(V) \ 5149 #define CODE_KIND_LIST(V) \
5132 NON_IC_KIND_LIST(V) \ 5150 NON_IC_KIND_LIST(V) \
5133 IC_KIND_LIST(V) 5151 IC_KIND_LIST(V)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
5211 inline ByteArray* unchecked_relocation_info(); 5229 inline ByteArray* unchecked_relocation_info();
5212 5230
5213 inline int relocation_size(); 5231 inline int relocation_size();
5214 5232
5215 // [flags]: Various code flags. 5233 // [flags]: Various code flags.
5216 inline Flags flags(); 5234 inline Flags flags();
5217 inline void set_flags(Flags flags); 5235 inline void set_flags(Flags flags);
5218 5236
5219 // [flags]: Access to specific code flags. 5237 // [flags]: Access to specific code flags.
5220 inline Kind kind(); 5238 inline Kind kind();
5221 inline Kind handler_kind() {
5222 return static_cast<Kind>(arguments_count());
5223 }
5224 inline InlineCacheState ic_state(); // Only valid for IC stubs. 5239 inline InlineCacheState ic_state(); // Only valid for IC stubs.
5225 inline ExtraICState extra_ic_state(); // Only valid for IC stubs. 5240 inline ExtraICState extra_ic_state(); // Only valid for IC stubs.
5226 5241
5227 inline ExtraICState extended_extra_ic_state(); // Only valid for
5228 // non-call IC stubs.
5229 static bool needs_extended_extra_ic_state(Kind kind) {
5230 // TODO(danno): This is a bit of a hack right now since there are still
5231 // clients of this API that pass "extra" values in for argc. These clients
5232 // should be retrofitted to used ExtendedExtraICState.
5233 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC ||
5234 kind == BINARY_OP_IC;
5235 }
5236
5237 inline StubType type(); // Only valid for monomorphic IC stubs. 5242 inline StubType type(); // Only valid for monomorphic IC stubs.
5238 inline int arguments_count(); // Only valid for call IC stubs.
5239 5243
5240 // Testers for IC stub kinds. 5244 // Testers for IC stub kinds.
5241 inline bool is_inline_cache_stub(); 5245 inline bool is_inline_cache_stub();
5242 inline bool is_debug_stub(); 5246 inline bool is_debug_stub();
5243 inline bool is_handler() { return kind() == HANDLER; } 5247 inline bool is_handler() { return kind() == HANDLER; }
5244 inline bool is_load_stub() { return kind() == LOAD_IC; } 5248 inline bool is_load_stub() { return kind() == LOAD_IC; }
5245 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 5249 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
5246 inline bool is_store_stub() { return kind() == STORE_IC; } 5250 inline bool is_store_stub() { return kind() == STORE_IC; }
5247 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 5251 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
5248 inline bool is_call_stub() { return kind() == CALL_IC; }
5249 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
5250 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } 5252 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; }
5251 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 5253 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
5252 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } 5254 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; }
5253 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 5255 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
5254 inline bool is_keyed_stub(); 5256 inline bool is_keyed_stub();
5257 inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
5255 5258
5256 inline void set_raw_kind_specific_flags1(int value); 5259 inline void set_raw_kind_specific_flags1(int value);
5257 inline void set_raw_kind_specific_flags2(int value); 5260 inline void set_raw_kind_specific_flags2(int value);
5258 5261
5259 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 5262 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
5260 inline int major_key(); 5263 inline int major_key();
5261 inline void set_major_key(int value); 5264 inline void set_major_key(int value);
5262 inline bool has_major_key(); 5265 inline bool has_major_key();
5263 5266
5264 // For kind STUB or ICs, tells whether or not a code object was generated by 5267 // For kind STUB or ICs, tells whether or not a code object was generated by
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
5308 inline void set_safepoint_table_offset(unsigned offset); 5311 inline void set_safepoint_table_offset(unsigned offset);
5309 5312
5310 // [back_edge_table_start]: For kind FUNCTION, the offset in the 5313 // [back_edge_table_start]: For kind FUNCTION, the offset in the
5311 // instruction stream where the back edge table starts. 5314 // instruction stream where the back edge table starts.
5312 inline unsigned back_edge_table_offset(); 5315 inline unsigned back_edge_table_offset();
5313 inline void set_back_edge_table_offset(unsigned offset); 5316 inline void set_back_edge_table_offset(unsigned offset);
5314 5317
5315 inline bool back_edges_patched_for_osr(); 5318 inline bool back_edges_patched_for_osr();
5316 inline void set_back_edges_patched_for_osr(bool value); 5319 inline void set_back_edges_patched_for_osr(bool value);
5317 5320
5318 // [check type]: For kind CALL_IC, tells how to check if the
5319 // receiver is valid for the given call.
5320 inline CheckType check_type();
5321 inline void set_check_type(CheckType value);
5322
5323 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 5321 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
5324 inline byte to_boolean_state(); 5322 inline byte to_boolean_state();
5325 5323
5326 // [has_function_cache]: For kind STUB tells whether there is a function 5324 // [has_function_cache]: For kind STUB tells whether there is a function
5327 // cache is passed to the stub. 5325 // cache is passed to the stub.
5328 inline bool has_function_cache(); 5326 inline bool has_function_cache();
5329 inline void set_has_function_cache(bool flag); 5327 inline void set_has_function_cache(bool flag);
5330 5328
5331 5329
5332 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether 5330 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5374 // which would make snapshot production non-reproducible. This method wipes 5372 // which would make snapshot production non-reproducible. This method wipes
5375 // out the to-be-overwritten header data for reproducible snapshots. 5373 // out the to-be-overwritten header data for reproducible snapshots.
5376 inline void WipeOutHeader(); 5374 inline void WipeOutHeader();
5377 5375
5378 // Flags operations. 5376 // Flags operations.
5379 static inline Flags ComputeFlags( 5377 static inline Flags ComputeFlags(
5380 Kind kind, 5378 Kind kind,
5381 InlineCacheState ic_state = UNINITIALIZED, 5379 InlineCacheState ic_state = UNINITIALIZED,
5382 ExtraICState extra_ic_state = kNoExtraICState, 5380 ExtraICState extra_ic_state = kNoExtraICState,
5383 StubType type = NORMAL, 5381 StubType type = NORMAL,
5384 int argc = -1,
5385 InlineCacheHolderFlag holder = OWN_MAP); 5382 InlineCacheHolderFlag holder = OWN_MAP);
5386 5383
5387 static inline Flags ComputeMonomorphicFlags( 5384 static inline Flags ComputeMonomorphicFlags(
5388 Kind kind, 5385 Kind kind,
5389 ExtraICState extra_ic_state = kNoExtraICState, 5386 ExtraICState extra_ic_state = kNoExtraICState,
5390 InlineCacheHolderFlag holder = OWN_MAP, 5387 InlineCacheHolderFlag holder = OWN_MAP,
5388 StubType type = NORMAL);
5389
5390 static inline Flags ComputeHandlerFlags(
5391 Kind handler_kind,
5391 StubType type = NORMAL, 5392 StubType type = NORMAL,
5392 int argc = -1); 5393 InlineCacheHolderFlag holder = OWN_MAP);
5393 5394
5394 static inline InlineCacheState ExtractICStateFromFlags(Flags flags); 5395 static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
5395 static inline StubType ExtractTypeFromFlags(Flags flags); 5396 static inline StubType ExtractTypeFromFlags(Flags flags);
5396 static inline Kind ExtractKindFromFlags(Flags flags); 5397 static inline Kind ExtractKindFromFlags(Flags flags);
5397 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags); 5398 static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
5398 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags); 5399 static inline ExtraICState ExtractExtraICStateFromFlags(Flags flags);
5399 static inline ExtraICState ExtractExtendedExtraICStateFromFlags(Flags flags);
5400 static inline int ExtractArgumentsCountFromFlags(Flags flags);
5401 5400
5402 static inline Flags RemoveTypeFromFlags(Flags flags); 5401 static inline Flags RemoveTypeFromFlags(Flags flags);
5403 5402
5404 // Convert a target address into a code object. 5403 // Convert a target address into a code object.
5405 static inline Code* GetCodeFromTargetAddress(Address address); 5404 static inline Code* GetCodeFromTargetAddress(Address address);
5406 5405
5407 // Convert an entry address into an object. 5406 // Convert an entry address into an object.
5408 static inline Object* GetObjectFromEntryAddress(Address location_of_address); 5407 static inline Object* GetObjectFromEntryAddress(Address location_of_address);
5409 5408
5410 // Returns the address of the first instruction. 5409 // Returns the address of the first instruction.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
5460 5459
5461 template<typename StaticVisitor> 5460 template<typename StaticVisitor>
5462 inline void CodeIterateBody(Heap* heap); 5461 inline void CodeIterateBody(Heap* heap);
5463 5462
5464 DECLARE_PRINTER(Code) 5463 DECLARE_PRINTER(Code)
5465 DECLARE_VERIFIER(Code) 5464 DECLARE_VERIFIER(Code)
5466 5465
5467 void ClearInlineCaches(); 5466 void ClearInlineCaches();
5468 void ClearInlineCaches(Kind kind); 5467 void ClearInlineCaches(Kind kind);
5469 5468
5470 void ClearTypeFeedbackCells(Heap* heap); 5469 void ClearTypeFeedbackInfo(Heap* heap);
5471 5470
5472 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); 5471 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5473 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); 5472 uint32_t TranslateAstIdToPcOffset(BailoutId ast_id);
5474 5473
5475 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, 5474 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5476 enum Age { 5475 enum Age {
5477 kNotExecutedCodeAge = -2, 5476 kNotExecutedCodeAge = -2,
5478 kExecutedOnceCodeAge = -1, 5477 kExecutedOnceCodeAge = -1,
5479 kNoAgeCodeAge = 0, 5478 kNoAgeCodeAge = 0,
5480 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) 5479 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM)
(...skipping 23 matching lines...) Expand all
5504 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); 5503 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5505 } 5504 }
5506 5505
5507 void PrintDeoptLocation(FILE* out, int bailout_id); 5506 void PrintDeoptLocation(FILE* out, int bailout_id);
5508 bool CanDeoptAt(Address pc); 5507 bool CanDeoptAt(Address pc);
5509 5508
5510 #ifdef VERIFY_HEAP 5509 #ifdef VERIFY_HEAP
5511 void VerifyEmbeddedObjectsDependency(); 5510 void VerifyEmbeddedObjectsDependency();
5512 #endif 5511 #endif
5513 5512
5514 static bool IsWeakEmbeddedObject(Kind kind, Object* object); 5513 inline bool IsWeakObject(Object* object) {
5514 return is_optimized_code() && IsWeakObjectInOptimizedCode(object);
5515 }
5516
5517 inline bool IsWeakObjectInOptimizedCode(Object* object);
5515 5518
5516 // Max loop nesting marker used to postpose OSR. We don't take loop 5519 // Max loop nesting marker used to postpose OSR. We don't take loop
5517 // nesting that is deeper than 5 levels into account. 5520 // nesting that is deeper than 5 levels into account.
5518 static const int kMaxLoopNestingMarker = 6; 5521 static const int kMaxLoopNestingMarker = 6;
5519 5522
5520 // Layout description. 5523 // Layout description.
5521 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 5524 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
5522 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 5525 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
5523 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 5526 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
5524 static const int kDeoptimizationDataOffset = 5527 static const int kDeoptimizationDataOffset =
(...skipping 14 matching lines...) Expand all
5539 5542
5540 static const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize; 5543 static const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize;
5541 5544
5542 // Add padding to align the instruction start following right after 5545 // Add padding to align the instruction start following right after
5543 // the Code object header. 5546 // the Code object header.
5544 static const int kHeaderSize = 5547 static const int kHeaderSize =
5545 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; 5548 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask;
5546 5549
5547 // Byte offsets within kKindSpecificFlags1Offset. 5550 // Byte offsets within kKindSpecificFlags1Offset.
5548 static const int kOptimizableOffset = kKindSpecificFlags1Offset; 5551 static const int kOptimizableOffset = kKindSpecificFlags1Offset;
5549 static const int kCheckTypeOffset = kKindSpecificFlags1Offset;
5550 5552
5551 static const int kFullCodeFlags = kOptimizableOffset + 1; 5553 static const int kFullCodeFlags = kOptimizableOffset + 1;
5552 class FullCodeFlagsHasDeoptimizationSupportField: 5554 class FullCodeFlagsHasDeoptimizationSupportField:
5553 public BitField<bool, 0, 1> {}; // NOLINT 5555 public BitField<bool, 0, 1> {}; // NOLINT
5554 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; 5556 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {};
5555 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; 5557 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {};
5556 5558
5557 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1; 5559 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1;
5558 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1; 5560 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1;
5559 5561
5560 // Flags layout. BitField<type, shift, size>. 5562 // Flags layout. BitField<type, shift, size>.
5561 class ICStateField: public BitField<InlineCacheState, 0, 3> {}; 5563 class ICStateField: public BitField<InlineCacheState, 0, 3> {};
5562 class TypeField: public BitField<StubType, 3, 1> {}; 5564 class TypeField: public BitField<StubType, 3, 1> {};
5563 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {}; 5565 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
5564 class KindField: public BitField<Kind, 6, 4> {}; 5566 class KindField: public BitField<Kind, 6, 4> {};
5565 // TODO(bmeurer): Bit 10 is available for free use. :-) 5567 // TODO(bmeurer): Bit 10 is available for free use. :-)
5566 class ExtraICStateField: public BitField<ExtraICState, 11, 6> {}; 5568 class ExtraICStateField: public BitField<ExtraICState, 11,
5567 class ExtendedExtraICStateField: public BitField<ExtraICState, 11,
5568 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT 5569 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
5569 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift);
5570 5570
5571 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) 5571 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
5572 static const int kStackSlotsFirstBit = 0; 5572 static const int kStackSlotsFirstBit = 0;
5573 static const int kStackSlotsBitCount = 24; 5573 static const int kStackSlotsBitCount = 24;
5574 static const int kHasFunctionCacheFirstBit = 5574 static const int kHasFunctionCacheFirstBit =
5575 kStackSlotsFirstBit + kStackSlotsBitCount; 5575 kStackSlotsFirstBit + kStackSlotsBitCount;
5576 static const int kHasFunctionCacheBitCount = 1; 5576 static const int kHasFunctionCacheBitCount = 1;
5577 static const int kMarkedForDeoptimizationFirstBit = 5577 static const int kMarkedForDeoptimizationFirstBit =
5578 kStackSlotsFirstBit + kStackSlotsBitCount + 1; 5578 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5579 static const int kMarkedForDeoptimizationBitCount = 1; 5579 static const int kMarkedForDeoptimizationBitCount = 1;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5613 kSafepointTableOffsetBitCount> {}; // NOLINT 5613 kSafepointTableOffsetBitCount> {}; // NOLINT
5614 class StubMajorKeyField: public BitField<int, 5614 class StubMajorKeyField: public BitField<int,
5615 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT 5615 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
5616 5616
5617 // KindSpecificFlags2 layout (FUNCTION) 5617 // KindSpecificFlags2 layout (FUNCTION)
5618 class BackEdgeTableOffsetField: public BitField<int, 5618 class BackEdgeTableOffsetField: public BitField<int,
5619 kIsCrankshaftedBit + 1, 29> {}; // NOLINT 5619 kIsCrankshaftedBit + 1, 29> {}; // NOLINT
5620 class BackEdgesPatchedForOSRField: public BitField<bool, 5620 class BackEdgesPatchedForOSRField: public BitField<bool,
5621 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT 5621 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT
5622 5622
5623 // Signed field cannot be encoded using the BitField class. 5623 static const int kArgumentsBits = 16;
5624 static const int kArgumentsCountShift = 17;
5625 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
5626 static const int kArgumentsBits =
5627 PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
5628 static const int kMaxArguments = (1 << kArgumentsBits) - 1; 5624 static const int kMaxArguments = (1 << kArgumentsBits) - 1;
5629 5625
5630 // ICs can use either argument count or ExtendedExtraIC, since their storage
5631 // overlaps.
5632 STATIC_ASSERT(ExtraICStateField::kShift +
5633 ExtraICStateField::kSize + kArgumentsBits ==
5634 ExtendedExtraICStateField::kShift +
5635 ExtendedExtraICStateField::kSize);
5636
5637 // This constant should be encodable in an ARM instruction. 5626 // This constant should be encodable in an ARM instruction.
5638 static const int kFlagsNotUsedInLookup = 5627 static const int kFlagsNotUsedInLookup =
5639 TypeField::kMask | CacheHolderField::kMask; 5628 TypeField::kMask | CacheHolderField::kMask;
5640 5629
5641 private: 5630 private:
5642 friend class RelocIterator; 5631 friend class RelocIterator;
5632 friend class Deoptimizer; // For FindCodeAgeSequence.
5643 5633
5644 void ClearInlineCaches(Kind* kind); 5634 void ClearInlineCaches(Kind* kind);
5645 5635
5646 // Code aging 5636 // Code aging
5647 byte* FindCodeAgeSequence(); 5637 byte* FindCodeAgeSequence();
5648 static void GetCodeAgeAndParity(Code* code, Age* age, 5638 static void GetCodeAgeAndParity(Code* code, Age* age,
5649 MarkingParity* parity); 5639 MarkingParity* parity);
5650 static void GetCodeAgeAndParity(byte* sequence, Age* age, 5640 static void GetCodeAgeAndParity(byte* sequence, Age* age,
5651 MarkingParity* parity); 5641 MarkingParity* parity);
5652 static Code* GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity parity); 5642 static Code* GetCodeAgeStub(Isolate* isolate, Age age, MarkingParity parity);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
5970 inline void ClearTransitions(Heap* heap, 5960 inline void ClearTransitions(Heap* heap,
5971 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 5961 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
5972 5962
5973 void DeprecateTransitionTree(); 5963 void DeprecateTransitionTree();
5974 void DeprecateTarget(Name* key, DescriptorArray* new_descriptors); 5964 void DeprecateTarget(Name* key, DescriptorArray* new_descriptors);
5975 5965
5976 Map* FindRootMap(); 5966 Map* FindRootMap();
5977 Map* FindUpdatedMap(int verbatim, int length, DescriptorArray* descriptors); 5967 Map* FindUpdatedMap(int verbatim, int length, DescriptorArray* descriptors);
5978 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors); 5968 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
5979 5969
5970 inline int GetInObjectPropertyOffset(int index);
5971
5980 int NumberOfFields(); 5972 int NumberOfFields();
5981 5973
5982 bool InstancesNeedRewriting(Map* target, 5974 bool InstancesNeedRewriting(Map* target,
5983 int target_number_of_fields, 5975 int target_number_of_fields,
5984 int target_inobject, 5976 int target_inobject,
5985 int target_unused); 5977 int target_unused);
5986 static Handle<Map> GeneralizeAllFieldRepresentations( 5978 static Handle<Map> GeneralizeAllFieldRepresentations(
5987 Handle<Map> map, 5979 Handle<Map> map,
5988 Representation new_representation); 5980 Representation new_representation);
5989 static Handle<Map> GeneralizeRepresentation( 5981 static Handle<Map> GeneralizeRepresentation(
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
6102 // with the given holder if the name is found. The holder may be 6094 // with the given holder if the name is found. The holder may be
6103 // NULL when this function is used from the compiler. 6095 // NULL when this function is used from the compiler.
6104 inline void LookupDescriptor(JSObject* holder, 6096 inline void LookupDescriptor(JSObject* holder,
6105 Name* name, 6097 Name* name,
6106 LookupResult* result); 6098 LookupResult* result);
6107 6099
6108 inline void LookupTransition(JSObject* holder, 6100 inline void LookupTransition(JSObject* holder,
6109 Name* name, 6101 Name* name,
6110 LookupResult* result); 6102 LookupResult* result);
6111 6103
6104 inline PropertyDetails GetLastDescriptorDetails();
6105
6112 // The size of transition arrays are limited so they do not end up in large 6106 // The size of transition arrays are limited so they do not end up in large
6113 // object space. Otherwise ClearNonLiveTransitions would leak memory while 6107 // object space. Otherwise ClearNonLiveTransitions would leak memory while
6114 // applying in-place right trimming. 6108 // applying in-place right trimming.
6115 inline bool CanHaveMoreTransitions(); 6109 inline bool CanHaveMoreTransitions();
6116 6110
6117 int LastAdded() { 6111 int LastAdded() {
6118 int number_of_own_descriptors = NumberOfOwnDescriptors(); 6112 int number_of_own_descriptors = NumberOfOwnDescriptors();
6119 ASSERT(number_of_own_descriptors > 0); 6113 ASSERT(number_of_own_descriptors > 0);
6120 return number_of_own_descriptors - 1; 6114 return number_of_own_descriptors - 1;
6121 } 6115 }
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
6628 V(Math, imul, MathImul) 6622 V(Math, imul, MathImul)
6629 6623
6630 enum BuiltinFunctionId { 6624 enum BuiltinFunctionId {
6631 kArrayCode, 6625 kArrayCode,
6632 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ 6626 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \
6633 k##name, 6627 k##name,
6634 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) 6628 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID)
6635 #undef DECLARE_FUNCTION_ID 6629 #undef DECLARE_FUNCTION_ID
6636 // Fake id for a special case of Math.pow. Note, it continues the 6630 // Fake id for a special case of Math.pow. Note, it continues the
6637 // list of math functions. 6631 // list of math functions.
6638 kMathPowHalf 6632 kMathPowHalf,
6633 // Installed only on --harmony-maths.
6634 kMathClz32
6639 }; 6635 };
6640 6636
6641 6637
6642 // SharedFunctionInfo describes the JSFunction information that can be 6638 // SharedFunctionInfo describes the JSFunction information that can be
6643 // shared by multiple instances of the function. 6639 // shared by multiple instances of the function.
6644 class SharedFunctionInfo: public HeapObject { 6640 class SharedFunctionInfo: public HeapObject {
6645 public: 6641 public:
6646 // [name]: Function name. 6642 // [name]: Function name.
6647 DECL_ACCESSORS(name, Object) 6643 DECL_ACCESSORS(name, Object)
6648 6644
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
7384 7380
7385 // Tells whether or not this function can be optimized. 7381 // Tells whether or not this function can be optimized.
7386 inline bool IsOptimizable(); 7382 inline bool IsOptimizable();
7387 7383
7388 // Mark this function for lazy recompilation. The function will be 7384 // Mark this function for lazy recompilation. The function will be
7389 // recompiled the next time it is executed. 7385 // recompiled the next time it is executed.
7390 void MarkForOptimization(); 7386 void MarkForOptimization();
7391 void MarkForConcurrentOptimization(); 7387 void MarkForConcurrentOptimization();
7392 void MarkInOptimizationQueue(); 7388 void MarkInOptimizationQueue();
7393 7389
7394 static bool CompileOptimized(Handle<JSFunction> function,
7395 ClearExceptionFlag flag);
7396
7397 // Tells whether or not the function is already marked for lazy 7390 // Tells whether or not the function is already marked for lazy
7398 // recompilation. 7391 // recompilation.
7399 inline bool IsMarkedForOptimization(); 7392 inline bool IsMarkedForOptimization();
7400 inline bool IsMarkedForConcurrentOptimization(); 7393 inline bool IsMarkedForConcurrentOptimization();
7401 7394
7402 // Tells whether or not the function is on the concurrent recompilation queue. 7395 // Tells whether or not the function is on the concurrent recompilation queue.
7403 inline bool IsInOptimizationQueue(); 7396 inline bool IsInOptimizationQueue();
7404 7397
7405 // [literals_or_bindings]: Fixed array holding either 7398 // [literals_or_bindings]: Fixed array holding either
7406 // the materialized literals or the bindings of a bound function. 7399 // the materialized literals or the bindings of a bound function.
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
7788 public: 7781 public:
7789 // [type]: the type of error message. 7782 // [type]: the type of error message.
7790 DECL_ACCESSORS(type, String) 7783 DECL_ACCESSORS(type, String)
7791 7784
7792 // [arguments]: the arguments for formatting the error message. 7785 // [arguments]: the arguments for formatting the error message.
7793 DECL_ACCESSORS(arguments, JSArray) 7786 DECL_ACCESSORS(arguments, JSArray)
7794 7787
7795 // [script]: the script from which the error message originated. 7788 // [script]: the script from which the error message originated.
7796 DECL_ACCESSORS(script, Object) 7789 DECL_ACCESSORS(script, Object)
7797 7790
7798 // [stack_trace]: the stack trace for this error message.
7799 DECL_ACCESSORS(stack_trace, Object)
7800
7801 // [stack_frames]: an array of stack frames for this error object. 7791 // [stack_frames]: an array of stack frames for this error object.
7802 DECL_ACCESSORS(stack_frames, Object) 7792 DECL_ACCESSORS(stack_frames, Object)
7803 7793
7804 // [start_position]: the start position in the script for the error message. 7794 // [start_position]: the start position in the script for the error message.
7805 inline int start_position(); 7795 inline int start_position();
7806 inline void set_start_position(int value); 7796 inline void set_start_position(int value);
7807 7797
7808 // [end_position]: the end position in the script for the error message. 7798 // [end_position]: the end position in the script for the error message.
7809 inline int end_position(); 7799 inline int end_position();
7810 inline void set_end_position(int value); 7800 inline void set_end_position(int value);
7811 7801
7812 // Casting. 7802 // Casting.
7813 static inline JSMessageObject* cast(Object* obj); 7803 static inline JSMessageObject* cast(Object* obj);
7814 7804
7815 // Dispatched behavior. 7805 // Dispatched behavior.
7816 DECLARE_PRINTER(JSMessageObject) 7806 DECLARE_PRINTER(JSMessageObject)
7817 DECLARE_VERIFIER(JSMessageObject) 7807 DECLARE_VERIFIER(JSMessageObject)
7818 7808
7819 // Layout description. 7809 // Layout description.
7820 static const int kTypeOffset = JSObject::kHeaderSize; 7810 static const int kTypeOffset = JSObject::kHeaderSize;
7821 static const int kArgumentsOffset = kTypeOffset + kPointerSize; 7811 static const int kArgumentsOffset = kTypeOffset + kPointerSize;
7822 static const int kScriptOffset = kArgumentsOffset + kPointerSize; 7812 static const int kScriptOffset = kArgumentsOffset + kPointerSize;
7823 static const int kStackTraceOffset = kScriptOffset + kPointerSize; 7813 static const int kStackFramesOffset = kScriptOffset + kPointerSize;
7824 static const int kStackFramesOffset = kStackTraceOffset + kPointerSize;
7825 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize; 7814 static const int kStartPositionOffset = kStackFramesOffset + kPointerSize;
7826 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize; 7815 static const int kEndPositionOffset = kStartPositionOffset + kPointerSize;
7827 static const int kSize = kEndPositionOffset + kPointerSize; 7816 static const int kSize = kEndPositionOffset + kPointerSize;
7828 7817
7829 typedef FixedBodyDescriptor<HeapObject::kMapOffset, 7818 typedef FixedBodyDescriptor<HeapObject::kMapOffset,
7830 kStackFramesOffset + kPointerSize, 7819 kStackFramesOffset + kPointerSize,
7831 kSize> BodyDescriptor; 7820 kSize> BodyDescriptor;
7832 }; 7821 };
7833 7822
7834 7823
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
8173 inline void change_ic_with_type_info_count(int count); 8162 inline void change_ic_with_type_info_count(int count);
8174 8163
8175 inline void initialize_storage(); 8164 inline void initialize_storage();
8176 8165
8177 inline void change_own_type_change_checksum(); 8166 inline void change_own_type_change_checksum();
8178 inline int own_type_change_checksum(); 8167 inline int own_type_change_checksum();
8179 8168
8180 inline void set_inlined_type_change_checksum(int checksum); 8169 inline void set_inlined_type_change_checksum(int checksum);
8181 inline bool matches_inlined_type_change_checksum(int checksum); 8170 inline bool matches_inlined_type_change_checksum(int checksum);
8182 8171
8183 DECL_ACCESSORS(type_feedback_cells, TypeFeedbackCells) 8172 DECL_ACCESSORS(feedback_vector, FixedArray)
8184 8173
8185 static inline TypeFeedbackInfo* cast(Object* obj); 8174 static inline TypeFeedbackInfo* cast(Object* obj);
8186 8175
8187 // Dispatched behavior. 8176 // Dispatched behavior.
8188 DECLARE_PRINTER(TypeFeedbackInfo) 8177 DECLARE_PRINTER(TypeFeedbackInfo)
8189 DECLARE_VERIFIER(TypeFeedbackInfo) 8178 DECLARE_VERIFIER(TypeFeedbackInfo)
8190 8179
8191 static const int kStorage1Offset = HeapObject::kHeaderSize; 8180 static const int kStorage1Offset = HeapObject::kHeaderSize;
8192 static const int kStorage2Offset = kStorage1Offset + kPointerSize; 8181 static const int kStorage2Offset = kStorage1Offset + kPointerSize;
8193 static const int kTypeFeedbackCellsOffset = kStorage2Offset + kPointerSize; 8182 static const int kFeedbackVectorOffset =
8194 static const int kSize = kTypeFeedbackCellsOffset + kPointerSize; 8183 kStorage2Offset + kPointerSize;
8184 static const int kSize = kFeedbackVectorOffset + kPointerSize;
8185
8186 // The object that indicates an uninitialized cache.
8187 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
8188
8189 // The object that indicates a megamorphic state.
8190 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
8191
8192 // The object that indicates a monomorphic state of Array with
8193 // ElementsKind
8194 static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
8195 ElementsKind elements_kind);
8196
8197 // A raw version of the uninitialized sentinel that's safe to read during
8198 // garbage collection (e.g., for patching the cache).
8199 static inline Object* RawUninitializedSentinel(Heap* heap);
8200
8201 static const int kForInFastCaseMarker = 0;
8202 static const int kForInSlowCaseMarker = 1;
8195 8203
8196 private: 8204 private:
8197 static const int kTypeChangeChecksumBits = 7; 8205 static const int kTypeChangeChecksumBits = 7;
8198 8206
8199 class ICTotalCountField: public BitField<int, 0, 8207 class ICTotalCountField: public BitField<int, 0,
8200 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT 8208 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT
8201 class OwnTypeChangeChecksum: public BitField<int, 8209 class OwnTypeChangeChecksum: public BitField<int,
8202 kSmiValueSize - kTypeChangeChecksumBits, 8210 kSmiValueSize - kTypeChangeChecksumBits,
8203 kTypeChangeChecksumBits> {}; // NOLINT 8211 kTypeChangeChecksumBits> {}; // NOLINT
8204 class ICsWithTypeInfoCountField: public BitField<int, 0, 8212 class ICsWithTypeInfoCountField: public BitField<int, 0,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
8247 8255
8248 // This method is expensive, it should only be called for reporting. 8256 // This method is expensive, it should only be called for reporting.
8249 bool IsNestedSite(); 8257 bool IsNestedSite();
8250 8258
8251 // transition_info bitfields, for constructed array transition info. 8259 // transition_info bitfields, for constructed array transition info.
8252 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; 8260 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {};
8253 class UnusedBits: public BitField<int, 15, 14> {}; 8261 class UnusedBits: public BitField<int, 15, 14> {};
8254 class DoNotInlineBit: public BitField<bool, 29, 1> {}; 8262 class DoNotInlineBit: public BitField<bool, 29, 1> {};
8255 8263
8256 // Bitfields for pretenure_data 8264 // Bitfields for pretenure_data
8257 class MementoFoundCountBits: public BitField<int, 0, 28> {}; 8265 class MementoFoundCountBits: public BitField<int, 0, 27> {};
8258 class PretenureDecisionBits: public BitField<PretenureDecision, 28, 2> {}; 8266 class PretenureDecisionBits: public BitField<PretenureDecision, 27, 2> {};
8267 class DeoptDependentCodeBit: public BitField<bool, 29, 1> {};
8259 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); 8268 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue);
8260 8269
8261 // Increments the mementos found counter and returns true when the first 8270 // Increments the mementos found counter and returns true when the first
8262 // memento was found for a given allocation site. 8271 // memento was found for a given allocation site.
8263 inline bool IncrementMementoFoundCount(); 8272 inline bool IncrementMementoFoundCount();
8264 8273
8265 inline void IncrementMementoCreateCount(); 8274 inline void IncrementMementoCreateCount();
8266 8275
8267 PretenureFlag GetPretenureMode(); 8276 PretenureFlag GetPretenureMode();
8268 8277
8269 void ResetPretenureDecision(); 8278 void ResetPretenureDecision();
8270 8279
8271 PretenureDecision pretenure_decision() { 8280 PretenureDecision pretenure_decision() {
8272 int value = pretenure_data()->value(); 8281 int value = pretenure_data()->value();
8273 return PretenureDecisionBits::decode(value); 8282 return PretenureDecisionBits::decode(value);
8274 } 8283 }
8275 8284
8276 void set_pretenure_decision(PretenureDecision decision) { 8285 void set_pretenure_decision(PretenureDecision decision) {
8277 int value = pretenure_data()->value(); 8286 int value = pretenure_data()->value();
8278 set_pretenure_data( 8287 set_pretenure_data(
8279 Smi::FromInt(PretenureDecisionBits::update(value, decision)), 8288 Smi::FromInt(PretenureDecisionBits::update(value, decision)),
8280 SKIP_WRITE_BARRIER); 8289 SKIP_WRITE_BARRIER);
8281 } 8290 }
8282 8291
8292 bool deopt_dependent_code() {
8293 int value = pretenure_data()->value();
8294 return DeoptDependentCodeBit::decode(value);
8295 }
8296
8297 void set_deopt_dependent_code(bool deopt) {
8298 int value = pretenure_data()->value();
8299 set_pretenure_data(
8300 Smi::FromInt(DeoptDependentCodeBit::update(value, deopt)),
8301 SKIP_WRITE_BARRIER);
8302 }
8303
8283 int memento_found_count() { 8304 int memento_found_count() {
8284 int value = pretenure_data()->value(); 8305 int value = pretenure_data()->value();
8285 return MementoFoundCountBits::decode(value); 8306 return MementoFoundCountBits::decode(value);
8286 } 8307 }
8287 8308
8288 inline void set_memento_found_count(int count); 8309 inline void set_memento_found_count(int count);
8289 8310
8290 int memento_create_count() { 8311 int memento_create_count() {
8291 return pretenure_create_count()->value(); 8312 return pretenure_create_count()->value();
8292 } 8313 }
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
8612 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; 8633 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
8613 8634
8614 static const int kArrayIndexValueMask = 8635 static const int kArrayIndexValueMask =
8615 ((1 << kArrayIndexValueBits) - 1) << kHashShift; 8636 ((1 << kArrayIndexValueBits) - 1) << kHashShift;
8616 8637
8617 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we 8638 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we
8618 // could use a mask to test if the length of string is less than or equal to 8639 // could use a mask to test if the length of string is less than or equal to
8619 // kMaxCachedArrayIndexLength. 8640 // kMaxCachedArrayIndexLength.
8620 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); 8641 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));
8621 8642
8622 static const int kContainsCachedArrayIndexMask = 8643 static const unsigned int kContainsCachedArrayIndexMask =
8623 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | 8644 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
8624 kIsNotArrayIndexMask; 8645 kIsNotArrayIndexMask;
8625 8646
8626 // Value of empty hash field indicating that the hash is not computed. 8647 // Value of empty hash field indicating that the hash is not computed.
8627 static const int kEmptyHashField = 8648 static const int kEmptyHashField =
8628 kIsNotArrayIndexMask | kHashNotComputedMask; 8649 kIsNotArrayIndexMask | kHashNotComputedMask;
8629 8650
8630 protected: 8651 protected:
8631 static inline bool IsHashFieldComputed(uint32_t field); 8652 static inline bool IsHashFieldComputed(uint32_t field);
8632 8653
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
9504 kSize> BodyDescriptor; 9525 kSize> BodyDescriptor;
9505 9526
9506 private: 9527 private:
9507 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell); 9528 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell);
9508 }; 9529 };
9509 9530
9510 9531
9511 class PropertyCell: public Cell { 9532 class PropertyCell: public Cell {
9512 public: 9533 public:
9513 // [type]: type of the global property. 9534 // [type]: type of the global property.
9514 Type* type(); 9535 HeapType* type();
9515 void set_type(Type* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 9536 void set_type(HeapType* value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
9516 9537
9517 // [dependent_code]: dependent code that depends on the type of the global 9538 // [dependent_code]: dependent code that depends on the type of the global
9518 // property. 9539 // property.
9519 DECL_ACCESSORS(dependent_code, DependentCode) 9540 DECL_ACCESSORS(dependent_code, DependentCode)
9520 9541
9521 // Sets the value of the cell and updates the type field to be the union 9542 // Sets the value of the cell and updates the type field to be the union
9522 // of the cell's current type and the value's type. If the change causes 9543 // of the cell's current type and the value's type. If the change causes
9523 // a change of the type of the cell's contents, code dependent on the cell 9544 // a change of the type of the cell's contents, code dependent on the cell
9524 // will be deoptimized. 9545 // will be deoptimized.
9525 static void SetValueInferType(Handle<PropertyCell> cell, 9546 static void SetValueInferType(Handle<PropertyCell> cell,
9526 Handle<Object> value); 9547 Handle<Object> value);
9527 9548
9528 // Computes the new type of the cell's contents for the given value, but 9549 // Computes the new type of the cell's contents for the given value, but
9529 // without actually modifying the 'type' field. 9550 // without actually modifying the 'type' field.
9530 static Handle<Type> UpdatedType(Handle<PropertyCell> cell, 9551 static Handle<HeapType> UpdatedType(Handle<PropertyCell> cell,
9531 Handle<Object> value); 9552 Handle<Object> value);
9532 9553
9533 void AddDependentCompilationInfo(CompilationInfo* info); 9554 void AddDependentCompilationInfo(CompilationInfo* info);
9534 9555
9535 void AddDependentCode(Handle<Code> code); 9556 void AddDependentCode(Handle<Code> code);
9536 9557
9537 // Casting. 9558 // Casting.
9538 static inline PropertyCell* cast(Object* obj); 9559 static inline PropertyCell* cast(Object* obj);
9539 9560
9540 inline Address TypeAddress() { 9561 inline Address TypeAddress() {
9541 return address() + kTypeOffset; 9562 return address() + kTypeOffset;
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
10631 10652
10632 10653
10633 #undef DECL_BOOLEAN_ACCESSORS 10654 #undef DECL_BOOLEAN_ACCESSORS
10634 #undef DECL_ACCESSORS 10655 #undef DECL_ACCESSORS
10635 #undef DECLARE_VERIFIER 10656 #undef DECLARE_VERIFIER
10636 10657
10637 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ 10658 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
10638 V(kStringTable, "string_table", "(Internalized strings)") \ 10659 V(kStringTable, "string_table", "(Internalized strings)") \
10639 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ 10660 V(kExternalStringsTable, "external_strings_table", "(External strings)") \
10640 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ 10661 V(kStrongRootList, "strong_root_list", "(Strong roots)") \
10662 V(kSmiRootList, "smi_root_list", "(Smi roots)") \
10641 V(kInternalizedString, "internalized_string", "(Internal string)") \ 10663 V(kInternalizedString, "internalized_string", "(Internal string)") \
10642 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ 10664 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \
10643 V(kTop, "top", "(Isolate)") \ 10665 V(kTop, "top", "(Isolate)") \
10644 V(kRelocatable, "relocatable", "(Relocatable)") \ 10666 V(kRelocatable, "relocatable", "(Relocatable)") \
10645 V(kDebug, "debug", "(Debugger)") \ 10667 V(kDebug, "debug", "(Debugger)") \
10646 V(kCompilationCache, "compilationcache", "(Compilation cache)") \ 10668 V(kCompilationCache, "compilationcache", "(Compilation cache)") \
10647 V(kHandleScope, "handlescope", "(Handle scope)") \ 10669 V(kHandleScope, "handlescope", "(Handle scope)") \
10648 V(kBuiltins, "builtins", "(Builtins)") \ 10670 V(kBuiltins, "builtins", "(Builtins)") \
10649 V(kGlobalHandles, "globalhandles", "(Global handles)") \ 10671 V(kGlobalHandles, "globalhandles", "(Global handles)") \
10650 V(kEternalHandles, "eternalhandles", "(Eternal handles)") \ 10672 V(kEternalHandles, "eternalhandles", "(Eternal handles)") \
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
10755 } else { 10777 } else {
10756 value &= ~(1 << bit_position); 10778 value &= ~(1 << bit_position);
10757 } 10779 }
10758 return value; 10780 return value;
10759 } 10781 }
10760 }; 10782 };
10761 10783
10762 } } // namespace v8::internal 10784 } } // namespace v8::internal
10763 10785
10764 #endif // V8_OBJECTS_H_ 10786 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698