Index: src/objects.cc |
=================================================================== |
--- src/objects.cc (revision 2762) |
+++ src/objects.cc (working copy) |
@@ -4822,6 +4822,18 @@ |
} |
+void SharedFunctionInfo::ClearThisPropertyAssignmentsInfo() { |
+ set_compiler_hints(BooleanBit::set(compiler_hints(), |
+ kHasOnlyThisPropertyAssignments, |
+ false)); |
+ set_compiler_hints(BooleanBit::set(compiler_hints(), |
+ kHasOnlySimpleThisPropertyAssignments, |
+ false)); |
+ set_this_property_assignments(Heap::undefined_value()); |
+ set_this_property_assignments_count(0); |
+} |
+ |
+ |
String* SharedFunctionInfo::GetThisPropertyAssignmentName(int index) { |
Object* obj = this_property_assignments(); |
ASSERT(obj->IsFixedArray()); |
@@ -4832,6 +4844,32 @@ |
} |
+bool SharedFunctionInfo::IsThisPropertyAssignmentArgument(int index) { |
+ Object* obj = this_property_assignments(); |
+ ASSERT(obj->IsFixedArray()); |
+ ASSERT(index < this_property_assignments_count()); |
+ obj = FixedArray::cast(obj)->get(index * 3 + 1); |
+ return Smi::cast(obj)->value() != -1; |
+} |
+ |
+ |
+int SharedFunctionInfo::GetThisPropertyAssignmentArgument(int index) { |
+ ASSERT(IsThisPropertyAssignmentArgument(index)); |
+ Object* obj = |
+ FixedArray::cast(this_property_assignments())->get(index * 3 + 1); |
+ return Smi::cast(obj)->value(); |
+} |
+ |
+ |
+Object* SharedFunctionInfo::GetThisPropertyAssignmentConstant(int index) { |
+ ASSERT(!IsThisPropertyAssignmentArgument(index)); |
+ Object* obj = |
+ FixedArray::cast(this_property_assignments())->get(index * 3 + 2); |
+ return obj; |
+} |
+ |
+ |
+ |
// Support function for printing the source code to a StringStream |
// without any allocation in the heap. |
void SharedFunctionInfo::SourceCodePrint(StringStream* accumulator, |