Fix InstructionSelector to handle calls with no (used) output values.
R=jarin@chromium.org BUG= Review URL: https://codereview.chromium.org/664693002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
66170eaa52
commit
8c5f9b6bb0
@ -868,8 +868,10 @@ void InstructionSelector::VisitCall(Node* node) {
|
||||
opcode |= MiscField::encode(descriptor->flags());
|
||||
|
||||
// Emit the call instruction.
|
||||
InstructionOperand** first_output =
|
||||
buffer.outputs.size() > 0 ? &buffer.outputs.front() : NULL;
|
||||
Instruction* call_instr =
|
||||
Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(),
|
||||
Emit(opcode, buffer.outputs.size(), first_output,
|
||||
buffer.instruction_args.size(), &buffer.instruction_args.front());
|
||||
call_instr->MarkAsCall();
|
||||
}
|
||||
|
@ -954,8 +954,10 @@ void InstructionSelector::VisitCall(Node* node) {
|
||||
opcode |= MiscField::encode(descriptor->flags());
|
||||
|
||||
// Emit the call instruction.
|
||||
InstructionOperand** first_output =
|
||||
buffer.outputs.size() > 0 ? &buffer.outputs.front() : NULL;
|
||||
Instruction* call_instr =
|
||||
Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(),
|
||||
Emit(opcode, buffer.outputs.size(), first_output,
|
||||
buffer.instruction_args.size(), &buffer.instruction_args.front());
|
||||
call_instr->MarkAsCall();
|
||||
}
|
||||
|
@ -638,8 +638,10 @@ void InstructionSelector::VisitCall(Node* node) {
|
||||
opcode |= MiscField::encode(descriptor->flags());
|
||||
|
||||
// Emit the call instruction.
|
||||
InstructionOperand** first_output =
|
||||
buffer.outputs.size() > 0 ? &buffer.outputs.front() : NULL;
|
||||
Instruction* call_instr =
|
||||
Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(),
|
||||
Emit(opcode, buffer.outputs.size(), first_output,
|
||||
buffer.instruction_args.size(), &buffer.instruction_args.front());
|
||||
call_instr->MarkAsCall();
|
||||
}
|
||||
|
@ -451,8 +451,10 @@ void InstructionSelector::VisitCall(Node* node) {
|
||||
opcode |= MiscField::encode(descriptor->flags());
|
||||
|
||||
// Emit the call instruction.
|
||||
InstructionOperand** first_output =
|
||||
buffer.outputs.size() > 0 ? &buffer.outputs.front() : NULL;
|
||||
Instruction* call_instr =
|
||||
Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(),
|
||||
Emit(opcode, buffer.outputs.size(), first_output,
|
||||
buffer.instruction_args.size(), &buffer.instruction_args.front());
|
||||
call_instr->MarkAsCall();
|
||||
}
|
||||
|
@ -764,8 +764,10 @@ void InstructionSelector::VisitCall(Node* node) {
|
||||
opcode |= MiscField::encode(descriptor->flags());
|
||||
|
||||
// Emit the call instruction.
|
||||
InstructionOperand** first_output =
|
||||
buffer.outputs.size() > 0 ? &buffer.outputs.front() : NULL;
|
||||
Instruction* call_instr =
|
||||
Emit(opcode, buffer.outputs.size(), &buffer.outputs.front(),
|
||||
Emit(opcode, buffer.outputs.size(), first_output,
|
||||
buffer.instruction_args.size(), &buffer.instruction_args.front());
|
||||
call_instr->MarkAsCall();
|
||||
}
|
||||
|
13
test/mjsunit/unused-context-in-with.js
Normal file
13
test/mjsunit/unused-context-in-with.js
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright 2014 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var x = 1;
|
||||
function foo(object) {
|
||||
with(object) {
|
||||
x;
|
||||
}
|
||||
return 100;
|
||||
}
|
||||
|
||||
assertEquals(100,foo("str"));
|
Loading…
Reference in New Issue
Block a user