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

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

Issue 12390031: Unify grow mode and stub kind (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 9 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
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 1395
1396 private: 1396 private:
1397 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub); 1397 DISALLOW_COPY_AND_ASSIGN(ArrayNArgumentsConstructorStub);
1398 }; 1398 };
1399 1399
1400 1400
1401 class KeyedStoreElementStub : public PlatformCodeStub { 1401 class KeyedStoreElementStub : public PlatformCodeStub {
1402 public: 1402 public:
1403 KeyedStoreElementStub(bool is_js_array, 1403 KeyedStoreElementStub(bool is_js_array,
1404 ElementsKind elements_kind, 1404 ElementsKind elements_kind,
1405 KeyedAccessGrowMode grow_mode) 1405 KeyedAccessStoreMode store_mode)
1406 : is_js_array_(is_js_array), 1406 : is_js_array_(is_js_array),
1407 elements_kind_(elements_kind), 1407 elements_kind_(elements_kind),
1408 grow_mode_(grow_mode), 1408 store_mode_(store_mode),
1409 fp_registers_(CanUseFPRegisters()) { } 1409 fp_registers_(CanUseFPRegisters()) { }
1410 1410
1411 Major MajorKey() { return KeyedStoreElement; } 1411 Major MajorKey() { return KeyedStoreElement; }
1412 int MinorKey() { 1412 int MinorKey() {
1413 return ElementsKindBits::encode(elements_kind_) | 1413 return ElementsKindBits::encode(elements_kind_) |
1414 IsJSArrayBits::encode(is_js_array_) | 1414 IsJSArrayBits::encode(is_js_array_) |
1415 GrowModeBits::encode(grow_mode_) | 1415 StoreModeBits::encode(store_mode_) |
1416 FPRegisters::encode(fp_registers_); 1416 FPRegisters::encode(fp_registers_);
1417 } 1417 }
1418 1418
1419 void Generate(MacroAssembler* masm); 1419 void Generate(MacroAssembler* masm);
1420 1420
1421 private: 1421 private:
1422 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {}; 1422 class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
1423 class GrowModeBits: public BitField<KeyedAccessGrowMode, 8, 1> {}; 1423 class StoreModeBits: public BitField<KeyedAccessStoreMode, 8, 4> {};
1424 class IsJSArrayBits: public BitField<bool, 9, 1> {}; 1424 class IsJSArrayBits: public BitField<bool, 12, 1> {};
1425 class FPRegisters: public BitField<bool, 10, 1> {}; 1425 class FPRegisters: public BitField<bool, 13, 1> {};
1426 1426
1427 bool is_js_array_; 1427 bool is_js_array_;
1428 ElementsKind elements_kind_; 1428 ElementsKind elements_kind_;
1429 KeyedAccessGrowMode grow_mode_; 1429 KeyedAccessStoreMode store_mode_;
1430 bool fp_registers_; 1430 bool fp_registers_;
1431 1431
1432 DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub); 1432 DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub);
1433 }; 1433 };
1434 1434
1435 1435
1436 class ToBooleanStub: public PlatformCodeStub { 1436 class ToBooleanStub: public PlatformCodeStub {
1437 public: 1437 public:
1438 enum Type { 1438 enum Type {
1439 UNDEFINED, 1439 UNDEFINED,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 Types types_; 1502 Types types_;
1503 }; 1503 };
1504 1504
1505 1505
1506 class ElementsTransitionAndStoreStub : public PlatformCodeStub { 1506 class ElementsTransitionAndStoreStub : public PlatformCodeStub {
1507 public: 1507 public:
1508 ElementsTransitionAndStoreStub(ElementsKind from, 1508 ElementsTransitionAndStoreStub(ElementsKind from,
1509 ElementsKind to, 1509 ElementsKind to,
1510 bool is_jsarray, 1510 bool is_jsarray,
1511 StrictModeFlag strict_mode, 1511 StrictModeFlag strict_mode,
1512 KeyedAccessGrowMode grow_mode) 1512 KeyedAccessStoreMode store_mode)
1513 : from_(from), 1513 : from_(from),
1514 to_(to), 1514 to_(to),
1515 is_jsarray_(is_jsarray), 1515 is_jsarray_(is_jsarray),
1516 strict_mode_(strict_mode), 1516 strict_mode_(strict_mode),
1517 grow_mode_(grow_mode) {} 1517 store_mode_(store_mode) {}
1518 1518
1519 private: 1519 private:
1520 class FromBits: public BitField<ElementsKind, 0, 8> {}; 1520 class FromBits: public BitField<ElementsKind, 0, 8> {};
1521 class ToBits: public BitField<ElementsKind, 8, 8> {}; 1521 class ToBits: public BitField<ElementsKind, 8, 8> {};
1522 class IsJSArrayBits: public BitField<bool, 16, 1> {}; 1522 class IsJSArrayBits: public BitField<bool, 16, 1> {};
1523 class StrictModeBits: public BitField<StrictModeFlag, 17, 1> {}; 1523 class StrictModeBits: public BitField<StrictModeFlag, 17, 1> {};
1524 class GrowModeBits: public BitField<KeyedAccessGrowMode, 18, 1> {}; 1524 class StoreModeBits: public BitField<KeyedAccessStoreMode, 18, 4> {};
1525 1525
1526 Major MajorKey() { return ElementsTransitionAndStore; } 1526 Major MajorKey() { return ElementsTransitionAndStore; }
1527 int MinorKey() { 1527 int MinorKey() {
1528 return FromBits::encode(from_) | 1528 return FromBits::encode(from_) |
1529 ToBits::encode(to_) | 1529 ToBits::encode(to_) |
1530 IsJSArrayBits::encode(is_jsarray_) | 1530 IsJSArrayBits::encode(is_jsarray_) |
1531 StrictModeBits::encode(strict_mode_) | 1531 StrictModeBits::encode(strict_mode_) |
1532 GrowModeBits::encode(grow_mode_); 1532 StoreModeBits::encode(store_mode_);
1533 } 1533 }
1534 1534
1535 void Generate(MacroAssembler* masm); 1535 void Generate(MacroAssembler* masm);
1536 1536
1537 ElementsKind from_; 1537 ElementsKind from_;
1538 ElementsKind to_; 1538 ElementsKind to_;
1539 bool is_jsarray_; 1539 bool is_jsarray_;
1540 StrictModeFlag strict_mode_; 1540 StrictModeFlag strict_mode_;
1541 KeyedAccessGrowMode grow_mode_; 1541 KeyedAccessStoreMode store_mode_;
1542 1542
1543 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); 1543 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub);
1544 }; 1544 };
1545 1545
1546 1546
1547 class StoreArrayLiteralElementStub : public PlatformCodeStub { 1547 class StoreArrayLiteralElementStub : public PlatformCodeStub {
1548 public: 1548 public:
1549 StoreArrayLiteralElementStub() 1549 StoreArrayLiteralElementStub()
1550 : fp_registers_(CanUseFPRegisters()) { } 1550 : fp_registers_(CanUseFPRegisters()) { }
1551 1551
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 1614
1615 // The current function entry hook. 1615 // The current function entry hook.
1616 static FunctionEntryHook entry_hook_; 1616 static FunctionEntryHook entry_hook_;
1617 1617
1618 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1618 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1619 }; 1619 };
1620 1620
1621 } } // namespace v8::internal 1621 } } // namespace v8::internal
1622 1622
1623 #endif // V8_CODE_STUBS_H_ 1623 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698