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_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3030 | 3030 |
3031 // At most 16 different types can be distinguished, because the Code object | 3031 // At most 16 different types can be distinguished, because the Code object |
3032 // only has room for two bytes to hold a set of these types. :-P | 3032 // only has room for two bytes to hold a set of these types. :-P |
3033 STATIC_ASSERT(NUMBER_OF_TYPES <= 16); | 3033 STATIC_ASSERT(NUMBER_OF_TYPES <= 16); |
3034 | 3034 |
3035 class Types : public EnumSet<Type, uint16_t> { | 3035 class Types : public EnumSet<Type, uint16_t> { |
3036 public: | 3036 public: |
3037 Types() : EnumSet<Type, uint16_t>(0) {} | 3037 Types() : EnumSet<Type, uint16_t>(0) {} |
3038 explicit Types(uint16_t bits) : EnumSet<Type, uint16_t>(bits) {} | 3038 explicit Types(uint16_t bits) : EnumSet<Type, uint16_t>(bits) {} |
3039 | 3039 |
3040 bool UpdateStatus(Handle<Object> object); | 3040 bool UpdateStatus(Isolate* isolate, Handle<Object> object); |
3041 bool NeedsMap() const; | 3041 bool NeedsMap() const; |
3042 bool CanBeUndetectable() const { | 3042 bool CanBeUndetectable() const { |
3043 return Contains(ToBooleanICStub::SPEC_OBJECT); | 3043 return Contains(ToBooleanICStub::SPEC_OBJECT); |
3044 } | 3044 } |
3045 bool IsGeneric() const { return ToIntegral() == Generic().ToIntegral(); } | 3045 bool IsGeneric() const { return ToIntegral() == Generic().ToIntegral(); } |
3046 | 3046 |
3047 static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); } | 3047 static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); } |
3048 }; | 3048 }; |
3049 | 3049 |
3050 ToBooleanICStub(Isolate* isolate, ExtraICState state) | 3050 ToBooleanICStub(Isolate* isolate, ExtraICState state) |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3246 #undef DEFINE_HYDROGEN_CODE_STUB | 3246 #undef DEFINE_HYDROGEN_CODE_STUB |
3247 #undef DEFINE_CODE_STUB | 3247 #undef DEFINE_CODE_STUB |
3248 #undef DEFINE_CODE_STUB_BASE | 3248 #undef DEFINE_CODE_STUB_BASE |
3249 | 3249 |
3250 extern Representation RepresentationFromType(Type* type); | 3250 extern Representation RepresentationFromType(Type* type); |
3251 | 3251 |
3252 } // namespace internal | 3252 } // namespace internal |
3253 } // namespace v8 | 3253 } // namespace v8 |
3254 | 3254 |
3255 #endif // V8_CODE_STUBS_H_ | 3255 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |