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

Side by Side Diff: src/frames.h

Issue 969533004: [turbofan] Implement throwing exceptions into TurboFan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix code lookup. Created 5 years, 9 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/ast-graph-builder.cc ('k') | src/ia32/code-stubs-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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 Address* constant_pool_address() const { 271 Address* constant_pool_address() const {
272 return state_.constant_pool_address; 272 return state_.constant_pool_address;
273 } 273 }
274 274
275 // Get the id of this stack frame. 275 // Get the id of this stack frame.
276 Id id() const { return static_cast<Id>(OffsetFrom(caller_sp())); } 276 Id id() const { return static_cast<Id>(OffsetFrom(caller_sp())); }
277 277
278 // Checks if this frame includes any stack handlers. 278 // Checks if this frame includes any stack handlers.
279 bool HasHandler() const; 279 bool HasHandler() const;
280 280
281 // Get the top handler from the current stack iterator.
282 inline StackHandler* top_handler() const;
283
281 // Get the type of this frame. 284 // Get the type of this frame.
282 virtual Type type() const = 0; 285 virtual Type type() const = 0;
283 286
284 // Get the code associated with this frame. 287 // Get the code associated with this frame.
285 // This method could be called during marking phase of GC. 288 // This method could be called during marking phase of GC.
286 virtual Code* unchecked_code() const = 0; 289 virtual Code* unchecked_code() const = 0;
287 290
288 // Get the code associated with this frame. 291 // Get the code associated with this frame.
289 inline Code* LookupCode() const; 292 inline Code* LookupCode() const;
290 293
(...skipping 13 matching lines...) Expand all
304 307
305 // Sets a callback function for return-address rewriting profilers 308 // Sets a callback function for return-address rewriting profilers
306 // to resolve the location of a return address to the location of the 309 // to resolve the location of a return address to the location of the
307 // profiler's stashed return address. 310 // profiler's stashed return address.
308 static void SetReturnAddressLocationResolver( 311 static void SetReturnAddressLocationResolver(
309 ReturnAddressLocationResolver resolver); 312 ReturnAddressLocationResolver resolver);
310 313
311 // Resolves pc_address through the resolution address function if one is set. 314 // Resolves pc_address through the resolution address function if one is set.
312 static inline Address* ResolveReturnAddressLocation(Address* pc_address); 315 static inline Address* ResolveReturnAddressLocation(Address* pc_address);
313 316
314
315 // Printing support. 317 // Printing support.
316 enum PrintMode { OVERVIEW, DETAILS }; 318 enum PrintMode { OVERVIEW, DETAILS };
317 virtual void Print(StringStream* accumulator, 319 virtual void Print(StringStream* accumulator,
318 PrintMode mode, 320 PrintMode mode,
319 int index) const { } 321 int index) const { }
320 322
321 Isolate* isolate() const { return isolate_; } 323 Isolate* isolate() const { return isolate_; }
322 324
323 protected: 325 protected:
324 inline explicit StackFrame(StackFrameIteratorBase* iterator); 326 inline explicit StackFrame(StackFrameIteratorBase* iterator);
325 virtual ~StackFrame() { } 327 virtual ~StackFrame() { }
326 328
327 // Compute the stack pointer for the calling frame. 329 // Compute the stack pointer for the calling frame.
328 virtual Address GetCallerStackPointer() const = 0; 330 virtual Address GetCallerStackPointer() const = 0;
329 331
330 // Printing support. 332 // Printing support.
331 static void PrintIndex(StringStream* accumulator, 333 static void PrintIndex(StringStream* accumulator,
332 PrintMode mode, 334 PrintMode mode,
333 int index); 335 int index);
334 336
335 // Get the top handler from the current stack iterator.
336 inline StackHandler* top_handler() const;
337
338 // Compute the stack frame type for the given state. 337 // Compute the stack frame type for the given state.
339 static Type ComputeType(const StackFrameIteratorBase* iterator, State* state); 338 static Type ComputeType(const StackFrameIteratorBase* iterator, State* state);
340 339
341 #ifdef DEBUG 340 #ifdef DEBUG
342 bool can_access_heap_objects() const; 341 bool can_access_heap_objects() const;
343 #endif 342 #endif
344 343
345 private: 344 private:
346 const StackFrameIteratorBase* iterator_; 345 const StackFrameIteratorBase* iterator_;
347 Isolate* isolate_; 346 Isolate* isolate_;
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 }; 938 };
940 939
941 940
942 // Reads all frames on the current stack and copies them into the current 941 // Reads all frames on the current stack and copies them into the current
943 // zone memory. 942 // zone memory.
944 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 943 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
945 944
946 } } // namespace v8::internal 945 } } // namespace v8::internal
947 946
948 #endif // V8_FRAMES_H_ 947 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698