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

Side by Side Diff: src/frames.h

Issue 11528003: Re-land Crankshaft-generated KeyedLoad stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 8 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // profiler's stashed return address. 257 // profiler's stashed return address.
258 static void SetReturnAddressLocationResolver( 258 static void SetReturnAddressLocationResolver(
259 ReturnAddressLocationResolver resolver); 259 ReturnAddressLocationResolver resolver);
260 260
261 // Printing support. 261 // Printing support.
262 enum PrintMode { OVERVIEW, DETAILS }; 262 enum PrintMode { OVERVIEW, DETAILS };
263 virtual void Print(StringStream* accumulator, 263 virtual void Print(StringStream* accumulator,
264 PrintMode mode, 264 PrintMode mode,
265 int index) const { } 265 int index) const { }
266 266
267 Isolate* isolate() const { return isolate_; }
268
267 protected: 269 protected:
268 inline explicit StackFrame(StackFrameIterator* iterator); 270 inline explicit StackFrame(StackFrameIterator* iterator);
269 virtual ~StackFrame() { } 271 virtual ~StackFrame() { }
270 272
271 Isolate* isolate() const { return isolate_; }
272
273 // Compute the stack pointer for the calling frame. 273 // Compute the stack pointer for the calling frame.
274 virtual Address GetCallerStackPointer() const = 0; 274 virtual Address GetCallerStackPointer() const = 0;
275 275
276 // Printing support. 276 // Printing support.
277 static void PrintIndex(StringStream* accumulator, 277 static void PrintIndex(StringStream* accumulator,
278 PrintMode mode, 278 PrintMode mode,
279 int index); 279 int index);
280 280
281 // Get the top handler from the current stack iterator. 281 // Get the top handler from the current stack iterator.
282 inline StackHandler* top_handler() const; 282 inline StackHandler* top_handler() const;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 void IterateArguments(ObjectVisitor* v) const; 549 void IterateArguments(ObjectVisitor* v) const;
550 550
551 private: 551 private:
552 inline Object* function_slot_object() const; 552 inline Object* function_slot_object() const;
553 553
554 friend class StackFrameIterator; 554 friend class StackFrameIterator;
555 friend class StackTracer; 555 friend class StackTracer;
556 }; 556 };
557 557
558 558
559 class CompiledFrame : public JavaScriptFrame { 559 void IterateCompiledFrame(StandardFrame* frame,
560 public: 560 ObjectVisitor* v);
561 virtual Type type() const = 0;
562 561
563 // GC support. 562 class StubFrame : public StandardFrame {
564 virtual void Iterate(ObjectVisitor* v) const;
565
566 protected:
567 inline explicit CompiledFrame(StackFrameIterator* iterator);
568 };
569
570
571 class StubFrame : public CompiledFrame {
572 public: 563 public:
573 virtual Type type() const { return STUB; } 564 virtual Type type() const { return STUB; }
574 565
575 // GC support. 566 // GC support.
576 virtual void Iterate(ObjectVisitor* v) const; 567 virtual void Iterate(ObjectVisitor* v) const;
577 568
569 // Determine the code for the frame.
570 virtual Code* unchecked_code() const;
571
578 protected: 572 protected:
579 inline explicit StubFrame(StackFrameIterator* iterator); 573 inline explicit StubFrame(StackFrameIterator* iterator);
580 574
575 virtual Address GetCallerStackPointer() const;
576
577 virtual int GetNumberOfIncomingArguments() const;
578
581 friend class StackFrameIterator; 579 friend class StackFrameIterator;
582 }; 580 };
583 581
584 582
585 class OptimizedFrame : public CompiledFrame { 583 class OptimizedFrame : public JavaScriptFrame {
586 public: 584 public:
587 virtual Type type() const { return OPTIMIZED; } 585 virtual Type type() const { return OPTIMIZED; }
588 586
589 // GC support. 587 // GC support.
590 virtual void Iterate(ObjectVisitor* v) const; 588 virtual void Iterate(ObjectVisitor* v) const;
591 589
592 virtual int GetInlineCount(); 590 virtual int GetInlineCount();
593 591
594 // Return a list with JSFunctions of this frame. 592 // Return a list with JSFunctions of this frame.
595 // The functions are ordered bottom-to-top (i.e. functions.last() 593 // The functions are ordered bottom-to-top (i.e. functions.last()
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 }; 918 };
921 919
922 920
923 // Reads all frames on the current stack and copies them into the current 921 // Reads all frames on the current stack and copies them into the current
924 // zone memory. 922 // zone memory.
925 Vector<StackFrame*> CreateStackMap(Zone* zone); 923 Vector<StackFrame*> CreateStackMap(Zone* zone);
926 924
927 } } // namespace v8::internal 925 } } // namespace v8::internal
928 926
929 #endif // V8_FRAMES_H_ 927 #endif // V8_FRAMES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698