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

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: use WeakCellForMap() when appropriate 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
« no previous file with comments | « 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 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 Register elements_pointer_reg = ToRegister(elements_pointer); 3273 Register elements_pointer_reg = ToRegister(elements_pointer);
3274 int shift_size = ElementsKindToShiftSize(elements_kind); 3274 int shift_size = ElementsKindToShiftSize(elements_kind);
3275 if (key->IsConstantOperand()) { 3275 if (key->IsConstantOperand()) {
3276 int32_t constant_value = ToInteger32(LConstantOperand::cast(key)); 3276 int32_t constant_value = ToInteger32(LConstantOperand::cast(key));
3277 if (constant_value & 0xF0000000) { 3277 if (constant_value & 0xF0000000) {
3278 Abort(kArrayIndexConstantValueTooBig); 3278 Abort(kArrayIndexConstantValueTooBig);
3279 } 3279 }
3280 return Operand(elements_pointer_reg, 3280 return Operand(elements_pointer_reg,
3281 (constant_value << shift_size) + offset); 3281 (constant_value << shift_size) + offset);
3282 } else { 3282 } else {
3283 // Take the tag bit into account while computing the shift size. 3283 // Guaranteed by ArrayInstructionInterface::KeyedAccessIndexRequirement().
3284 if (key_representation.IsSmi() && (shift_size >= 1)) { 3284 DCHECK(key_representation.IsInteger32());
3285 DCHECK(SmiValuesAre31Bits()); 3285
3286 shift_size -= kSmiTagSize;
3287 }
3288 ScaleFactor scale_factor = static_cast<ScaleFactor>(shift_size); 3286 ScaleFactor scale_factor = static_cast<ScaleFactor>(shift_size);
3289 return Operand(elements_pointer_reg, 3287 return Operand(elements_pointer_reg,
3290 ToRegister(key), 3288 ToRegister(key),
3291 scale_factor, 3289 scale_factor,
3292 offset); 3290 offset);
3293 } 3291 }
3294 } 3292 }
3295 3293
3296 3294
3297 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3295 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
(...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after
5918 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5916 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5919 RecordSafepoint(Safepoint::kNoLazyDeopt); 5917 RecordSafepoint(Safepoint::kNoLazyDeopt);
5920 } 5918 }
5921 5919
5922 5920
5923 #undef __ 5921 #undef __
5924 5922
5925 } } // namespace v8::internal 5923 } } // namespace v8::internal
5926 5924
5927 #endif // V8_TARGET_ARCH_X64 5925 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698