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

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

Issue 10458027: Started new compiler for ia32. Getters and setters can be intrinsified within the new compiler. (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/assembler_ia32.h ('k') | runtime/vm/flow_graph_compiler_ia32.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) 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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.index()));
1593 } 1593 }
1594 1594
1595 1595
1596 void Assembler::Comment(const char* comment) { 1596 void Assembler::Comment(const char* format, ...) {
1597 if (FLAG_code_comments) { 1597 if (FLAG_code_comments) {
1598 char buffer[1024];
1599
1600 va_list args;
1601 va_start(args, format);
1602 OS::VSNPrint(buffer, sizeof(buffer), format, args);
1603 va_end(args);
1604
1598 comments_.Add(new CodeComment(buffer_.GetPosition(), 1605 comments_.Add(new CodeComment(buffer_.GetPosition(),
1599 String::Handle(String::New(comment)))); 1606 String::Handle(String::New(buffer))));
1600 } 1607 }
1601 } 1608 }
1602 1609
1603 1610
1604 const Code::Comments& Assembler::GetCodeComments() const { 1611 const Code::Comments& Assembler::GetCodeComments() const {
1605 Code::Comments& comments = Code::Comments::New(comments_.length()); 1612 Code::Comments& comments = Code::Comments::New(comments_.length());
1606 1613
1607 for (intptr_t i = 0; i < comments_.length(); i++) { 1614 for (intptr_t i = 0; i < comments_.length(); i++) {
1608 comments.SetPCOffsetAt(i, comments_[i]->pc_offset()); 1615 comments.SetPCOffsetAt(i, comments_[i]->pc_offset());
1609 comments.SetCommentAt(i, comments_[i]->comment()); 1616 comments.SetCommentAt(i, comments_[i]->comment());
1610 } 1617 }
1611 1618
1612 return comments; 1619 return comments;
1613 } 1620 }
1614 1621
1615 1622
1616 } // namespace dart 1623 } // namespace dart
1617 1624
1618 #endif // defined TARGET_ARCH_IA32 1625 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698