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

Side by Side Diff: src/objects.h

Issue 10837165: Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: HConstants, HSimulates, stub fixes Created 8 years, 1 month 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 4247 matching lines...) Expand 10 before | Expand all | Expand 10 after
4258 DECL_ACCESSORS(relocation_info, ByteArray) 4258 DECL_ACCESSORS(relocation_info, ByteArray)
4259 void InvalidateRelocation(); 4259 void InvalidateRelocation();
4260 4260
4261 // [handler_table]: Fixed array containing offsets of exception handlers. 4261 // [handler_table]: Fixed array containing offsets of exception handlers.
4262 DECL_ACCESSORS(handler_table, FixedArray) 4262 DECL_ACCESSORS(handler_table, FixedArray)
4263 4263
4264 // [deoptimization_data]: Array containing data for deopt. 4264 // [deoptimization_data]: Array containing data for deopt.
4265 DECL_ACCESSORS(deoptimization_data, FixedArray) 4265 DECL_ACCESSORS(deoptimization_data, FixedArray)
4266 4266
4267 // [type_feedback_info]: Struct containing type feedback information. 4267 // [type_feedback_info]: Struct containing type feedback information.
4268 // Will contain either a TypeFeedbackInfo object, or undefined. 4268 // STUBs can use this slot to store arbitrary information as a Smi.
4269 // Will contain either a TypeFeedbackInfo object, or undefined, or a Smi.
4269 DECL_ACCESSORS(type_feedback_info, Object) 4270 DECL_ACCESSORS(type_feedback_info, Object)
4271 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value);
4272 inline int stub_info();
4273 inline void set_stub_info(int info);
4270 4274
4271 // [gc_metadata]: Field used to hold GC related metadata. The contents of this 4275 // [gc_metadata]: Field used to hold GC related metadata. The contents of this
4272 // field does not have to be traced during garbage collection since 4276 // field does not have to be traced during garbage collection since
4273 // it is only used by the garbage collector itself. 4277 // it is only used by the garbage collector itself.
4274 DECL_ACCESSORS(gc_metadata, Object) 4278 DECL_ACCESSORS(gc_metadata, Object)
4275 4279
4276 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age 4280 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age
4277 // at the moment when this object was created. 4281 // at the moment when this object was created.
4278 inline void set_ic_age(int count); 4282 inline void set_ic_age(int count);
4279 inline int ic_age(); 4283 inline int ic_age();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
4365 4369
4366 // [check type]: For kind CALL_IC, tells how to check if the 4370 // [check type]: For kind CALL_IC, tells how to check if the
4367 // receiver is valid for the given call. 4371 // receiver is valid for the given call.
4368 inline CheckType check_type(); 4372 inline CheckType check_type();
4369 inline void set_check_type(CheckType value); 4373 inline void set_check_type(CheckType value);
4370 4374
4371 // [type-recording unary op type]: For kind UNARY_OP_IC. 4375 // [type-recording unary op type]: For kind UNARY_OP_IC.
4372 inline byte unary_op_type(); 4376 inline byte unary_op_type();
4373 inline void set_unary_op_type(byte value); 4377 inline void set_unary_op_type(byte value);
4374 4378
4375 // [type-recording binary op type]: For kind BINARY_OP_IC.
4376 inline byte binary_op_type();
4377 inline void set_binary_op_type(byte value);
4378 inline byte binary_op_result_type();
4379 inline void set_binary_op_result_type(byte value);
4380
4381 // [compare state]: For kind COMPARE_IC, tells what state the stub is in.
4382 inline byte compare_state();
4383 inline void set_compare_state(byte value);
4384
4385 // [compare_operation]: For kind COMPARE_IC tells what compare operation the
4386 // stub was generated for.
4387 inline byte compare_operation();
4388 inline void set_compare_operation(byte value);
4389
4390 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4379 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
4391 inline byte to_boolean_state(); 4380 inline byte to_boolean_state();
4392 inline void set_to_boolean_state(byte value); 4381 inline void set_to_boolean_state(byte value);
4393 4382
4394 // [has_function_cache]: For kind STUB tells whether there is a function 4383 // [has_function_cache]: For kind STUB tells whether there is a function
4395 // cache is passed to the stub. 4384 // cache is passed to the stub.
4396 inline bool has_function_cache(); 4385 inline bool has_function_cache();
4397 inline void set_has_function_cache(bool flag); 4386 inline void set_has_function_cache(bool flag);
4398 4387
4399 bool allowed_in_shared_map_code_cache(); 4388 bool allowed_in_shared_map_code_cache();
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4572 class KindField: public BitField<Kind, 7, 4> {}; 4561 class KindField: public BitField<Kind, 7, 4> {};
4573 class ExtraICStateField: public BitField<ExtraICState, 11, 2> {}; 4562 class ExtraICStateField: public BitField<ExtraICState, 11, 2> {};
4574 class IsPregeneratedField: public BitField<bool, 13, 1> {}; 4563 class IsPregeneratedField: public BitField<bool, 13, 1> {};
4575 4564
4576 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) 4565 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
4577 static const int kStackSlotsFirstBit = 0; 4566 static const int kStackSlotsFirstBit = 0;
4578 static const int kStackSlotsBitCount = 24; 4567 static const int kStackSlotsBitCount = 24;
4579 static const int kUnaryOpTypeFirstBit = 4568 static const int kUnaryOpTypeFirstBit =
4580 kStackSlotsFirstBit + kStackSlotsBitCount; 4569 kStackSlotsFirstBit + kStackSlotsBitCount;
4581 static const int kUnaryOpTypeBitCount = 3; 4570 static const int kUnaryOpTypeBitCount = 3;
4582 static const int kBinaryOpTypeFirstBit =
4583 kStackSlotsFirstBit + kStackSlotsBitCount;
4584 static const int kBinaryOpTypeBitCount = 3;
4585 static const int kBinaryOpResultTypeFirstBit =
4586 kBinaryOpTypeFirstBit + kBinaryOpTypeBitCount;
4587 static const int kBinaryOpResultTypeBitCount = 3;
4588 static const int kCompareStateFirstBit =
4589 kStackSlotsFirstBit + kStackSlotsBitCount;
4590 static const int kCompareStateBitCount = 3;
4591 static const int kCompareOperationFirstBit =
4592 kCompareStateFirstBit + kCompareStateBitCount;
4593 static const int kCompareOperationBitCount = 4;
4594 static const int kToBooleanStateFirstBit = 4571 static const int kToBooleanStateFirstBit =
4595 kStackSlotsFirstBit + kStackSlotsBitCount; 4572 kStackSlotsFirstBit + kStackSlotsBitCount;
4596 static const int kToBooleanStateBitCount = 8; 4573 static const int kToBooleanStateBitCount = 8;
4597 static const int kHasFunctionCacheFirstBit = 4574 static const int kHasFunctionCacheFirstBit =
4598 kStackSlotsFirstBit + kStackSlotsBitCount; 4575 kStackSlotsFirstBit + kStackSlotsBitCount;
4599 static const int kHasFunctionCacheBitCount = 1; 4576 static const int kHasFunctionCacheBitCount = 1;
4600 4577
4601 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); 4578 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
4602 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32); 4579 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32);
4603 STATIC_ASSERT(kBinaryOpTypeFirstBit + kBinaryOpTypeBitCount <= 32);
4604 STATIC_ASSERT(kBinaryOpResultTypeFirstBit +
4605 kBinaryOpResultTypeBitCount <= 32);
4606 STATIC_ASSERT(kCompareStateFirstBit + kCompareStateBitCount <= 32);
4607 STATIC_ASSERT(kCompareOperationFirstBit + kCompareOperationBitCount <= 32);
4608 STATIC_ASSERT(kToBooleanStateFirstBit + kToBooleanStateBitCount <= 32); 4580 STATIC_ASSERT(kToBooleanStateFirstBit + kToBooleanStateBitCount <= 32);
4609 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); 4581 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32);
4610 4582
4611 class StackSlotsField: public BitField<int, 4583 class StackSlotsField: public BitField<int,
4612 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT 4584 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT
4613 class UnaryOpTypeField: public BitField<int, 4585 class UnaryOpTypeField: public BitField<int,
4614 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT 4586 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT
4615 class BinaryOpTypeField: public BitField<int,
4616 kBinaryOpTypeFirstBit, kBinaryOpTypeBitCount> {}; // NOLINT
4617 class BinaryOpResultTypeField: public BitField<int,
4618 kBinaryOpResultTypeFirstBit, kBinaryOpResultTypeBitCount> {}; // NOLINT
4619 class CompareStateField: public BitField<int,
4620 kCompareStateFirstBit, kCompareStateBitCount> {}; // NOLINT
4621 class CompareOperationField: public BitField<int,
4622 kCompareOperationFirstBit, kCompareOperationBitCount> {}; // NOLINT
4623 class ToBooleanStateField: public BitField<int, 4587 class ToBooleanStateField: public BitField<int,
4624 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT 4588 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT
4625 class HasFunctionCacheField: public BitField<bool, 4589 class HasFunctionCacheField: public BitField<bool,
4626 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT 4590 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT
4627 4591
4628 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) 4592 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION)
4629 static const int kStubMajorKeyFirstBit = 0; 4593 static const int kStubMajorKeyFirstBit = 0;
4630 static const int kSafepointTableOffsetFirstBit = 4594 static const int kSafepointTableOffsetFirstBit =
4631 kStubMajorKeyFirstBit + kStubMajorKeyBits; 4595 kStubMajorKeyFirstBit + kStubMajorKeyBits;
4632 static const int kSafepointTableOffsetBitCount = 26; 4596 static const int kSafepointTableOffsetBitCount = 26;
(...skipping 4325 matching lines...) Expand 10 before | Expand all | Expand 10 after
8958 } else { 8922 } else {
8959 value &= ~(1 << bit_position); 8923 value &= ~(1 << bit_position);
8960 } 8924 }
8961 return value; 8925 return value;
8962 } 8926 }
8963 }; 8927 };
8964 8928
8965 } } // namespace v8::internal 8929 } } // namespace v8::internal
8966 8930
8967 #endif // V8_OBJECTS_H_ 8931 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698