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

Side by Side Diff: vm/intrinsifier_x64.cc

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « vm/intrinsifier_ia32.cc ('k') | vm/isolate.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/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
11 #include "vm/assembler_macros.h" 11 #include "vm/assembler_macros.h"
12 #include "vm/instructions.h" 12 #include "vm/instructions.h"
13 #include "vm/object_store.h" 13 #include "vm/object_store.h"
14 #include "vm/symbols.h"
14 15
15 namespace dart { 16 namespace dart {
16 17
17 DECLARE_FLAG(bool, enable_type_checks); 18 DECLARE_FLAG(bool, enable_type_checks);
18 19
19 // When entering intrinsics code: 20 // When entering intrinsics code:
20 // RBX: IC Data 21 // RBX: IC Data
21 // R10: Arguments descriptor 22 // R10: Arguments descriptor
22 // TOS: Return address 23 // TOS: Return address
23 // The RBX, R10 registers can be destroyed only if there is no slow-path (i.e., 24 // The RBX, R10 registers can be destroyed only if there is no slow-path (i.e.,
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 __ ret(); 1166 __ ret();
1166 __ Bind(&is_true); 1167 __ Bind(&is_true);
1167 __ LoadObject(RAX, bool_true); 1168 __ LoadObject(RAX, bool_true);
1168 __ ret(); 1169 __ ret();
1169 return true; 1170 return true;
1170 } 1171 }
1171 1172
1172 1173
1173 static intptr_t GetOffsetForField(const char* class_name_p, 1174 static intptr_t GetOffsetForField(const char* class_name_p,
1174 const char* field_name_p) { 1175 const char* field_name_p) {
1175 const String& class_name = String::Handle(String::NewSymbol(class_name_p)); 1176 const String& class_name = String::Handle(Symbols::New(class_name_p));
1176 const String& field_name = String::Handle(String::NewSymbol(field_name_p)); 1177 const String& field_name = String::Handle(Symbols::New(field_name_p));
1177 const Class& cls = Class::Handle(Library::Handle( 1178 const Class& cls = Class::Handle(Library::Handle(
1178 Library::CoreImplLibrary()).LookupClass(class_name)); 1179 Library::CoreImplLibrary()).LookupClass(class_name));
1179 ASSERT(!cls.IsNull()); 1180 ASSERT(!cls.IsNull());
1180 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name)); 1181 const Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name));
1181 ASSERT(!field.IsNull()); 1182 ASSERT(!field.IsNull());
1182 return field.Offset(); 1183 return field.Offset();
1183 } 1184 }
1184 1185
1185 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator"; 1186 static const char* kFixedSizeArrayIteratorClassName = "FixedSizeArrayIterator";
1186 1187
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 __ LoadObject(RAX, bool_true); 1321 __ LoadObject(RAX, bool_true);
1321 __ ret(); 1322 __ ret();
1322 return true; 1323 return true;
1323 } 1324 }
1324 1325
1325 #undef __ 1326 #undef __
1326 1327
1327 } // namespace dart 1328 } // namespace dart
1328 1329
1329 #endif // defined TARGET_ARCH_X64 1330 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/intrinsifier_ia32.cc ('k') | vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698