| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1969 return GetCode(CALLBACKS, name); | 1969 return GetCode(CALLBACKS, name); |
| 1970 } | 1970 } |
| 1971 | 1971 |
| 1972 | 1972 |
| 1973 Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, | 1973 Object* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, |
| 1974 int index, | 1974 int index, |
| 1975 Map* transition, | 1975 Map* transition, |
| 1976 String* name) { | 1976 String* name) { |
| 1977 // ----------- S t a t e ------------- | 1977 // ----------- S t a t e ------------- |
| 1978 // -- r0 : value | 1978 // -- r0 : value |
| 1979 // -- r2 : name | 1979 // -- r1 : key |
| 1980 // -- r2 : receiver |
| 1980 // -- lr : return address | 1981 // -- lr : return address |
| 1981 // -- [sp] : receiver | |
| 1982 // ----------------------------------- | 1982 // ----------------------------------- |
| 1983 Label miss; | 1983 Label miss; |
| 1984 | 1984 |
| 1985 __ IncrementCounter(&Counters::keyed_store_field, 1, r1, r3); | 1985 __ IncrementCounter(&Counters::keyed_store_field, 1, r3, r4); |
| 1986 | 1986 |
| 1987 // Check that the name has not changed. | 1987 // Check that the name has not changed. |
| 1988 __ cmp(r2, Operand(Handle<String>(name))); | 1988 __ cmp(r1, Operand(Handle<String>(name))); |
| 1989 __ b(ne, &miss); | 1989 __ b(ne, &miss); |
| 1990 | 1990 |
| 1991 // Load receiver from the stack. | 1991 // r3 is used as scratch register. r1 and r2 keep their values if a jump to |
| 1992 __ ldr(r3, MemOperand(sp)); | 1992 // the miss label is generated. |
| 1993 // r1 is used as scratch register, r3 and r2 might be clobbered. | |
| 1994 GenerateStoreField(masm(), | 1993 GenerateStoreField(masm(), |
| 1995 object, | 1994 object, |
| 1996 index, | 1995 index, |
| 1997 transition, | 1996 transition, |
| 1998 r3, r2, r1, | 1997 r2, r1, r3, |
| 1999 &miss); | 1998 &miss); |
| 2000 __ bind(&miss); | 1999 __ bind(&miss); |
| 2001 | 2000 |
| 2002 __ DecrementCounter(&Counters::keyed_store_field, 1, r1, r3); | 2001 __ DecrementCounter(&Counters::keyed_store_field, 1, r3, r4); |
| 2003 __ mov(r2, Operand(Handle<String>(name))); // restore name register. | |
| 2004 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); | 2002 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Miss)); |
| 2003 |
| 2005 __ Jump(ic, RelocInfo::CODE_TARGET); | 2004 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 2006 | 2005 |
| 2007 // Return the generated code. | 2006 // Return the generated code. |
| 2008 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); | 2007 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); |
| 2009 } | 2008 } |
| 2010 | 2009 |
| 2011 | 2010 |
| 2012 Object* ConstructStubCompiler::CompileConstructStub( | 2011 Object* ConstructStubCompiler::CompileConstructStub( |
| 2013 SharedFunctionInfo* shared) { | 2012 SharedFunctionInfo* shared) { |
| 2014 // ----------- S t a t e ------------- | 2013 // ----------- S t a t e ------------- |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 // Return the generated code. | 2149 // Return the generated code. |
| 2151 return GetCode(); | 2150 return GetCode(); |
| 2152 } | 2151 } |
| 2153 | 2152 |
| 2154 | 2153 |
| 2155 #undef __ | 2154 #undef __ |
| 2156 | 2155 |
| 2157 } } // namespace v8::internal | 2156 } } // namespace v8::internal |
| 2158 | 2157 |
| 2159 #endif // V8_TARGET_ARCH_ARM | 2158 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |