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

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

Issue 174639: Use a root array register for constant loads and stack guards on x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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/x64/virtual-frame-x64.h ('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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
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::EmitPush(Heap::RootListIndex index) {
209 ASSERT(stack_pointer_ == element_count() - 1);
210 elements_.Add(FrameElement::MemoryElement());
211 stack_pointer_++;
212 __ PushRoot(index);
213 }
214
215
208 void VirtualFrame::Drop(int count) { 216 void VirtualFrame::Drop(int count) {
209 ASSERT(count >= 0); 217 ASSERT(count >= 0);
210 ASSERT(height() >= count); 218 ASSERT(height() >= count);
211 int num_virtual_elements = (element_count() - 1) - stack_pointer_; 219 int num_virtual_elements = (element_count() - 1) - stack_pointer_;
212 220
213 // Emit code to lower the stack pointer if necessary. 221 // Emit code to lower the stack pointer if necessary.
214 if (num_virtual_elements < count) { 222 if (num_virtual_elements < count) {
215 int num_dropped = count - num_virtual_elements; 223 int num_dropped = count - num_virtual_elements;
216 stack_pointer_ -= num_dropped; 224 stack_pointer_ -= num_dropped;
217 __ addq(rsp, Immediate(num_dropped * kPointerSize)); 225 __ addq(rsp, Immediate(num_dropped * kPointerSize));
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 // Grow the expression stack by handler size less one (the return 1052 // Grow the expression stack by handler size less one (the return
1045 // address is already pushed by a call instruction). 1053 // address is already pushed by a call instruction).
1046 Adjust(kHandlerSize - 1); 1054 Adjust(kHandlerSize - 1);
1047 __ PushTryHandler(IN_JAVASCRIPT, type); 1055 __ PushTryHandler(IN_JAVASCRIPT, type);
1048 } 1056 }
1049 1057
1050 1058
1051 #undef __ 1059 #undef __
1052 1060
1053 } } // namespace v8::internal 1061 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698