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 #include "src/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 | 2028 |
2029 Label miss(assembler); | 2029 Label miss(assembler); |
2030 | 2030 |
2031 if (check_global()) { | 2031 if (check_global()) { |
2032 // Check that the map of the global has not changed: use a placeholder map | 2032 // Check that the map of the global has not changed: use a placeholder map |
2033 // that will be replaced later with the global object's map. | 2033 // that will be replaced later with the global object's map. |
2034 Node* proxy_map = assembler->LoadMap(receiver); | 2034 Node* proxy_map = assembler->LoadMap(receiver); |
2035 Node* global = assembler->LoadObjectField(proxy_map, Map::kPrototypeOffset); | 2035 Node* global = assembler->LoadObjectField(proxy_map, Map::kPrototypeOffset); |
2036 Node* map_cell = assembler->HeapConstant(isolate()->factory()->NewWeakCell( | 2036 Node* map_cell = assembler->HeapConstant(isolate()->factory()->NewWeakCell( |
2037 StoreGlobalStub::global_map_placeholder(isolate()))); | 2037 StoreGlobalStub::global_map_placeholder(isolate()))); |
2038 Node* expected_map = assembler->LoadWeakCellValue(map_cell); | 2038 Node* expected_map = assembler->LoadWeakCellValueUnchecked(map_cell); |
2039 Node* map = assembler->LoadMap(global); | 2039 Node* map = assembler->LoadMap(global); |
2040 assembler->GotoIf(assembler->WordNotEqual(expected_map, map), &miss); | 2040 assembler->GotoIf(assembler->WordNotEqual(expected_map, map), &miss); |
2041 } | 2041 } |
2042 | 2042 |
2043 Node* weak_cell = assembler->HeapConstant(isolate()->factory()->NewWeakCell( | 2043 Node* weak_cell = assembler->HeapConstant(isolate()->factory()->NewWeakCell( |
2044 StoreGlobalStub::property_cell_placeholder(isolate()))); | 2044 StoreGlobalStub::property_cell_placeholder(isolate()))); |
2045 Node* cell = assembler->LoadWeakCellValue(weak_cell); | 2045 Node* cell = assembler->LoadWeakCellValue(weak_cell); |
2046 assembler->GotoIf(assembler->TaggedIsSmi(cell), &miss); | 2046 assembler->GotoIf(assembler->TaggedIsSmi(cell), &miss); |
2047 | 2047 |
2048 // Load the payload of the global parameter cell. A hole indicates that the | 2048 // Load the payload of the global parameter cell. A hole indicates that the |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3317 | 3317 |
3318 if (type == MachineType::Pointer()) { | 3318 if (type == MachineType::Pointer()) { |
3319 return Representation::External(); | 3319 return Representation::External(); |
3320 } | 3320 } |
3321 | 3321 |
3322 return Representation::Tagged(); | 3322 return Representation::Tagged(); |
3323 } | 3323 } |
3324 | 3324 |
3325 } // namespace internal | 3325 } // namespace internal |
3326 } // namespace v8 | 3326 } // namespace v8 |
OLD | NEW |