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

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

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/macro-assembler-x64.h ('k') | test/cctest/test-debug.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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 movq(kScratchRegister, 418 movq(kScratchRegister,
419 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(p1 - p0))), 419 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(p1 - p0))),
420 RelocInfo::NONE); 420 RelocInfo::NONE);
421 push(kScratchRegister); 421 push(kScratchRegister);
422 CallRuntime(Runtime::kAbort, 2); 422 CallRuntime(Runtime::kAbort, 2);
423 // will not return here 423 // will not return here
424 int3(); 424 int3();
425 } 425 }
426 426
427 427
428 void MacroAssembler::CallStub(CodeStub* stub) { 428 void MacroAssembler::CallStub(CodeStub* stub, unsigned ast_id) {
429 ASSERT(allow_stub_calls()); // calls are not allowed in some stubs 429 ASSERT(allow_stub_calls()); // calls are not allowed in some stubs
430 Call(stub->GetCode(), RelocInfo::CODE_TARGET); 430 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id);
431 } 431 }
432 432
433 433
434 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) { 434 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) {
435 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. 435 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs.
436 MaybeObject* result = stub->TryGetCode(); 436 MaybeObject* result = stub->TryGetCode();
437 if (!result->IsFailure()) { 437 if (!result->IsFailure()) {
438 call(Handle<Code>(Code::cast(result->ToObjectUnchecked())), 438 call(Handle<Code>(Code::cast(result->ToObjectUnchecked())),
439 RelocInfo::CODE_TARGET); 439 RelocInfo::CODE_TARGET);
440 } 440 }
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 int end_position = pc_offset() + CallSize(destination, rmode); 1598 int end_position = pc_offset() + CallSize(destination, rmode);
1599 #endif 1599 #endif
1600 movq(kScratchRegister, destination, rmode); 1600 movq(kScratchRegister, destination, rmode);
1601 call(kScratchRegister); 1601 call(kScratchRegister);
1602 #ifdef DEBUG 1602 #ifdef DEBUG
1603 CHECK_EQ(pc_offset(), end_position); 1603 CHECK_EQ(pc_offset(), end_position);
1604 #endif 1604 #endif
1605 } 1605 }
1606 1606
1607 1607
1608 void MacroAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) { 1608 void MacroAssembler::Call(Handle<Code> code_object,
1609 RelocInfo::Mode rmode,
1610 unsigned ast_id) {
1609 #ifdef DEBUG 1611 #ifdef DEBUG
1610 int end_position = pc_offset() + CallSize(code_object); 1612 int end_position = pc_offset() + CallSize(code_object);
1611 #endif 1613 #endif
1612 ASSERT(RelocInfo::IsCodeTarget(rmode)); 1614 ASSERT(RelocInfo::IsCodeTarget(rmode));
1613 call(code_object, rmode); 1615 call(code_object, rmode, ast_id);
1614 #ifdef DEBUG 1616 #ifdef DEBUG
1615 CHECK_EQ(end_position, pc_offset()); 1617 CHECK_EQ(end_position, pc_offset());
1616 #endif 1618 #endif
1617 } 1619 }
1618 1620
1619 1621
1620 void MacroAssembler::Pushad() { 1622 void MacroAssembler::Pushad() {
1621 push(rax); 1623 push(rax);
1622 push(rcx); 1624 push(rcx);
1623 push(rdx); 1625 push(rdx);
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 CPU::FlushICache(address_, size_); 2907 CPU::FlushICache(address_, size_);
2906 2908
2907 // Check that the code was patched as expected. 2909 // Check that the code was patched as expected.
2908 ASSERT(masm_.pc_ == address_ + size_); 2910 ASSERT(masm_.pc_ == address_ + size_);
2909 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2911 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2910 } 2912 }
2911 2913
2912 } } // namespace v8::internal 2914 } } // namespace v8::internal
2913 2915
2914 #endif // V8_TARGET_ARCH_X64 2916 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698