Commit 912ec759 authored by whesse@chromium.org's avatar whesse@chromium.org

Revert "First step in letting Crankshaft inline functions with a different context."

This reverts commit r7807.  TBR=kmillikin@chromium.org.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6928061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 913ce07e
......@@ -1015,8 +1015,6 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
outer);
int argument_index = 0;
for (int i = 0; i < value_count; ++i) {
if (hydrogen_env->is_special_index(i)) continue;
HValue* value = hydrogen_env->values()->at(i);
LOperand* op = NULL;
if (value->IsArgumentsObject()) {
......
......@@ -3311,7 +3311,7 @@ class HLoadKeyedSpecializedArrayElement: public HBinaryOperation {
class HLoadKeyedGeneric: public HTemplateInstruction<3> {
public:
HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) {
HLoadKeyedGeneric(HContext* context, HValue* obj, HValue* key) {
set_representation(Representation::Tagged());
SetOperandAt(0, obj);
SetOperandAt(1, key);
......
This diff is collapsed.
......@@ -322,7 +322,6 @@ class HEnvironment: public ZoneObject {
return &assigned_variables_;
}
int parameter_count() const { return parameter_count_; }
int specials_count() const { return specials_count_; }
int local_count() const { return local_count_; }
HEnvironment* outer() const { return outer_; }
int pop_count() const { return pop_count_; }
......@@ -332,9 +331,6 @@ class HEnvironment: public ZoneObject {
void set_ast_id(int id) { ast_id_ = id; }
int length() const { return values_.length(); }
bool is_special_index(int i) const {
return i >= parameter_count() && i < parameter_count() + specials_count();
}
void Bind(Variable* variable, HValue* value) {
Bind(IndexFor(variable), value);
......@@ -342,10 +338,6 @@ class HEnvironment: public ZoneObject {
void Bind(int index, HValue* value);
void BindContext(HValue* value) {
Bind(parameter_count(), value);
}
HValue* Lookup(Variable* variable) const {
return Lookup(IndexFor(variable));
}
......@@ -356,11 +348,6 @@ class HEnvironment: public ZoneObject {
return result;
}
HValue* LookupContext() const {
// Return first special.
return Lookup(parameter_count());
}
void Push(HValue* value) {
ASSERT(value != NULL);
++push_count_;
......@@ -381,8 +368,6 @@ class HEnvironment: public ZoneObject {
HValue* Top() const { return ExpressionStackAt(0); }
bool ExpressionStackIsEmpty() const;
HValue* ExpressionStackAt(int index_from_top) const {
int index = length() - index_from_top - 1;
ASSERT(HasExpressionAt(index));
......@@ -427,6 +412,8 @@ class HEnvironment: public ZoneObject {
// True if index is included in the expression stack part of the environment.
bool HasExpressionAt(int index) const;
bool ExpressionStackIsEmpty() const;
void Initialize(int parameter_count, int local_count, int stack_height);
void Initialize(const HEnvironment* other);
......@@ -436,18 +423,15 @@ class HEnvironment: public ZoneObject {
int IndexFor(Variable* variable) const {
Slot* slot = variable->AsSlot();
ASSERT(slot != NULL && slot->IsStackAllocated());
int shift = (slot->type() == Slot::PARAMETER)
? 1
: parameter_count_ + specials_count_;
int shift = (slot->type() == Slot::PARAMETER) ? 1 : parameter_count_;
return slot->index() + shift;
}
Handle<JSFunction> closure_;
// Value array [parameters] [specials] [locals] [temporaries].
// Value array [parameters] [locals] [temporaries].
ZoneList<HValue*> values_;
ZoneList<int> assigned_variables_;
int parameter_count_;
int specials_count_;
int local_count_;
HEnvironment* outer_;
int pop_count_;
......
......@@ -1010,8 +1010,6 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
outer);
int argument_index = 0;
for (int i = 0; i < value_count; ++i) {
if (hydrogen_env->is_special_index(i)) continue;
HValue* value = hydrogen_env->values()->at(i);
LOperand* op = NULL;
if (value->IsArgumentsObject()) {
......
......@@ -1010,8 +1010,6 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
outer);
int argument_index = 0;
for (int i = 0; i < value_count; ++i) {
if (hydrogen_env->is_special_index(i)) continue;
HValue* value = hydrogen_env->values()->at(i);
LOperand* op = NULL;
if (value->IsArgumentsObject()) {
......
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