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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after
3246 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3246 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3247 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); 3247 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch));
3248 } 3248 }
3249 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3249 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3250 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3250 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3251 Label done; 3251 Label done;
3252 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3252 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3253 __ Branch(&done, ne, result, Operand(scratch)); 3253 __ Branch(&done, ne, result, Operand(scratch));
3254 if (info()->IsStub()) { 3254 if (info()->IsStub()) {
3255 // A stub can safely convert the hole to undefined only if the array 3255 // A stub can safely convert the hole to undefined only if the array
3256 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3256 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid.
3257 // Otherwise
3257 // it needs to bail out. 3258 // it needs to bail out.
3258 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3259 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex);
3259 // The comparison only needs LS bits of value, which is a smi. 3260 // The comparison only needs LS bits of value, which is a smi.
3260 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); 3261 __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
3261 DeoptimizeIf(ne, instr, Deoptimizer::kHole, result, 3262 DeoptimizeIf(
3262 Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); 3263 ne, instr, Deoptimizer::kHole, result,
3264 Operand(Smi::FromInt(Isolate::kArrayElementsProtectorValid)));
3263 } 3265 }
3264 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 3266 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3265 __ bind(&done); 3267 __ bind(&done);
3266 } 3268 }
3267 } 3269 }
3268 3270
3269 3271
3270 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3272 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3271 if (instr->is_fixed_typed_array()) { 3273 if (instr->is_fixed_typed_array()) {
3272 DoLoadKeyedExternalArray(instr); 3274 DoLoadKeyedExternalArray(instr);
(...skipping 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after
6034 __ Push(at, ToRegister(instr->function())); 6036 __ Push(at, ToRegister(instr->function()));
6035 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6037 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6036 RecordSafepoint(Safepoint::kNoLazyDeopt); 6038 RecordSafepoint(Safepoint::kNoLazyDeopt);
6037 } 6039 }
6038 6040
6039 6041
6040 #undef __ 6042 #undef __
6041 6043
6042 } // namespace internal 6044 } // namespace internal
6043 } // namespace v8 6045 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698