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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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: fixing tests Created 4 years, 8 months 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2921 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2922 DeoptimizeIf(equal, instr, Deoptimizer::kHole); 2922 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
2923 } 2923 }
2924 } else if (hinstr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 2924 } else if (hinstr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
2925 DCHECK(hinstr->elements_kind() == FAST_HOLEY_ELEMENTS); 2925 DCHECK(hinstr->elements_kind() == FAST_HOLEY_ELEMENTS);
2926 Label done; 2926 Label done;
2927 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2927 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2928 __ j(not_equal, &done); 2928 __ j(not_equal, &done);
2929 if (info()->IsStub()) { 2929 if (info()->IsStub()) {
2930 // A stub can safely convert the hole to undefined only if the array 2930 // A stub can safely convert the hole to undefined only if the array
2931 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 2931 // protector cell contains (Smi) Isolate::kArrayProtectorValid.
2932 // it needs to bail out. 2932 // Otherwise it needs to bail out.
2933 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 2933 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
2934 __ Cmp(FieldOperand(result, Cell::kValueOffset), 2934 __ Cmp(FieldOperand(result, Cell::kValueOffset),
2935 Smi::FromInt(Isolate::kArrayProtectorValid)); 2935 Smi::FromInt(Isolate::kArrayProtectorValid));
2936 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); 2936 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole);
2937 } 2937 }
2938 __ Move(result, isolate()->factory()->undefined_value()); 2938 __ Move(result, isolate()->factory()->undefined_value());
2939 __ bind(&done); 2939 __ bind(&done);
2940 } 2940 }
2941 } 2941 }
2942 2942
(...skipping 2649 matching lines...) Expand 10 before | Expand all | Expand 10 after
5592 __ bind(deferred->exit()); 5592 __ bind(deferred->exit());
5593 __ bind(&done); 5593 __ bind(&done);
5594 } 5594 }
5595 5595
5596 #undef __ 5596 #undef __
5597 5597
5598 } // namespace internal 5598 } // namespace internal
5599 } // namespace v8 5599 } // namespace v8
5600 5600
5601 #endif // V8_TARGET_ARCH_X64 5601 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698