frame-constants-ia32.h 1.7 KB
Newer Older
1
// Copyright 2012 the V8 project authors. All rights reserved.
2 3
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
4

5 6
#ifndef V8_IA32_FRAMES_IA32_H_
#define V8_IA32_FRAMES_IA32_H_
7

8 9
namespace v8 {
namespace internal {
10 11 12

class EntryFrameConstants : public AllStatic {
 public:
13
  static const int kCallerFPOffset = -6 * kPointerSize;
14

15 16 17 18 19
  static const int kNewTargetArgOffset = +2 * kPointerSize;
  static const int kFunctionArgOffset = +3 * kPointerSize;
  static const int kReceiverArgOffset = +4 * kPointerSize;
  static const int kArgcOffset = +5 * kPointerSize;
  static const int kArgvOffset = +6 * kPointerSize;
20 21
};

22
class ExitFrameConstants : public TypedFrameConstants {
23
 public:
24 25 26
  static const int kSPOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
  static const int kCodeOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(1);
  DEFINE_TYPED_FRAME_SIZES(2);
27

28
  static const int kCallerFPOffset = 0 * kPointerSize;
29
  static const int kCallerPCOffset = +1 * kPointerSize;
30 31 32 33

  // FP-relative displacement of the caller's SP.  It points just
  // below the saved PC.
  static const int kCallerSPDisplacement = +2 * kPointerSize;
34

35
  static const int kConstantPoolOffset = 0;  // Not used
36 37 38 39 40 41
};

class JavaScriptFrameConstants : public AllStatic {
 public:
  // FP-relative.
  static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset;
42
  static const int kLastParameterOffset = +2 * kPointerSize;
43
  static const int kFunctionOffset = StandardFrameConstants::kFunctionOffset;
44

45
  // Caller SP-relative.
46
  static const int kParam0Offset = -2 * kPointerSize;
47 48 49
  static const int kReceiverOffset = -1 * kPointerSize;
};

50 51
}  // namespace internal
}  // namespace v8
52

53
#endif  // V8_IA32_FRAMES_IA32_H_