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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 DeoptimizeIf(eq, instr, Deoptimizer::kHole); 3316 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
3317 } 3317 }
3318 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3318 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3319 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3319 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3320 Label done; 3320 Label done;
3321 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3321 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3322 __ cmp(result, scratch); 3322 __ cmp(result, scratch);
3323 __ bne(&done); 3323 __ bne(&done);
3324 if (info()->IsStub()) { 3324 if (info()->IsStub()) {
3325 // A stub can safely convert the hole to undefined only if the array 3325 // A stub can safely convert the hole to undefined only if the array
3326 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3326 // protector cell contains (Smi) Isolate::kArrayElementsProtectorValid.
3327 // Otherwise
3327 // it needs to bail out. 3328 // it needs to bail out.
3328 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3329 __ LoadRoot(result, Heap::kArrayElementsProtectorRootIndex);
3329 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset)); 3330 __ LoadP(result, FieldMemOperand(result, Cell::kValueOffset));
3330 __ CmpSmiLiteral(result, Smi::FromInt(Isolate::kArrayProtectorValid), r0); 3331 __ CmpSmiLiteral(result,
3332 Smi::FromInt(Isolate::kArrayElementsProtectorValid), r0);
3331 DeoptimizeIf(ne, instr, Deoptimizer::kHole); 3333 DeoptimizeIf(ne, instr, Deoptimizer::kHole);
3332 } 3334 }
3333 __ LoadRoot(result, Heap::kUndefinedValueRootIndex); 3335 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
3334 __ bind(&done); 3336 __ bind(&done);
3335 } 3337 }
3336 } 3338 }
3337 3339
3338 3340
3339 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) { 3341 void LCodeGen::DoLoadKeyed(LLoadKeyed* instr) {
3340 if (instr->is_fixed_typed_array()) { 3342 if (instr->is_fixed_typed_array()) {
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
6080 __ Push(scope_info); 6082 __ Push(scope_info);
6081 __ push(ToRegister(instr->function())); 6083 __ push(ToRegister(instr->function()));
6082 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6084 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6083 RecordSafepoint(Safepoint::kNoLazyDeopt); 6085 RecordSafepoint(Safepoint::kNoLazyDeopt);
6084 } 6086 }
6085 6087
6086 6088
6087 #undef __ 6089 #undef __
6088 } // namespace internal 6090 } // namespace internal
6089 } // namespace v8 6091 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698