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

Side by Side Diff: src/objects-inl.h

Issue 13811014: Fix OSR for nested loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 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/objects.cc ('k') | src/runtime.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 // 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 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 void Code::set_safepoint_table_offset(unsigned offset) { 3755 void Code::set_safepoint_table_offset(unsigned offset) {
3756 CHECK(offset <= (1 << kSafepointTableOffsetBitCount)); 3756 CHECK(offset <= (1 << kSafepointTableOffsetBitCount));
3757 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB); 3757 ASSERT(kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB);
3758 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize))); 3758 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize)));
3759 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3759 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3760 int updated = SafepointTableOffsetField::update(previous, offset); 3760 int updated = SafepointTableOffsetField::update(previous, offset);
3761 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3761 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3762 } 3762 }
3763 3763
3764 3764
3765 unsigned Code::stack_check_table_offset() { 3765 unsigned Code::back_edge_table_offset() {
3766 ASSERT_EQ(FUNCTION, kind()); 3766 ASSERT_EQ(FUNCTION, kind());
3767 return StackCheckTableOffsetField::decode( 3767 return BackEdgeTableOffsetField::decode(
3768 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3768 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3769 } 3769 }
3770 3770
3771 3771
3772 void Code::set_stack_check_table_offset(unsigned offset) { 3772 void Code::set_back_edge_table_offset(unsigned offset) {
3773 ASSERT_EQ(FUNCTION, kind()); 3773 ASSERT_EQ(FUNCTION, kind());
3774 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize))); 3774 ASSERT(IsAligned(offset, static_cast<unsigned>(kIntSize)));
3775 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3775 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3776 int updated = StackCheckTableOffsetField::update(previous, offset); 3776 int updated = BackEdgeTableOffsetField::update(previous, offset);
3777 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3777 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3778 } 3778 }
3779 3779
3780 3780
3781 bool Code::stack_check_patched_for_osr() { 3781 bool Code::back_edges_patched_for_osr() {
3782 ASSERT_EQ(FUNCTION, kind()); 3782 ASSERT_EQ(FUNCTION, kind());
3783 return StackCheckPatchedForOSRField::decode( 3783 return BackEdgesPatchedForOSRField::decode(
3784 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 3784 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
3785 } 3785 }
3786 3786
3787 3787
3788 void Code::set_stack_check_patched_for_osr(bool value) { 3788 void Code::set_back_edges_patched_for_osr(bool value) {
3789 ASSERT_EQ(FUNCTION, kind()); 3789 ASSERT_EQ(FUNCTION, kind());
3790 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 3790 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
3791 int updated = StackCheckPatchedForOSRField::update(previous, value); 3791 int updated = BackEdgesPatchedForOSRField::update(previous, value);
3792 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 3792 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
3793 } 3793 }
3794 3794
3795 3795
3796 3796
3797 CheckType Code::check_type() { 3797 CheckType Code::check_type() {
3798 ASSERT(is_call_stub() || is_keyed_call_stub()); 3798 ASSERT(is_call_stub() || is_keyed_call_stub());
3799 byte type = READ_BYTE_FIELD(this, kCheckTypeOffset); 3799 byte type = READ_BYTE_FIELD(this, kCheckTypeOffset);
3800 return static_cast<CheckType>(type); 3800 return static_cast<CheckType>(type);
3801 } 3801 }
(...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after
6045 #undef WRITE_UINT32_FIELD 6045 #undef WRITE_UINT32_FIELD
6046 #undef READ_SHORT_FIELD 6046 #undef READ_SHORT_FIELD
6047 #undef WRITE_SHORT_FIELD 6047 #undef WRITE_SHORT_FIELD
6048 #undef READ_BYTE_FIELD 6048 #undef READ_BYTE_FIELD
6049 #undef WRITE_BYTE_FIELD 6049 #undef WRITE_BYTE_FIELD
6050 6050
6051 6051
6052 } } // namespace v8::internal 6052 } } // namespace v8::internal
6053 6053
6054 #endif // V8_OBJECTS_INL_H_ 6054 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698