OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |