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 4294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4305 __ bind(&allocated); | 4305 __ bind(&allocated); |
4306 int offset = 0; | 4306 int offset = 0; |
4307 __ LoadHeapObject(ebx, instr->hydrogen()->boilerplate()); | 4307 __ LoadHeapObject(ebx, instr->hydrogen()->boilerplate()); |
4308 EmitDeepCopy(instr->hydrogen()->boilerplate(), eax, ebx, &offset); | 4308 EmitDeepCopy(instr->hydrogen()->boilerplate(), eax, ebx, &offset); |
4309 ASSERT_EQ(size, offset); | 4309 ASSERT_EQ(size, offset); |
4310 } | 4310 } |
4311 | 4311 |
4312 | 4312 |
4313 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) { | 4313 void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) { |
4314 ASSERT(ToRegister(instr->context()).is(esi)); | 4314 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4315 Handle<FixedArray> literals(instr->environment()->closure()->literals()); |
4315 Handle<FixedArray> constant_properties = | 4316 Handle<FixedArray> constant_properties = |
4316 instr->hydrogen()->constant_properties(); | 4317 instr->hydrogen()->constant_properties(); |
4317 | 4318 |
4318 // Set up the parameters to the stub/runtime call. | 4319 // Set up the parameters to the stub/runtime call. |
4319 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 4320 __ PushHeapObject(literals); |
4320 __ push(FieldOperand(eax, JSFunction::kLiteralsOffset)); | |
4321 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); | 4321 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); |
4322 __ push(Immediate(constant_properties)); | 4322 __ push(Immediate(constant_properties)); |
4323 int flags = instr->hydrogen()->fast_elements() | 4323 int flags = instr->hydrogen()->fast_elements() |
4324 ? ObjectLiteral::kFastElements | 4324 ? ObjectLiteral::kFastElements |
4325 : ObjectLiteral::kNoFlags; | 4325 : ObjectLiteral::kNoFlags; |
4326 flags |= instr->hydrogen()->has_function() | 4326 flags |= instr->hydrogen()->has_function() |
4327 ? ObjectLiteral::kHasFunction | 4327 ? ObjectLiteral::kHasFunction |
4328 : ObjectLiteral::kNoFlags; | 4328 : ObjectLiteral::kNoFlags; |
4329 __ push(Immediate(Smi::FromInt(flags))); | 4329 __ push(Immediate(Smi::FromInt(flags))); |
4330 | 4330 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4680 this, pointers, Safepoint::kLazyDeopt); | 4680 this, pointers, Safepoint::kLazyDeopt); |
4681 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4681 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4682 } | 4682 } |
4683 | 4683 |
4684 | 4684 |
4685 #undef __ | 4685 #undef __ |
4686 | 4686 |
4687 } } // namespace v8::internal | 4687 } } // namespace v8::internal |
4688 | 4688 |
4689 #endif // V8_TARGET_ARCH_IA32 | 4689 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |