Skip to content

Commit

Permalink
Imported Upstream version 2.4.9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Nov 8, 2010
1 parent 5fabc69 commit df5704d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
5 changes: 4 additions & 1 deletion src/log.cc
Expand Up @@ -164,7 +164,10 @@ void StackTracer::Trace(TickSample* sample) {

int i = 0;
const Address callback = VMState::external_callback();
if (callback != NULL) {
// Surprisingly, PC can point _exactly_ to callback start, with good
// probability, and this will result in reporting fake nested
// callback call.
if (callback != NULL && callback != sample->pc) {
sample->stack[i++] = callback;
}

Expand Down
45 changes: 27 additions & 18 deletions src/objects-inl.h
Expand Up @@ -1923,7 +1923,9 @@ void JSFunctionResultCache::MakeZeroSize() {
void JSFunctionResultCache::Clear() {
int cache_size = Smi::cast(get(kCacheSizeIndex))->value();
Object** entries_start = RawField(this, OffsetOfElementAt(kEntriesIndex));
MemsetPointer(entries_start, Heap::the_hole_value(), cache_size);
MemsetPointer(entries_start,
Heap::the_hole_value(),
cache_size - kEntriesIndex);
MakeZeroSize();
}

Expand Down Expand Up @@ -2636,6 +2638,7 @@ SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
#else

#define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \
STATIC_ASSERT(holder::offset % kPointerSize == 0); \
int holder::name() { \
int value = READ_INT_FIELD(this, offset); \
ASSERT(kHeapObjectTag == 1); \
Expand All @@ -2651,30 +2654,36 @@ SMI_ACCESSORS(SharedFunctionInfo, this_property_assignments_count,
(value << 1) & ~kHeapObjectTag); \
}

#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \
#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \
STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \
INT_ACCESSORS(holder, name, offset)



PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, length, kLengthOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, formal_parameter_count,
kFormalParameterCountOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
formal_parameter_count,
kFormalParameterCountOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, expected_nof_properties,
kExpectedNofPropertiesOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
expected_nof_properties,
kExpectedNofPropertiesOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, num_literals, kNumLiteralsOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, start_position_and_type,
kStartPositionAndTypeOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, end_position, kEndPositionOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, function_token_position,
kFunctionTokenPositionOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, compiler_hints,
kCompilerHintsOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, this_property_assignments_count,
kThisPropertyAssignmentsCountOffset)
PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, end_position, kEndPositionOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
start_position_and_type,
kStartPositionAndTypeOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
function_token_position,
kFunctionTokenPositionOffset)
PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo,
compiler_hints,
kCompilerHintsOffset)

PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo,
this_property_assignments_count,
kThisPropertyAssignmentsCountOffset)
#endif


Expand Down
2 changes: 1 addition & 1 deletion src/version.cc
Expand Up @@ -35,7 +35,7 @@
#define MAJOR_VERSION 2
#define MINOR_VERSION 4
#define BUILD_NUMBER 9
#define PATCH_LEVEL 9
#define PATCH_LEVEL 12
#define CANDIDATE_VERSION false

// Define SONAME to have the SCons build the put a specific SONAME into the
Expand Down

0 comments on commit df5704d

Please sign in to comment.