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

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 6793016: Record AST ids in relocation info at spots where we collect dynamic type feedback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: last change Created 9 years, 8 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/x64/assembler-x64.cc ('k') | src/x64/full-codegen-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 pc_ += sizeof(uint64_t); 54 pc_ += sizeof(uint64_t);
55 } 55 }
56 56
57 57
58 void Assembler::emitw(uint16_t x) { 58 void Assembler::emitw(uint16_t x) {
59 Memory::uint16_at(pc_) = x; 59 Memory::uint16_at(pc_) = x;
60 pc_ += sizeof(uint16_t); 60 pc_ += sizeof(uint16_t);
61 } 61 }
62 62
63 63
64 void Assembler::emit_code_target(Handle<Code> target, RelocInfo::Mode rmode) { 64 void Assembler::emit_code_target(Handle<Code> target,
65 RelocInfo::Mode rmode,
66 unsigned ast_id) {
65 ASSERT(RelocInfo::IsCodeTarget(rmode)); 67 ASSERT(RelocInfo::IsCodeTarget(rmode));
66 RecordRelocInfo(rmode); 68 if (rmode == RelocInfo::CODE_TARGET && ast_id != kNoASTId) {
69 RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, ast_id);
70 } else {
71 RecordRelocInfo(rmode);
72 }
67 int current = code_targets_.length(); 73 int current = code_targets_.length();
68 if (current > 0 && code_targets_.last().is_identical_to(target)) { 74 if (current > 0 && code_targets_.last().is_identical_to(target)) {
69 // Optimization if we keep jumping to the same code target. 75 // Optimization if we keep jumping to the same code target.
70 emitl(current - 1); 76 emitl(current - 1);
71 } else { 77 } else {
72 code_targets_.Add(target); 78 code_targets_.Add(target);
73 emitl(current); 79 emitl(current);
74 } 80 }
75 } 81 }
76 82
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 ASSERT(len_ == 1 || len_ == 2); 453 ASSERT(len_ == 1 || len_ == 2);
448 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 454 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
449 *p = disp; 455 *p = disp;
450 len_ += sizeof(int32_t); 456 len_ += sizeof(int32_t);
451 } 457 }
452 458
453 459
454 } } // namespace v8::internal 460 } } // namespace v8::internal
455 461
456 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 462 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698