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/ic/ic.cc

Issue 2100313002: Add crash instrumentation for crbug.com/621147 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: check value instead of map Created 4 years, 5 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
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-arguments-inl.h" 8 #include "src/api-arguments-inl.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 isolate, 2528 isolate,
2529 Runtime::SetObjectProperty(isolate, object, key, value, language_mode)); 2529 Runtime::SetObjectProperty(isolate, object, key, value, language_mode));
2530 } 2530 }
2531 2531
2532 2532
2533 MaybeHandle<Object> BinaryOpIC::Transition( 2533 MaybeHandle<Object> BinaryOpIC::Transition(
2534 Handle<AllocationSite> allocation_site, Handle<Object> left, 2534 Handle<AllocationSite> allocation_site, Handle<Object> left,
2535 Handle<Object> right) { 2535 Handle<Object> right) {
2536 BinaryOpICState state(isolate(), extra_ic_state()); 2536 BinaryOpICState state(isolate(), extra_ic_state());
2537 2537
2538 #ifdef V8_TARGET_ARCH_X64
2539 // Crash instrumentation for crbug.com/621147.
2540 uintptr_t left_raw = reinterpret_cast<uintptr_t>(*left);
2541 uintptr_t hole_raw =
2542 reinterpret_cast<uintptr_t>(isolate()->heap()->the_hole_value());
2543 if ((hole_raw & ((1ul << 32) - 1)) == (left_raw & ((1ul << 32) - 1))) {
2544 Code* c = GetCode();
2545 Code::Kind kind = c->kind();
2546 USE(kind);
2547 int instruction_size = c->instruction_size();
2548 byte* instructions = static_cast<byte*>(alloca(instruction_size));
2549 for (int i = 0; i < instruction_size; i++) {
2550 instructions[i] = c->instruction_start()[i];
2551 }
2552 isolate()->PushStackTraceAndDie(0xBAAAAAAD, pc(), fp(), 0u);
Igor Sheludko 2016/06/28 09:06:28 I have a fear that the instructions array could be
Michael Lippautz 2016/06/28 09:45:13 Done.
2553 }
2554 #endif // V8_TARGET_ARCH_X64
2555
2538 // Compute the actual result using the builtin for the binary operation. 2556 // Compute the actual result using the builtin for the binary operation.
2539 Handle<Object> result; 2557 Handle<Object> result;
2540 switch (state.op()) { 2558 switch (state.op()) {
2541 default: 2559 default:
2542 UNREACHABLE(); 2560 UNREACHABLE();
2543 case Token::ADD: 2561 case Token::ADD:
2544 ASSIGN_RETURN_ON_EXCEPTION(isolate(), result, 2562 ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
2545 Object::Add(isolate(), left, right), Object); 2563 Object::Add(isolate(), left, right), Object);
2546 break; 2564 break;
2547 case Token::SUB: 2565 case Token::SUB:
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, 3011 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC,
2994 vector->GetKind(vector_slot)); 3012 vector->GetKind(vector_slot));
2995 KeyedLoadICNexus nexus(vector, vector_slot); 3013 KeyedLoadICNexus nexus(vector, vector_slot);
2996 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3014 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
2997 ic.UpdateState(receiver, key); 3015 ic.UpdateState(receiver, key);
2998 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); 3016 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key));
2999 } 3017 }
3000 } 3018 }
3001 } // namespace internal 3019 } // namespace internal
3002 } // namespace v8 3020 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698