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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 400
401 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 401 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
402 if (op->IsRegister()) { 402 if (op->IsRegister()) {
403 return ToRegister(op->index()); 403 return ToRegister(op->index());
404 } else if (op->IsConstantOperand()) { 404 } else if (op->IsConstantOperand()) {
405 LConstantOperand* const_op = LConstantOperand::cast(op); 405 LConstantOperand* const_op = LConstantOperand::cast(op);
406 HConstant* constant = chunk_->LookupConstant(const_op); 406 HConstant* constant = chunk_->LookupConstant(const_op);
407 Handle<Object> literal = constant->handle(isolate()); 407 Handle<Object> literal = constant->handle(isolate());
408 Representation r = chunk_->LookupLiteralRepresentation(const_op); 408 Representation r = chunk_->LookupLiteralRepresentation(const_op);
409 if (r.IsInteger32()) { 409 if (r.IsInteger32()) {
410 AllowDeferredHandleDereference get_number;
410 DCHECK(literal->IsNumber()); 411 DCHECK(literal->IsNumber());
411 __ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); 412 __ li(scratch, Operand(static_cast<int32_t>(literal->Number())));
412 } else if (r.IsSmi()) { 413 } else if (r.IsSmi()) {
413 DCHECK(constant->HasSmiValue()); 414 DCHECK(constant->HasSmiValue());
414 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value()))); 415 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value())));
415 } else if (r.IsDouble()) { 416 } else if (r.IsDouble()) {
416 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); 417 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate);
417 } else { 418 } else {
418 DCHECK(r.IsSmiOrTagged()); 419 DCHECK(r.IsSmiOrTagged());
419 __ li(scratch, literal); 420 __ li(scratch, literal);
(...skipping 5790 matching lines...) Expand 10 before | Expand all | Expand 10 after
6210 __ Push(at, ToRegister(instr->function())); 6211 __ Push(at, ToRegister(instr->function()));
6211 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6212 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6212 RecordSafepoint(Safepoint::kNoLazyDeopt); 6213 RecordSafepoint(Safepoint::kNoLazyDeopt);
6213 } 6214 }
6214 6215
6215 6216
6216 #undef __ 6217 #undef __
6217 6218
6218 } // namespace internal 6219 } // namespace internal
6219 } // namespace v8 6220 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698