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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 7925007: Enable inlining functions with contexts different than their caller. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with HEAD> Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 46d80506edd887ce2f1b4915a3f6e04e0248fad0..ff92be13f3cd40d1abf085ea17e331c325869c64 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -490,14 +490,18 @@ void LCodeGen::CallRuntimeFromDeferred(Runtime::FunctionId id,
int argc,
LInstruction* instr,
LOperand* context) {
- ASSERT(context->IsRegister() || context->IsStackSlot());
if (context->IsRegister()) {
if (!ToRegister(context).is(esi)) {
__ mov(esi, ToRegister(context));
}
- } else {
- // Context is stack slot.
+ } else if (context->IsStackSlot()) {
__ mov(esi, ToOperand(context));
+ } else if (context->IsConstantOperand()) {
+ Handle<Object> literal =
+ chunk_->LookupLiteral(LConstantOperand::cast(context));
+ LoadHeapObject(esi, Handle<Context>::cast(literal));
+ } else {
+ UNREACHABLE();
}
__ CallRuntimeSaveDoubles(id);
@@ -1209,8 +1213,13 @@ void LCodeGen::DoConstantD(LConstantD* instr) {
void LCodeGen::DoConstantT(LConstantT* instr) {
- ASSERT(instr->result()->IsRegister());
- __ Set(ToRegister(instr->result()), Immediate(instr->value()));
+ Register reg = ToRegister(instr->result());
+ Handle<Object> handle = instr->value();
+ if (handle->IsHeapObject()) {
+ LoadHeapObject(reg, Handle<HeapObject>::cast(handle));
+ } else {
+ __ Set(reg, Immediate(handle));
+ }
}
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698