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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 6893156: Unified CallWrapper and PostCallGenerator classes, the former is a (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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/ia32/assembler-ia32.h ('k') | src/ia32/lithium-codegen-ia32.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 (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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 void Assembler::call(byte* entry, RelocInfo::Mode rmode) { 1573 void Assembler::call(byte* entry, RelocInfo::Mode rmode) {
1574 positions_recorder()->WriteRecordedPositions(); 1574 positions_recorder()->WriteRecordedPositions();
1575 EnsureSpace ensure_space(this); 1575 EnsureSpace ensure_space(this);
1576 last_pc_ = pc_; 1576 last_pc_ = pc_;
1577 ASSERT(!RelocInfo::IsCodeTarget(rmode)); 1577 ASSERT(!RelocInfo::IsCodeTarget(rmode));
1578 EMIT(0xE8); 1578 EMIT(0xE8);
1579 emit(entry - (pc_ + sizeof(int32_t)), rmode); 1579 emit(entry - (pc_ + sizeof(int32_t)), rmode);
1580 } 1580 }
1581 1581
1582 1582
1583 int Assembler::CallSize(const Operand& adr) {
1584 // Call size is 1 (opcode) + adr.len_ (operand).
1585 return 1 + adr.len_;
1586 }
1587
1588
1583 void Assembler::call(const Operand& adr) { 1589 void Assembler::call(const Operand& adr) {
1584 positions_recorder()->WriteRecordedPositions(); 1590 positions_recorder()->WriteRecordedPositions();
1585 EnsureSpace ensure_space(this); 1591 EnsureSpace ensure_space(this);
1586 last_pc_ = pc_; 1592 last_pc_ = pc_;
1587 EMIT(0xFF); 1593 EMIT(0xFF);
1588 emit_operand(edx, adr); 1594 emit_operand(edx, adr);
1595 ASSERT(pc_ - last_pc_ == CallSize(adr));
1596 }
1597
1598
1599 int Assembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode) {
1600 return 1 /* EMIT */ + sizeof(uint32_t) /* emit */;
1589 } 1601 }
1590 1602
1591 1603
1592 void Assembler::call(Handle<Code> code, 1604 void Assembler::call(Handle<Code> code,
1593 RelocInfo::Mode rmode, 1605 RelocInfo::Mode rmode,
1594 unsigned ast_id) { 1606 unsigned ast_id) {
1595 positions_recorder()->WriteRecordedPositions(); 1607 positions_recorder()->WriteRecordedPositions();
1596 EnsureSpace ensure_space(this); 1608 EnsureSpace ensure_space(this);
1597 last_pc_ = pc_; 1609 last_pc_ = pc_;
1598 ASSERT(RelocInfo::IsCodeTarget(rmode)); 1610 ASSERT(RelocInfo::IsCodeTarget(rmode));
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2839 fprintf(coverage_log, "%s\n", file_line); 2851 fprintf(coverage_log, "%s\n", file_line);
2840 fflush(coverage_log); 2852 fflush(coverage_log);
2841 } 2853 }
2842 } 2854 }
2843 2855
2844 #endif 2856 #endif
2845 2857
2846 } } // namespace v8::internal 2858 } } // namespace v8::internal
2847 2859
2848 #endif // V8_TARGET_ARCH_IA32 2860 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698