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

Side by Side Diff: src/objects-inl.h

Issue 2095893002: Use source position table for unoptimized code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix gc mole Created 4 years, 5 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
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/profiler/heap-snapshot-generator.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 6415 matching lines...) Expand 10 before | Expand all | Expand 10 after
6426 SMI_ACCESSORS(JSMessageObject, start_position, kStartPositionOffset) 6426 SMI_ACCESSORS(JSMessageObject, start_position, kStartPositionOffset)
6427 SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset) 6427 SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset)
6428 6428
6429 6429
6430 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset) 6430 INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
6431 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset) 6431 INT_ACCESSORS(Code, prologue_offset, kPrologueOffset)
6432 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset) 6432 INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset)
6433 ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset) 6433 ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset)
6434 ACCESSORS(Code, handler_table, FixedArray, kHandlerTableOffset) 6434 ACCESSORS(Code, handler_table, FixedArray, kHandlerTableOffset)
6435 ACCESSORS(Code, deoptimization_data, FixedArray, kDeoptimizationDataOffset) 6435 ACCESSORS(Code, deoptimization_data, FixedArray, kDeoptimizationDataOffset)
6436 ACCESSORS(Code, source_position_table, ByteArray, kSourcePositionTableOffset)
6436 ACCESSORS(Code, raw_type_feedback_info, Object, kTypeFeedbackInfoOffset) 6437 ACCESSORS(Code, raw_type_feedback_info, Object, kTypeFeedbackInfoOffset)
6437 ACCESSORS(Code, next_code_link, Object, kNextCodeLinkOffset) 6438 ACCESSORS(Code, next_code_link, Object, kNextCodeLinkOffset)
6438 6439
6439 6440
6440 void Code::WipeOutHeader() { 6441 void Code::WipeOutHeader() {
6441 WRITE_FIELD(this, kRelocationInfoOffset, NULL); 6442 WRITE_FIELD(this, kRelocationInfoOffset, NULL);
6442 WRITE_FIELD(this, kHandlerTableOffset, NULL); 6443 WRITE_FIELD(this, kHandlerTableOffset, NULL);
6443 WRITE_FIELD(this, kDeoptimizationDataOffset, NULL); 6444 WRITE_FIELD(this, kDeoptimizationDataOffset, NULL);
6445 WRITE_FIELD(this, kSourcePositionTableOffset, NULL);
6444 // Do not wipe out major/minor keys on a code stub or IC 6446 // Do not wipe out major/minor keys on a code stub or IC
6445 if (!READ_FIELD(this, kTypeFeedbackInfoOffset)->IsSmi()) { 6447 if (!READ_FIELD(this, kTypeFeedbackInfoOffset)->IsSmi()) {
6446 WRITE_FIELD(this, kTypeFeedbackInfoOffset, NULL); 6448 WRITE_FIELD(this, kTypeFeedbackInfoOffset, NULL);
6447 } 6449 }
6448 WRITE_FIELD(this, kNextCodeLinkOffset, NULL); 6450 WRITE_FIELD(this, kNextCodeLinkOffset, NULL);
6449 WRITE_FIELD(this, kGCMetadataOffset, NULL); 6451 WRITE_FIELD(this, kGCMetadataOffset, NULL);
6450 } 6452 }
6451 6453
6452 6454
6453 Object* Code::type_feedback_info() { 6455 Object* Code::type_feedback_info() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
6493 6495
6494 int Code::body_size() { 6496 int Code::body_size() {
6495 return RoundUp(instruction_size(), kObjectAlignment); 6497 return RoundUp(instruction_size(), kObjectAlignment);
6496 } 6498 }
6497 6499
6498 int Code::SizeIncludingMetadata() { 6500 int Code::SizeIncludingMetadata() {
6499 int size = CodeSize(); 6501 int size = CodeSize();
6500 size += relocation_info()->Size(); 6502 size += relocation_info()->Size();
6501 size += deoptimization_data()->Size(); 6503 size += deoptimization_data()->Size();
6502 size += handler_table()->Size(); 6504 size += handler_table()->Size();
6505 if (kind() == FUNCTION) size += source_position_table()->Size();
6503 return size; 6506 return size;
6504 } 6507 }
6505 6508
6506 ByteArray* Code::unchecked_relocation_info() { 6509 ByteArray* Code::unchecked_relocation_info() {
6507 return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset)); 6510 return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset));
6508 } 6511 }
6509 6512
6510 6513
6511 byte* Code::relocation_start() { 6514 byte* Code::relocation_start() {
6512 return unchecked_relocation_info()->GetDataStartAddress(); 6515 return unchecked_relocation_info()->GetDataStartAddress();
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
7958 #undef WRITE_INT64_FIELD 7961 #undef WRITE_INT64_FIELD
7959 #undef READ_BYTE_FIELD 7962 #undef READ_BYTE_FIELD
7960 #undef WRITE_BYTE_FIELD 7963 #undef WRITE_BYTE_FIELD
7961 #undef NOBARRIER_READ_BYTE_FIELD 7964 #undef NOBARRIER_READ_BYTE_FIELD
7962 #undef NOBARRIER_WRITE_BYTE_FIELD 7965 #undef NOBARRIER_WRITE_BYTE_FIELD
7963 7966
7964 } // namespace internal 7967 } // namespace internal
7965 } // namespace v8 7968 } // namespace v8
7966 7969
7967 #endif // V8_OBJECTS_INL_H_ 7970 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/profiler/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698