| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3974 | 3974 |
| 3975 | 3975 |
| 3976 void LCodeGen::DoCallNew(LCallNew* instr) { | 3976 void LCodeGen::DoCallNew(LCallNew* instr) { |
| 3977 ASSERT(ToRegister(instr->context()).is(cp)); | 3977 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3978 ASSERT(ToRegister(instr->constructor()).is(a1)); | 3978 ASSERT(ToRegister(instr->constructor()).is(a1)); |
| 3979 ASSERT(ToRegister(instr->result()).is(v0)); | 3979 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3980 | 3980 |
| 3981 __ li(a0, Operand(instr->arity())); | 3981 __ li(a0, Operand(instr->arity())); |
| 3982 // No cell in a2 for construct type feedback in optimized code | 3982 // No cell in a2 for construct type feedback in optimized code |
| 3983 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 3983 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
| 3984 CallConstructStub stub(isolate(), NO_CALL_FUNCTION_FLAGS); | 3984 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); |
| 3985 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); | 3985 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); |
| 3986 } | 3986 } |
| 3987 | 3987 |
| 3988 | 3988 |
| 3989 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 3989 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
| 3990 ASSERT(ToRegister(instr->context()).is(cp)); | 3990 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3991 ASSERT(ToRegister(instr->constructor()).is(a1)); | 3991 ASSERT(ToRegister(instr->constructor()).is(a1)); |
| 3992 ASSERT(ToRegister(instr->result()).is(v0)); | 3992 ASSERT(ToRegister(instr->result()).is(v0)); |
| 3993 | 3993 |
| 3994 __ li(a0, Operand(instr->arity())); | 3994 __ li(a0, Operand(instr->arity())); |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5897 __ lw(result, FieldMemOperand(scratch, | 5897 __ lw(result, FieldMemOperand(scratch, |
| 5898 FixedArray::kHeaderSize - kPointerSize)); | 5898 FixedArray::kHeaderSize - kPointerSize)); |
| 5899 __ bind(deferred->exit()); | 5899 __ bind(deferred->exit()); |
| 5900 __ bind(&done); | 5900 __ bind(&done); |
| 5901 } | 5901 } |
| 5902 | 5902 |
| 5903 | 5903 |
| 5904 #undef __ | 5904 #undef __ |
| 5905 | 5905 |
| 5906 } } // namespace v8::internal | 5906 } } // namespace v8::internal |
| OLD | NEW |