OLD | NEW |
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 6477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6488 | 6488 |
6489 | 6489 |
6490 bool SharedFunctionInfo::IsBuiltin() { | 6490 bool SharedFunctionInfo::IsBuiltin() { |
6491 Object* script_obj = script(); | 6491 Object* script_obj = script(); |
6492 if (script_obj->IsUndefined(GetIsolate())) return true; | 6492 if (script_obj->IsUndefined(GetIsolate())) return true; |
6493 Script* script = Script::cast(script_obj); | 6493 Script* script = Script::cast(script_obj); |
6494 Script::Type type = static_cast<Script::Type>(script->type()); | 6494 Script::Type type = static_cast<Script::Type>(script->type()); |
6495 return type != Script::TYPE_NORMAL; | 6495 return type != Script::TYPE_NORMAL; |
6496 } | 6496 } |
6497 | 6497 |
6498 | 6498 bool SharedFunctionInfo::IsSubjectToDebugging() { |
6499 bool SharedFunctionInfo::IsSubjectToDebugging() { return !IsBuiltin(); } | 6499 return !IsBuiltin() && !HasAsmWasmData(); |
6500 | 6500 } |
6501 | 6501 |
6502 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { | 6502 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { |
6503 return optimized_code_map() == GetHeap()->empty_fixed_array(); | 6503 return optimized_code_map() == GetHeap()->empty_fixed_array(); |
6504 } | 6504 } |
6505 | 6505 |
6506 | 6506 |
6507 bool JSFunction::IsOptimized() { | 6507 bool JSFunction::IsOptimized() { |
6508 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 6508 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
6509 } | 6509 } |
6510 | 6510 |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8415 #undef WRITE_INT64_FIELD | 8415 #undef WRITE_INT64_FIELD |
8416 #undef READ_BYTE_FIELD | 8416 #undef READ_BYTE_FIELD |
8417 #undef WRITE_BYTE_FIELD | 8417 #undef WRITE_BYTE_FIELD |
8418 #undef NOBARRIER_READ_BYTE_FIELD | 8418 #undef NOBARRIER_READ_BYTE_FIELD |
8419 #undef NOBARRIER_WRITE_BYTE_FIELD | 8419 #undef NOBARRIER_WRITE_BYTE_FIELD |
8420 | 8420 |
8421 } // namespace internal | 8421 } // namespace internal |
8422 } // namespace v8 | 8422 } // namespace v8 |
8423 | 8423 |
8424 #endif // V8_OBJECTS_INL_H_ | 8424 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |