| 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 4087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4098 CALL_AS_FUNCTION, | 4098 CALL_AS_FUNCTION, |
| 4099 EDI_UNINITIALIZED); | 4099 EDI_UNINITIALIZED); |
| 4100 } | 4100 } |
| 4101 | 4101 |
| 4102 | 4102 |
| 4103 void LCodeGen::DoCallNew(LCallNew* instr) { | 4103 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 4104 ASSERT(ToRegister(instr->context()).is(esi)); | 4104 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4105 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4105 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4106 ASSERT(ToRegister(instr->result()).is(eax)); | 4106 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4107 | 4107 |
| 4108 if (FLAG_optimize_constructed_arrays) { |
| 4109 // No cell in ebx for construct type feedback in optimized code |
| 4110 Handle<Object> undefined_value(isolate()->heap()->undefined_value(), |
| 4111 isolate()); |
| 4112 __ mov(ebx, Immediate(undefined_value)); |
| 4113 } |
| 4114 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); |
| 4108 __ Set(eax, Immediate(instr->arity())); | 4115 __ Set(eax, Immediate(instr->arity())); |
| 4109 // No cell in ebx for construct type feedback in optimized code | |
| 4110 Handle<Object> undefined_value(isolate()->heap()->undefined_value()); | |
| 4111 __ mov(ebx, Immediate(undefined_value)); | |
| 4112 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); | |
| 4113 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4116 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
| 4114 } | 4117 } |
| 4115 | 4118 |
| 4116 | 4119 |
| 4117 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4120 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 4118 ASSERT(ToRegister(instr->context()).is(esi)); | 4121 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4119 ASSERT(ToRegister(instr->constructor()).is(edi)); | 4122 ASSERT(ToRegister(instr->constructor()).is(edi)); |
| 4120 ASSERT(ToRegister(instr->result()).is(eax)); | 4123 ASSERT(ToRegister(instr->result()).is(eax)); |
| 4124 ASSERT(FLAG_optimize_constructed_arrays); |
| 4121 | 4125 |
| 4122 __ Set(eax, Immediate(instr->arity())); | |
| 4123 __ mov(ebx, instr->hydrogen()->property_cell()); | 4126 __ mov(ebx, instr->hydrogen()->property_cell()); |
| 4124 Handle<Code> array_construct_code = | 4127 Handle<Code> array_construct_code = |
| 4125 isolate()->builtins()->ArrayConstructCode(); | 4128 isolate()->builtins()->ArrayConstructCode(); |
| 4126 | 4129 __ Set(eax, Immediate(instr->arity())); |
| 4127 CallCode(array_construct_code, RelocInfo::CONSTRUCT_CALL, instr); | 4130 CallCode(array_construct_code, RelocInfo::CONSTRUCT_CALL, instr); |
| 4128 } | 4131 } |
| 4129 | 4132 |
| 4130 | 4133 |
| 4131 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 4134 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
| 4132 CallRuntime(instr->function(), instr->arity(), instr); | 4135 CallRuntime(instr->function(), instr->arity(), instr); |
| 4133 } | 4136 } |
| 4134 | 4137 |
| 4135 | 4138 |
| 4136 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 4139 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
| (...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6219 FixedArray::kHeaderSize - kPointerSize)); | 6222 FixedArray::kHeaderSize - kPointerSize)); |
| 6220 __ bind(&done); | 6223 __ bind(&done); |
| 6221 } | 6224 } |
| 6222 | 6225 |
| 6223 | 6226 |
| 6224 #undef __ | 6227 #undef __ |
| 6225 | 6228 |
| 6226 } } // namespace v8::internal | 6229 } } // namespace v8::internal |
| 6227 | 6230 |
| 6228 #endif // V8_TARGET_ARCH_IA32 | 6231 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |