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

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

Issue 11821049: Combine DEBUG_BREAK and DEBUG_PREPARE_STEP_IN into one IC stub kind DEBUG_STUB, encoding DEBUG_BREA… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 11 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/stub-cache.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 3400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3411 } 3411 }
3412 3412
3413 3413
3414 InlineCacheState Code::ic_state() { 3414 InlineCacheState Code::ic_state() {
3415 InlineCacheState result = ExtractICStateFromFlags(flags()); 3415 InlineCacheState result = ExtractICStateFromFlags(flags());
3416 // Only allow uninitialized or debugger states for non-IC code 3416 // Only allow uninitialized or debugger states for non-IC code
3417 // objects. This is used in the debugger to determine whether or not 3417 // objects. This is used in the debugger to determine whether or not
3418 // a call to code object has been replaced with a debug break call. 3418 // a call to code object has been replaced with a debug break call.
3419 ASSERT(is_inline_cache_stub() || 3419 ASSERT(is_inline_cache_stub() ||
3420 result == UNINITIALIZED || 3420 result == UNINITIALIZED ||
3421 result == DEBUG_BREAK || 3421 result == DEBUG_STUB);
3422 result == DEBUG_PREPARE_STEP_IN);
3423 return result; 3422 return result;
3424 } 3423 }
3425 3424
3426 3425
3427 Code::ExtraICState Code::extra_ic_state() { 3426 Code::ExtraICState Code::extra_ic_state() {
3428 ASSERT(is_inline_cache_stub()); 3427 ASSERT(is_inline_cache_stub() || ic_state() == DEBUG_STUB);
3429 return ExtractExtraICStateFromFlags(flags()); 3428 return ExtractExtraICStateFromFlags(flags());
3430 } 3429 }
3431 3430
3432 3431
3433 Code::StubType Code::type() { 3432 Code::StubType Code::type() {
3434 return ExtractTypeFromFlags(flags()); 3433 return ExtractTypeFromFlags(flags());
3435 } 3434 }
3436 3435
3437 3436
3438 int Code::arguments_count() { 3437 int Code::arguments_count() {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); 3668 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
3670 } 3669 }
3671 3670
3672 3671
3673 bool Code::is_inline_cache_stub() { 3672 bool Code::is_inline_cache_stub() {
3674 Kind kind = this->kind(); 3673 Kind kind = this->kind();
3675 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND; 3674 return kind >= FIRST_IC_KIND && kind <= LAST_IC_KIND;
3676 } 3675 }
3677 3676
3678 3677
3678 bool Code::is_debug_break() {
3679 return ic_state() == DEBUG_STUB && extra_ic_state() == DEBUG_BREAK;
3680 }
3681
3682
3679 Code::Flags Code::ComputeFlags(Kind kind, 3683 Code::Flags Code::ComputeFlags(Kind kind,
3680 InlineCacheState ic_state, 3684 InlineCacheState ic_state,
3681 ExtraICState extra_ic_state, 3685 ExtraICState extra_ic_state,
3682 StubType type, 3686 StubType type,
3683 int argc, 3687 int argc,
3684 InlineCacheHolderFlag holder) { 3688 InlineCacheHolderFlag holder) {
3685 // Extra IC state is only allowed for call IC stubs or for store IC 3689 // Extra IC state is only allowed for call IC stubs or for store IC
3686 // stubs. 3690 // stubs.
3687 ASSERT(extra_ic_state == kNoExtraICState || 3691 ASSERT(extra_ic_state == kNoExtraICState ||
3688 kind == CALL_IC || 3692 kind == CALL_IC ||
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 #undef WRITE_UINT32_FIELD 5787 #undef WRITE_UINT32_FIELD
5784 #undef READ_SHORT_FIELD 5788 #undef READ_SHORT_FIELD
5785 #undef WRITE_SHORT_FIELD 5789 #undef WRITE_SHORT_FIELD
5786 #undef READ_BYTE_FIELD 5790 #undef READ_BYTE_FIELD
5787 #undef WRITE_BYTE_FIELD 5791 #undef WRITE_BYTE_FIELD
5788 5792
5789 5793
5790 } } // namespace v8::internal 5794 } } // namespace v8::internal
5791 5795
5792 #endif // V8_OBJECTS_INL_H_ 5796 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698