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

Side by Side Diff: src/ppc/lithium-codegen-ppc.cc

Issue 1230653004: Allow deferred handle dereference in EmitLoadRegister to retrieve number. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/v8.h" 5 #include "src/v8.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/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 411 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
412 if (op->IsRegister()) { 412 if (op->IsRegister()) {
413 return ToRegister(op->index()); 413 return ToRegister(op->index());
414 } else if (op->IsConstantOperand()) { 414 } else if (op->IsConstantOperand()) {
415 LConstantOperand* const_op = LConstantOperand::cast(op); 415 LConstantOperand* const_op = LConstantOperand::cast(op);
416 HConstant* constant = chunk_->LookupConstant(const_op); 416 HConstant* constant = chunk_->LookupConstant(const_op);
417 Handle<Object> literal = constant->handle(isolate()); 417 Handle<Object> literal = constant->handle(isolate());
418 Representation r = chunk_->LookupLiteralRepresentation(const_op); 418 Representation r = chunk_->LookupLiteralRepresentation(const_op);
419 if (r.IsInteger32()) { 419 if (r.IsInteger32()) {
420 AllowDeferredHandleDereference get_number;
420 DCHECK(literal->IsNumber()); 421 DCHECK(literal->IsNumber());
421 __ LoadIntLiteral(scratch, static_cast<int32_t>(literal->Number())); 422 __ LoadIntLiteral(scratch, static_cast<int32_t>(literal->Number()));
422 } else if (r.IsDouble()) { 423 } else if (r.IsDouble()) {
423 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); 424 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate);
424 } else { 425 } else {
425 DCHECK(r.IsSmiOrTagged()); 426 DCHECK(r.IsSmiOrTagged());
426 __ Move(scratch, literal); 427 __ Move(scratch, literal);
427 } 428 }
428 return scratch; 429 return scratch;
429 } else if (op->IsStackSlot()) { 430 } else if (op->IsStackSlot()) {
(...skipping 5836 matching lines...) Expand 10 before | Expand all | Expand 10 after
6266 __ Push(scope_info); 6267 __ Push(scope_info);
6267 __ push(ToRegister(instr->function())); 6268 __ push(ToRegister(instr->function()));
6268 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6269 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6269 RecordSafepoint(Safepoint::kNoLazyDeopt); 6270 RecordSafepoint(Safepoint::kNoLazyDeopt);
6270 } 6271 }
6271 6272
6272 6273
6273 #undef __ 6274 #undef __
6274 } // namespace internal 6275 } // namespace internal
6275 } // namespace v8 6276 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698