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

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

Issue 6368007: Fix an assertion failure in the full code generator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 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/full-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 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 if (key != NULL && key->handle()->IsSymbol()) { 1981 if (key != NULL && key->handle()->IsSymbol()) {
1982 // Call to a named property, use call IC. 1982 // Call to a named property, use call IC.
1983 { PreservePositionScope scope(masm()->positions_recorder()); 1983 { PreservePositionScope scope(masm()->positions_recorder());
1984 VisitForStackValue(prop->obj()); 1984 VisitForStackValue(prop->obj());
1985 } 1985 }
1986 EmitCallWithIC(expr, key->handle(), RelocInfo::CODE_TARGET); 1986 EmitCallWithIC(expr, key->handle(), RelocInfo::CODE_TARGET);
1987 } else { 1987 } else {
1988 // Call to a keyed property. 1988 // Call to a keyed property.
1989 // For a synthetic property use keyed load IC followed by function call, 1989 // For a synthetic property use keyed load IC followed by function call,
1990 // for a regular property use keyed CallIC. 1990 // for a regular property use keyed CallIC.
1991 { PreservePositionScope scope(masm()->positions_recorder());
1992 VisitForStackValue(prop->obj());
1993 }
1994 if (prop->is_synthetic()) { 1991 if (prop->is_synthetic()) {
1995 { PreservePositionScope scope(masm()->positions_recorder()); 1992 // Do not visit the object and key subexpressions (they are shared
1996 VisitForAccumulatorValue(prop->key()); 1993 // by all occurrences of the same rewritten parameter).
1997 } 1994 ASSERT(prop->obj()->AsVariableProxy() != NULL);
1995 ASSERT(prop->obj()->AsVariableProxy()->var()->AsSlot() != NULL);
1996 Slot* slot = prop->obj()->AsVariableProxy()->var()->AsSlot();
1997 MemOperand operand = EmitSlotSearch(slot, r1);
1998 __ ldr(r1, operand);
1999
2000 ASSERT(prop->key()->AsLiteral() != NULL);
2001 ASSERT(prop->key()->AsLiteral()->handle()->IsSmi());
2002 __ mov(r0, Operand(prop->key()->AsLiteral()->handle()));
2003
1998 // Record source code position for IC call. 2004 // Record source code position for IC call.
1999 SetSourcePosition(prop->position()); 2005 SetSourcePosition(prop->position());
2000 __ pop(r1); // We do not need to keep the receiver.
2001 2006
2002 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 2007 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
2003 EmitCallIC(ic, RelocInfo::CODE_TARGET); 2008 EmitCallIC(ic, RelocInfo::CODE_TARGET);
2004 __ ldr(r1, GlobalObjectOperand()); 2009 __ ldr(r1, GlobalObjectOperand());
2005 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); 2010 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset));
2006 __ Push(r0, r1); // Function, receiver. 2011 __ Push(r0, r1); // Function, receiver.
2007 EmitCallWithStub(expr); 2012 EmitCallWithStub(expr);
2008 } else { 2013 } else {
2014 { PreservePositionScope scope(masm()->positions_recorder());
2015 VisitForStackValue(prop->obj());
2016 }
2009 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET); 2017 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET);
2010 } 2018 }
2011 } 2019 }
2012 } else { 2020 } else {
2013 // Call to some other expression. If the expression is an anonymous 2021 // Call to some other expression. If the expression is an anonymous
2014 // function literal not called in a loop, mark it as one that should 2022 // function literal not called in a loop, mark it as one that should
2015 // also use the fast code generator. 2023 // also use the fast code generator.
2016 FunctionLiteral* lit = fun->AsFunctionLiteral(); 2024 FunctionLiteral* lit = fun->AsFunctionLiteral();
2017 if (lit != NULL && 2025 if (lit != NULL &&
2018 lit->name()->Equals(Heap::empty_string()) && 2026 lit->name()->Equals(Heap::empty_string()) &&
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
3605 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3613 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3606 __ add(pc, r1, Operand(masm_->CodeObject())); 3614 __ add(pc, r1, Operand(masm_->CodeObject()));
3607 } 3615 }
3608 3616
3609 3617
3610 #undef __ 3618 #undef __
3611 3619
3612 } } // namespace v8::internal 3620 } } // namespace v8::internal
3613 3621
3614 #endif // V8_TARGET_ARCH_ARM 3622 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698