| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index b0aa7be01d96a2f81909604cce8117cc43f56d91..e69e4ac1d5424a44dce66effa7b9130f753faa5b 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -590,14 +590,14 @@ void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
|
| if (length == 0) return;
|
| ASSERT(FLAG_deopt);
|
| Handle<DeoptimizationInputData> data =
|
| - FACTORY->NewDeoptimizationInputData(length, TENURED);
|
| + factory()->NewDeoptimizationInputData(length, TENURED);
|
|
|
| Handle<ByteArray> translations = translations_.CreateByteArray();
|
| data->SetTranslationByteArray(*translations);
|
| data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
|
|
|
| Handle<FixedArray> literals =
|
| - FACTORY->NewFixedArray(deoptimization_literals_.length(), TENURED);
|
| + factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
|
| for (int i = 0; i < deoptimization_literals_.length(); i++) {
|
| literals->set(i, *deoptimization_literals_[i]);
|
| }
|
| @@ -1902,8 +1902,8 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
|
|
|
| Label true_value, done;
|
| __ tst(r0, r0);
|
| - __ mov(r0, Operand(FACTORY->false_value()), LeaveCC, ne);
|
| - __ mov(r0, Operand(FACTORY->true_value()), LeaveCC, eq);
|
| + __ mov(r0, Operand(factory()->false_value()), LeaveCC, ne);
|
| + __ mov(r0, Operand(factory()->true_value()), LeaveCC, eq);
|
| }
|
|
|
|
|
| @@ -1962,13 +1962,13 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
|
| // We use Factory::the_hole_value() on purpose instead of loading from the
|
| // root array to force relocation to be able to later patch with
|
| // the cached map.
|
| - __ mov(ip, Operand(FACTORY->the_hole_value()));
|
| + __ mov(ip, Operand(factory()->the_hole_value()));
|
| __ cmp(map, Operand(ip));
|
| __ b(ne, &cache_miss);
|
| // We use Factory::the_hole_value() on purpose instead of loading from the
|
| // root array to force relocation to be able to later patch
|
| // with true or false.
|
| - __ mov(result, Operand(FACTORY->the_hole_value()));
|
| + __ mov(result, Operand(factory()->the_hole_value()));
|
| __ b(&done);
|
|
|
| // The inlined call site cache did not match. Check null and string before
|
| @@ -2182,7 +2182,7 @@ void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
|
| // Name is always in r2.
|
| __ mov(r2, Operand(instr->name()));
|
| Handle<Code> ic(
|
| - Isolate::Current()->builtins()->builtin(Builtins::LoadIC_Initialize));
|
| + isolate()->builtins()->builtin(Builtins::LoadIC_Initialize));
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -2313,8 +2313,8 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
|
| ASSERT(ToRegister(instr->object()).is(r1));
|
| ASSERT(ToRegister(instr->key()).is(r0));
|
|
|
| - Handle<Code> ic(Isolate::Current()->builtins()->
|
| - builtin(Builtins::KeyedLoadIC_Initialize));
|
| + Handle<Code> ic(isolate()->builtins()->builtin(
|
| + Builtins::KeyedLoadIC_Initialize));
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -2820,8 +2820,7 @@ void LCodeGen::DoCallKeyed(LCallKeyed* instr) {
|
|
|
| int arity = instr->arity();
|
| Handle<Code> ic =
|
| - Isolate::Current()->stub_cache()->ComputeKeyedCallInitialize(arity,
|
| - NOT_IN_LOOP);
|
| + isolate()->stub_cache()->ComputeKeyedCallInitialize(arity, NOT_IN_LOOP);
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| }
|
| @@ -2831,8 +2830,8 @@ void LCodeGen::DoCallNamed(LCallNamed* instr) {
|
| ASSERT(ToRegister(instr->result()).is(r0));
|
|
|
| int arity = instr->arity();
|
| - Handle<Code> ic = Isolate::Current()->stub_cache()->
|
| - ComputeCallInitialize(arity, NOT_IN_LOOP);
|
| + Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(
|
| + arity, NOT_IN_LOOP);
|
| __ mov(r2, Operand(instr->name()));
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| // Restore context register.
|
| @@ -2856,8 +2855,7 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
|
|
|
| int arity = instr->arity();
|
| Handle<Code> ic =
|
| - Isolate::Current()->stub_cache()->ComputeCallInitialize(arity,
|
| - NOT_IN_LOOP);
|
| + isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_IN_LOOP);
|
| __ mov(r2, Operand(instr->name()));
|
| CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
|
| __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| @@ -2875,8 +2873,8 @@ void LCodeGen::DoCallNew(LCallNew* instr) {
|
| ASSERT(ToRegister(instr->InputAt(0)).is(r1));
|
| ASSERT(ToRegister(instr->result()).is(r0));
|
|
|
| - Handle<Code> builtin(Isolate::Current()->builtins()->
|
| - builtin(Builtins::JSConstructCall));
|
| + Handle<Code> builtin(isolate()->builtins()->builtin(
|
| + Builtins::JSConstructCall));
|
| __ mov(r0, Operand(instr->arity()));
|
| CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr);
|
| }
|
| @@ -2925,7 +2923,7 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
|
|
| // Name is always in r2.
|
| __ mov(r2, Operand(instr->name()));
|
| - Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| + Handle<Code> ic(isolate()->builtins()->builtin(
|
| info_->is_strict() ? Builtins::StoreIC_Initialize_Strict
|
| : Builtins::StoreIC_Initialize));
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| @@ -2980,7 +2978,7 @@ void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
|
| ASSERT(ToRegister(instr->key()).is(r1));
|
| ASSERT(ToRegister(instr->value()).is(r0));
|
|
|
| - Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| + Handle<Code> ic(isolate()->builtins()->builtin(
|
| info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict
|
| : Builtins::KeyedStoreIC_Initialize));
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| @@ -3586,9 +3584,9 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) {
|
|
|
| void LCodeGen::LoadHeapObject(Register result,
|
| Handle<HeapObject> object) {
|
| - if (HEAP->InNewSpace(*object)) {
|
| + if (heap()->InNewSpace(*object)) {
|
| Handle<JSGlobalPropertyCell> cell =
|
| - FACTORY->NewJSGlobalPropertyCell(object);
|
| + factory()->NewJSGlobalPropertyCell(object);
|
| __ mov(result, Operand(cell));
|
| __ ldr(result, FieldMemOperand(result, JSGlobalPropertyCell::kValueOffset));
|
| } else {
|
| @@ -3738,8 +3736,8 @@ void LCodeGen::DoFunctionLiteral(LFunctionLiteral* instr) {
|
| } else {
|
| __ mov(r2, Operand(shared_info));
|
| __ mov(r1, Operand(pretenure
|
| - ? FACTORY->true_value()
|
| - : FACTORY->false_value()));
|
| + ? factory()->true_value()
|
| + : factory()->false_value()));
|
| __ Push(cp, r2, r1);
|
| CallRuntime(Runtime::kNewClosure, 3, instr);
|
| }
|
| @@ -3798,14 +3796,14 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| Handle<String> type_name) {
|
| Condition final_branch_condition = kNoCondition;
|
| Register scratch = scratch0();
|
| - if (type_name->Equals(HEAP->number_symbol())) {
|
| + if (type_name->Equals(heap()->number_symbol())) {
|
| __ JumpIfSmi(input, true_label);
|
| __ ldr(input, FieldMemOperand(input, HeapObject::kMapOffset));
|
| __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
|
| __ cmp(input, Operand(ip));
|
| final_branch_condition = eq;
|
|
|
| - } else if (type_name->Equals(HEAP->string_symbol())) {
|
| + } else if (type_name->Equals(heap()->string_symbol())) {
|
| __ JumpIfSmi(input, false_label);
|
| __ CompareObjectType(input, input, scratch, FIRST_NONSTRING_TYPE);
|
| __ b(ge, false_label);
|
| @@ -3813,13 +3811,13 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| __ tst(ip, Operand(1 << Map::kIsUndetectable));
|
| final_branch_condition = eq;
|
|
|
| - } else if (type_name->Equals(HEAP->boolean_symbol())) {
|
| + } else if (type_name->Equals(heap()->boolean_symbol())) {
|
| __ CompareRoot(input, Heap::kTrueValueRootIndex);
|
| __ b(eq, true_label);
|
| __ CompareRoot(input, Heap::kFalseValueRootIndex);
|
| final_branch_condition = eq;
|
|
|
| - } else if (type_name->Equals(HEAP->undefined_symbol())) {
|
| + } else if (type_name->Equals(heap()->undefined_symbol())) {
|
| __ CompareRoot(input, Heap::kUndefinedValueRootIndex);
|
| __ b(eq, true_label);
|
| __ JumpIfSmi(input, false_label);
|
| @@ -3829,12 +3827,12 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| __ tst(ip, Operand(1 << Map::kIsUndetectable));
|
| final_branch_condition = ne;
|
|
|
| - } else if (type_name->Equals(HEAP->function_symbol())) {
|
| + } else if (type_name->Equals(heap()->function_symbol())) {
|
| __ JumpIfSmi(input, false_label);
|
| __ CompareObjectType(input, input, scratch, FIRST_FUNCTION_CLASS_TYPE);
|
| final_branch_condition = ge;
|
|
|
| - } else if (type_name->Equals(HEAP->object_symbol())) {
|
| + } else if (type_name->Equals(heap()->object_symbol())) {
|
| __ JumpIfSmi(input, false_label);
|
| __ CompareRoot(input, Heap::kNullValueRootIndex);
|
| __ b(eq, true_label);
|
|
|