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

Side by Side Diff: src/mips/lithium-codegen-mips.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/arm/lithium-codegen-arm.cc ('k') | src/mips64/lithium-codegen-mips64.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 418 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
419 if (op->IsRegister()) { 419 if (op->IsRegister()) {
420 return ToRegister(op->index()); 420 return ToRegister(op->index());
421 } else if (op->IsConstantOperand()) { 421 } else if (op->IsConstantOperand()) {
422 LConstantOperand* const_op = LConstantOperand::cast(op); 422 LConstantOperand* const_op = LConstantOperand::cast(op);
423 HConstant* constant = chunk_->LookupConstant(const_op); 423 HConstant* constant = chunk_->LookupConstant(const_op);
424 Handle<Object> literal = constant->handle(isolate()); 424 Handle<Object> literal = constant->handle(isolate());
425 Representation r = chunk_->LookupLiteralRepresentation(const_op); 425 Representation r = chunk_->LookupLiteralRepresentation(const_op);
426 if (r.IsInteger32()) { 426 if (r.IsInteger32()) {
427 AllowDeferredHandleDereference get_number;
427 DCHECK(literal->IsNumber()); 428 DCHECK(literal->IsNumber());
428 __ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); 429 __ li(scratch, Operand(static_cast<int32_t>(literal->Number())));
429 } else if (r.IsSmi()) { 430 } else if (r.IsSmi()) {
430 DCHECK(constant->HasSmiValue()); 431 DCHECK(constant->HasSmiValue());
431 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value()))); 432 __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value())));
432 } else if (r.IsDouble()) { 433 } else if (r.IsDouble()) {
433 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate); 434 Abort(kEmitLoadRegisterUnsupportedDoubleImmediate);
434 } else { 435 } else {
435 DCHECK(r.IsSmiOrTagged()); 436 DCHECK(r.IsSmiOrTagged());
436 __ li(scratch, literal); 437 __ li(scratch, literal);
(...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after
6028 __ Push(at, ToRegister(instr->function())); 6029 __ Push(at, ToRegister(instr->function()));
6029 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6030 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6030 RecordSafepoint(Safepoint::kNoLazyDeopt); 6031 RecordSafepoint(Safepoint::kNoLazyDeopt);
6031 } 6032 }
6032 6033
6033 6034
6034 #undef __ 6035 #undef __
6035 6036
6036 } // namespace internal 6037 } // namespace internal
6037 } // namespace v8 6038 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698