OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 #include "vm/kernel_binary_flowgraph.h" | 5 #include "vm/kernel_binary_flowgraph.h" |
6 | 6 |
7 #include "vm/longjump.h" | 7 #include "vm/longjump.h" |
8 #include "vm/object_store.h" | 8 #include "vm/object_store.h" |
9 | 9 |
10 #if !defined(DART_PRECOMPILED_RUNTIME) | 10 #if !defined(DART_PRECOMPILED_RUNTIME) |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 return name_index; | 1338 return name_index; |
1339 } | 1339 } |
1340 | 1340 |
1341 const dart::String& StreamingFlowGraphBuilder::ReadNameAsMethodName() { | 1341 const dart::String& StreamingFlowGraphBuilder::ReadNameAsMethodName() { |
1342 StringIndex name_index = ReadStringReference(); // read name index. | 1342 StringIndex name_index = ReadStringReference(); // read name index. |
1343 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { | 1343 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { |
1344 NameIndex library_reference = | 1344 NameIndex library_reference = |
1345 ReadCanonicalNameReference(); // read library index. | 1345 ReadCanonicalNameReference(); // read library index. |
1346 return H.DartMethodName(library_reference, name_index); | 1346 return H.DartMethodName(library_reference, name_index); |
1347 } else { | 1347 } else { |
1348 return H.DartMethodName(NameIndex(NULL), name_index); | 1348 return H.DartMethodName(NameIndex(), name_index); |
1349 } | 1349 } |
1350 } | 1350 } |
1351 | 1351 |
1352 const dart::String& StreamingFlowGraphBuilder::ReadNameAsSetterName() { | 1352 const dart::String& StreamingFlowGraphBuilder::ReadNameAsSetterName() { |
1353 StringIndex name_index = ReadStringReference(); // read name index. | 1353 StringIndex name_index = ReadStringReference(); // read name index. |
1354 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { | 1354 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { |
1355 NameIndex library_reference = | 1355 NameIndex library_reference = |
1356 ReadCanonicalNameReference(); // read library index. | 1356 ReadCanonicalNameReference(); // read library index. |
1357 return H.DartSetterName(library_reference, name_index); | 1357 return H.DartSetterName(library_reference, name_index); |
1358 } else { | 1358 } else { |
1359 return H.DartSetterName(NameIndex(NULL), name_index); | 1359 return H.DartSetterName(NameIndex(), name_index); |
1360 } | 1360 } |
1361 } | 1361 } |
1362 | 1362 |
1363 const dart::String& StreamingFlowGraphBuilder::ReadNameAsGetterName() { | 1363 const dart::String& StreamingFlowGraphBuilder::ReadNameAsGetterName() { |
1364 StringIndex name_index = ReadStringReference(); // read name index. | 1364 StringIndex name_index = ReadStringReference(); // read name index. |
1365 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { | 1365 if ((H.StringSize(name_index) >= 1) && H.CharacterAt(name_index, 0) == '_') { |
1366 NameIndex library_reference = | 1366 NameIndex library_reference = |
1367 ReadCanonicalNameReference(); // read library index. | 1367 ReadCanonicalNameReference(); // read library index. |
1368 return H.DartGetterName(library_reference, name_index); | 1368 return H.DartGetterName(library_reference, name_index); |
1369 } else { | 1369 } else { |
1370 return H.DartGetterName(NameIndex(NULL), name_index); | 1370 return H.DartGetterName(NameIndex(), name_index); |
1371 } | 1371 } |
1372 } | 1372 } |
1373 | 1373 |
1374 void StreamingFlowGraphBuilder::SkipStringReference() { | 1374 void StreamingFlowGraphBuilder::SkipStringReference() { |
1375 ReadUInt(); | 1375 ReadUInt(); |
1376 } | 1376 } |
1377 | 1377 |
1378 void StreamingFlowGraphBuilder::SkipCanonicalNameReference() { | 1378 void StreamingFlowGraphBuilder::SkipCanonicalNameReference() { |
1379 ReadUInt(); | 1379 ReadUInt(); |
1380 } | 1380 } |
(...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4311 } | 4311 } |
4312 instructions += StoreLocal(position, variable); | 4312 instructions += StoreLocal(position, variable); |
4313 instructions += Drop(); | 4313 instructions += Drop(); |
4314 return instructions; | 4314 return instructions; |
4315 } | 4315 } |
4316 | 4316 |
4317 } // namespace kernel | 4317 } // namespace kernel |
4318 } // namespace dart | 4318 } // namespace dart |
4319 | 4319 |
4320 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 4320 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |