From 47e55a77a7a8da6175f4cfa546185a4584352182 Mon Sep 17 00:00:00 2001 From: "kmillikin@chromium.org" Date: Wed, 5 Nov 2008 08:44:54 +0000 Subject: [PATCH] Initial port of VirtualFrame to the ARM architecture. To reduce the size of the change, the initial implementation provides read access to the frame (eg, locals, parameters, and expression stack elements) but no mutation. Review URL: http://codereview.chromium.org/7302 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/codegen-arm.cc | 159 +++++++++++++++++++++++++-------------------- src/codegen-arm.h | 68 ++++++++++++------- 2 files changed, 135 insertions(+), 92 deletions(-) diff --git a/src/codegen-arm.cc b/src/codegen-arm.cc index 85500c4ea..69455a7a0 100644 --- a/src/codegen-arm.cc +++ b/src/codegen-arm.cc @@ -35,6 +35,20 @@ namespace v8 { namespace internal { +#define __ masm_-> + +// ------------------------------------------------------------------------- +// VirtualFrame implementation. + +VirtualFrame::VirtualFrame(CodeGenerator* cgen) { + ASSERT(cgen->scope() != NULL); + + masm_ = cgen->masm(); + frame_local_count_ = cgen->scope()->num_stack_slots(); + parameter_count_ = cgen->scope()->num_parameters(); +} + + // ------------------------------------------------------------------------- // CodeGenState implementation. @@ -67,11 +81,9 @@ CodeGenState::~CodeGenState() { } -// ----------------------------------------------------------------------------- +// ------------------------------------------------------------------------- // CodeGenerator implementation -#define __ masm_-> - CodeGenerator::CodeGenerator(int buffer_size, Handle