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

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

Issue 10540040: Inline setters, getters, various cleanups & restructuring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('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) 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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 954
955 // Load instruction inputs into allocated registers. 955 // Load instruction inputs into allocated registers.
956 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { 956 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
957 Location loc = locs->in(i); 957 Location loc = locs->in(i);
958 ASSERT(loc.kind() == Location::kRegister); 958 ASSERT(loc.kind() == Location::kRegister);
959 __ popl(loc.reg()); 959 __ popl(loc.reg());
960 } 960 }
961 } 961 }
962 962
963 963
964 // Checks class id of instance against all 'class_ids'. Jump to 'deopt' label
965 // if no match or instance is Smi.
966 void FlowGraphCompiler::EmitClassChecksNoSmi(
967 const ZoneGrowableArray<intptr_t>& class_ids,
968 Register instance_reg,
969 Register temp_reg,
970 Label* deopt) {
971 Label ok;
972 ASSERT(class_ids[0] != kSmi);
973 __ testl(instance_reg, Immediate(kSmiTagMask));
974 __ j(ZERO, deopt);
975 Label is_ok;
976 __ LoadClassId(temp_reg, instance_reg);
977 for (intptr_t i = 0; i < class_ids.length(); i++) {
978 __ cmpl(temp_reg, Immediate(class_ids[i]));
979 if (i == class_ids.length() - 1) {
980 __ j(NOT_EQUAL, deopt);
981 } else {
982 __ j(EQUAL, &is_ok, Assembler::kNearJump);
983 }
984 }
985 __ Bind(&is_ok);
986 }
987
964 #undef __ 988 #undef __
965 989
966 } // namespace dart 990 } // namespace dart
967 991
968 #endif // defined TARGET_ARCH_IA32 992 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698