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

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, 12 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 // stack. 793 // stack.
794 __ addl(ESP, Immediate(StackSize() * kWordSize)); 794 __ addl(ESP, Immediate(StackSize() * kWordSize));
795 } 795 }
796 // The call below has an empty stackmap because we have just 796 // The call below has an empty stackmap because we have just
797 // dropped the spill slots. 797 // dropped the spill slots.
798 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); 798 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
799 799
800 // Invoke noSuchMethod function passing the original name of the function. 800 // Invoke noSuchMethod function passing the original name of the function.
801 // If the function is a closure function, use "call" as the original name. 801 // If the function is a closure function, use "call" as the original name.
802 const String& name = String::Handle( 802 const String& name = String::Handle(
803 function.IsClosureFunction() ? Symbols::Call() : function.name()); 803 function.IsClosureFunction() ? Symbols::Call().raw() : function.name());
804 const int kNumArgsChecked = 1; 804 const int kNumArgsChecked = 1;
805 const ICData& ic_data = ICData::ZoneHandle( 805 const ICData& ic_data = ICData::ZoneHandle(
806 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); 806 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked));
807 __ LoadObject(ECX, ic_data); 807 __ LoadObject(ECX, ic_data);
808 // EBP - 4 : PC marker, allows easy identification of RawInstruction obj. 808 // EBP - 4 : PC marker, allows easy identification of RawInstruction obj.
809 // EBP : points to previous frame pointer. 809 // EBP : points to previous frame pointer.
810 // EBP + 4 : points to return address. 810 // EBP + 4 : points to return address.
811 // EBP + 8 : address of last argument (arg n-1). 811 // EBP + 8 : address of last argument (arg n-1).
812 // ESP + 8 + 4*(n-1) : address of first argument (arg 0). 812 // ESP + 8 + 4*(n-1) : address of first argument (arg 0).
813 // ECX : ic-data. 813 // ECX : ic-data.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 // We need to unwind the space we reserved for locals and copied 927 // We need to unwind the space we reserved for locals and copied
928 // parameters. The NoSuchMethodFunction stub does not expect to see 928 // parameters. The NoSuchMethodFunction stub does not expect to see
929 // that area on the stack. 929 // that area on the stack.
930 __ addl(ESP, Immediate(StackSize() * kWordSize)); 930 __ addl(ESP, Immediate(StackSize() * kWordSize));
931 } 931 }
932 // The call below has an empty stackmap because we have just 932 // The call below has an empty stackmap because we have just
933 // dropped the spill slots. 933 // dropped the spill slots.
934 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); 934 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
935 935
936 // Invoke noSuchMethod function passing "call" as the function name. 936 // Invoke noSuchMethod function passing "call" as the function name.
937 const String& name = String::Handle(Symbols::Call());
938 const int kNumArgsChecked = 1; 937 const int kNumArgsChecked = 1;
939 const ICData& ic_data = ICData::ZoneHandle( 938 const ICData& ic_data = ICData::ZoneHandle(
940 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); 939 ICData::New(function, Symbols::Call(),
940 Isolate::kNoDeoptId, kNumArgsChecked));
941 __ LoadObject(ECX, ic_data); 941 __ LoadObject(ECX, ic_data);
942 // EBP - 4 : PC marker, for easy identification of RawInstruction obj. 942 // EBP - 4 : PC marker, for easy identification of RawInstruction obj.
943 // EBP : points to previous frame pointer. 943 // EBP : points to previous frame pointer.
944 // EBP + 4 : points to return address. 944 // EBP + 4 : points to return address.
945 // EBP + 8 : address of last argument (arg n-1). 945 // EBP + 8 : address of last argument (arg n-1).
946 // ESP + 8 + 4*(n-1) : address of first argument (arg 0). 946 // ESP + 8 + 4*(n-1) : address of first argument (arg 0).
947 // ECX : ic-data. 947 // ECX : ic-data.
948 // EDX : arguments descriptor array. 948 // EDX : arguments descriptor array.
949 __ call(&StubCode::CallNoSuchMethodFunctionLabel()); 949 __ call(&StubCode::CallNoSuchMethodFunctionLabel());
950 if (is_optimizing()) { 950 if (is_optimizing()) {
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 __ popl(ECX); 1504 __ popl(ECX);
1505 __ popl(EAX); 1505 __ popl(EAX);
1506 } 1506 }
1507 1507
1508 1508
1509 #undef __ 1509 #undef __
1510 1510
1511 } // namespace dart 1511 } // namespace dart
1512 1512
1513 #endif // defined TARGET_ARCH_IA32 1513 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698