Commit 24240492 authored by bmeurer's avatar bmeurer Committed by Commit bot

[crankshaft] Remove the global arguments object from the HGraph.

This was actually only necessary for dealing with %_Arguments and
%_ArgumentsLength in Crankshaft, which have been removed recently,
so there's no need to keep this piece of awesomeness around any
longer.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34015}
parent fd8fd05c
...@@ -4664,12 +4664,11 @@ void HOptimizedGraphBuilder::SetUpScope(Scope* scope) { ...@@ -4664,12 +4664,11 @@ void HOptimizedGraphBuilder::SetUpScope(Scope* scope) {
} }
AddInstruction(arguments_object); AddInstruction(arguments_object);
graph()->SetArgumentsObject(arguments_object);
// Handle the arguments and arguments shadow variables specially (they do // Handle the arguments and arguments shadow variables specially (they do
// not have declarations). // not have declarations).
if (scope->arguments() != NULL) { if (scope->arguments() != NULL) {
environment()->Bind(scope->arguments(), graph()->GetArgumentsObject()); environment()->Bind(scope->arguments(), arguments_object);
} }
int rest_index; int rest_index;
...@@ -7856,7 +7855,7 @@ bool HOptimizedGraphBuilder::TryArgumentsAccess(Property* expr) { ...@@ -7856,7 +7855,7 @@ bool HOptimizedGraphBuilder::TryArgumentsAccess(Property* expr) {
result = New<HConstant>(argument_count); result = New<HConstant>(argument_count);
} }
} else { } else {
Push(graph()->GetArgumentsObject()); CHECK_ALIVE_OR_RETURN(VisitForValue(expr->obj(), ARGUMENTS_ALLOWED), true);
CHECK_ALIVE_OR_RETURN(VisitForValue(expr->key()), true); CHECK_ALIVE_OR_RETURN(VisitForValue(expr->key()), true);
HValue* key = Pop(); HValue* key = Pop();
Drop(1); // Arguments object. Drop(1); // Arguments object.
......
...@@ -346,13 +346,6 @@ class HGraph final : public ZoneObject { ...@@ -346,13 +346,6 @@ class HGraph final : public ZoneObject {
bool IsStandardConstant(HConstant* constant); bool IsStandardConstant(HConstant* constant);
HBasicBlock* CreateBasicBlock(); HBasicBlock* CreateBasicBlock();
HArgumentsObject* GetArgumentsObject() const {
return arguments_object_.get();
}
void SetArgumentsObject(HArgumentsObject* object) {
arguments_object_.set(object);
}
int GetMaximumValueID() const { return values_.length(); } int GetMaximumValueID() const { return values_.length(); }
int GetNextBlockID() { return next_block_id_++; } int GetNextBlockID() { return next_block_id_++; }
...@@ -482,7 +475,6 @@ class HGraph final : public ZoneObject { ...@@ -482,7 +475,6 @@ class HGraph final : public ZoneObject {
SetOncePointer<HConstant> constant_the_hole_; SetOncePointer<HConstant> constant_the_hole_;
SetOncePointer<HConstant> constant_null_; SetOncePointer<HConstant> constant_null_;
SetOncePointer<HConstant> constant_invalid_context_; SetOncePointer<HConstant> constant_invalid_context_;
SetOncePointer<HArgumentsObject> arguments_object_;
HOsrBuilder* osr_; HOsrBuilder* osr_;
......
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