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

Side by Side Diff: src/arm/deoptimizer-arm.cc

Issue 6778018: Only pass isolate parameter to C helper functions that need it. (Closed)
Patch Set: 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
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/full-codegen-arm.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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); 579 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
580 } else { 580 } else {
581 __ mov(r3, lr); 581 __ mov(r3, lr);
582 // Correct two words for bailout id and return address. 582 // Correct two words for bailout id and return address.
583 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); 583 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize)));
584 } 584 }
585 __ sub(r4, fp, r4); 585 __ sub(r4, fp, r4);
586 586
587 // Allocate a new deoptimizer object. 587 // Allocate a new deoptimizer object.
588 // Pass four arguments in r0 to r3 and fifth argument on stack. 588 // Pass four arguments in r0 to r3 and fifth argument on stack.
589 __ PrepareCallCFunction(5, r5); 589 __ PrepareCallCFunction(6, r5);
590 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 590 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
591 __ mov(r1, Operand(type())); // bailout type, 591 __ mov(r1, Operand(type())); // bailout type,
592 // r2: bailout id already loaded. 592 // r2: bailout id already loaded.
593 // r3: code address or 0 already loaded. 593 // r3: code address or 0 already loaded.
594 __ str(r4, MemOperand(sp, 0 * kPointerSize)); // Fp-to-sp delta. 594 __ str(r4, MemOperand(sp, 0 * kPointerSize)); // Fp-to-sp delta.
595 __ mov(r5, Operand(ExternalReference::isolate_address()));
596 __ str(r5, MemOperand(sp, 1 * kPointerSize)); // Isolate.
595 // Call Deoptimizer::New(). 597 // Call Deoptimizer::New().
596 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 5); 598 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
597 599
598 // Preserve "deoptimizer" object in register r0 and get the input 600 // Preserve "deoptimizer" object in register r0 and get the input
599 // frame descriptor pointer to r1 (deoptimizer->input_); 601 // frame descriptor pointer to r1 (deoptimizer->input_);
600 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); 602 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset()));
601 603
602 // Copy core registers into FrameDescription::registers_[kNumRegisters]. 604 // Copy core registers into FrameDescription::registers_[kNumRegisters].
603 ASSERT(Register::kNumRegisters == kNumberOfRegisters); 605 ASSERT(Register::kNumRegisters == kNumberOfRegisters);
604 for (int i = 0; i < kNumberOfRegisters; i++) { 606 for (int i = 0; i < kNumberOfRegisters; i++) {
605 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); 607 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
606 __ ldr(r2, MemOperand(sp, i * kPointerSize)); 608 __ ldr(r2, MemOperand(sp, i * kPointerSize));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 __ push(ip); 728 __ push(ip);
727 __ b(&done); 729 __ b(&done);
728 ASSERT(masm()->pc_offset() - start == table_entry_size_); 730 ASSERT(masm()->pc_offset() - start == table_entry_size_);
729 } 731 }
730 __ bind(&done); 732 __ bind(&done);
731 } 733 }
732 734
733 #undef __ 735 #undef __
734 736
735 } } // namespace v8::internal 737 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698