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

Side by Side Diff: src/hydrogen.cc

Issue 9722041: Insert explicit deoptimization for named loads that have "uninitialized" type feedback. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 | « src/ast.cc ('k') | src/type-info.h » ('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 4505 matching lines...) Expand 10 before | Expand all | Expand 10 after
4516 } else { 4516 } else {
4517 // Non-negative property indices are in the properties array. 4517 // Non-negative property indices are in the properties array.
4518 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; 4518 int offset = (index * kPointerSize) + FixedArray::kHeaderSize;
4519 return new(zone()) HLoadNamedField(object, false, offset); 4519 return new(zone()) HLoadNamedField(object, false, offset);
4520 } 4520 }
4521 } 4521 }
4522 4522
4523 4523
4524 HInstruction* HGraphBuilder::BuildLoadNamedGeneric(HValue* obj, 4524 HInstruction* HGraphBuilder::BuildLoadNamedGeneric(HValue* obj,
4525 Property* expr) { 4525 Property* expr) {
4526 if (expr->IsUninitialized()) {
4527 AddInstruction(new(zone()) HSoftDeoptimize);
4528 current_block()->MarkAsDeoptimizing();
4529 }
4526 ASSERT(expr->key()->IsPropertyName()); 4530 ASSERT(expr->key()->IsPropertyName());
4527 Handle<Object> name = expr->key()->AsLiteral()->handle(); 4531 Handle<Object> name = expr->key()->AsLiteral()->handle();
4528 HValue* context = environment()->LookupContext(); 4532 HValue* context = environment()->LookupContext();
4529 return new(zone()) HLoadNamedGeneric(context, obj, name); 4533 return new(zone()) HLoadNamedGeneric(context, obj, name);
4530 } 4534 }
4531 4535
4532 4536
4533 HInstruction* HGraphBuilder::BuildLoadNamed(HValue* obj, 4537 HInstruction* HGraphBuilder::BuildLoadNamed(HValue* obj,
4534 Property* expr, 4538 Property* expr,
4535 Handle<Map> map, 4539 Handle<Map> map,
(...skipping 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after
8161 } 8165 }
8162 } 8166 }
8163 8167
8164 #ifdef DEBUG 8168 #ifdef DEBUG
8165 if (graph_ != NULL) graph_->Verify(false); // No full verify. 8169 if (graph_ != NULL) graph_->Verify(false); // No full verify.
8166 if (allocator_ != NULL) allocator_->Verify(); 8170 if (allocator_ != NULL) allocator_->Verify();
8167 #endif 8171 #endif
8168 } 8172 }
8169 8173
8170 } } // namespace v8::internal 8174 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698