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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 19271008: Speed up Binops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 result = HType::Boolean(); 454 result = HType::Boolean();
455 } else if (value->IsJSObject()) { 455 } else if (value->IsJSObject()) {
456 result = HType::JSObject(); 456 result = HType::JSObject();
457 } else if (value->IsJSArray()) { 457 } else if (value->IsJSArray()) {
458 result = HType::JSArray(); 458 result = HType::JSArray();
459 } 459 }
460 return result; 460 return result;
461 } 461 }
462 462
463 463
464 Handle< ::v8::internal::Type> HType::intersect(
465 Handle< ::v8::internal::Type> type, Isolate* isolate) {
466 if (IsSmi()) return handle(::v8::internal::Type::Smi(), isolate);
Jakob Kummerow 2013/07/18 11:56:15 This is not a generic implementation of intersecti
467 if (IsString()) return handle(::v8::internal::Type::String(), isolate);
468 if (IsBoolean()) return handle(::v8::internal::Type::Boolean(), isolate);
469 if (IsHeapNumber() || IsTaggedNumber()) {
470 return handle(::v8::internal::Type::Intersect(
471 type, handle(::v8::internal::Type::Number(), isolate)), isolate);
472 }
473 if (IsNonPrimitive() || IsJSObject()) {
474 return handle(::v8::internal::Type::Intersect(
475 type, handle(::v8::internal::Type::NonSmi(), isolate)), isolate);
476 }
477 return type;
478 }
479
480
464 bool HValue::Dominates(HValue* dominator, HValue* dominated) { 481 bool HValue::Dominates(HValue* dominator, HValue* dominated) {
465 if (dominator->block() != dominated->block()) { 482 if (dominator->block() != dominated->block()) {
466 // If they are in different blocks we can use the dominance relation 483 // If they are in different blocks we can use the dominance relation
467 // between the blocks. 484 // between the blocks.
468 return dominator->block()->Dominates(dominated->block()); 485 return dominator->block()->Dominates(dominated->block());
469 } else { 486 } else {
470 // Otherwise we must see which instruction comes first, considering 487 // Otherwise we must see which instruction comes first, considering
471 // that phis always precede regular instructions. 488 // that phis always precede regular instructions.
472 if (dominator->IsInstruction()) { 489 if (dominator->IsInstruction()) {
473 if (dominated->IsInstruction()) { 490 if (dominated->IsInstruction()) {
(...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after
3994 case kBackingStore: 4011 case kBackingStore:
3995 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 4012 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3996 stream->Add("[backing-store]"); 4013 stream->Add("[backing-store]");
3997 break; 4014 break;
3998 } 4015 }
3999 4016
4000 stream->Add("@%d", offset()); 4017 stream->Add("@%d", offset());
4001 } 4018 }
4002 4019
4003 } } // namespace v8::internal 4020 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698