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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 12208013: Separated smi check from HBoundsCheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed platform specific code. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index f71bf38e42a0ecae4453f12dd29b9a018c5c550d..f1c162a2818f4eced1ba81c631da8f4d734ad656 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -3924,28 +3924,9 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
}
-void LCodeGen::DeoptIfTaggedButNotSmi(LEnvironment* environment,
- HValue* value,
- LOperand* operand) {
- if (value->representation().IsTagged() && !value->type().IsSmi()) {
- Condition cc;
- if (operand->IsRegister()) {
- cc = masm()->CheckSmi(ToRegister(operand));
- } else {
- cc = masm()->CheckSmi(ToOperand(operand));
- }
- DeoptimizeIf(NegateCondition(cc), environment);
- }
-}
-
-
void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
- DeoptIfTaggedButNotSmi(instr->environment(),
- instr->hydrogen()->length(),
- instr->length());
- DeoptIfTaggedButNotSmi(instr->environment(),
- instr->hydrogen()->index(),
- instr->index());
+ if (instr->hydrogen()->skip_check()) return;
+
if (instr->length()->IsRegister()) {
Register reg = ToRegister(instr->length());
if (!instr->hydrogen()->length()->representation().IsTagged()) {
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698