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

Side by Side Diff: src/x64/virtual-frame-x64.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 | « src/ia32/virtual-frame-ia32.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 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 void VirtualFrame::EmitPush(Handle<Object> value) { 200 void VirtualFrame::EmitPush(Handle<Object> value) {
201 ASSERT(stack_pointer_ == element_count() - 1); 201 ASSERT(stack_pointer_ == element_count() - 1);
202 elements_.Add(FrameElement::MemoryElement()); 202 elements_.Add(FrameElement::MemoryElement());
203 stack_pointer_++; 203 stack_pointer_++;
204 __ Push(value); 204 __ Push(value);
205 } 205 }
206 206
207 207
208 void VirtualFrame::Drop(int count) { 208 void VirtualFrame::Drop(int count) {
209 ASSERT(count >= 0);
209 ASSERT(height() >= count); 210 ASSERT(height() >= count);
210 int num_virtual_elements = (element_count() - 1) - stack_pointer_; 211 int num_virtual_elements = (element_count() - 1) - stack_pointer_;
211 212
212 // Emit code to lower the stack pointer if necessary. 213 // Emit code to lower the stack pointer if necessary.
213 if (num_virtual_elements < count) { 214 if (num_virtual_elements < count) {
214 int num_dropped = count - num_virtual_elements; 215 int num_dropped = count - num_virtual_elements;
215 stack_pointer_ -= num_dropped; 216 stack_pointer_ -= num_dropped;
216 __ addq(rsp, Immediate(num_dropped * kPointerSize)); 217 __ addq(rsp, Immediate(num_dropped * kPointerSize));
217 } 218 }
218 219
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 // Grow the expression stack by handler size less one (the return 1044 // Grow the expression stack by handler size less one (the return
1044 // address is already pushed by a call instruction). 1045 // address is already pushed by a call instruction).
1045 Adjust(kHandlerSize - 1); 1046 Adjust(kHandlerSize - 1);
1046 __ PushTryHandler(IN_JAVASCRIPT, type); 1047 __ PushTryHandler(IN_JAVASCRIPT, type);
1047 } 1048 }
1048 1049
1049 1050
1050 #undef __ 1051 #undef __
1051 1052
1052 } } // namespace v8::internal 1053 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/virtual-frame-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698