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

Side by Side Diff: src/type-info.cc

Issue 22184004: Desugar bitwise negation into XOR and kill all UnaryOp stuff. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 CompareIC::StubInfoToType( 377 CompareIC::StubInfoToType(
378 stub_minor_key, left_type, right_type, combined_type, map, isolate()); 378 stub_minor_key, left_type, right_type, combined_type, map, isolate());
379 } else if (code->is_compare_nil_ic_stub()) { 379 } else if (code->is_compare_nil_ic_stub()) {
380 CompareNilICStub stub(code->extended_extra_ic_state()); 380 CompareNilICStub stub(code->extended_extra_ic_state());
381 *combined_type = stub.GetType(isolate_, map); 381 *combined_type = stub.GetType(isolate_, map);
382 *left_type = *right_type = stub.GetInputType(isolate_, map); 382 *left_type = *right_type = stub.GetInputType(isolate_, map);
383 } 383 }
384 } 384 }
385 385
386 386
387 Handle<Type> TypeFeedbackOracle::UnaryType(TypeFeedbackId id) {
388 Handle<Object> object = GetInfo(id);
389 if (!object->IsCode()) {
390 return handle(Type::None(), isolate());
391 }
392 Handle<Code> code = Handle<Code>::cast(object);
393 ASSERT(code->is_unary_op_stub());
394 return UnaryOpStub(code->extended_extra_ic_state()).GetType(isolate());
395 }
396
397
398 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, 387 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id,
399 Handle<Type>* left, 388 Handle<Type>* left,
400 Handle<Type>* right, 389 Handle<Type>* right,
401 Handle<Type>* result, 390 Handle<Type>* result,
402 Maybe<int>* fixed_right_arg) { 391 Maybe<int>* fixed_right_arg) {
403 Handle<Object> object = GetInfo(id); 392 Handle<Object> object = GetInfo(id);
404 if (!object->IsCode()) { 393 if (!object->IsCode()) {
405 // For some binary ops we don't have ICs, e.g. Token::COMMA. 394 // For some binary ops we don't have ICs, e.g. Token::COMMA.
406 *left = *right = *result = handle(Type::None(), isolate_); 395 *left = *right = *result = handle(Type::None(), isolate_);
407 return; 396 return;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 if (info.IsUninitialized()) return Representation::None(); 700 if (info.IsUninitialized()) return Representation::None();
712 if (info.IsSmi()) return Representation::Smi(); 701 if (info.IsSmi()) return Representation::Smi();
713 if (info.IsInteger32()) return Representation::Integer32(); 702 if (info.IsInteger32()) return Representation::Integer32();
714 if (info.IsDouble()) return Representation::Double(); 703 if (info.IsDouble()) return Representation::Double();
715 if (info.IsNumber()) return Representation::Double(); 704 if (info.IsNumber()) return Representation::Double();
716 return Representation::Tagged(); 705 return Representation::Tagged();
717 } 706 }
718 707
719 708
720 } } // namespace v8::internal 709 } } // namespace v8::internal
OLDNEW
« src/runtime.js ('K') | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698