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

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

Issue 2891713002: Cleanup: Make CheckClassId instruction more general so it (Closed)
Patch Set: Feedback from Martin Created 3 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
« 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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 void FlowGraphCompiler::EmitTestAndCallLoadCid() { 1450 void FlowGraphCompiler::EmitTestAndCallLoadCid() {
1451 __ LoadClassId(EDI, EAX); 1451 __ LoadClassId(EDI, EAX);
1452 } 1452 }
1453 1453
1454 1454
1455 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, 1455 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label,
1456 const CidRange& range, 1456 const CidRange& range,
1457 int bias) { 1457 int bias) {
1458 intptr_t cid_start = range.cid_start; 1458 intptr_t cid_start = range.cid_start;
1459 intptr_t cid_end = range.cid_end; 1459 intptr_t cid_end = range.cid_end;
1460 if (cid_start == cid_end) { 1460 if (range.IsSingleCid()) {
1461 __ cmpl(EDI, Immediate(cid_start - bias)); 1461 __ cmpl(EDI, Immediate(cid_start - bias));
1462 __ j(NOT_EQUAL, next_label); 1462 __ j(NOT_EQUAL, next_label);
1463 } else { 1463 } else {
1464 __ addl(EDI, Immediate(bias - cid_start)); 1464 __ addl(EDI, Immediate(bias - cid_start));
1465 bias = cid_start; 1465 bias = cid_start;
1466 __ cmpl(EDI, Immediate(cid_end - cid_start)); 1466 __ cmpl(EDI, Immediate(range.Extent()));
1467 __ j(ABOVE, next_label); // Unsigned higher. 1467 __ j(ABOVE, next_label); // Unsigned higher.
1468 } 1468 }
1469 return bias; 1469 return bias;
1470 } 1470 }
1471 1471
1472 1472
1473 #undef __ 1473 #undef __
1474 #define __ compiler_->assembler()-> 1474 #define __ compiler_->assembler()->
1475 1475
1476 1476
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 __ movups(reg, Address(ESP, 0)); 1729 __ movups(reg, Address(ESP, 0));
1730 __ addl(ESP, Immediate(kFpuRegisterSize)); 1730 __ addl(ESP, Immediate(kFpuRegisterSize));
1731 } 1731 }
1732 1732
1733 1733
1734 #undef __ 1734 #undef __
1735 1735
1736 } // namespace dart 1736 } // namespace dart
1737 1737
1738 #endif // defined TARGET_ARCH_IA32 1738 #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