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

Side by Side Diff: src/frames.h

Issue 1242303005: [turbofan]: Elide extra move when accessing stack or frame register (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: src/compiler/code-generator.cc Created 5 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/compiler/x87/instruction-selector-x87.cc ('k') | src/ia32/frames-ia32.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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 int ComputeExpressionsCount() const; 459 int ComputeExpressionsCount() const;
460 static Object* GetExpression(Address fp, int index); 460 static Object* GetExpression(Address fp, int index);
461 461
462 virtual void SetCallerFp(Address caller_fp); 462 virtual void SetCallerFp(Address caller_fp);
463 463
464 static StandardFrame* cast(StackFrame* frame) { 464 static StandardFrame* cast(StackFrame* frame) {
465 DCHECK(frame->is_standard()); 465 DCHECK(frame->is_standard());
466 return static_cast<StandardFrame*>(frame); 466 return static_cast<StandardFrame*>(frame);
467 } 467 }
468 468
469 // Architecture-specific register description.
470 static Register sp_register();
471 static Register fp_register();
472
469 protected: 473 protected:
470 inline explicit StandardFrame(StackFrameIteratorBase* iterator); 474 inline explicit StandardFrame(StackFrameIteratorBase* iterator);
471 475
472 virtual void ComputeCallerState(State* state) const; 476 virtual void ComputeCallerState(State* state) const;
473 477
474 // Accessors. 478 // Accessors.
475 inline Address caller_fp() const; 479 inline Address caller_fp() const;
476 inline Address caller_pc() const; 480 inline Address caller_pc() const;
477 481
478 // Computes the address of the PC field in the standard frame given 482 // Computes the address of the PC field in the standard frame given
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 599
596 // Build a list with summaries for this frame including all inlined frames. 600 // Build a list with summaries for this frame including all inlined frames.
597 virtual void Summarize(List<FrameSummary>* frames); 601 virtual void Summarize(List<FrameSummary>* frames);
598 602
599 // Lookup exception handler for current {pc}, returns -1 if none found. Also 603 // Lookup exception handler for current {pc}, returns -1 if none found. Also
600 // returns the expected number of stack slots at the handler site. 604 // returns the expected number of stack slots at the handler site.
601 virtual int LookupExceptionHandlerInTable( 605 virtual int LookupExceptionHandlerInTable(
602 int* stack_slots, HandlerTable::CatchPrediction* prediction); 606 int* stack_slots, HandlerTable::CatchPrediction* prediction);
603 607
604 // Architecture-specific register description. 608 // Architecture-specific register description.
605 static Register fp_register();
606 static Register context_register(); 609 static Register context_register();
607 static Register constant_pool_pointer_register(); 610 static Register constant_pool_pointer_register();
608 611
609 static JavaScriptFrame* cast(StackFrame* frame) { 612 static JavaScriptFrame* cast(StackFrame* frame) {
610 DCHECK(frame->is_java_script()); 613 DCHECK(frame->is_java_script());
611 return static_cast<JavaScriptFrame*>(frame); 614 return static_cast<JavaScriptFrame*>(frame);
612 } 615 }
613 616
614 static void PrintFunctionAndOffset(JSFunction* function, Code* code, 617 static void PrintFunctionAndOffset(JSFunction* function, Code* code,
615 Address pc, FILE* file, 618 Address pc, FILE* file,
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 }; 935 };
933 936
934 937
935 // Reads all frames on the current stack and copies them into the current 938 // Reads all frames on the current stack and copies them into the current
936 // zone memory. 939 // zone memory.
937 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 940 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
938 941
939 } } // namespace v8::internal 942 } } // namespace v8::internal
940 943
941 #endif // V8_FRAMES_H_ 944 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/compiler/x87/instruction-selector-x87.cc ('k') | src/ia32/frames-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698