| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index 9e42c4109db38bb8481bbe8fe18978388d43aef2..09459e4e35bece6c6870c904683d5f2683d9ebe6 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -40,13 +40,13 @@ class JumpPatchSite BASE_EMBEDDED {
|
| }
|
|
|
| ~JumpPatchSite() {
|
| - ASSERT(patch_site_.is_bound() == info_emitted_);
|
| + DCHECK(patch_site_.is_bound() == info_emitted_);
|
| }
|
|
|
| // When initially emitting this ensure that a jump is always generated to skip
|
| // the inlined smi code.
|
| void EmitJumpIfNotSmi(Register reg, Label* target) {
|
| - ASSERT(!patch_site_.is_bound() && !info_emitted_);
|
| + DCHECK(!patch_site_.is_bound() && !info_emitted_);
|
| Assembler::BlockConstPoolScope block_const_pool(masm_);
|
| __ bind(&patch_site_);
|
| __ cmp(reg, Operand(reg));
|
| @@ -56,7 +56,7 @@ class JumpPatchSite BASE_EMBEDDED {
|
| // When initially emitting this ensure that a jump is never generated to skip
|
| // the inlined smi code.
|
| void EmitJumpIfSmi(Register reg, Label* target) {
|
| - ASSERT(!patch_site_.is_bound() && !info_emitted_);
|
| + DCHECK(!patch_site_.is_bound() && !info_emitted_);
|
| Assembler::BlockConstPoolScope block_const_pool(masm_);
|
| __ bind(&patch_site_);
|
| __ cmp(reg, Operand(reg));
|
| @@ -152,7 +152,7 @@ void FullCodeGenerator::Generate() {
|
| { Comment cmnt(masm_, "[ Allocate locals");
|
| int locals_count = info->scope()->num_stack_slots();
|
| // Generators allocate locals, if any, in context slots.
|
| - ASSERT(!info->function()->is_generator() || locals_count == 0);
|
| + DCHECK(!info->function()->is_generator() || locals_count == 0);
|
| if (locals_count > 0) {
|
| if (locals_count >= 128) {
|
| Label ok;
|
| @@ -292,9 +292,9 @@ void FullCodeGenerator::Generate() {
|
| // constant.
|
| if (scope()->is_function_scope() && scope()->function() != NULL) {
|
| VariableDeclaration* function = scope()->function();
|
| - ASSERT(function->proxy()->var()->mode() == CONST ||
|
| + DCHECK(function->proxy()->var()->mode() == CONST ||
|
| function->proxy()->var()->mode() == CONST_LEGACY);
|
| - ASSERT(function->proxy()->var()->location() != Variable::UNALLOCATED);
|
| + DCHECK(function->proxy()->var()->location() != Variable::UNALLOCATED);
|
| VisitVariableDeclaration(function);
|
| }
|
| VisitDeclarations(scope()->declarations());
|
| @@ -314,9 +314,9 @@ void FullCodeGenerator::Generate() {
|
| }
|
|
|
| { Comment cmnt(masm_, "[ Body");
|
| - ASSERT(loop_depth() == 0);
|
| + DCHECK(loop_depth() == 0);
|
| VisitStatements(function()->body());
|
| - ASSERT(loop_depth() == 0);
|
| + DCHECK(loop_depth() == 0);
|
| }
|
| }
|
|
|
| @@ -363,7 +363,7 @@ void FullCodeGenerator::EmitProfilingCounterReset() {
|
| __ mov(r2, Operand(profiling_counter_));
|
| // The mov instruction above can be either 1, 2 or 3 instructions depending
|
| // upon whether it is an extended constant pool - insert nop to compensate.
|
| - ASSERT(masm_->InstructionsGeneratedSince(&start) <= 3);
|
| + DCHECK(masm_->InstructionsGeneratedSince(&start) <= 3);
|
| while (masm_->InstructionsGeneratedSince(&start) != 3) {
|
| __ nop();
|
| }
|
| @@ -379,7 +379,7 @@ void FullCodeGenerator::EmitBackEdgeBookkeeping(IterationStatement* stmt,
|
| Assembler::BlockConstPoolScope block_const_pool(masm_);
|
| Label ok;
|
|
|
| - ASSERT(back_edge_target->is_bound());
|
| + DCHECK(back_edge_target->is_bound());
|
| int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target);
|
| int weight = Min(kMaxBackEdgeWeight,
|
| Max(1, distance / kCodeSizeMultiplier));
|
| @@ -456,7 +456,7 @@ void FullCodeGenerator::EmitReturnSequence() {
|
| #ifdef DEBUG
|
| // Check that the size of the code used for returning is large enough
|
| // for the debugger's requirements.
|
| - ASSERT(Assembler::kJSReturnSequenceInstructions <=
|
| + DCHECK(Assembler::kJSReturnSequenceInstructions <=
|
| masm_->InstructionsGeneratedSince(&check_exit_codesize));
|
| #endif
|
| }
|
| @@ -464,25 +464,25 @@ void FullCodeGenerator::EmitReturnSequence() {
|
|
|
|
|
| void FullCodeGenerator::EffectContext::Plug(Variable* var) const {
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| }
|
|
|
|
|
| void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const {
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| codegen()->GetVar(result_register(), var);
|
| }
|
|
|
|
|
| void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| codegen()->GetVar(result_register(), var);
|
| __ push(result_register());
|
| }
|
|
|
|
|
| void FullCodeGenerator::TestContext::Plug(Variable* var) const {
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| // For simplicity we always test the accumulator register.
|
| codegen()->GetVar(result_register(), var);
|
| codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL);
|
| @@ -547,7 +547,7 @@ void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
|
| true,
|
| true_label_,
|
| false_label_);
|
| - ASSERT(!lit->IsUndetectableObject()); // There are no undetectable literals.
|
| + DCHECK(!lit->IsUndetectableObject()); // There are no undetectable literals.
|
| if (lit->IsUndefined() || lit->IsNull() || lit->IsFalse()) {
|
| if (false_label_ != fall_through_) __ b(false_label_);
|
| } else if (lit->IsTrue() || lit->IsJSObject()) {
|
| @@ -574,7 +574,7 @@ void FullCodeGenerator::TestContext::Plug(Handle<Object> lit) const {
|
|
|
| void FullCodeGenerator::EffectContext::DropAndPlug(int count,
|
| Register reg) const {
|
| - ASSERT(count > 0);
|
| + DCHECK(count > 0);
|
| __ Drop(count);
|
| }
|
|
|
| @@ -582,7 +582,7 @@ void FullCodeGenerator::EffectContext::DropAndPlug(int count,
|
| void FullCodeGenerator::AccumulatorValueContext::DropAndPlug(
|
| int count,
|
| Register reg) const {
|
| - ASSERT(count > 0);
|
| + DCHECK(count > 0);
|
| __ Drop(count);
|
| __ Move(result_register(), reg);
|
| }
|
| @@ -590,7 +590,7 @@ void FullCodeGenerator::AccumulatorValueContext::DropAndPlug(
|
|
|
| void FullCodeGenerator::StackValueContext::DropAndPlug(int count,
|
| Register reg) const {
|
| - ASSERT(count > 0);
|
| + DCHECK(count > 0);
|
| if (count > 1) __ Drop(count - 1);
|
| __ str(reg, MemOperand(sp, 0));
|
| }
|
| @@ -598,7 +598,7 @@ void FullCodeGenerator::StackValueContext::DropAndPlug(int count,
|
|
|
| void FullCodeGenerator::TestContext::DropAndPlug(int count,
|
| Register reg) const {
|
| - ASSERT(count > 0);
|
| + DCHECK(count > 0);
|
| // For simplicity we always test the accumulator register.
|
| __ Drop(count);
|
| __ Move(result_register(), reg);
|
| @@ -609,7 +609,7 @@ void FullCodeGenerator::TestContext::DropAndPlug(int count,
|
|
|
| void FullCodeGenerator::EffectContext::Plug(Label* materialize_true,
|
| Label* materialize_false) const {
|
| - ASSERT(materialize_true == materialize_false);
|
| + DCHECK(materialize_true == materialize_false);
|
| __ bind(materialize_true);
|
| }
|
|
|
| @@ -643,8 +643,8 @@ void FullCodeGenerator::StackValueContext::Plug(
|
|
|
| void FullCodeGenerator::TestContext::Plug(Label* materialize_true,
|
| Label* materialize_false) const {
|
| - ASSERT(materialize_true == true_label_);
|
| - ASSERT(materialize_false == false_label_);
|
| + DCHECK(materialize_true == true_label_);
|
| + DCHECK(materialize_false == false_label_);
|
| }
|
|
|
|
|
| @@ -707,7 +707,7 @@ void FullCodeGenerator::Split(Condition cond,
|
|
|
|
|
| MemOperand FullCodeGenerator::StackOperand(Variable* var) {
|
| - ASSERT(var->IsStackAllocated());
|
| + DCHECK(var->IsStackAllocated());
|
| // Offset is negative because higher indexes are at lower addresses.
|
| int offset = -var->index() * kPointerSize;
|
| // Adjust by a (parameter or local) base offset.
|
| @@ -721,7 +721,7 @@ MemOperand FullCodeGenerator::StackOperand(Variable* var) {
|
|
|
|
|
| MemOperand FullCodeGenerator::VarOperand(Variable* var, Register scratch) {
|
| - ASSERT(var->IsContextSlot() || var->IsStackAllocated());
|
| + DCHECK(var->IsContextSlot() || var->IsStackAllocated());
|
| if (var->IsContextSlot()) {
|
| int context_chain_length = scope()->ContextChainLength(var->scope());
|
| __ LoadContext(scratch, context_chain_length);
|
| @@ -743,10 +743,10 @@ void FullCodeGenerator::SetVar(Variable* var,
|
| Register src,
|
| Register scratch0,
|
| Register scratch1) {
|
| - ASSERT(var->IsContextSlot() || var->IsStackAllocated());
|
| - ASSERT(!scratch0.is(src));
|
| - ASSERT(!scratch0.is(scratch1));
|
| - ASSERT(!scratch1.is(src));
|
| + DCHECK(var->IsContextSlot() || var->IsStackAllocated());
|
| + DCHECK(!scratch0.is(src));
|
| + DCHECK(!scratch0.is(scratch1));
|
| + DCHECK(!scratch1.is(src));
|
| MemOperand location = VarOperand(var, scratch0);
|
| __ str(src, location);
|
|
|
| @@ -786,7 +786,7 @@ void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
|
| void FullCodeGenerator::EmitDebugCheckDeclarationContext(Variable* variable) {
|
| // The variable in the declaration always resides in the current function
|
| // context.
|
| - ASSERT_EQ(0, scope()->ContextChainLength(variable->scope()));
|
| + DCHECK_EQ(0, scope()->ContextChainLength(variable->scope()));
|
| if (generate_debug_code_) {
|
| // Check that we're not inside a with or catch context.
|
| __ ldr(r1, FieldMemOperand(cp, HeapObject::kMapOffset));
|
| @@ -840,7 +840,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
|
| Comment cmnt(masm_, "[ VariableDeclaration");
|
| __ mov(r2, Operand(variable->name()));
|
| // Declaration nodes are always introduced in one of four modes.
|
| - ASSERT(IsDeclaredVariableMode(mode));
|
| + DCHECK(IsDeclaredVariableMode(mode));
|
| PropertyAttributes attr =
|
| IsImmutableVariableMode(mode) ? READ_ONLY : NONE;
|
| __ mov(r1, Operand(Smi::FromInt(attr)));
|
| @@ -920,8 +920,8 @@ void FullCodeGenerator::VisitFunctionDeclaration(
|
|
|
| void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
|
| Variable* variable = declaration->proxy()->var();
|
| - ASSERT(variable->location() == Variable::CONTEXT);
|
| - ASSERT(variable->interface()->IsFrozen());
|
| + DCHECK(variable->location() == Variable::CONTEXT);
|
| + DCHECK(variable->interface()->IsFrozen());
|
|
|
| Comment cmnt(masm_, "[ ModuleDeclaration");
|
| EmitDebugCheckDeclarationContext(variable);
|
| @@ -1410,7 +1410,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
|
|
|
| MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
|
| Label* slow) {
|
| - ASSERT(var->IsContextSlot());
|
| + DCHECK(var->IsContextSlot());
|
| Register context = cp;
|
| Register next = r3;
|
| Register temp = r4;
|
| @@ -1505,7 +1505,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| // always looked up dynamically, i.e. in that case
|
| // var->location() == LOOKUP.
|
| // always holds.
|
| - ASSERT(var->scope() != NULL);
|
| + DCHECK(var->scope() != NULL);
|
|
|
| // Check if the binding really needs an initialization check. The check
|
| // can be skipped in the following situation: we have a LET or CONST
|
| @@ -1528,8 +1528,8 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| skip_init_check = false;
|
| } else {
|
| // Check that we always have valid source position.
|
| - ASSERT(var->initializer_position() != RelocInfo::kNoPosition);
|
| - ASSERT(proxy->position() != RelocInfo::kNoPosition);
|
| + DCHECK(var->initializer_position() != RelocInfo::kNoPosition);
|
| + DCHECK(proxy->position() != RelocInfo::kNoPosition);
|
| skip_init_check = var->mode() != CONST_LEGACY &&
|
| var->initializer_position() < proxy->position();
|
| }
|
| @@ -1549,7 +1549,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| __ bind(&done);
|
| } else {
|
| // Uninitalized const bindings outside of harmony mode are unholed.
|
| - ASSERT(var->mode() == CONST_LEGACY);
|
| + DCHECK(var->mode() == CONST_LEGACY);
|
| __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq);
|
| }
|
| context()->Plug(r0);
|
| @@ -1688,13 +1688,13 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| case ObjectLiteral::Property::CONSTANT:
|
| UNREACHABLE();
|
| case ObjectLiteral::Property::MATERIALIZED_LITERAL:
|
| - ASSERT(!CompileTimeValue::IsCompileTimeValue(property->value()));
|
| + DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value()));
|
| // Fall through.
|
| case ObjectLiteral::Property::COMPUTED:
|
| if (key->value()->IsInternalizedString()) {
|
| if (property->emit_store()) {
|
| VisitForAccumulatorValue(value);
|
| - ASSERT(StoreIC::ValueRegister().is(r0));
|
| + DCHECK(StoreIC::ValueRegister().is(r0));
|
| __ mov(StoreIC::NameRegister(), Operand(key->value()));
|
| __ ldr(StoreIC::ReceiverRegister(), MemOperand(sp));
|
| CallStoreIC(key->LiteralFeedbackId());
|
| @@ -1754,7 +1754,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| }
|
|
|
| if (expr->has_function()) {
|
| - ASSERT(result_saved);
|
| + DCHECK(result_saved);
|
| __ ldr(r0, MemOperand(sp));
|
| __ push(r0);
|
| __ CallRuntime(Runtime::kToFastProperties, 1);
|
| @@ -1779,7 +1779,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
| ZoneList<Expression*>* subexprs = expr->values();
|
| int length = subexprs->length();
|
| Handle<FixedArray> constant_elements = expr->constant_elements();
|
| - ASSERT_EQ(2, constant_elements->length());
|
| + DCHECK_EQ(2, constant_elements->length());
|
| ElementsKind constant_elements_kind =
|
| static_cast<ElementsKind>(Smi::cast(constant_elements->get(0))->value());
|
| bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind);
|
| @@ -1851,7 +1851,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
|
|
|
|
|
| void FullCodeGenerator::VisitAssignment(Assignment* expr) {
|
| - ASSERT(expr->target()->IsValidReferenceExpression());
|
| + DCHECK(expr->target()->IsValidReferenceExpression());
|
|
|
| Comment cmnt(masm_, "[ Assignment");
|
|
|
| @@ -1981,7 +1981,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
|
|
| __ bind(&suspend);
|
| VisitForAccumulatorValue(expr->generator_object());
|
| - ASSERT(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
|
| + DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
|
| __ mov(r1, Operand(Smi::FromInt(continuation.pos())));
|
| __ str(r1, FieldMemOperand(r0, JSGeneratorObject::kContinuationOffset));
|
| __ str(cp, FieldMemOperand(r0, JSGeneratorObject::kContextOffset));
|
| @@ -2054,7 +2054,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| const int generator_object_depth = kPointerSize + handler_size;
|
| __ ldr(r0, MemOperand(sp, generator_object_depth));
|
| __ push(r0); // g
|
| - ASSERT(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos()));
|
| + DCHECK(l_continuation.pos() > 0 && Smi::IsValid(l_continuation.pos()));
|
| __ mov(r1, Operand(Smi::FromInt(l_continuation.pos())));
|
| __ str(r1, FieldMemOperand(r0, JSGeneratorObject::kContinuationOffset));
|
| __ str(cp, FieldMemOperand(r0, JSGeneratorObject::kContextOffset));
|
| @@ -2219,7 +2219,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
|
| __ push(r2);
|
| __ b(&push_operand_holes);
|
| __ bind(&call_resume);
|
| - ASSERT(!result_register().is(r1));
|
| + DCHECK(!result_register().is(r1));
|
| __ Push(r1, result_register());
|
| __ Push(Smi::FromInt(resume_mode));
|
| __ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
|
| @@ -2271,7 +2271,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
|
| __ pop(r2);
|
| __ mov(r3, Operand(isolate()->factory()->ToBoolean(done)));
|
| __ mov(r4, Operand(isolate()->factory()->empty_fixed_array()));
|
| - ASSERT_EQ(map->instance_size(), 5 * kPointerSize);
|
| + DCHECK_EQ(map->instance_size(), 5 * kPointerSize);
|
| __ str(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
|
| __ str(r4, FieldMemOperand(r0, JSObject::kPropertiesOffset));
|
| __ str(r4, FieldMemOperand(r0, JSObject::kElementsOffset));
|
| @@ -2421,7 +2421,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr,
|
|
|
|
|
| void FullCodeGenerator::EmitAssignment(Expression* expr) {
|
| - ASSERT(expr->IsValidReferenceExpression());
|
| + DCHECK(expr->IsValidReferenceExpression());
|
|
|
| // Left-hand side can only be a property, a global or a (parameter or local)
|
| // slot.
|
| @@ -2490,14 +2490,14 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
|
|
|
| } else if (op == Token::INIT_CONST_LEGACY) {
|
| // Const initializers need a write barrier.
|
| - ASSERT(!var->IsParameter()); // No const parameters.
|
| + DCHECK(!var->IsParameter()); // No const parameters.
|
| if (var->IsLookupSlot()) {
|
| __ push(r0);
|
| __ mov(r0, Operand(var->name()));
|
| __ Push(cp, r0); // Context and name.
|
| __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3);
|
| } else {
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| Label skip;
|
| MemOperand location = VarOperand(var, r1);
|
| __ ldr(r2, location);
|
| @@ -2509,8 +2509,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
|
|
|
| } else if (var->mode() == LET && op != Token::INIT_LET) {
|
| // Non-initializing assignment to let variable needs a write barrier.
|
| - ASSERT(!var->IsLookupSlot());
|
| - ASSERT(var->IsStackAllocated() || var->IsContextSlot());
|
| + DCHECK(!var->IsLookupSlot());
|
| + DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| Label assign;
|
| MemOperand location = VarOperand(var, r1);
|
| __ ldr(r3, location);
|
| @@ -2534,7 +2534,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
|
| } else {
|
| // Assignment to var or initializing assignment to let/const in harmony
|
| // mode.
|
| - ASSERT((var->IsStackAllocated() || var->IsContextSlot()));
|
| + DCHECK((var->IsStackAllocated() || var->IsContextSlot()));
|
| MemOperand location = VarOperand(var, r1);
|
| if (generate_debug_code_ && op == Token::INIT_LET) {
|
| // Check for an uninitialized let binding.
|
| @@ -2552,8 +2552,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) {
|
| void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
|
| // Assignment to a property, using a named store IC.
|
| Property* prop = expr->target()->AsProperty();
|
| - ASSERT(prop != NULL);
|
| - ASSERT(prop->key()->IsLiteral());
|
| + DCHECK(prop != NULL);
|
| + DCHECK(prop->key()->IsLiteral());
|
|
|
| // Record source code position before IC call.
|
| SetSourcePosition(expr->position());
|
| @@ -2572,7 +2572,7 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) {
|
| // Record source code position before IC call.
|
| SetSourcePosition(expr->position());
|
| __ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister());
|
| - ASSERT(KeyedStoreIC::ValueRegister().is(r0));
|
| + DCHECK(KeyedStoreIC::ValueRegister().is(r0));
|
|
|
| Handle<Code> ic = strict_mode() == SLOPPY
|
| ? isolate()->builtins()->KeyedStoreIC_Initialize()
|
| @@ -2634,7 +2634,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
| __ Push(isolate()->factory()->undefined_value());
|
| } else {
|
| // Load the function from the receiver.
|
| - ASSERT(callee->IsProperty());
|
| + DCHECK(callee->IsProperty());
|
| __ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
| EmitNamedPropertyLoad(callee->AsProperty());
|
| PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
| @@ -2657,7 +2657,7 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
| Expression* callee = expr->expression();
|
|
|
| // Load the function from the receiver.
|
| - ASSERT(callee->IsProperty());
|
| + DCHECK(callee->IsProperty());
|
| __ ldr(LoadIC::ReceiverRegister(), MemOperand(sp, 0));
|
| __ Move(LoadIC::NameRegister(), r0);
|
| EmitKeyedPropertyLoad(callee->AsProperty());
|
| @@ -2790,7 +2790,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| __ bind(&slow);
|
| // Call the runtime to find the function to call (returned in r0)
|
| // and the object holding it (returned in edx).
|
| - ASSERT(!context_register().is(r2));
|
| + DCHECK(!context_register().is(r2));
|
| __ mov(r2, Operand(proxy->name()));
|
| __ Push(context_register(), r2);
|
| __ CallRuntime(Runtime::kLoadLookupSlot, 2);
|
| @@ -2826,7 +2826,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
| EmitKeyedCallWithLoadIC(expr, property->key());
|
| }
|
| } else {
|
| - ASSERT(call_type == Call::OTHER_CALL);
|
| + DCHECK(call_type == Call::OTHER_CALL);
|
| // Call to an arbitrary expression not handled specially above.
|
| { PreservePositionScope scope(masm()->positions_recorder());
|
| VisitForStackValue(callee);
|
| @@ -2839,7 +2839,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|
|
| #ifdef DEBUG
|
| // RecordJSReturnSite should have been called.
|
| - ASSERT(expr->return_is_recorded_);
|
| + DCHECK(expr->return_is_recorded_);
|
| #endif
|
| }
|
|
|
| @@ -2873,7 +2873,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
| // Record call targets in unoptimized code.
|
| if (FLAG_pretenuring_call_new) {
|
| EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot());
|
| - ASSERT(expr->AllocationSiteFeedbackSlot() ==
|
| + DCHECK(expr->AllocationSiteFeedbackSlot() ==
|
| expr->CallNewFeedbackSlot() + 1);
|
| }
|
|
|
| @@ -2889,7 +2889,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
|
|
| void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -2910,7 +2910,7 @@ void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -2931,7 +2931,7 @@ void FullCodeGenerator::EmitIsNonNegativeSmi(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -2964,7 +2964,7 @@ void FullCodeGenerator::EmitIsObject(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -2986,7 +2986,7 @@ void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3011,7 +3011,7 @@ void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
|
| void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
|
| CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3099,7 +3099,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
|
|
|
| void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3121,7 +3121,7 @@ void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3147,7 +3147,7 @@ void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3169,7 +3169,7 @@ void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3191,7 +3191,7 @@ void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
|
|
|
|
|
| void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
|
| - ASSERT(expr->arguments()->length() == 0);
|
| + DCHECK(expr->arguments()->length() == 0);
|
|
|
| Label materialize_true, materialize_false;
|
| Label* if_true = NULL;
|
| @@ -3220,7 +3220,7 @@ void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
|
|
| // Load the two objects into registers and perform the comparison.
|
| VisitForStackValue(args->at(0));
|
| @@ -3244,7 +3244,7 @@ void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitArguments(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
|
|
| // ArgumentsAccessStub expects the key in edx and the formal
|
| // parameter count in r0.
|
| @@ -3258,7 +3258,7 @@ void FullCodeGenerator::EmitArguments(CallRuntime* expr) {
|
|
|
|
|
| void FullCodeGenerator::EmitArgumentsLength(CallRuntime* expr) {
|
| - ASSERT(expr->arguments()->length() == 0);
|
| + DCHECK(expr->arguments()->length() == 0);
|
|
|
| // Get the number of formal parameters.
|
| __ mov(r0, Operand(Smi::FromInt(info_->scope()->num_parameters())));
|
| @@ -3278,7 +3278,7 @@ void FullCodeGenerator::EmitArgumentsLength(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
| Label done, null, function, non_function_constructor;
|
|
|
| VisitForAccumulatorValue(args->at(0));
|
| @@ -3341,7 +3341,7 @@ void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
| // Load the arguments on the stack and call the stub.
|
| SubStringStub stub(isolate());
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 3);
|
| + DCHECK(args->length() == 3);
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
| VisitForStackValue(args->at(2));
|
| @@ -3354,7 +3354,7 @@ void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) {
|
| // Load the arguments on the stack and call the stub.
|
| RegExpExecStub stub(isolate());
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 4);
|
| + DCHECK(args->length() == 4);
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
| VisitForStackValue(args->at(2));
|
| @@ -3366,7 +3366,7 @@ void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
| VisitForAccumulatorValue(args->at(0)); // Load the object.
|
|
|
| Label done;
|
| @@ -3383,8 +3383,8 @@ void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| - ASSERT_NE(NULL, args->at(1)->AsLiteral());
|
| + DCHECK(args->length() == 2);
|
| + DCHECK_NE(NULL, args->at(1)->AsLiteral());
|
| Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value()));
|
|
|
| VisitForAccumulatorValue(args->at(0)); // Load the object.
|
| @@ -3430,7 +3430,7 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(3, args->length());
|
| + DCHECK_EQ(3, args->length());
|
|
|
| Register string = r0;
|
| Register index = r1;
|
| @@ -3463,7 +3463,7 @@ void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(3, args->length());
|
| + DCHECK_EQ(3, args->length());
|
|
|
| Register string = r0;
|
| Register index = r1;
|
| @@ -3499,7 +3499,7 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) {
|
| void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
|
| // Load the arguments on the stack and call the runtime function.
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
| MathPowStub stub(isolate(), MathPowStub::ON_STACK);
|
| @@ -3510,7 +3510,7 @@ void FullCodeGenerator::EmitMathPow(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
| VisitForStackValue(args->at(0)); // Load the object.
|
| VisitForAccumulatorValue(args->at(1)); // Load the value.
|
| __ pop(r1); // r0 = value. r1 = object.
|
| @@ -3538,7 +3538,7 @@ void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(args->length(), 1);
|
| + DCHECK_EQ(args->length(), 1);
|
| // Load the argument into r0 and call the stub.
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3550,7 +3550,7 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| Label done;
|
| @@ -3568,7 +3568,7 @@ void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
| VisitForStackValue(args->at(0));
|
| VisitForAccumulatorValue(args->at(1));
|
|
|
| @@ -3613,7 +3613,7 @@ void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
| VisitForStackValue(args->at(0));
|
| VisitForAccumulatorValue(args->at(1));
|
|
|
| @@ -3660,7 +3660,7 @@ void FullCodeGenerator::EmitStringCharAt(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(2, args->length());
|
| + DCHECK_EQ(2, args->length());
|
| VisitForStackValue(args->at(0));
|
| VisitForAccumulatorValue(args->at(1));
|
|
|
| @@ -3673,7 +3673,7 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(2, args->length());
|
| + DCHECK_EQ(2, args->length());
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
|
|
| @@ -3685,7 +3685,7 @@ void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() >= 2);
|
| + DCHECK(args->length() >= 2);
|
|
|
| int arg_count = args->length() - 2; // 2 ~ receiver and function.
|
| for (int i = 0; i < arg_count + 1; i++) {
|
| @@ -3718,7 +3718,7 @@ void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
|
| void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) {
|
| RegExpConstructResultStub stub(isolate());
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 3);
|
| + DCHECK(args->length() == 3);
|
| VisitForStackValue(args->at(0));
|
| VisitForStackValue(args->at(1));
|
| VisitForAccumulatorValue(args->at(2));
|
| @@ -3731,8 +3731,8 @@ void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT_EQ(2, args->length());
|
| - ASSERT_NE(NULL, args->at(0)->AsLiteral());
|
| + DCHECK_EQ(2, args->length());
|
| + DCHECK_NE(NULL, args->at(0)->AsLiteral());
|
| int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value();
|
|
|
| Handle<FixedArray> jsfunction_result_caches(
|
| @@ -3800,7 +3800,7 @@ void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
|
|
|
| void FullCodeGenerator::EmitGetCachedArrayIndex(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 1);
|
| + DCHECK(args->length() == 1);
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| __ AssertString(r0);
|
| @@ -3817,7 +3817,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| not_size_one_array, loop, empty_separator_loop, one_char_separator_loop,
|
| one_char_separator_loop_entry, long_separator_loop;
|
| ZoneList<Expression*>* args = expr->arguments();
|
| - ASSERT(args->length() == 2);
|
| + DCHECK(args->length() == 2);
|
| VisitForStackValue(args->at(1));
|
| VisitForAccumulatorValue(args->at(0));
|
|
|
| @@ -3975,7 +3975,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| __ CopyBytes(string, result_pos, string_length, scratch);
|
| __ cmp(element, elements_end);
|
| __ b(lt, &empty_separator_loop); // End while (element < elements_end).
|
| - ASSERT(result.is(r0));
|
| + DCHECK(result.is(r0));
|
| __ b(&done);
|
|
|
| // One-character separator case
|
| @@ -4007,7 +4007,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| __ CopyBytes(string, result_pos, string_length, scratch);
|
| __ cmp(element, elements_end);
|
| __ b(lt, &one_char_separator_loop); // End while (element < elements_end).
|
| - ASSERT(result.is(r0));
|
| + DCHECK(result.is(r0));
|
| __ b(&done);
|
|
|
| // Long separator case (separator is more than one character). Entry is at the
|
| @@ -4037,7 +4037,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
| __ CopyBytes(string, result_pos, string_length, scratch);
|
| __ cmp(element, elements_end);
|
| __ b(lt, &long_separator_loop); // End while (element < elements_end).
|
| - ASSERT(result.is(r0));
|
| + DCHECK(result.is(r0));
|
| __ b(&done);
|
|
|
| __ bind(&bailout);
|
| @@ -4048,7 +4048,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
|
|
|
|
| void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
|
| - ASSERT(expr->arguments()->length() == 0);
|
| + DCHECK(expr->arguments()->length() == 0);
|
| ExternalReference debug_is_active =
|
| ExternalReference::debug_is_active_address(isolate());
|
| __ mov(ip, Operand(debug_is_active));
|
| @@ -4139,7 +4139,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| Variable* var = proxy->var();
|
| // Delete of an unqualified identifier is disallowed in strict mode
|
| // but "delete this" is allowed.
|
| - ASSERT(strict_mode() == SLOPPY || var->is_this());
|
| + DCHECK(strict_mode() == SLOPPY || var->is_this());
|
| if (var->IsUnallocated()) {
|
| __ ldr(r2, GlobalObjectOperand());
|
| __ mov(r1, Operand(var->name()));
|
| @@ -4154,7 +4154,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| } else {
|
| // Non-global variable. Call the runtime to try to delete from the
|
| // context where the variable was introduced.
|
| - ASSERT(!context_register().is(r2));
|
| + DCHECK(!context_register().is(r2));
|
| __ mov(r2, Operand(var->name()));
|
| __ Push(context_register(), r2);
|
| __ CallRuntime(Runtime::kDeleteLookupSlot, 2);
|
| @@ -4195,7 +4195,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| // for control and plugging the control flow into the context,
|
| // because we need to prepare a pair of extra administrative AST ids
|
| // for the optimizing compiler.
|
| - ASSERT(context()->IsAccumulatorValue() || context()->IsStackValue());
|
| + DCHECK(context()->IsAccumulatorValue() || context()->IsStackValue());
|
| Label materialize_true, materialize_false, done;
|
| VisitForControl(expr->expression(),
|
| &materialize_false,
|
| @@ -4232,7 +4232,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
|
|
|
|
| void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| - ASSERT(expr->expression()->IsValidReferenceExpression());
|
| + DCHECK(expr->expression()->IsValidReferenceExpression());
|
|
|
| Comment cmnt(masm_, "[ CountOperation");
|
| SetSourcePosition(expr->position());
|
| @@ -4251,7 +4251,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
|
|
| // Evaluate expression and get value.
|
| if (assign_type == VARIABLE) {
|
| - ASSERT(expr->expression()->AsVariableProxy()->var() != NULL);
|
| + DCHECK(expr->expression()->AsVariableProxy()->var() != NULL);
|
| AccumulatorValueContext context(this);
|
| EmitVariableLoad(expr->expression()->AsVariableProxy());
|
| } else {
|
| @@ -4412,8 +4412,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
|
|
|
|
| void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
| - ASSERT(!context()->IsEffect());
|
| - ASSERT(!context()->IsTest());
|
| + DCHECK(!context()->IsEffect());
|
| + DCHECK(!context()->IsTest());
|
| VariableProxy* proxy = expr->AsVariableProxy();
|
| if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
| Comment cmnt(masm_, "[ Global variable");
|
| @@ -4646,7 +4646,7 @@ Register FullCodeGenerator::context_register() {
|
|
|
|
|
| void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) {
|
| - ASSERT_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset);
|
| + DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset);
|
| __ str(value, MemOperand(fp, frame_offset));
|
| }
|
|
|
| @@ -4671,7 +4671,7 @@ void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
|
| // code. Fetch it from the context.
|
| __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX));
|
| } else {
|
| - ASSERT(declaration_scope->is_function_scope());
|
| + DCHECK(declaration_scope->is_function_scope());
|
| __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| }
|
| __ push(ip);
|
| @@ -4682,7 +4682,7 @@ void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
|
| // Non-local control flow support.
|
|
|
| void FullCodeGenerator::EnterFinallyBlock() {
|
| - ASSERT(!result_register().is(r1));
|
| + DCHECK(!result_register().is(r1));
|
| // Store result register while executing finally block.
|
| __ push(result_register());
|
| // Cook return address in link register to stack (smi encoded Code* delta)
|
| @@ -4716,7 +4716,7 @@ void FullCodeGenerator::EnterFinallyBlock() {
|
|
|
|
|
| void FullCodeGenerator::ExitFinallyBlock() {
|
| - ASSERT(!result_register().is(r1));
|
| + DCHECK(!result_register().is(r1));
|
| // Restore pending message from stack.
|
| __ pop(r1);
|
| ExternalReference pending_message_script =
|
| @@ -4782,20 +4782,20 @@ FullCodeGenerator::NestedStatement* FullCodeGenerator::TryFinally::Exit(
|
| static Address GetInterruptImmediateLoadAddress(Address pc) {
|
| Address load_address = pc - 2 * Assembler::kInstrSize;
|
| if (!FLAG_enable_ool_constant_pool) {
|
| - ASSERT(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address)));
|
| + DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address)));
|
| } else if (Assembler::IsLdrPpRegOffset(Memory::int32_at(load_address))) {
|
| // This is an extended constant pool lookup.
|
| load_address -= 2 * Assembler::kInstrSize;
|
| - ASSERT(Assembler::IsMovW(Memory::int32_at(load_address)));
|
| - ASSERT(Assembler::IsMovT(
|
| + DCHECK(Assembler::IsMovW(Memory::int32_at(load_address)));
|
| + DCHECK(Assembler::IsMovT(
|
| Memory::int32_at(load_address + Assembler::kInstrSize)));
|
| } else if (Assembler::IsMovT(Memory::int32_at(load_address))) {
|
| // This is a movw_movt immediate load.
|
| load_address -= Assembler::kInstrSize;
|
| - ASSERT(Assembler::IsMovW(Memory::int32_at(load_address)));
|
| + DCHECK(Assembler::IsMovW(Memory::int32_at(load_address)));
|
| } else {
|
| // This is a small constant pool lookup.
|
| - ASSERT(Assembler::IsLdrPpImmediateOffset(Memory::int32_at(load_address)));
|
| + DCHECK(Assembler::IsLdrPpImmediateOffset(Memory::int32_at(load_address)));
|
| }
|
| return load_address;
|
| }
|
| @@ -4859,7 +4859,7 @@ BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState(
|
| Isolate* isolate,
|
| Code* unoptimized_code,
|
| Address pc) {
|
| - ASSERT(Assembler::IsBlxIp(Memory::int32_at(pc - Assembler::kInstrSize)));
|
| + DCHECK(Assembler::IsBlxIp(Memory::int32_at(pc - Assembler::kInstrSize)));
|
|
|
| Address pc_immediate_load_address = GetInterruptImmediateLoadAddress(pc);
|
| Address branch_address = pc_immediate_load_address - Assembler::kInstrSize;
|
| @@ -4867,19 +4867,19 @@ BackEdgeTable::BackEdgeState BackEdgeTable::GetBackEdgeState(
|
| pc_immediate_load_address, unoptimized_code);
|
|
|
| if (Assembler::IsBranch(Assembler::instr_at(branch_address))) {
|
| - ASSERT(interrupt_address ==
|
| + DCHECK(interrupt_address ==
|
| isolate->builtins()->InterruptCheck()->entry());
|
| return INTERRUPT;
|
| }
|
|
|
| - ASSERT(Assembler::IsNop(Assembler::instr_at(branch_address)));
|
| + DCHECK(Assembler::IsNop(Assembler::instr_at(branch_address)));
|
|
|
| if (interrupt_address ==
|
| isolate->builtins()->OnStackReplacement()->entry()) {
|
| return ON_STACK_REPLACEMENT;
|
| }
|
|
|
| - ASSERT(interrupt_address ==
|
| + DCHECK(interrupt_address ==
|
| isolate->builtins()->OsrAfterStackCheck()->entry());
|
| return OSR_AFTER_STACK_CHECK;
|
| }
|
|
|