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

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

Issue 10831172: Introduced TypeFeedbackId and BailoutId types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review feedback. Created 8 years, 4 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/mips/macro-assembler-mips.h ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 positions_recorder()->WriteRecordedPositions(); 2552 positions_recorder()->WriteRecordedPositions();
2553 li(t9, Operand(target_int, rmode), CONSTANT_SIZE); 2553 li(t9, Operand(target_int, rmode), CONSTANT_SIZE);
2554 Call(t9, cond, rs, rt, bd); 2554 Call(t9, cond, rs, rt, bd);
2555 ASSERT_EQ(CallSize(target, rmode, cond, rs, rt, bd), 2555 ASSERT_EQ(CallSize(target, rmode, cond, rs, rt, bd),
2556 SizeOfCodeGeneratedSince(&start)); 2556 SizeOfCodeGeneratedSince(&start));
2557 } 2557 }
2558 2558
2559 2559
2560 int MacroAssembler::CallSize(Handle<Code> code, 2560 int MacroAssembler::CallSize(Handle<Code> code,
2561 RelocInfo::Mode rmode, 2561 RelocInfo::Mode rmode,
2562 unsigned ast_id, 2562 TypeFeedbackId ast_id,
2563 Condition cond, 2563 Condition cond,
2564 Register rs, 2564 Register rs,
2565 const Operand& rt, 2565 const Operand& rt,
2566 BranchDelaySlot bd) { 2566 BranchDelaySlot bd) {
2567 return CallSize(reinterpret_cast<Address>(code.location()), 2567 return CallSize(reinterpret_cast<Address>(code.location()),
2568 rmode, cond, rs, rt, bd); 2568 rmode, cond, rs, rt, bd);
2569 } 2569 }
2570 2570
2571 2571
2572 void MacroAssembler::Call(Handle<Code> code, 2572 void MacroAssembler::Call(Handle<Code> code,
2573 RelocInfo::Mode rmode, 2573 RelocInfo::Mode rmode,
2574 unsigned ast_id, 2574 TypeFeedbackId ast_id,
2575 Condition cond, 2575 Condition cond,
2576 Register rs, 2576 Register rs,
2577 const Operand& rt, 2577 const Operand& rt,
2578 BranchDelaySlot bd) { 2578 BranchDelaySlot bd) {
2579 BlockTrampolinePoolScope block_trampoline_pool(this); 2579 BlockTrampolinePoolScope block_trampoline_pool(this);
2580 Label start; 2580 Label start;
2581 bind(&start); 2581 bind(&start);
2582 ASSERT(RelocInfo::IsCodeTarget(rmode)); 2582 ASSERT(RelocInfo::IsCodeTarget(rmode));
2583 if (rmode == RelocInfo::CODE_TARGET && ast_id != kNoASTId) { 2583 if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) {
2584 SetRecordedAstId(ast_id); 2584 SetRecordedAstId(ast_id);
2585 rmode = RelocInfo::CODE_TARGET_WITH_ID; 2585 rmode = RelocInfo::CODE_TARGET_WITH_ID;
2586 } 2586 }
2587 Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd); 2587 Call(reinterpret_cast<Address>(code.location()), rmode, cond, rs, rt, bd);
2588 ASSERT_EQ(CallSize(code, rmode, ast_id, cond, rs, rt, bd), 2588 ASSERT_EQ(CallSize(code, rmode, ast_id, cond, rs, rt, bd),
2589 SizeOfCodeGeneratedSince(&start)); 2589 SizeOfCodeGeneratedSince(&start));
2590 } 2590 }
2591 2591
2592 2592
2593 void MacroAssembler::Ret(Condition cond, 2593 void MacroAssembler::Ret(Condition cond,
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3904 3904
3905 // ----------------------------------------------------------------------------- 3905 // -----------------------------------------------------------------------------
3906 // Runtime calls. 3906 // Runtime calls.
3907 3907
3908 void MacroAssembler::CallStub(CodeStub* stub, 3908 void MacroAssembler::CallStub(CodeStub* stub,
3909 Condition cond, 3909 Condition cond,
3910 Register r1, 3910 Register r1,
3911 const Operand& r2, 3911 const Operand& r2,
3912 BranchDelaySlot bd) { 3912 BranchDelaySlot bd) {
3913 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. 3913 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
3914 Call(stub->GetCode(), RelocInfo::CODE_TARGET, kNoASTId, cond, r1, r2, bd); 3914 Call(stub->GetCode(), RelocInfo::CODE_TARGET, TypeFeedbackId::None(),
3915 cond, r1, r2, bd);
3915 } 3916 }
3916 3917
3917 3918
3918 void MacroAssembler::TailCallStub(CodeStub* stub) { 3919 void MacroAssembler::TailCallStub(CodeStub* stub) {
3919 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 3920 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe());
3920 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); 3921 Jump(stub->GetCode(), RelocInfo::CODE_TARGET);
3921 } 3922 }
3922 3923
3923 3924
3924 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 3925 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
5459 opcode == BGTZL); 5460 opcode == BGTZL);
5460 opcode = (cond == eq) ? BEQ : BNE; 5461 opcode = (cond == eq) ? BEQ : BNE;
5461 instr = (instr & ~kOpcodeMask) | opcode; 5462 instr = (instr & ~kOpcodeMask) | opcode;
5462 masm_.emit(instr); 5463 masm_.emit(instr);
5463 } 5464 }
5464 5465
5465 5466
5466 } } // namespace v8::internal 5467 } } // namespace v8::internal
5467 5468
5468 #endif // V8_TARGET_ARCH_MIPS 5469 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698