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

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
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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 1024
1025 void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid, 1025 void FlowGraphCompiler::GenerateCallRuntime(intptr_t cid,
1026 intptr_t token_index, 1026 intptr_t token_index,
1027 intptr_t try_index, 1027 intptr_t try_index,
1028 const RuntimeEntry& entry) { 1028 const RuntimeEntry& entry) {
1029 __ CallRuntime(entry); 1029 __ CallRuntime(entry);
1030 AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index); 1030 AddCurrentDescriptor(PcDescriptors::kOther, cid, token_index, try_index);
1031 } 1031 }
1032 1032
1033 1033
1034 // Checks class id of instance against all 'class_ids'. Jump to 'deopt' label
1035 // if no match or instance is Smi.
1036 void FlowGraphCompiler::EmitClassChecksNoSmi(
1037 const ZoneGrowableArray<intptr_t>& class_ids,
1038 Register instance_reg,
1039 Register temp_reg,
1040 Label* deopt) {
1041 Label ok;
1042 ASSERT(class_ids[0] != kSmi);
1043 __ testq(instance_reg, Immediate(kSmiTagMask));
1044 __ j(ZERO, deopt);
1045 Label is_ok;
1046 __ LoadClassId(temp_reg, instance_reg);
1047 for (intptr_t i = 0; i < class_ids.length(); i++) {
1048 __ cmpl(temp_reg, Immediate(class_ids[i]));
1049 if (i == class_ids.length() - 1) {
1050 __ j(NOT_EQUAL, deopt);
1051 } else {
1052 __ j(EQUAL, &is_ok, Assembler::kNearJump);
1053 }
1054 }
1055 __ Bind(&is_ok);
1056 }
1057
1034 #undef __ 1058 #undef __
1035 1059
1036 } // namespace dart 1060 } // namespace dart
1037 1061
1038 #endif // defined TARGET_ARCH_X64 1062 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698