| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // below, the first byte listed it at the highest address, and successive | 134 // below, the first byte listed it at the highest address, and successive |
| 135 // bytes in the record are at progressively lower addresses. | 135 // bytes in the record are at progressively lower addresses. |
| 136 // | 136 // |
| 137 // Encoding | 137 // Encoding |
| 138 // | 138 // |
| 139 // The most common modes are given single-byte encodings. Also, it is | 139 // The most common modes are given single-byte encodings. Also, it is |
| 140 // easy to identify the type of reloc info and skip unwanted modes in | 140 // easy to identify the type of reloc info and skip unwanted modes in |
| 141 // an iteration. | 141 // an iteration. |
| 142 // | 142 // |
| 143 // The encoding relies on the fact that there are fewer than 14 | 143 // The encoding relies on the fact that there are fewer than 14 |
| 144 // different non-compactly encoded relocation modes. | 144 // different relocation modes using standard non-compact encoding. |
| 145 // | 145 // |
| 146 // The first byte of a relocation record has a tag in its low 2 bits: | 146 // The first byte of a relocation record has a tag in its low 2 bits: |
| 147 // Here are the record schemes, depending on the low tag and optional higher | 147 // Here are the record schemes, depending on the low tag and optional higher |
| 148 // tags. | 148 // tags. |
| 149 // | 149 // |
| 150 // Low tag: | 150 // Low tag: |
| 151 // 00: embedded_object: [6-bit pc delta] 00 | 151 // 00: embedded_object: [6-bit pc delta] 00 |
| 152 // | 152 // |
| 153 // 01: code_target: [6-bit pc delta] 01 | 153 // 01: code_target: [6-bit pc delta] 01 |
| 154 // | 154 // |
| (...skipping 11 matching lines...) Expand all Loading... |
| 166 // | 166 // |
| 167 // Long record format: | 167 // Long record format: |
| 168 // 4-bit middle_tag: | 168 // 4-bit middle_tag: |
| 169 // 0000 - 1100 : Short record for RelocInfo::Mode middle_tag + 2 | 169 // 0000 - 1100 : Short record for RelocInfo::Mode middle_tag + 2 |
| 170 // (The middle_tag encodes rmode - RelocInfo::LAST_COMPACT_ENUM, | 170 // (The middle_tag encodes rmode - RelocInfo::LAST_COMPACT_ENUM, |
| 171 // and is between 0000 and 1100) | 171 // and is between 0000 and 1100) |
| 172 // The format is: | 172 // The format is: |
| 173 // 00 [4 bit middle_tag] 11 followed by | 173 // 00 [4 bit middle_tag] 11 followed by |
| 174 // 00 [6 bit pc delta] | 174 // 00 [6 bit pc delta] |
| 175 // | 175 // |
| 176 // 1101: not used (would allow one more relocation mode to be added) | 176 // 1101: constant pool. Used on ARM only for now. |
| 177 // The format is: 11 1101 11 |
| 178 // signed int (size of the constant pool). |
| 177 // 1110: long_data_record | 179 // 1110: long_data_record |
| 178 // The format is: [2-bit data_type_tag] 1110 11 | 180 // The format is: [2-bit data_type_tag] 1110 11 |
| 179 // signed intptr_t, lowest byte written first | 181 // signed intptr_t, lowest byte written first |
| 180 // (except data_type code_target_with_id, which | 182 // (except data_type code_target_with_id, which |
| 181 // is followed by a signed int, not intptr_t.) | 183 // is followed by a signed int, not intptr_t.) |
| 182 // | 184 // |
| 183 // 1111: long_pc_jump | 185 // 1111: long_pc_jump |
| 184 // The format is: | 186 // The format is: |
| 185 // pc-jump: 00 1111 11, | 187 // pc-jump: 00 1111 11, |
| 186 // 00 [6 bits pc delta] | 188 // 00 [6 bits pc delta] |
| 187 // or | 189 // or |
| 188 // pc-jump (variable length): | 190 // pc-jump (variable length): |
| 189 // 01 1111 11, | 191 // 01 1111 11, |
| 190 // [7 bits data] 0 | 192 // [7 bits data] 0 |
| 191 // ... | 193 // ... |
| 192 // [7 bits data] 1 | 194 // [7 bits data] 1 |
| 193 // (Bits 6..31 of pc delta, with leading zeroes | 195 // (Bits 6..31 of pc delta, with leading zeroes |
| 194 // dropped, and last non-zero chunk tagged with 1.) | 196 // dropped, and last non-zero chunk tagged with 1.) |
| 195 | 197 |
| 196 | 198 |
| 197 const int kMaxRelocModes = 14; | 199 const int kMaxStandardNonCompactModes = 14; |
| 198 | 200 |
| 199 const int kTagBits = 2; | 201 const int kTagBits = 2; |
| 200 const int kTagMask = (1 << kTagBits) - 1; | 202 const int kTagMask = (1 << kTagBits) - 1; |
| 201 const int kExtraTagBits = 4; | 203 const int kExtraTagBits = 4; |
| 202 const int kLocatableTypeTagBits = 2; | 204 const int kLocatableTypeTagBits = 2; |
| 203 const int kSmallDataBits = kBitsPerByte - kLocatableTypeTagBits; | 205 const int kSmallDataBits = kBitsPerByte - kLocatableTypeTagBits; |
| 204 | 206 |
| 205 const int kEmbeddedObjectTag = 0; | 207 const int kEmbeddedObjectTag = 0; |
| 206 const int kCodeTargetTag = 1; | 208 const int kCodeTargetTag = 1; |
| 207 const int kLocatableTag = 2; | 209 const int kLocatableTag = 2; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 221 const int kLastChunkTag = 1; | 223 const int kLastChunkTag = 1; |
| 222 | 224 |
| 223 | 225 |
| 224 const int kDataJumpExtraTag = kPCJumpExtraTag - 1; | 226 const int kDataJumpExtraTag = kPCJumpExtraTag - 1; |
| 225 | 227 |
| 226 const int kCodeWithIdTag = 0; | 228 const int kCodeWithIdTag = 0; |
| 227 const int kNonstatementPositionTag = 1; | 229 const int kNonstatementPositionTag = 1; |
| 228 const int kStatementPositionTag = 2; | 230 const int kStatementPositionTag = 2; |
| 229 const int kCommentTag = 3; | 231 const int kCommentTag = 3; |
| 230 | 232 |
| 233 const int kConstPoolExtraTag = kPCJumpExtraTag - 2; |
| 234 const int kConstPoolTag = 3; |
| 235 |
| 231 | 236 |
| 232 uint32_t RelocInfoWriter::WriteVariableLengthPCJump(uint32_t pc_delta) { | 237 uint32_t RelocInfoWriter::WriteVariableLengthPCJump(uint32_t pc_delta) { |
| 233 // Return if the pc_delta can fit in kSmallPCDeltaBits bits. | 238 // Return if the pc_delta can fit in kSmallPCDeltaBits bits. |
| 234 // Otherwise write a variable length PC jump for the bits that do | 239 // Otherwise write a variable length PC jump for the bits that do |
| 235 // not fit in the kSmallPCDeltaBits bits. | 240 // not fit in the kSmallPCDeltaBits bits. |
| 236 if (is_uintn(pc_delta, kSmallPCDeltaBits)) return pc_delta; | 241 if (is_uintn(pc_delta, kSmallPCDeltaBits)) return pc_delta; |
| 237 WriteExtraTag(kPCJumpExtraTag, kVariableLengthPCJumpTopTag); | 242 WriteExtraTag(kPCJumpExtraTag, kVariableLengthPCJumpTopTag); |
| 238 uint32_t pc_jump = pc_delta >> kSmallPCDeltaBits; | 243 uint32_t pc_jump = pc_delta >> kSmallPCDeltaBits; |
| 239 ASSERT(pc_jump > 0); | 244 ASSERT(pc_jump > 0); |
| 240 // Write kChunkBits size chunks of the pc_jump. | 245 // Write kChunkBits size chunks of the pc_jump. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 283 |
| 279 void RelocInfoWriter::WriteExtraTaggedIntData(int data_delta, int top_tag) { | 284 void RelocInfoWriter::WriteExtraTaggedIntData(int data_delta, int top_tag) { |
| 280 WriteExtraTag(kDataJumpExtraTag, top_tag); | 285 WriteExtraTag(kDataJumpExtraTag, top_tag); |
| 281 for (int i = 0; i < kIntSize; i++) { | 286 for (int i = 0; i < kIntSize; i++) { |
| 282 *--pos_ = static_cast<byte>(data_delta); | 287 *--pos_ = static_cast<byte>(data_delta); |
| 283 // Signed right shift is arithmetic shift. Tested in test-utils.cc. | 288 // Signed right shift is arithmetic shift. Tested in test-utils.cc. |
| 284 data_delta = data_delta >> kBitsPerByte; | 289 data_delta = data_delta >> kBitsPerByte; |
| 285 } | 290 } |
| 286 } | 291 } |
| 287 | 292 |
| 293 void RelocInfoWriter::WriteExtraTaggedConstPoolData(int data) { |
| 294 WriteExtraTag(kConstPoolExtraTag, kConstPoolTag); |
| 295 for (int i = 0; i < kIntSize; i++) { |
| 296 *--pos_ = static_cast<byte>(data); |
| 297 // Signed right shift is arithmetic shift. Tested in test-utils.cc. |
| 298 data = data >> kBitsPerByte; |
| 299 } |
| 300 } |
| 301 |
| 288 void RelocInfoWriter::WriteExtraTaggedData(intptr_t data_delta, int top_tag) { | 302 void RelocInfoWriter::WriteExtraTaggedData(intptr_t data_delta, int top_tag) { |
| 289 WriteExtraTag(kDataJumpExtraTag, top_tag); | 303 WriteExtraTag(kDataJumpExtraTag, top_tag); |
| 290 for (int i = 0; i < kIntptrSize; i++) { | 304 for (int i = 0; i < kIntptrSize; i++) { |
| 291 *--pos_ = static_cast<byte>(data_delta); | 305 *--pos_ = static_cast<byte>(data_delta); |
| 292 // Signed right shift is arithmetic shift. Tested in test-utils.cc. | 306 // Signed right shift is arithmetic shift. Tested in test-utils.cc. |
| 293 data_delta = data_delta >> kBitsPerByte; | 307 data_delta = data_delta >> kBitsPerByte; |
| 294 } | 308 } |
| 295 } | 309 } |
| 296 | 310 |
| 297 | 311 |
| 298 void RelocInfoWriter::Write(const RelocInfo* rinfo) { | 312 void RelocInfoWriter::Write(const RelocInfo* rinfo) { |
| 299 #ifdef DEBUG | 313 #ifdef DEBUG |
| 300 byte* begin_pos = pos_; | 314 byte* begin_pos = pos_; |
| 301 #endif | 315 #endif |
| 302 ASSERT(rinfo->pc() - last_pc_ >= 0); | 316 ASSERT(rinfo->pc() - last_pc_ >= 0); |
| 303 ASSERT(RelocInfo::NUMBER_OF_MODES - RelocInfo::LAST_COMPACT_ENUM <= | 317 ASSERT(RelocInfo::LAST_STANDARD_NONCOMPACT_ENUM - RelocInfo::LAST_COMPACT_ENUM |
| 304 kMaxRelocModes); | 318 <= kMaxStandardNonCompactModes); |
| 305 // Use unsigned delta-encoding for pc. | 319 // Use unsigned delta-encoding for pc. |
| 306 uint32_t pc_delta = static_cast<uint32_t>(rinfo->pc() - last_pc_); | 320 uint32_t pc_delta = static_cast<uint32_t>(rinfo->pc() - last_pc_); |
| 307 RelocInfo::Mode rmode = rinfo->rmode(); | 321 RelocInfo::Mode rmode = rinfo->rmode(); |
| 308 | 322 |
| 309 // The two most common modes are given small tags, and usually fit in a byte. | 323 // The two most common modes are given small tags, and usually fit in a byte. |
| 310 if (rmode == RelocInfo::EMBEDDED_OBJECT) { | 324 if (rmode == RelocInfo::EMBEDDED_OBJECT) { |
| 311 WriteTaggedPC(pc_delta, kEmbeddedObjectTag); | 325 WriteTaggedPC(pc_delta, kEmbeddedObjectTag); |
| 312 } else if (rmode == RelocInfo::CODE_TARGET) { | 326 } else if (rmode == RelocInfo::CODE_TARGET) { |
| 313 WriteTaggedPC(pc_delta, kCodeTargetTag); | 327 WriteTaggedPC(pc_delta, kCodeTargetTag); |
| 314 ASSERT(begin_pos - pos_ <= RelocInfo::kMaxCallSize); | 328 ASSERT(begin_pos - pos_ <= RelocInfo::kMaxCallSize); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 340 // Otherwise, use costly encoding. | 354 // Otherwise, use costly encoding. |
| 341 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); | 355 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); |
| 342 WriteExtraTaggedIntData(pos_delta, pos_type_tag); | 356 WriteExtraTaggedIntData(pos_delta, pos_type_tag); |
| 343 } | 357 } |
| 344 last_position_ = static_cast<int>(rinfo->data()); | 358 last_position_ = static_cast<int>(rinfo->data()); |
| 345 } else if (RelocInfo::IsComment(rmode)) { | 359 } else if (RelocInfo::IsComment(rmode)) { |
| 346 // Comments are normally not generated, so we use the costly encoding. | 360 // Comments are normally not generated, so we use the costly encoding. |
| 347 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); | 361 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); |
| 348 WriteExtraTaggedData(rinfo->data(), kCommentTag); | 362 WriteExtraTaggedData(rinfo->data(), kCommentTag); |
| 349 ASSERT(begin_pos - pos_ >= RelocInfo::kMinRelocCommentSize); | 363 ASSERT(begin_pos - pos_ >= RelocInfo::kMinRelocCommentSize); |
| 364 } else if (RelocInfo::IsConstPool(rmode)) { |
| 365 WriteExtraTaggedPC(pc_delta, kPCJumpExtraTag); |
| 366 WriteExtraTaggedConstPoolData(rinfo->data()); |
| 350 } else { | 367 } else { |
| 351 ASSERT(rmode > RelocInfo::LAST_COMPACT_ENUM); | 368 ASSERT(rmode > RelocInfo::LAST_COMPACT_ENUM); |
| 352 int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM; | 369 int saved_mode = rmode - RelocInfo::LAST_COMPACT_ENUM; |
| 353 // For all other modes we simply use the mode as the extra tag. | 370 // For all other modes we simply use the mode as the extra tag. |
| 354 // None of these modes need a data component. | 371 // None of these modes need a data component. |
| 355 ASSERT(saved_mode < kPCJumpExtraTag && saved_mode < kDataJumpExtraTag); | 372 ASSERT(saved_mode < kPCJumpExtraTag && saved_mode < kDataJumpExtraTag); |
| 356 WriteExtraTaggedPC(pc_delta, saved_mode); | 373 WriteExtraTaggedPC(pc_delta, saved_mode); |
| 357 } | 374 } |
| 358 last_pc_ = rinfo->pc(); | 375 last_pc_ = rinfo->pc(); |
| 359 #ifdef DEBUG | 376 #ifdef DEBUG |
| (...skipping 30 matching lines...) Expand all Loading... |
| 390 void RelocIterator::AdvanceReadId() { | 407 void RelocIterator::AdvanceReadId() { |
| 391 int x = 0; | 408 int x = 0; |
| 392 for (int i = 0; i < kIntSize; i++) { | 409 for (int i = 0; i < kIntSize; i++) { |
| 393 x |= static_cast<int>(*--pos_) << i * kBitsPerByte; | 410 x |= static_cast<int>(*--pos_) << i * kBitsPerByte; |
| 394 } | 411 } |
| 395 last_id_ += x; | 412 last_id_ += x; |
| 396 rinfo_.data_ = last_id_; | 413 rinfo_.data_ = last_id_; |
| 397 } | 414 } |
| 398 | 415 |
| 399 | 416 |
| 417 void RelocIterator::AdvanceReadConstPoolData() { |
| 418 int x = 0; |
| 419 for (int i = 0; i < kIntSize; i++) { |
| 420 x |= static_cast<int>(*--pos_) << i * kBitsPerByte; |
| 421 } |
| 422 rinfo_.data_ = x; |
| 423 } |
| 424 |
| 425 |
| 400 void RelocIterator::AdvanceReadPosition() { | 426 void RelocIterator::AdvanceReadPosition() { |
| 401 int x = 0; | 427 int x = 0; |
| 402 for (int i = 0; i < kIntSize; i++) { | 428 for (int i = 0; i < kIntSize; i++) { |
| 403 x |= static_cast<int>(*--pos_) << i * kBitsPerByte; | 429 x |= static_cast<int>(*--pos_) << i * kBitsPerByte; |
| 404 } | 430 } |
| 405 last_position_ += x; | 431 last_position_ += x; |
| 406 rinfo_.data_ = last_position_; | 432 rinfo_.data_ = last_position_; |
| 407 } | 433 } |
| 408 | 434 |
| 409 | 435 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 locatable_tag == kStatementPositionTag); | 519 locatable_tag == kStatementPositionTag); |
| 494 if (mode_mask_ & RelocInfo::kPositionMask) { | 520 if (mode_mask_ & RelocInfo::kPositionMask) { |
| 495 ReadTaggedPosition(); | 521 ReadTaggedPosition(); |
| 496 if (SetMode(GetPositionModeFromTag(locatable_tag))) return; | 522 if (SetMode(GetPositionModeFromTag(locatable_tag))) return; |
| 497 } | 523 } |
| 498 } | 524 } |
| 499 } else { | 525 } else { |
| 500 ASSERT(tag == kDefaultTag); | 526 ASSERT(tag == kDefaultTag); |
| 501 int extra_tag = GetExtraTag(); | 527 int extra_tag = GetExtraTag(); |
| 502 if (extra_tag == kPCJumpExtraTag) { | 528 if (extra_tag == kPCJumpExtraTag) { |
| 503 int top_tag = GetTopTag(); | 529 if (GetTopTag() == kVariableLengthPCJumpTopTag) { |
| 504 if (top_tag == kVariableLengthPCJumpTopTag) { | |
| 505 AdvanceReadVariableLengthPCJump(); | 530 AdvanceReadVariableLengthPCJump(); |
| 506 } else { | 531 } else { |
| 507 AdvanceReadPC(); | 532 AdvanceReadPC(); |
| 508 } | 533 } |
| 509 } else if (extra_tag == kDataJumpExtraTag) { | 534 } else if (extra_tag == kDataJumpExtraTag) { |
| 510 int locatable_tag = GetTopTag(); | 535 int locatable_tag = GetTopTag(); |
| 511 if (locatable_tag == kCodeWithIdTag) { | 536 if (locatable_tag == kCodeWithIdTag) { |
| 512 if (SetMode(RelocInfo::CODE_TARGET_WITH_ID)) { | 537 if (SetMode(RelocInfo::CODE_TARGET_WITH_ID)) { |
| 513 AdvanceReadId(); | 538 AdvanceReadId(); |
| 514 return; | 539 return; |
| 515 } | 540 } |
| 516 Advance(kIntSize); | 541 Advance(kIntSize); |
| 517 } else if (locatable_tag != kCommentTag) { | 542 } else if (locatable_tag != kCommentTag) { |
| 518 ASSERT(locatable_tag == kNonstatementPositionTag || | 543 ASSERT(locatable_tag == kNonstatementPositionTag || |
| 519 locatable_tag == kStatementPositionTag); | 544 locatable_tag == kStatementPositionTag); |
| 520 if (mode_mask_ & RelocInfo::kPositionMask) { | 545 if (mode_mask_ & RelocInfo::kPositionMask) { |
| 521 AdvanceReadPosition(); | 546 AdvanceReadPosition(); |
| 522 if (SetMode(GetPositionModeFromTag(locatable_tag))) return; | 547 if (SetMode(GetPositionModeFromTag(locatable_tag))) return; |
| 523 } else { | 548 } else { |
| 524 Advance(kIntSize); | 549 Advance(kIntSize); |
| 525 } | 550 } |
| 526 } else { | 551 } else { |
| 527 ASSERT(locatable_tag == kCommentTag); | 552 ASSERT(locatable_tag == kCommentTag); |
| 528 if (SetMode(RelocInfo::COMMENT)) { | 553 if (SetMode(RelocInfo::COMMENT)) { |
| 529 AdvanceReadData(); | 554 AdvanceReadData(); |
| 530 return; | 555 return; |
| 531 } | 556 } |
| 532 Advance(kIntptrSize); | 557 Advance(kIntptrSize); |
| 533 } | 558 } |
| 559 } else if ((extra_tag == kConstPoolExtraTag) && |
| 560 (GetTopTag() == kConstPoolTag)) { |
| 561 if (SetMode(RelocInfo::CONST_POOL)) { |
| 562 AdvanceReadConstPoolData(); |
| 563 return; |
| 564 } |
| 565 Advance(kIntSize); |
| 534 } else { | 566 } else { |
| 535 AdvanceReadPC(); | 567 AdvanceReadPC(); |
| 536 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM; | 568 int rmode = extra_tag + RelocInfo::LAST_COMPACT_ENUM; |
| 537 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; | 569 if (SetMode(static_cast<RelocInfo::Mode>(rmode))) return; |
| 538 } | 570 } |
| 539 } | 571 } |
| 540 } | 572 } |
| 541 done_ = true; | 573 done_ = true; |
| 542 } | 574 } |
| 543 | 575 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 case RelocInfo::COMMENT: | 638 case RelocInfo::COMMENT: |
| 607 return "comment"; | 639 return "comment"; |
| 608 case RelocInfo::POSITION: | 640 case RelocInfo::POSITION: |
| 609 return "position"; | 641 return "position"; |
| 610 case RelocInfo::STATEMENT_POSITION: | 642 case RelocInfo::STATEMENT_POSITION: |
| 611 return "statement position"; | 643 return "statement position"; |
| 612 case RelocInfo::EXTERNAL_REFERENCE: | 644 case RelocInfo::EXTERNAL_REFERENCE: |
| 613 return "external reference"; | 645 return "external reference"; |
| 614 case RelocInfo::INTERNAL_REFERENCE: | 646 case RelocInfo::INTERNAL_REFERENCE: |
| 615 return "internal reference"; | 647 return "internal reference"; |
| 648 case RelocInfo::CONST_POOL: |
| 649 return "constant pool"; |
| 616 case RelocInfo::DEBUG_BREAK_SLOT: | 650 case RelocInfo::DEBUG_BREAK_SLOT: |
| 617 #ifndef ENABLE_DEBUGGER_SUPPORT | 651 #ifndef ENABLE_DEBUGGER_SUPPORT |
| 618 UNREACHABLE(); | 652 UNREACHABLE(); |
| 619 #endif | 653 #endif |
| 620 return "debug break slot"; | 654 return "debug break slot"; |
| 621 case RelocInfo::NUMBER_OF_MODES: | 655 case RelocInfo::NUMBER_OF_MODES: |
| 622 UNREACHABLE(); | 656 UNREACHABLE(); |
| 623 return "number_of_modes"; | 657 return "number_of_modes"; |
| 624 } | 658 } |
| 625 return "unknown relocation type"; | 659 return "unknown relocation type"; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 ASSERT(code->address() == HeapObject::cast(found)->address()); | 725 ASSERT(code->address() == HeapObject::cast(found)->address()); |
| 692 break; | 726 break; |
| 693 } | 727 } |
| 694 case RUNTIME_ENTRY: | 728 case RUNTIME_ENTRY: |
| 695 case JS_RETURN: | 729 case JS_RETURN: |
| 696 case COMMENT: | 730 case COMMENT: |
| 697 case POSITION: | 731 case POSITION: |
| 698 case STATEMENT_POSITION: | 732 case STATEMENT_POSITION: |
| 699 case EXTERNAL_REFERENCE: | 733 case EXTERNAL_REFERENCE: |
| 700 case INTERNAL_REFERENCE: | 734 case INTERNAL_REFERENCE: |
| 735 case CONST_POOL: |
| 701 case DEBUG_BREAK_SLOT: | 736 case DEBUG_BREAK_SLOT: |
| 702 case NONE: | 737 case NONE: |
| 703 break; | 738 break; |
| 704 case NUMBER_OF_MODES: | 739 case NUMBER_OF_MODES: |
| 705 UNREACHABLE(); | 740 UNREACHABLE(); |
| 706 break; | 741 break; |
| 707 } | 742 } |
| 708 } | 743 } |
| 709 #endif // DEBUG | 744 #endif // DEBUG |
| 710 | 745 |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1366 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1332 state_.written_position = state_.current_position; | 1367 state_.written_position = state_.current_position; |
| 1333 written = true; | 1368 written = true; |
| 1334 } | 1369 } |
| 1335 | 1370 |
| 1336 // Return whether something was written. | 1371 // Return whether something was written. |
| 1337 return written; | 1372 return written; |
| 1338 } | 1373 } |
| 1339 | 1374 |
| 1340 } } // namespace v8::internal | 1375 } } // namespace v8::internal |
| OLD | NEW |