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

Side by Side Diff: src/objects.h

Issue 22184004: Desugar bitwise negation into XOR and kill all UnaryOp stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 4972 matching lines...) Expand 10 before | Expand all | Expand 10 after
4983 inline void set_back_edge_table_offset(unsigned offset); 4983 inline void set_back_edge_table_offset(unsigned offset);
4984 4984
4985 inline bool back_edges_patched_for_osr(); 4985 inline bool back_edges_patched_for_osr();
4986 inline void set_back_edges_patched_for_osr(bool value); 4986 inline void set_back_edges_patched_for_osr(bool value);
4987 4987
4988 // [check type]: For kind CALL_IC, tells how to check if the 4988 // [check type]: For kind CALL_IC, tells how to check if the
4989 // receiver is valid for the given call. 4989 // receiver is valid for the given call.
4990 inline CheckType check_type(); 4990 inline CheckType check_type();
4991 inline void set_check_type(CheckType value); 4991 inline void set_check_type(CheckType value);
4992 4992
4993 // [type-recording unary op type]: For kind UNARY_OP_IC.
Michael Starzinger 2013/08/06 08:12:06 It should be possible to remove the UNARY_OP_IC fr
Sven Panne 2013/08/06 13:33:38 Done.
4994 inline byte unary_op_type();
4995 inline void set_unary_op_type(byte value);
4996
4997 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4993 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
4998 inline byte to_boolean_state(); 4994 inline byte to_boolean_state();
4999 4995
5000 // [has_function_cache]: For kind STUB tells whether there is a function 4996 // [has_function_cache]: For kind STUB tells whether there is a function
5001 // cache is passed to the stub. 4997 // cache is passed to the stub.
5002 inline bool has_function_cache(); 4998 inline bool has_function_cache();
5003 inline void set_has_function_cache(bool flag); 4999 inline void set_has_function_cache(bool flag);
5004 5000
5005 5001
5006 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether 5002 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
5225 class KindField: public BitField<Kind, 7, 4> {}; 5221 class KindField: public BitField<Kind, 7, 4> {};
5226 class IsPregeneratedField: public BitField<bool, 11, 1> {}; 5222 class IsPregeneratedField: public BitField<bool, 11, 1> {};
5227 class ExtraICStateField: public BitField<ExtraICState, 12, 5> {}; 5223 class ExtraICStateField: public BitField<ExtraICState, 12, 5> {};
5228 class ExtendedExtraICStateField: public BitField<ExtraICState, 12, 5224 class ExtendedExtraICStateField: public BitField<ExtraICState, 12,
5229 PlatformSmiTagging::kSmiValueSize - 12 + 1> {}; // NOLINT 5225 PlatformSmiTagging::kSmiValueSize - 12 + 1> {}; // NOLINT
5230 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift); 5226 STATIC_ASSERT(ExtraICStateField::kShift == ExtendedExtraICStateField::kShift);
5231 5227
5232 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) 5228 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
5233 static const int kStackSlotsFirstBit = 0; 5229 static const int kStackSlotsFirstBit = 0;
5234 static const int kStackSlotsBitCount = 24; 5230 static const int kStackSlotsBitCount = 24;
5235 static const int kUnaryOpTypeFirstBit =
5236 kStackSlotsFirstBit + kStackSlotsBitCount;
5237 static const int kUnaryOpTypeBitCount = 3;
5238 static const int kHasFunctionCacheFirstBit = 5231 static const int kHasFunctionCacheFirstBit =
5239 kStackSlotsFirstBit + kStackSlotsBitCount; 5232 kStackSlotsFirstBit + kStackSlotsBitCount;
5240 static const int kHasFunctionCacheBitCount = 1; 5233 static const int kHasFunctionCacheBitCount = 1;
5241 static const int kMarkedForDeoptimizationFirstBit = 5234 static const int kMarkedForDeoptimizationFirstBit =
5242 kStackSlotsFirstBit + kStackSlotsBitCount + 1; 5235 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5243 static const int kMarkedForDeoptimizationBitCount = 1; 5236 static const int kMarkedForDeoptimizationBitCount = 1;
5244 5237
5245 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); 5238 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
5246 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32);
5247 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); 5239 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32);
5248 STATIC_ASSERT(kMarkedForDeoptimizationFirstBit + 5240 STATIC_ASSERT(kMarkedForDeoptimizationFirstBit +
5249 kMarkedForDeoptimizationBitCount <= 32); 5241 kMarkedForDeoptimizationBitCount <= 32);
5250 5242
5251 class StackSlotsField: public BitField<int, 5243 class StackSlotsField: public BitField<int,
5252 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT 5244 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT
5253 class UnaryOpTypeField: public BitField<int,
5254 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT
5255 class HasFunctionCacheField: public BitField<bool, 5245 class HasFunctionCacheField: public BitField<bool,
5256 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT 5246 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT
5257 class MarkedForDeoptimizationField: public BitField<bool, 5247 class MarkedForDeoptimizationField: public BitField<bool,
5258 kMarkedForDeoptimizationFirstBit, 5248 kMarkedForDeoptimizationFirstBit,
5259 kMarkedForDeoptimizationBitCount> {}; // NOLINT 5249 kMarkedForDeoptimizationBitCount> {}; // NOLINT
5260 5250
5261 // KindSpecificFlags2 layout (ALL) 5251 // KindSpecificFlags2 layout (ALL)
5262 static const int kIsCrankshaftedBit = 0; 5252 static const int kIsCrankshaftedBit = 0;
5263 class IsCrankshaftedField: public BitField<bool, 5253 class IsCrankshaftedField: public BitField<bool,
5264 kIsCrankshaftedBit, 1> {}; // NOLINT 5254 kIsCrankshaftedBit, 1> {}; // NOLINT
(...skipping 4914 matching lines...) Expand 10 before | Expand all | Expand 10 after
10179 } else { 10169 } else {
10180 value &= ~(1 << bit_position); 10170 value &= ~(1 << bit_position);
10181 } 10171 }
10182 return value; 10172 return value;
10183 } 10173 }
10184 }; 10174 };
10185 10175
10186 } } // namespace v8::internal 10176 } } // namespace v8::internal
10187 10177
10188 #endif // V8_OBJECTS_H_ 10178 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698