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