Commit fcc3d193 authored by whesse@chromium.org's avatar whesse@chromium.org

Refactor x64 named loads to agree with ia32 implementation. Remove dead code...

Refactor x64 named loads to agree with ia32 implementation.  Remove dead code and flag is_global from x64 keyed loads.
Review URL: http://codereview.chromium.org/2121022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a7bba921
......@@ -8598,16 +8598,16 @@ Result CodeGenerator::EmitKeyedLoad() {
if (loop_nesting() > 0) {
Comment cmnt(masm_, "[ Inlined load from keyed Property");
Result key = frame_->Pop();
Result receiver = frame_->Pop();
key.ToRegister();
receiver.ToRegister();
// Use a fresh temporary to load the elements without destroying
// the receiver which is needed for the deferred slow case.
Result elements = allocator()->Allocate();
ASSERT(elements.is_valid());
Result key = frame_->Pop();
Result receiver = frame_->Pop();
key.ToRegister();
receiver.ToRegister();
// Use a fresh temporary for the index and later the loaded
// value.
result = allocator()->Allocate();
......@@ -8621,6 +8621,7 @@ Result CodeGenerator::EmitKeyedLoad() {
__ test(receiver.reg(), Immediate(kSmiTagMask));
deferred->Branch(zero);
// Check that the receiver has the expected map.
// Initially, use an invalid map. The map is patched in the IC
// initialization code.
__ bind(deferred->patch_site());
......@@ -8654,7 +8655,6 @@ Result CodeGenerator::EmitKeyedLoad() {
FieldOperand(elements.reg(), FixedArray::kLengthOffset));
deferred->Branch(above_equal);
// Load and check that the result is not the hole.
__ mov(result.reg(), Operand(elements.reg(),
result.reg(),
times_4,
......
This diff is collapsed.
......@@ -449,10 +449,13 @@ class CodeGenerator: public AstVisitor {
// value in place.
void StoreToSlot(Slot* slot, InitState init_state);
// Receiver is passed on the frame and not consumed.
Result EmitNamedLoad(Handle<String> name, bool is_contextual);
// Load a property of an object, returning it in a Result.
// The object and the property name are passed on the stack, and
// not changed.
Result EmitKeyedLoad(bool is_global);
Result EmitKeyedLoad();
// Special code for typeof expressions: Unfortunately, we must
// be careful when loading the expression in 'typeof'
......
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