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

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

Issue 201573011: Fix false x64 argument index assertion (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-355486.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 2911
2912 2912
2913 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { 2913 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) {
2914 Register arguments = ToRegister(instr->arguments()); 2914 Register arguments = ToRegister(instr->arguments());
2915 Register result = ToRegister(instr->result()); 2915 Register result = ToRegister(instr->result());
2916 2916
2917 if (instr->length()->IsConstantOperand() && 2917 if (instr->length()->IsConstantOperand() &&
2918 instr->index()->IsConstantOperand()) { 2918 instr->index()->IsConstantOperand()) {
2919 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index())); 2919 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index()));
2920 int32_t const_length = ToInteger32(LConstantOperand::cast(instr->length())); 2920 int32_t const_length = ToInteger32(LConstantOperand::cast(instr->length()));
2921 StackArgumentsAccessor args(arguments, const_length, 2921 if (const_index < const_length) {
2922 ARGUMENTS_DONT_CONTAIN_RECEIVER); 2922 StackArgumentsAccessor args(arguments, const_length,
2923 __ movp(result, args.GetArgumentOperand(const_index)); 2923 ARGUMENTS_DONT_CONTAIN_RECEIVER);
2924 __ movp(result, args.GetArgumentOperand(const_index));
2925 } else {
2926 // This code should never be executed; just stop here.
2927 __ int3();
2928 }
2924 } else { 2929 } else {
2925 Register length = ToRegister(instr->length()); 2930 Register length = ToRegister(instr->length());
2926 // There are two words between the frame pointer and the last argument. 2931 // There are two words between the frame pointer and the last argument.
2927 // Subtracting from length accounts for one of them add one more. 2932 // Subtracting from length accounts for one of them add one more.
2928 if (instr->index()->IsRegister()) { 2933 if (instr->index()->IsRegister()) {
2929 __ subl(length, ToRegister(instr->index())); 2934 __ subl(length, ToRegister(instr->index()));
2930 } else { 2935 } else {
2931 __ subl(length, ToOperand(instr->index())); 2936 __ subl(length, ToOperand(instr->index()));
2932 } 2937 }
2933 StackArgumentsAccessor args(arguments, length, 2938 StackArgumentsAccessor args(arguments, length,
(...skipping 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after
5659 FixedArray::kHeaderSize - kPointerSize)); 5664 FixedArray::kHeaderSize - kPointerSize));
5660 __ bind(&done); 5665 __ bind(&done);
5661 } 5666 }
5662 5667
5663 5668
5664 #undef __ 5669 #undef __
5665 5670
5666 } } // namespace v8::internal 5671 } } // namespace v8::internal
5667 5672
5668 #endif // V8_TARGET_ARCH_X64 5673 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-355486.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698