Presubmit checks recover:

1) runtime/references checks temporarily disabled (56 items left)
2) other errors fixed

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/277913002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ishell@chromium.org 2014-05-09 12:59:24 +00:00
parent 2ba3716e4a
commit ff2d004f85
32 changed files with 219 additions and 216 deletions

View File

@ -292,7 +292,7 @@ class V8_EXPORT OutputStream { // NOLINT
*/
virtual WriteResult WriteHeapStatsChunk(HeapStatsUpdate* data, int count) {
return kAbort;
};
}
};

View File

@ -422,7 +422,7 @@ class PersistentValueVector {
*/
void Append(UniquePersistent<V> persistent) {
Traits::Append(&impl_, ClearAndLeak(&persistent));
};
}
/**
* Are there any values in the vector?

View File

@ -1039,7 +1039,7 @@ class V8_EXPORT ScriptCompiler {
int length;
BufferPolicy buffer_policy;
private:
private:
// Prevent copying. Not implemented.
CachedData(const CachedData&);
CachedData& operator=(const CachedData&);

View File

@ -20,7 +20,7 @@ class AllocationSiteContext {
public:
explicit AllocationSiteContext(Isolate* isolate) {
isolate_ = isolate;
};
}
Handle<AllocationSite> top() { return top_; }
Handle<AllocationSite> current() { return current_; }

View File

@ -110,7 +110,7 @@ inline Condition ReverseCondition(Condition cond) {
return ge;
default:
return cond;
};
}
}

View File

@ -694,9 +694,9 @@ void Simulator::CheckICache(v8::internal::HashMap* i_cache,
char* cached_line = cache_page->CachedData(offset & ~CachePage::kLineMask);
if (cache_hit) {
// Check that the data in memory matches the contents of the I-cache.
CHECK(memcmp(reinterpret_cast<void*>(instr),
cache_page->CachedData(offset),
Instruction::kInstrSize) == 0);
CHECK_EQ(0, memcmp(reinterpret_cast<void*>(instr),
cache_page->CachedData(offset),
Instruction::kInstrSize));
} else {
// Cache miss. Load memory into the cache.
OS::MemCopy(cached_line, line, CachePage::kLineLength);

View File

@ -265,7 +265,7 @@ class Simulator {
inline int GetCarry() {
return c_flag_ ? 1 : 0;
};
}
// Support for VFP.
void Compute_FPSCR_Flags(double val1, double val2);

View File

@ -293,7 +293,7 @@ inline Condition ReverseConditionForCmp(Condition cond) {
// 'mi' for instance).
UNREACHABLE();
return nv;
};
}
}
enum FlagsUpdate {

View File

@ -32,7 +32,7 @@ class CacheLineSizes {
__asm__ __volatile__ ("mrs %[ctr], ctr_el0" // NOLINT
: [ctr] "=r" (cache_type_register_));
#endif
};
}
uint32_t icache_line_size() const { return ExtractCacheLineSize(0); }
uint32_t dcache_line_size() const { return ExtractCacheLineSize(16); }

View File

@ -25,7 +25,7 @@ class CpuFeatures : public AllStatic {
static bool IsSupported(CpuFeature f) {
ASSERT(initialized_);
return Check(f, supported_);
};
}
static bool IsSafeForSnapshot(Isolate* isolate, CpuFeature f) {
return IsSupported(f);

View File

@ -2452,7 +2452,7 @@ class LStoreKeyedExternal V8_FINAL : public LStoreKeyed<1> {
LOperand* temp) :
LStoreKeyed<1>(elements, key, value) {
temps_[0] = temp;
};
}
LOperand* temp() { return temps_[0]; }
@ -2466,7 +2466,7 @@ class LStoreKeyedFixed V8_FINAL : public LStoreKeyed<1> {
LOperand* temp) :
LStoreKeyed<1>(elements, key, value) {
temps_[0] = temp;
};
}
LOperand* temp() { return temps_[0]; }
@ -2480,7 +2480,7 @@ class LStoreKeyedFixedDouble V8_FINAL : public LStoreKeyed<1> {
LOperand* temp) :
LStoreKeyed<1>(elements, key, value) {
temps_[0] = temp;
};
}
LOperand* temp() { return temps_[0]; }

View File

@ -116,7 +116,7 @@ class DontEmitDebugCodeScope BASE_EMBEDDED {
}
~DontEmitDebugCodeScope() {
assembler_->set_emit_debug_code(old_value_);
};
}
private:
AssemblerBase* assembler_;
bool old_value_;

View File

@ -265,11 +265,12 @@ class HistogramTimerScope BASE_EMBEDDED {
} else {
timer_->Start();
}
}
#else
: timer_(timer) {
timer_->Start();
#endif
}
#endif
~HistogramTimerScope() {
#ifdef DEBUG
if (!skipped_timer_start_) {
@ -279,6 +280,7 @@ class HistogramTimerScope BASE_EMBEDDED {
timer_->Stop();
#endif
}
private:
HistogramTimer* timer_;
#ifdef DEBUG

View File

@ -112,7 +112,7 @@ template<ElementsKind Kind> class ElementsKindTraits {
#define ELEMENTS_TRAITS(Class, KindParam, Store) \
template<> class ElementsKindTraits<KindParam> { \
public: \
public: /* NOLINT */ \
static const ElementsKind Kind = KindParam; \
typedef Store BackingStore; \
};

View File

@ -216,7 +216,7 @@ class FullCodeGenerator: public AstVisitor {
++(*context_length);
}
return previous_;
};
}
};
// The try block of a try/catch statement.

View File

@ -6406,7 +6406,7 @@ class ArrayInstructionInterface {
virtual int MaxIndexOffsetBits() = 0;
virtual bool IsDehoisted() = 0;
virtual void SetDehoisted(bool is_dehoisted) = 0;
virtual ~ArrayInstructionInterface() { };
virtual ~ArrayInstructionInterface() { }
static Representation KeyedAccessIndexRequirement(Representation r) {
return r.IsInteger32() || SmiValuesAre32Bits()

View File

@ -331,7 +331,7 @@ inline Condition ReverseCondition(Condition cc) {
return greater_equal;
default:
return cc;
};
}
}

View File

@ -896,10 +896,10 @@ class Assembler : public AssemblerBase {
assem_->EndBlockGrowBuffer();
}
private:
Assembler* assem_;
private:
Assembler* assem_;
DISALLOW_IMPLICIT_CONSTRUCTORS(BlockGrowBufferScope);
DISALLOW_IMPLICIT_CONSTRUCTORS(BlockGrowBufferScope);
};
// Debugging.

View File

@ -151,7 +151,7 @@ bool Instruction::IsForbiddenInBranchDelay() const {
return true;
default:
return false;
};
}
break;
case SPECIAL:
switch (FunctionFieldRaw()) {
@ -160,11 +160,11 @@ bool Instruction::IsForbiddenInBranchDelay() const {
return true;
default:
return false;
};
}
break;
default:
return false;
};
}
}
@ -180,17 +180,17 @@ bool Instruction::IsLinkingInstruction() const {
return true;
default:
return false;
};
}
case SPECIAL:
switch (FunctionFieldRaw()) {
case JALR:
return true;
default:
return false;
};
}
default:
return false;
};
}
}
@ -209,7 +209,7 @@ bool Instruction::IsTrap() const {
return true;
default:
return false;
};
}
}
}
@ -255,7 +255,7 @@ Instruction::Type Instruction::InstructionType() const {
return kRegisterType;
default:
return kUnsupported;
};
}
break;
case SPECIAL2:
switch (FunctionFieldRaw()) {
@ -264,7 +264,7 @@ Instruction::Type Instruction::InstructionType() const {
return kRegisterType;
default:
return kUnsupported;
};
}
break;
case SPECIAL3:
switch (FunctionFieldRaw()) {
@ -273,7 +273,7 @@ Instruction::Type Instruction::InstructionType() const {
return kRegisterType;
default:
return kUnsupported;
};
}
break;
case COP1: // Coprocessor instructions.
switch (RsFieldRawNoAssert()) {
@ -281,7 +281,7 @@ Instruction::Type Instruction::InstructionType() const {
return kImmediateType;
default:
return kRegisterType;
};
}
break;
case COP1X:
return kRegisterType;
@ -326,7 +326,7 @@ Instruction::Type Instruction::InstructionType() const {
return kJumpType;
default:
return kUnsupported;
};
}
return kUnsupported;
}

View File

@ -524,7 +524,7 @@ inline Condition ReverseCondition(Condition cc) {
return greater_equal;
default:
return cc;
};
}
}

View File

@ -277,7 +277,7 @@ void Decoder::PrintCode(Instruction* instr) {
}
default: // Not a break or trap instruction.
break;
};
}
}
@ -407,7 +407,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) {
PrintCc(instr);
return 2;
}
};
}
UNREACHABLE();
return -1;
}
@ -603,7 +603,7 @@ void Decoder::DecodeTypeRegister(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
case SPECIAL:
switch (instr->FunctionFieldRaw()) {
@ -796,7 +796,7 @@ void Decoder::DecodeTypeImmediate(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break; // Case COP1.
case REGIMM:
switch (instr->RtFieldRaw()) {
@ -909,7 +909,7 @@ void Decoder::DecodeTypeImmediate(Instruction* instr) {
default:
UNREACHABLE();
break;
};
}
}

View File

@ -1194,7 +1194,7 @@ void MacroAssembler::BranchF(Label* target,
break;
default:
CHECK(0);
};
}
}
if (bd == PROTECT) {

View File

@ -734,7 +734,7 @@ class MacroAssembler: public Assembler {
FPURegister cmp1,
FPURegister cmp2) {
BranchF(target, nan, cc, cmp1, cmp2, bd);
};
}
// Truncates a double using a specific rounding mode, and writes the value
// to the result register.

View File

@ -840,9 +840,9 @@ void Simulator::CheckICache(v8::internal::HashMap* i_cache,
char* cached_line = cache_page->CachedData(offset & ~CachePage::kLineMask);
if (cache_hit) {
// Check that the data in memory matches the contents of the I-cache.
CHECK(memcmp(reinterpret_cast<void*>(instr),
cache_page->CachedData(offset),
Instruction::kInstrSize) == 0);
CHECK_EQ(0, memcmp(reinterpret_cast<void*>(instr),
cache_page->CachedData(offset),
Instruction::kInstrSize));
} else {
// Cache miss. Load memory into the cache.
OS::MemCopy(cached_line, line, CachePage::kLineLength);
@ -1762,7 +1762,7 @@ void Simulator::ConfigureTypeRegister(Instruction* instr,
break;
default:
UNIMPLEMENTED_MIPS();
};
}
break;
case COP1X:
break;
@ -1899,7 +1899,7 @@ void Simulator::ConfigureTypeRegister(Instruction* instr,
break;
default:
UNREACHABLE();
};
}
break;
case SPECIAL2:
switch (instr->FunctionFieldRaw()) {
@ -1915,7 +1915,7 @@ void Simulator::ConfigureTypeRegister(Instruction* instr,
break;
default:
UNREACHABLE();
};
}
break;
case SPECIAL3:
switch (instr->FunctionFieldRaw()) {
@ -1941,11 +1941,11 @@ void Simulator::ConfigureTypeRegister(Instruction* instr,
}
default:
UNREACHABLE();
};
}
break;
default:
UNREACHABLE();
};
}
}
@ -2204,7 +2204,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
case L:
switch (instr->FunctionFieldRaw()) {
@ -2226,7 +2226,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
case COP1X:
switch (instr->FunctionFieldRaw()) {
@ -2239,7 +2239,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
case SPECIAL:
switch (instr->FunctionFieldRaw()) {
@ -2320,7 +2320,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
break;
default: // For other special opcodes we do the default operation.
set_register(rd_reg, alu_out);
};
}
break;
case SPECIAL2:
switch (instr->FunctionFieldRaw()) {
@ -2346,14 +2346,14 @@ void Simulator::DecodeTypeRegister(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
// Unimplemented opcodes raised an error in the configuration step before,
// so we can use the default here to set the destination register in common
// cases.
default:
set_register(rd_reg, alu_out);
};
}
}
@ -2414,7 +2414,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
break;
// ------------- REGIMM class.
case REGIMM:
@ -2433,7 +2433,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
switch (instr->RtFieldRaw()) {
case BLTZ:
case BLTZAL:
@ -2452,7 +2452,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) {
}
default:
break;
};
}
break; // case REGIMM.
// ------------- Branch instructions.
// When comparing to zero, the encoding of rt field is always 0, so we don't
@ -2585,7 +2585,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) {
break;
default:
UNREACHABLE();
};
}
// ---------- Raise exceptions triggered.
SignalExceptions();
@ -2661,7 +2661,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) {
break;
default:
break;
};
}
if (execute_branch_delay_instruction) {

View File

@ -5086,13 +5086,13 @@ class FixedTypedArray: public FixedTypedArrayBase {
#define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \
class Type##ArrayTraits { \
public: \
typedef elementType ElementType; \
static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \
static const char* Designator() { return #type " array"; } \
static inline Handle<Object> ToHandle(Isolate* isolate, \
elementType scalar); \
static inline elementType defaultValue(); \
public: /* NOLINT */ \
typedef elementType ElementType; \
static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \
static const char* Designator() { return #type " array"; } \
static inline Handle<Object> ToHandle(Isolate* isolate, \
elementType scalar); \
static inline elementType defaultValue(); \
}; \
\
typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array;

View File

@ -58,7 +58,7 @@ class SingletonLogger : public ParserRecorder {
literals_ = literals;
properties_ = properties;
strict_mode_ = strict_mode;
};
}
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector

View File

@ -192,7 +192,7 @@ class PrintablePrinter {
buffer_[0] = '\0';
}
return &buffer_[0];
};
}
private:
uc16 character_;

View File

@ -347,7 +347,7 @@ inline Condition ReverseCondition(Condition cc) {
return greater_equal;
default:
return cc;
};
}
}

View File

@ -22148,152 +22148,152 @@ class ApiCallOptimizationChecker {
info.GetReturnValue().Set(v8_str("returned"));
}
public:
enum SignatureType {
kNoSignature,
kSignatureOnReceiver,
kSignatureOnPrototype
};
public:
enum SignatureType {
kNoSignature,
kSignatureOnReceiver,
kSignatureOnPrototype
};
void RunAll() {
SignatureType signature_types[] =
{kNoSignature, kSignatureOnReceiver, kSignatureOnPrototype};
for (unsigned i = 0; i < ARRAY_SIZE(signature_types); i++) {
SignatureType signature_type = signature_types[i];
for (int j = 0; j < 2; j++) {
bool global = j == 0;
int key = signature_type +
ARRAY_SIZE(signature_types) * (global ? 1 : 0);
Run(signature_type, global, key);
}
void RunAll() {
SignatureType signature_types[] =
{kNoSignature, kSignatureOnReceiver, kSignatureOnPrototype};
for (unsigned i = 0; i < ARRAY_SIZE(signature_types); i++) {
SignatureType signature_type = signature_types[i];
for (int j = 0; j < 2; j++) {
bool global = j == 0;
int key = signature_type +
ARRAY_SIZE(signature_types) * (global ? 1 : 0);
Run(signature_type, global, key);
}
}
}
void Run(SignatureType signature_type, bool global, int key) {
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope scope(isolate);
// Build a template for signature checks.
Local<v8::ObjectTemplate> signature_template;
Local<v8::Signature> signature;
{
Local<v8::FunctionTemplate> parent_template =
FunctionTemplate::New(isolate);
parent_template->SetHiddenPrototype(true);
Local<v8::FunctionTemplate> function_template
= FunctionTemplate::New(isolate);
function_template->Inherit(parent_template);
switch (signature_type) {
case kNoSignature:
break;
case kSignatureOnReceiver:
signature = v8::Signature::New(isolate, function_template);
break;
case kSignatureOnPrototype:
signature = v8::Signature::New(isolate, parent_template);
break;
}
signature_template = function_template->InstanceTemplate();
void Run(SignatureType signature_type, bool global, int key) {
v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope scope(isolate);
// Build a template for signature checks.
Local<v8::ObjectTemplate> signature_template;
Local<v8::Signature> signature;
{
Local<v8::FunctionTemplate> parent_template =
FunctionTemplate::New(isolate);
parent_template->SetHiddenPrototype(true);
Local<v8::FunctionTemplate> function_template
= FunctionTemplate::New(isolate);
function_template->Inherit(parent_template);
switch (signature_type) {
case kNoSignature:
break;
case kSignatureOnReceiver:
signature = v8::Signature::New(isolate, function_template);
break;
case kSignatureOnPrototype:
signature = v8::Signature::New(isolate, parent_template);
break;
}
// Global object must pass checks.
Local<v8::Context> context =
v8::Context::New(isolate, NULL, signature_template);
v8::Context::Scope context_scope(context);
// Install regular object that can pass signature checks.
Local<Object> function_receiver = signature_template->NewInstance();
context->Global()->Set(v8_str("function_receiver"), function_receiver);
// Get the holder objects.
Local<Object> inner_global =
Local<Object>::Cast(context->Global()->GetPrototype());
// Install functions on hidden prototype object if there is one.
data = Object::New(isolate);
Local<FunctionTemplate> function_template = FunctionTemplate::New(
isolate, OptimizationCallback, data, signature);
Local<Function> function = function_template->GetFunction();
Local<Object> global_holder = inner_global;
Local<Object> function_holder = function_receiver;
if (signature_type == kSignatureOnPrototype) {
function_holder = Local<Object>::Cast(function_holder->GetPrototype());
global_holder = Local<Object>::Cast(global_holder->GetPrototype());
}
global_holder->Set(v8_str("g_f"), function);
global_holder->SetAccessorProperty(v8_str("g_acc"), function, function);
function_holder->Set(v8_str("f"), function);
function_holder->SetAccessorProperty(v8_str("acc"), function, function);
// Initialize expected values.
callee = function;
count = 0;
if (global) {
receiver = context->Global();
holder = inner_global;
} else {
holder = function_receiver;
// If not using a signature, add something else to the prototype chain
// to test the case that holder != receiver
if (signature_type == kNoSignature) {
receiver = Local<Object>::Cast(CompileRun(
"var receiver_subclass = {};\n"
"receiver_subclass.__proto__ = function_receiver;\n"
"receiver_subclass"));
} else {
receiver = Local<Object>::Cast(CompileRun(
"var receiver_subclass = function_receiver;\n"
signature_template = function_template->InstanceTemplate();
}
// Global object must pass checks.
Local<v8::Context> context =
v8::Context::New(isolate, NULL, signature_template);
v8::Context::Scope context_scope(context);
// Install regular object that can pass signature checks.
Local<Object> function_receiver = signature_template->NewInstance();
context->Global()->Set(v8_str("function_receiver"), function_receiver);
// Get the holder objects.
Local<Object> inner_global =
Local<Object>::Cast(context->Global()->GetPrototype());
// Install functions on hidden prototype object if there is one.
data = Object::New(isolate);
Local<FunctionTemplate> function_template = FunctionTemplate::New(
isolate, OptimizationCallback, data, signature);
Local<Function> function = function_template->GetFunction();
Local<Object> global_holder = inner_global;
Local<Object> function_holder = function_receiver;
if (signature_type == kSignatureOnPrototype) {
function_holder = Local<Object>::Cast(function_holder->GetPrototype());
global_holder = Local<Object>::Cast(global_holder->GetPrototype());
}
global_holder->Set(v8_str("g_f"), function);
global_holder->SetAccessorProperty(v8_str("g_acc"), function, function);
function_holder->Set(v8_str("f"), function);
function_holder->SetAccessorProperty(v8_str("acc"), function, function);
// Initialize expected values.
callee = function;
count = 0;
if (global) {
receiver = context->Global();
holder = inner_global;
} else {
holder = function_receiver;
// If not using a signature, add something else to the prototype chain
// to test the case that holder != receiver
if (signature_type == kNoSignature) {
receiver = Local<Object>::Cast(CompileRun(
"var receiver_subclass = {};\n"
"receiver_subclass.__proto__ = function_receiver;\n"
"receiver_subclass"));
}
}
// With no signature, the holder is not set.
if (signature_type == kNoSignature) holder = receiver;
// build wrap_function
i::ScopedVector<char> wrap_function(200);
if (global) {
i::OS::SNPrintF(
wrap_function,
"function wrap_f_%d() { var f = g_f; return f(); }\n"
"function wrap_get_%d() { return this.g_acc; }\n"
"function wrap_set_%d() { return this.g_acc = 1; }\n",
key, key, key);
} else {
i::OS::SNPrintF(
wrap_function,
"function wrap_f_%d() { return receiver_subclass.f(); }\n"
"function wrap_get_%d() { return receiver_subclass.acc; }\n"
"function wrap_set_%d() { return receiver_subclass.acc = 1; }\n",
key, key, key);
receiver = Local<Object>::Cast(CompileRun(
"var receiver_subclass = function_receiver;\n"
"receiver_subclass"));
}
// build source string
i::ScopedVector<char> source(1000);
i::OS::SNPrintF(
source,
"%s\n" // wrap functions
"function wrap_f() { return wrap_f_%d(); }\n"
"function wrap_get() { return wrap_get_%d(); }\n"
"function wrap_set() { return wrap_set_%d(); }\n"
"check = function(returned) {\n"
" if (returned !== 'returned') { throw returned; }\n"
"}\n"
"\n"
"check(wrap_f());\n"
"check(wrap_f());\n"
"%%OptimizeFunctionOnNextCall(wrap_f_%d);\n"
"check(wrap_f());\n"
"\n"
"check(wrap_get());\n"
"check(wrap_get());\n"
"%%OptimizeFunctionOnNextCall(wrap_get_%d);\n"
"check(wrap_get());\n"
"\n"
"check = function(returned) {\n"
" if (returned !== 1) { throw returned; }\n"
"}\n"
"check(wrap_set());\n"
"check(wrap_set());\n"
"%%OptimizeFunctionOnNextCall(wrap_set_%d);\n"
"check(wrap_set());\n",
wrap_function.start(), key, key, key, key, key, key);
v8::TryCatch try_catch;
CompileRun(source.start());
ASSERT(!try_catch.HasCaught());
CHECK_EQ(9, count);
}
// With no signature, the holder is not set.
if (signature_type == kNoSignature) holder = receiver;
// build wrap_function
i::ScopedVector<char> wrap_function(200);
if (global) {
i::OS::SNPrintF(
wrap_function,
"function wrap_f_%d() { var f = g_f; return f(); }\n"
"function wrap_get_%d() { return this.g_acc; }\n"
"function wrap_set_%d() { return this.g_acc = 1; }\n",
key, key, key);
} else {
i::OS::SNPrintF(
wrap_function,
"function wrap_f_%d() { return receiver_subclass.f(); }\n"
"function wrap_get_%d() { return receiver_subclass.acc; }\n"
"function wrap_set_%d() { return receiver_subclass.acc = 1; }\n",
key, key, key);
}
// build source string
i::ScopedVector<char> source(1000);
i::OS::SNPrintF(
source,
"%s\n" // wrap functions
"function wrap_f() { return wrap_f_%d(); }\n"
"function wrap_get() { return wrap_get_%d(); }\n"
"function wrap_set() { return wrap_set_%d(); }\n"
"check = function(returned) {\n"
" if (returned !== 'returned') { throw returned; }\n"
"}\n"
"\n"
"check(wrap_f());\n"
"check(wrap_f());\n"
"%%OptimizeFunctionOnNextCall(wrap_f_%d);\n"
"check(wrap_f());\n"
"\n"
"check(wrap_get());\n"
"check(wrap_get());\n"
"%%OptimizeFunctionOnNextCall(wrap_get_%d);\n"
"check(wrap_get());\n"
"\n"
"check = function(returned) {\n"
" if (returned !== 1) { throw returned; }\n"
"}\n"
"check(wrap_set());\n"
"check(wrap_set());\n"
"%%OptimizeFunctionOnNextCall(wrap_set_%d);\n"
"check(wrap_set());\n",
wrap_function.start(), key, key, key, key, key, key);
v8::TryCatch try_catch;
CompileRun(source.start());
ASSERT(!try_catch.HasCaught());
CHECK_EQ(9, count);
}
};

View File

@ -37,7 +37,7 @@ using namespace ::v8::internal;
class WaitAndSignalThread V8_FINAL : public Thread {
public:
public:
explicit WaitAndSignalThread(Semaphore* semaphore)
: Thread("WaitAndSignalThread"), semaphore_(semaphore) {}
virtual ~WaitAndSignalThread() {}
@ -52,7 +52,7 @@ class WaitAndSignalThread V8_FINAL : public Thread {
}
}
private:
private:
Semaphore* semaphore_;
};
@ -115,7 +115,7 @@ static Semaphore used_space(0);
class ProducerThread V8_FINAL : public Thread {
public:
public:
ProducerThread() : Thread("ProducerThread") {}
virtual ~ProducerThread() {}
@ -130,7 +130,7 @@ class ProducerThread V8_FINAL : public Thread {
class ConsumerThread V8_FINAL : public Thread {
public:
public:
ConsumerThread() : Thread("ConsumerThread") {}
virtual ~ConsumerThread() {}

View File

@ -393,7 +393,7 @@ TEST(LargeObjectSpace) {
if (allocation.IsRetry()) break;
}
CHECK(lo->Available() < available);
};
}
CHECK(!lo->IsEmpty());

View File

@ -48,6 +48,8 @@ from subprocess import PIPE
# Disabled LINT rules and reason.
# build/include_what_you_use: Started giving false positives for variables
# named "string" and "map" assuming that you needed to include STL headers.
# runtime/references: Started giving a lot of positives after depot-tools
# update. To be fixed soon: v8:3326.
ENABLED_LINT_RULES = """
build/class
@ -80,7 +82,6 @@ runtime/mutex
runtime/nonconf
runtime/printf
runtime/printf_format
runtime/references
runtime/rtti
runtime/sizeof
runtime/string