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

Side by Side Diff: src/code-stubs.h

Issue 892213003: Fetch global object from jsproxy prototype instead of embedding it in StoreGlobal. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 } 1085 }
1086 1086
1087 static Handle<HeapObject> global_placeholder(Isolate* isolate) { 1087 static Handle<HeapObject> global_placeholder(Isolate* isolate) {
1088 return isolate->factory()->uninitialized_value(); 1088 return isolate->factory()->uninitialized_value();
1089 } 1089 }
1090 1090
1091 Handle<Code> GetCodeCopyFromTemplate(Handle<GlobalObject> global, 1091 Handle<Code> GetCodeCopyFromTemplate(Handle<GlobalObject> global,
1092 Handle<PropertyCell> cell) { 1092 Handle<PropertyCell> cell) {
1093 if (check_global()) { 1093 if (check_global()) {
1094 Code::FindAndReplacePattern pattern; 1094 Code::FindAndReplacePattern pattern;
1095 pattern.Add(Handle<Map>(global_placeholder(isolate())->map()), global); 1095 pattern.Add(isolate()->factory()->meta_map(),
1096 pattern.Add(isolate()->factory()->meta_map(), Handle<Map>(global->map())); 1096 Map::WeakCellForMap(Handle<Map>(global->map())));
1097 pattern.Add(isolate()->factory()->global_property_cell_map(), cell); 1097 pattern.Add(isolate()->factory()->global_property_cell_map(), cell);
1098 return CodeStub::GetCodeCopy(pattern); 1098 return CodeStub::GetCodeCopy(pattern);
1099 } else { 1099 } else {
1100 Code::FindAndReplacePattern pattern; 1100 Code::FindAndReplacePattern pattern;
1101 pattern.Add(isolate()->factory()->global_property_cell_map(), cell); 1101 pattern.Add(isolate()->factory()->global_property_cell_map(), cell);
1102 return CodeStub::GetCodeCopy(pattern); 1102 return CodeStub::GetCodeCopy(pattern);
1103 } 1103 }
1104 } 1104 }
1105 1105
1106 Code::Kind kind() const OVERRIDE { return Code::STORE_IC; } 1106 Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 2671
2672 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2672 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2673 #undef DEFINE_PLATFORM_CODE_STUB 2673 #undef DEFINE_PLATFORM_CODE_STUB
2674 #undef DEFINE_HANDLER_CODE_STUB 2674 #undef DEFINE_HANDLER_CODE_STUB
2675 #undef DEFINE_HYDROGEN_CODE_STUB 2675 #undef DEFINE_HYDROGEN_CODE_STUB
2676 #undef DEFINE_CODE_STUB 2676 #undef DEFINE_CODE_STUB
2677 #undef DEFINE_CODE_STUB_BASE 2677 #undef DEFINE_CODE_STUB_BASE
2678 } } // namespace v8::internal 2678 } } // namespace v8::internal
2679 2679
2680 #endif // V8_CODE_STUBS_H_ 2680 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698