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

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

Issue 13529018: MIPS: Compile FastCloneShallowArrayStub using Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-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. 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 5384 matching lines...) Expand 10 before | Expand all | Expand 10 after
5395 a2, 5395 a2,
5396 Operand(boilerplate_elements_kind)); 5396 Operand(boilerplate_elements_kind));
5397 } 5397 }
5398 5398
5399 // Set up the parameters to the stub/runtime call. 5399 // Set up the parameters to the stub/runtime call.
5400 __ LoadHeapObject(a3, literals); 5400 __ LoadHeapObject(a3, literals);
5401 __ li(a2, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); 5401 __ li(a2, Operand(Smi::FromInt(instr->hydrogen()->literal_index())));
5402 // Boilerplate already exists, constant elements are never accessed. 5402 // Boilerplate already exists, constant elements are never accessed.
5403 // Pass an empty fixed array. 5403 // Pass an empty fixed array.
5404 __ li(a1, Operand(isolate()->factory()->empty_fixed_array())); 5404 __ li(a1, Operand(isolate()->factory()->empty_fixed_array()));
5405 __ Push(a3, a2, a1);
5406 5405
5407 // Pick the right runtime function or stub to call. 5406 // Pick the right runtime function or stub to call.
5408 int length = instr->hydrogen()->length(); 5407 int length = instr->hydrogen()->length();
5409 if (instr->hydrogen()->IsCopyOnWrite()) { 5408 if (instr->hydrogen()->IsCopyOnWrite()) {
5410 ASSERT(instr->hydrogen()->depth() == 1); 5409 ASSERT(instr->hydrogen()->depth() == 1);
5411 FastCloneShallowArrayStub::Mode mode = 5410 FastCloneShallowArrayStub::Mode mode =
5412 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS; 5411 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS;
5413 FastCloneShallowArrayStub stub(mode, DONT_TRACK_ALLOCATION_SITE, length); 5412 FastCloneShallowArrayStub stub(mode, DONT_TRACK_ALLOCATION_SITE, length);
5414 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5413 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5415 } else if (instr->hydrogen()->depth() > 1) { 5414 } else if (instr->hydrogen()->depth() > 1) {
5415 __ Push(a3, a2, a1);
5416 CallRuntime(Runtime::kCreateArrayLiteral, 3, instr); 5416 CallRuntime(Runtime::kCreateArrayLiteral, 3, instr);
5417 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { 5417 } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) {
5418 __ Push(a3, a2, a1);
5418 CallRuntime(Runtime::kCreateArrayLiteralShallow, 3, instr); 5419 CallRuntime(Runtime::kCreateArrayLiteralShallow, 3, instr);
5419 } else { 5420 } else {
5420 FastCloneShallowArrayStub::Mode mode = 5421 FastCloneShallowArrayStub::Mode mode =
5421 boilerplate_elements_kind == FAST_DOUBLE_ELEMENTS 5422 boilerplate_elements_kind == FAST_DOUBLE_ELEMENTS
5422 ? FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS 5423 ? FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS
5423 : FastCloneShallowArrayStub::CLONE_ELEMENTS; 5424 : FastCloneShallowArrayStub::CLONE_ELEMENTS;
5424 FastCloneShallowArrayStub stub(mode, allocation_site_mode, length); 5425 FastCloneShallowArrayStub stub(mode, allocation_site_mode, length);
5425 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5426 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
5426 } 5427 }
5427 } 5428 }
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
6097 __ Subu(scratch, result, scratch); 6098 __ Subu(scratch, result, scratch);
6098 __ lw(result, FieldMemOperand(scratch, 6099 __ lw(result, FieldMemOperand(scratch,
6099 FixedArray::kHeaderSize - kPointerSize)); 6100 FixedArray::kHeaderSize - kPointerSize));
6100 __ bind(&done); 6101 __ bind(&done);
6101 } 6102 }
6102 6103
6103 6104
6104 #undef __ 6105 #undef __
6105 6106
6106 } } // namespace v8::internal 6107 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698