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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after
3464 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, 3464 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr,
3465 Deoptimizer::kHole); 3465 Deoptimizer::kHole);
3466 } 3466 }
3467 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3467 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3468 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3468 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3469 Label done; 3469 Label done;
3470 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 3470 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
3471 __ B(ne, &done); 3471 __ B(ne, &done);
3472 if (info()->IsStub()) { 3472 if (info()->IsStub()) {
3473 // A stub can safely convert the hole to undefined only if the array 3473 // A stub can safely convert the hole to undefined only if the array
3474 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3474 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid.
3475 // Otherwise
3475 // it needs to bail out. 3476 // it needs to bail out.
3476 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3477 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex);
3477 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 3478 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset));
3478 __ Cmp(result, Operand(Smi::FromInt(Isolate::kArrayProtectorValid))); 3479 __ Cmp(result,
3480 Operand(Smi::FromInt(Isolate::kArrayElementsProtectorValid)));
3479 DeoptimizeIf(ne, instr, Deoptimizer::kHole); 3481 DeoptimizeIf(ne, instr, Deoptimizer::kHole);
3480 } 3482 }
3481 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 3483 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3482 __ Bind(&done); 3484 __ Bind(&done);
3483 } 3485 }
3484 } 3486 }
3485 3487
3486 3488
3487 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3489 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3488 DCHECK(ToRegister(instr->context()).is(cp)); 3490 DCHECK(ToRegister(instr->context()).is(cp));
(...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after
5968 Handle<ScopeInfo> scope_info = instr->scope_info(); 5970 Handle<ScopeInfo> scope_info = instr->scope_info();
5969 __ Push(scope_info); 5971 __ Push(scope_info);
5970 __ Push(ToRegister(instr->function())); 5972 __ Push(ToRegister(instr->function()));
5971 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5973 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5972 RecordSafepoint(Safepoint::kNoLazyDeopt); 5974 RecordSafepoint(Safepoint::kNoLazyDeopt);
5973 } 5975 }
5974 5976
5975 5977
5976 } // namespace internal 5978 } // namespace internal
5977 } // namespace v8 5979 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698