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

Side by Side Diff: src/ic/x64/handler-compiler-x64.cc

Issue 769733003: Do not embed constant functions in StoreTransition stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Check that registers do not overlap 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/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 Register map_reg = StoreTransitionDescriptor::MapRegister(); 328 Register map_reg = StoreTransitionDescriptor::MapRegister();
329 DCHECK(!map_reg.is(scratch)); 329 DCHECK(!map_reg.is(scratch));
330 __ LoadWeakValue(map_reg, cell, miss); 330 __ LoadWeakValue(map_reg, cell, miss);
331 if (transition->CanBeDeprecated()) { 331 if (transition->CanBeDeprecated()) {
332 __ movl(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); 332 __ movl(scratch, FieldOperand(map_reg, Map::kBitField3Offset));
333 __ andl(scratch, Immediate(Map::Deprecated::kMask)); 333 __ andl(scratch, Immediate(Map::Deprecated::kMask));
334 __ j(not_zero, miss); 334 __ j(not_zero, miss);
335 } 335 }
336 } 336 }
337 337
338 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, 338
339 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg,
340 int descriptor,
339 Register value_reg, 341 Register value_reg,
342 Register scratch,
340 Label* miss_label) { 343 Label* miss_label) {
341 __ Cmp(value_reg, handle(constant, isolate())); 344 DCHECK(!map_reg.is(scratch));
345 DCHECK(!map_reg.is(value_reg));
346 DCHECK(!value_reg.is(scratch));
347 __ LoadInstanceDescriptors(map_reg, scratch);
348 __ movp(scratch,
349 FieldOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
350 __ cmpp(value_reg, scratch);
342 __ j(not_equal, miss_label); 351 __ j(not_equal, miss_label);
343 } 352 }
344 353
345 354
346 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 355 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
347 Register value_reg, 356 Register value_reg,
348 Label* miss_label) { 357 Label* miss_label) {
349 __ JumpIfSmi(value_reg, miss_label); 358 __ JumpIfSmi(value_reg, miss_label);
350 HeapType::Iterator<Map> it = field_type->Classes(); 359 HeapType::Iterator<Map> it = field_type->Classes();
351 if (!it.Done()) { 360 if (!it.Done()) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 // Return the generated code. 702 // Return the generated code.
694 return GetCode(kind(), Code::NORMAL, name); 703 return GetCode(kind(), Code::NORMAL, name);
695 } 704 }
696 705
697 706
698 #undef __ 707 #undef __
699 } 708 }
700 } // namespace v8::internal 709 } // namespace v8::internal
701 710
702 #endif // V8_TARGET_ARCH_X64 711 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/x87/handler-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698