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

Side by Side Diff: vm/code_generator_ia32.cc

Issue 8379013: Implement new inline cache. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 const String& function_name, 472 const String& function_name,
473 int num_arguments, 473 int num_arguments,
474 const Array& optional_arguments_names) { 474 const Array& optional_arguments_names) {
475 // Set up the function name and number of arguments (including the receiver) 475 // Set up the function name and number of arguments (including the receiver)
476 // to the InstanceCall stub which will resolve the correct entrypoint for 476 // to the InstanceCall stub which will resolve the correct entrypoint for
477 // the operator and call it. 477 // the operator and call it.
478 ICData ic_data(function_name, 1); 478 ICData ic_data(function_name, 1);
479 __ LoadObject(ECX, Array::ZoneHandle(ic_data.data())); 479 __ LoadObject(ECX, Array::ZoneHandle(ic_data.data()));
480 __ LoadObject(EDX, ArgumentsDescriptor(num_arguments, 480 __ LoadObject(EDX, ArgumentsDescriptor(num_arguments,
481 optional_arguments_names)); 481 optional_arguments_names));
482 __ call(&StubCode::CallInstanceFunctionLabel()); 482 ExternalLabel target_label(
483 "InlineCache1", StubCode::InlineCache1EntryPoint());
484
485 __ call(&target_label);
483 AddCurrentDescriptor(PcDescriptors::kIcCall, 486 AddCurrentDescriptor(PcDescriptors::kIcCall,
484 node_id, 487 node_id,
485 token_index); 488 token_index);
486 __ addl(ESP, Immediate(num_arguments * kWordSize)); 489 __ addl(ESP, Immediate(num_arguments * kWordSize));
487 } 490 }
488 491
489 492
490 // Call to generate entry code: 493 // Call to generate entry code:
491 // - compute frame size and setup frame. 494 // - compute frame size and setup frame.
492 // - allocate local variables on stack. 495 // - allocate local variables on stack.
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 const Class& cls = Class::Handle(parsed_function_.function().owner()); 2627 const Class& cls = Class::Handle(parsed_function_.function().owner());
2625 const Script& script = Script::Handle(cls.script()); 2628 const Script& script = Script::Handle(cls.script());
2626 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); 2629 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args);
2627 Isolate::Current()->long_jump_base()->Jump(1, error_msg); 2630 Isolate::Current()->long_jump_base()->Jump(1, error_msg);
2628 UNREACHABLE(); 2631 UNREACHABLE();
2629 } 2632 }
2630 2633
2631 } // namespace dart 2634 } // namespace dart
2632 2635
2633 #endif // defined TARGET_ARCH_IA32 2636 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698