Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index e6e2edb1caf148cbd02a3216bdbbb9576985b5b9..0bca49d40ae69d1d5232f388d9ac51ad66ee3273 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -1,4 +1,4 @@ |
-// Copyright 2013 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -646,7 +646,6 @@ HConstant* HGraph::GetConstant##Name() { \ |
htype, \ |
false, \ |
true, \ |
- false, \ |
boolean_value); \ |
constant->InsertAfter(GetConstantUndefined()); \ |
constant_##name##_.set(constant); \ |
@@ -669,19 +668,6 @@ HConstant* HGraph::GetInvalidContext() { |
} |
-bool HGraph::IsStandardConstant(HConstant* constant) { |
- if (constant == GetConstantUndefined()) return true; |
- if (constant == GetConstant0()) return true; |
- if (constant == GetConstant1()) return true; |
- if (constant == GetConstantMinus1()) return true; |
- if (constant == GetConstantTrue()) return true; |
- if (constant == GetConstantFalse()) return true; |
- if (constant == GetConstantHole()) return true; |
- if (constant == GetConstantNull()) return true; |
- return false; |
-} |
- |
- |
HGraphBuilder::IfBuilder::IfBuilder(HGraphBuilder* builder, int position) |
: builder_(builder), |
position_(position), |
@@ -4461,9 +4447,9 @@ void HOptimizedGraphBuilder::PushAndAdd(HInstruction* instr) { |
} |
-void HOptimizedGraphBuilder::AddSoftDeoptimize(SoftDeoptimizeMode mode) { |
+void HOptimizedGraphBuilder::AddSoftDeoptimize() { |
isolate()->counters()->soft_deopts_requested()->Increment(); |
- if (FLAG_always_opt && mode == CAN_OMIT_SOFT_DEOPT) return; |
+ if (FLAG_always_opt) return; |
if (current_block()->IsDeoptimizing()) return; |
Add<HSoftDeoptimize>(); |
isolate()->counters()->soft_deopts_inserted()->Increment(); |
@@ -5416,20 +5402,9 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { |
if (type == kUseCell) { |
Handle<GlobalObject> global(current_info()->global_object()); |
Handle<PropertyCell> cell(global->GetPropertyCell(&lookup)); |
- if (cell->type()->IsConstant()) { |
- cell->AddDependentCompilationInfo(top_info()); |
- Handle<Object> constant_object = cell->type()->AsConstant(); |
- if (constant_object->IsConsString()) { |
- constant_object = |
- FlattenGetString(Handle<String>::cast(constant_object)); |
- } |
- HConstant* constant = new(zone()) HConstant(constant_object); |
- return ast_context()->ReturnInstruction(constant, expr->id()); |
- } else { |
- HLoadGlobalCell* instr = |
- new(zone()) HLoadGlobalCell(cell, lookup.GetPropertyDetails()); |
- return ast_context()->ReturnInstruction(instr, expr->id()); |
- } |
+ HLoadGlobalCell* instr = |
+ new(zone()) HLoadGlobalCell(cell, lookup.GetPropertyDetails()); |
+ return ast_context()->ReturnInstruction(instr, expr->id()); |
} else { |
HValue* context = environment()->LookupContext(); |
HGlobalObject* global_object = new(zone()) HGlobalObject(context); |
@@ -6336,21 +6311,8 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment( |
if (type == kUseCell) { |
Handle<GlobalObject> global(current_info()->global_object()); |
Handle<PropertyCell> cell(global->GetPropertyCell(&lookup)); |
- if (cell->type()->IsConstant()) { |
- IfBuilder builder(this); |
- HValue* constant = Add<HConstant>(cell->type()->AsConstant()); |
- if (cell->type()->AsConstant()->IsNumber()) { |
- builder.IfCompare(value, constant, Token::EQ); |
- } else { |
- builder.If<HCompareObjectEqAndBranch>(value, constant); |
- } |
- builder.Then(); |
- builder.Else(); |
- AddSoftDeoptimize(MUST_EMIT_SOFT_DEOPT); |
- builder.End(); |
- } |
- HInstruction* instr = |
- Add<HStoreGlobalCell>(value, cell, lookup.GetPropertyDetails()); |
+ HInstruction* instr = Add<HStoreGlobalCell>(value, cell, |
+ lookup.GetPropertyDetails()); |
instr->set_position(position); |
if (instr->HasObservableSideEffects()) { |
AddSimulate(ast_id, REMOVABLE_SIMULATE); |