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

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

Issue 165230: Eliminate most of the jump target jumping, branching, and binding... (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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // frame (eg, the frame after an exception handler is pushed). No code is 105 // frame (eg, the frame after an exception handler is pushed). No code is
106 // emitted. 106 // emitted.
107 void Adjust(int count); 107 void Adjust(int count);
108 108
109 // Forget elements from the top of the frame to match an actual frame (eg, 109 // Forget elements from the top of the frame to match an actual frame (eg,
110 // the frame after a runtime call). No code is emitted. 110 // the frame after a runtime call). No code is emitted.
111 void Forget(int count) { 111 void Forget(int count) {
112 ASSERT(count >= 0); 112 ASSERT(count >= 0);
113 ASSERT(stack_pointer_ == element_count() - 1); 113 ASSERT(stack_pointer_ == element_count() - 1);
114 stack_pointer_ -= count; 114 stack_pointer_ -= count;
115 ForgetElements(count); 115 // On ARM, all elements are in memory, so there is no extra bookkeeping
116 // (registers, copies, etc.) beyond dropping the elements.
117 elements_.Rewind(stack_pointer_ + 1);
116 } 118 }
117 119
118 // Forget count elements from the top of the frame without adjusting 120 // Forget count elements from the top of the frame and adjust the stack
119 // the stack pointer downward. This is used, for example, before 121 // pointer downward. This is used, for example, before merging frames at
120 // merging frames at break, continue, and return targets. 122 // break, continue, and return targets.
121 void ForgetElements(int count); 123 void ForgetElements(int count);
122 124
123 // Spill all values from the frame to memory. 125 // Spill all values from the frame to memory.
124 void SpillAll(); 126 void SpillAll();
125 127
126 // Spill all occurrences of a specific register from the frame. 128 // Spill all occurrences of a specific register from the frame.
127 void Spill(Register reg) { 129 void Spill(Register reg) {
128 if (is_used(reg)) SpillElementAt(register_location(reg)); 130 if (is_used(reg)) SpillElementAt(register_location(reg));
129 } 131 }
130 132
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 516
515 // Classes that need raw access to the elements_ array. 517 // Classes that need raw access to the elements_ array.
516 friend class DeferredCode; 518 friend class DeferredCode;
517 friend class JumpTarget; 519 friend class JumpTarget;
518 }; 520 };
519 521
520 522
521 } } // namespace v8::internal 523 } } // namespace v8::internal
522 524
523 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ 525 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698