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

Side by Side Diff: src/ia32/macro-assembler-ia32.h

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 1 month 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/ia32/assembler-ia32.cc ('k') | src/ia32/macro-assembler-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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 // --------------------------------------------------------------------------- 415 // ---------------------------------------------------------------------------
416 // Runtime calls 416 // Runtime calls
417 417
418 // Call a code stub. Generate the code if necessary. 418 // Call a code stub. Generate the code if necessary.
419 void CallStub(CodeStub* stub); 419 void CallStub(CodeStub* stub);
420 420
421 // Call a code stub and return the code object called. Try to generate 421 // Call a code stub and return the code object called. Try to generate
422 // the code if necessary. Do not perform a GC but instead return a retry 422 // the code if necessary. Do not perform a GC but instead return a retry
423 // after GC failure. 423 // after GC failure.
424 Object* TryCallStub(CodeStub* stub); 424 MUST_USE_RESULT MaybeObject* TryCallStub(CodeStub* stub);
425 425
426 // Tail call a code stub (jump). Generate the code if necessary. 426 // Tail call a code stub (jump). Generate the code if necessary.
427 void TailCallStub(CodeStub* stub); 427 void TailCallStub(CodeStub* stub);
428 428
429 // Tail call a code stub (jump) and return the code object called. Try to 429 // Tail call a code stub (jump) and return the code object called. Try to
430 // generate the code if necessary. Do not perform a GC but instead return 430 // generate the code if necessary. Do not perform a GC but instead return
431 // a retry after GC failure. 431 // a retry after GC failure.
432 Object* TryTailCallStub(CodeStub* stub); 432 MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub);
433 433
434 // Return from a code stub after popping its arguments. 434 // Return from a code stub after popping its arguments.
435 void StubReturn(int argc); 435 void StubReturn(int argc);
436 436
437 // Call a runtime routine. 437 // Call a runtime routine.
438 void CallRuntime(Runtime::Function* f, int num_arguments); 438 void CallRuntime(Runtime::Function* f, int num_arguments);
439 439
440 // Call a runtime function, returning the CodeStub object called. 440 // Call a runtime function, returning the CodeStub object called.
441 // Try to generate the stub code if necessary. Do not perform a GC 441 // Try to generate the stub code if necessary. Do not perform a GC
442 // but instead return a retry after GC failure. 442 // but instead return a retry after GC failure.
443 Object* TryCallRuntime(Runtime::Function* f, int num_arguments); 443 MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::Function* f,
444 int num_arguments);
444 445
445 // Convenience function: Same as above, but takes the fid instead. 446 // Convenience function: Same as above, but takes the fid instead.
446 void CallRuntime(Runtime::FunctionId id, int num_arguments); 447 void CallRuntime(Runtime::FunctionId id, int num_arguments);
447 448
448 // Convenience function: Same as above, but takes the fid instead. 449 // Convenience function: Same as above, but takes the fid instead.
449 Object* TryCallRuntime(Runtime::FunctionId id, int num_arguments); 450 MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::FunctionId id,
451 int num_arguments);
450 452
451 // Convenience function: call an external reference. 453 // Convenience function: call an external reference.
452 void CallExternalReference(ExternalReference ref, int num_arguments); 454 void CallExternalReference(ExternalReference ref, int num_arguments);
453 455
454 // Tail call of a runtime routine (jump). 456 // Tail call of a runtime routine (jump).
455 // Like JumpToExternalReference, but also takes care of passing the number 457 // Like JumpToExternalReference, but also takes care of passing the number
456 // of parameters. 458 // of parameters.
457 void TailCallExternalReference(const ExternalReference& ext, 459 void TailCallExternalReference(const ExternalReference& ext,
458 int num_arguments, 460 int num_arguments,
459 int result_size); 461 int result_size);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 // Allocation support helpers. 592 // Allocation support helpers.
591 void LoadAllocationTopHelper(Register result, 593 void LoadAllocationTopHelper(Register result,
592 Register result_end, 594 Register result_end,
593 Register scratch, 595 Register scratch,
594 AllocationFlags flags); 596 AllocationFlags flags);
595 void UpdateAllocationTopHelper(Register result_end, Register scratch); 597 void UpdateAllocationTopHelper(Register result_end, Register scratch);
596 598
597 // Helper for PopHandleScope. Allowed to perform a GC and returns 599 // Helper for PopHandleScope. Allowed to perform a GC and returns
598 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and 600 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and
599 // possibly returns a failure object indicating an allocation failure. 601 // possibly returns a failure object indicating an allocation failure.
600 Object* PopHandleScopeHelper(Register saved, 602 MUST_USE_RESULT MaybeObject* PopHandleScopeHelper(Register saved,
601 Register scratch, 603 Register scratch,
602 bool gc_allowed); 604 bool gc_allowed);
603 }; 605 };
604 606
605 607
606 // The code patcher is used to patch (typically) small parts of code e.g. for 608 // The code patcher is used to patch (typically) small parts of code e.g. for
607 // debugging and other types of instrumentation. When using the code patcher 609 // debugging and other types of instrumentation. When using the code patcher
608 // the exact number of bytes specified must be emitted. Is not legal to emit 610 // the exact number of bytes specified must be emitted. Is not legal to emit
609 // relocation information. If any of these constraints are violated it causes 611 // relocation information. If any of these constraints are violated it causes
610 // an assertion. 612 // an assertion.
611 class CodePatcher { 613 class CodePatcher {
612 public: 614 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 } \ 664 } \
663 masm-> 665 masm->
664 #else 666 #else
665 #define ACCESS_MASM(masm) masm-> 667 #define ACCESS_MASM(masm) masm->
666 #endif 668 #endif
667 669
668 670
669 } } // namespace v8::internal 671 } } // namespace v8::internal
670 672
671 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 673 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698