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

Side by Side Diff: src/ast.cc

Issue 10735054: Perform HasFastProperties check on prototypes when computing call targets in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-125148.js » ('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 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 case TRANSITION: 521 case TRANSITION:
522 case NONEXISTENT: 522 case NONEXISTENT:
523 UNREACHABLE(); 523 UNREACHABLE();
524 break; 524 break;
525 } 525 }
526 } 526 }
527 // If we reach the end of the prototype chain, we don't know the target. 527 // If we reach the end of the prototype chain, we don't know the target.
528 if (!type->prototype()->IsJSObject()) return false; 528 if (!type->prototype()->IsJSObject()) return false;
529 // Go up the prototype chain, recording where we are currently. 529 // Go up the prototype chain, recording where we are currently.
530 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); 530 holder_ = Handle<JSObject>(JSObject::cast(type->prototype()));
531 if (!holder_->HasFastProperties()) return false;
531 type = Handle<Map>(holder()->map()); 532 type = Handle<Map>(holder()->map());
532 } 533 }
533 } 534 }
534 535
535 536
536 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, 537 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
537 LookupResult* lookup) { 538 LookupResult* lookup) {
538 target_ = Handle<JSFunction>::null(); 539 target_ = Handle<JSFunction>::null();
539 cell_ = Handle<JSGlobalPropertyCell>::null(); 540 cell_ = Handle<JSGlobalPropertyCell>::null();
540 ASSERT(lookup->IsFound() && 541 ASSERT(lookup->IsFound() &&
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1130 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1130 str = arr; 1131 str = arr;
1131 } else { 1132 } else {
1132 str = DoubleToCString(handle_->Number(), buffer); 1133 str = DoubleToCString(handle_->Number(), buffer);
1133 } 1134 }
1134 return FACTORY->NewStringFromAscii(CStrVector(str)); 1135 return FACTORY->NewStringFromAscii(CStrVector(str));
1135 } 1136 }
1136 1137
1137 1138
1138 } } // namespace v8::internal 1139 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-125148.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698