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

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

Issue 209353006: Refactor optimized in hydrogen only runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing + rebase Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/compiler/dead-string-char-code-at.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
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 4443 matching lines...) Expand 10 before | Expand all | Expand 10 after
4454 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); 4454 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue);
4455 if (instr->index()->IsConstantOperand()) { 4455 if (instr->index()->IsConstantOperand()) {
4456 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index())); 4456 int32_t const_index = ToInteger32(LConstantOperand::cast(instr->index()));
4457 __ Push(Smi::FromInt(const_index)); 4457 __ Push(Smi::FromInt(const_index));
4458 } else { 4458 } else {
4459 Register index = ToRegister(instr->index()); 4459 Register index = ToRegister(instr->index());
4460 __ Integer32ToSmi(index, index); 4460 __ Integer32ToSmi(index, index);
4461 __ Push(index); 4461 __ Push(index);
4462 } 4462 }
4463 CallRuntimeFromDeferred( 4463 CallRuntimeFromDeferred(
4464 Runtime::kStringCharCodeAt, 2, instr, instr->context()); 4464 Runtime::kHiddenStringCharCodeAt, 2, instr, instr->context());
4465 __ AssertSmi(rax); 4465 __ AssertSmi(rax);
4466 __ SmiToInteger32(rax, rax); 4466 __ SmiToInteger32(rax, rax);
4467 __ StoreToSafepointRegisterSlot(result, rax); 4467 __ StoreToSafepointRegisterSlot(result, rax);
4468 } 4468 }
4469 4469
4470 4470
4471 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4471 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4472 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { 4472 class DeferredStringCharFromCode V8_FINAL : public LDeferredCode {
4473 public: 4473 public:
4474 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4474 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5650 FixedArray::kHeaderSize - kPointerSize)); 5650 FixedArray::kHeaderSize - kPointerSize));
5651 __ bind(&done); 5651 __ bind(&done);
5652 } 5652 }
5653 5653
5654 5654
5655 #undef __ 5655 #undef __
5656 5656
5657 } } // namespace v8::internal 5657 } } // namespace v8::internal
5658 5658
5659 #endif // V8_TARGET_ARCH_X64 5659 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/compiler/dead-string-char-code-at.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698