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

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

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
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/array.js » ('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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "codegen-inl.h" 30 #include "codegen-inl.h"
31 #include "register-allocator-inl.h" 31 #include "register-allocator-inl.h"
32 #include "scopes.h" 32 #include "scopes.h"
33 #include "virtual-frame-inl.h"
33 34
34 namespace v8 { 35 namespace v8 {
35 namespace internal { 36 namespace internal {
36 37
37 // -------------------------------------------------------------------------
38 // VirtualFrame implementation.
39
40 #define __ ACCESS_MASM(masm()) 38 #define __ ACCESS_MASM(masm())
41 39
42
43 // On entry to a function, the virtual frame already contains the
44 // receiver and the parameters. All initial frame elements are in
45 // memory.
46 VirtualFrame::VirtualFrame()
47 : elements_(parameter_count() + local_count() + kPreallocatedElements),
48 stack_pointer_(parameter_count()) { // 0-based index of TOS.
49 for (int i = 0; i <= stack_pointer_; i++) {
50 elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown));
51 }
52 for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
53 register_locations_[i] = kIllegalIndex;
54 }
55 }
56
57
58 void VirtualFrame::SyncElementBelowStackPointer(int index) { 40 void VirtualFrame::SyncElementBelowStackPointer(int index) {
59 UNREACHABLE(); 41 UNREACHABLE();
60 } 42 }
61 43
62 44
63 void VirtualFrame::SyncElementByPushing(int index) { 45 void VirtualFrame::SyncElementByPushing(int index) {
64 UNREACHABLE(); 46 UNREACHABLE();
65 } 47 }
66 48
67 49
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 void VirtualFrame::EmitPop(Register reg) { 288 void VirtualFrame::EmitPop(Register reg) {
307 ASSERT(stack_pointer_ == element_count() - 1); 289 ASSERT(stack_pointer_ == element_count() - 1);
308 stack_pointer_--; 290 stack_pointer_--;
309 elements_.RemoveLast(); 291 elements_.RemoveLast();
310 __ pop(reg); 292 __ pop(reg);
311 } 293 }
312 294
313 295
314 void VirtualFrame::EmitPush(Register reg) { 296 void VirtualFrame::EmitPush(Register reg) {
315 ASSERT(stack_pointer_ == element_count() - 1); 297 ASSERT(stack_pointer_ == element_count() - 1);
316 elements_.Add(FrameElement::MemoryElement(NumberInfo::kUnknown)); 298 elements_.Add(FrameElement::MemoryElement(NumberInfo::Unknown()));
317 stack_pointer_++; 299 stack_pointer_++;
318 __ push(reg); 300 __ push(reg);
319 } 301 }
320 302
321 303
322 void VirtualFrame::EmitPushMultiple(int count, int src_regs) { 304 void VirtualFrame::EmitPushMultiple(int count, int src_regs) {
323 ASSERT(stack_pointer_ == element_count() - 1); 305 ASSERT(stack_pointer_ == element_count() - 1);
324 Adjust(count); 306 Adjust(count);
325 __ stm(db_w, sp, src_regs); 307 __ stm(db_w, sp, src_regs);
326 } 308 }
327 309
328 310
329 #undef __ 311 #undef __
330 312
331 } } // namespace v8::internal 313 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | src/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698