Reviewers: Michael Starzinger,
Description:
Fix serialization tests and Mac build
[email protected]
BUG=
Please review this at https://codereview.chromium.org/16109018/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ia32/assembler-ia32.h
M src/ia32/lithium-codegen-ia32.cc
M src/ia32/macro-assembler-ia32.cc
M src/ia32/stub-cache-ia32.cc
M test/cctest/test-serialize.cc
Index: src/ia32/assembler-ia32.h
diff --git a/src/ia32/assembler-ia32.h b/src/ia32/assembler-ia32.h
index
1fb57886a726a31f2094b9340f5de2442eaa4661..353f265ab7765a14484a49313c9a406e61cdc42a
100644
--- a/src/ia32/assembler-ia32.h
+++ b/src/ia32/assembler-ia32.h
@@ -410,7 +410,7 @@ class Operand BASE_EMBEDDED {
RelocInfo::EXTERNAL_REFERENCE);
}
- static Operand Cell(Handle<Cell> cell) {
+ static Operand ForCell(Handle<Cell> cell) {
AllowDeferredHandleDereference embedding_raw_address;
return Operand(reinterpret_cast<int32_t>(cell.location()),
RelocInfo::CELL);
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc
b/src/ia32/lithium-codegen-ia32.cc
index
77fa1d1777d11b337a17c911aa753191337daeb3..845efe039a597a0877a415f8d114761b54a2e4c5
100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2680,7 +2680,7 @@ void
LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
__ mov(map, FieldOperand(object, HeapObject::kMapOffset));
__ bind(deferred->map_check()); // Label for calculating code patching.
Handle<Cell> cache_cell =
factory()->NewCell(factory()->the_hole_value());
- __ cmp(map, Operand::Cell(cache_cell)); // Patched to cached map.
+ __ cmp(map, Operand::ForCell(cache_cell)); // Patched to cached map.
__ j(not_equal, &cache_miss, Label::kNear);
__ mov(eax, factory()->the_hole_value()); // Patched to either true or
false.
__ jmp(&done);
@@ -2862,7 +2862,7 @@ void LCodeGen::DoReturn(LReturn* instr) {
void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
Register result = ToRegister(instr->result());
- __ mov(result, Operand::Cell(instr->hydrogen()->cell()));
+ __ mov(result, Operand::ForCell(instr->hydrogen()->cell()));
if (instr->hydrogen()->RequiresHoleCheck()) {
__ cmp(result, factory()->the_hole_value());
DeoptimizeIf(equal, instr->environment());
@@ -2892,12 +2892,12 @@ void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell*
instr) {
// to update the property details in the property dictionary to mark
// it as no longer deleted. We deoptimize in that case.
if (instr->hydrogen()->RequiresHoleCheck()) {
- __ cmp(Operand::Cell(cell_handle), factory()->the_hole_value());
+ __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value());
DeoptimizeIf(equal, instr->environment());
}
// Store the value.
- __ mov(Operand::Cell(cell_handle), value);
+ __ mov(Operand::ForCell(cell_handle), value);
// Cells are always rescanned, so no write barrier here.
}
@@ -5747,7 +5747,7 @@ void LCodeGen::DoCheckFunction(LCheckFunction* instr)
{
if (instr->hydrogen()->target_in_new_space()) {
Register reg = ToRegister(instr->value());
Handle<Cell> cell = isolate()->factory()->NewCell(target);
- __ cmp(reg, Operand::Cell(cell));
+ __ cmp(reg, Operand::ForCell(cell));
} else {
Operand operand = ToOperand(instr->value());
__ cmp(operand, target);
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc
b/src/ia32/macro-assembler-ia32.cc
index
3b86eba28be3f7e576389b0cd9ce899d617bd833..60c5c2675f791a324d278cb2679b88fcdefd17db
100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2496,7 +2496,7 @@ void MacroAssembler::LoadHeapObject(Register result,
AllowDeferredHandleDereference embedding_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
- mov(result, Operand::Cell(cell));
+ mov(result, Operand::ForCell(cell));
} else {
mov(result, object);
}
@@ -2507,7 +2507,7 @@ void MacroAssembler::CmpHeapObject(Register reg,
Handle<HeapObject> object) {
AllowDeferredHandleDereference using_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
- cmp(reg, Operand::Cell(cell));
+ cmp(reg, Operand::ForCell(cell));
} else {
cmp(reg, object);
}
@@ -2518,7 +2518,7 @@ void
MacroAssembler::PushHeapObject(Handle<HeapObject> object) {
AllowDeferredHandleDereference using_raw_address;
if (isolate()->heap()->InNewSpace(*object)) {
Handle<Cell> cell = isolate()->factory()->NewCell(object);
- push(Operand::Cell(cell));
+ push(Operand::ForCell(cell));
} else {
Push(object);
}
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index
f4340d68d6477233b068f9b77380c75498ea273e..93923a70349b69e339fdac2c980703f09310b9ca
100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -762,7 +762,7 @@ static void GenerateCheckPropertyCell(MacroAssembler*
masm,
__ cmp(FieldOperand(scratch, JSGlobalPropertyCell::kValueOffset),
Immediate(the_hole));
} else {
- __ cmp(Operand::Cell(cell), Immediate(the_hole));
+ __ cmp(Operand::ForCell(cell), Immediate(the_hole));
}
__ j(not_equal, miss);
}
@@ -1573,7 +1573,7 @@ void CallStubCompiler::GenerateLoadFunctionFromCell(
__ mov(edi, Immediate(cell));
__ mov(edi, FieldOperand(edi, Cell::kValueOffset));
} else {
- __ mov(edi, Operand::Cell(cell));
+ __ mov(edi, Operand::ForCell(cell));
}
// Check that the cell contains the same function.
@@ -3121,7 +3121,7 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal(
__ mov(eax, Immediate(cell));
__ mov(eax, FieldOperand(eax, JSGlobalPropertyCell::kValueOffset));
} else {
- __ mov(eax, Operand::Cell(cell));
+ __ mov(eax, Operand::ForCell(cell));
}
// Check for deleted property if property can actually be deleted.
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index
8973d5417884208d986be2dc94cb923ca73ef2ca..337619498013ca4b3d4567948832938a399c4636
100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -195,7 +195,8 @@ class FileByteSink : public SnapshotByteSink {
int data_space_used,
int code_space_used,
int map_space_used,
- int cell_space_used);
+ int cell_space_used,
+ int property_cell_space_used);
private:
FILE* fp_;
@@ -209,7 +210,8 @@ void FileByteSink::WriteSpaceUsed(
int data_space_used,
int code_space_used,
int map_space_used,
- int cell_space_used) {
+ int cell_space_used,
+ int property_cell_space_used) {
int file_name_length = StrLength(file_name_) + 10;
Vector<char> name = Vector<char>::New(file_name_length + 1);
OS::SNPrintF(name, "%s.size", file_name_);
@@ -221,6 +223,7 @@ void FileByteSink::WriteSpaceUsed(
fprintf(fp, "code %d\n", code_space_used);
fprintf(fp, "map %d\n", map_space_used);
fprintf(fp, "cell %d\n", cell_space_used);
+ fprintf(fp, "property cell %d\n", property_cell_space_used);
fclose(fp);
}
@@ -236,7 +239,8 @@ static bool WriteToFile(const char* snapshot_file) {
ser.CurrentAllocationAddress(OLD_DATA_SPACE),
ser.CurrentAllocationAddress(CODE_SPACE),
ser.CurrentAllocationAddress(MAP_SPACE),
- ser.CurrentAllocationAddress(CELL_SPACE));
+ ser.CurrentAllocationAddress(CELL_SPACE),
+ ser.CurrentAllocationAddress(PROPERTY_CELL_SPACE));
return true;
}
@@ -425,7 +429,8 @@ TEST(PartialSerialization) {
p_ser.CurrentAllocationAddress(OLD_DATA_SPACE),
p_ser.CurrentAllocationAddress(CODE_SPACE),
p_ser.CurrentAllocationAddress(MAP_SPACE),
- p_ser.CurrentAllocationAddress(CELL_SPACE));
+ p_ser.CurrentAllocationAddress(CELL_SPACE),
+ p_ser.CurrentAllocationAddress(PROPERTY_CELL_SPACE));
startup_sink.WriteSpaceUsed(
startup_serializer.CurrentAllocationAddress(NEW_SPACE),
@@ -433,7 +438,8 @@ TEST(PartialSerialization) {
startup_serializer.CurrentAllocationAddress(OLD_DATA_SPACE),
startup_serializer.CurrentAllocationAddress(CODE_SPACE),
startup_serializer.CurrentAllocationAddress(MAP_SPACE),
- startup_serializer.CurrentAllocationAddress(CELL_SPACE));
+ startup_serializer.CurrentAllocationAddress(CELL_SPACE),
+ startup_serializer.CurrentAllocationAddress(PROPERTY_CELL_SPACE));
startup_name.Dispose();
}
}
@@ -566,7 +572,8 @@ TEST(ContextSerialization) {
p_ser.CurrentAllocationAddress(OLD_DATA_SPACE),
p_ser.CurrentAllocationAddress(CODE_SPACE),
p_ser.CurrentAllocationAddress(MAP_SPACE),
- p_ser.CurrentAllocationAddress(CELL_SPACE));
+ p_ser.CurrentAllocationAddress(CELL_SPACE),
+ p_ser.CurrentAllocationAddress(PROPERTY_CELL_SPACE));
startup_sink.WriteSpaceUsed(
startup_serializer.CurrentAllocationAddress(NEW_SPACE),
@@ -574,7 +581,8 @@ TEST(ContextSerialization) {
startup_serializer.CurrentAllocationAddress(OLD_DATA_SPACE),
startup_serializer.CurrentAllocationAddress(CODE_SPACE),
startup_serializer.CurrentAllocationAddress(MAP_SPACE),
- startup_serializer.CurrentAllocationAddress(CELL_SPACE));
+ startup_serializer.CurrentAllocationAddress(CELL_SPACE),
+ startup_serializer.CurrentAllocationAddress(PROPERTY_CELL_SPACE));
startup_name.Dispose();
}
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.