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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 259057: Fix lint error. Clean up fixups of calls to builtins. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 bool resolved; 356 bool resolved;
357 Handle<Code> code = ResolveBuiltin(id, &resolved); 357 Handle<Code> code = ResolveBuiltin(id, &resolved);
358 358
359 const char* name = Builtins::GetName(id); 359 const char* name = Builtins::GetName(id);
360 int argc = Builtins::GetArgumentsCount(id); 360 int argc = Builtins::GetArgumentsCount(id);
361 361
362 movq(target, code, RelocInfo::EMBEDDED_OBJECT); 362 movq(target, code, RelocInfo::EMBEDDED_OBJECT);
363 if (!resolved) { 363 if (!resolved) {
364 uint32_t flags = 364 uint32_t flags =
365 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | 365 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
366 Bootstrapper::FixupFlagsIsPCRelative::encode(false) |
367 Bootstrapper::FixupFlagsUseCodeObject::encode(true); 366 Bootstrapper::FixupFlagsUseCodeObject::encode(true);
368 Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name }; 367 Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name };
369 unresolved_.Add(entry); 368 unresolved_.Add(entry);
370 } 369 }
371 addq(target, Immediate(Code::kHeaderSize - kHeapObjectTag)); 370 addq(target, Immediate(Code::kHeaderSize - kHeapObjectTag));
372 } 371 }
373 372
374 373
375 Handle<Code> MacroAssembler::ResolveBuiltin(Builtins::JavaScript id, 374 Handle<Code> MacroAssembler::ResolveBuiltin(Builtins::JavaScript id,
376 bool* resolved) { 375 bool* resolved) {
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 InvokeCode(Handle<Code>(code), expected, expected, 1548 InvokeCode(Handle<Code>(code), expected, expected,
1550 RelocInfo::CODE_TARGET, flag); 1549 RelocInfo::CODE_TARGET, flag);
1551 1550
1552 const char* name = Builtins::GetName(id); 1551 const char* name = Builtins::GetName(id);
1553 int argc = Builtins::GetArgumentsCount(id); 1552 int argc = Builtins::GetArgumentsCount(id);
1554 // The target address for the jump is stored as an immediate at offset 1553 // The target address for the jump is stored as an immediate at offset
1555 // kInvokeCodeAddressOffset. 1554 // kInvokeCodeAddressOffset.
1556 if (!resolved) { 1555 if (!resolved) {
1557 uint32_t flags = 1556 uint32_t flags =
1558 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | 1557 Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
1559 Bootstrapper::FixupFlagsIsPCRelative::encode(true) |
1560 Bootstrapper::FixupFlagsUseCodeObject::encode(false); 1558 Bootstrapper::FixupFlagsUseCodeObject::encode(false);
1561 Unresolved entry = 1559 Unresolved entry =
1562 { pc_offset() - kCallTargetAddressOffset, flags, name }; 1560 { pc_offset() - kCallTargetAddressOffset, flags, name };
1563 unresolved_.Add(entry); 1561 unresolved_.Add(entry);
1564 } 1562 }
1565 } 1563 }
1566 1564
1567 1565
1568 void MacroAssembler::InvokePrologue(const ParameterCount& expected, 1566 void MacroAssembler::InvokePrologue(const ParameterCount& expected,
1569 const ParameterCount& actual, 1567 const ParameterCount& actual,
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 // Indicate that code has changed. 2155 // Indicate that code has changed.
2158 CPU::FlushICache(address_, size_); 2156 CPU::FlushICache(address_, size_);
2159 2157
2160 // Check that the code was patched as expected. 2158 // Check that the code was patched as expected.
2161 ASSERT(masm_.pc_ == address_ + size_); 2159 ASSERT(masm_.pc_ == address_ + size_);
2162 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2160 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2163 } 2161 }
2164 2162
2165 2163
2166 } } // namespace v8::internal 2164 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698