Commit 705735ce authored by titzer@chromium.org's avatar titzer@chromium.org

Remove previous_ast_id and related code in hydrogen.

BUG=

Review URL: https://codereview.chromium.org/14178011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 17629e02
...@@ -106,8 +106,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() { ...@@ -106,8 +106,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() {
Zone* zone = this->zone(); Zone* zone = this->zone();
int param_count = descriptor_->register_param_count_; int param_count = descriptor_->register_param_count_;
HEnvironment* start_environment = graph()->start_environment(); HEnvironment* start_environment = graph()->start_environment();
HBasicBlock* next_block = HBasicBlock* next_block = CreateBasicBlock(start_environment);
CreateBasicBlock(start_environment, BailoutId::StubEntry());
current_block()->Goto(next_block); current_block()->Goto(next_block);
next_block->SetJoinId(BailoutId::StubEntry()); next_block->SetJoinId(BailoutId::StubEntry());
set_current_block(next_block); set_current_block(next_block);
...@@ -204,14 +203,14 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { ...@@ -204,14 +203,14 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() {
NULL, NULL,
FAST_ELEMENTS)); FAST_ELEMENTS));
CheckBuilder builder(this); CheckBuilder builder(this, BailoutId::StubEntry());
builder.CheckNotUndefined(boilerplate); builder.CheckNotUndefined(boilerplate);
if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) {
HValue* elements = HValue* elements =
AddInstruction(new(zone) HLoadElements(boilerplate, NULL)); AddInstruction(new(zone) HLoadElements(boilerplate, NULL));
IfBuilder if_fixed_cow(this); IfBuilder if_fixed_cow(this, BailoutId::StubEntry());
if_fixed_cow.BeginIfMapEquals(elements, factory->fixed_cow_array_map()); if_fixed_cow.BeginIfMapEquals(elements, factory->fixed_cow_array_map());
environment()->Push(BuildCloneShallowArray(context(), environment()->Push(BuildCloneShallowArray(context(),
boilerplate, boilerplate,
...@@ -220,7 +219,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { ...@@ -220,7 +219,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() {
0/*copy-on-write*/)); 0/*copy-on-write*/));
if_fixed_cow.BeginElse(); if_fixed_cow.BeginElse();
IfBuilder if_fixed(this); IfBuilder if_fixed(this, BailoutId::StubEntry());
if_fixed.BeginIfMapEquals(elements, factory->fixed_array_map()); if_fixed.BeginIfMapEquals(elements, factory->fixed_array_map());
environment()->Push(BuildCloneShallowArray(context(), environment()->Push(BuildCloneShallowArray(context(),
boilerplate, boilerplate,
...@@ -265,7 +264,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { ...@@ -265,7 +264,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() {
NULL, NULL,
FAST_ELEMENTS)); FAST_ELEMENTS));
CheckBuilder builder(this); CheckBuilder builder(this, BailoutId::StubEntry());
builder.CheckNotUndefined(boilerplate); builder.CheckNotUndefined(boilerplate);
int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize; int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize;
...@@ -357,7 +356,7 @@ HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() { ...@@ -357,7 +356,7 @@ HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() {
ElementsKind to_kind = casted_stub()->to_kind(); ElementsKind to_kind = casted_stub()->to_kind();
BuildNewSpaceArrayCheck(array_length, to_kind); BuildNewSpaceArrayCheck(array_length, to_kind);
IfBuilder if_builder(this); IfBuilder if_builder(this, BailoutId::StubEntry());
if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ); if_builder.BeginIf(array_length, graph()->GetConstant0(), Token::EQ);
...@@ -376,7 +375,8 @@ HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() { ...@@ -376,7 +375,8 @@ HValue* CodeStubGraphBuilder<TransitionElementsKindStub>::BuildCodeStub() {
BuildCopyElements(context(), elements, BuildCopyElements(context(), elements,
casted_stub()->from_kind(), new_elements, casted_stub()->from_kind(), new_elements,
to_kind, array_length, elements_length); to_kind, array_length, elements_length,
BailoutId::StubEntry());
Factory* factory = isolate()->factory(); Factory* factory = isolate()->factory();
......
This diff is collapsed.
...@@ -108,7 +108,7 @@ class HBasicBlock: public ZoneObject { ...@@ -108,7 +108,7 @@ class HBasicBlock: public ZoneObject {
bool Dominates(HBasicBlock* other) const; bool Dominates(HBasicBlock* other) const;
int LoopNestingDepth() const; int LoopNestingDepth() const;
void SetInitialEnvironment(HEnvironment* env, BailoutId previous_id); void SetInitialEnvironment(HEnvironment* env);
void ClearEnvironment() { last_environment_ = NULL; } void ClearEnvironment() { last_environment_ = NULL; }
bool HasEnvironment() const { return last_environment_ != NULL; } bool HasEnvironment() const { return last_environment_ != NULL; }
void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; } void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; }
...@@ -484,8 +484,6 @@ class HEnvironment: public ZoneObject { ...@@ -484,8 +484,6 @@ class HEnvironment: public ZoneObject {
BailoutId ast_id() const { return ast_id_; } BailoutId ast_id() const { return ast_id_; }
void set_ast_id(BailoutId id) { ast_id_ = id; } void set_ast_id(BailoutId id) { ast_id_ = id; }
BailoutId previous_ast_id() const { return previous_ast_id_; }
void set_previous_ast_id(BailoutId id) { previous_ast_id_ = id; }
HEnterInlined* entry() const { return entry_; } HEnterInlined* entry() const { return entry_; }
void set_entry(HEnterInlined* entry) { entry_ = entry; } void set_entry(HEnterInlined* entry) { entry_ = entry; }
...@@ -647,7 +645,6 @@ class HEnvironment: public ZoneObject { ...@@ -647,7 +645,6 @@ class HEnvironment: public ZoneObject {
int pop_count_; int pop_count_;
int push_count_; int push_count_;
BailoutId ast_id_; BailoutId ast_id_;
BailoutId previous_ast_id_;
Zone* zone_; Zone* zone_;
}; };
...@@ -906,9 +903,8 @@ class HGraphBuilder { ...@@ -906,9 +903,8 @@ class HGraphBuilder {
protected: protected:
virtual bool BuildGraph() = 0; virtual bool BuildGraph() = 0;
HBasicBlock* CreateBasicBlock(HEnvironment* envy, HBasicBlock* CreateBasicBlock(HEnvironment* envy);
BailoutId previous_ast_id); HBasicBlock* CreateLoopHeaderBlock();
HBasicBlock* CreateLoopHeaderBlock(BailoutId previous_ast_id);
// Building common constructs // Building common constructs
HInstruction* BuildExternalArrayElementAccess( HInstruction* BuildExternalArrayElementAccess(
...@@ -956,7 +952,7 @@ class HGraphBuilder { ...@@ -956,7 +952,7 @@ class HGraphBuilder {
class CheckBuilder { class CheckBuilder {
public: public:
explicit CheckBuilder(HGraphBuilder* builder); explicit CheckBuilder(HGraphBuilder* builder, BailoutId id);
~CheckBuilder() { ~CheckBuilder() {
if (!finished_) End(); if (!finished_) End();
} }
...@@ -978,7 +974,7 @@ class HGraphBuilder { ...@@ -978,7 +974,7 @@ class HGraphBuilder {
class IfBuilder { class IfBuilder {
public: public:
explicit IfBuilder(HGraphBuilder* builder); explicit IfBuilder(HGraphBuilder* builder, BailoutId id);
~IfBuilder() { ~IfBuilder() {
if (!finished_) End(); if (!finished_) End();
} }
...@@ -1017,7 +1013,8 @@ class HGraphBuilder { ...@@ -1017,7 +1013,8 @@ class HGraphBuilder {
LoopBuilder(HGraphBuilder* builder, LoopBuilder(HGraphBuilder* builder,
HValue* context, HValue* context,
Direction direction); Direction direction,
BailoutId id);
~LoopBuilder() { ~LoopBuilder() {
ASSERT(finished_); ASSERT(finished_);
} }
...@@ -1066,7 +1063,8 @@ class HGraphBuilder { ...@@ -1066,7 +1063,8 @@ class HGraphBuilder {
HValue* BuildAllocateElements(HValue* context, HValue* BuildAllocateElements(HValue* context,
ElementsKind kind, ElementsKind kind,
HValue* capacity); HValue* capacity,
BailoutId ast_id);
void BuildInitializeElements(HValue* elements, void BuildInitializeElements(HValue* elements,
ElementsKind kind, ElementsKind kind,
...@@ -1080,13 +1078,15 @@ class HGraphBuilder { ...@@ -1080,13 +1078,15 @@ class HGraphBuilder {
HValue* elements, HValue* elements,
ElementsKind kind, ElementsKind kind,
HValue* length, HValue* length,
HValue* new_capacity); HValue* new_capacity,
BailoutId ast_id);
void BuildFillElementsWithHole(HValue* context, void BuildFillElementsWithHole(HValue* context,
HValue* elements, HValue* elements,
ElementsKind elements_kind, ElementsKind elements_kind,
HValue* from, HValue* from,
HValue* to); HValue* to,
BailoutId ast_id);
void BuildCopyElements(HValue* context, void BuildCopyElements(HValue* context,
HValue* from_elements, HValue* from_elements,
...@@ -1094,7 +1094,8 @@ class HGraphBuilder { ...@@ -1094,7 +1094,8 @@ class HGraphBuilder {
HValue* to_elements, HValue* to_elements,
ElementsKind to_elements_kind, ElementsKind to_elements_kind,
HValue* length, HValue* length,
HValue* capacity); HValue* capacity,
BailoutId ast_id);
HValue* BuildCloneShallowArray(HContext* context, HValue* BuildCloneShallowArray(HContext* context,
HValue* boilerplate, HValue* boilerplate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment