| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 __ mov(prototype, | 168 __ mov(prototype, |
| 169 FieldOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); | 169 FieldOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); |
| 170 // Load the prototype from the initial map. | 170 // Load the prototype from the initial map. |
| 171 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 171 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
| 172 } | 172 } |
| 173 | 173 |
| 174 | 174 |
| 175 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 175 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
| 176 MacroAssembler* masm, int index, Register prototype) { | 176 MacroAssembler* masm, int index, Register prototype) { |
| 177 // Get the global function with the given index. | 177 // Get the global function with the given index. |
| 178 JSFunction* function = JSFunction::cast(Top::global_context()->get(index)); | 178 JSFunction* function = JSFunction::cast( |
| 179 Isolate::Current()->global_context()->get(index)); |
| 179 // Load its initial map. The global functions all have initial maps. | 180 // Load its initial map. The global functions all have initial maps. |
| 180 __ Set(prototype, Immediate(Handle<Map>(function->initial_map()))); | 181 __ Set(prototype, Immediate(Handle<Map>(function->initial_map()))); |
| 181 // Load the prototype from the initial map. | 182 // Load the prototype from the initial map. |
| 182 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 183 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
| 183 } | 184 } |
| 184 | 185 |
| 185 | 186 |
| 186 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm, | 187 void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm, |
| 187 Register receiver, | 188 Register receiver, |
| 188 Register scratch, | 189 Register scratch, |
| (...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2495 // Return the generated code. | 2496 // Return the generated code. |
| 2496 return GetCode(); | 2497 return GetCode(); |
| 2497 } | 2498 } |
| 2498 | 2499 |
| 2499 | 2500 |
| 2500 #undef __ | 2501 #undef __ |
| 2501 | 2502 |
| 2502 } } // namespace v8::internal | 2503 } } // namespace v8::internal |
| 2503 | 2504 |
| 2504 #endif // V8_TARGET_ARCH_IA32 | 2505 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |