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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 7350015: Avoid patching code after the call to binary operation stub in optimized code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 | « no previous file | 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 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 void LCodeGen::CallCodeGeneric(Handle<Code> code, 545 void LCodeGen::CallCodeGeneric(Handle<Code> code,
546 RelocInfo::Mode mode, 546 RelocInfo::Mode mode,
547 LInstruction* instr, 547 LInstruction* instr,
548 SafepointMode safepoint_mode) { 548 SafepointMode safepoint_mode) {
549 ASSERT(instr != NULL); 549 ASSERT(instr != NULL);
550 LPointerMap* pointers = instr->pointer_map(); 550 LPointerMap* pointers = instr->pointer_map();
551 RecordPosition(pointers->position()); 551 RecordPosition(pointers->position());
552 __ Call(code, mode); 552 __ Call(code, mode);
553 RegisterLazyDeoptimization(instr, safepoint_mode); 553 RegisterLazyDeoptimization(instr, safepoint_mode);
554
555 // Signal that we don't inline smi code before these stubs in the
556 // optimizing code generator.
557 if (code->kind() == Code::BINARY_OP_IC ||
558 code->kind() == Code::COMPARE_IC) {
559 __ nop();
560 }
554 } 561 }
555 562
556 563
557 void LCodeGen::CallRuntime(const Runtime::Function* function, 564 void LCodeGen::CallRuntime(const Runtime::Function* function,
558 int num_arguments, 565 int num_arguments,
559 LInstruction* instr) { 566 LInstruction* instr) {
560 ASSERT(instr != NULL); 567 ASSERT(instr != NULL);
561 LPointerMap* pointers = instr->pointer_map(); 568 LPointerMap* pointers = instr->pointer_map();
562 ASSERT(pointers != NULL); 569 ASSERT(pointers != NULL);
563 RecordPosition(pointers->position()); 570 RecordPosition(pointers->position());
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 } 1506 }
1500 1507
1501 1508
1502 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 1509 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
1503 ASSERT(ToRegister(instr->InputAt(0)).is(r1)); 1510 ASSERT(ToRegister(instr->InputAt(0)).is(r1));
1504 ASSERT(ToRegister(instr->InputAt(1)).is(r0)); 1511 ASSERT(ToRegister(instr->InputAt(1)).is(r0));
1505 ASSERT(ToRegister(instr->result()).is(r0)); 1512 ASSERT(ToRegister(instr->result()).is(r0));
1506 1513
1507 BinaryOpStub stub(instr->op(), NO_OVERWRITE); 1514 BinaryOpStub stub(instr->op(), NO_OVERWRITE);
1508 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 1515 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
1516 __ nop(); // Signals no inlined code.
danno 2011/07/13 08:11:10 Is it at all possible to create something like Cal
Søren Thygesen Gjesse 2011/07/13 09:26:15 I am not sure, we already have special handling in
1509 } 1517 }
1510 1518
1511 1519
1512 int LCodeGen::GetNextEmittedBlock(int block) { 1520 int LCodeGen::GetNextEmittedBlock(int block) {
1513 for (int i = block + 1; i < graph()->blocks()->length(); ++i) { 1521 for (int i = block + 1; i < graph()->blocks()->length(); ++i) {
1514 LLabel* label = chunk_->GetLabel(i); 1522 LLabel* label = chunk_->GetLabel(i);
1515 if (!label->HasReplacement()) return i; 1523 if (!label->HasReplacement()) return i;
1516 } 1524 }
1517 return -1; 1525 return -1;
1518 } 1526 }
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after
4392 ASSERT(osr_pc_offset_ == -1); 4400 ASSERT(osr_pc_offset_ == -1);
4393 osr_pc_offset_ = masm()->pc_offset(); 4401 osr_pc_offset_ = masm()->pc_offset();
4394 } 4402 }
4395 4403
4396 4404
4397 4405
4398 4406
4399 #undef __ 4407 #undef __
4400 4408
4401 } } // namespace v8::internal 4409 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698