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

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

Issue 6964012: Simple elimination of redundant array-hole checks. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 Register result = ToRegister(instr->result()); 2387 Register result = ToRegister(instr->result());
2388 ASSERT(result.is(elements)); 2388 ASSERT(result.is(elements));
2389 2389
2390 // Load the result. 2390 // Load the result.
2391 __ movq(result, FieldOperand(elements, 2391 __ movq(result, FieldOperand(elements,
2392 key, 2392 key,
2393 times_pointer_size, 2393 times_pointer_size,
2394 FixedArray::kHeaderSize)); 2394 FixedArray::kHeaderSize));
2395 2395
2396 // Check for the hole value. 2396 // Check for the hole value.
2397 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2397 if (instr->check_hole_value()) {
2398 DeoptimizeIf(equal, instr->environment()); 2398 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2399 DeoptimizeIf(equal, instr->environment());
2400 }
2399 } 2401 }
2400 2402
2401 2403
2402 void LCodeGen::DoLoadKeyedSpecializedArrayElement( 2404 void LCodeGen::DoLoadKeyedSpecializedArrayElement(
2403 LLoadKeyedSpecializedArrayElement* instr) { 2405 LLoadKeyedSpecializedArrayElement* instr) {
2404 Register external_pointer = ToRegister(instr->external_pointer()); 2406 Register external_pointer = ToRegister(instr->external_pointer());
2405 Register key = ToRegister(instr->key()); 2407 Register key = ToRegister(instr->key());
2406 ExternalArrayType array_type = instr->array_type(); 2408 ExternalArrayType array_type = instr->array_type();
2407 if (array_type == kExternalFloatArray) { 2409 if (array_type == kExternalFloatArray) {
2408 XMMRegister result(ToDoubleRegister(instr->result())); 2410 XMMRegister result(ToDoubleRegister(instr->result()));
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 RegisterEnvironmentForDeoptimization(environment); 4104 RegisterEnvironmentForDeoptimization(environment);
4103 ASSERT(osr_pc_offset_ == -1); 4105 ASSERT(osr_pc_offset_ == -1);
4104 osr_pc_offset_ = masm()->pc_offset(); 4106 osr_pc_offset_ = masm()->pc_offset();
4105 } 4107 }
4106 4108
4107 #undef __ 4109 #undef __
4108 4110
4109 } } // namespace v8::internal 4111 } } // namespace v8::internal
4110 4112
4111 #endif // V8_TARGET_ARCH_X64 4113 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698