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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 __ ldr(prototype, | 148 __ ldr(prototype, |
149 FieldMemOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); | 149 FieldMemOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); |
150 // Load the prototype from the initial map. | 150 // Load the prototype from the initial map. |
151 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); | 151 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); |
152 } | 152 } |
153 | 153 |
154 | 154 |
155 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 155 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
156 MacroAssembler* masm, int index, Register prototype) { | 156 MacroAssembler* masm, int index, Register prototype) { |
157 // Get the global function with the given index. | 157 // Get the global function with the given index. |
158 JSFunction* function = JSFunction::cast(Top::global_context()->get(index)); | 158 JSFunction* function = JSFunction::cast( |
| 159 Isolate::Current()->global_context()->get(index)); |
159 // Load its initial map. The global functions all have initial maps. | 160 // Load its initial map. The global functions all have initial maps. |
160 __ Move(prototype, Handle<Map>(function->initial_map())); | 161 __ Move(prototype, Handle<Map>(function->initial_map())); |
161 // Load the prototype from the initial map. | 162 // Load the prototype from the initial map. |
162 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); | 163 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); |
163 } | 164 } |
164 | 165 |
165 | 166 |
166 // Load a fast property out of a holder object (src). In-object properties | 167 // Load a fast property out of a holder object (src). In-object properties |
167 // are loaded directly otherwise the property is loaded from the properties | 168 // are loaded directly otherwise the property is loaded from the properties |
168 // fixed array. | 169 // fixed array. |
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 // Return the generated code. | 2151 // Return the generated code. |
2151 return GetCode(); | 2152 return GetCode(); |
2152 } | 2153 } |
2153 | 2154 |
2154 | 2155 |
2155 #undef __ | 2156 #undef __ |
2156 | 2157 |
2157 } } // namespace v8::internal | 2158 } } // namespace v8::internal |
2158 | 2159 |
2159 #endif // V8_TARGET_ARCH_ARM | 2160 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |