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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 23684059: Polymorphic inlining of [] operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013140570) \ 125 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013140570) \
126 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944674353) \ 126 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944674353) \
127 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22686587) \ 127 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22686587) \
128 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858084501) \ 128 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858084501) \
129 V(_Uint32x4, select, Uint32x4Select, 881590808) \ 129 V(_Uint32x4, select, Uint32x4Select, 881590808) \
130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ 130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \
131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ 131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \
132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ 132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \
133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ 133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \
134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 2054503505) \ 134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 2054503505) \
135 V(_ObjectArray, [], ObjectArrayGetIndexed, 93386978) \
136 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 894753724) \
137 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 500679426) \
138 V(_Float32Array, [], Float32ArrayGetIndexed, 1103519924) \
139 V(_Float64Array, [], Float64ArrayGetIndexed, 749351746) \
140 V(_Int8Array, [], Int8ArrayGetIndexed, 78158949) \
141 V(_Uint8Array, [], Uint8ArrayGetIndexed, 380681966) \
142 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1171127014) \
143 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1709616627) \
144 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
145 1710139506) \
146 V(_Int16Array, [], Int16ArrayGetIndexed, 1070032854) \
147 V(_Uint16Array, [], Uint16ArrayGetIndexed, 692410555) \
148 V(_Int32Array, [], Int32ArrayGetIndexed, 665555051) \
149 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1300156137) \
150 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1779360236) \
135 151
136 152
137 // A list of core function that should always be inlined. 153 // A list of core function that should always be inlined.
138 #define INLINE_WHITE_LIST(V) \ 154 #define INLINE_WHITE_LIST(V) \
139 V(_ObjectArray, get:length, ObjectArrayLength, 259323113) \ 155 V(_ObjectArray, get:length, ObjectArrayLength, 259323113) \
140 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341942416) \ 156 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341942416) \
141 V(_TypedList, get:length, TypedDataLength, 26556746) \ 157 V(_TypedList, get:length, TypedDataLength, 26556746) \
142 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160357614) \ 158 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160357614) \
143 V(_StringBase, get:length, StringBaseLength, 1483460481) \ 159 V(_StringBase, get:length, StringBaseLength, 1483460481) \
144 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \ 160 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 Instruction* Current() const { return current_; } 1335 Instruction* Current() const { return current_; }
1320 1336
1321 private: 1337 private:
1322 BlockEntryInstr* block_entry_; 1338 BlockEntryInstr* block_entry_;
1323 Instruction* current_; 1339 Instruction* current_;
1324 }; 1340 };
1325 1341
1326 1342
1327 class GraphEntryInstr : public BlockEntryInstr { 1343 class GraphEntryInstr : public BlockEntryInstr {
1328 public: 1344 public:
1329 GraphEntryInstr(const ParsedFunction& parsed_function, 1345 GraphEntryInstr(const ParsedFunction* parsed_function,
1330 TargetEntryInstr* normal_entry, 1346 TargetEntryInstr* normal_entry,
1331 intptr_t osr_id); 1347 intptr_t osr_id);
1332 1348
1333 DECLARE_INSTRUCTION(GraphEntry) 1349 DECLARE_INSTRUCTION(GraphEntry)
1334 1350
1335 virtual intptr_t PredecessorCount() const { return 0; } 1351 virtual intptr_t PredecessorCount() const { return 0; }
1336 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { 1352 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const {
1337 UNREACHABLE(); 1353 UNREACHABLE();
1338 return NULL; 1354 return NULL;
1339 } 1355 }
(...skipping 24 matching lines...) Expand all
1364 // without try-catch, this is 0. Otherwise, it is the number of local 1380 // without try-catch, this is 0. Otherwise, it is the number of local
1365 // variables. 1381 // variables.
1366 intptr_t fixed_slot_count() const { return fixed_slot_count_; } 1382 intptr_t fixed_slot_count() const { return fixed_slot_count_; }
1367 void set_fixed_slot_count(intptr_t count) { 1383 void set_fixed_slot_count(intptr_t count) {
1368 ASSERT(count >= 0); 1384 ASSERT(count >= 0);
1369 fixed_slot_count_ = count; 1385 fixed_slot_count_ = count;
1370 } 1386 }
1371 TargetEntryInstr* normal_entry() const { return normal_entry_; } 1387 TargetEntryInstr* normal_entry() const { return normal_entry_; }
1372 1388
1373 const ParsedFunction& parsed_function() const { 1389 const ParsedFunction& parsed_function() const {
1374 return parsed_function_; 1390 return *parsed_function_;
1375 } 1391 }
1376 1392
1377 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const { 1393 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const {
1378 return catch_entries_; 1394 return catch_entries_;
1379 } 1395 }
1380 1396
1381 virtual void PrintTo(BufferFormatter* f) const; 1397 virtual void PrintTo(BufferFormatter* f) const;
1382 1398
1383 private: 1399 private:
1384 virtual void ClearPredecessors() {} 1400 virtual void ClearPredecessors() {}
1385 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); } 1401 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); }
1386 1402
1387 const ParsedFunction& parsed_function_; 1403 const ParsedFunction* parsed_function_;
1388 TargetEntryInstr* normal_entry_; 1404 TargetEntryInstr* normal_entry_;
1389 GrowableArray<CatchBlockEntryInstr*> catch_entries_; 1405 GrowableArray<CatchBlockEntryInstr*> catch_entries_;
1390 GrowableArray<Definition*> initial_definitions_; 1406 GrowableArray<Definition*> initial_definitions_;
1391 const intptr_t osr_id_; 1407 const intptr_t osr_id_;
1392 intptr_t entry_count_; 1408 intptr_t entry_count_;
1393 intptr_t spill_slot_count_; 1409 intptr_t spill_slot_count_;
1394 intptr_t fixed_slot_count_; // For try-catch in optimized code. 1410 intptr_t fixed_slot_count_; // For try-catch in optimized code.
1395 1411
1396 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr); 1412 DISALLOW_COPY_AND_ASSIGN(GraphEntryInstr);
1397 }; 1413 };
(...skipping 5386 matching lines...) Expand 10 before | Expand all | Expand 10 after
6784 ForwardInstructionIterator* current_iterator_; 6800 ForwardInstructionIterator* current_iterator_;
6785 6801
6786 private: 6802 private:
6787 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6803 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6788 }; 6804 };
6789 6805
6790 6806
6791 } // namespace dart 6807 } // namespace dart
6792 6808
6793 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6809 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698