| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index d32f95d3098cd8ed3a3c0153d3adae19acc7ad08..d0c3577c7f082955e6115cf35762514f2a59977c 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -1910,6 +1910,14 @@ void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
|
| + // TODO(antonm): load a context with a separate instruction.
|
| + Register result = ToRegister(instr->result());
|
| + __ LoadContext(result, instr->context_chain_length());
|
| + __ mov(result, ContextOperand(result, instr->slot_index()));
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
| Register object = ToRegister(instr->input());
|
| Register result = ToRegister(instr->result());
|
| @@ -3067,13 +3075,13 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::LoadPrototype(Register result, Handle<JSObject> prototype) {
|
| - if (Heap::InNewSpace(*prototype)) {
|
| +void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) {
|
| + if (Heap::InNewSpace(*object)) {
|
| Handle<JSGlobalPropertyCell> cell =
|
| - Factory::NewJSGlobalPropertyCell(prototype);
|
| + Factory::NewJSGlobalPropertyCell(object);
|
| __ mov(result, Operand::Cell(cell));
|
| } else {
|
| - __ mov(result, prototype);
|
| + __ mov(result, object);
|
| }
|
| }
|
|
|
| @@ -3086,7 +3094,7 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
| Handle<JSObject> current_prototype(JSObject::cast(receiver_map->prototype()));
|
|
|
| // Load prototype object.
|
| - LoadPrototype(reg, current_prototype);
|
| + LoadHeapObject(reg, current_prototype);
|
|
|
| // Check prototype maps up to the holder.
|
| while (!current_prototype.is_identical_to(holder)) {
|
| @@ -3096,7 +3104,7 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
| current_prototype =
|
| Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
|
| // Load next prototype object.
|
| - LoadPrototype(reg, current_prototype);
|
| + LoadHeapObject(reg, current_prototype);
|
| }
|
|
|
| // Check the holder map.
|
|
|