From 10441e954b7189d04a95b2e705b7b8836e04945f Mon Sep 17 00:00:00 2001 From: "sanjoy@chromium.org" Date: Tue, 3 Jul 2012 10:42:03 +0000 Subject: [PATCH] Don't actually create Handles for the constant hole, the true value and the false value. This is required to have some parts of Crankshaft run without creating Handles. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10699052 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen.cc | 14 +++++++------- src/hydrogen.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hydrogen.cc b/src/hydrogen.cc index ee3d6b5cfb..2d671839e1 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -568,9 +568,9 @@ void HGraph::Verify(bool do_full_verify) const { HConstant* HGraph::GetConstant(SetOncePointer* pointer, - Object* value) { + Handle value) { if (!pointer->is_set()) { - HConstant* constant = new(zone()) HConstant(Handle(value), + HConstant* constant = new(zone()) HConstant(value, Representation::Tagged()); constant->InsertAfter(GetConstantUndefined()); pointer->set(constant); @@ -580,27 +580,27 @@ HConstant* HGraph::GetConstant(SetOncePointer* pointer, HConstant* HGraph::GetConstant1() { - return GetConstant(&constant_1_, Smi::FromInt(1)); + return GetConstant(&constant_1_, Handle(Smi::FromInt(1))); } HConstant* HGraph::GetConstantMinus1() { - return GetConstant(&constant_minus1_, Smi::FromInt(-1)); + return GetConstant(&constant_minus1_, Handle(Smi::FromInt(-1))); } HConstant* HGraph::GetConstantTrue() { - return GetConstant(&constant_true_, isolate()->heap()->true_value()); + return GetConstant(&constant_true_, isolate()->factory()->true_value()); } HConstant* HGraph::GetConstantFalse() { - return GetConstant(&constant_false_, isolate()->heap()->false_value()); + return GetConstant(&constant_false_, isolate()->factory()->false_value()); } HConstant* HGraph::GetConstantHole() { - return GetConstant(&constant_hole_, isolate()->heap()->the_hole_value()); + return GetConstant(&constant_hole_, isolate()->factory()->the_hole_value()); } diff --git a/src/hydrogen.h b/src/hydrogen.h index b9f2300ccb..907279ad51 100644 --- a/src/hydrogen.h +++ b/src/hydrogen.h @@ -347,7 +347,7 @@ class HGraph: public ZoneObject { private: HConstant* GetConstant(SetOncePointer* pointer, - Object* value); + Handle value); void MarkAsDeoptimizingRecursively(HBasicBlock* block); void InsertTypeConversions(HInstruction* instr);