| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 269 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
| 270 } | 270 } |
| 271 | 271 |
| 272 | 272 |
| 273 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 273 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
| 274 MacroAssembler* masm, | 274 MacroAssembler* masm, |
| 275 int index, | 275 int index, |
| 276 Register prototype, | 276 Register prototype, |
| 277 Label* miss) { | 277 Label* miss) { |
| 278 // Check we're still in the same context. | 278 // Check we're still in the same context. |
| 279 __ cmp(Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)), | 279 __ cmp(Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)), |
| 280 masm->isolate()->global()); | 280 masm->isolate()->global_object()); |
| 281 __ j(not_equal, miss); | 281 __ j(not_equal, miss); |
| 282 // Get the global function with the given index. | 282 // Get the global function with the given index. |
| 283 Handle<JSFunction> function( | 283 Handle<JSFunction> function( |
| 284 JSFunction::cast(masm->isolate()->native_context()->get(index))); | 284 JSFunction::cast(masm->isolate()->native_context()->get(index))); |
| 285 // Load its initial map. The global functions all have initial maps. | 285 // Load its initial map. The global functions all have initial maps. |
| 286 __ Set(prototype, Immediate(Handle<Map>(function->initial_map()))); | 286 __ Set(prototype, Immediate(Handle<Map>(function->initial_map()))); |
| 287 // Load the prototype from the initial map. | 287 // Load the prototype from the initial map. |
| 288 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); | 288 __ mov(prototype, FieldOperand(prototype, Map::kPrototypeOffset)); |
| 289 } | 289 } |
| 290 | 290 |
| (...skipping 4040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4331 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 4331 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
| 4332 } | 4332 } |
| 4333 } | 4333 } |
| 4334 | 4334 |
| 4335 | 4335 |
| 4336 #undef __ | 4336 #undef __ |
| 4337 | 4337 |
| 4338 } } // namespace v8::internal | 4338 } } // namespace v8::internal |
| 4339 | 4339 |
| 4340 #endif // V8_TARGET_ARCH_IA32 | 4340 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |