OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 __ movq(prototype, | 110 __ movq(prototype, |
111 FieldOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); | 111 FieldOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); |
112 // Load the prototype from the initial map. | 112 // Load the prototype from the initial map. |
113 __ movq(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 113 __ movq(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
114 } | 114 } |
115 | 115 |
116 | 116 |
117 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 117 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
118 MacroAssembler* masm, int index, Register prototype) { | 118 MacroAssembler* masm, int index, Register prototype) { |
119 // Get the global function with the given index. | 119 // Get the global function with the given index. |
120 JSFunction* function = JSFunction::cast(Top::global_context()->get(index)); | 120 JSFunction* function = JSFunction::cast( |
| 121 Isolate::Current()->global_context()->get(index)); |
121 // Load its initial map. The global functions all have initial maps. | 122 // Load its initial map. The global functions all have initial maps. |
122 __ Move(prototype, Handle<Map>(function->initial_map())); | 123 __ Move(prototype, Handle<Map>(function->initial_map())); |
123 // Load the prototype from the initial map. | 124 // Load the prototype from the initial map. |
124 __ movq(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 125 __ movq(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
125 } | 126 } |
126 | 127 |
127 | 128 |
128 // Load a fast property out of a holder object (src). In-object properties | 129 // Load a fast property out of a holder object (src). In-object properties |
129 // are loaded directly otherwise the property is loaded from the properties | 130 // are loaded directly otherwise the property is loaded from the properties |
130 // fixed array. | 131 // fixed array. |
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 // Return the generated code. | 2333 // Return the generated code. |
2333 return GetCode(); | 2334 return GetCode(); |
2334 } | 2335 } |
2335 | 2336 |
2336 | 2337 |
2337 #undef __ | 2338 #undef __ |
2338 | 2339 |
2339 } } // namespace v8::internal | 2340 } } // namespace v8::internal |
2340 | 2341 |
2341 #endif // V8_TARGET_ARCH_X64 | 2342 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |