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

Unified Diff: src/frames.h

Issue 1697223003: [Interpreter] GetExpression(0) in InterpretedFrames gets first local. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_push_bca
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index fa55d15d5f6a0ed5bbf91755d018883b2e31e25a..18a3d82398c06e09593f14f67f57bd9a4c4fe1e1 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -192,10 +192,12 @@ class InterpreterFrameConstants : public AllStatic {
static const int kRegisterFilePointerFromFp =
-StandardFrameConstants::kFixedFrameSizeFromFp - 4 * kPointerSize;
+ static const int kExpressionsOffset = kRegisterFilePointerFromFp;
+
// Expression index for {StandardFrame::GetExpressionAddress}.
- static const int kBytecodeArrayExpressionIndex = 1;
- static const int kBytecodeOffsetExpressionIndex = 2;
- static const int kRegisterFileExpressionIndex = 3;
+ static const int kBytecodeArrayExpressionIndex = -2;
+ static const int kBytecodeOffsetExpressionIndex = -1;
+ static const int kRegisterFileExpressionIndex = 0;
// Register file pointer relative.
static const int kLastParamFromRegisterPointer =
@@ -498,7 +500,6 @@ class StandardFrame: public StackFrame {
inline Object* GetExpression(int index) const;
inline void SetExpression(int index, Object* value);
int ComputeExpressionsCount() const;
- static Object* GetExpression(Address fp, int index);
void SetCallerFp(Address caller_fp) override;
@@ -529,8 +530,7 @@ class StandardFrame: public StackFrame {
void IterateExpressions(ObjectVisitor* v) const;
// Returns the address of the n'th expression stack element.
- Address GetExpressionAddress(int n) const;
- static Address GetExpressionAddress(Address fp, int n);
+ virtual Address GetExpressionAddress(int n) const;
// Determines if the standard frame for the given frame pointer is
// an arguments adaptor frame.
@@ -756,6 +756,8 @@ class InterpretedFrame : public JavaScriptFrame {
protected:
inline explicit InterpretedFrame(StackFrameIteratorBase* iterator);
+ Address GetExpressionAddress(int n) const override;
+
private:
friend class StackFrameIteratorBase;
};
@@ -780,6 +782,8 @@ class ArgumentsAdaptorFrame: public JavaScriptFrame {
void Print(StringStream* accumulator, PrintMode mode,
int index) const override;
+ static int GetLength(Address fp);
+
protected:
inline explicit ArgumentsAdaptorFrame(StackFrameIteratorBase* iterator);
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698