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

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

Issue 2446073002: [stubs] Add more assertions in the CodeStubAssembler (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « src/code-stub-assembler.cc ('k') | src/interpreter/interpreter-assembler.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 #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
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
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
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/interpreter/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698