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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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: merging with master 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 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 __ cmp(result, factory()->the_hole_value()); 2720 __ cmp(result, factory()->the_hole_value());
2721 DeoptimizeIf(equal, instr, Deoptimizer::kHole); 2721 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
2722 } 2722 }
2723 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 2723 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
2724 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 2724 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
2725 Label done; 2725 Label done;
2726 __ cmp(result, factory()->the_hole_value()); 2726 __ cmp(result, factory()->the_hole_value());
2727 __ j(not_equal, &done); 2727 __ j(not_equal, &done);
2728 if (info()->IsStub()) { 2728 if (info()->IsStub()) {
2729 // A stub can safely convert the hole to undefined only if the array 2729 // A stub can safely convert the hole to undefined only if the array
2730 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 2730 // protector cell contains (Smi) Isolate::kArrayProtectorValid.
2731 // it needs to bail out. 2731 // Otherwise it needs to bail out.
2732 __ mov(result, isolate()->factory()->array_protector()); 2732 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
2733 __ cmp(FieldOperand(result, PropertyCell::kValueOffset), 2733 __ cmp(FieldOperand(result, PropertyCell::kValueOffset),
2734 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid))); 2734 Immediate(Smi::FromInt(Isolate::kArrayProtectorValid)));
2735 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole); 2735 DeoptimizeIf(not_equal, instr, Deoptimizer::kHole);
2736 } 2736 }
2737 __ mov(result, isolate()->factory()->undefined_value()); 2737 __ mov(result, isolate()->factory()->undefined_value());
2738 __ bind(&done); 2738 __ bind(&done);
2739 } 2739 }
2740 } 2740 }
2741 2741
2742 2742
(...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after
5287 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); 5287 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context);
5288 } 5288 }
5289 5289
5290 5290
5291 #undef __ 5291 #undef __
5292 5292
5293 } // namespace internal 5293 } // namespace internal
5294 } // namespace v8 5294 } // namespace v8
5295 5295
5296 #endif // V8_TARGET_ARCH_IA32 5296 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698