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 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4057 | 4057 |
4058 | 4058 |
4059 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 4059 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
4060 ASSERT(ToRegister(instr->constructor()).is(a1)); | 4060 ASSERT(ToRegister(instr->constructor()).is(a1)); |
4061 ASSERT(ToRegister(instr->result()).is(v0)); | 4061 ASSERT(ToRegister(instr->result()).is(v0)); |
4062 | 4062 |
4063 __ li(a0, Operand(instr->arity())); | 4063 __ li(a0, Operand(instr->arity())); |
4064 __ li(a2, Operand(instr->hydrogen()->property_cell())); | 4064 __ li(a2, Operand(instr->hydrogen()->property_cell())); |
4065 ElementsKind kind = instr->hydrogen()->elements_kind(); | 4065 ElementsKind kind = instr->hydrogen()->elements_kind(); |
4066 AllocationSiteOverrideMode override_mode = | 4066 AllocationSiteOverrideMode override_mode = |
4067 (AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE) | 4067 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
4068 ? DISABLE_ALLOCATION_SITES | 4068 ? DISABLE_ALLOCATION_SITES |
4069 : DONT_OVERRIDE; | 4069 : DONT_OVERRIDE; |
4070 ContextCheckMode context_mode = CONTEXT_CHECK_NOT_REQUIRED; | 4070 ContextCheckMode context_mode = CONTEXT_CHECK_NOT_REQUIRED; |
4071 | 4071 |
4072 if (instr->arity() == 0) { | 4072 if (instr->arity() == 0) { |
4073 ArrayNoArgumentConstructorStub stub(kind, context_mode, override_mode); | 4073 ArrayNoArgumentConstructorStub stub(kind, context_mode, override_mode); |
4074 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); | 4074 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); |
4075 } else if (instr->arity() == 1) { | 4075 } else if (instr->arity() == 1) { |
4076 Label done; | 4076 Label done; |
4077 if (IsFastPackedElementsKind(kind)) { | 4077 if (IsFastPackedElementsKind(kind)) { |
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5921 __ Subu(scratch, result, scratch); | 5921 __ Subu(scratch, result, scratch); |
5922 __ lw(result, FieldMemOperand(scratch, | 5922 __ lw(result, FieldMemOperand(scratch, |
5923 FixedArray::kHeaderSize - kPointerSize)); | 5923 FixedArray::kHeaderSize - kPointerSize)); |
5924 __ bind(&done); | 5924 __ bind(&done); |
5925 } | 5925 } |
5926 | 5926 |
5927 | 5927 |
5928 #undef __ | 5928 #undef __ |
5929 | 5929 |
5930 } } // namespace v8::internal | 5930 } } // namespace v8::internal |
OLD | NEW |