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

Unified Diff: runtime/vm/assembler_macros_ia32.cc

Issue 12398029: Remove the barely used macro assemblers after merging their contents to the base (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_macros_ia32.h ('k') | runtime/vm/assembler_macros_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_macros_ia32.cc
===================================================================
--- runtime/vm/assembler_macros_ia32.cc (revision 19430)
+++ runtime/vm/assembler_macros_ia32.cc (working copy)
@@ -1,76 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "vm/globals.h"
-#if defined(TARGET_ARCH_IA32)
-
-#include "vm/assembler_macros.h"
-
-#include "vm/assembler.h"
-
-namespace dart {
-
-DECLARE_FLAG(bool, inline_alloc);
-
-#define __ assembler->
-
-// Static.
-void AssemblerMacros::TryAllocate(Assembler* assembler,
- const Class& cls,
- Label* failure,
- bool near_jump,
- Register instance_reg) {
- ASSERT(failure != NULL);
- if (FLAG_inline_alloc) {
- Heap* heap = Isolate::Current()->heap();
- const intptr_t instance_size = cls.instance_size();
- __ movl(instance_reg, Address::Absolute(heap->TopAddress()));
- __ addl(instance_reg, Immediate(instance_size));
- // instance_reg: potential next object start.
- __ cmpl(instance_reg, Address::Absolute(heap->EndAddress()));
- __ j(ABOVE_EQUAL, failure, near_jump);
- // Successfully allocated the object, now update top to point to
- // next object start and store the class in the class field of object.
- __ movl(Address::Absolute(heap->TopAddress()), instance_reg);
- ASSERT(instance_size >= kHeapObjectTag);
- __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag));
- uword tags = 0;
- tags = RawObject::SizeTag::update(instance_size, tags);
- ASSERT(cls.id() != kIllegalCid);
- tags = RawObject::ClassIdTag::update(cls.id(), tags);
- __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags));
- } else {
- __ jmp(failure);
- }
-}
-
-
-void AssemblerMacros::EnterDartFrame(Assembler* assembler,
- intptr_t frame_size) {
- const intptr_t offset = assembler->CodeSize();
- __ EnterFrame(0);
- Label dart_entry;
- __ call(&dart_entry);
- __ Bind(&dart_entry);
- // Adjust saved PC for any intrinsic code that could have been generated
- // before a frame is created.
- if (offset != 0) {
- __ addl(Address(ESP, 0), Immediate(-offset));
- }
- if (frame_size != 0) {
- __ subl(ESP, Immediate(frame_size));
- }
-}
-
-
-void AssemblerMacros::EnterStubFrame(Assembler* assembler) {
- __ EnterFrame(0);
- __ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames.
-}
-
-#undef __
-
-} // namespace dart
-
-#endif // defined TARGET_ARCH_IA32
« no previous file with comments | « runtime/vm/assembler_macros_ia32.h ('k') | runtime/vm/assembler_macros_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698