Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 189143006: MIPS: Symbols for type cells. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3876 } 3876 }
3877 3877
3878 3878
3879 void LCodeGen::DoCallNew(LCallNew* instr) { 3879 void LCodeGen::DoCallNew(LCallNew* instr) {
3880 ASSERT(ToRegister(instr->context()).is(cp)); 3880 ASSERT(ToRegister(instr->context()).is(cp));
3881 ASSERT(ToRegister(instr->constructor()).is(a1)); 3881 ASSERT(ToRegister(instr->constructor()).is(a1));
3882 ASSERT(ToRegister(instr->result()).is(v0)); 3882 ASSERT(ToRegister(instr->result()).is(v0));
3883 3883
3884 __ li(a0, Operand(instr->arity())); 3884 __ li(a0, Operand(instr->arity()));
3885 // No cell in a2 for construct type feedback in optimized code 3885 // No cell in a2 for construct type feedback in optimized code
3886 Handle<Object> undefined_value(isolate()->factory()->undefined_value()); 3886 Handle<Object> megamorphic_symbol =
3887 __ li(a2, Operand(undefined_value)); 3887 TypeFeedbackInfo::MegamorphicSentinel(isolate());
3888 __ li(a2, Operand(megamorphic_symbol));
3888 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS); 3889 CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
3889 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3890 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3890 } 3891 }
3891 3892
3892 3893
3893 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { 3894 void LCodeGen::DoCallNewArray(LCallNewArray* instr) {
3894 ASSERT(ToRegister(instr->context()).is(cp)); 3895 ASSERT(ToRegister(instr->context()).is(cp));
3895 ASSERT(ToRegister(instr->constructor()).is(a1)); 3896 ASSERT(ToRegister(instr->constructor()).is(a1));
3896 ASSERT(ToRegister(instr->result()).is(v0)); 3897 ASSERT(ToRegister(instr->result()).is(v0));
3897 3898
3898 __ li(a0, Operand(instr->arity())); 3899 __ li(a0, Operand(instr->arity()));
3899 __ li(a2, Operand(factory()->undefined_value())); 3900 __ li(a2, Operand(TypeFeedbackInfo::MegamorphicSentinel(isolate())));
3900 ElementsKind kind = instr->hydrogen()->elements_kind(); 3901 ElementsKind kind = instr->hydrogen()->elements_kind();
3901 AllocationSiteOverrideMode override_mode = 3902 AllocationSiteOverrideMode override_mode =
3902 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) 3903 (AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE)
3903 ? DISABLE_ALLOCATION_SITES 3904 ? DISABLE_ALLOCATION_SITES
3904 : DONT_OVERRIDE; 3905 : DONT_OVERRIDE;
3905 3906
3906 if (instr->arity() == 0) { 3907 if (instr->arity() == 0) {
3907 ArrayNoArgumentConstructorStub stub(kind, override_mode); 3908 ArrayNoArgumentConstructorStub stub(kind, override_mode);
3908 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3909 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3909 } else if (instr->arity() == 1) { 3910 } else if (instr->arity() == 1) {
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
5751 __ Subu(scratch, result, scratch); 5752 __ Subu(scratch, result, scratch);
5752 __ lw(result, FieldMemOperand(scratch, 5753 __ lw(result, FieldMemOperand(scratch,
5753 FixedArray::kHeaderSize - kPointerSize)); 5754 FixedArray::kHeaderSize - kPointerSize));
5754 __ bind(&done); 5755 __ bind(&done);
5755 } 5756 }
5756 5757
5757 5758
5758 #undef __ 5759 #undef __
5759 5760
5760 } } // namespace v8::internal 5761 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698