OLD | NEW |
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 18 matching lines...) Expand all Loading... |
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 | 33 |
34 namespace v8 { namespace internal { | 34 namespace v8 { namespace internal { |
35 | 35 |
36 // ------------------------------------------------------------------------- | 36 // ------------------------------------------------------------------------- |
37 // VirtualFrame implementation. | 37 // VirtualFrame implementation. |
38 | 38 |
39 #define __ masm_-> | 39 #define __ DEFINE_MASM(masm_) |
| 40 |
40 | 41 |
41 // On entry to a function, the virtual frame already contains the | 42 // On entry to a function, the virtual frame already contains the |
42 // receiver and the parameters. All initial frame elements are in | 43 // receiver and the parameters. All initial frame elements are in |
43 // memory. | 44 // memory. |
44 VirtualFrame::VirtualFrame(CodeGenerator* cgen) | 45 VirtualFrame::VirtualFrame(CodeGenerator* cgen) |
45 : cgen_(cgen), | 46 : cgen_(cgen), |
46 masm_(cgen->masm()), | 47 masm_(cgen->masm()), |
47 elements_(cgen->scope()->num_parameters() | 48 elements_(cgen->scope()->num_parameters() |
48 + cgen->scope()->num_stack_slots() | 49 + cgen->scope()->num_stack_slots() |
49 + kPreallocatedElements), | 50 + kPreallocatedElements), |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 ASSERT(stack_pointer_ == elements_.length() - 1); | 429 ASSERT(stack_pointer_ == elements_.length() - 1); |
429 elements_.Add(FrameElement::MemoryElement()); | 430 elements_.Add(FrameElement::MemoryElement()); |
430 stack_pointer_++; | 431 stack_pointer_++; |
431 __ push(reg); | 432 __ push(reg); |
432 } | 433 } |
433 | 434 |
434 | 435 |
435 #undef __ | 436 #undef __ |
436 | 437 |
437 } } // namespace v8::internal | 438 } } // namespace v8::internal |
OLD | NEW |