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

Side by Side Diff: src/objects.h

Issue 1423713014: PPC: [runtime] Fix ES6 9.2.1 [[Call]] when encountering a classConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/builtins-ppc.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 7089 matching lines...) Expand 10 before | Expand all | Expand 10 after
7100 // On 64 bit platforms, compiler hints is not a smi, see comment above. 7100 // On 64 bit platforms, compiler hints is not a smi, see comment above.
7101 static const int kCompilerHintsSmiTagSize = 0; 7101 static const int kCompilerHintsSmiTagSize = 0;
7102 static const int kCompilerHintsSize = kIntSize; 7102 static const int kCompilerHintsSize = kIntSize;
7103 #endif 7103 #endif
7104 7104
7105 STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <= 7105 STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <=
7106 SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte); 7106 SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte);
7107 7107
7108 public: 7108 public:
7109 // Constants for optimizing codegen for strict mode function and 7109 // Constants for optimizing codegen for strict mode function and
7110 // native tests when using integer-width instructions.
7111 static const int kStrictModeBit =
7112 kStrictModeFunction + kCompilerHintsSmiTagSize;
7113 static const int kStrongModeBit =
7114 kStrongModeFunction + kCompilerHintsSmiTagSize;
7115 static const int kNativeBit = kNative + kCompilerHintsSmiTagSize;
7116 static const int kBoundBit = kBoundFunction + kCompilerHintsSmiTagSize;
7117
7118 static const int kClassConstructorBits =
7119 FunctionKind::kClassConstructor
7120 << (kFunctionKind + kCompilerHintsSmiTagSize);
7121
7122 // Constants for optimizing codegen for strict mode function and
7110 // native tests. 7123 // native tests.
7111 // Allows to use byte-width instructions. 7124 // Allows to use byte-width instructions.
7112 static const int kStrictModeBitWithinByte = 7125 static const int kStrictModeBitWithinByte = kStrictModeBit % kBitsPerByte;
7113 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; 7126 static const int kStrongModeBitWithinByte = kStrongModeBit % kBitsPerByte;
7114 static const int kStrongModeBitWithinByte = 7127 static const int kNativeBitWithinByte = kNativeBit % kBitsPerByte;
7115 (kStrongModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; 7128 static const int kBoundBitWithinByte = kBoundBit % kBitsPerByte;
7116
7117 static const int kNativeBitWithinByte =
7118 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte;
7119
7120 static const int kBoundBitWithinByte =
7121 (kBoundFunction + kCompilerHintsSmiTagSize) % kBitsPerByte;
7122 7129
7123 static const int kClassConstructorBitsWithinByte = 7130 static const int kClassConstructorBitsWithinByte =
7124 FunctionKind::kClassConstructor << kCompilerHintsSmiTagSize; 7131 FunctionKind::kClassConstructor << kCompilerHintsSmiTagSize;
7125 STATIC_ASSERT(kClassConstructorBitsWithinByte < (1 << kBitsPerByte)); 7132 STATIC_ASSERT(kClassConstructorBitsWithinByte < (1 << kBitsPerByte));
7126 7133
7127 #if defined(V8_TARGET_LITTLE_ENDIAN) 7134 #if defined(V8_TARGET_LITTLE_ENDIAN)
7128 #define BYTE_OFFSET(compiler_hint) \ 7135 #define BYTE_OFFSET(compiler_hint) \
7129 kCompilerHintsOffset + \ 7136 kCompilerHintsOffset + \
7130 (compiler_hint + kCompilerHintsSmiTagSize) / kBitsPerByte 7137 (compiler_hint + kCompilerHintsSmiTagSize) / kBitsPerByte
7131 #elif defined(V8_TARGET_BIG_ENDIAN) 7138 #elif defined(V8_TARGET_BIG_ENDIAN)
7132 #define BYTE_OFFSET(compiler_hint) \ 7139 #define BYTE_OFFSET(compiler_hint) \
7133 kCompilerHintsOffset + (kCompilerHintsSize - 1) - \ 7140 kCompilerHintsOffset + (kCompilerHintsSize - 1) - \
7134 ((compiler_hint + kCompilerHintsSmiTagSize) / kBitsPerByte) 7141 ((compiler_hint + kCompilerHintsSmiTagSize) / kBitsPerByte)
7135 #else 7142 #else
7136 #error Unknown byte ordering 7143 #error Unknown byte ordering
7137 #endif 7144 #endif
7138 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction); 7145 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction);
7139 static const int kStrongModeByteOffset = BYTE_OFFSET(kStrongModeFunction); 7146 static const int kStrongModeByteOffset = BYTE_OFFSET(kStrongModeFunction);
7140 static const int kNativeByteOffset = BYTE_OFFSET(kNative); 7147 static const int kNativeByteOffset = BYTE_OFFSET(kNative);
7141 static const int kBoundByteOffset = BYTE_OFFSET(kBoundFunction); 7148 static const int kBoundByteOffset = BYTE_OFFSET(kBoundFunction);
7142 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind); 7149 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind);
(...skipping 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after
10751 } 10758 }
10752 return value; 10759 return value;
10753 } 10760 }
10754 }; 10761 };
10755 10762
10756 10763
10757 } // NOLINT, false-positive due to second-order macros. 10764 } // NOLINT, false-positive due to second-order macros.
10758 } // NOLINT, false-positive due to second-order macros. 10765 } // NOLINT, false-positive due to second-order macros.
10759 10766
10760 #endif // V8_OBJECTS_H_ 10767 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698