| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 __ pop(a3); | 93 __ pop(a3); |
| 94 | 94 |
| 95 // Attempt to allocate new JSFunction in new space. | 95 // Attempt to allocate new JSFunction in new space. |
| 96 __ AllocateInNewSpace(JSFunction::kSize, | 96 __ AllocateInNewSpace(JSFunction::kSize, |
| 97 v0, | 97 v0, |
| 98 a1, | 98 a1, |
| 99 a2, | 99 a2, |
| 100 &gc, | 100 &gc, |
| 101 TAG_OBJECT); | 101 TAG_OBJECT); |
| 102 | 102 |
| 103 int map_index = strict_mode_ == kStrictMode | 103 int map_index = (language_mode_ == CLASSIC_MODE) |
| 104 ? Context::STRICT_MODE_FUNCTION_MAP_INDEX | 104 ? Context::FUNCTION_MAP_INDEX |
| 105 : Context::FUNCTION_MAP_INDEX; | 105 : Context::STRICT_MODE_FUNCTION_MAP_INDEX; |
| 106 | 106 |
| 107 // Compute the function map in the current global context and set that | 107 // Compute the function map in the current global context and set that |
| 108 // as the map of the allocated object. | 108 // as the map of the allocated object. |
| 109 __ lw(a2, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 109 __ lw(a2, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 110 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalContextOffset)); | 110 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalContextOffset)); |
| 111 __ lw(a2, MemOperand(a2, Context::SlotOffset(map_index))); | 111 __ lw(a2, MemOperand(a2, Context::SlotOffset(map_index))); |
| 112 __ sw(a2, FieldMemOperand(v0, HeapObject::kMapOffset)); | 112 __ sw(a2, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 113 | 113 |
| 114 // Initialize the rest of the function. We don't have to update the | 114 // Initialize the rest of the function. We don't have to update the |
| 115 // write barrier because the allocated object is in new space. | 115 // write barrier because the allocated object is in new space. |
| (...skipping 7283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7399 | 7399 |
| 7400 // Fall through when we need to inform the incremental marker. | 7400 // Fall through when we need to inform the incremental marker. |
| 7401 } | 7401 } |
| 7402 | 7402 |
| 7403 | 7403 |
| 7404 #undef __ | 7404 #undef __ |
| 7405 | 7405 |
| 7406 } } // namespace v8::internal | 7406 } } // namespace v8::internal |
| 7407 | 7407 |
| 7408 #endif // V8_TARGET_ARCH_MIPS | 7408 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |