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

Side by Side Diff: src/hydrogen.cc

Issue 6449002: Bailout from crankshaft if a global property is found in the prototype chain ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 global->Lookup(*var->name(), lookup); 2945 global->Lookup(*var->name(), lookup);
2946 if (!lookup->IsProperty()) { 2946 if (!lookup->IsProperty()) {
2947 BAILOUT("global variable cell not yet introduced"); 2947 BAILOUT("global variable cell not yet introduced");
2948 } 2948 }
2949 if (lookup->type() != NORMAL) { 2949 if (lookup->type() != NORMAL) {
2950 BAILOUT("global variable has accessors"); 2950 BAILOUT("global variable has accessors");
2951 } 2951 }
2952 if (is_store && lookup->IsReadOnly()) { 2952 if (is_store && lookup->IsReadOnly()) {
2953 BAILOUT("read-only global variable"); 2953 BAILOUT("read-only global variable");
2954 } 2954 }
2955 if (lookup->holder() != *global) {
2956 BAILOUT("global property on prototype of global object");
2957 }
2955 } 2958 }
2956 2959
2957 2960
2958 HValue* HGraphBuilder::BuildContextChainWalk(Variable* var) { 2961 HValue* HGraphBuilder::BuildContextChainWalk(Variable* var) {
2959 ASSERT(var->IsContextSlot()); 2962 ASSERT(var->IsContextSlot());
2960 HInstruction* context = new HContext; 2963 HInstruction* context = new HContext;
2961 AddInstruction(context); 2964 AddInstruction(context);
2962 int length = graph()->info()->scope()->ContextChainLength(var->scope()); 2965 int length = graph()->info()->scope()->ContextChainLength(var->scope());
2963 while (length-- > 0) { 2966 while (length-- > 0) {
2964 context = new HOuterContext(context); 2967 context = new HOuterContext(context);
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after
5924 } 5927 }
5925 } 5928 }
5926 5929
5927 #ifdef DEBUG 5930 #ifdef DEBUG
5928 if (graph_ != NULL) graph_->Verify(); 5931 if (graph_ != NULL) graph_->Verify();
5929 if (allocator_ != NULL) allocator_->Verify(); 5932 if (allocator_ != NULL) allocator_->Verify();
5930 #endif 5933 #endif
5931 } 5934 }
5932 5935
5933 } } // namespace v8::internal 5936 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698