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

Side by Side Diff: src/ic.cc

Issue 25409003: Calm down GCMole after r17104. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « 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 // 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 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 case GENERIC: return "Generic"; 2340 case GENERIC: return "Generic";
2341 default: return "Invalid"; 2341 default: return "Invalid";
2342 } 2342 }
2343 } 2343 }
2344 2344
2345 2345
2346 MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) { 2346 MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) {
2347 Code::ExtraICState extra_ic_state = target()->extended_extra_ic_state(); 2347 Code::ExtraICState extra_ic_state = target()->extended_extra_ic_state();
2348 BinaryOpStub stub(extra_ic_state); 2348 BinaryOpStub stub(extra_ic_state);
2349 2349
2350 bool smi_was_enabled = stub.GetLeftType(isolate())->Maybe(Type::Smi()) && 2350 Handle<Type> left_type = stub.GetLeftType(isolate());
2351 stub.GetRightType(isolate())->Maybe(Type::Smi()); 2351 Handle<Type> right_type = stub.GetRightType(isolate());
2352 bool smi_was_enabled = left_type->Maybe(Type::Smi()) &&
2353 right_type->Maybe(Type::Smi());
2352 2354
2353 Maybe<Handle<Object> > result = stub.Result(left, right, isolate()); 2355 Maybe<Handle<Object> > result = stub.Result(left, right, isolate());
2354 2356
2355 #ifdef DEBUG 2357 #ifdef DEBUG
2356 if (FLAG_trace_ic) { 2358 if (FLAG_trace_ic) {
2357 char buffer[100]; 2359 char buffer[100];
2358 NoAllocationStringAllocator allocator(buffer, 2360 NoAllocationStringAllocator allocator(buffer,
2359 static_cast<unsigned>(sizeof(buffer))); 2361 static_cast<unsigned>(sizeof(buffer)));
2360 StringStream stream(&allocator); 2362 StringStream stream(&allocator);
2361 stream.Add("["); 2363 stream.Add("[");
(...skipping 11 matching lines...) Expand all
2373 } else { 2375 } else {
2374 stub.UpdateStatus(left, right, result); 2376 stub.UpdateStatus(left, right, result);
2375 } 2377 }
2376 #else 2378 #else
2377 stub.UpdateStatus(left, right, result); 2379 stub.UpdateStatus(left, right, result);
2378 #endif 2380 #endif
2379 2381
2380 Handle<Code> code = stub.GetCode(isolate()); 2382 Handle<Code> code = stub.GetCode(isolate());
2381 set_target(*code); 2383 set_target(*code);
2382 2384
2383 bool enable_smi = stub.GetLeftType(isolate())->Maybe(Type::Smi()) && 2385 left_type = stub.GetLeftType(isolate());
2384 stub.GetRightType(isolate())->Maybe(Type::Smi()); 2386 right_type = stub.GetRightType(isolate());
2387 bool enable_smi = left_type->Maybe(Type::Smi()) &&
2388 right_type->Maybe(Type::Smi());
2385 2389
2386 if (!smi_was_enabled && enable_smi) { 2390 if (!smi_was_enabled && enable_smi) {
2387 PatchInlinedSmiCode(address(), ENABLE_INLINED_SMI_CHECK); 2391 PatchInlinedSmiCode(address(), ENABLE_INLINED_SMI_CHECK);
2388 } else if (smi_was_enabled && !enable_smi) { 2392 } else if (smi_was_enabled && !enable_smi) {
2389 PatchInlinedSmiCode(address(), DISABLE_INLINED_SMI_CHECK); 2393 PatchInlinedSmiCode(address(), DISABLE_INLINED_SMI_CHECK);
2390 } 2394 }
2391 2395
2392 return result.has_value 2396 return result.has_value
2393 ? static_cast<MaybeObject*>(*result.value) 2397 ? static_cast<MaybeObject*>(*result.value)
2394 : Failure::Exception(); 2398 : Failure::Exception();
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 #undef ADDR 2773 #undef ADDR
2770 }; 2774 };
2771 2775
2772 2776
2773 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2777 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2774 return IC_utilities[id]; 2778 return IC_utilities[id];
2775 } 2779 }
2776 2780
2777 2781
2778 } } // namespace v8::internal 2782 } } // namespace v8::internal
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