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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 __ CompareClassId(EBX, kOneByteStringCid, EAX); 1302 __ CompareClassId(EBX, kOneByteStringCid, EAX);
1303 __ j(NOT_EQUAL, &megamorphic_call, Assembler::kNearJump); 1303 __ j(NOT_EQUAL, &megamorphic_call, Assembler::kNearJump);
1304 __ movl(EAX, FieldAddress(EBX, String::hash_offset())); 1304 __ movl(EAX, FieldAddress(EBX, String::hash_offset()));
1305 __ cmpl(EAX, Immediate(0)); 1305 __ cmpl(EAX, Immediate(0));
1306 __ j(NOT_EQUAL, &done, Assembler::kNearJump); 1306 __ j(NOT_EQUAL, &done, Assembler::kNearJump);
1307 1307
1308 __ Bind(&megamorphic_call); 1308 __ Bind(&megamorphic_call);
1309 __ Comment("Slow case: megamorphic call"); 1309 __ Comment("Slow case: megamorphic call");
1310 } 1310 }
1311 __ LoadObject(ECX, cache); 1311 __ LoadObject(ECX, cache);
1312 __ call(Address(THR, Thread::megamorphic_lookup_entry_point_offset())); 1312 __ call(Address(THR, Thread::megamorphic_lookup_checked_entry_offset()));
1313 __ call(EBX); 1313 __ call(EBX);
1314 1314
1315 __ Bind(&done); 1315 __ Bind(&done);
1316 AddCurrentDescriptor(RawPcDescriptors::kOther, 1316 AddCurrentDescriptor(RawPcDescriptors::kOther,
1317 Thread::kNoDeoptId, token_pos); 1317 Thread::kNoDeoptId, token_pos);
1318 RecordSafepoint(locs, slow_path_argument_count); 1318 RecordSafepoint(locs, slow_path_argument_count);
1319 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); 1319 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id);
1320 // Precompilation not implemented on ia32 platform. 1320 // Precompilation not implemented on ia32 platform.
1321 ASSERT(!FLAG_precompiled_mode); 1321 ASSERT(!FLAG_precompiled_mode);
1322 if (is_optimizing()) { 1322 if (is_optimizing()) {
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 __ movups(reg, Address(ESP, 0)); 1860 __ movups(reg, Address(ESP, 0));
1861 __ addl(ESP, Immediate(kFpuRegisterSize)); 1861 __ addl(ESP, Immediate(kFpuRegisterSize));
1862 } 1862 }
1863 1863
1864 1864
1865 #undef __ 1865 #undef __
1866 1866
1867 } // namespace dart 1867 } // namespace dart
1868 1868
1869 #endif // defined TARGET_ARCH_IA32 1869 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698