Chromium Code Reviews| 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 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1960 public: | 1960 public: |
| 1961 CompareICStub(Isolate* isolate, Token::Value op, CompareICState::State left, | 1961 CompareICStub(Isolate* isolate, Token::Value op, CompareICState::State left, |
| 1962 CompareICState::State right, CompareICState::State state) | 1962 CompareICState::State right, CompareICState::State state) |
| 1963 : PlatformCodeStub(isolate) { | 1963 : PlatformCodeStub(isolate) { |
| 1964 DCHECK(Token::IsCompareOp(op)); | 1964 DCHECK(Token::IsCompareOp(op)); |
| 1965 DCHECK(OpBits::is_valid(op - Token::EQ)); | 1965 DCHECK(OpBits::is_valid(op - Token::EQ)); |
| 1966 minor_key_ = OpBits::encode(op - Token::EQ) | | 1966 minor_key_ = OpBits::encode(op - Token::EQ) | |
| 1967 LeftStateBits::encode(left) | RightStateBits::encode(right) | | 1967 LeftStateBits::encode(left) | RightStateBits::encode(right) | |
| 1968 StateBits::encode(state); | 1968 StateBits::encode(state); |
| 1969 } | 1969 } |
| 1970 CompareICStub(Isolate* isolate, ExtraICState extra_ic_state) | |
| 1971 : PlatformCodeStub(isolate) { | |
| 1972 minor_key_ = extra_ic_state; | |
| 1973 } | |
|
Igor Sheludko
2016/06/30 15:29:37
Nice catch! Thank you!
However, I think the right
| |
| 1974 | 1970 |
| 1975 void set_known_map(Handle<Map> map) { known_map_ = map; } | 1971 void set_known_map(Handle<Map> map) { known_map_ = map; } |
| 1976 | 1972 |
| 1977 InlineCacheState GetICState() const; | 1973 InlineCacheState GetICState() const; |
| 1978 | 1974 |
| 1979 Token::Value op() const { | 1975 Token::Value op() const { |
| 1980 return static_cast<Token::Value>(Token::EQ + OpBits::decode(minor_key_)); | 1976 return static_cast<Token::Value>(Token::EQ + OpBits::decode(minor_key_)); |
| 1981 } | 1977 } |
| 1982 | 1978 |
| 1983 CompareICState::State left() const { | 1979 CompareICState::State left() const { |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3114 #undef DEFINE_HYDROGEN_CODE_STUB | 3110 #undef DEFINE_HYDROGEN_CODE_STUB |
| 3115 #undef DEFINE_CODE_STUB | 3111 #undef DEFINE_CODE_STUB |
| 3116 #undef DEFINE_CODE_STUB_BASE | 3112 #undef DEFINE_CODE_STUB_BASE |
| 3117 | 3113 |
| 3118 extern Representation RepresentationFromType(Type* type); | 3114 extern Representation RepresentationFromType(Type* type); |
| 3119 | 3115 |
| 3120 } // namespace internal | 3116 } // namespace internal |
| 3121 } // namespace v8 | 3117 } // namespace v8 |
| 3122 | 3118 |
| 3123 #endif // V8_CODE_STUBS_H_ | 3119 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |