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

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

Issue 16631002: Separate Cell and PropertyCell spaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove Mips changes 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/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 // A Smi is not an instance of anything. 2683 // A Smi is not an instance of anything.
2684 __ JumpIfSmi(object, &false_result); 2684 __ JumpIfSmi(object, &false_result);
2685 2685
2686 // This is the inlined call site instanceof cache. The two occurences of the 2686 // This is the inlined call site instanceof cache. The two occurences of the
2687 // hole value will be patched to the last map/result pair generated by the 2687 // hole value will be patched to the last map/result pair generated by the
2688 // instanceof stub. 2688 // instanceof stub.
2689 Label cache_miss; 2689 Label cache_miss;
2690 Register map = ToRegister(instr->temp()); 2690 Register map = ToRegister(instr->temp());
2691 __ mov(map, FieldOperand(object, HeapObject::kMapOffset)); 2691 __ mov(map, FieldOperand(object, HeapObject::kMapOffset));
2692 __ bind(deferred->map_check()); // Label for calculating code patching. 2692 __ bind(deferred->map_check()); // Label for calculating code patching.
2693 Handle<JSGlobalPropertyCell> cache_cell = 2693 Handle<Cell> cache_cell = factory()->NewCell(factory()->the_hole_value());
2694 factory()->NewJSGlobalPropertyCell(factory()->the_hole_value());
2695 __ cmp(map, Operand::Cell(cache_cell)); // Patched to cached map. 2694 __ cmp(map, Operand::Cell(cache_cell)); // Patched to cached map.
2696 __ j(not_equal, &cache_miss, Label::kNear); 2695 __ j(not_equal, &cache_miss, Label::kNear);
2697 __ mov(eax, factory()->the_hole_value()); // Patched to either true or false. 2696 __ mov(eax, factory()->the_hole_value()); // Patched to either true or false.
2698 __ jmp(&done); 2697 __ jmp(&done);
2699 2698
2700 // The inlined call site cache did not match. Check for null and string 2699 // The inlined call site cache did not match. Check for null and string
2701 // before calling the deferred code. 2700 // before calling the deferred code.
2702 __ bind(&cache_miss); 2701 __ bind(&cache_miss);
2703 // Null is not an instance of anything. 2702 // Null is not an instance of anything.
2704 __ cmp(object, factory()->null_value()); 2703 __ cmp(object, factory()->null_value());
(...skipping 3046 matching lines...) Expand 10 before | Expand all | Expand 10 after
5751 DeoptimizeIf(not_equal, instr->environment()); 5750 DeoptimizeIf(not_equal, instr->environment());
5752 } 5751 }
5753 } 5752 }
5754 } 5753 }
5755 5754
5756 5755
5757 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5756 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
5758 Handle<JSFunction> target = instr->hydrogen()->target(); 5757 Handle<JSFunction> target = instr->hydrogen()->target();
5759 if (instr->hydrogen()->target_in_new_space()) { 5758 if (instr->hydrogen()->target_in_new_space()) {
5760 Register reg = ToRegister(instr->value()); 5759 Register reg = ToRegister(instr->value());
5761 Handle<JSGlobalPropertyCell> cell = 5760 Handle<Cell> cell = isolate()->factory()->NewCell(target);
5762 isolate()->factory()->NewJSGlobalPropertyCell(target);
5763 __ cmp(reg, Operand::Cell(cell)); 5761 __ cmp(reg, Operand::Cell(cell));
5764 } else { 5762 } else {
5765 Operand operand = ToOperand(instr->value()); 5763 Operand operand = ToOperand(instr->value());
5766 __ cmp(operand, target); 5764 __ cmp(operand, target);
5767 } 5765 }
5768 DeoptimizeIf(not_equal, instr->environment()); 5766 DeoptimizeIf(not_equal, instr->environment());
5769 } 5767 }
5770 5768
5771 5769
5772 void LCodeGen::DoCheckMapCommon(Register reg, 5770 void LCodeGen::DoCheckMapCommon(Register reg,
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
6499 FixedArray::kHeaderSize - kPointerSize)); 6497 FixedArray::kHeaderSize - kPointerSize));
6500 __ bind(&done); 6498 __ bind(&done);
6501 } 6499 }
6502 6500
6503 6501
6504 #undef __ 6502 #undef __
6505 6503
6506 } } // namespace v8::internal 6504 } } // namespace v8::internal
6507 6505
6508 #endif // V8_TARGET_ARCH_IA32 6506 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698