Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: src/code-stubs.h

Issue 15806005: fix the compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 struct CodeStubInterfaceDescriptor { 270 struct CodeStubInterfaceDescriptor {
271 CodeStubInterfaceDescriptor(); 271 CodeStubInterfaceDescriptor();
272 int register_param_count_; 272 int register_param_count_;
273 const Register* stack_parameter_count_; 273 const Register* stack_parameter_count_;
274 // if hint_stack_parameter_count_ > 0, the code stub can optimize the 274 // if hint_stack_parameter_count_ > 0, the code stub can optimize the
275 // return sequence. Default value is -1, which means it is ignored. 275 // return sequence. Default value is -1, which means it is ignored.
276 int hint_stack_parameter_count_; 276 int hint_stack_parameter_count_;
277 StubFunctionMode function_mode_; 277 StubFunctionMode function_mode_;
278 Register* register_params_; 278 Register* register_params_;
279 Address deoptimization_handler_; 279 Address deoptimization_handler_;
280 ExternalReference miss_handler_;
281 280
282 int environment_length() const { 281 int environment_length() const {
283 if (stack_parameter_count_ != NULL) { 282 if (stack_parameter_count_ != NULL) {
284 return register_param_count_ + 1; 283 return register_param_count_ + 1;
285 } 284 }
286 return register_param_count_; 285 return register_param_count_;
287 } 286 }
288 287
289 bool initialized() const { return register_param_count_ >= 0; } 288 bool initialized() const { return register_param_count_ >= 0; }
289
290 void SetMissHandler(ExternalReference handler) {
291 miss_handler_ = handler;
292 has_miss_handler_ = true;
293 }
294
295 ExternalReference miss_handler() {
296 ASSERT(has_miss_handler_);
297 return miss_handler_;
298 }
299
300 bool has_miss_handler() {
301 return has_miss_handler_;
302 }
303
304 private:
305 ExternalReference miss_handler_;
306 bool has_miss_handler_;
290 }; 307 };
291 308
292 // A helper to make up for the fact that type Register is not fully 309 // A helper to make up for the fact that type Register is not fully
293 // defined outside of the platform directories 310 // defined outside of the platform directories
294 #define DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index) \ 311 #define DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index) \
295 ((index) == (descriptor)->register_param_count_) \ 312 ((index) == (descriptor)->register_param_count_) \
296 ? *((descriptor)->stack_parameter_count_) \ 313 ? *((descriptor)->stack_parameter_count_) \
297 : (descriptor)->register_params_[(index)] 314 : (descriptor)->register_params_[(index)]
298 315
299 316
300 class HydrogenCodeStub : public CodeStub { 317 class HydrogenCodeStub : public CodeStub {
301 public: 318 public:
302 enum InitializationState { 319 enum InitializationState {
303 CODE_STUB_IS_NOT_MISS, 320 UNINITIALIZED,
304 CODE_STUB_IS_MISS 321 INITIALIZED
305 }; 322 };
306 323
307 explicit HydrogenCodeStub(InitializationState state) { 324 explicit HydrogenCodeStub(InitializationState state = INITIALIZED) {
308 is_miss_ = (state == CODE_STUB_IS_MISS); 325 is_uninitialized_ = (state == UNINITIALIZED);
309 } 326 }
310 327
311 virtual Code::Kind GetCodeKind() const { return Code::STUB; } 328 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
312 329
313 CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate) { 330 CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate) {
314 return isolate->code_stub_interface_descriptor(MajorKey()); 331 return isolate->code_stub_interface_descriptor(MajorKey());
315 } 332 }
316 333
317 bool IsMiss() { return is_miss_; } 334 bool IsUninitialized() { return is_uninitialized_; }
318 335
319 template<class SubClass> 336 template<class SubClass>
320 static Handle<Code> GetUninitialized(Isolate* isolate) { 337 static Handle<Code> GetUninitialized(Isolate* isolate) {
321 SubClass::GenerateAheadOfTime(isolate); 338 SubClass::GenerateAheadOfTime(isolate);
322 return SubClass().GetCode(isolate); 339 return SubClass().GetCode(isolate);
323 } 340 }
324 341
325 virtual void InitializeInterfaceDescriptor( 342 virtual void InitializeInterfaceDescriptor(
326 Isolate* isolate, 343 Isolate* isolate,
327 CodeStubInterfaceDescriptor* descriptor) = 0; 344 CodeStubInterfaceDescriptor* descriptor) = 0;
328 345
329 // Retrieve the code for the stub. Generate the code if needed. 346 // Retrieve the code for the stub. Generate the code if needed.
330 virtual Handle<Code> GenerateCode() = 0; 347 virtual Handle<Code> GenerateCode() = 0;
331 348
332 virtual int NotMissMinorKey() = 0; 349 virtual int NotMissMinorKey() = 0;
333 350
334 Handle<Code> GenerateLightweightMissCode(Isolate* isolate); 351 Handle<Code> GenerateLightweightMissCode(Isolate* isolate);
335 352
336 private: 353 private:
337 class MinorKeyBits: public BitField<int, 0, kStubMinorKeyBits - 1> {}; 354 class MinorKeyBits: public BitField<int, 0, kStubMinorKeyBits - 1> {};
338 class IsMissBits: public BitField<bool, kStubMinorKeyBits - 1, 1> {}; 355 class IsMissBits: public BitField<bool, kStubMinorKeyBits - 1, 1> {};
339 356
340 void GenerateLightweightMiss(MacroAssembler* masm); 357 void GenerateLightweightMiss(MacroAssembler* masm);
341 virtual int MinorKey() { 358 virtual int MinorKey() {
342 return IsMissBits::encode(is_miss_) | 359 return IsMissBits::encode(is_uninitialized_) |
343 MinorKeyBits::encode(NotMissMinorKey()); 360 MinorKeyBits::encode(NotMissMinorKey());
344 } 361 }
345 362
346 bool is_miss_; 363 bool is_uninitialized_;
347 }; 364 };
348 365
349 366
350 // Helper interface to prepare to/restore after making runtime calls. 367 // Helper interface to prepare to/restore after making runtime calls.
351 class RuntimeCallHelper { 368 class RuntimeCallHelper {
352 public: 369 public:
353 virtual ~RuntimeCallHelper() {} 370 virtual ~RuntimeCallHelper() {}
354 371
355 virtual void BeforeCall(MacroAssembler* masm) const = 0; 372 virtual void BeforeCall(MacroAssembler* masm) const = 0;
356 373
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 COPY_ON_WRITE_ELEMENTS, 526 COPY_ON_WRITE_ELEMENTS,
510 CLONE_ANY_ELEMENTS, 527 CLONE_ANY_ELEMENTS,
511 LAST_CLONE_MODE = CLONE_ANY_ELEMENTS 528 LAST_CLONE_MODE = CLONE_ANY_ELEMENTS
512 }; 529 };
513 530
514 static const int kFastCloneModeCount = LAST_CLONE_MODE + 1; 531 static const int kFastCloneModeCount = LAST_CLONE_MODE + 1;
515 532
516 FastCloneShallowArrayStub(Mode mode, 533 FastCloneShallowArrayStub(Mode mode,
517 AllocationSiteMode allocation_site_mode, 534 AllocationSiteMode allocation_site_mode,
518 int length) 535 int length)
519 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS), 536 : mode_(mode),
520 mode_(mode),
521 allocation_site_mode_(allocation_site_mode), 537 allocation_site_mode_(allocation_site_mode),
522 length_((mode == COPY_ON_WRITE_ELEMENTS) ? 0 : length) { 538 length_((mode == COPY_ON_WRITE_ELEMENTS) ? 0 : length) {
523 ASSERT_GE(length_, 0); 539 ASSERT_GE(length_, 0);
524 ASSERT_LE(length_, kMaximumClonedLength); 540 ASSERT_LE(length_, kMaximumClonedLength);
525 } 541 }
526 542
527 Mode mode() const { return mode_; } 543 Mode mode() const { return mode_; }
528 int length() const { return length_; } 544 int length() const { return length_; }
529 AllocationSiteMode allocation_site_mode() const { 545 AllocationSiteMode allocation_site_mode() const {
530 return allocation_site_mode_; 546 return allocation_site_mode_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 } 586 }
571 }; 587 };
572 588
573 589
574 class FastCloneShallowObjectStub : public HydrogenCodeStub { 590 class FastCloneShallowObjectStub : public HydrogenCodeStub {
575 public: 591 public:
576 // Maximum number of properties in copied object. 592 // Maximum number of properties in copied object.
577 static const int kMaximumClonedProperties = 6; 593 static const int kMaximumClonedProperties = 6;
578 594
579 explicit FastCloneShallowObjectStub(int length) 595 explicit FastCloneShallowObjectStub(int length)
580 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS), 596 : length_(length) {
581 length_(length) {
582 ASSERT_GE(length_, 0); 597 ASSERT_GE(length_, 0);
583 ASSERT_LE(length_, kMaximumClonedProperties); 598 ASSERT_LE(length_, kMaximumClonedProperties);
584 } 599 }
585 600
586 int length() const { return length_; } 601 int length() const { return length_; }
587 602
588 virtual Handle<Code> GenerateCode(); 603 virtual Handle<Code> GenerateCode();
589 604
590 virtual void InitializeInterfaceDescriptor( 605 virtual void InitializeInterfaceDescriptor(
591 Isolate* isolate, 606 Isolate* isolate,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 virtual CodeStub::Major MajorKey() { return StoreArrayLength; } 771 virtual CodeStub::Major MajorKey() { return StoreArrayLength; }
757 }; 772 };
758 773
759 774
760 class HICStub: public HydrogenCodeStub { 775 class HICStub: public HydrogenCodeStub {
761 public: 776 public:
762 virtual Code::Kind GetCodeKind() const { return kind(); } 777 virtual Code::Kind GetCodeKind() const { return kind(); }
763 virtual InlineCacheState GetICState() { return MONOMORPHIC; } 778 virtual InlineCacheState GetICState() { return MONOMORPHIC; }
764 779
765 protected: 780 protected:
766 HICStub() : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) { } 781 HICStub() { }
767 class KindBits: public BitField<Code::Kind, 0, 4> {}; 782 class KindBits: public BitField<Code::Kind, 0, 4> {};
768 virtual Code::Kind kind() const = 0; 783 virtual Code::Kind kind() const = 0;
769 }; 784 };
770 785
771 786
772 class HandlerStub: public HICStub { 787 class HandlerStub: public HICStub {
773 public: 788 public:
774 virtual Code::Kind GetCodeKind() const { return Code::STUB; } 789 virtual Code::Kind GetCodeKind() const { return Code::STUB; }
775 virtual int GetStubFlags() { return kind(); } 790 virtual int GetStubFlags() { return kind(); }
776 791
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1077
1063 static Types FullCompare() { 1078 static Types FullCompare() {
1064 Types set; 1079 Types set;
1065 set.Add(UNDEFINED); 1080 set.Add(UNDEFINED);
1066 set.Add(NULL_TYPE); 1081 set.Add(NULL_TYPE);
1067 set.Add(UNDETECTABLE); 1082 set.Add(UNDETECTABLE);
1068 return set; 1083 return set;
1069 } 1084 }
1070 1085
1071 void Print(StringStream* stream) const; 1086 void Print(StringStream* stream) const;
1087 void TraceTransition(Types to) const;
1072 }; 1088 };
1073 1089
1074 // At most 6 different types can be distinguished, because the Code object 1090 // At most 6 different types can be distinguished, because the Code object
1075 // only has room for a single byte to hold a set and there are two more 1091 // only has room for a single byte to hold a set and there are two more
1076 // boolean flags we need to store. :-P 1092 // boolean flags we need to store. :-P
1077 STATIC_ASSERT(NUMBER_OF_TYPES <= 6); 1093 STATIC_ASSERT(NUMBER_OF_TYPES <= 6);
1078 1094
1079 CompareNilICStub(EqualityKind kind, NilValue nil, Types types) 1095 CompareNilICStub(EqualityKind kind, NilValue nil, Types types = Types())
1080 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS), types_(types) { 1096 : types_(types) {
1081 equality_kind_ = kind; 1097 equality_kind_ = kind;
1082 nil_value_ = nil; 1098 nil_value_ = nil;
1083 } 1099 }
1084 1100
1085 explicit CompareNilICStub(Code::ExtraICState ic_state) 1101 CompareNilICStub(Code::ExtraICState ic_state,
1086 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) { 1102 InitializationState init_state = INITIALIZED)
1103 : HydrogenCodeStub(init_state) {
1087 equality_kind_ = EqualityKindField::decode(ic_state); 1104 equality_kind_ = EqualityKindField::decode(ic_state);
1088 nil_value_ = NilValueField::decode(ic_state); 1105 nil_value_ = NilValueField::decode(ic_state);
1089 types_ = Types(ExtractTypesFromExtraICState(ic_state)); 1106 types_ = Types(ExtractTypesFromExtraICState(ic_state));
1090 } 1107 }
1091 1108
1092 static Handle<Code> GetUninitialized(Isolate* isolate, 1109 static Handle<Code> GetUninitialized(Isolate* isolate,
1093 EqualityKind kind, 1110 EqualityKind kind,
1094 NilValue nil) { 1111 NilValue nil) {
1095 return CompareNilICStub(kind, nil, CODE_STUB_IS_MISS).GetCode(isolate); 1112 return CompareNilICStub(kind, nil, UNINITIALIZED).GetCode(isolate);
1096 } 1113 }
1097 1114
1098 virtual void InitializeInterfaceDescriptor( 1115 virtual void InitializeInterfaceDescriptor(
1099 Isolate* isolate, 1116 Isolate* isolate,
1100 CodeStubInterfaceDescriptor* descriptor); 1117 CodeStubInterfaceDescriptor* descriptor);
1101 1118
1102 static void InitializeForIsolate(Isolate* isolate) { 1119 static void InitializeForIsolate(Isolate* isolate) {
1103 CompareNilICStub compare_stub(kStrictEquality, kNullValue, 1120 CompareNilICStub compare_stub(kStrictEquality, kNullValue, UNINITIALIZED);
1104 CODE_STUB_IS_MISS);
1105 compare_stub.InitializeInterfaceDescriptor( 1121 compare_stub.InitializeInterfaceDescriptor(
1106 isolate, 1122 isolate,
1107 isolate->code_stub_interface_descriptor(CodeStub::CompareNilIC)); 1123 isolate->code_stub_interface_descriptor(CodeStub::CompareNilIC));
1108 } 1124 }
1109 1125
1110 virtual InlineCacheState GetICState() { 1126 virtual InlineCacheState GetICState() {
1111 if (types_ == Types::FullCompare()) { 1127 if (types_ == Types::FullCompare()) {
1112 return MEGAMORPHIC; 1128 return MEGAMORPHIC;
1113 } else if (types_.Contains(MONOMORPHIC_MAP)) { 1129 } else if (types_.Contains(MONOMORPHIC_MAP)) {
1114 return MONOMORPHIC; 1130 return MONOMORPHIC;
(...skipping 26 matching lines...) Expand all
1141 void ClearTypes() { types_.RemoveAll(); } 1157 void ClearTypes() { types_.RemoveAll(); }
1142 void SetKind(EqualityKind kind) { equality_kind_ = kind; } 1158 void SetKind(EqualityKind kind) { equality_kind_ = kind; }
1143 1159
1144 virtual void PrintName(StringStream* stream); 1160 virtual void PrintName(StringStream* stream);
1145 1161
1146 private: 1162 private:
1147 friend class CompareNilIC; 1163 friend class CompareNilIC;
1148 1164
1149 CompareNilICStub(EqualityKind kind, NilValue nil, 1165 CompareNilICStub(EqualityKind kind, NilValue nil,
1150 InitializationState init_state) 1166 InitializationState init_state)
1151 : HydrogenCodeStub(init_state), types_(0) { 1167 : HydrogenCodeStub(init_state) {
1152 equality_kind_ = kind; 1168 equality_kind_ = kind;
1153 nil_value_ = nil; 1169 nil_value_ = nil;
1154 } 1170 }
1155 1171
1156 CompareNilICStub(Code::ExtraICState ic_state, InitializationState init_state)
1157 : HydrogenCodeStub(init_state) {
1158 equality_kind_ = EqualityKindField::decode(ic_state);
1159 nil_value_ = NilValueField::decode(ic_state);
1160 types_ = Types(ExtractTypesFromExtraICState(ic_state));
1161 }
1162
1163 class EqualityKindField : public BitField<EqualityKind, NUMBER_OF_TYPES, 1> { 1172 class EqualityKindField : public BitField<EqualityKind, NUMBER_OF_TYPES, 1> {
1164 }; 1173 };
1165 class NilValueField : public BitField<NilValue, NUMBER_OF_TYPES+1, 1> {}; 1174 class NilValueField : public BitField<NilValue, NUMBER_OF_TYPES+1, 1> {};
1166 1175
1167 virtual CodeStub::Major MajorKey() { return CompareNilIC; } 1176 virtual CodeStub::Major MajorKey() { return CompareNilIC; }
1168 virtual int NotMissMinorKey() { return GetExtraICState(); } 1177 virtual int NotMissMinorKey() { return GetExtraICState(); }
1169 1178
1170 EqualityKind equality_kind_; 1179 EqualityKind equality_kind_;
1171 NilValue nil_value_; 1180 NilValue nil_value_;
1172 Types types_; 1181 Types types_;
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 private: 1569 private:
1561 Major MajorKey() { return KeyedLoadElement; } 1570 Major MajorKey() { return KeyedLoadElement; }
1562 int MinorKey() { return DICTIONARY_ELEMENTS; } 1571 int MinorKey() { return DICTIONARY_ELEMENTS; }
1563 1572
1564 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub); 1573 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementStub);
1565 }; 1574 };
1566 1575
1567 1576
1568 class KeyedLoadFastElementStub : public HydrogenCodeStub { 1577 class KeyedLoadFastElementStub : public HydrogenCodeStub {
1569 public: 1578 public:
1570 KeyedLoadFastElementStub(bool is_js_array, ElementsKind elements_kind) 1579 KeyedLoadFastElementStub(bool is_js_array, ElementsKind elements_kind) {
1571 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) {
1572 bit_field_ = ElementsKindBits::encode(elements_kind) | 1580 bit_field_ = ElementsKindBits::encode(elements_kind) |
1573 IsJSArrayBits::encode(is_js_array); 1581 IsJSArrayBits::encode(is_js_array);
1574 } 1582 }
1575 1583
1576 bool is_js_array() const { 1584 bool is_js_array() const {
1577 return IsJSArrayBits::decode(bit_field_); 1585 return IsJSArrayBits::decode(bit_field_);
1578 } 1586 }
1579 1587
1580 ElementsKind elements_kind() const { 1588 ElementsKind elements_kind() const {
1581 return ElementsKindBits::decode(bit_field_); 1589 return ElementsKindBits::decode(bit_field_);
(...skipping 14 matching lines...) Expand all
1596 int NotMissMinorKey() { return bit_field_; } 1604 int NotMissMinorKey() { return bit_field_; }
1597 1605
1598 DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub); 1606 DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub);
1599 }; 1607 };
1600 1608
1601 1609
1602 class KeyedStoreFastElementStub : public HydrogenCodeStub { 1610 class KeyedStoreFastElementStub : public HydrogenCodeStub {
1603 public: 1611 public:
1604 KeyedStoreFastElementStub(bool is_js_array, 1612 KeyedStoreFastElementStub(bool is_js_array,
1605 ElementsKind elements_kind, 1613 ElementsKind elements_kind,
1606 KeyedAccessStoreMode mode) 1614 KeyedAccessStoreMode mode) {
1607 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) {
1608 bit_field_ = ElementsKindBits::encode(elements_kind) | 1615 bit_field_ = ElementsKindBits::encode(elements_kind) |
1609 IsJSArrayBits::encode(is_js_array) | 1616 IsJSArrayBits::encode(is_js_array) |
1610 StoreModeBits::encode(mode); 1617 StoreModeBits::encode(mode);
1611 } 1618 }
1612 1619
1613 bool is_js_array() const { 1620 bool is_js_array() const {
1614 return IsJSArrayBits::decode(bit_field_); 1621 return IsJSArrayBits::decode(bit_field_);
1615 } 1622 }
1616 1623
1617 ElementsKind elements_kind() const { 1624 ElementsKind elements_kind() const {
(...skipping 19 matching lines...) Expand all
1637 Major MajorKey() { return KeyedStoreElement; } 1644 Major MajorKey() { return KeyedStoreElement; }
1638 int NotMissMinorKey() { return bit_field_; } 1645 int NotMissMinorKey() { return bit_field_; }
1639 1646
1640 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub); 1647 DISALLOW_COPY_AND_ASSIGN(KeyedStoreFastElementStub);
1641 }; 1648 };
1642 1649
1643 1650
1644 class TransitionElementsKindStub : public HydrogenCodeStub { 1651 class TransitionElementsKindStub : public HydrogenCodeStub {
1645 public: 1652 public:
1646 TransitionElementsKindStub(ElementsKind from_kind, 1653 TransitionElementsKindStub(ElementsKind from_kind,
1647 ElementsKind to_kind) 1654 ElementsKind to_kind) {
1648 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) {
1649 bit_field_ = FromKindBits::encode(from_kind) | 1655 bit_field_ = FromKindBits::encode(from_kind) |
1650 ToKindBits::encode(to_kind); 1656 ToKindBits::encode(to_kind);
1651 } 1657 }
1652 1658
1653 ElementsKind from_kind() const { 1659 ElementsKind from_kind() const {
1654 return FromKindBits::decode(bit_field_); 1660 return FromKindBits::decode(bit_field_);
1655 } 1661 }
1656 1662
1657 ElementsKind to_kind() const { 1663 ElementsKind to_kind() const {
1658 return ToKindBits::decode(bit_field_); 1664 return ToKindBits::decode(bit_field_);
(...skipping 12 matching lines...) Expand all
1671 1677
1672 Major MajorKey() { return TransitionElementsKind; } 1678 Major MajorKey() { return TransitionElementsKind; }
1673 int NotMissMinorKey() { return bit_field_; } 1679 int NotMissMinorKey() { return bit_field_; }
1674 1680
1675 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub); 1681 DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub);
1676 }; 1682 };
1677 1683
1678 1684
1679 class ArrayConstructorStubBase : public HydrogenCodeStub { 1685 class ArrayConstructorStubBase : public HydrogenCodeStub {
1680 public: 1686 public:
1681 ArrayConstructorStubBase(ElementsKind kind, AllocationSiteMode mode) 1687 ArrayConstructorStubBase(ElementsKind kind, AllocationSiteMode mode) {
1682 : HydrogenCodeStub(CODE_STUB_IS_NOT_MISS) {
1683 bit_field_ = ElementsKindBits::encode(kind) | 1688 bit_field_ = ElementsKindBits::encode(kind) |
1684 AllocationSiteModeBits::encode(mode == TRACK_ALLOCATION_SITE); 1689 AllocationSiteModeBits::encode(mode == TRACK_ALLOCATION_SITE);
1685 } 1690 }
1686 1691
1687 ElementsKind elements_kind() const { 1692 ElementsKind elements_kind() const {
1688 return ElementsKindBits::decode(bit_field_); 1693 return ElementsKindBits::decode(bit_field_);
1689 } 1694 }
1690 1695
1691 AllocationSiteMode mode() const { 1696 AllocationSiteMode mode() const {
1692 return AllocationSiteModeBits::decode(bit_field_) 1697 return AllocationSiteModeBits::decode(bit_field_)
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 1995
1991 // The current function entry hook. 1996 // The current function entry hook.
1992 static FunctionEntryHook entry_hook_; 1997 static FunctionEntryHook entry_hook_;
1993 1998
1994 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1999 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1995 }; 2000 };
1996 2001
1997 } } // namespace v8::internal 2002 } } // namespace v8::internal
1998 2003
1999 #endif // V8_CODE_STUBS_H_ 2004 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.cc » ('j') | src/code-stubs-hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698