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

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

Issue 1164002: Split the virtual frame into heavy and light versions.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | « src/arm/virtual-frame-arm.h ('k') | src/codegen.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 44
45 void VirtualFrame::SyncElementByPushing(int index) { 45 void VirtualFrame::SyncElementByPushing(int index) {
46 UNREACHABLE(); 46 UNREACHABLE();
47 } 47 }
48 48
49 49
50 void VirtualFrame::SyncRange(int begin, int end) { 50 void VirtualFrame::SyncRange(int begin, int end) {
51 // All elements are in memory on ARM (ie, synced). 51 // All elements are in memory on ARM (ie, synced).
52 #ifdef DEBUG
53 for (int i = begin; i <= end; i++) {
54 ASSERT(elements_[i].is_synced());
55 }
56 #endif
57 } 52 }
58 53
59 54
60 void VirtualFrame::MergeTo(VirtualFrame* expected) { 55 void VirtualFrame::MergeTo(VirtualFrame* expected) {
61 // ARM frames are currently always in memory. 56 // ARM frames are currently always in memory.
62 ASSERT(Equals(expected)); 57 ASSERT(Equals(expected));
63 } 58 }
64 59
65 60
66 void VirtualFrame::MergeMoveRegistersToMemory(VirtualFrame* expected) { 61 void VirtualFrame::MergeMoveRegistersToMemory(VirtualFrame* expected) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 int num_virtual_elements = (element_count() - 1) - stack_pointer_; 258 int num_virtual_elements = (element_count() - 1) - stack_pointer_;
264 259
265 // Emit code to lower the stack pointer if necessary. 260 // Emit code to lower the stack pointer if necessary.
266 if (num_virtual_elements < count) { 261 if (num_virtual_elements < count) {
267 int num_dropped = count - num_virtual_elements; 262 int num_dropped = count - num_virtual_elements;
268 stack_pointer_ -= num_dropped; 263 stack_pointer_ -= num_dropped;
269 __ add(sp, sp, Operand(num_dropped * kPointerSize)); 264 __ add(sp, sp, Operand(num_dropped * kPointerSize));
270 } 265 }
271 266
272 // Discard elements from the virtual frame and free any registers. 267 // Discard elements from the virtual frame and free any registers.
273 for (int i = 0; i < count; i++) { 268 element_count_ -= count;
274 FrameElement dropped = elements_.RemoveLast();
275 if (dropped.is_register()) {
276 Unuse(dropped.reg());
277 }
278 }
279 } 269 }
280 270
281 271
282 Result VirtualFrame::Pop() { 272 Result VirtualFrame::Pop() {
283 UNIMPLEMENTED(); 273 UNIMPLEMENTED();
284 return Result(); 274 return Result();
285 } 275 }
286 276
287 277
288 void VirtualFrame::EmitPop(Register reg) { 278 void VirtualFrame::EmitPop(Register reg) {
289 ASSERT(stack_pointer_ == element_count() - 1); 279 ASSERT(stack_pointer_ == element_count() - 1);
290 stack_pointer_--; 280 stack_pointer_--;
291 elements_.RemoveLast(); 281 element_count_--;
292 __ pop(reg); 282 __ pop(reg);
293 } 283 }
294 284
295 285
296 void VirtualFrame::EmitPush(Register reg) { 286 void VirtualFrame::EmitPush(Register reg) {
297 ASSERT(stack_pointer_ == element_count() - 1); 287 ASSERT(stack_pointer_ == element_count() - 1);
298 elements_.Add(FrameElement::MemoryElement(NumberInfo::Unknown())); 288 element_count_++;
299 stack_pointer_++; 289 stack_pointer_++;
300 __ push(reg); 290 __ push(reg);
301 } 291 }
302 292
303 293
304 void VirtualFrame::EmitPushMultiple(int count, int src_regs) { 294 void VirtualFrame::EmitPushMultiple(int count, int src_regs) {
305 ASSERT(stack_pointer_ == element_count() - 1); 295 ASSERT(stack_pointer_ == element_count() - 1);
306 Adjust(count); 296 Adjust(count);
307 __ stm(db_w, sp, src_regs); 297 __ stm(db_w, sp, src_regs);
308 } 298 }
309 299
310 300
311 #undef __ 301 #undef __
312 302
313 } } // namespace v8::internal 303 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698