OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/code_generator.h" | 5 #include "vm/code_generator.h" |
6 | 6 |
7 #include "vm/assembler_macros.h" | 7 #include "vm/assembler_macros.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 } | 1457 } |
1458 | 1458 |
1459 | 1459 |
1460 // We are entering function name for a valid argument count. | 1460 // We are entering function name for a valid argument count. |
1461 void FunctionsCache::EnterFunctionAt(int i, | 1461 void FunctionsCache::EnterFunctionAt(int i, |
1462 const Array& cache, | 1462 const Array& cache, |
1463 const Function& function, | 1463 const Function& function, |
1464 int num_arguments, | 1464 int num_arguments, |
1465 int num_named_arguments) { | 1465 int num_named_arguments) { |
1466 ASSERT((i % kNumEntries) == 0); | 1466 ASSERT((i % kNumEntries) == 0); |
1467 ASSERT(function.AreValidArgumentCounts(num_arguments, num_named_arguments)); | 1467 ASSERT(function.AreValidArgumentCounts(num_arguments, |
| 1468 num_named_arguments, |
| 1469 NULL)); |
1468 cache.SetAt(i + FunctionsCache::kFunctionName, | 1470 cache.SetAt(i + FunctionsCache::kFunctionName, |
1469 String::Handle(function.name())); | 1471 String::Handle(function.name())); |
1470 cache.SetAt(i + FunctionsCache::kArgCount, | 1472 cache.SetAt(i + FunctionsCache::kArgCount, |
1471 Smi::Handle(Smi::New(num_arguments))); | 1473 Smi::Handle(Smi::New(num_arguments))); |
1472 cache.SetAt(i + FunctionsCache::kNamedArgCount, | 1474 cache.SetAt(i + FunctionsCache::kNamedArgCount, |
1473 Smi::Handle(Smi::New(num_named_arguments))); | 1475 Smi::Handle(Smi::New(num_named_arguments))); |
1474 cache.SetAt(i + FunctionsCache::kFunction, function); | 1476 cache.SetAt(i + FunctionsCache::kFunction, function); |
1475 } | 1477 } |
1476 | 1478 |
1477 | 1479 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 } | 1538 } |
1537 } | 1539 } |
1538 } | 1540 } |
1539 // The cache is null terminated, therefore the loop above should never | 1541 // The cache is null terminated, therefore the loop above should never |
1540 // terminate by itself. | 1542 // terminate by itself. |
1541 UNREACHABLE(); | 1543 UNREACHABLE(); |
1542 return Code::null(); | 1544 return Code::null(); |
1543 } | 1545 } |
1544 | 1546 |
1545 } // namespace dart | 1547 } // namespace dart |
OLD | NEW |