| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Lookup the code in the (possibly custom) cache. | 192 // Lookup the code in the (possibly custom) cache. |
| 193 bool FindCodeInCache(Code** code_out, Isolate* isolate); | 193 bool FindCodeInCache(Code** code_out, Isolate* isolate); |
| 194 | 194 |
| 195 // Returns information for computing the number key. | 195 // Returns information for computing the number key. |
| 196 virtual Major MajorKey() = 0; | 196 virtual Major MajorKey() = 0; |
| 197 virtual int MinorKey() = 0; | 197 virtual int MinorKey() = 0; |
| 198 | 198 |
| 199 virtual InlineCacheState GetICState() { | 199 virtual InlineCacheState GetICState() { |
| 200 return UNINITIALIZED; | 200 return UNINITIALIZED; |
| 201 } | 201 } |
| 202 virtual Code::ExtraICState GetExtraICState() { | 202 virtual ExtraICState GetExtraICState() { |
| 203 return Code::kNoExtraICState; | 203 return kNoExtraICState; |
| 204 } | 204 } |
| 205 virtual Code::StubType GetStubType() { | 205 virtual Code::StubType GetStubType() { |
| 206 return Code::NORMAL; | 206 return Code::NORMAL; |
| 207 } | 207 } |
| 208 virtual int GetStubFlags() { | 208 virtual int GetStubFlags() { |
| 209 return -1; | 209 return -1; |
| 210 } | 210 } |
| 211 | 211 |
| 212 virtual void PrintName(StringStream* stream); | 212 virtual void PrintName(StringStream* stream); |
| 213 | 213 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 virtual CodeStub::Major MajorKey() { return StringLength; } | 847 virtual CodeStub::Major MajorKey() { return StringLength; } |
| 848 }; | 848 }; |
| 849 | 849 |
| 850 | 850 |
| 851 class StoreICStub: public ICStub { | 851 class StoreICStub: public ICStub { |
| 852 public: | 852 public: |
| 853 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) | 853 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) |
| 854 : ICStub(kind), strict_mode_(strict_mode) { } | 854 : ICStub(kind), strict_mode_(strict_mode) { } |
| 855 | 855 |
| 856 protected: | 856 protected: |
| 857 virtual Code::ExtraICState GetExtraICState() { | 857 virtual ExtraICState GetExtraICState() { |
| 858 return strict_mode_; | 858 return StoreIC::ComputeExtraICState(strict_mode_); |
| 859 } | 859 } |
| 860 | 860 |
| 861 private: | 861 private: |
| 862 STATIC_ASSERT(KindBits::kSize == 4); | 862 STATIC_ASSERT(KindBits::kSize == 4); |
| 863 class StrictModeBits: public BitField<bool, 4, 1> {}; | 863 class StrictModeBits: public BitField<bool, 4, 1> {}; |
| 864 virtual int MinorKey() { | 864 virtual int MinorKey() { |
| 865 return KindBits::encode(kind()) | StrictModeBits::encode(strict_mode_); | 865 return KindBits::encode(kind()) | StrictModeBits::encode(strict_mode_); |
| 866 } | 866 } |
| 867 | 867 |
| 868 StrictModeFlag strict_mode_; | 868 StrictModeFlag strict_mode_; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 STATIC_ASSERT(KindBits::kSize == 4); | 959 STATIC_ASSERT(KindBits::kSize == 4); |
| 960 class InobjectBits: public BitField<bool, 4, 1> {}; | 960 class InobjectBits: public BitField<bool, 4, 1> {}; |
| 961 class IndexBits: public BitField<int, 5, 11> {}; | 961 class IndexBits: public BitField<int, 5, 11> {}; |
| 962 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; | 962 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; |
| 963 virtual CodeStub::Major MajorKey() { return LoadField; } | 963 virtual CodeStub::Major MajorKey() { return LoadField; } |
| 964 }; | 964 }; |
| 965 | 965 |
| 966 | 966 |
| 967 class StoreGlobalStub : public HandlerStub { | 967 class StoreGlobalStub : public HandlerStub { |
| 968 public: | 968 public: |
| 969 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) { | 969 explicit StoreGlobalStub(bool is_constant) { |
| 970 bit_field_ = StrictModeBits::encode(strict_mode) | | 970 bit_field_ = IsConstantBits::encode(is_constant); |
| 971 IsConstantBits::encode(is_constant); | |
| 972 } | 971 } |
| 973 | 972 |
| 974 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, | 973 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, |
| 975 Map* receiver_map, | 974 Map* receiver_map, |
| 976 PropertyCell* cell) { | 975 PropertyCell* cell) { |
| 977 Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate); | 976 Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate); |
| 978 // Replace the placeholder cell and global object map with the actual global | 977 // Replace the placeholder cell and global object map with the actual global |
| 979 // cell and receiver map. | 978 // cell and receiver map. |
| 980 Map* cell_map = isolate->heap()->global_property_cell_map(); | 979 Map* cell_map = isolate->heap()->global_property_cell_map(); |
| 981 code->ReplaceNthObject(1, cell_map, cell); | 980 code->ReplaceNthObject(1, cell_map, cell); |
| 982 code->ReplaceNthObject(1, isolate->heap()->meta_map(), receiver_map); | 981 code->ReplaceNthObject(1, isolate->heap()->meta_map(), receiver_map); |
| 983 return code; | 982 return code; |
| 984 } | 983 } |
| 985 | 984 |
| 986 virtual Code::Kind kind() const { return Code::STORE_IC; } | 985 virtual Code::Kind kind() const { return Code::STORE_IC; } |
| 987 | 986 |
| 988 virtual Handle<Code> GenerateCode(Isolate* isolate); | 987 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 989 | 988 |
| 990 virtual void InitializeInterfaceDescriptor( | 989 virtual void InitializeInterfaceDescriptor( |
| 991 Isolate* isolate, | 990 Isolate* isolate, |
| 992 CodeStubInterfaceDescriptor* descriptor); | 991 CodeStubInterfaceDescriptor* descriptor); |
| 993 | 992 |
| 994 virtual Code::ExtraICState GetExtraICState() { return bit_field_; } | 993 virtual ExtraICState GetExtraICState() { return bit_field_; } |
| 995 | 994 |
| 996 bool is_constant() { | 995 bool is_constant() { |
| 997 return IsConstantBits::decode(bit_field_); | 996 return IsConstantBits::decode(bit_field_); |
| 998 } | 997 } |
| 999 void set_is_constant(bool value) { | 998 void set_is_constant(bool value) { |
| 1000 bit_field_ = IsConstantBits::update(bit_field_, value); | 999 bit_field_ = IsConstantBits::update(bit_field_, value); |
| 1001 } | 1000 } |
| 1002 | 1001 |
| 1003 Representation representation() { | 1002 Representation representation() { |
| 1004 return Representation::FromKind(RepresentationBits::decode(bit_field_)); | 1003 return Representation::FromKind(RepresentationBits::decode(bit_field_)); |
| 1005 } | 1004 } |
| 1006 void set_representation(Representation r) { | 1005 void set_representation(Representation r) { |
| 1007 bit_field_ = RepresentationBits::update(bit_field_, r.kind()); | 1006 bit_field_ = RepresentationBits::update(bit_field_, r.kind()); |
| 1008 } | 1007 } |
| 1009 | 1008 |
| 1010 private: | 1009 private: |
| 1011 virtual int NotMissMinorKey() { return GetExtraICState(); } | 1010 virtual int NotMissMinorKey() { return GetExtraICState(); } |
| 1012 Major MajorKey() { return StoreGlobal; } | 1011 Major MajorKey() { return StoreGlobal; } |
| 1013 | 1012 |
| 1014 class StrictModeBits: public BitField<StrictModeFlag, 0, 1> {}; | 1013 class IsConstantBits: public BitField<bool, 0, 1> {}; |
| 1015 class IsConstantBits: public BitField<bool, 1, 1> {}; | 1014 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {}; |
| 1016 class RepresentationBits: public BitField<Representation::Kind, 2, 8> {}; | |
| 1017 | 1015 |
| 1018 int bit_field_; | 1016 int bit_field_; |
| 1019 | 1017 |
| 1020 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); | 1018 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); |
| 1021 }; | 1019 }; |
| 1022 | 1020 |
| 1023 | 1021 |
| 1024 class KeyedLoadFieldStub: public LoadFieldStub { | 1022 class KeyedLoadFieldStub: public LoadFieldStub { |
| 1025 public: | 1023 public: |
| 1026 KeyedLoadFieldStub(bool inobject, int index, Representation representation) | 1024 KeyedLoadFieldStub(bool inobject, int index, Representation representation) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1039 }; | 1037 }; |
| 1040 | 1038 |
| 1041 | 1039 |
| 1042 class KeyedArrayCallStub: public HICStub { | 1040 class KeyedArrayCallStub: public HICStub { |
| 1043 public: | 1041 public: |
| 1044 KeyedArrayCallStub(bool holey, int argc) : HICStub(), argc_(argc) { | 1042 KeyedArrayCallStub(bool holey, int argc) : HICStub(), argc_(argc) { |
| 1045 bit_field_ = ContextualBits::encode(false) | HoleyBits::encode(holey); | 1043 bit_field_ = ContextualBits::encode(false) | HoleyBits::encode(holey); |
| 1046 } | 1044 } |
| 1047 | 1045 |
| 1048 virtual Code::Kind kind() const { return Code::KEYED_CALL_IC; } | 1046 virtual Code::Kind kind() const { return Code::KEYED_CALL_IC; } |
| 1049 virtual Code::ExtraICState GetExtraICState() { return bit_field_; } | 1047 virtual ExtraICState GetExtraICState() { return bit_field_; } |
| 1050 | 1048 |
| 1051 ElementsKind elements_kind() { | 1049 ElementsKind elements_kind() { |
| 1052 return HoleyBits::decode(bit_field_) ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; | 1050 return HoleyBits::decode(bit_field_) ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; |
| 1053 } | 1051 } |
| 1054 | 1052 |
| 1055 int argc() { return argc_; } | 1053 int argc() { return argc_; } |
| 1056 virtual int GetStubFlags() { return argc(); } | 1054 virtual int GetStubFlags() { return argc(); } |
| 1057 | 1055 |
| 1058 static bool IsHoley(Handle<Code> code) { | 1056 static bool IsHoley(Handle<Code> code) { |
| 1059 Code::ExtraICState state = code->extra_ic_state(); | 1057 ExtraICState state = code->extra_ic_state(); |
| 1060 return HoleyBits::decode(state); | 1058 return HoleyBits::decode(state); |
| 1061 } | 1059 } |
| 1062 | 1060 |
| 1063 virtual void InitializeInterfaceDescriptor( | 1061 virtual void InitializeInterfaceDescriptor( |
| 1064 Isolate* isolate, | 1062 Isolate* isolate, |
| 1065 CodeStubInterfaceDescriptor* descriptor); | 1063 CodeStubInterfaceDescriptor* descriptor); |
| 1066 | 1064 |
| 1067 virtual Handle<Code> GenerateCode(Isolate* isolate); | 1065 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 1068 | 1066 |
| 1069 private: | 1067 private: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1084 | 1082 |
| 1085 | 1083 |
| 1086 class BinaryOpStub: public HydrogenCodeStub { | 1084 class BinaryOpStub: public HydrogenCodeStub { |
| 1087 public: | 1085 public: |
| 1088 BinaryOpStub(Token::Value op, OverwriteMode mode) | 1086 BinaryOpStub(Token::Value op, OverwriteMode mode) |
| 1089 : HydrogenCodeStub(UNINITIALIZED), op_(op), mode_(mode) { | 1087 : HydrogenCodeStub(UNINITIALIZED), op_(op), mode_(mode) { |
| 1090 ASSERT(op <= LAST_TOKEN && op >= FIRST_TOKEN); | 1088 ASSERT(op <= LAST_TOKEN && op >= FIRST_TOKEN); |
| 1091 Initialize(); | 1089 Initialize(); |
| 1092 } | 1090 } |
| 1093 | 1091 |
| 1094 explicit BinaryOpStub(Code::ExtraICState state) | 1092 explicit BinaryOpStub(ExtraICState state) |
| 1095 : op_(decode_token(OpBits::decode(state))), | 1093 : op_(decode_token(OpBits::decode(state))), |
| 1096 mode_(OverwriteModeField::decode(state)), | 1094 mode_(OverwriteModeField::decode(state)), |
| 1097 fixed_right_arg_( | 1095 fixed_right_arg_( |
| 1098 Maybe<int>(HasFixedRightArgBits::decode(state), | 1096 Maybe<int>(HasFixedRightArgBits::decode(state), |
| 1099 decode_arg_value(FixedRightArgValueBits::decode(state)))), | 1097 decode_arg_value(FixedRightArgValueBits::decode(state)))), |
| 1100 left_state_(LeftStateField::decode(state)), | 1098 left_state_(LeftStateField::decode(state)), |
| 1101 right_state_(fixed_right_arg_.has_value | 1099 right_state_(fixed_right_arg_.has_value |
| 1102 ? ((fixed_right_arg_.value <= Smi::kMaxValue) ? SMI : INT32) | 1100 ? ((fixed_right_arg_.value <= Smi::kMaxValue) ? SMI : INT32) |
| 1103 : RightStateField::decode(state)), | 1101 : RightStateField::decode(state)), |
| 1104 result_state_(ResultStateField::decode(state)) { | 1102 result_state_(ResultStateField::decode(state)) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1127 return ::v8::internal::UNINITIALIZED; | 1125 return ::v8::internal::UNINITIALIZED; |
| 1128 } | 1126 } |
| 1129 if (Max(left_state_, right_state_) == GENERIC) return MEGAMORPHIC; | 1127 if (Max(left_state_, right_state_) == GENERIC) return MEGAMORPHIC; |
| 1130 return MONOMORPHIC; | 1128 return MONOMORPHIC; |
| 1131 } | 1129 } |
| 1132 | 1130 |
| 1133 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_OVERRIDE { | 1131 virtual void VerifyPlatformFeatures(Isolate* isolate) V8_OVERRIDE { |
| 1134 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2)); | 1132 ASSERT(CpuFeatures::VerifyCrossCompiling(SSE2)); |
| 1135 } | 1133 } |
| 1136 | 1134 |
| 1137 virtual Code::ExtraICState GetExtraICState() { | 1135 virtual ExtraICState GetExtraICState() { |
| 1138 bool sse_field = Max(result_state_, Max(left_state_, right_state_)) > SMI && | 1136 bool sse_field = Max(result_state_, Max(left_state_, right_state_)) > SMI && |
| 1139 CpuFeatures::IsSafeForSnapshot(SSE2); | 1137 CpuFeatures::IsSafeForSnapshot(SSE2); |
| 1140 | 1138 |
| 1141 return OpBits::encode(encode_token(op_)) | 1139 return OpBits::encode(encode_token(op_)) |
| 1142 | LeftStateField::encode(left_state_) | 1140 | LeftStateField::encode(left_state_) |
| 1143 | RightStateField::encode(fixed_right_arg_.has_value | 1141 | RightStateField::encode(fixed_right_arg_.has_value |
| 1144 ? NONE : right_state_) | 1142 ? NONE : right_state_) |
| 1145 | ResultStateField::encode(result_state_) | 1143 | ResultStateField::encode(result_state_) |
| 1146 | HasFixedRightArgBits::encode(fixed_right_arg_.has_value) | 1144 | HasFixedRightArgBits::encode(fixed_right_arg_.has_value) |
| 1147 | FixedRightArgValueBits::encode(fixed_right_arg_.has_value | 1145 | FixedRightArgValueBits::encode(fixed_right_arg_.has_value |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 }; | 1365 }; |
| 1368 | 1366 |
| 1369 | 1367 |
| 1370 class CompareNilICStub : public HydrogenCodeStub { | 1368 class CompareNilICStub : public HydrogenCodeStub { |
| 1371 public: | 1369 public: |
| 1372 Handle<Type> GetType(Isolate* isolate, Handle<Map> map = Handle<Map>()); | 1370 Handle<Type> GetType(Isolate* isolate, Handle<Map> map = Handle<Map>()); |
| 1373 Handle<Type> GetInputType(Isolate* isolate, Handle<Map> map); | 1371 Handle<Type> GetInputType(Isolate* isolate, Handle<Map> map); |
| 1374 | 1372 |
| 1375 explicit CompareNilICStub(NilValue nil) : nil_value_(nil) { } | 1373 explicit CompareNilICStub(NilValue nil) : nil_value_(nil) { } |
| 1376 | 1374 |
| 1377 CompareNilICStub(Code::ExtraICState ic_state, | 1375 CompareNilICStub(ExtraICState ic_state, |
| 1378 InitializationState init_state = INITIALIZED) | 1376 InitializationState init_state = INITIALIZED) |
| 1379 : HydrogenCodeStub(init_state), | 1377 : HydrogenCodeStub(init_state), |
| 1380 nil_value_(NilValueField::decode(ic_state)), | 1378 nil_value_(NilValueField::decode(ic_state)), |
| 1381 state_(State(TypesField::decode(ic_state))) { | 1379 state_(State(TypesField::decode(ic_state))) { |
| 1382 } | 1380 } |
| 1383 | 1381 |
| 1384 static Handle<Code> GetUninitialized(Isolate* isolate, | 1382 static Handle<Code> GetUninitialized(Isolate* isolate, |
| 1385 NilValue nil) { | 1383 NilValue nil) { |
| 1386 return CompareNilICStub(nil, UNINITIALIZED).GetCode(isolate); | 1384 return CompareNilICStub(nil, UNINITIALIZED).GetCode(isolate); |
| 1387 } | 1385 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1404 return MONOMORPHIC; | 1402 return MONOMORPHIC; |
| 1405 } else { | 1403 } else { |
| 1406 return PREMONOMORPHIC; | 1404 return PREMONOMORPHIC; |
| 1407 } | 1405 } |
| 1408 } | 1406 } |
| 1409 | 1407 |
| 1410 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_NIL_IC; } | 1408 virtual Code::Kind GetCodeKind() const { return Code::COMPARE_NIL_IC; } |
| 1411 | 1409 |
| 1412 virtual Handle<Code> GenerateCode(Isolate* isolate); | 1410 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 1413 | 1411 |
| 1414 virtual Code::ExtraICState GetExtraICState() { | 1412 virtual ExtraICState GetExtraICState() { |
| 1415 return NilValueField::encode(nil_value_) | | 1413 return NilValueField::encode(nil_value_) | |
| 1416 TypesField::encode(state_.ToIntegral()); | 1414 TypesField::encode(state_.ToIntegral()); |
| 1417 } | 1415 } |
| 1418 | 1416 |
| 1419 void UpdateStatus(Handle<Object> object); | 1417 void UpdateStatus(Handle<Object> object); |
| 1420 | 1418 |
| 1421 bool IsMonomorphic() const { return state_.Contains(MONOMORPHIC_MAP); } | 1419 bool IsMonomorphic() const { return state_.Contains(MONOMORPHIC_MAP); } |
| 1422 NilValue GetNilValue() const { return nil_value_; } | 1420 NilValue GetNilValue() const { return nil_value_; } |
| 1423 void ClearState() { state_.RemoveAll(); } | 1421 void ClearState() { state_.RemoveAll(); } |
| 1424 | 1422 |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 bool UpdateStatus(Handle<Object> object); | 2355 bool UpdateStatus(Handle<Object> object); |
| 2358 bool NeedsMap() const; | 2356 bool NeedsMap() const; |
| 2359 bool CanBeUndetectable() const; | 2357 bool CanBeUndetectable() const; |
| 2360 bool IsGeneric() const { return ToIntegral() == Generic().ToIntegral(); } | 2358 bool IsGeneric() const { return ToIntegral() == Generic().ToIntegral(); } |
| 2361 | 2359 |
| 2362 static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); } | 2360 static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); } |
| 2363 }; | 2361 }; |
| 2364 | 2362 |
| 2365 explicit ToBooleanStub(Types types = Types()) | 2363 explicit ToBooleanStub(Types types = Types()) |
| 2366 : types_(types) { } | 2364 : types_(types) { } |
| 2367 explicit ToBooleanStub(Code::ExtraICState state) | 2365 explicit ToBooleanStub(ExtraICState state) |
| 2368 : types_(static_cast<byte>(state)) { } | 2366 : types_(static_cast<byte>(state)) { } |
| 2369 | 2367 |
| 2370 bool UpdateStatus(Handle<Object> object); | 2368 bool UpdateStatus(Handle<Object> object); |
| 2371 Types GetTypes() { return types_; } | 2369 Types GetTypes() { return types_; } |
| 2372 | 2370 |
| 2373 virtual Handle<Code> GenerateCode(Isolate* isolate); | 2371 virtual Handle<Code> GenerateCode(Isolate* isolate); |
| 2374 virtual void InitializeInterfaceDescriptor( | 2372 virtual void InitializeInterfaceDescriptor( |
| 2375 Isolate* isolate, | 2373 Isolate* isolate, |
| 2376 CodeStubInterfaceDescriptor* descriptor); | 2374 CodeStubInterfaceDescriptor* descriptor); |
| 2377 | 2375 |
| 2378 virtual Code::Kind GetCodeKind() const { return Code::TO_BOOLEAN_IC; } | 2376 virtual Code::Kind GetCodeKind() const { return Code::TO_BOOLEAN_IC; } |
| 2379 virtual void PrintState(StringStream* stream); | 2377 virtual void PrintState(StringStream* stream); |
| 2380 | 2378 |
| 2381 virtual bool SometimesSetsUpAFrame() { return false; } | 2379 virtual bool SometimesSetsUpAFrame() { return false; } |
| 2382 | 2380 |
| 2383 static void InitializeForIsolate(Isolate* isolate) { | 2381 static void InitializeForIsolate(Isolate* isolate) { |
| 2384 ToBooleanStub stub; | 2382 ToBooleanStub stub; |
| 2385 stub.InitializeInterfaceDescriptor( | 2383 stub.InitializeInterfaceDescriptor( |
| 2386 isolate, | 2384 isolate, |
| 2387 isolate->code_stub_interface_descriptor(CodeStub::ToBoolean)); | 2385 isolate->code_stub_interface_descriptor(CodeStub::ToBoolean)); |
| 2388 } | 2386 } |
| 2389 | 2387 |
| 2390 static Handle<Code> GetUninitialized(Isolate* isolate) { | 2388 static Handle<Code> GetUninitialized(Isolate* isolate) { |
| 2391 return ToBooleanStub(UNINITIALIZED).GetCode(isolate); | 2389 return ToBooleanStub(UNINITIALIZED).GetCode(isolate); |
| 2392 } | 2390 } |
| 2393 | 2391 |
| 2394 virtual Code::ExtraICState GetExtraICState() { | 2392 virtual ExtraICState GetExtraICState() { |
| 2395 return types_.ToIntegral(); | 2393 return types_.ToIntegral(); |
| 2396 } | 2394 } |
| 2397 | 2395 |
| 2398 virtual InlineCacheState GetICState() { | 2396 virtual InlineCacheState GetICState() { |
| 2399 if (types_.IsEmpty()) { | 2397 if (types_.IsEmpty()) { |
| 2400 return ::v8::internal::UNINITIALIZED; | 2398 return ::v8::internal::UNINITIALIZED; |
| 2401 } else { | 2399 } else { |
| 2402 return MONOMORPHIC; | 2400 return MONOMORPHIC; |
| 2403 } | 2401 } |
| 2404 } | 2402 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2546 int MinorKey() { return 0; } | 2544 int MinorKey() { return 0; } |
| 2547 | 2545 |
| 2548 void Generate(MacroAssembler* masm); | 2546 void Generate(MacroAssembler* masm); |
| 2549 | 2547 |
| 2550 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2548 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
| 2551 }; | 2549 }; |
| 2552 | 2550 |
| 2553 } } // namespace v8::internal | 2551 } } // namespace v8::internal |
| 2554 | 2552 |
| 2555 #endif // V8_CODE_STUBS_H_ | 2553 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |