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

Side by Side Diff: src/frames.h

Issue 6815010: Merge r7516, r7541 into 3.1 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.1/
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 class JavaScriptFrame: public StandardFrame { 442 class JavaScriptFrame: public StandardFrame {
443 public: 443 public:
444 virtual Type type() const { return JAVA_SCRIPT; } 444 virtual Type type() const { return JAVA_SCRIPT; }
445 445
446 // Accessors. 446 // Accessors.
447 inline Object* function() const; 447 inline Object* function() const;
448 inline Object* receiver() const; 448 inline Object* receiver() const;
449 inline void set_receiver(Object* value); 449 inline void set_receiver(Object* value);
450 450
451 // Access the parameters. 451 // Access the parameters.
452 Object* GetParameter(int index) const; 452 inline Address GetParameterSlot(int index) const;
453 int ComputeParametersCount() const; 453 inline Object* GetParameter(int index) const;
454 454 inline int ComputeParametersCount() const {
455 // Temporary way of getting access to the number of parameters 455 return GetNumberOfIncomingArguments();
456 // passed on the stack by the caller. Once argument adaptor frames 456 }
457 // has been introduced on ARM, this number will always match the
458 // computed parameters count.
459 int GetProvidedParametersCount() const;
460 457
461 // Check if this frame is a constructor frame invoked through 'new'. 458 // Check if this frame is a constructor frame invoked through 'new'.
462 bool IsConstructor() const; 459 bool IsConstructor() const;
463 460
464 // Check if this frame has "adapted" arguments in the sense that the 461 // Check if this frame has "adapted" arguments in the sense that the
465 // actual passed arguments are available in an arguments adaptor 462 // actual passed arguments are available in an arguments adaptor
466 // frame below it on the stack. 463 // frame below it on the stack.
467 inline bool has_adapted_arguments() const; 464 inline bool has_adapted_arguments() const;
468 465
469 // Garbage collection support. 466 // Garbage collection support.
(...skipping 17 matching lines...) Expand all
487 ASSERT(frame->is_java_script()); 484 ASSERT(frame->is_java_script());
488 return static_cast<JavaScriptFrame*>(frame); 485 return static_cast<JavaScriptFrame*>(frame);
489 } 486 }
490 487
491 protected: 488 protected:
492 explicit JavaScriptFrame(StackFrameIterator* iterator) 489 explicit JavaScriptFrame(StackFrameIterator* iterator)
493 : StandardFrame(iterator) { } 490 : StandardFrame(iterator) { }
494 491
495 virtual Address GetCallerStackPointer() const; 492 virtual Address GetCallerStackPointer() const;
496 493
494 virtual int GetNumberOfIncomingArguments() const;
495
497 // Garbage collection support. Iterates over incoming arguments, 496 // Garbage collection support. Iterates over incoming arguments,
498 // receiver, and any callee-saved registers. 497 // receiver, and any callee-saved registers.
499 void IterateArguments(ObjectVisitor* v) const; 498 void IterateArguments(ObjectVisitor* v) const;
500 499
501 private: 500 private:
502 inline Object* function_slot_object() const; 501 inline Object* function_slot_object() const;
503 502
504 friend class StackFrameIterator; 503 friend class StackFrameIterator;
505 friend class StackTracer; 504 friend class StackTracer;
506 }; 505 };
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 546 }
548 547
549 // Printing support. 548 // Printing support.
550 virtual void Print(StringStream* accumulator, 549 virtual void Print(StringStream* accumulator,
551 PrintMode mode, 550 PrintMode mode,
552 int index) const; 551 int index) const;
553 protected: 552 protected:
554 explicit ArgumentsAdaptorFrame(StackFrameIterator* iterator) 553 explicit ArgumentsAdaptorFrame(StackFrameIterator* iterator)
555 : JavaScriptFrame(iterator) { } 554 : JavaScriptFrame(iterator) { }
556 555
556 virtual int GetNumberOfIncomingArguments() const {
557 return Smi::cast(GetExpression(0))->value();
558 }
559
557 virtual Address GetCallerStackPointer() const; 560 virtual Address GetCallerStackPointer() const;
558 561
559 private: 562 private:
560 friend class StackFrameIterator; 563 friend class StackFrameIterator;
561 }; 564 };
562 565
563 566
564 class InternalFrame: public StandardFrame { 567 class InternalFrame: public StandardFrame {
565 public: 568 public:
566 virtual Type type() const { return INTERNAL; } 569 virtual Type type() const { return INTERNAL; }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 }; 820 };
818 821
819 822
820 // Reads all frames on the current stack and copies them into the current 823 // Reads all frames on the current stack and copies them into the current
821 // zone memory. 824 // zone memory.
822 Vector<StackFrame*> CreateStackMap(); 825 Vector<StackFrame*> CreateStackMap();
823 826
824 } } // namespace v8::internal 827 } } // namespace v8::internal
825 828
826 #endif // V8_FRAMES_H_ 829 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698