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

Side by Side Diff: src/ia32/virtual-frame-ia32.cc

Issue 164251: "Port" (count >= 0) assertion in VirtualFrame::Drop to ia32 and x64. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 4 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 | src/x64/virtual-frame-x64.cc » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 ASSERT(num_args.is_valid()); 958 ASSERT(num_args.is_valid());
959 __ Set(num_args.reg(), Immediate(arg_count)); 959 __ Set(num_args.reg(), Immediate(arg_count));
960 960
961 function.Unuse(); 961 function.Unuse();
962 num_args.Unuse(); 962 num_args.Unuse();
963 return RawCallCodeObject(ic, RelocInfo::CONSTRUCT_CALL); 963 return RawCallCodeObject(ic, RelocInfo::CONSTRUCT_CALL);
964 } 964 }
965 965
966 966
967 void VirtualFrame::Drop(int count) { 967 void VirtualFrame::Drop(int count) {
968 ASSERT(count >= 0);
968 ASSERT(height() >= count); 969 ASSERT(height() >= count);
969 int num_virtual_elements = (element_count() - 1) - stack_pointer_; 970 int num_virtual_elements = (element_count() - 1) - stack_pointer_;
970 971
971 // Emit code to lower the stack pointer if necessary. 972 // Emit code to lower the stack pointer if necessary.
972 if (num_virtual_elements < count) { 973 if (num_virtual_elements < count) {
973 int num_dropped = count - num_virtual_elements; 974 int num_dropped = count - num_virtual_elements;
974 stack_pointer_ -= num_dropped; 975 stack_pointer_ -= num_dropped;
975 __ add(Operand(esp), Immediate(num_dropped * kPointerSize)); 976 __ add(Operand(esp), Immediate(num_dropped * kPointerSize));
976 } 977 }
977 978
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 ASSERT(stack_pointer_ == element_count() - 1); 1076 ASSERT(stack_pointer_ == element_count() - 1);
1076 elements_.Add(FrameElement::MemoryElement()); 1077 elements_.Add(FrameElement::MemoryElement());
1077 stack_pointer_++; 1078 stack_pointer_++;
1078 __ push(immediate); 1079 __ push(immediate);
1079 } 1080 }
1080 1081
1081 1082
1082 #undef __ 1083 #undef __
1083 1084
1084 } } // namespace v8::internal 1085 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698