Chromium Code Reviews| 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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1443 delete[] opt_param; | 1443 delete[] opt_param; |
| 1444 delete[] opt_param_position; | 1444 delete[] opt_param_position; |
| 1445 // Check that RDI now points to the null terminator in the array descriptor. | 1445 // Check that RDI now points to the null terminator in the array descriptor. |
| 1446 const Immediate raw_null = | 1446 const Immediate raw_null = |
| 1447 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1447 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1448 Label all_arguments_processed; | 1448 Label all_arguments_processed; |
| 1449 __ cmpq(Address(RDI, 0), raw_null); | 1449 __ cmpq(Address(RDI, 0), raw_null); |
| 1450 __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump); | 1450 __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump); |
| 1451 | 1451 |
| 1452 __ Bind(&wrong_num_arguments); | 1452 __ Bind(&wrong_num_arguments); |
| 1453 if (StackSize() != 0) { | |
| 1454 // We need to unwind the space we reserved for locals/copied parms etc. | |
| 1455 // for this method as the NoSuchMethodFunction stub does not expect to | |
|
regis
2012/05/14 16:25:16
ditto
siva
2012/05/15 21:51:15
Done.
| |
| 1456 // see that area on the stack. | |
| 1457 __ addq(RSP, Immediate(StackSize() * kWordSize)); | |
| 1458 } | |
| 1453 if (function.IsClosureFunction()) { | 1459 if (function.IsClosureFunction()) { |
| 1454 GenerateCallRuntime(AstNode::kNoId, | 1460 GenerateCallRuntime(AstNode::kNoId, |
| 1455 0, | 1461 0, |
| 1456 CatchClauseNode::kInvalidTryIndex, | 1462 CatchClauseNode::kInvalidTryIndex, |
| 1457 kClosureArgumentMismatchRuntimeEntry); | 1463 kClosureArgumentMismatchRuntimeEntry); |
| 1458 } else { | 1464 } else { |
| 1459 // Invoke noSuchMethod function. | 1465 // Invoke noSuchMethod function. |
| 1460 const int kNumArgsChecked = 1; | 1466 const int kNumArgsChecked = 1; |
| 1461 ICData& ic_data = ICData::ZoneHandle(); | 1467 ICData& ic_data = ICData::ZoneHandle(); |
| 1462 ic_data = ICData::New(parsed_function_.function(), | 1468 ic_data = ICData::New(parsed_function_.function(), |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1733 ASSERT(exception_handlers_list_ != NULL); | 1739 ASSERT(exception_handlers_list_ != NULL); |
| 1734 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 1740 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
| 1735 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); | 1741 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); |
| 1736 code.set_exception_handlers(handlers); | 1742 code.set_exception_handlers(handlers); |
| 1737 } | 1743 } |
| 1738 | 1744 |
| 1739 | 1745 |
| 1740 } // namespace dart | 1746 } // namespace dart |
| 1741 | 1747 |
| 1742 #endif // defined TARGET_ARCH_X64 | 1748 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |