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

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

Issue 714663002: Fix has_constant_parameter_count() confusion in LReturn (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-431602.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 if (instr->has_constant_parameter_count()) { 3043 if (instr->has_constant_parameter_count()) {
3044 int parameter_count = ToInteger32(instr->constant_parameter_count()); 3044 int parameter_count = ToInteger32(instr->constant_parameter_count());
3045 if (dynamic_frame_alignment && FLAG_debug_code) { 3045 if (dynamic_frame_alignment && FLAG_debug_code) {
3046 __ cmp(Operand(esp, 3046 __ cmp(Operand(esp,
3047 (parameter_count + extra_value_count) * kPointerSize), 3047 (parameter_count + extra_value_count) * kPointerSize),
3048 Immediate(kAlignmentZapValue)); 3048 Immediate(kAlignmentZapValue));
3049 __ Assert(equal, kExpectedAlignmentMarker); 3049 __ Assert(equal, kExpectedAlignmentMarker);
3050 } 3050 }
3051 __ Ret((parameter_count + extra_value_count) * kPointerSize, ecx); 3051 __ Ret((parameter_count + extra_value_count) * kPointerSize, ecx);
3052 } else { 3052 } else {
3053 DCHECK(info()->IsStub()); // Functions would need to drop one more value.
3053 Register reg = ToRegister(instr->parameter_count()); 3054 Register reg = ToRegister(instr->parameter_count());
3054 // The argument count parameter is a smi 3055 // The argument count parameter is a smi
3055 __ SmiUntag(reg); 3056 __ SmiUntag(reg);
3056 Register return_addr_reg = reg.is(ecx) ? ebx : ecx; 3057 Register return_addr_reg = reg.is(ecx) ? ebx : ecx;
3057 if (dynamic_frame_alignment && FLAG_debug_code) { 3058 if (dynamic_frame_alignment && FLAG_debug_code) {
3058 DCHECK(extra_value_count == 2); 3059 DCHECK(extra_value_count == 2);
3059 __ cmp(Operand(esp, reg, times_pointer_size, 3060 __ cmp(Operand(esp, reg, times_pointer_size,
3060 extra_value_count * kPointerSize), 3061 extra_value_count * kPointerSize),
3061 Immediate(kAlignmentZapValue)); 3062 Immediate(kAlignmentZapValue));
3062 __ Assert(equal, kExpectedAlignmentMarker); 3063 __ Assert(equal, kExpectedAlignmentMarker);
(...skipping 3234 matching lines...) Expand 10 before | Expand all | Expand 10 after
6297 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6298 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6298 RecordSafepoint(Safepoint::kNoLazyDeopt); 6299 RecordSafepoint(Safepoint::kNoLazyDeopt);
6299 } 6300 }
6300 6301
6301 6302
6302 #undef __ 6303 #undef __
6303 6304
6304 } } // namespace v8::internal 6305 } } // namespace v8::internal
6305 6306
6306 #endif // V8_TARGET_ARCH_X87 6307 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-431602.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698