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

Side by Side Diff: src/objects.h

Issue 14307006: Make it possible to Crankshaft all kinds of stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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/mips/code-stubs-mips.h ('k') | src/objects.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 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4320 class Code: public HeapObject { 4320 class Code: public HeapObject {
4321 public: 4321 public:
4322 // Opaque data type for encapsulating code flags like kind, inline 4322 // Opaque data type for encapsulating code flags like kind, inline
4323 // cache state, and arguments count. 4323 // cache state, and arguments count.
4324 typedef uint32_t Flags; 4324 typedef uint32_t Flags;
4325 4325
4326 #define CODE_KIND_LIST(V) \ 4326 #define CODE_KIND_LIST(V) \
4327 V(FUNCTION) \ 4327 V(FUNCTION) \
4328 V(OPTIMIZED_FUNCTION) \ 4328 V(OPTIMIZED_FUNCTION) \
4329 V(STUB) \ 4329 V(STUB) \
4330 V(COMPILED_STUB) \
4331 V(BUILTIN) \ 4330 V(BUILTIN) \
4332 V(LOAD_IC) \ 4331 V(LOAD_IC) \
4333 V(KEYED_LOAD_IC) \ 4332 V(KEYED_LOAD_IC) \
4334 V(CALL_IC) \ 4333 V(CALL_IC) \
4335 V(KEYED_CALL_IC) \ 4334 V(KEYED_CALL_IC) \
4336 V(STORE_IC) \ 4335 V(STORE_IC) \
4337 V(KEYED_STORE_IC) \ 4336 V(KEYED_STORE_IC) \
4338 V(UNARY_OP_IC) \ 4337 V(UNARY_OP_IC) \
4339 V(BINARY_OP_IC) \ 4338 V(BINARY_OP_IC) \
4340 V(COMPARE_IC) \ 4339 V(COMPARE_IC) \
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4463 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; } 4462 inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
4464 inline bool is_unary_op_stub() { return kind() == UNARY_OP_IC; } 4463 inline bool is_unary_op_stub() { return kind() == UNARY_OP_IC; }
4465 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } 4464 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; }
4466 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 4465 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
4467 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 4466 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
4468 4467
4469 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 4468 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
4470 inline int major_key(); 4469 inline int major_key();
4471 inline void set_major_key(int value); 4470 inline void set_major_key(int value);
4472 4471
4472 // For kind STUB or ICs, tells whether or not a code object was generated by
4473 // the optimizing compiler (but it may not be an optimized function).
4474 bool is_crankshafted();
4475 inline void set_is_crankshafted(bool value);
4476
4473 // For stubs, tells whether they should always exist, so that they can be 4477 // For stubs, tells whether they should always exist, so that they can be
4474 // called from other stubs. 4478 // called from other stubs.
4475 inline bool is_pregenerated(); 4479 inline bool is_pregenerated();
4476 inline void set_is_pregenerated(bool value); 4480 inline void set_is_pregenerated(bool value);
4477 4481
4478 // [optimizable]: For FUNCTION kind, tells if it is optimizable. 4482 // [optimizable]: For FUNCTION kind, tells if it is optimizable.
4479 inline bool optimizable(); 4483 inline bool optimizable();
4480 inline void set_optimizable(bool value); 4484 inline void set_optimizable(bool value);
4481 4485
4482 // [has_deoptimization_support]: For FUNCTION kind, tells if it has 4486 // [has_deoptimization_support]: For FUNCTION kind, tells if it has
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
4778 class UnaryOpTypeField: public BitField<int, 4782 class UnaryOpTypeField: public BitField<int,
4779 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT 4783 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT
4780 class ToBooleanStateField: public BitField<int, 4784 class ToBooleanStateField: public BitField<int,
4781 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT 4785 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT
4782 class HasFunctionCacheField: public BitField<bool, 4786 class HasFunctionCacheField: public BitField<bool,
4783 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT 4787 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT
4784 class MarkedForDeoptimizationField: public BitField<bool, 4788 class MarkedForDeoptimizationField: public BitField<bool,
4785 kMarkedForDeoptimizationFirstBit, 4789 kMarkedForDeoptimizationFirstBit,
4786 kMarkedForDeoptimizationBitCount> {}; // NOLINT 4790 kMarkedForDeoptimizationBitCount> {}; // NOLINT
4787 4791
4792 // KindSpecificFlags2 layout (ALL)
4793 static const int kIsCrankshaftedBit = 0;
4794 class IsCrankshaftedField: public BitField<bool,
4795 kIsCrankshaftedBit, 1> {}; // NOLINT
4796
4788 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) 4797 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION)
4789 static const int kStubMajorKeyFirstBit = 0; 4798 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
4790 static const int kSafepointTableOffsetFirstBit = 4799 static const int kSafepointTableOffsetFirstBit =
4791 kStubMajorKeyFirstBit + kStubMajorKeyBits; 4800 kStubMajorKeyFirstBit + kStubMajorKeyBits;
4792 static const int kSafepointTableOffsetBitCount = 26; 4801 static const int kSafepointTableOffsetBitCount = 25;
4793 4802
4794 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); 4803 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32);
4795 STATIC_ASSERT(kSafepointTableOffsetFirstBit + 4804 STATIC_ASSERT(kSafepointTableOffsetFirstBit +
4796 kSafepointTableOffsetBitCount <= 32); 4805 kSafepointTableOffsetBitCount <= 32);
4806 STATIC_ASSERT(1 + kStubMajorKeyBits +
4807 kSafepointTableOffsetBitCount <= 32);
4797 4808
4798 class SafepointTableOffsetField: public BitField<int, 4809 class SafepointTableOffsetField: public BitField<int,
4799 kSafepointTableOffsetFirstBit, 4810 kSafepointTableOffsetFirstBit,
4800 kSafepointTableOffsetBitCount> {}; // NOLINT 4811 kSafepointTableOffsetBitCount> {}; // NOLINT
4801 class StubMajorKeyField: public BitField<int, 4812 class StubMajorKeyField: public BitField<int,
4802 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT 4813 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
4803 4814
4804 // KindSpecificFlags2 layout (FUNCTION) 4815 // KindSpecificFlags2 layout (FUNCTION)
4805 class BackEdgeTableOffsetField: public BitField<int, 0, 31> {}; 4816 class BackEdgeTableOffsetField: public BitField<int,
4806 class BackEdgesPatchedForOSRField: public BitField<bool, 31, 1> {}; 4817 kIsCrankshaftedBit + 1, 29> {}; // NOLINT
4818 class BackEdgesPatchedForOSRField: public BitField<bool,
4819 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT
4807 4820
4808 // Signed field cannot be encoded using the BitField class. 4821 // Signed field cannot be encoded using the BitField class.
4809 static const int kArgumentsCountShift = 17; 4822 static const int kArgumentsCountShift = 17;
4810 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1); 4823 static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
4811 static const int kArgumentsBits = 4824 static const int kArgumentsBits =
4812 PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1; 4825 PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
4813 static const int kMaxArguments = (1 << kArgumentsBits) - 1; 4826 static const int kMaxArguments = (1 << kArgumentsBits) - 1;
4814 4827
4815 // This constant should be encodable in an ARM instruction. 4828 // This constant should be encodable in an ARM instruction.
4816 static const int kFlagsNotUsedInLookup = 4829 static const int kFlagsNotUsedInLookup =
(...skipping 4575 matching lines...) Expand 10 before | Expand all | Expand 10 after
9392 } else { 9405 } else {
9393 value &= ~(1 << bit_position); 9406 value &= ~(1 << bit_position);
9394 } 9407 }
9395 return value; 9408 return value;
9396 } 9409 }
9397 }; 9410 };
9398 9411
9399 } } // namespace v8::internal 9412 } } // namespace v8::internal
9400 9413
9401 #endif // V8_OBJECTS_H_ 9414 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698