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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 12225099: Remove prototype checks for leaf maps in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add space after if Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/mark-compact.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 27e460cda4a3d2b2b797eeab5b896f9470d96a38..183f84740dc932a1038a364fc6b8ccb8a5729b1b 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -103,6 +103,10 @@ void LCodeGen::FinishCode(Handle<Code> code) {
if (!info()->IsStub()) {
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
}
+ for (int i = 0 ; i < prototype_maps_.length(); i++) {
+ prototype_maps_.at(i)->AddDependentCode(
+ DependentCode::kPrototypeCheckGroup, code);
+ }
}
@@ -919,7 +923,7 @@ void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) {
NoWeakEmbeddedMapsVerificationScope disable_verification_of_embedded_maps;
#endif
for (int i = 0; i < maps.length(); i++) {
- maps.at(i)->AddDependentCode(code);
+ maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, code);
}
}
@@ -5325,9 +5329,20 @@ void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
ASSERT(prototypes->length() == maps->length());
- for (int i = 0; i < prototypes->length(); i++) {
- __ LoadHeapObject(reg, prototypes->at(i));
- DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
+ // TODO(ulan): Move this check to hydrogen and split HCheckPrototypeMaps
+ // into two instruction: one that checks the prototypes and another that
+ // loads the holder (HConstant). Find a way to do it without breaking
+ // parallel recompilation.
+ if (instr->hydrogen()->CanOmitPrototypeChecks()) {
+ for (int i = 0; i < maps->length(); i++) {
+ prototype_maps_.Add(maps->at(i), info()->zone());
+ }
+ __ LoadHeapObject(reg, prototypes->at(prototypes->length() - 1));
+ } else {
+ for (int i = 0; i < prototypes->length(); i++) {
+ __ LoadHeapObject(reg, prototypes->at(i));
+ DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
+ }
}
}
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698