OLD | NEW |
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 7394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7405 | 7405 |
7406 STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <= | 7406 STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <= |
7407 SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte); | 7407 SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte); |
7408 | 7408 |
7409 public: | 7409 public: |
7410 // Constants for optimizing codegen for strict mode function and | 7410 // Constants for optimizing codegen for strict mode function and |
7411 // native tests. | 7411 // native tests. |
7412 // Allows to use byte-width instructions. | 7412 // Allows to use byte-width instructions. |
7413 static const int kStrictModeBitWithinByte = | 7413 static const int kStrictModeBitWithinByte = |
7414 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; | 7414 (kStrictModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; |
| 7415 static const int kStrongModeBitWithinByte = |
| 7416 (kStrongModeFunction + kCompilerHintsSmiTagSize) % kBitsPerByte; |
7415 | 7417 |
7416 static const int kNativeBitWithinByte = | 7418 static const int kNativeBitWithinByte = |
7417 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte; | 7419 (kNative + kCompilerHintsSmiTagSize) % kBitsPerByte; |
7418 | 7420 |
7419 #if defined(V8_TARGET_LITTLE_ENDIAN) | 7421 #if defined(V8_TARGET_LITTLE_ENDIAN) |
7420 static const int kStrictModeByteOffset = kCompilerHintsOffset + | 7422 static const int kStrictModeByteOffset = kCompilerHintsOffset + |
7421 (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte; | 7423 (kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte; |
| 7424 static const int kStrongModeByteOffset = |
| 7425 kCompilerHintsOffset + |
| 7426 (kStrongModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte; |
7422 static const int kNativeByteOffset = kCompilerHintsOffset + | 7427 static const int kNativeByteOffset = kCompilerHintsOffset + |
7423 (kNative + kCompilerHintsSmiTagSize) / kBitsPerByte; | 7428 (kNative + kCompilerHintsSmiTagSize) / kBitsPerByte; |
7424 #elif defined(V8_TARGET_BIG_ENDIAN) | 7429 #elif defined(V8_TARGET_BIG_ENDIAN) |
7425 static const int kStrictModeByteOffset = kCompilerHintsOffset + | 7430 static const int kStrictModeByteOffset = kCompilerHintsOffset + |
7426 (kCompilerHintsSize - 1) - | 7431 (kCompilerHintsSize - 1) - |
7427 ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte); | 7432 ((kStrictModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte); |
| 7433 static const int kStrongModeByteOffset = |
| 7434 kCompilerHintsOffset + (kCompilerHintsSize - 1) - |
| 7435 ((kStrongModeFunction + kCompilerHintsSmiTagSize) / kBitsPerByte); |
7428 static const int kNativeByteOffset = kCompilerHintsOffset + | 7436 static const int kNativeByteOffset = kCompilerHintsOffset + |
7429 (kCompilerHintsSize - 1) - | 7437 (kCompilerHintsSize - 1) - |
7430 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); | 7438 ((kNative + kCompilerHintsSmiTagSize) / kBitsPerByte); |
7431 #else | 7439 #else |
7432 #error Unknown byte ordering | 7440 #error Unknown byte ordering |
7433 #endif | 7441 #endif |
7434 | 7442 |
7435 private: | 7443 private: |
7436 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 7444 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); |
7437 }; | 7445 }; |
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11106 } else { | 11114 } else { |
11107 value &= ~(1 << bit_position); | 11115 value &= ~(1 << bit_position); |
11108 } | 11116 } |
11109 return value; | 11117 return value; |
11110 } | 11118 } |
11111 }; | 11119 }; |
11112 | 11120 |
11113 } } // namespace v8::internal | 11121 } } // namespace v8::internal |
11114 | 11122 |
11115 #endif // V8_OBJECTS_H_ | 11123 #endif // V8_OBJECTS_H_ |
OLD | NEW |