| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 __ pop(r3); | 91 __ pop(r3); |
| 92 | 92 |
| 93 // Attempt to allocate new JSFunction in new space. | 93 // Attempt to allocate new JSFunction in new space. |
| 94 __ AllocateInNewSpace(JSFunction::kSize, | 94 __ AllocateInNewSpace(JSFunction::kSize, |
| 95 r0, | 95 r0, |
| 96 r1, | 96 r1, |
| 97 r2, | 97 r2, |
| 98 &gc, | 98 &gc, |
| 99 TAG_OBJECT); | 99 TAG_OBJECT); |
| 100 | 100 |
| 101 int map_index = strict_mode_ == kStrictMode | 101 int map_index = (language_mode_ == CLASSIC_MODE) |
| 102 ? Context::STRICT_MODE_FUNCTION_MAP_INDEX | 102 ? Context::FUNCTION_MAP_INDEX |
| 103 : Context::FUNCTION_MAP_INDEX; | 103 : Context::STRICT_MODE_FUNCTION_MAP_INDEX; |
| 104 | 104 |
| 105 // Compute the function map in the current global context and set that | 105 // Compute the function map in the current global context and set that |
| 106 // as the map of the allocated object. | 106 // as the map of the allocated object. |
| 107 __ ldr(r2, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 107 __ ldr(r2, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 108 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalContextOffset)); | 108 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalContextOffset)); |
| 109 __ ldr(r2, MemOperand(r2, Context::SlotOffset(map_index))); | 109 __ ldr(r2, MemOperand(r2, Context::SlotOffset(map_index))); |
| 110 __ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); | 110 __ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 111 | 111 |
| 112 // Initialize the rest of the function. We don't have to update the | 112 // Initialize the rest of the function. We don't have to update the |
| 113 // write barrier because the allocated object is in new space. | 113 // write barrier because the allocated object is in new space. |
| (...skipping 7068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7182 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, | 7182 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, |
| 7183 &slow_elements); | 7183 &slow_elements); |
| 7184 __ Ret(); | 7184 __ Ret(); |
| 7185 } | 7185 } |
| 7186 | 7186 |
| 7187 #undef __ | 7187 #undef __ |
| 7188 | 7188 |
| 7189 } } // namespace v8::internal | 7189 } } // namespace v8::internal |
| 7190 | 7190 |
| 7191 #endif // V8_TARGET_ARCH_ARM | 7191 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |