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

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

Issue 768633002: Add infrastructure to keep track of references to prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 6 years 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
« src/runtime/runtime-object.cc ('K') | « src/runtime/runtime-object.cc ('k') | no next file » | 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 // 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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after
3269 Register elements_pointer_reg = ToRegister(elements_pointer); 3269 Register elements_pointer_reg = ToRegister(elements_pointer);
3270 int shift_size = ElementsKindToShiftSize(elements_kind); 3270 int shift_size = ElementsKindToShiftSize(elements_kind);
3271 if (key->IsConstantOperand()) { 3271 if (key->IsConstantOperand()) {
3272 int32_t constant_value = ToInteger32(LConstantOperand::cast(key)); 3272 int32_t constant_value = ToInteger32(LConstantOperand::cast(key));
3273 if (constant_value & 0xF0000000) { 3273 if (constant_value & 0xF0000000) {
3274 Abort(kArrayIndexConstantValueTooBig); 3274 Abort(kArrayIndexConstantValueTooBig);
3275 } 3275 }
3276 return Operand(elements_pointer_reg, 3276 return Operand(elements_pointer_reg,
3277 (constant_value << shift_size) + offset); 3277 (constant_value << shift_size) + offset);
3278 } else { 3278 } else {
3279 // Take the tag bit into account while computing the shift size. 3279 // Guaranteed by ArrayInstructionInterface::KeyedAccessIndexRequirement().
3280 if (key_representation.IsSmi() && (shift_size >= 1)) { 3280 DCHECK(key_representation.IsInteger32());
3281 DCHECK(SmiValuesAre31Bits()); 3281
3282 shift_size -= kSmiTagSize;
3283 }
3284 ScaleFactor scale_factor = static_cast<ScaleFactor>(shift_size); 3282 ScaleFactor scale_factor = static_cast<ScaleFactor>(shift_size);
3285 return Operand(elements_pointer_reg, 3283 return Operand(elements_pointer_reg,
3286 ToRegister(key), 3284 ToRegister(key),
3287 scale_factor, 3285 scale_factor,
3288 offset); 3286 offset);
3289 } 3287 }
3290 } 3288 }
3291 3289
3292 3290
3293 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3291 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5889 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5887 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5890 RecordSafepoint(Safepoint::kNoLazyDeopt); 5888 RecordSafepoint(Safepoint::kNoLazyDeopt);
5891 } 5889 }
5892 5890
5893 5891
5894 #undef __ 5892 #undef __
5895 5893
5896 } } // namespace v8::internal 5894 } } // namespace v8::internal
5897 5895
5898 #endif // V8_TARGET_ARCH_X64 5896 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/runtime/runtime-object.cc ('K') | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698