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

Side by Side Diff: src/hydrogen.cc

Issue 10578036: Merged r11861 into 3.11 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.11
Patch Set: Created 8 years, 6 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 | src/version.cc » ('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 4680 matching lines...) Expand 10 before | Expand all | Expand 10 after
4691 bool smi_and_map_check) { 4691 bool smi_and_map_check) {
4692 ASSERT(lookup->IsFound()); 4692 ASSERT(lookup->IsFound());
4693 if (smi_and_map_check) { 4693 if (smi_and_map_check) {
4694 AddInstruction(new(zone()) HCheckNonSmi(object)); 4694 AddInstruction(new(zone()) HCheckNonSmi(object));
4695 AddInstruction(HCheckMaps::NewWithTransitions(object, type, zone())); 4695 AddInstruction(HCheckMaps::NewWithTransitions(object, type, zone()));
4696 } 4696 }
4697 4697
4698 // If the property does not exist yet, we have to check that it wasn't made 4698 // If the property does not exist yet, we have to check that it wasn't made
4699 // readonly or turned into a setter by some meanwhile modifications on the 4699 // readonly or turned into a setter by some meanwhile modifications on the
4700 // prototype chain. 4700 // prototype chain.
4701 if (!lookup->IsProperty()) { 4701 if (!lookup->IsProperty() && type->prototype()->IsJSReceiver()) {
4702 Object* proto = type->prototype(); 4702 Object* proto = type->prototype();
4703 // First check that the prototype chain isn't affected already. 4703 // First check that the prototype chain isn't affected already.
4704 LookupResult proto_result(isolate()); 4704 LookupResult proto_result(isolate());
4705 proto->Lookup(*name, &proto_result); 4705 proto->Lookup(*name, &proto_result);
4706 if (proto_result.IsProperty()) { 4706 if (proto_result.IsProperty()) {
4707 // If the inherited property could induce readonly-ness, bail out. 4707 // If the inherited property could induce readonly-ness, bail out.
4708 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) { 4708 if (proto_result.IsReadOnly() || !proto_result.IsCacheable()) {
4709 Bailout("improper object on prototype chain for store"); 4709 Bailout("improper object on prototype chain for store");
4710 return NULL; 4710 return NULL;
4711 } 4711 }
(...skipping 4465 matching lines...) Expand 10 before | Expand all | Expand 10 after
9177 } 9177 }
9178 } 9178 }
9179 9179
9180 #ifdef DEBUG 9180 #ifdef DEBUG
9181 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9181 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9182 if (allocator_ != NULL) allocator_->Verify(); 9182 if (allocator_ != NULL) allocator_->Verify();
9183 #endif 9183 #endif
9184 } 9184 }
9185 9185
9186 } } // namespace v8::internal 9186 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698