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

Side by Side Diff: src/arm64/stub-cache-arm64.cc

Issue 236843002: Revert "Track field types." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/deoptimizer.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 ASSERT(!representation.IsNone()); 385 ASSERT(!representation.IsNone());
386 386
387 if (details.type() == CONSTANT) { 387 if (details.type() == CONSTANT) {
388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); 388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
389 __ LoadObject(scratch1, constant); 389 __ LoadObject(scratch1, constant);
390 __ Cmp(value_reg, scratch1); 390 __ Cmp(value_reg, scratch1);
391 __ B(ne, miss_label); 391 __ B(ne, miss_label);
392 } else if (representation.IsSmi()) { 392 } else if (representation.IsSmi()) {
393 __ JumpIfNotSmi(value_reg, miss_label); 393 __ JumpIfNotSmi(value_reg, miss_label);
394 } else if (representation.IsHeapObject()) { 394 } else if (representation.IsHeapObject()) {
395 HeapType* field_type = descriptors->GetFieldType(descriptor); 395 __ JumpIfSmi(value_reg, miss_label);
396 if (field_type->IsClass()) {
397 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
398 miss_label, DO_SMI_CHECK);
399 } else {
400 ASSERT(HeapType::Any()->Is(field_type));
401 __ JumpIfSmi(value_reg, miss_label);
402 }
403 } else if (representation.IsDouble()) { 396 } else if (representation.IsDouble()) {
404 UseScratchRegisterScope temps(masm); 397 UseScratchRegisterScope temps(masm);
405 DoubleRegister temp_double = temps.AcquireD(); 398 DoubleRegister temp_double = temps.AcquireD();
406 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); 399 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
407 400
408 Label do_store; 401 Label do_store;
409 __ JumpIfSmi(value_reg, &do_store); 402 __ JumpIfSmi(value_reg, &do_store);
410 403
411 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex, 404 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex,
412 miss_label, DONT_DO_SMI_CHECK); 405 miss_label, DONT_DO_SMI_CHECK);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Adjust for the number of properties stored in the object. Even in the 534 // Adjust for the number of properties stored in the object. Even in the
542 // face of a transition we can use the old map here because the size of the 535 // face of a transition we can use the old map here because the size of the
543 // object and the number of in-object properties is not going to change. 536 // object and the number of in-object properties is not going to change.
544 index -= object->map()->inobject_properties(); 537 index -= object->map()->inobject_properties();
545 538
546 Representation representation = lookup->representation(); 539 Representation representation = lookup->representation();
547 ASSERT(!representation.IsNone()); 540 ASSERT(!representation.IsNone());
548 if (representation.IsSmi()) { 541 if (representation.IsSmi()) {
549 __ JumpIfNotSmi(value_reg, miss_label); 542 __ JumpIfNotSmi(value_reg, miss_label);
550 } else if (representation.IsHeapObject()) { 543 } else if (representation.IsHeapObject()) {
551 HeapType* field_type = lookup->GetFieldType(); 544 __ JumpIfSmi(value_reg, miss_label);
552 if (field_type->IsClass()) {
553 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
554 miss_label, DO_SMI_CHECK);
555 } else {
556 ASSERT(HeapType::Any()->Is(field_type));
557 __ JumpIfSmi(value_reg, miss_label);
558 }
559 } else if (representation.IsDouble()) { 545 } else if (representation.IsDouble()) {
560 UseScratchRegisterScope temps(masm); 546 UseScratchRegisterScope temps(masm);
561 DoubleRegister temp_double = temps.AcquireD(); 547 DoubleRegister temp_double = temps.AcquireD();
562 548
563 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); 549 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
564 550
565 // Load the double storage. 551 // Load the double storage.
566 if (index < 0) { 552 if (index < 0) {
567 int offset = (index * kPointerSize) + object->map()->instance_size(); 553 int offset = (index * kPointerSize) + object->map()->instance_size();
568 __ Ldr(scratch1, FieldMemOperand(receiver_reg, offset)); 554 __ Ldr(scratch1, FieldMemOperand(receiver_reg, offset));
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 1485
1500 // Miss case, call the runtime. 1486 // Miss case, call the runtime.
1501 __ Bind(&miss); 1487 __ Bind(&miss);
1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1488 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1503 } 1489 }
1504 1490
1505 1491
1506 } } // namespace v8::internal 1492 } } // namespace v8::internal
1507 1493
1508 #endif // V8_TARGET_ARCH_ARM64 1494 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698