aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/CoreTypes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CPlusPlus: Inline more simple Type related functionshjk2022-06-281-59/+1
| | | | | Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPlusPlus: Use a global variable for the undefined type instancehjk2022-06-241-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and split the FullySpecifiedType in two overloads. Initially: 29 [1] FullySpecifiedType::FullySpecifiedType(Type *type) : <+ 24> 41 54 push %r12 <+ 26> 55 push %rbp 34 [1] static UndefinedType t; <+ 27> 48 8b 2d 26 68 13 00 mov 0x136826(%rip),%rbp 29 [1] FullySpecifiedType::FullySpecifiedType(Type *type) : <+ 34> 53 push %rbx <+ 35> 48 89 fb mov %rdi,%rbx 34 [1] static UndefinedType t; <+ 38> 0f b6 45 00 movzbl 0x0(%rbp),%eax <+ 42> 84 c0 test %al,%al <+ 44> 74 12 je 0x7fffc135c620 <_ZN9CPlusPlus18FullySpecifiedTypeC2EPNS_4TypeE+64> <+ 46> 4c 8b 25 5b 66 13 00 mov 0x13665b(%rip),%r12 35 [1] return &t; <+ 53> 4c 89 23 mov %r12,(%rbx) 34 [1] } <+ 56> 5b pop %rbx <+ 57> 5d pop %rbp <+ 58> 41 5c pop %r12 <+ 60> c3 ret After making it a global variable: 29 [1] FullySpecifiedType::FullySpecifiedType(Type *type) : f3 0f 1e fa endbr64 30 [1] _type(type), _flags(0) <+ 4> c7 47 08 00 00 00 00 movl $0x0,0x8(%rdi) 32 [1] if (! type) <+ 11> 48 85 f6 test %rsi,%rsi <+ 14> 74 08 je 0x7fffc14675f8 <_ZN9CPlusPlus18FullySpecifiedTypeC2EPNS_4TypeE+24> <+ 16> 48 89 37 mov %rsi,(%rdi) 34 [1] } <+ 19> c3 ret <+ 20> 0f 1f 40 00 nopl 0x0(%rax) 33 [1] _type = &UndefinedType::instance; <+ 24> 48 8b 35 49 67 13 00 mov 0x136749(%rip),%rsi # 0x7fffc159dd48 <+ 31> 48 89 37 mov %rsi,(%rdi) 34 [1] } <+ 34> c3 ret The no-parameters branch after splitting: 29 [1] FullySpecifiedType::FullySpecifiedType() : f3 0f 1e fa endbr64 30 [1] _type(&UndefinedType::instance), _flags(0) <+ 4> 48 8b 05 5d 67 13 00 mov 0x13675d(%rip),%rax # 0x7fffc159dd48 <+ 11> c7 47 08 00 00 00 00 movl $0x0,0x8(%rdi) <+ 18> 48 89 07 mov %rax,(%rdi) 31 [1] {} <+ 21> c3 ret Change-Id: I61439d68921cf9fa422304033b75de16bb4aa0d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++: Get rid of {Name,Type}::isEqualTo()Nikolai Kosjar2014-05-231-85/+0
| | | | | | | | | ...since it's superseded by the class Matcher. For consistency, rename FullySpecifiedType::isEqualTo() to match(). Change-Id: I07640f9218d814e0350265de45f05929e5d595a9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Do type and name equality checking in a safe manner.Erik Verbruggen2014-03-271-10/+10
| | | | | | | | | Change the TypeMatcher to also match names, and use two "block" lists in SafeMatcher to prevent infinite recursion. Task-number: QTCREATORBUG-11240 Change-Id: I0367ae795ee6be579b83aeb8d46723c877e4aa75 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* remove nokia copyrights from roberto's codeOswald Buddenhagen2011-05-161-31/+0
| | | | | | | | they are lying. nokia has no copyright on this code. and the double license in a single file looks weird. that's why we moved it to 3rdparty/, so it is clear it is not nokia's. Approved-by: legal
* move src/shared/cplusplus/ -> src/libs/3rdparty/cplusplus/Oswald Buddenhagen2011-05-161-0/+322
Approved-by: legal