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

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

Issue 10441111: - Rename class index to class id. (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 | « no previous file | runtime/vm/assembler_macros_ia32.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 1570
1571 movl(result, FieldAddress(CTX, Context::isolate_offset())); 1571 movl(result, FieldAddress(CTX, Context::isolate_offset()));
1572 const intptr_t table_offset_in_isolate = 1572 const intptr_t table_offset_in_isolate =
1573 Isolate::class_table_offset() + ClassTable::table_offset(); 1573 Isolate::class_table_offset() + ClassTable::table_offset();
1574 movl(result, Address(result, table_offset_in_isolate)); 1574 movl(result, Address(result, table_offset_in_isolate));
1575 movl(result, Address(result, scratch, TIMES_4, 0)); 1575 movl(result, Address(result, scratch, TIMES_4, 0));
1576 } 1576 }
1577 1577
1578 1578
1579 void Assembler::LoadClassIndexOfObject(Register result, Register object) { 1579 void Assembler::LoadClassIndexOfObject(Register result, Register object) {
1580 ASSERT(RawObject::kClassTagBit == 16); 1580 ASSERT(RawObject::kClassIdTagBit == 16);
1581 ASSERT(RawObject::kClassTagSize == 16); 1581 ASSERT(RawObject::kClassIdTagSize == 16);
1582 const intptr_t class_id_offset = Object::tags_offset() + 1582 const intptr_t class_id_offset = Object::tags_offset() +
1583 RawObject::kClassTagBit / kBitsPerByte; 1583 RawObject::kClassIdTagBit / kBitsPerByte;
1584 movzxw(result, FieldAddress(object, class_id_offset)); 1584 movzxw(result, FieldAddress(object, class_id_offset));
1585 } 1585 }
1586 1586
1587 1587
1588 void Assembler::CompareClassOfObject(Register object, 1588 void Assembler::CompareClassOfObject(Register object,
1589 const Class& clazz, 1589 const Class& clazz,
1590 Register scratch) { 1590 Register scratch) {
1591 LoadClassIndexOfObject(scratch, object); 1591 LoadClassIndexOfObject(scratch, object);
1592 cmpl(scratch, Immediate(clazz.index())); 1592 cmpl(scratch, Immediate(clazz.id()));
1593 } 1593 }
1594 1594
1595 1595
1596 void Assembler::Comment(const char* format, ...) { 1596 void Assembler::Comment(const char* format, ...) {
1597 if (FLAG_code_comments) { 1597 if (FLAG_code_comments) {
1598 char buffer[1024]; 1598 char buffer[1024];
1599 1599
1600 va_list args; 1600 va_list args;
1601 va_start(args, format); 1601 va_start(args, format);
1602 OS::VSNPrint(buffer, sizeof(buffer), format, args); 1602 OS::VSNPrint(buffer, sizeof(buffer), format, args);
(...skipping 13 matching lines...) Expand all
1616 comments.SetCommentAt(i, comments_[i]->comment()); 1616 comments.SetCommentAt(i, comments_[i]->comment());
1617 } 1617 }
1618 1618
1619 return comments; 1619 return comments;
1620 } 1620 }
1621 1621
1622 1622
1623 } // namespace dart 1623 } // namespace dart
1624 1624
1625 #endif // defined TARGET_ARCH_IA32 1625 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_macros_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698