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

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.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_x64.h ('k') | runtime/vm/flow_graph_optimizer.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid, 976 void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
977 intptr_t token_index, 977 intptr_t token_index,
978 intptr_t try_index, 978 intptr_t try_index,
979 const RuntimeEntry& entry) { 979 const RuntimeEntry& entry) {
980 __ CallRuntime(entry); 980 __ CallRuntime(entry);
981 AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index); 981 AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index);
982 } 982 }
983 983
984 984
985 // Checks class id of instance against all 'class_ids'. Jump to 'deopt' label
986 // if no match or instance is Smi.
987 void FlowGraphCompiler::EmitClassChecksNoSmi(
988 const ZoneGrowableArray<intptr_t>& class_ids,
989 Register instance_reg,
990 Register temp_reg,
991 Label* deopt) {
992 Label ok;
993 ASSERT(class_ids[0] != kSmi);
994 __ testq(instance_reg, Immediate(kSmiTagMask));
995 __ j(ZERO, deopt);
996 Label is_ok;
997 __ LoadClassId(temp_reg, instance_reg);
998 for (intptr_t i = 0; i < class_ids.length(); i++) {
999 __ cmpl(temp_reg, Immediate(class_ids[i]));
1000 if (i == class_ids.length() - 1) {
1001 __ j(NOT_EQUAL, deopt);
1002 } else {
1003 __ j(EQUAL, &is_ok, Assembler::kNearJump);
1004 }
1005 }
1006 __ Bind(&is_ok);
1007 }
1008
985 #undef __ 1009 #undef __
986 1010
987 } // namespace dart 1011 } // namespace dart
988 1012
989 #endif // defined TARGET_ARCH_X64 1013 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698