Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 17064002: Refactor only: Rename JSGlobaPropertyCell to PropertyCell (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 // instanceof stub. 2432 // instanceof stub.
2433 Label cache_miss; 2433 Label cache_miss;
2434 Register map = temp; 2434 Register map = temp;
2435 __ lw(map, FieldMemOperand(object, HeapObject::kMapOffset)); 2435 __ lw(map, FieldMemOperand(object, HeapObject::kMapOffset));
2436 2436
2437 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 2437 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
2438 __ bind(deferred->map_check()); // Label for calculating code patching. 2438 __ bind(deferred->map_check()); // Label for calculating code patching.
2439 // We use Factory::the_hole_value() on purpose instead of loading from the 2439 // We use Factory::the_hole_value() on purpose instead of loading from the
2440 // root array to force relocation to be able to later patch with 2440 // root array to force relocation to be able to later patch with
2441 // the cached map. 2441 // the cached map.
2442 Handle<JSGlobalPropertyCell> cell = 2442 Handle<PropertyCell> cell =
2443 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value()); 2443 factory()->NewPropertyCell(factory()->the_hole_value());
2444 __ li(at, Operand(Handle<Object>(cell))); 2444 __ li(at, Operand(Handle<Object>(cell)));
2445 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); 2445 __ lw(at, FieldMemOperand(at, PropertyCell::kValueOffset));
2446 __ Branch(&cache_miss, ne, map, Operand(at)); 2446 __ Branch(&cache_miss, ne, map, Operand(at));
2447 // We use Factory::the_hole_value() on purpose instead of loading from the 2447 // We use Factory::the_hole_value() on purpose instead of loading from the
2448 // root array to force relocation to be able to later patch 2448 // root array to force relocation to be able to later patch
2449 // with true or false. 2449 // with true or false.
2450 __ li(result, Operand(factory()->the_hole_value()), CONSTANT_SIZE); 2450 __ li(result, Operand(factory()->the_hole_value()), CONSTANT_SIZE);
2451 __ Branch(&done); 2451 __ Branch(&done);
2452 2452
2453 // The inlined call site cache did not match. Check null and string before 2453 // The inlined call site cache did not match. Check null and string before
2454 // calling the deferred code. 2454 // calling the deferred code.
2455 __ bind(&cache_miss); 2455 __ bind(&cache_miss);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 2589
2590 if (no_frame_start != -1) { 2590 if (no_frame_start != -1) {
2591 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 2591 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2592 } 2592 }
2593 } 2593 }
2594 2594
2595 2595
2596 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { 2596 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2597 Register result = ToRegister(instr->result()); 2597 Register result = ToRegister(instr->result());
2598 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2598 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell())));
2599 __ lw(result, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); 2599 __ lw(result, FieldMemOperand(at, PropertyCell::kValueOffset));
2600 if (instr->hydrogen()->RequiresHoleCheck()) { 2600 if (instr->hydrogen()->RequiresHoleCheck()) {
2601 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2601 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2602 DeoptimizeIf(eq, instr->environment(), result, Operand(at)); 2602 DeoptimizeIf(eq, instr->environment(), result, Operand(at));
2603 } 2603 }
2604 } 2604 }
2605 2605
2606 2606
2607 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2607 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2608 ASSERT(ToRegister(instr->global_object()).is(a0)); 2608 ASSERT(ToRegister(instr->global_object()).is(a0));
2609 ASSERT(ToRegister(instr->result()).is(v0)); 2609 ASSERT(ToRegister(instr->result()).is(v0));
(...skipping 13 matching lines...) Expand all
2623 // Load the cell. 2623 // Load the cell.
2624 __ li(cell, Operand(instr->hydrogen()->cell())); 2624 __ li(cell, Operand(instr->hydrogen()->cell()));
2625 2625
2626 // If the cell we are storing to contains the hole it could have 2626 // If the cell we are storing to contains the hole it could have
2627 // been deleted from the property dictionary. In that case, we need 2627 // been deleted from the property dictionary. In that case, we need
2628 // to update the property details in the property dictionary to mark 2628 // to update the property details in the property dictionary to mark
2629 // it as no longer deleted. 2629 // it as no longer deleted.
2630 if (instr->hydrogen()->RequiresHoleCheck()) { 2630 if (instr->hydrogen()->RequiresHoleCheck()) {
2631 // We use a temp to check the payload. 2631 // We use a temp to check the payload.
2632 Register payload = ToRegister(instr->temp()); 2632 Register payload = ToRegister(instr->temp());
2633 __ lw(payload, FieldMemOperand(cell, JSGlobalPropertyCell::kValueOffset)); 2633 __ lw(payload, FieldMemOperand(cell, PropertyCell::kValueOffset));
2634 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2634 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2635 DeoptimizeIf(eq, instr->environment(), payload, Operand(at)); 2635 DeoptimizeIf(eq, instr->environment(), payload, Operand(at));
2636 } 2636 }
2637 2637
2638 // Store the value. 2638 // Store the value.
2639 __ sw(value, FieldMemOperand(cell, JSGlobalPropertyCell::kValueOffset)); 2639 __ sw(value, FieldMemOperand(cell, PropertyCell::kValueOffset));
2640 // Cells are always rescanned, so no write barrier here. 2640 // Cells are always rescanned, so no write barrier here.
2641 } 2641 }
2642 2642
2643 2643
2644 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { 2644 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2645 ASSERT(ToRegister(instr->global_object()).is(a1)); 2645 ASSERT(ToRegister(instr->global_object()).is(a1));
2646 ASSERT(ToRegister(instr->value()).is(a0)); 2646 ASSERT(ToRegister(instr->value()).is(a0));
2647 2647
2648 __ li(a2, Operand(instr->name())); 2648 __ li(a2, Operand(instr->name()));
2649 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 2649 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
4994 } 4994 }
4995 } 4995 }
4996 4996
4997 4997
4998 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 4998 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
4999 Register reg = ToRegister(instr->value()); 4999 Register reg = ToRegister(instr->value());
5000 Handle<JSFunction> target = instr->hydrogen()->target(); 5000 Handle<JSFunction> target = instr->hydrogen()->target();
5001 AllowDeferredHandleDereference smi_check; 5001 AllowDeferredHandleDereference smi_check;
5002 if (isolate()->heap()->InNewSpace(*target)) { 5002 if (isolate()->heap()->InNewSpace(*target)) {
5003 Register reg = ToRegister(instr->value()); 5003 Register reg = ToRegister(instr->value());
5004 Handle<JSGlobalPropertyCell> cell = 5004 Handle<PropertyCell> cell = isolate()->factory()->NewPropertyCell(target);
5005 isolate()->factory()->NewJSGlobalPropertyCell(target);
5006 __ li(at, Operand(Handle<Object>(cell))); 5005 __ li(at, Operand(Handle<Object>(cell)));
5007 __ lw(at, FieldMemOperand(at, JSGlobalPropertyCell::kValueOffset)); 5006 __ lw(at, FieldMemOperand(at, PropertyCell::kValueOffset));
5008 DeoptimizeIf(ne, instr->environment(), reg, 5007 DeoptimizeIf(ne, instr->environment(), reg,
5009 Operand(at)); 5008 Operand(at));
5010 } else { 5009 } else {
5011 DeoptimizeIf(ne, instr->environment(), reg, 5010 DeoptimizeIf(ne, instr->environment(), reg,
5012 Operand(target)); 5011 Operand(target));
5013 } 5012 }
5014 } 5013 }
5015 5014
5016 5015
5017 void LCodeGen::DoCheckMapCommon(Register map_reg, 5016 void LCodeGen::DoCheckMapCommon(Register map_reg,
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
5666 __ Subu(scratch, result, scratch); 5665 __ Subu(scratch, result, scratch);
5667 __ lw(result, FieldMemOperand(scratch, 5666 __ lw(result, FieldMemOperand(scratch,
5668 FixedArray::kHeaderSize - kPointerSize)); 5667 FixedArray::kHeaderSize - kPointerSize));
5669 __ bind(&done); 5668 __ bind(&done);
5670 } 5669 }
5671 5670
5672 5671
5673 #undef __ 5672 #undef __
5674 5673
5675 } } // namespace v8::internal 5674 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698