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

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

Issue 1407513003: [Interpreter]: Basic support for iterating interpreter stack frames for GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« src/frames.cc ('K') | « src/objects.h ('k') | no next file » | 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4976 matching lines...) Expand 10 before | Expand all | Expand 10 after
4987 bool Code::IsCodeStubOrIC() { 4987 bool Code::IsCodeStubOrIC() {
4988 return kind() == STUB || kind() == HANDLER || kind() == LOAD_IC || 4988 return kind() == STUB || kind() == HANDLER || kind() == LOAD_IC ||
4989 kind() == KEYED_LOAD_IC || kind() == CALL_IC || kind() == STORE_IC || 4989 kind() == KEYED_LOAD_IC || kind() == CALL_IC || kind() == STORE_IC ||
4990 kind() == KEYED_STORE_IC || kind() == BINARY_OP_IC || 4990 kind() == KEYED_STORE_IC || kind() == BINARY_OP_IC ||
4991 kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || 4991 kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
4992 kind() == TO_BOOLEAN_IC; 4992 kind() == TO_BOOLEAN_IC;
4993 } 4993 }
4994 4994
4995 4995
4996 bool Code::IsJavaScriptCode() { 4996 bool Code::IsJavaScriptCode() {
4997 if (kind() == FUNCTION || kind() == OPTIMIZED_FUNCTION) { 4997 return kind() == FUNCTION || kind() == OPTIMIZED_FUNCTION ||
4998 return true; 4998 is_interpreter_entry_trampoline();
4999 }
5000 Handle<Code> interpreter_entry =
5001 GetIsolate()->builtins()->InterpreterEntryTrampoline();
5002 return interpreter_entry.location() != nullptr && *interpreter_entry == this;
5003 } 4999 }
5004 5000
5005 5001
5006 InlineCacheState Code::ic_state() { 5002 InlineCacheState Code::ic_state() {
5007 InlineCacheState result = ExtractICStateFromFlags(flags()); 5003 InlineCacheState result = ExtractICStateFromFlags(flags());
5008 // Only allow uninitialized or debugger states for non-IC code 5004 // Only allow uninitialized or debugger states for non-IC code
5009 // objects. This is used in the debugger to determine whether or not 5005 // objects. This is used in the debugger to determine whether or not
5010 // a call to code object has been replaced with a debug break call. 5006 // a call to code object has been replaced with a debug break call.
5011 DCHECK(is_inline_cache_stub() || 5007 DCHECK(is_inline_cache_stub() ||
5012 result == UNINITIALIZED || 5008 result == UNINITIALIZED ||
(...skipping 28 matching lines...) Expand all
5041 return IsCrankshaftedField::decode( 5037 return IsCrankshaftedField::decode(
5042 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); 5038 READ_UINT32_FIELD(this, kKindSpecificFlags2Offset));
5043 } 5039 }
5044 5040
5045 5041
5046 inline bool Code::is_hydrogen_stub() { 5042 inline bool Code::is_hydrogen_stub() {
5047 return is_crankshafted() && kind() != OPTIMIZED_FUNCTION; 5043 return is_crankshafted() && kind() != OPTIMIZED_FUNCTION;
5048 } 5044 }
5049 5045
5050 5046
5047 inline bool Code::is_interpreter_entry_trampoline() {
5048 Handle<Code> interpreter_entry =
5049 GetIsolate()->builtins()->InterpreterEntryTrampoline();
5050 return interpreter_entry.location() != nullptr && *interpreter_entry == this;
5051 }
5052
5051 inline void Code::set_is_crankshafted(bool value) { 5053 inline void Code::set_is_crankshafted(bool value) {
5052 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); 5054 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset);
5053 int updated = IsCrankshaftedField::update(previous, value); 5055 int updated = IsCrankshaftedField::update(previous, value);
5054 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); 5056 WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated);
5055 } 5057 }
5056 5058
5057 5059
5058 inline bool Code::is_turbofanned() { 5060 inline bool Code::is_turbofanned() {
5059 return IsTurbofannedField::decode( 5061 return IsTurbofannedField::decode(
5060 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 5062 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
(...skipping 3066 matching lines...) Expand 10 before | Expand all | Expand 10 after
8127 #undef WRITE_INT64_FIELD 8129 #undef WRITE_INT64_FIELD
8128 #undef READ_BYTE_FIELD 8130 #undef READ_BYTE_FIELD
8129 #undef WRITE_BYTE_FIELD 8131 #undef WRITE_BYTE_FIELD
8130 #undef NOBARRIER_READ_BYTE_FIELD 8132 #undef NOBARRIER_READ_BYTE_FIELD
8131 #undef NOBARRIER_WRITE_BYTE_FIELD 8133 #undef NOBARRIER_WRITE_BYTE_FIELD
8132 8134
8133 } // namespace internal 8135 } // namespace internal
8134 } // namespace v8 8136 } // namespace v8
8135 8137
8136 #endif // V8_OBJECTS_INL_H_ 8138 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/frames.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698