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

Side by Side Diff: src/objects.h

Issue 172233003: Clean up weak objects in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and fix whitespace Created 6 years, 10 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/lithium-codegen-mips.cc ('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 5230 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 inline bool is_handler() { return kind() == HANDLER; } 5241 inline bool is_handler() { return kind() == HANDLER; }
5242 inline bool is_load_stub() { return kind() == LOAD_IC; } 5242 inline bool is_load_stub() { return kind() == LOAD_IC; }
5243 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 5243 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
5244 inline bool is_store_stub() { return kind() == STORE_IC; } 5244 inline bool is_store_stub() { return kind() == STORE_IC; }
5245 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 5245 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
5246 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } 5246 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; }
5247 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } 5247 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; }
5248 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } 5248 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; }
5249 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 5249 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
5250 inline bool is_keyed_stub(); 5250 inline bool is_keyed_stub();
5251 inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
5251 5252
5252 inline void set_raw_kind_specific_flags1(int value); 5253 inline void set_raw_kind_specific_flags1(int value);
5253 inline void set_raw_kind_specific_flags2(int value); 5254 inline void set_raw_kind_specific_flags2(int value);
5254 5255
5255 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. 5256 // [major_key]: For kind STUB or BINARY_OP_IC, the major key.
5256 inline int major_key(); 5257 inline int major_key();
5257 inline void set_major_key(int value); 5258 inline void set_major_key(int value);
5258 inline bool has_major_key(); 5259 inline bool has_major_key();
5259 5260
5260 // For kind STUB or ICs, tells whether or not a code object was generated by 5261 // For kind STUB or ICs, tells whether or not a code object was generated by
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
5496 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); 5497 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5497 } 5498 }
5498 5499
5499 void PrintDeoptLocation(FILE* out, int bailout_id); 5500 void PrintDeoptLocation(FILE* out, int bailout_id);
5500 bool CanDeoptAt(Address pc); 5501 bool CanDeoptAt(Address pc);
5501 5502
5502 #ifdef VERIFY_HEAP 5503 #ifdef VERIFY_HEAP
5503 void VerifyEmbeddedObjectsDependency(); 5504 void VerifyEmbeddedObjectsDependency();
5504 #endif 5505 #endif
5505 5506
5506 static bool IsWeakEmbeddedObject(Kind kind, Object* object); 5507 inline bool IsWeakObject(Object* object) {
5508 return is_optimized_code() && IsWeakObjectInOptimizedCode(object);
5509 }
5510
5511 inline bool IsWeakObjectInOptimizedCode(Object* object);
5507 5512
5508 // Max loop nesting marker used to postpose OSR. We don't take loop 5513 // Max loop nesting marker used to postpose OSR. We don't take loop
5509 // nesting that is deeper than 5 levels into account. 5514 // nesting that is deeper than 5 levels into account.
5510 static const int kMaxLoopNestingMarker = 6; 5515 static const int kMaxLoopNestingMarker = 6;
5511 5516
5512 // Layout description. 5517 // Layout description.
5513 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; 5518 static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
5514 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; 5519 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
5515 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; 5520 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize;
5516 static const int kDeoptimizationDataOffset = 5521 static const int kDeoptimizationDataOffset =
(...skipping 5252 matching lines...) Expand 10 before | Expand all | Expand 10 after
10769 } else { 10774 } else {
10770 value &= ~(1 << bit_position); 10775 value &= ~(1 << bit_position);
10771 } 10776 }
10772 return value; 10777 return value;
10773 } 10778 }
10774 }; 10779 };
10775 10780
10776 } } // namespace v8::internal 10781 } } // namespace v8::internal
10777 10782
10778 #endif // V8_OBJECTS_H_ 10783 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698