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

Side by Side Diff: src/codegen.h

Issue 174056: Add support for forceful termination of JavaScript execution. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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/arm/codegen-arm.cc ('k') | src/execution.h » ('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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // PatchInlineRuntimeEntry 63 // PatchInlineRuntimeEntry
64 // CodeForFunctionPosition 64 // CodeForFunctionPosition
65 // CodeForReturnPosition 65 // CodeForReturnPosition
66 // CodeForStatementPosition 66 // CodeForStatementPosition
67 // CodeForSourcePosition 67 // CodeForSourcePosition
68 68
69 69
70 // Mode to overwrite BinaryExpression values. 70 // Mode to overwrite BinaryExpression values.
71 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT }; 71 enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
72 72
73 // Types of uncatchable exceptions.
74 enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION };
75
73 76
74 #if V8_TARGET_ARCH_IA32 77 #if V8_TARGET_ARCH_IA32
75 #include "ia32/codegen-ia32.h" 78 #include "ia32/codegen-ia32.h"
76 #elif V8_TARGET_ARCH_X64 79 #elif V8_TARGET_ARCH_X64
77 #include "x64/codegen-x64.h" 80 #include "x64/codegen-x64.h"
78 #elif V8_TARGET_ARCH_ARM 81 #elif V8_TARGET_ARCH_ARM
79 #include "arm/codegen-arm.h" 82 #include "arm/codegen-arm.h"
80 #else 83 #else
81 #error Unsupported target architecture. 84 #error Unsupported target architecture.
82 #endif 85 #endif
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 class CEntryStub : public CodeStub { 287 class CEntryStub : public CodeStub {
285 public: 288 public:
286 CEntryStub() { } 289 CEntryStub() { }
287 290
288 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); } 291 void Generate(MacroAssembler* masm) { GenerateBody(masm, false); }
289 292
290 protected: 293 protected:
291 void GenerateBody(MacroAssembler* masm, bool is_debug_break); 294 void GenerateBody(MacroAssembler* masm, bool is_debug_break);
292 void GenerateCore(MacroAssembler* masm, 295 void GenerateCore(MacroAssembler* masm,
293 Label* throw_normal_exception, 296 Label* throw_normal_exception,
297 Label* throw_termination_exception,
294 Label* throw_out_of_memory_exception, 298 Label* throw_out_of_memory_exception,
295 StackFrame::Type frame_type, 299 StackFrame::Type frame_type,
296 bool do_gc, 300 bool do_gc,
297 bool always_allocate_scope); 301 bool always_allocate_scope);
298 void GenerateThrowTOS(MacroAssembler* masm); 302 void GenerateThrowTOS(MacroAssembler* masm);
299 void GenerateThrowOutOfMemory(MacroAssembler* masm); 303 void GenerateThrowUncatchable(MacroAssembler* masm,
304 UncatchableExceptionType type);
300 305
301 private: 306 private:
302 Major MajorKey() { return CEntry; } 307 Major MajorKey() { return CEntry; }
303 int MinorKey() { return 0; } 308 int MinorKey() { return 0; }
304 309
305 const char* GetName() { return "CEntryStub"; } 310 const char* GetName() { return "CEntryStub"; }
306 }; 311 };
307 312
308 313
309 class CEntryDebugBreakStub : public CEntryStub { 314 class CEntryDebugBreakStub : public CEntryStub {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 PrintF("ArgumentsAccessStub (type %d)\n", type_); 382 PrintF("ArgumentsAccessStub (type %d)\n", type_);
378 } 383 }
379 #endif 384 #endif
380 }; 385 };
381 386
382 387
383 } // namespace internal 388 } // namespace internal
384 } // namespace v8 389 } // namespace v8
385 390
386 #endif // V8_CODEGEN_H_ 391 #endif // V8_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698