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

Side by Side Diff: vm/flow_graph_compiler_ia32.cc

Issue 11667012: Convert all symbols accessor to return read only handles so that it is not necessary to create a ne… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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
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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // stack. 788 // stack.
789 __ addl(ESP, Immediate(StackSize() * kWordSize)); 789 __ addl(ESP, Immediate(StackSize() * kWordSize));
790 } 790 }
791 // The call below has an empty stackmap because we have just 791 // The call below has an empty stackmap because we have just
792 // dropped the spill slots. 792 // dropped the spill slots.
793 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); 793 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
794 794
795 // Invoke noSuchMethod function passing the original name of the function. 795 // Invoke noSuchMethod function passing the original name of the function.
796 // If the function is a closure function, use "call" as the original name. 796 // If the function is a closure function, use "call" as the original name.
797 const String& name = String::Handle( 797 const String& name = String::Handle(
798 function.IsClosureFunction() ? Symbols::Call() : function.name()); 798 function.IsClosureFunction() ? Symbols::Call().raw() : function.name());
799 const int kNumArgsChecked = 1; 799 const int kNumArgsChecked = 1;
800 const ICData& ic_data = ICData::ZoneHandle( 800 const ICData& ic_data = ICData::ZoneHandle(
801 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); 801 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked));
802 __ LoadObject(ECX, ic_data); 802 __ LoadObject(ECX, ic_data);
803 // EBP - 4 : PC marker, allows easy identification of RawInstruction obj. 803 // EBP - 4 : PC marker, allows easy identification of RawInstruction obj.
804 // EBP : points to previous frame pointer. 804 // EBP : points to previous frame pointer.
805 // EBP + 4 : points to return address. 805 // EBP + 4 : points to return address.
806 // EBP + 8 : address of last argument (arg n-1). 806 // EBP + 8 : address of last argument (arg n-1).
807 // ESP + 8 + 4*(n-1) : address of first argument (arg 0). 807 // ESP + 8 + 4*(n-1) : address of first argument (arg 0).
808 // ECX : ic-data. 808 // ECX : ic-data.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // We need to unwind the space we reserved for locals and copied 922 // We need to unwind the space we reserved for locals and copied
923 // parameters. The NoSuchMethodFunction stub does not expect to see 923 // parameters. The NoSuchMethodFunction stub does not expect to see
924 // that area on the stack. 924 // that area on the stack.
925 __ addl(ESP, Immediate(StackSize() * kWordSize)); 925 __ addl(ESP, Immediate(StackSize() * kWordSize));
926 } 926 }
927 // The call below has an empty stackmap because we have just 927 // The call below has an empty stackmap because we have just
928 // dropped the spill slots. 928 // dropped the spill slots.
929 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); 929 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
930 930
931 // Invoke noSuchMethod function passing "call" as the function name. 931 // Invoke noSuchMethod function passing "call" as the function name.
932 const String& name = String::Handle(Symbols::Call());
933 const int kNumArgsChecked = 1; 932 const int kNumArgsChecked = 1;
934 const ICData& ic_data = ICData::ZoneHandle( 933 const ICData& ic_data = ICData::ZoneHandle(
935 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); 934 ICData::New(function, Symbols::Call(),
935 Isolate::kNoDeoptId, kNumArgsChecked));
936 __ LoadObject(ECX, ic_data); 936 __ LoadObject(ECX, ic_data);
937 // EBP - 4 : PC marker, for easy identification of RawInstruction obj. 937 // EBP - 4 : PC marker, for easy identification of RawInstruction obj.
938 // EBP : points to previous frame pointer. 938 // EBP : points to previous frame pointer.
939 // EBP + 4 : points to return address. 939 // EBP + 4 : points to return address.
940 // EBP + 8 : address of last argument (arg n-1). 940 // EBP + 8 : address of last argument (arg n-1).
941 // ESP + 8 + 4*(n-1) : address of first argument (arg 0). 941 // ESP + 8 + 4*(n-1) : address of first argument (arg 0).
942 // ECX : ic-data. 942 // ECX : ic-data.
943 // EDX : arguments descriptor array. 943 // EDX : arguments descriptor array.
944 __ call(&StubCode::CallNoSuchMethodFunctionLabel()); 944 __ call(&StubCode::CallNoSuchMethodFunctionLabel());
945 if (is_optimizing()) { 945 if (is_optimizing()) {
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 __ popl(ECX); 1499 __ popl(ECX);
1500 __ popl(EAX); 1500 __ popl(EAX);
1501 } 1501 }
1502 1502
1503 1503
1504 #undef __ 1504 #undef __
1505 1505
1506 } // namespace dart 1506 } // namespace dart
1507 1507
1508 #endif // defined TARGET_ARCH_IA32 1508 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/flow_graph_compiler_x64.cc » ('j') | vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698