Revision: 2588 Author: [email protected] Date: Thu Jul 30 05:09:51 2009 Log: X64: Fix lint problem and add missing stub function.
Review URL: http://codereview.chromium.org/160387 http://code.google.com/p/v8/source/detail?r=2588 Modified: /branches/bleeding_edge/src/ic.cc /branches/bleeding_edge/src/x64/codegen-x64.cc /branches/bleeding_edge/src/x64/stub-cache-x64.cc ======================================= --- /branches/bleeding_edge/src/ic.cc Tue Jul 28 06:44:17 2009 +++ /branches/bleeding_edge/src/ic.cc Thu Jul 30 05:09:51 2009 @@ -737,8 +737,6 @@ return TypeError("non_object_property_load", object, name); } - // TODO(X64): Enable specialized stubs for length and prototype lookup. -#ifndef V8_TARGET_ARCH_X64 if (FLAG_use_ic) { // Use specialized code for getting the length of strings. if (object->IsString() && name->Equals(Heap::length_symbol())) { @@ -778,7 +776,6 @@ return Accessors::FunctionGetPrototype(*object, 0); } } -#endif // !V8_TARGET_ARCH_X64 // Check if the name is trivially convertible to an index and get // the element or char if so. ======================================= --- /branches/bleeding_edge/src/x64/codegen-x64.cc Thu Jul 30 02:18:14 2009 +++ /branches/bleeding_edge/src/x64/codegen-x64.cc Thu Jul 30 05:09:51 2009 @@ -5459,7 +5459,8 @@ __ bind(deferred->patch_site()); // Use masm-> here instead of the double underscore macro since extra // coverage code can interfere with the patching. - masm->movq(kScratchRegister, Factory::null_value(), RelocInfo::EMBEDDED_OBJECT); + masm->movq(kScratchRegister, Factory::null_value(), + RelocInfo::EMBEDDED_OBJECT); masm->cmpq(FieldOperand(receiver.reg(), HeapObject::kMapOffset), kScratchRegister); deferred->Branch(not_equal); ======================================= --- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Thu Jul 30 02:18:14 2009 +++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Thu Jul 30 05:09:51 2009 @@ -1142,6 +1142,36 @@ // Return the generated code. return GetCode(NORMAL, name); } + + +Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name, + JSObject* receiver, + JSObject* holder, + AccessorInfo* callback) { + // ----------- S t a t e ------------- + // -- rsp[0] : return address + // -- rsp[8] : name + // -- rsp[16] : receiver + // ----------------------------------- + Label miss; + + __ movq(rax, Operand(rsp, kPointerSize)); + __ movq(rcx, Operand(rsp, 2 * kPointerSize)); + __ IncrementCounter(&Counters::keyed_load_callback, 1); + + // Check that the name has not changed. + __ Cmp(rax, Handle<String>(name)); + __ j(not_equal, &miss); + + GenerateLoadCallback(receiver, holder, rcx, rax, rbx, rdx, + callback, name, &miss); + __ bind(&miss); + __ DecrementCounter(&Counters::keyed_load_callback, 1); + GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); + + // Return the generated code. + return GetCode(CALLBACKS, name); +} Object* KeyedLoadStubCompiler::CompileLoadArrayLength(String* name) { @@ -1168,15 +1198,6 @@ // Return the generated code. return GetCode(CALLBACKS, name); } - - -Object* KeyedLoadStubCompiler::CompileLoadCallback(String* name, - JSObject* object, - JSObject* holder, - AccessorInfo* callback) { - UNIMPLEMENTED(); - return NULL; -} Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name, --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
