OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 #define V8_VIRTUAL_FRAME_INL_H_ | 29 #define V8_VIRTUAL_FRAME_INL_H_ |
30 | 30 |
31 #include "virtual-frame.h" | 31 #include "virtual-frame.h" |
32 | 32 |
33 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 | 33 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 |
34 #include "virtual-frame-heavy-inl.h" | 34 #include "virtual-frame-heavy-inl.h" |
35 #else | 35 #else |
36 #include "virtual-frame-light-inl.h" | 36 #include "virtual-frame-light-inl.h" |
37 #endif | 37 #endif |
38 | 38 |
39 | |
40 namespace v8 { | |
41 namespace internal { | |
42 | |
43 void VirtualFrame::Push(Smi* value) { | |
44 Push(Handle<Object> (value)); | |
45 } | |
46 | |
47 | |
48 void VirtualFrame::Nip(int num_dropped) { | |
49 ASSERT(num_dropped >= 0); | |
50 if (num_dropped == 0) return; | |
51 Result tos = Pop(); | |
52 if (num_dropped > 1) { | |
53 Drop(num_dropped - 1); | |
54 } | |
55 SetElementAt(0, &tos); | |
56 } | |
57 | |
58 } } // namespace v8::internal | |
59 | |
60 #endif // V8_VIRTUAL_FRAME_INL_H_ | 39 #endif // V8_VIRTUAL_FRAME_INL_H_ |
OLD | NEW |