Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.cc

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplifications Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3145 DeoptimizeIf(eq, instr, Deoptimizer::kHole); 3145 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
3146 } 3146 }
3147 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3147 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3148 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3148 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3149 Label done; 3149 Label done;
3150 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3150 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3151 __ cmp(result, scratch); 3151 __ cmp(result, scratch);
3152 __ b(ne, &done); 3152 __ b(ne, &done);
3153 if (info()->IsStub()) { 3153 if (info()->IsStub()) {
3154 // A stub can safely convert the hole to undefined only if the array 3154 // A stub can safely convert the hole to undefined only if the array
3155 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3155 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid.
3156 // Otherwise
3156 // it needs to bail out. 3157 // it needs to bail out.
3157 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3158 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex);
3158 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 3159 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
3159 __ cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); 3160 __ cmp(result,
3161 Operand(Smi::FromInt(Isolate::kArrayElementsProtectorValid)));
3160 DeoptimizeIf(ne, instr, Deoptimizer::kHole); 3162 DeoptimizeIf(ne, instr, Deoptimizer::kHole);
3161 } 3163 }
3162 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 3164 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3163 __ bind(&done); 3165 __ bind(&done);
3164 } 3166 }
3165 } 3167 }
3166 3168
3167 3169
3168 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3170 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3169 if (instr->is_fixed_typed_array()) { 3171 if (instr->is_fixed_typed_array()) {
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after
5792 __ push(ToRegister(instr->function())); 5794 __ push(ToRegister(instr->function()));
5793 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5795 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5794 RecordSafepoint(Safepoint::kNoLazyDeopt); 5796 RecordSafepoint(Safepoint::kNoLazyDeopt);
5795 } 5797 }
5796 5798
5797 5799
5798 #undef __ 5800 #undef __
5799 5801
5800 } // namespace internal 5802 } // namespace internal
5801 } // namespace v8 5803 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | src/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698