env.Replace(**context.flags['v8'])
context.ApplyEnvOverrides(env)
env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
- env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile $LOGFILE')
+ env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGFILE"')
# Build the standard platform-independent source files.
source_files = context.GetRelevantSources(SOURCES)
bool Dictionary::requires_slow_elements() {
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return false;
return 0 !=
(Smi::cast(max_index_object)->value() & kRequiresSlowElementsMask);
uint32_t Dictionary::max_number_key() {
ASSERT(!requires_slow_elements());
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi()) return 0;
uint32_t value = static_cast<uint32_t>(Smi::cast(max_index_object)->value());
return value >> kRequiresSlowElementsTagSize;
static inline uint32_t HashField(uint32_t hash, bool is_array_index) {
- return (hash << String::kLongLengthShift) | (is_array_index ? 3 : 1);
+ uint32_t result =
+ (hash << String::kLongLengthShift) | String::kHashComputedMask;
+ if (is_array_index) result |= String::kIsArrayIndexMask;
+ return result;
}
// Check if this index is high enough that we should require slow
// elements.
if (key > kRequiresSlowElementsLimit) {
- set(kPrefixStartIndex, Smi::FromInt(kRequiresSlowElementsMask));
+ set(kMaxNumberKeyIndex, Smi::FromInt(kRequiresSlowElementsMask));
return;
}
// Update max key value.
- Object* max_index_object = get(kPrefixStartIndex);
+ Object* max_index_object = get(kMaxNumberKeyIndex);
if (!max_index_object->IsSmi() || max_number_key() < key) {
- set(kPrefixStartIndex, Smi::FromInt(key << kRequiresSlowElementsTagSize));
+ set(kMaxNumberKeyIndex, Smi::FromInt(key << kRequiresSlowElementsTagSize));
}
}
// Accessors for next enumeration index.
void SetNextEnumerationIndex(int index) {
- fast_set(this, kNextEnumnerationIndexIndex, Smi::FromInt(index));
+ fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index));
}
int NextEnumerationIndex() {
- return Smi::cast(get(kNextEnumnerationIndexIndex))->value();
+ return Smi::cast(get(kNextEnumerationIndexIndex))->value();
}
// Returns a new array for dictionary usage. Might return Failure.
Object* GenerateNewEnumerationIndices();
static const int kMaxNumberKeyIndex = kPrefixStartIndex;
- static const int kNextEnumnerationIndexIndex = kMaxNumberKeyIndex + 1;
+ static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1;
DISALLOW_IMPLICIT_CONSTRUCTORS(Dictionary);
};
# Usage: process-ticks.py <logfile>
# Where <logfile> is the log file name (eg, v8.log).
-import os, re, sys, tickprocessor, getopt;
+import subprocess, re, sys, tickprocessor, getopt
class LinuxTickProcessor(tickprocessor.TickProcessor):
def ParseVMSymbols(self, filename, start, end):
"""Extract symbols and add them to the cpp entries."""
- pipe = os.popen('nm -n %s | c++filt' % filename, 'r')
+ # Extra both dynamic and non-dynamic symbols.
+ command = 'nm -C -n "%s"; nm -C -n -D "%s"' % (filename, filename)
+ process = subprocess.Popen(command, shell=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ pipe = process.stdout
try:
for line in pipe:
row = re.match('^([0-9a-fA-F]{8}) . (.*)$', line)