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

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

Issue 1816553002: Introduce a code stub version of Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 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
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 2966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 } 2977 }
2978 2978
2979 2979
2980 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2980 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2981 Register scratch = scratch0(); 2981 Register scratch = scratch0();
2982 Register temp = scratch1(); 2982 Register temp = scratch1();
2983 Register result = ToRegister(instr->result()); 2983 Register result = ToRegister(instr->result());
2984 2984
2985 if (instr->hydrogen()->from_inlined()) { 2985 if (instr->hydrogen()->from_inlined()) {
2986 __ Subu(result, sp, 2 * kPointerSize); 2986 __ Subu(result, sp, 2 * kPointerSize);
2987 } else { 2987 } else if (instr->hydrogen()->arguments_adaptor()) {
2988 // Check if the calling frame is an arguments adaptor frame. 2988 // Check if the calling frame is an arguments adaptor frame.
2989 Label done, adapted; 2989 Label done, adapted;
2990 __ lw(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 2990 __ lw(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2991 __ lw(result, 2991 __ lw(result,
2992 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); 2992 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset));
2993 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 2993 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2994 2994
2995 // Result is the frame pointer for the frame if not adapted and for the real 2995 // Result is the frame pointer for the frame if not adapted and for the real
2996 // frame below the adaptor frame if adapted. 2996 // frame below the adaptor frame if adapted.
2997 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne). 2997 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne).
2998 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq). 2998 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq).
2999 } else {
3000 __ mov(result, fp);
2999 } 3001 }
3000 } 3002 }
3001 3003
3002 3004
3003 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 3005 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
3004 Register elem = ToRegister(instr->elements()); 3006 Register elem = ToRegister(instr->elements());
3005 Register result = ToRegister(instr->result()); 3007 Register result = ToRegister(instr->result());
3006 3008
3007 Label done; 3009 Label done;
3008 3010
(...skipping 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after
5560 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { 5562 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
5561 Register context = ToRegister(instr->context()); 5563 Register context = ToRegister(instr->context());
5562 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); 5564 __ sw(context, MemOperand(fp, StandardFrameConstants::kContextOffset));
5563 } 5565 }
5564 5566
5565 5567
5566 #undef __ 5568 #undef __
5567 5569
5568 } // namespace internal 5570 } // namespace internal
5569 } // namespace v8 5571 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698