| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index 9ceaa2696c4de629c8b14c0d2fac6bc5032dd8a2..63888638680226214eb6cf8554b333c343c94914 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -259,7 +259,7 @@ void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if typeof ");
|
| value()->PrintTo(stream);
|
| stream->Add(" == \"%s\" then B%d else B%d",
|
| - *hydrogen()->type_literal()->ToCString(),
|
| + hydrogen()->type_literal()->ToCString().get(),
|
| true_block_id(), false_block_id());
|
| }
|
|
|
| @@ -312,13 +312,13 @@ void LCallKeyed::PrintDataTo(StringStream* stream) {
|
|
|
| void LCallNamed::PrintDataTo(StringStream* stream) {
|
| SmartArrayPointer<char> name_string = name()->ToCString();
|
| - stream->Add("%s #%d / ", *name_string, arity());
|
| + stream->Add("%s #%d / ", name_string.get(), arity());
|
| }
|
|
|
|
|
| void LCallGlobal::PrintDataTo(StringStream* stream) {
|
| SmartArrayPointer<char> name_string = name()->ToCString();
|
| - stream->Add("%s #%d / ", *name_string, arity());
|
| + stream->Add("%s #%d / ", name_string.get(), arity());
|
| }
|
|
|
|
|
| @@ -384,7 +384,7 @@ void LStoreNamedField::PrintDataTo(StringStream* stream) {
|
| void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add(".");
|
| - stream->Add(*String::cast(*name())->ToCString());
|
| + stream->Add(String::cast(*name())->ToCString().get());
|
| stream->Add(" <- ");
|
| value()->PrintTo(stream);
|
| }
|
| @@ -508,6 +508,13 @@ LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
|
| }
|
|
|
|
|
| +LOperand* LChunkBuilder::UseTempRegisterOrConstant(HValue* value) {
|
| + return value->IsConstant()
|
| + ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| + : UseTempRegister(value);
|
| +}
|
| +
|
| +
|
| LOperand* LChunkBuilder::Use(HValue* value) {
|
| return Use(value, new(zone()) LUnallocated(LUnallocated::NONE));
|
| }
|
| @@ -1223,8 +1230,7 @@ LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
|
| ASSERT(instr->representation().IsDouble());
|
| ASSERT(instr->value()->representation().IsDouble());
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| - LMathLog* result = new(zone()) LMathLog(input);
|
| - return DefineSameAsFirst(result);
|
| + return MarkAsCall(DefineSameAsFirst(new(zone()) LMathLog(input)), instr);
|
| }
|
|
|
|
|
| @@ -2178,17 +2184,20 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| LOperand* key = NULL;
|
| LOperand* val = NULL;
|
|
|
| - if (instr->value()->representation().IsDouble()) {
|
| + Representation value_representation = instr->value()->representation();
|
| + if (value_representation.IsDouble()) {
|
| object = UseRegisterAtStart(instr->elements());
|
| val = UseTempRegister(instr->value());
|
| key = UseRegisterOrConstantAtStart(instr->key());
|
| } else {
|
| - ASSERT(instr->value()->representation().IsSmiOrTagged());
|
| - object = UseTempRegister(instr->elements());
|
| + ASSERT(value_representation.IsSmiOrTagged() ||
|
| + value_representation.IsInteger32());
|
| if (needs_write_barrier) {
|
| + object = UseTempRegister(instr->elements());
|
| val = UseTempRegister(instr->value());
|
| key = UseTempRegister(instr->key());
|
| } else {
|
| + object = UseRegisterAtStart(instr->elements());
|
| val = UseRegisterOrConstantAtStart(instr->value());
|
| key = UseRegisterOrConstantAtStart(instr->key());
|
| }
|
| @@ -2297,7 +2306,7 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| } else if (can_be_constant) {
|
| val = UseRegisterOrConstant(instr->value());
|
| } else if (FLAG_track_fields && instr->field_representation().IsSmi()) {
|
| - val = UseTempRegister(instr->value());
|
| + val = UseRegister(instr->value());
|
| } else if (FLAG_track_double_fields &&
|
| instr->field_representation().IsDouble()) {
|
| val = UseRegisterAtStart(instr->value());
|
|
|