Chromium Code Reviews| Index: src/arm/macro-assembler-arm.cc |
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
| index 6a095d3ccd223e49985609d4b629cbce4654f3cb..65c815fce004bccdff944f75861156b9ae5ba776 100644 |
| --- a/src/arm/macro-assembler-arm.cc |
| +++ b/src/arm/macro-assembler-arm.cc |
| @@ -148,8 +148,9 @@ int MacroAssembler::CallSize( |
| } |
| -void MacroAssembler::Call( |
| - intptr_t target, RelocInfo::Mode rmode, Condition cond) { |
| +void MacroAssembler::Call(intptr_t target, |
| + RelocInfo::Mode rmode, |
| + Condition cond) { |
| // Block constant pool for the call instruction sequence. |
| BlockConstPoolScope block_const_pool(this); |
| #ifdef DEBUG |
| @@ -175,7 +176,7 @@ void MacroAssembler::Call( |
| // Set lr for return at current pc + 8. |
| mov(lr, Operand(pc), LeaveCC, cond); |
| // Emit a ldr<cond> pc, [pc + offset of target in constant pool]. |
| - mov(pc, Operand(target, rmode), LeaveCC, cond); |
| + mov(pc, Operand(target, rmode, ast_id), LeaveCC, cond); |
| ASSERT(kCallTargetAddressOffset == kInstrSize); |
| #endif |
| @@ -214,8 +215,31 @@ int MacroAssembler::CallSize( |
| } |
| -void MacroAssembler::Call( |
| - Handle<Code> code, RelocInfo::Mode rmode, Condition cond) { |
| +void MacroAssembler::CallWithAstId(Handle<Code> code, |
| + RelocInfo::Mode rmode, |
|
Vitaly Repeshko
2011/04/15 01:24:43
nit: Fix indentation.
|
| + unsigned ast_id, |
| + Condition cond) { |
| +#ifdef DEBUG |
| + int pre_position = pc_offset(); |
| +#endif |
| + |
| + ASSERT(rmode == RelocInfo::CODE_TARGET_WITH_ID); |
| + ASSERT(ast_id != kNoASTId); |
| + ASSERT(ast_id_for_reloc_info_ == kNoASTId); |
| + ast_id_for_reloc_info_ = ast_id; |
| + // 'code' is always generated ARM code, never THUMB code |
| + Call(reinterpret_cast<intptr_t>(code.location()), rmode, cond); |
| + |
| +#ifdef DEBUG |
| + int post_position = pc_offset(); |
| + CHECK_EQ(pre_position + CallSize(code, rmode, cond), post_position); |
| +#endif |
| +} |
| + |
| + |
| +void MacroAssembler::Call(Handle<Code> code, |
| + RelocInfo::Mode rmode, |
| + Condition cond) { |
| #ifdef DEBUG |
| int pre_position = pc_offset(); |
| #endif |