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

Side by Side Diff: vm/code_generator_ia32.cc

Issue 10383147: Fix issue with stack layout assumption going wrong when a dart function has optional parameters and… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | vm/flow_graph_compiler_x64.cc » ('j') | vm/flow_graph_compiler_x64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 __ Bind(&next_parameter); 539 __ Bind(&next_parameter);
540 } 540 }
541 delete[] opt_param; 541 delete[] opt_param;
542 delete[] opt_param_position; 542 delete[] opt_param_position;
543 // Check that EDI now points to the null terminator in the array descriptor. 543 // Check that EDI now points to the null terminator in the array descriptor.
544 Label all_arguments_processed; 544 Label all_arguments_processed;
545 __ cmpl(Address(EDI, 0), raw_null); 545 __ cmpl(Address(EDI, 0), raw_null);
546 __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump); 546 __ j(EQUAL, &all_arguments_processed, Assembler::kNearJump);
547 547
548 __ Bind(&wrong_num_arguments); 548 __ Bind(&wrong_num_arguments);
549 if (locals_space_size() != 0) {
550 // We need to unwind the space we reserved for locals/copied parms etc.
regis 2012/05/14 16:25:16 locals/copied parms etc. -> locals and copied para
siva 2012/05/15 21:51:15 Done.
551 // for this method as the NoSuchMethodFunction stub does not expect to
552 // see that area on the stack.
553 __ addl(ESP, Immediate(locals_space_size()));
554 }
549 if (function.IsClosureFunction()) { 555 if (function.IsClosureFunction()) {
550 GenerateCallRuntime(AstNode::kNoId, 556 GenerateCallRuntime(AstNode::kNoId,
551 0, 557 0,
552 kClosureArgumentMismatchRuntimeEntry); 558 kClosureArgumentMismatchRuntimeEntry);
553 } else { 559 } else {
554 // Invoke noSuchMethod function. 560 // Invoke noSuchMethod function.
555 const int kNumArgsChecked = 1; 561 const int kNumArgsChecked = 1;
556 ICData& ic_data = ICData::ZoneHandle(); 562 ICData& ic_data = ICData::ZoneHandle();
557 ic_data = ICData::New(parsed_function().function(), 563 ic_data = ICData::New(parsed_function().function(),
558 String::Handle(function.name()), 564 String::Handle(function.name()),
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 const Error& error = Error::Handle( 2965 const Error& error = Error::Handle(
2960 Parser::FormatError(script, token_index, "Error", format, args)); 2966 Parser::FormatError(script, token_index, "Error", format, args));
2961 va_end(args); 2967 va_end(args);
2962 Isolate::Current()->long_jump_base()->Jump(1, error); 2968 Isolate::Current()->long_jump_base()->Jump(1, error);
2963 UNREACHABLE(); 2969 UNREACHABLE();
2964 } 2970 }
2965 2971
2966 } // namespace dart 2972 } // namespace dart
2967 2973
2968 #endif // defined TARGET_ARCH_IA32 2974 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/flow_graph_compiler_x64.cc » ('j') | vm/flow_graph_compiler_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698