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

Side by Side Diff: src/frames.h

Issue 2106883003: [builtins] Add receiver to builtin exit frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 5 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
« no previous file with comments | « src/builtins.cc ('k') | src/frames.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FRAMES_H_ 5 #ifndef V8_FRAMES_H_
6 #define V8_FRAMES_H_ 6 #define V8_FRAMES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/safepoint-table.h" 10 #include "src/safepoint-table.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 static const int kArgumentsPointerOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(2); 322 static const int kArgumentsPointerOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(2);
323 static const int kFixedHeaderBottomOffset = kArgumentsPointerOffset; 323 static const int kFixedHeaderBottomOffset = kArgumentsPointerOffset;
324 DEFINE_TYPED_FRAME_SIZES(3); 324 DEFINE_TYPED_FRAME_SIZES(3);
325 }; 325 };
326 326
327 // Behaves like an exit frame but with target and new target args. 327 // Behaves like an exit frame but with target and new target args.
328 class BuiltinExitFrameConstants : public CommonFrameConstants { 328 class BuiltinExitFrameConstants : public CommonFrameConstants {
329 public: 329 public:
330 static const int kNewTargetOffset = kCallerPCOffset + 1 * kPointerSize; 330 static const int kNewTargetOffset = kCallerPCOffset + 1 * kPointerSize;
331 static const int kTargetOffset = kNewTargetOffset + 1 * kPointerSize; 331 static const int kTargetOffset = kNewTargetOffset + 1 * kPointerSize;
332 static const int kArgcOffset = kTargetOffset + 1 * kPointerSize;
332 }; 333 };
333 334
334 class InterpreterFrameConstants : public AllStatic { 335 class InterpreterFrameConstants : public AllStatic {
335 public: 336 public:
336 // Fixed frame includes new.target and bytecode offset. 337 // Fixed frame includes new.target and bytecode offset.
337 static const int kFixedFrameSize = 338 static const int kFixedFrameSize =
338 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize; 339 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
339 static const int kFixedFrameSizeFromFp = 340 static const int kFixedFrameSizeFromFp =
340 StandardFrameConstants::kFixedFrameSizeFromFp + 3 * kPointerSize; 341 StandardFrameConstants::kFixedFrameSizeFromFp + 3 * kPointerSize;
341 342
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 // to allow such builtins to appear in stack traces. 658 // to allow such builtins to appear in stack traces.
658 class BuiltinExitFrame : public ExitFrame { 659 class BuiltinExitFrame : public ExitFrame {
659 public: 660 public:
660 Type type() const override { return BUILTIN_EXIT; } 661 Type type() const override { return BUILTIN_EXIT; }
661 662
662 static BuiltinExitFrame* cast(StackFrame* frame) { 663 static BuiltinExitFrame* cast(StackFrame* frame) {
663 DCHECK(frame->is_builtin_exit()); 664 DCHECK(frame->is_builtin_exit());
664 return static_cast<BuiltinExitFrame*>(frame); 665 return static_cast<BuiltinExitFrame*>(frame);
665 } 666 }
666 667
667 virtual JSFunction* function() const; 668 JSFunction* function() const;
669 Object* receiver() const;
670
671 bool IsConstructor() const;
668 672
669 protected: 673 protected:
670 inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator); 674 inline explicit BuiltinExitFrame(StackFrameIteratorBase* iterator);
671 675
672 private: 676 private:
673 inline Object* function_slot_object() const; 677 inline Object* target_slot_object() const;
678 inline Object* new_target_slot_object() const;
679 inline Object* receiver_slot_object() const;
674 680
675 friend class StackFrameIteratorBase; 681 friend class StackFrameIteratorBase;
676 }; 682 };
677 683
678 class JavaScriptFrame; 684 class JavaScriptFrame;
679 685
680 class FrameSummary BASE_EMBEDDED { 686 class FrameSummary BASE_EMBEDDED {
681 public: 687 public:
682 // Mode for JavaScriptFrame::Summarize. Exact summary is required to produce 688 // Mode for JavaScriptFrame::Summarize. Exact summary is required to produce
683 // an exact stack trace. It will trigger an assertion failure if that is not 689 // an exact stack trace. It will trigger an assertion failure if that is not
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 1306
1301 1307
1302 // Reads all frames on the current stack and copies them into the current 1308 // Reads all frames on the current stack and copies them into the current
1303 // zone memory. 1309 // zone memory.
1304 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1310 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1305 1311
1306 } // namespace internal 1312 } // namespace internal
1307 } // namespace v8 1313 } // namespace v8
1308 1314
1309 #endif // V8_FRAMES_H_ 1315 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698